/* CliqGestão — mesa de operação de um estúdio de software.
   Carvão na navegação, superfície verde-neutra, painéis claros, terracota nos comandos principais. */

:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --panel: #ffffff;
  --panel-2: #f8faf6;
  --ink: #232925;
  --ink-2: #4b544e;
  --muted: #69726b;
  --line: #e2e7de;
  --line-2: #d0d8ca;
  --brand: #bb4829;
  --brand-hover: #a13b22;
  --brand-ink: #ffffff;
  --brand-soft: #f9ebe5;
  --sidebar: #232926;
  --sidebar-ink: #e7ebe5;
  --sidebar-muted: #9aa49d;
  --sidebar-hover: #2d3430;
  --sidebar-active: #39423d;
  --green: #2c6a4a; --green-soft: #e2f0e7;
  --amber: #7d5300; --amber-soft: #fbf0d6;
  --red: #b0281f; --red-soft: #fbe6e3;
  --blue: #255ea6; --blue-soft: #e4edf9;
  --violet: #5a48c4; --violet-soft: #ece9fb;
  --focus: #2459c4;
  --shadow: 0 1px 2px rgba(25, 35, 28, .06), 0 6px 20px rgba(25, 35, 28, .05);
  --shadow-pop: 0 12px 40px rgba(20, 28, 23, .22);
  --radius: 10px;
  --radius-sm: 6px;
  /* Paleta de gráficos validada (dataviz): ordem fixa, nunca reciclada. */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --chart-muted: #9aa29b;
  --grid: #e8ece5;
  --axis: #c9d0c4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #121614; --panel: #1c211f; --panel-2: #222826; --ink: #e8ece7; --ink-2: #c4ccc5; --muted: #929d95;
    --line: #2c3330; --line-2: #3a433e; --brand: #de6944; --brand-hover: #ea825f; --brand-ink: #1a0f0b; --brand-soft: #3a2620;
    --sidebar: #0e1210; --sidebar-ink: #e3e8e2; --sidebar-muted: #8b968e; --sidebar-hover: #1a201d; --sidebar-active: #252d29;
    --green: #74c79b; --green-soft: #1b3226; --amber: #e3b450; --amber-soft: #382d15; --red: #f28b82; --red-soft: #3d1f1c;
    --blue: #86b4f0; --blue-soft: #1b2a3d; --violet: #a99df0; --violet-soft: #29243f; --focus: #8cb4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-pop: 0 12px 40px rgba(0, 0, 0, .55);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --chart-muted: #6f7a72; --grid: #2a312d; --axis: #3c4540;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121614; --panel: #1c211f; --panel-2: #222826; --ink: #e8ece7; --ink-2: #c4ccc5; --muted: #929d95;
  --line: #2c3330; --line-2: #3a433e; --brand: #de6944; --brand-hover: #ea825f; --brand-ink: #1a0f0b; --brand-soft: #3a2620;
  --sidebar: #0e1210; --sidebar-ink: #e3e8e2; --sidebar-muted: #8b968e; --sidebar-hover: #1a201d; --sidebar-active: #252d29;
  --green: #74c79b; --green-soft: #1b3226; --amber: #e3b450; --amber-soft: #382d15; --red: #f28b82; --red-soft: #3d1f1c;
  --blue: #86b4f0; --blue-soft: #1b2a3d; --violet: #a99df0; --violet-soft: #29243f; --focus: #8cb4ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-pop: 0 12px 40px rgba(0, 0, 0, .55);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --chart-muted: #6f7a72; --grid: #2a312d; --axis: #3c4540;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--panel); padding: 8px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.icon { width: 18px; height: 18px; flex: none; }
