/* FlowDesk — design tokens
   Ground #F3F5F4 · Surface #FFFFFF · Ink #18262E · Muted #5E6E76 · Line #DCE2E0 · Petrol #1D6B5F
   Signature: the flow line (status stations drawn as a transit line). */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/sg-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-display: swap; src: url(fonts/sg-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/sg-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url(fonts/sg-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/sg-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-display: swap; src: url(fonts/sg-ext-500.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/sg-ext-600.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url(fonts/sg-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #F3F5F4; --surface: #FFFFFF; --ink: #18262E; --ink-2: #33444D; --muted: #5E6E76; --faint: #8A979D;
  --line: #DCE2E0; --line-2: #E9EDEB; --hover: #EEF2F0;
  --petrol: #1D6B5F; --petrol-d: #165449; --petrol-tint: #E3EFEC;
  --red: #B83A2E; --red-tint: #FBEDEB; --green: #2F9465;
  --st-todo: #8E9CA3; --st-inprogress: #3D74CF; --st-review: #8B62C9; --st-done: #2F9465;
  --r-sm: 5px; --r: 8px; --r-lg: 12px;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; }
a { color: var(--petrol); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 3px; }
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; letter-spacing: -.005em; }
p { margin: 0 0 10px; }
code { font-size: 12.5px; background: var(--hover); padding: 1px 6px; border-radius: 4px; }
kbd { font: 500 11px var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--surface); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pad { padding: 14px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.over { color: var(--red); font-weight: 600; }
.faded { opacity: .5; }
.strike { text-decoration: line-through; }
.tkey { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Forms & buttons ---------- */
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; background: var(--surface); width: 100%; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #C6CFCC; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(29,107,95,.14); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--petrol); }
input[type=color] { padding: 2px; height: 36px; width: 64px; }
textarea { line-height: 1.5; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 14px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); font-size: 14px; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 14px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn.primary:hover { background: var(--petrol-d); border-color: var(--petrol-d); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--red); border-color: #EBC9C4; background: var(--surface); }
.btn.danger:hover { background: var(--red-tint); }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; height: 40px; }
.btn.on { background: var(--petrol-tint); color: var(--petrol); border-color: transparent; }
.linkbtn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 4px; font: inherit; display: inline-flex; align-items: center; }
.linkbtn:hover { color: var(--petrol); text-decoration: underline; }
.linkbtn .ic { width: 15px; height: 15px; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.actions .check { margin-right: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink); padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; color: var(--petrol); flex-shrink: 0; }
.navgroup a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2); margin-bottom: 1px; font-weight: 500; }
.navgroup a .ic { color: var(--faint); }
.navgroup a:hover { background: var(--hover); text-decoration: none; }
.navgroup a.on { background: var(--petrol-tint); color: var(--petrol); }
.navgroup a.on .ic { color: var(--petrol); }
.navhead { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 20px 10px 6px; }
.navhead a { color: var(--faint); display: inline-flex; border-radius: 4px; }
.navhead a:hover { color: var(--petrol); background: var(--hover); }
.navhead .ic { width: 16px; height: 16px; }
.navcount { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; background: rgba(243,245,244,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.topbar .search { flex: 1; max-width: 460px; position: relative; display: flex; align-items: center; }
.topbar .search .ic { position: absolute; left: 10px; color: var(--faint); width: 17px; height: 17px; }
.topbar .search input { padding-left: 34px; padding-right: 34px; background: var(--surface); height: 36px; }
.topbar .search kbd { position: absolute; right: 9px; }
.topbar .btn.primary { margin-left: auto; }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--ink); }
.usermenu { position: relative; }
.avatar-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 50%; display: flex; }
.usermenu .dropdown { display: none; position: absolute; right: 0; top: 100%; margin-top: 8px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px -8px rgba(24,38,46,.22); padding: 6px; min-width: 230px; }
.usermenu .dropdown::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.usermenu:hover .dropdown, .usermenu.open .dropdown { display: block; }
.usermenu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.usermenu .who b { display: block; font-weight: 600; }
.usermenu .who span { font-size: 12.5px; color: var(--muted); }
.usermenu .dropdown a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: var(--ink-2); border-radius: var(--r-sm); }
.usermenu .dropdown a .ic { color: var(--faint); width: 17px; height: 17px; }
.usermenu .dropdown a:hover { background: var(--hover); text-decoration: none; }
.content { flex: 1; padding: 28px 28px 64px; max-width: 1480px; width: 100%; }
.cols { display: flex; gap: 20px; align-items: flex-start; }
.side { width: 330px; flex-shrink: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 20px; }
.card.narrow { max-width: 700px; }
.card > h3:first-child { margin-top: 0; }
.flash { padding: 11px 14px; border-radius: var(--r); margin-bottom: 18px; background: #E7F4EC; color: #1E5E3E; border: 1px solid #C7E5D2; }
.flash.err { background: var(--red-tint); color: #8A2A20; border-color: #F0CFCA; }
.demobar { background: #FFF8E8; border: 1px solid #F1DFB0; color: #6B4B0E; padding: 10px 14px; border-radius: var(--r); margin-bottom: 18px; font-size: 13.5px; }
.demobar a { margin-left: 6px; font-weight: 600; color: #6B4B0E; text-decoration: underline; }
.danger-zone .btn { margin-right: 6px; }

/* ---------- Badges ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 11.5px; font-weight: 600; flex-shrink: 0; vertical-align: middle; letter-spacing: .02em; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.empty { background: transparent; border: 1.5px dashed #BAC4C0; color: var(--faint); }
.sicon { --c: #888; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; margin-right: 8px; flex-shrink: 0; vertical-align: middle; }
.navgroup .sicon { margin-right: 0; width: 20px; height: 20px; font-size: 10.5px; }
.sicon.big { width: 44px; height: 44px; font-size: 19px; border-radius: 11px; margin: 0; }
.type { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.type i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; position: relative; flex-shrink: 0; }
.type i::after { content: ''; position: absolute; inset: 4px; background: #fff; border-radius: 1px; }
.type-task i { background: #3D74CF; }
.type-bug i { background: #C8483B; } .type-bug i::after { border-radius: 50%; }
.type-story i { background: #2F9465; } .type-story i::after { inset: 4px 5px 3px; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%); }
.type-epic i { background: #8B62C9; } .type-epic i::after { clip-path: polygon(55% 0, 0 60%, 45% 60%, 35% 100%, 100% 35%, 55% 35%); inset: 3px; border-radius: 0; }
.type-request i { background: #C98A16; } .type-request i::after { inset: 4px 3px; border-radius: 1px; }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.prio .bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; }
.prio .bars b { width: 3px; background: #D3DAD7; border-radius: 1px; }
.prio .bars b:nth-child(1) { height: 4px; } .prio .bars b:nth-child(2) { height: 6.5px; } .prio .bars b:nth-child(3) { height: 9px; } .prio .bars b:nth-child(4) { height: 12px; }
.prio-highest .bars b.on { background: #B83A2E; } .prio-high .bars b.on { background: #D9772B; }
.prio-medium .bars b.on { background: #C9A227; } .prio-low .bars b.on { background: #6AA57A; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 2px 9px 2px 7px; border-radius: 999px; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.status i, .column header i, .flowlegend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--st); flex-shrink: 0; }
.st-todo { --st: var(--st-todo); } .st-inprogress { --st: var(--st-inprogress); } .st-review { --st: var(--st-review); } .st-done { --st: var(--st-done); }
.status.st-inprogress { background: #EAF0FA; color: #2A579F; } .status.st-review { background: #F2ECFA; color: #67439F; } .status.st-done { background: #E6F3EC; color: #22704B; }
.label { display: inline-block; font-size: 12px; background: var(--hover); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; margin: 3px 4px 0 0; }

/* ---------- The flow line ---------- */
.flowbar { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: transparent; min-width: 120px; }
.flowbar .seg { background: var(--st); min-width: 4px; }
.flowbar .seg.empty { background: var(--line); }
.flowlegend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.flowlegend span { display: inline-flex; align-items: center; gap: 6px; }
.flowlegend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.w-flow { width: 200px; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th a { color: var(--muted); }
.table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #F8FAF9; }
.table.compact td { padding: 8px 6px; }
.table td a { color: var(--ink); font-weight: 500; }
.table td a.label { font-weight: 400; }
.table td a:hover { color: var(--petrol); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters input[type=search] { width: 230px; }
.filters select { width: auto; }

/* ---------- Space header ---------- */
.space-head { margin-bottom: 18px; }
.space-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.space-title h1 { margin: 0; }
.space-title p { margin: 2px 0 0; font-size: 13.5px; }
.space-flow { margin-left: auto; width: 360px; max-width: 40%; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a .ic { width: 16px; height: 16px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--petrol); }

/* ---------- Board ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input { width: 220px; }
.small-select { width: auto; }
.people { display: flex; padding-left: 4px; }
.pfilter { background: none; border: 2px solid var(--ground); border-radius: 50%; padding: 0; margin-left: -6px; cursor: pointer; display: flex; }
.pfilter:hover { transform: translateY(-1px); }
.pfilter.on { border-color: var(--petrol); }
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.column { background: #E9EDEB; border-radius: var(--r-lg); padding: 6px; min-height: 340px; transition: background .15s, box-shadow .15s; }
.column.over { background: var(--petrol-tint); box-shadow: inset 0 0 0 2px rgba(29,107,95,.35); }
.column header { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 8px 8px 10px; }
.column .count { margin-left: auto; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.cards { min-height: 40px; }
.tcard { background: var(--surface); border-radius: var(--r); padding: 11px 12px 10px; margin-bottom: 6px; border: 1px solid #DDE3E1; box-shadow: 0 1px 0 rgba(24,38,46,.04); cursor: grab; }
.tcard:hover { border-color: #BFCAC6; }
.tcard:active { cursor: grabbing; }
.tcard.dragging { opacity: .35; }
.ttitle { color: var(--ink); display: block; line-height: 1.4; font-weight: 500; }
.ttitle:hover { color: var(--petrol); }
.tcard .labels { margin-top: 6px; }
.tcard footer { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 10px; }
.due { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due .ic { width: 14px; height: 14px; }
.due.over { color: var(--red); background: var(--red-tint); padding: 0 6px; border-radius: 4px; }
.quickadd input { background: transparent; border-color: transparent; color: var(--muted); }
.quickadd input:hover { background: rgba(255,255,255,.6); }
.quickadd input:focus { background: var(--surface); color: var(--ink); }

/* ---------- Ticket page ---------- */
.ticket { display: flex; gap: 32px; align-items: flex-start; }
.tmain { flex: 1; min-width: 0; max-width: 820px; }
.tside { width: 340px; flex-shrink: 0; position: sticky; top: 84px; }
.tmeta { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.ttitle-big { font-size: 26px; margin: 0 0 12px; }
.tbtns { display: flex; gap: 4px; margin-left: -8px; }
.desc { line-height: 1.6; color: var(--ink-2); padding: 2px 0; max-width: 72ch; }
.files { display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; }
.file a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }
.file a .ic { color: var(--faint); width: 16px; height: 16px; }
.file .inline { margin-left: auto; }
.dropzone { border: 1.5px dashed #C6CFCC; background: transparent; border-radius: var(--r); padding: 14px; color: var(--muted); cursor: pointer; font: inherit; }
.dropzone:hover { border-color: var(--petrol); color: var(--petrol); }
.dropzone.over { border-color: var(--petrol); background: var(--petrol-tint); color: var(--petrol); }
.small-tabs { margin-top: 28px; margin-bottom: 14px; }
.commentbox { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.comment { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); }
.comment .grow > div:last-child { color: var(--ink-2); margin-top: 2px; }
.hist { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 6px 0; color: var(--ink-2); }
.hist b { font-weight: 600; color: var(--ink); }
.feed { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; border-top: 1px solid var(--line-2); }
.feed:first-of-type { border-top: none; }
.feed .avatar { margin-top: 1px; }
.feed b { font-weight: 600; color: var(--ink); }
.feed > div > span { display: block; color: var(--faint); font-size: 12px; }
.flowtrack { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; padding: 4px 0; }
.flowtrack::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 15px; height: 3px; background: var(--line); border-radius: 2px; }
.flowtrack .stop { position: relative; background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 2px; font: 500 12.5px var(--font); color: var(--muted); border-radius: var(--r-sm); }
.flowtrack .stop i { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); position: relative; z-index: 1; transition: transform .15s; }
.flowtrack .stop.passed i { background: var(--st); border-color: var(--st); }
.flowtrack .stop.passed::before { content: ''; position: absolute; top: 11px; left: 50%; width: 100%; height: 3px; background: var(--st); }
.flowtrack .stop.current i { width: 22px; height: 22px; margin-top: -3px; margin-bottom: -3px; background: var(--st); border-color: var(--surface); box-shadow: 0 0 0 2px var(--st); }
.flowtrack .stop.current span { color: var(--ink); font-weight: 600; }
.flowtrack .stop:hover i { transform: scale(1.15); }
.flowtrack .stop:hover span { color: var(--ink); }
.details dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; align-items: center; margin: 0; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; }
.details select, .details input { border-color: transparent; padding: 5px 8px; background: transparent; }
.details select:hover, .details input:hover { border-color: var(--line); background: var(--surface); }
.details h4 { margin: 0 0 12px; font-size: 14px; }

/* ---------- Dashboards ---------- */
.dashgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dashcard { color: var(--ink); margin: 0; display: block; }
.dashcard:hover { border-color: var(--petrol); text-decoration: none; }
.dashcard h3 { margin: 12px 0 4px; }
.dashicon { width: 38px; height: 38px; border-radius: 9px; background: var(--petrol-tint); color: var(--petrol); display: flex; align-items: center; justify-content: center; }
.editbar { display: flex; flex-direction: column; gap: 12px; background: #F8FAF9; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input:not([type=checkbox]) { width: auto; }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.widget.full { grid-column: 1 / -1; }
.widget header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.widget header h3 { margin: 0; }
.wtools { margin-left: auto; display: flex; gap: 4px; }
.chartwrap { position: relative; height: 260px; }
.counters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.counter { display: flex; flex-direction: column; padding: 4px 18px; color: var(--ink); border-left: 1px solid var(--line-2); }
.counter:first-child { border-left: none; padding-left: 0; }
.counter:hover { text-decoration: none; }
.counter:hover span { color: var(--petrol); }
.counter b { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.counter span { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.counter span::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--faint); }
.counter.blue span::before { background: var(--st-inprogress); } .counter.green span::before { background: var(--st-done); }
.counter.red span::before { background: var(--red); } .counter.amber span::before { background: #C98A16; }

/* ---------- Dialogs ---------- */
dialog { border: none; border-radius: var(--r-lg); padding: 24px; width: 480px; max-width: 95vw; box-shadow: 0 24px 60px -12px rgba(24,38,46,.35); color: var(--ink); }
dialog::backdrop { background: rgba(24,38,46,.42); }

/* ---------- Auth ---------- */
body.auth { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
body.auth.single { grid-template-columns: 1fr; background: var(--ground); }
.auth-art { background: var(--petrol); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art .brand { color: #fff; padding: 0; }
.auth-art .logo { color: #fff; }
.auth-art .logo rect { fill: rgba(255,255,255,.14); }
.auth-pitch { margin: auto 0; max-width: 460px; position: relative; z-index: 1; }
.auth-line { font-size: 36px; line-height: 1.12; font-weight: 600; letter-spacing: -.025em; margin-bottom: 30px; }
.auth-flow { width: 100%; height: auto; margin-bottom: 26px; font-family: var(--font); }
.auth-sub { color: rgba(255,255,255,.78); font-size: 15px; max-width: 38ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--surface); }
body.auth.single .auth-main { background: var(--ground); }
.authbox { width: 360px; max-width: 100%; }
.authbox.wide { width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px; }
.authbox h1 { margin-bottom: 22px; }
.authbox .brand { padding: 0 0 18px; }
.demo-cta { display: block; margin-top: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ground); font-weight: 600; color: var(--petrol); }
.demo-cta:hover { text-decoration: none; border-color: var(--petrol); background: var(--petrol-tint); }
.demo-cta span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 1px; }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
  .burger { display: flex; }
  .sidebar { position: fixed; left: calc(-1 * var(--sidebar-w) - 10px); top: 0; z-index: 40; transition: left .2s; box-shadow: 8px 0 30px rgba(24,38,46,.15); }
  body.nav-open .sidebar { left: 0; }
  .topbar { padding: 0 14px; }
  .topbar .search kbd { display: none; }
  .content { padding: 18px 14px 48px; }
  .cols, .ticket { flex-direction: column; }
  .side, .tside { width: 100%; position: static; }
  .tside { order: -1; }
  .widgets { grid-template-columns: 1fr; }
  .counters { grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
  .counter:nth-child(odd) { border-left: none; padding-left: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .space-title { flex-wrap: wrap; }
  .space-flow { width: 100%; max-width: none; margin-left: 0; }
  body.auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 24px; }
  .auth-line { font-size: 26px; margin-bottom: 16px; }
  .auth-flow, .auth-sub { display: none; }
}
@media (max-width: 560px) {
  .topbar .btn.primary { padding: 0 10px; font-size: 0; gap: 0; }
  .topbar .btn.primary .ic { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Requesters: comment tags ---------- */
.commentbox textarea { margin-bottom: 8px; }
.commentactions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 0 7px; border-radius: 999px; margin: 0 4px; vertical-align: 1px; }
.ctag.req { background: #FFF3DC; color: #7A5410; }
.ctag.pub { background: var(--petrol-tint); color: var(--petrol); }
.ctag.int { background: var(--hover); color: var(--muted); }
.comment.internal .grow > div:last-child { background: #F7F8F7; border-left: 3px solid var(--line); padding: 6px 10px; border-radius: 0 4px 4px 0; }
.comment.from-req .grow > div:last-child { background: #FFFBF2; border-left: 3px solid #F1DFB0; padding: 6px 10px; border-radius: 0 4px 4px 0; }
.req-dd { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; padding: 4px 0; }

/* ---------- Public pages (request form, tracking) ---------- */
body.public { background: var(--ground); }
.public-top { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto; padding: 22px 20px 8px; }
.public-top .brand { padding: 0; }
.public-main { max-width: 760px; margin: 0 auto; padding: 12px 20px 60px; }
.public-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px; }
.public-card h1 { margin-bottom: 8px; }
.public-card > p.muted { margin-bottom: 22px; max-width: 60ch; }
.public-card .btn + .btn { margin-left: 6px; }
.sendto { background: var(--ground); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13.5px; margin-bottom: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
fieldset.choice { border: none; padding: 0; margin: 0 0 16px; display: flex; gap: 22px; flex-wrap: wrap; }
fieldset.choice legend { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 8px; width: 100%; }
input[type=radio] { width: 16px; height: 16px; accent-color: var(--petrol); margin: 0; }
.flowtrack.readonly { margin: 18px 0 8px; }
.flowtrack.readonly .stop { cursor: default; }
.flowtrack.readonly .stop:hover i { transform: none; }
.thread { margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; max-width: 88%; }
.msg.mine { align-self: flex-end; background: #F7FAF9; }
.msg.team { align-self: flex-start; border-left: 3px solid var(--petrol); }
.msg .who { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.msg .who > span:last-child { color: var(--faint); font-size: 12px; }
.msg .body { color: var(--ink-2); line-height: 1.55; }
.replybox { border-top: 1px solid var(--line-2); padding-top: 18px; }
@media (max-width: 640px) { .public-card { padding: 20px 18px; } .msg { max-width: 100%; } }
