/* Zokors staff board. Same palette and fonts as the site (theme.json). */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url(/changelog/static/fonts/ChakraPetch-500.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url(/changelog/static/fonts/ChakraPetch-700.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400 700; font-display: swap; src: url(/changelog/static/fonts/Inter-400-700.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/changelog/static/fonts/JetBrainsMono-400.woff2) format("woff2"); }

:root {
  --base: #110F0D; --panel: #1C1916; --panel-2: #231F1B; --band: #2A241F; --line: #3A3733; --line-2: #444A49;
  --text: #F1E4CC; --soft: #D8CCB4; --muted: #A9A495; --faint: #6F6A5F;
  --gold: #C9A86A; --gold-deep: #9C8457; --on-gold: #1A1511;
  --mint: #00FB9A; --salmon: #FF7E5E; --error: #C0665A; --slate: #9DB8C9; --violet: #B9A3E3;
  --display: "Chakra Petch", "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 10px;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body { margin: 0; background: var(--base); color: var(--text); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
::selection { background: rgba(201,168,106,.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons and inputs */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--muted); background: var(--band); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 650; }
.btn.primary:hover { background: #d6b67a; }
.btn.primary .kbd { color: var(--on-gold); border-color: rgba(26,21,17,.35); }
a.btn { text-decoration: none; }
.btn.danger { border-color: rgba(192,102,90,.6); color: #F0A396; background: rgba(192,102,90,.1); }
.btn.danger:hover { background: rgba(192,102,90,.2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--base); color: var(--text); transition: border-color .12s; }
textarea.input { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.55; }
.input:hover { border-color: #5a605e; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,106,.15); }
select.input { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(201,168,106,.12), transparent 70%), var(--base); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px 28px; box-shadow: var(--shadow); }
.login-card .mark { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card .mark b { font: 700 19px var(--display); letter-spacing: .16em; }
.login-card h1 { margin: 0 0 4px; font: 700 26px var(--display); }
.login-card p.sub { margin: 0 0 22px; color: var(--muted); }
.login-card form { display: grid; gap: 14px; }
.login-card .btn.primary { height: 40px; justify-content: center; margin-top: 4px; }
.login-card .switch { margin-top: 16px; text-align: center; }
.login-card .switch button { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.login-card .switch button:hover { color: var(--text); }
.err { color: #F0A396; font-size: 13px; min-height: 18px; margin: 0; }
.adminmode .login-card { border-color: rgba(201,168,106,.45); }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 236px 1fr; height: 100%; }
.side { background: #15130F; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; overflow-y: auto; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side .logo b { font: 700 15px var(--display); letter-spacing: .16em; display: block; }
.side .logo small { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.nav-h { margin: 14px 10px 6px; font: 700 10.5px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--soft); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.nav:hover { background: var(--panel-2); color: var(--text); }
.nav.on { background: var(--band); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
.nav .count { margin-left: auto; font-size: 11.5px; color: var(--muted); background: var(--panel-2); padding: 0 7px; border-radius: 99px; line-height: 19px; }
.nav .count.hot { background: var(--gold); color: var(--on-gold); font-weight: 700; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.side .me .who small { color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: rgba(17,15,13,.9); flex-wrap: wrap; }
.topbar h1 { margin: 0 8px 0 0; font: 700 20px var(--display); letter-spacing: .02em; }
.search { position: relative; flex: 1; min-width: 180px; max-width: 360px; }
.search input { padding-left: 34px; }
.search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--faint); }
.search .kbd { position: absolute; right: 9px; top: 9px; }
.topbar .filters { display: flex; gap: 8px; }
.topbar .filters select { width: auto; height: 34px; font-size: 13px; }
.topbar .grow { flex: 1; }
.content { flex: 1; overflow: auto; padding: 18px 22px 28px; }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.stat small { color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.stat b { display: block; font: 700 26px/1.2 var(--display); }
.stat.warn b { color: var(--salmon); }
.stat.good b { color: var(--mint); }

/* ---------- kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr); gap: 14px; align-items: start; min-height: calc(100% - 96px); }
.col { background: rgba(28,25,22,.6); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; min-height: 160px; }
.col.drop { border-color: var(--gold); background: rgba(201,168,106,.05); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; }
.col-h .dot { width: 9px; height: 9px; border-radius: 50%; }
.col-h b { font: 700 12.5px var(--display); letter-spacing: .14em; text-transform: uppercase; }
.col-h .n { color: var(--muted); font-size: 12px; }
.col-h .btn { margin-left: auto; }
.col-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 40px; }
.quick { margin: 0 10px 4px; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 9px; padding: 10px 12px 10px 11px;
  cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; user-select: none; }
.card:hover { border-color: #57524b; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.card.p-urgent { border-left-color: var(--salmon); }
.card.p-high { border-left-color: var(--gold); }
.card.p-low { border-left-color: #34312d; }
.card.dragging { opacity: .4; }
.card.open { border-color: var(--gold); }
.card .t { font-weight: 550; color: var(--text); line-height: 1.4; word-break: break-word; }
.card .labels { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.card .meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.card .meta .id { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.card .meta .push { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.drop-line { height: 2px; background: var(--gold); border-radius: 2px; margin: -4px 0; }
.empty-col { color: var(--faint); font-size: 12.5px; text-align: center; padding: 14px 0; border: 1px dashed var(--line); border-radius: 9px; }

.label { font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid; line-height: 17px; white-space: nowrap; }
.av { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; font: 700 11px var(--display); color: var(--on-gold); flex: none; }
.av.lg { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
.due { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.due.over { color: var(--salmon); }
.due.soon { color: var(--gold); }
.ico { width: 13px; height: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 1px 9px; border-radius: 99px; background: var(--band); color: var(--soft); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.prio { font-size: 12px; font-weight: 600; }
.prio-urgent { color: var(--salmon); } .prio-high { color: var(--gold); } .prio-normal { color: var(--soft); } .prio-low { color: var(--faint); }

/* ---------- table list */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th { text-align: left; font: 700 11px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #191613; cursor: pointer; white-space: nowrap; }
.table th.sorted { color: var(--gold); }
.table td { padding: 10px 12px; border-bottom: 1px solid rgba(58,55,51,.6); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: rgba(42,36,31,.5); }
.table .num { font-family: var(--mono); color: var(--faint); font-size: 12px; }
.table .title { font-weight: 550; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; }

/* ---------- drawer */
.scrim { position: fixed; inset: 0; background: rgba(8,7,6,.55); z-index: 20; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 21;
  display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .18s ease; }
.drawer-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-h .id { font-family: var(--mono); color: var(--faint); }
.drawer-h .grow { flex: 1; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 22px 26px; }
.title-in { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: -6px -8px 10px; font: 700 21px/1.3 var(--display); color: var(--text); resize: none; overflow: hidden; }
.title-in:hover { border-color: var(--line); }
.title-in:focus { outline: none; border-color: var(--gold); background: var(--base); }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 20px; }
.props > label { color: var(--muted); font-size: 12.5px; }
.props .input { height: 32px; font-size: 13px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font: 700 11px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.sec-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.saved { font-size: 12px; color: var(--mint); opacity: 0; transition: opacity .2s; }
.saved.on { opacity: 1; }
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 6px 0; }
.tl .when { color: var(--faint); font-size: 12px; margin-left: 6px; }
.tl .what { color: var(--soft); font-size: 13px; }
.tl .what b { color: var(--text); font-weight: 600; }
.tl .bubble { margin-top: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.tl .sys { width: 28px; display: grid; place-items: center; }
.tl .sys i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); display: block; }
.comment-box { display: grid; gap: 8px; margin-top: 12px; }
.comment-box .row { display: flex; justify-content: space-between; align-items: center; }

/* ---------- modal */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 30; padding: 20px; }
.modal-card { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); animation: pop .16s ease; }
.modal-card.wide { width: min(760px, 100%); }
.modal-h { padding: 18px 22px 0; }
.modal-h h2 { margin: 0; font: 700 19px var(--display); }
.modal-h p { margin: 4px 0 0; color: var(--muted); }
.modal-b { padding: 16px 22px; display: grid; gap: 14px; }
.modal-f { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--faint); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--soft); }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.callout { border: 1px solid rgba(201,168,106,.35); background: rgba(201,168,106,.07); border-radius: 10px; padding: 12px 14px; color: var(--soft); }
.callout.warn { border-color: rgba(255,126,94,.4); background: rgba(255,126,94,.07); }
.callout b { color: var(--text); }

/* ---------- admin pages */
.page { max-width: 1040px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 4px; font: 700 17px var(--display); }
.panel > p { margin: 0 0 14px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { background: none; border: 0; padding: 9px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab.on { color: var(--text); border-bottom-color: var(--gold); }
.tab .count { font-size: 11px; margin-left: 6px; background: var(--gold); color: var(--on-gold); border-radius: 99px; padding: 0 6px; font-weight: 700; }
.day-h { margin: 18px 0 8px; font: 700 12px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.entry-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: start; padding: 11px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.entry-row.draft { border-style: dashed; opacity: .8; }
.entry-row .tt { font-weight: 600; }
.entry-row .bd { color: var(--muted); font-size: 13px; margin-top: 3px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat { justify-self: start; padding: 2px 8px; border-radius: 6px; font: 700 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; border: 1px solid; }
.cat-new { color: var(--mint); border-color: rgba(0,251,154,.35); }
.cat-changed { color: var(--gold); border-color: rgba(201,168,106,.4); }
.cat-fixed { color: var(--slate); border-color: rgba(157,184,201,.35); }
.cat-removed { color: var(--salmon); border-color: rgba(255,126,94,.35); }
.q-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.q-row input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; margin-top: 3px; }
.q-row.sel { border-color: var(--gold); background: rgba(201,168,106,.05); }
.q-row .src { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.q-row .txt { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.q-row .refs { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.q-row .refs span { font: 11px var(--mono); color: var(--faint); background: var(--base); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }
.sticky-bar { position: sticky; bottom: 0; margin-top: 12px; padding: 12px 14px; background: var(--band); border: 1px solid var(--gold-deep); border-radius: 10px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.ev { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; padding: 10px 14px; border-bottom: 1px solid rgba(58,55,51,.6); align-items: center; }
.ev:last-child { border-bottom: 0; }
.ev .who { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ev .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .acts { display: flex; gap: 6px; opacity: .35; transition: opacity .12s; }
.ev:hover .acts, .ev:focus-within .acts { opacity: 1; }
.ev.revert { background: rgba(185,163,227,.05); }
.role { font: 700 9.5px var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted); }
.role.admin { color: var(--gold); border-color: rgba(201,168,106,.5); }
.role.agent { color: var(--violet); border-color: rgba(185,163,227,.5); }
.batch { font: 11px var(--mono); color: var(--violet); }
.pw-out { display: flex; gap: 8px; }
.pw-out .input { font-family: var(--mono); }

/* ---------- toasts */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: var(--band); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 16px; box-shadow: var(--shadow); animation: pop .16s ease; pointer-events: auto; }
.toast.ok { border-color: rgba(0,251,154,.4); }
.toast.bad { border-color: rgba(255,126,94,.55); }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .logo, .nav-h, .side .me .who { display: none; }
  .nav { width: auto; flex: none; }
  .side .me { margin: 0 0 0 auto; border: 0; padding: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .props { grid-template-columns: 90px 1fr; }
  .ev { grid-template-columns: 1fr; gap: 4px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
