/* Szálirány workshop admin. Same skeleton as a real shop admin (grouped sidebar, page header, stat cards, tables,
   side sheet), in the workshop's own materials: graphite sidebar, drafting-paper work area, pencil blue for action,
   wood only where an order's table is drawn. */
:root {
  --paper: #EDEFEA; --paper-2: #E3E6E0; --paper-3: #D3D7D0; --white: #FAFBF8;
  --ink: #23272B; --ink-2: #565C61; --ink-3: #868C90;
  --side: #1E2124; --side-2: #2A2E32; --side-t: #C9CDCF; --side-m: #82898E;
  --pencil: #2F5D9E; --pencil-l: #DFE7F2; --wood: #C59C67; --wood-l: #F1E6D6;
  --ok: #2F7A49; --ok-l: #DCEDE1; --warn: #A65A1F; --warn-l: #F5E5D6; --bad: #A33A2A; --bad-l: #F4DDD8; --vio: #5B4E9E; --vio-l: #E6E3F4;
  --f-d: "Gloock", Georgia, serif; --f-b: "Schibsted Grotesk", system-ui, sans-serif; --ease: cubic-bezier(.2, .7, .2, 1);
  --r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14px/1.5 var(--f-b); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ol, ul, figure, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- frame ---------- */
.app { display: flex; height: 100dvh; overflow: hidden; }
.side { width: 264px; flex: none; display: flex; flex-direction: column; background: var(--side); color: var(--side-t); }
.side-top { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #F2F3F1; }
.mark svg { width: 26px; height: 26px; fill: none; stroke: var(--wood); stroke-width: 2.4; stroke-linecap: round; }
.mark span { font: 400 21px/1 var(--f-d); }
.mark small { display: block; margin-top: 4px; font: 500 12px/1 var(--f-b); color: var(--side-m); }
.side-top .side-x { display: none; }
.nav { flex: 1; overflow-y: auto; padding: 12px 12px 16px; }
.nav-g + .nav-g { margin-top: 14px; }
.nav-h { padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--side-m); }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 10px; border-radius: var(--r); text-decoration: none; font-weight: 500; color: var(--side-t); transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a[aria-current="page"] { background: var(--wood); color: #1E1A14; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(197, 156, 103, .55); }
.nav .bdg { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(197, 156, 103, .2); color: var(--wood); font-size: 12px; font-weight: 700; text-align: center; }
.nav a[aria-current="page"] .bdg { background: rgba(30, 26, 20, .15); color: #1E1A14; }
.side-foot { flex: none; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); background: var(--side-2); }
.me i { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--wood); color: #1E1A14; font-style: normal; font-weight: 700; }
.me b { display: block; color: #F2F3F1; font-size: 13px; }
.me small { display: block; color: var(--side-m); font-size: 12px; }
.back { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); text-decoration: none; font-weight: 600; }
.back:hover { background: rgba(255, 255, 255, .05); }
.side-demo { font-size: 12px; color: var(--side-m); }
.side-demo a { color: #F2F3F1; font-weight: 700; }

.main-w { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--paper-3); background: rgba(250, 251, 248, .7); backdrop-filter: blur(8px); }
.top .menu-b { display: none; }
.live { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--wood); animation: live 2s infinite; }
@keyframes live { 50% { opacity: .35; } }
.top-h { font: 600 18px/1 var(--f-b); white-space: nowrap; }
.gsearch { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(320px, 34vw); height: 38px; padding: 0 12px; border-radius: var(--r); background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); color: var(--ink-3); }
.gsearch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.gsearch:focus-within { box-shadow: inset 0 0 0 2px var(--pencil); }
.top-d { color: var(--ink-2); white-space: nowrap; }
.main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.page { max-width: 1600px; margin: 0 auto; padding: 24px 28px 48px; display: grid; gap: 20px; }
.ib { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--r); }
.ib:hover { background: var(--paper-2); }
.side .ib:hover { background: rgba(255, 255, 255, .06); }
.hint { color: var(--ink-2); }