.icon.sm { width: 14px; height: 14px; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.stack { display: grid; gap: 12px; }
.stack.lg { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--panel-2); color: var(--ink-2); }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { scrollbar-width: thin; scrollbar-color: #4a554f transparent; position: sticky; top: 0; height: 100vh; background: var(--sidebar); color: var(--sidebar-ink); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--sidebar-muted); font-size: 11px; }
.nav { padding: 4px 10px 12px; display: grid; gap: 1px; }
.nav-group { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--sidebar-muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--sidebar-ink); opacity: .86; transition: background .15s, opacity .15s; }
.nav a:hover { background: var(--sidebar-hover); opacity: 1; }
.nav a[aria-current="page"] { background: var(--sidebar-active); opacity: 1; font-weight: 600; }
.nav a .icon { width: 17px; height: 17px; color: var(--sidebar-muted); }
.nav a[aria-current="page"] .icon { color: var(--sidebar-ink); }
.nav .count { margin-left: auto; font-size: 11px; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.nav .count.alert { background: var(--brand); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.me .avatar { background: #4a554f; color: #fff; }
.me strong { display: block; font-size: 13px; }
.me small { color: var(--sidebar-muted); }
.me .btn-icon { margin-left: auto; color: var(--sidebar-muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .title { font-weight: 600; min-width: 0; }
.topbar .title small { display: block; font-weight: 400; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 8px; height: 34px; min-width: 220px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--muted); text-align: left; }
.search-trigger:hover { border-color: var(--muted); }
.search-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd { margin-left: auto; white-space: nowrap; }
.product-switch { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); padding: 0 28px 0 10px; max-width: 190px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 6px; white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.sync.saving i { background: var(--amber); animation: pulse 1s infinite; }
.sync.error i, .sync.offline i { background: var(--red); }
.sync.local i { background: var(--blue); }
@keyframes pulse { 50% { opacity: .35; } }
.timer-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: 17px; background: var(--green-soft); color: var(--green); font-weight: 600; border: 0; }
.timer-pill .btn-icon { color: inherit; width: 26px; height: 26px; }
.menu-toggle { display: none; }
.content { padding: 24px; width: 100%; max-width: 1440px; margin: 0 auto; }
.content:focus { outline: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue); margin-bottom: 16px; font-size: 13px; }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
.banner.danger { background: var(--red-soft); color: var(--red); }
.banner .btn { margin-left: auto; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 550; font-size: 13px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .08s; }
.btn:hover { background: var(--panel-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line-2)); }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); flex: none; }
.btn-icon:hover { background: var(--panel-2); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 550; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formulários ---------- */
.input, .select, .textarea, select, textarea, input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="month"], input[type="number"], input[type="url"], input[type="search"], input[type="time"] {
  width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--ink); transition: border-color .15s;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
textarea.code { font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--brand); margin: 0; flex: none; }
input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field > span .req { color: var(--brand); }
.field .hint { font-size: 12px; color: var(--muted); }
.field.check { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.field.check > span { font-weight: 500; font-size: 13px; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: var(--red); font-size: 13px; min-height: 0; }
.form-error:not(:empty) { padding: 8px 10px; background: var(--red-soft); border-radius: var(--radius-sm); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; flex-wrap: wrap; }
.form-actions .left { margin-right: auto; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 0; }
.choices label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); min-height: 36px; }
.chips-input input { border: 0; min-height: 26px; padding: 2px 4px; flex: 1; min-width: 120px; background: transparent; }
.chips-input input:focus-visible { outline: none; }
.chips-input:focus-within { outline: 2px solid var(--focus); border-color: var(--focus); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin: 0; min-width: 0; }
legend { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }

