/* ashtri — Jamesova delavnica. En list slogov za cel mini portal; barve samo prek spremenljivk. */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #6b6f76;
  --line: #e4ded5;
  --accent: #e8590c;
  --accent-soft: #fff1e7;
  --ok: #2f9e44;
  --warn: #f08c00;
  --bad: #e03131;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31,35,40,.06), 0 4px 16px rgba(31,35,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a; --surface: #1e2125; --ink: #eceef0; --muted: #9aa0a6;
    --line: #2d3136; --accent: #ff7a2f; --accent-soft: #2b1d14;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
}
a { color: inherit; }

/* ---------- okvir ---------- */
.top {
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; text-decoration: none; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.nav a {
  text-decoration: none; padding: .35rem .7rem; border-radius: 999px; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.who { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.who a { margin-left: .5rem; }
main { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .25rem; }
.sub { color: var(--muted); margin: 0 0 1.5rem; }

/* ---------- gradniki ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.25rem;
}
.grid { display: grid; gap: 1rem; }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.two { grid-template-columns: 2fr 1fr; }
@media (max-width: 820px) { .grid.two { grid-template-columns: 1fr; } }
.tile { text-decoration: none; display: flex; flex-direction: column; gap: .4rem; transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.tile .ico svg { width: 22px; height: 22px; }
.tile h3 { margin: .2rem 0 0; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: .9rem; }
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.tile .tag { align-self: flex-start; }
.tag.soon { background: transparent; }
.tag.ok { color: var(--ok); border-color: currentColor; background: transparent; }
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: .6rem 1rem; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
input[type=text], input[type=password] {
  width: 100%; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.err { color: var(--bad); margin-top: .75rem; }
.hint { color: var(--muted); font-size: .9rem; }

/* ---------- prijava ---------- */
.login { max-width: 380px; margin: 8vh auto; }
.login .brand { font-size: 2rem; display: block; text-align: center; margin-bottom: 1rem; }

/* ---------- printer ---------- */
.stat { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .75rem; }
.stat div { min-width: 90px; }
.stat b { display: block; font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: .75rem; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); }
.cam {
  aspect-ratio: 16/9; border-radius: 10px; background: #0d0f12; color: #8a9099;
  display: grid; place-items: center; font-size: .9rem;
}
.ams { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .5rem; }
.ams div { border: 1px solid var(--line); border-radius: 10px; padding: .5rem; text-align: center; font-size: .8rem; }
.ams i { display: block; height: 28px; border-radius: 6px; margin-bottom: .35rem; border: 1px solid rgba(0,0,0,.1); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; }

/* ---------- knjiznica ---------- */
.model { padding: 0; overflow: hidden; }
.model .view { aspect-ratio: 4/3; background: var(--bg); border-bottom: 1px solid var(--line); }
.model .view canvas { width: 100% !important; height: 100% !important; display: block; }
.model .body { padding: .9rem 1.1rem 1.1rem; }
.model h3 { margin: 0 0 .25rem; font-size: 1rem; }
.meta { color: var(--muted); font-size: .85rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- znanje ---------- */
.wiki { display: grid; grid-template-columns: 240px 1fr; gap: 1.25rem; }
@media (max-width: 820px) { .wiki { grid-template-columns: 1fr; } }
.wiki nav a { display: block; text-decoration: none; padding: .35rem .6rem; border-radius: 8px; color: var(--muted); }
.wiki nav a.on, .wiki nav a:hover { background: var(--accent-soft); color: var(--accent); }
.wiki nav h4 { margin: 1rem 0 .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 0; }

/* ---------- izzivi in medalje ---------- */
.stars { color: var(--accent); letter-spacing: .1em; }
.medal {
  display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; border-radius: 999px;
  font-weight: 800; font-size: .85rem; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15);
}
.medal.gold { background: linear-gradient(135deg, #ffd43b, #f08c00); }
.medal.silver { background: linear-gradient(135deg, #dee2e6, #868e96); }
.medal.bronze { background: linear-gradient(135deg, #e8a87c, #a0522d); }
.tag.warn { color: var(--warn); border-color: currentColor; background: transparent; }

/* ---------- 3D predogled ---------- */
.model .view { position: relative; }
.model .view.big { aspect-ratio: 4 / 3; }
.model .view canvas { cursor: grab; }
.prose ul { padding-left: 1.1rem; }

/* ---------- knjiznica: filtri in narocnik ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.filters input[type=text] { flex: 1 1 240px; width: auto; }
.filters select {
  padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; max-width: 220px;
}
.filters select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.client { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.client a { color: inherit; }

/* ---------- model: plosca in deli ---------- */
.model .view.plate { aspect-ratio: 350 / 320; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.part { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.part .view.thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.part .body { padding: .5rem .65rem .6rem; background: var(--surface, #fff); }
.part .body .hint { margin-top: .15rem; }
/* ideje in kosarica */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.idea ul { margin: .6rem 0; }
.shoplist { list-style: none; padding: 0; margin: .3rem 0 .8rem; }
.shop { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--line); }
.shop form { margin: 0; }
.shop .check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: var(--surface); color: var(--ok); font-weight: 700; line-height: 1; cursor: pointer; padding: 0; margin-top: .1rem; }
.shop .check:hover { border-color: var(--accent); }
.shop.bought b { text-decoration: line-through; color: var(--muted); }
.addform input[type=text] { margin-bottom: .4rem; }
.area { width: 100%; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.prose.idea { max-width: none; }
/* kosarica, material, planiranje */
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; } }
.shop .acts { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.btn.small { padding: .25rem .55rem; font-size: .8rem; }
select.small { padding: .2rem .35rem; font-size: .8rem; }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin: .35rem 0 .15rem; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
@media (max-width: 700px) { .slots { grid-template-columns: repeat(2, 1fr); } }
.slot { display: flex; gap: .6rem; align-items: center; }
.slot .dot { flex: none; border-radius: 50%; }
/* zlozljive kartice: kosarica po rubrikah, material po tipih (stanje si zapomni brskalnik, page() v app.php) */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '▸'; color: var(--muted); display: inline-block; width: .8em; transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary h2 { margin: 0; }
.fold > summary:hover h2 { color: var(--accent); }
.fold[open] > summary { margin-bottom: .45rem; }
/* kosarica: ocena cene je zadnji stolpec vrstice, vsota rubrike pod njim */
.shop .price { flex: none; min-width: 4.5rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: .1rem; }
.shop .price .hint { display: block; font-weight: 400; font-size: .75rem; }
.shop .price.none, .shop.bought .price { color: var(--muted); font-weight: 400; }
.shoptotal { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 2px solid var(--line); padding-top: .45rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- ukazi v Znanju: blok za kopiranje in kratka koda v besedilu ---------- */
.prose pre { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 5.5rem .8rem .9rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.prose p code, .prose li code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 .3rem; font-size: .9em; }
.prose pre .copy { position: absolute; top: .5rem; right: .5rem; border: 0; border-radius: 8px; padding: .3rem .7rem; background: var(--accent); color: #fff; cursor: pointer; font: inherit; font-size: .8rem; }