/* ---------- blocks ---------- */
.hello { position: relative; overflow: hidden; padding: 22px 26px; border-radius: 10px; background: var(--side); color: #F2F3F1; }
.hello::after { content: ""; position: absolute; right: -40px; top: -30px; width: 340px; height: 200px; background: repeating-linear-gradient(172deg, transparent 0 9px, rgba(197, 156, 103, .14) 9px 10px); transform: rotate(-4deg); }
.hello h2 { position: relative; z-index: 1; font: 400 30px/1.1 var(--f-d); margin-bottom: 6px; }
.hello p { position: relative; z-index: 1; color: var(--side-t); max-width: 70ch; }
.hello b { color: var(--wood); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 16px 18px 18px; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); transition: box-shadow .2s; }
.stat:hover { box-shadow: inset 0 0 0 1px var(--ink-3), 0 8px 20px -12px rgba(35, 39, 43, .3); }
.stat-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 500; }
.tile { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 9px; background: var(--pencil-l); color: var(--pencil); }
.tile.wood { background: var(--wood-l); color: #8A6331; } .tile.ok { background: var(--ok-l); color: var(--ok); } .tile.warn { background: var(--warn-l); color: var(--warn); } .tile.bad { background: var(--bad-l); color: var(--bad); }
.stat-v { margin-top: 8px; font: 400 32px/1.05 var(--f-d); }
.stat-d { margin-top: 4px; color: var(--ink-2); font-size: 13px; }
.trend { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--ok-l); color: var(--ok); }
.trend.dn { background: var(--bad-l); color: var(--bad); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cols-3 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.card { min-width: 0; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(227, 230, 224, .5); border-bottom: 1px solid var(--paper-3); }
.card-h h2 { font-size: 15px; font-weight: 700; }
.card-h .tile { width: 34px; height: 34px; }
.card-h .more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--pencil); font-weight: 600; font-size: 13px; }
.card-h .more .ico { width: 15px; height: 15px; }
.card-b { padding: 16px 18px; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--paper-2); }
.rows > li:first-child { border-top: 0; }
.rows > li.hover:hover { background: var(--paper); cursor: pointer; }
.no { display: grid; place-items: center; flex: none; width: 48px; height: 40px; border-radius: 8px; background: var(--paper-2); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.rows .grow { flex: 1; min-width: 0; }
.rows b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows small { display: block; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); }
.todo li { align-items: flex-start; }
.todo .tile { width: 32px; height: 32px; }
.todo .btn { flex: none; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-new { background: var(--pencil-l); color: var(--pencil); border-color: rgba(47, 93, 158, .2); }
.p-make { background: var(--wood-l); color: #85602F; border-color: rgba(197, 156, 103, .35); }
.p-ready { background: var(--vio-l); color: var(--vio); border-color: rgba(91, 78, 158, .2); }
.p-done { background: var(--ok-l); color: var(--ok); border-color: rgba(47, 122, 73, .2); }
.p-late { background: var(--warn-l); color: var(--warn); border-color: rgba(166, 90, 31, .25); }
.p-off { background: var(--paper-2); color: var(--ink-2); }
.p-bad { background: var(--bad-l); color: var(--bad); border-color: rgba(163, 58, 42, .2); }

/* charts */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; height: 210px; padding-top: 22px; }
.bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; outline: none; }
.bar i { display: block; border-radius: 4px 4px 0 0; background: var(--paper-3); transition: background .15s; min-height: 2px; }
.bar.cur i { background: var(--ink); }
.bar:hover i, .bar:focus-visible i { background: var(--pencil); }
.bar b { position: absolute; left: 50%; bottom: calc(var(--h) + 26px); transform: translateX(-50%); font-size: 11px; font-weight: 700; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.bar:hover b, .bar:focus-visible b, .bar.cur b { opacity: 1; }
.bar span { margin-top: 6px; text-align: center; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.hbars li { display: grid; grid-template-columns: 120px 1fr 100px; gap: 12px; align-items: center; padding: 7px 0; }
.hbars .t { height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.hbars i { display: block; height: 100%; border-radius: 999px; background: var(--wood); }
.hbars span:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* tools + tables */
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; width: min(320px, 100%); padding: 0 12px; border-radius: var(--r); background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--pencil); }
.sel { height: 40px; padding: 0 30px 0 12px; border: 0; border-radius: var(--r); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565C61' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center / 11px; box-shadow: inset 0 0 0 1px var(--paper-3); -webkit-appearance: none; appearance: none; font-weight: 500; }
.sel:focus { outline: none; box-shadow: inset 0 0 0 2px var(--pencil); }
.tools .count { margin-left: auto; color: var(--ink-2); }
.tbl-w { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--paper-2); white-space: nowrap; vertical-align: middle; }
th { position: sticky; top: 0; font-size: 12px; font-weight: 700; color: var(--ink-2); background: #F2F4F0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--paper); }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--ink-2); font-size: 12px; }
td .sel { height: 32px; font-size: 13px; }
.thumb { display: block; width: 76px; border-radius: 4px; background: var(--paper); padding: 2px; }
.thumb svg { display: block; width: 100%; height: auto; }
.switch { position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; background: var(--paper-3); transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--r); font-weight: 700; font-size: 13px; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.btn .ico { width: 16px; height: 16px; }
.btn-ink { background: var(--ink); color: var(--white); } .btn-ink:hover { background: #111316; }
.btn-wood { background: var(--wood); color: #1E1A14; } .btn-wood:hover { background: #B88C55; }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--paper-3); background: var(--white); } .btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost { color: var(--pencil); } .btn-ghost:hover { background: var(--pencil-l); }
.btn:disabled { opacity: .45; cursor: default; }
.fld { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld textarea, .fld select { min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--r); background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); color: var(--ink); font-weight: 400; font-size: 14px; }
.fld textarea { min-height: 90px; resize: vertical; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--pencil); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--paper-2); }
.setrow:first-child { border-top: 0; }
.setrow small { display: block; color: var(--ink-2); font-size: 13px; }

/* production board */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { display: flex; flex-direction: column; gap: 8px; min-height: 62vh; padding: 10px; border-radius: 10px; background: var(--paper-2); transition: background .15s, box-shadow .15s; }
.col.over { background: var(--pencil-l); box-shadow: inset 0 0 0 2px var(--pencil); }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; font-weight: 700; }
.col-h span { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--white); text-align: center; font-size: 12px; }
.kc { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: var(--white); box-shadow: 0 1px 2px rgba(35, 39, 43, .08), inset 0 0 0 1px var(--paper-3); cursor: grab; }
.kc:hover { box-shadow: 0 4px 12px rgba(35, 39, 43, .1), inset 0 0 0 1px var(--ink-3); }
.kc.drag { opacity: .4; }
.kc.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--wood); } }
.kc svg { display: block; width: 100%; height: auto; }
.kc-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.kc-t small { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.kc p { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.kc-b { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.adv { min-height: 28px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--paper-3); }
.adv:hover { background: var(--ink); color: var(--white); box-shadow: none; }
.new { padding: 1px 7px; border-radius: 999px; background: var(--pencil); color: #fff; font-size: 11px; font-weight: 700; }

/* deliveries */
.wk { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; }
.day { min-height: 200px; padding: 10px; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); }
.day.today { box-shadow: inset 0 0 0 2px var(--wood); }
.day-h { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; text-transform: capitalize; }
.day-h small { color: var(--ink-2); font-weight: 500; }
.dv { display: block; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 8px; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--wood); }
.dv:hover { background: var(--paper-2); }
.dv.done { border-left-color: var(--ok); opacity: .7; }
.dv b { display: block; font-size: 13px; }
.dv small { display: block; color: var(--ink-2); font-size: 12px; }
.route { counter-reset: r; }
.route li { counter-increment: r; display: flex; gap: 10px; padding: 6px 0; }
.route li::before { content: counter(r); display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }

/* stock */
.woods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wood-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wood-h i { width: 44px; height: 28px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.wood-h b { font: 400 22px/1 var(--f-d); }
.wood-h .pill { margin-left: auto; }
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.meter i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.meter .res { background: var(--wood); } .meter .free { background: var(--ink); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.trio dt { color: var(--ink-2); font-size: 12px; }
.trio dd { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.wood .act { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ordered { color: var(--ok); font-weight: 700; font-size: 13px; }

/* ---------- sheet (right panel) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(30, 33, 36, .45); animation: fade .2s; }
.sheet-in { position: absolute; top: 0; right: 0; bottom: 0; width: min(660px, 100%); display: flex; flex-direction: column; background: var(--paper); box-shadow: -20px 0 40px rgba(0, 0, 0, .18); animation: slide .3s var(--ease); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sh-top { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--paper-3); background: var(--white); }
.sh-top h2 { font: 400 26px/1.1 var(--f-d); }
.sh-top .x { margin-left: auto; }
.sh-b { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 18px; align-content: start; }
.sh-b > * { min-width: 0; }
.sh-sec h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.drw-box { background: var(--white); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--paper-3); padding: 6px; }
.drw-box svg { width: 100%; height: auto; display: block; }
.drw-box .dim line { stroke: var(--pencil); } .drw-box .dim text, .drw-box .cap { fill: var(--pencil); font: 600 14px var(--f-b); }
.drw-box .cap { fill: var(--ink-2); font-weight: 500; } .drw-box .floor { stroke: var(--ink); stroke-dasharray: 2 5; opacity: .6; } .drw-box .chair { fill: none; stroke: var(--ink-3); stroke-dasharray: 3 3; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 14px 16px; border-radius: 8px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); }
.kv dt { color: var(--ink-2); font-size: 12px; } .kv dd { font-weight: 600; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--paper-2); }
.lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines li.t { font-weight: 700; border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.steps li { padding-top: 8px; border-top: 3px solid var(--paper-3); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.steps li.done { border-color: var(--ink); color: var(--ink); } .steps li.cur { border-color: var(--wood); color: #85602F; }
.hist li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 0; }
.hist li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); transform: translateY(-1px); }
.hist time { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr 140px 34px; gap: 8px; margin-bottom: 8px; }
.qrow input { min-height: 38px; padding: 6px 10px; border: 0; border-radius: var(--r); background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); }
.qrow input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--pencil); }
.msg { padding: 14px 16px; border-radius: 8px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(30, 33, 36, .5); animation: fade .2s; }
.modal-in { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border-radius: 10px; background: var(--paper); box-shadow: 0 30px 60px rgba(0, 0, 0, .25); display: grid; gap: 14px; }
.modal-in h2 { font: 400 26px/1.1 var(--f-d); }
.mail { padding: 14px 16px; border-radius: 8px; background: var(--white); box-shadow: inset 0 0 0 1px var(--paper-3); white-space: pre-wrap; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 11px 15px; border-radius: 8px; background: var(--side); color: #F2F3F1; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: toast .3s var(--ease); }
.toast .ico { color: var(--wood); }
@keyframes toast { from { transform: translate(-50%, 10px); opacity: 0; } }

/* ---------- narrow ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .top-d { display: none; }
}
@media (max-width: 900px) {
  .side { position: fixed; inset: 0 auto 0 0; z-index: 40; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; }
  .side-top .side-x, .top .menu-b { display: grid; }
  .side-x { color: var(--side-t); }
  .scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .5); }
  .top { padding: 0 12px; gap: 8px; }
  .gsearch { width: 44vw; }
  .page { padding: 16px 14px 40px; gap: 16px; }
  .hello h2 { font-size: 24px; }
  .woods, .grid2, .kv { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(5, 80vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; min-height: 0; }
  .wk { grid-template-columns: repeat(5, 72vw); scroll-snap-type: x mandatory; }
  .day { scroll-snap-align: start; }
  .hbars li { grid-template-columns: 90px 1fr 84px; }
  .qrow { grid-template-columns: minmax(0, 1fr) 96px 34px; }
  .sh-top { padding: 12px 14px; } .sh-b { padding: 14px 14px 24px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .live, .gsearch { display: none; }
  .hello { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