/* ---------- Superfícies ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; flex-wrap: wrap; }
.panel-head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel-body { padding: 0 16px 16px; }
.panel-body.flush { padding: 0; }
.panel.pad { padding: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); text-align: left; min-width: 0; }
button.card, a.card { cursor: pointer; text-decoration: none; transition: border-color .15s, transform .15s; }
button.card:hover, a.card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.card h3 { font-size: 15px; }
.card p { color: var(--ink-2); font-size: 13px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; padding-top: 6px; border-top: 1px solid var(--line); }

/* Estatísticas */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow); text-decoration: none; min-width: 0; }
a.stat:hover { border-color: var(--line-2); }
.stat > span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat strong { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.stat small { color: var(--muted); }
.stat .delta { font-size: 12px; font-weight: 600; }
.hero-number { font-size: 44px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; }

/* Selos */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 550; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag button { border: 0; background: none; padding: 0; color: var(--muted); display: grid; }
.product-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.product-tag i { width: 8px; height: 8px; border-radius: 2px; }
.key { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 700; background: var(--violet-soft); color: var(--violet); flex: none; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.avatar.avatar-none { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.avatar.avatar-none .icon { width: 13px; height: 13px; }
.avatars { display: inline-flex; }
.avatars .avatar { border: 2px solid var(--panel); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.prio i { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.prio i b { width: 3px; background: var(--line-2); border-radius: 1px; }
.prio i b:nth-child(1) { height: 5px; } .prio i b:nth-child(2) { height: 8px; } .prio i b:nth-child(3) { height: 12px; }
.prio.p3 i b:nth-child(-n+1), .prio.p2 i b:nth-child(-n+2), .prio.p1 i b { background: var(--ink-2); }
.prio.p0 { color: var(--red); font-weight: 600; }
.prio.p0 i b { background: var(--red); }

/* Medidor (só com progresso medido) */
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 60px; }
.meter > i { position: absolute; inset: 0; background: var(--green); transform-origin: left; border-radius: 3px; }
.meter.warn > i { background: var(--amber); }
.meter.over > i { background: var(--red); }
.meter-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.meter-row .meter { flex: 1; }

/* Tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.click { cursor: pointer; }
table.data tbody tr.click:hover td { background: var(--panel-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); border-bottom: 0; }
table.data td small { display: block; color: var(--muted); }
table.data th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; display: inline-flex; gap: 4px; align-items: center; }
table.data .sub td { background: var(--panel-2); }
table.data .strong td { font-weight: 650; }
table.data .indent { padding-left: 28px; }

/* Listas */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-decoration: none; color: inherit; min-width: 0; }
.list-item:first-child { border-top: 0; }
button.list-item:hover, a.list-item:hover { background: var(--panel-2); }
.list-item .main-text { flex: 1; min-width: 0; }
.list-item .main-text strong { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .main-text small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-title { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--line); }
.group-title:first-child { border-top: 0; }

/* Estados vazios */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 32px 16px; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; color: var(--line-2); }
.empty h3 { color: var(--ink); font-size: 14px; }
.empty p { max-width: 380px; font-size: 13px; }
.empty .btn { margin-top: 8px; }

/* Abas e segmentos */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 550; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.seg button, .seg a { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-weight: 550; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select, .toolbar input { width: auto; min-height: 32px; height: 32px; padding: 4px 8px; font-size: 13px; }
.toolbar input[type="search"] { min-width: 200px; }
.toolbar .spacer { flex: 1; }
details.more-filters { position: relative; }
details.more-filters > summary { list-style: none; cursor: pointer; }
details.more-filters > summary::-webkit-details-marker { display: none; }
details.more-filters[open] > .more-body { display: flex; }
.more-body { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; flex-direction: column; gap: 8px; padding: 12px; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); }
.more-body select { width: 100% !important; }

/* ---------- Quadro (kanban) ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; min-height: 300px; }
.column { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-width: 0; }
.column-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; font-size: 13px; }
.column-head .count { margin-left: auto; color: var(--muted); font-weight: 500; }
.column-body { display: grid; gap: 8px; padding: 0 8px 10px; overflow-y: auto; align-content: start; min-height: 60px; }
.column.drop { outline: 2px dashed var(--focus); outline-offset: -2px; }
.stage-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.stage-dot.st-Backlog { background: #9aa29b; } .stage-dot.st-Especificação { background: var(--violet); } .stage-dot.st-Desenvolvimento { background: var(--blue); }
.stage-dot.st-Revisão { background: #3d8fa0; } .stage-dot.st-QA { background: var(--amber); } .stage-dot.st-Correção { background: var(--red); }
.stage-dot.st-Homologação { background: #b46cc2; } .stage-dot.st-Publicação { background: var(--brand); } .stage-dot.st-Concluído { background: var(--green); } .stage-dot.st-Cancelado { background: var(--line-2); }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 7px; text-align: left; cursor: pointer; box-shadow: 0 1px 1px rgba(0, 0, 0, .03); width: 100%; transition: border-color .15s; }
.tcard:hover { border-color: var(--line-2); }
.tcard[draggable="true"] { cursor: grab; }
.tcard.dragging { opacity: .5; }
.tcard h4 { font-size: 13px; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.tcard .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard .meta .right { margin-left: auto; }
.due.late { color: var(--red); font-weight: 600; }
.blocked { color: var(--red); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }

/* ---------- Diálogos ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 14px; background: var(--panel); color: var(--ink); width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-pop); overflow: hidden; }
dialog.modal.wide { width: min(940px, calc(100vw - 24px)); }
dialog.modal.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; border-radius: 0; width: min(980px, 100vw); }
dialog.modal::backdrop { background: rgba(14, 18, 16, .48); }
.modal-inner { display: flex; flex-direction: column; max-height: inherit; height: 100%; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-head .btn-icon { margin-left: auto; }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  dialog.modal[open] { animation: rise .18s ease-out; }
  dialog.modal.drawer[open] { animation: slide .2s ease-out; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }

/* Detalhe de demanda */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; }
.detail-side { display: grid; gap: 14px; align-content: start; }
.props { display: grid; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 6px; font-size: 13px; min-height: 32px; }
.prop > span:first-child { color: var(--muted); font-size: 12px; }
.section { display: grid; gap: 8px; }
.section + .section { margin-top: 20px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.section-title small { color: var(--muted); font-weight: 500; }
.section-title .btn, .section-title .link { margin-left: auto; }
.checklist { display: grid; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; }
.check-item:hover { background: var(--panel-2); }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.check-item .btn-icon { margin-left: auto; width: 26px; height: 26px; opacity: 0; }
.check-item:hover .btn-icon, .check-item:focus-within .btn-icon { opacity: 1; }
.inline-add { display: flex; gap: 6px; }
.inline-add input { min-height: 32px; height: 32px; flex: 1; min-width: 0; }
.test-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.test-item small { grid-column: 1 / -1; color: var(--muted); }
.result-buttons { display: flex; gap: 4px; }
.result-buttons button[aria-pressed="true"].pass { background: var(--green-soft); color: var(--green); border-color: transparent; }
.result-buttons button[aria-pressed="true"].fail { background: var(--red-soft); color: var(--red); border-color: transparent; }
.result-buttons button[aria-pressed="true"].block { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.transition-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.comment { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.comment header { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.comment header small { color: var(--muted); }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item > i { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--panel); background: var(--muted); margin-top: 3px; position: relative; z-index: 1; box-shadow: 0 0 0 1px var(--line-2); }
.tl-item strong { font-size: 13px; }
.tl-item small { color: var(--muted); display: block; }
.attachment { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); width: 100%; text-align: left; }
.attachment:hover { border-color: var(--line-2); }
.attachment small { color: var(--muted); margin-left: auto; }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pr { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.pr .badge { flex: none; }

/* ---------- Toast e paleta de comandos ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--sidebar); color: #f1f4f0; box-shadow: var(--shadow-pop); font-size: 13px; }
.toast.error { background: #8c2119; color: #fff; }
.toast .btn-icon { color: inherit; width: 22px; height: 22px; margin-left: auto; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } }
dialog.palette { border: 0; padding: 0; margin: 12vh auto auto; width: min(640px, calc(100vw - 24px)); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-pop); overflow: hidden; }
dialog.palette::backdrop { background: rgba(14, 18, 16, .48); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.palette-input input { border: 0; min-height: 32px; padding: 0; font-size: 16px; background: transparent; }
.palette-input input:focus-visible { outline: none; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-results [role="option"] { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.palette-results [role="option"][aria-selected="true"] { background: var(--panel-2); outline: 1px solid var(--line-2); }
.palette-results small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.palette-group { padding: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Menu suspenso ---------- */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 4px; z-index: 40; display: grid; }
details.menu .menu-list button, details.menu .menu-list a { text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-decoration: none; font-size: 13px; display: flex; gap: 8px; align-items: center; }
details.menu .menu-list button:hover, details.menu .menu-list a:hover { background: var(--panel-2); }
details.menu .menu-list .danger { color: var(--red); }

/* ---------- Gráficos ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar:hover, .chart .bar:focus { opacity: .82; }
.chart .bar:focus { outline: none; stroke: var(--ink); stroke-width: 1.5; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; pointer-events: none; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: 12px; min-width: 140px; transform: translate(-50%, calc(-100% - 10px)); }
.chart-tip .tip-title { color: var(--muted); margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .tip-row b { font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 10px; color: var(--ink); }
.chart-tip .key-line { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin: 4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }
.legend i.dash { height: 0; width: 14px; border-top: 2px dashed; background: none !important; }
.chart-data { margin-top: 8px; font-size: 12px; }
.chart-data summary { cursor: pointer; color: var(--muted); }
.chart-data summary:hover { color: var(--ink); }
.chart-data .table-wrap { max-height: 280px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Roadmap (linha do tempo) ---------- */
.roadmap { overflow-x: auto; }
.rm-grid { min-width: 860px; }
.rm-head, .rm-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.rm-head { position: sticky; top: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--line); }
.rm-months { position: relative; height: 34px; }
.rm-months span { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 8px 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.rm-row { border-bottom: 1px solid var(--line); min-height: 40px; }
.rm-row.group { background: var(--panel-2); font-weight: 650; }
.rm-label { padding: 9px 12px; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; border-right: 1px solid var(--line); }
.rm-label.indent { padding-left: 28px; }
.rm-track { position: relative; }
.rm-track .gridcol { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid); }
.rm-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); opacity: .7; z-index: 1; }
.rm-bar { position: absolute; top: 9px; height: 22px; border-radius: 6px; padding: 0 8px; font-size: 11px; font-weight: 600; color: #fff; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; cursor: pointer; min-width: 6px; }
.rm-bar .fill { position: absolute; inset: 0; background: rgba(255, 255, 255, .22); transform-origin: left; }
.rm-bar span { position: relative; overflow: hidden; text-overflow: ellipsis; }
.rm-diamond { position: absolute; top: 13px; width: 14px; height: 14px; transform: translateX(-7px) rotate(45deg); border-radius: 2px; border: 2px solid var(--panel); cursor: pointer; }
.rm-flag { position: absolute; top: 6px; transform: translateX(-1px); font-size: 11px; font-weight: 600; padding: 2px 6px 2px 8px; border-left: 2px solid var(--green); color: var(--green); background: var(--green-soft); border-radius: 0 4px 4px 0; white-space: nowrap; cursor: pointer; }

/* ---------- Calendário ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.calendar .dow { background: var(--panel-2); padding: 6px 8px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.calendar .day { background: var(--panel); min-height: 104px; padding: 6px; display: grid; align-content: start; gap: 4px; min-width: 0; }
.calendar .day.other { background: var(--panel-2); color: var(--muted); }
.calendar .day.today .n { background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 0 6px; }
.calendar .n { font-size: 12px; font-weight: 600; justify-self: start; }
.calendar .ev { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); border: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; width: 100%; }
.calendar .ev.release { background: var(--green-soft); color: var(--green); }
.calendar .ev.done { opacity: .6; text-decoration: line-through; }

/* ---------- Wiki ---------- */
.wiki { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.tree { padding: 8px; position: sticky; top: 74px; max-height: calc(100vh - 100px); overflow-y: auto; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.tree > ul { padding-left: 0; }
.tree a { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; text-decoration: none; font-size: 13px; color: var(--ink-2); min-width: 0; }
.tree a:hover { background: var(--panel-2); color: var(--ink); }
.tree a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tree a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.editor-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.editor-split textarea { min-height: 460px; }
.editor-split .md { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; max-height: 620px; overflow: auto; }

/* Markdown renderizado */
.md { line-height: 1.65; overflow-wrap: anywhere; }
.md > * + * { margin-top: .7em; }
.md h1 { font-size: 22px; margin-top: 1.1em; } .md h2 { font-size: 18px; margin-top: 1.1em; } .md h3 { font-size: 15px; margin-top: 1em; }
.md h1:first-child, .md h2:first-child, .md h3:first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 1.4em; margin-bottom: 0; }
.md li + li { margin-top: .25em; }
.md li.task { list-style: none; margin-left: -1.3em; display: flex; gap: 8px; align-items: baseline; }
.md blockquote { margin: 0; padding: 6px 14px; border-left: 3px solid var(--line-2); color: var(--ink-2); background: var(--panel-2); border-radius: 0 6px 6px 0; }
.md pre { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.md pre code { background: none; border: 0; padding: 0; }
.md a { color: var(--brand); }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md table { border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { background: var(--panel-2); }
.md .task-key { font: 600 12px ui-monospace, monospace; text-decoration: none; padding: 1px 5px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }

/* ---------- Login e início ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); display: grid; gap: 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand img { width: 40px; height: 40px; }
.auth h1 { font-size: 30px; letter-spacing: -.03em; }
.auth p { color: var(--muted); }
.auth form { display: grid; gap: 14px; }
.auth .btn.primary { height: 42px; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.startup { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); text-align: center; padding: 24px; }

/* ---------- Painéis específicos ---------- */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pipeline a { display: grid; gap: 2px; padding: 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; min-width: 0; }
.pipeline a:hover { border-color: var(--line-2); }
.pipeline strong { font-size: 20px; }
.pipeline span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dre-table td:first-child { min-width: 240px; }
.dre-table .line-total td { font-weight: 700; background: var(--panel-2); }
.budget-cell { width: 92px; text-align: right; min-height: 30px; height: 30px; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.week-grid input { width: 64px; text-align: right; min-height: 30px; height: 30px; padding: 4px 6px; }
.week-grid td.today, .week-grid th.today { background: var(--brand-soft); }
.timer-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.timer-card .clock { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 120px; }
.okr { display: grid; gap: 12px; }
.kr { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kr:first-child { border-top: 0; }
.confidence { font-size: 12px; font-weight: 600; }
.repo-status { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.repo-status:first-child { border-top: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.side { grid-template-columns: minmax(0, 1fr); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail-side { grid-row: 1; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(14, 18, 16, .45); z-index: 25; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .search-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .content { padding: 16px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .wiki { grid-template-columns: minmax(0, 1fr); }
  .tree { position: static; max-height: 260px; }
  .editor-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  h1 { font-size: 21px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .product-switch { max-width: 120px; }
  .sync span { display: none; }
  .topbar .title small { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat strong { font-size: 18px; }
  .kr { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar .day { min-height: 64px; }
  .calendar .ev { font-size: 0; height: 6px; padding: 0; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; margin: 0; }
  .modal-body { padding: 14px; }
  .toolbar input[type="search"] { min-width: 0; flex: 1; }
  .page-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .page-actions, .toolbar { display: none !important; }
  .shell { display: block; }
  .panel, .card, .stat { box-shadow: none; }
}
