/* Camus Work — sistema visual
   Inspirado nos apps de produtividade do macOS: superfícies neutras, linhas finas, uma cor de destaque,
   tipografia do sistema e nada decorativo. Tema claro, escuro ou do sistema (salvo no SQLite). */

:root {
  --font: "Inter", "InterVariable", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --frame: #F1F1F1;         /* moldura: atrás da barra lateral e do painel */
  --bg: #FFFFFF;            /* painel de conteúdo */
  --bg-elev: #FFFFFF;       /* gavetas, diálogos e menus */
  --sidebar-bg: var(--frame);
  --panel: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F7F7;
  --surface-3: #EBEBEB;
  --fill: rgba(0, 0, 0, 0.04);
  --hover: rgba(0, 0, 0, 0.04);
  --selected: rgba(0, 0, 0, 0.06);
  --glass: rgba(255, 255, 255, 0.9);
  --text: #333333;
  --text-2: #666666;
  --text-3: #999999;
  --line: #EBEBEB;
  --line-2: #D6D6D6;
  --accent: #1961ED;
  --accent-2: #1552C7;
  --accent-soft: rgba(25, 97, 237, 0.08);
  --green: #1E7B46; --green-bg: rgba(30, 123, 70, 0.09);
  --orange: #A8590A; --orange-bg: rgba(200, 110, 10, 0.10);
  --red: #CC3333; --red-bg: rgba(204, 51, 51, 0.08);
  --purple: #6E49C9; --purple-bg: rgba(110, 73, 201, 0.08);
  --shadow-1: none;
  --shadow-2: 0 2px 4px rgba(0,0,0,.04), 0 0 4px rgba(0,0,0,.08);
  --shadow-3: 0 0 8px rgba(0,0,0,.08), 0 8px 64px -16px rgba(0,0,0,.16);
  --seg-on: #FFFFFF;
  --fill-2: rgba(0, 0, 0, 0.07);
  --stage-bg: #EFEDE8;
  --stage-dot: rgba(0, 0, 0, 0.07);
  --pin-bg: rgba(255, 255, 255, 0.86);
  --r-s: 4px; --r: 4px; --r-l: 8px; --r-xl: 8px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --sidebar: 220px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --frame: #141414;
  --bg: #1B1B1B;
  --bg-elev: #1F1F1F;
  --panel: #1B1B1B;
  --surface: #1B1B1B;
  --surface-2: #222222;
  --surface-3: #2B2B2B;
  --fill: rgba(255, 255, 255, 0.05);
  --hover: rgba(255, 255, 255, 0.05);
  --selected: rgba(255, 255, 255, 0.08);
  --glass: rgba(27, 27, 27, 0.9);
  --text: #EBEBEB;
  --text-2: #B3B3B3;
  --text-3: #818181;
  --line: #292929;
  --line-2: #383838;
  --accent: #4A86F7;
  --accent-2: #6A9CF8;
  --accent-soft: rgba(74, 134, 247, 0.14);
  --green: #5BBF85; --green-bg: rgba(91, 191, 133, 0.12);
  --orange: #E2A050; --orange-bg: rgba(226, 160, 80, 0.12);
  --red: #EB6E6E; --red-bg: rgba(235, 110, 110, 0.12);
  --purple: #A98BEA; --purple-bg: rgba(169, 139, 234, 0.12);
  --shadow-2: 0 2px 4px rgba(0,0,0,.3), 0 0 4px rgba(0,0,0,.5);
  --shadow-3: 0 0 8px rgba(0,0,0,.5), 0 8px 64px -16px rgba(0,0,0,.7);
  --seg-on: #2E2E2E;
  --fill-2: rgba(255, 255, 255, 0.12);
  --stage-bg: #18181A;
  --stage-dot: rgba(255, 255, 255, 0.06);
  --pin-bg: rgba(36, 36, 36, 0.86);
  color-scheme: dark;
}

@font-face {
  font-family: "Inter";
  src: local("Inter"), local("Inter Variable"), url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 13px; line-height: 1.5; color: var(--text); background: var(--frame); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── janela ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 1px; padding: 14px 10px 12px; background: var(--sidebar-bg); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 14px; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; flex: none; }
.brand-name { font-weight: 600; font-size: 13.5px; }
.brand-sub { display: none; }

.company-switch { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; text-align: left; }
.company-switch:hover { background: var(--surface-2); }
.company-dot { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 11px; flex: none; }
.company-switch .t { font-weight: 600; font-size: 13px; line-height: 1.25; }
.company-switch .s { font-size: 11.5px; color: var(--text-3); line-height: 1.25; }
.company-switch svg { margin-left: auto; color: var(--text-3); width: 14px; height: 14px; }

.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 12px 8px 4px; }
.nav-item { display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 8px; border-radius: var(--r-s); color: var(--text); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-size: 13px; text-decoration: none !important; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--selected); font-weight: 500; }
.nav-ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.nav-count { margin-left: auto; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-3); }
.nav-count.alert { color: var(--red); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 10px 2px 0; display: grid; gap: 6px; }
.skill-pill { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); padding: 6px 8px; }
.skill-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.skill-pill .dot.off { background: var(--text-3); }

.main { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 46px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 13.5px; font-weight: 600; margin: 0; }
.topbar .crumb { margin-left: 2px; }
.topbar .crumb { color: var(--text-3); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); padding: 0 6px; }
.live-chip .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.live-chip.idle .pulse { background: var(--text-3); }

.content { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page { max-width: 1240px; margin: 0 auto; padding: 26px 32px 72px; }
.page.wide { max-width: none; }

/* ── cabeçalho de página: título, uma linha e a explicação no "?" ── */
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ph-text { flex: 1; min-width: 0; }
.ph h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
.ph p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.ph .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.help-btn { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; display: grid; place-items: center; }
.help-btn:hover, .help-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ph-help { margin: -8px 0 20px; padding: 14px 16px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--line); animation: fadeIn .15s both; }
.ph-help-h { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.ph-help ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ph-help li { font-size: 12.5px; color: var(--text-2); }
.ph-help li b { color: var(--text); font-weight: 600; margin-right: 6px; }
.help { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin: 8px 0 0; }
.help svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--text-3); }
.input.search { padding-left: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A8A8F' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 9px center; }

.runbox { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-l); background: var(--accent-soft); }
.runbox .runnum { display: flex; flex-direction: column; align-items: flex-end; }
.runbox .runnum b { font-size: 16px; font-variant-numeric: tabular-nums; }
.runbox .runnum span { font-size: 11px; color: var(--text-2); }
.st .score { font-size: 12px; padding: 0 5px; border-radius: 4px; background: currentColor; color: #fff; margin-right: 2px; }
.st.ok .score { background: var(--green); } .st.warn .score { background: var(--orange); }
/* revisão (Analytics): uma linha por entrega, ações à direita */
.review-list { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); overflow: hidden; }
.review { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.review + .review { border-top: 1px solid var(--line); }
.review:hover { background: var(--surface-2); }
.rv-title { font-size: 14.5px; font-weight: 600; }
.sts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.st svg { width: 13px; height: 13px; }
.st.ok { color: var(--green); } .st.warn { color: var(--orange); }
.rv-actions { display: flex; gap: 6px; flex: none; }
.popover.menu { width: auto; min-width: 220px; }
.pop-item.danger { color: var(--red); }

/* ── botões ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-s); border: 1px solid var(--line-2); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; background: var(--panel); color: var(--text); box-shadow: var(--shadow-1); text-decoration: none !important; transition: background .12s; }
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.success { background: #2E8B47; border-color: transparent; color: #fff; }
.btn.success:hover { background: #277A3D; }
.btn.dark { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: var(--red); }
.btn.sm { height: 24px; padding: 0 9px; font-size: 12px; }
.btn.lg { height: 32px; padding: 0 16px; font-size: 13.5px; }
.btn.icon { width: 28px; padding: 0; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--text-3); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn.primary.loading::after, .btn.success.loading::after { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { border: 0; background: none; padding: 5px; border-radius: var(--r-s); cursor: pointer; color: var(--text-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

/* ── painéis ────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; }
.card.pad-0 { padding: 0; }
.card.hover { cursor: pointer; transition: border-color .15s, background .15s; }
.card.hover:hover { border-color: var(--line-2); background: var(--surface-2); }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.card-sub { color: var(--text-2); font-size: 12.5px; margin: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.section-title .count { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.section-desc { margin: 0 0 12px; color: var(--text-2); font-size: 12.5px; max-width: 760px; }
.muted { color: var(--text-2); } .subtle { color: var(--text-3); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; } .stack.s { gap: 6px; } .stack.l { gap: 18px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.num { font-variant-numeric: tabular-nums; }
.empty { padding: 36px 20px; color: var(--text-2); text-align: left; }
.empty .art { display: none; }
.empty h3 { color: var(--text); margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.empty p { margin: 0; }

.metric { padding: 14px 16px; }
.metric .label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.metric .label svg { width: 13px; height: 13px; color: var(--text-3); }
.metric .value { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.metric .hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.chip.blue { color: var(--accent); background: var(--accent-soft); }
.chip.green { color: var(--green); background: var(--green-bg); }
.chip.orange { color: var(--orange); background: var(--orange-bg); }
.chip.red { color: var(--red); background: var(--red-bg); }
.chip.purple { color: var(--purple); background: var(--purple-bg); }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prov { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.prov i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.plogo { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.plogo svg { width: 16px; height: 16px; }
.plogo.neutral { background: var(--fill) !important; color: var(--text-2); }

/* ── formulários ───────────────────────────────────── */
.field { display: grid; gap: 5px; align-content: start; }
.field > label, .label { font-size: 12.5px; font-weight: 500; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--r-s); padding: 6px 9px; outline: none; font-size: 13px; transition: border-color .12s, box-shadow .12s; }
.textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 280px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled, .select:disabled { opacity: .6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238A8A8F' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.group-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; min-height: 42px; }
.group-row + .group-row { border-top: 1px solid var(--line); }
.group-row .k { flex: 1; min-width: 0; } .group-row .k small { display: block; color: var(--text-3); font-size: 12px; }
.group-row .input, .group-row .select { width: auto; min-width: 180px; }
.form-section { margin-bottom: 24px; }
.fs { margin-bottom: 20px; }
.fs > .label { display: block; margin-bottom: 6px; }
.input.lg { font-size: 15px; padding: 8px 11px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 6px 12px; }
.more-form { border-top: 1px solid var(--line); padding-top: 14px; }
.more-form > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.more-form > summary::-webkit-details-marker { display: none; }
.more-form > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--text-3); transition: transform .15s; }
.more-form[open] > summary::before { transform: rotate(90deg); }
.more-form > summary span { font-weight: 400; color: var(--text-3); font-size: 12px; }
.form-section > h4 { font-size: 13.5px; font-weight: 600; margin: 0 0 2px; }
.form-section > p { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); }

.seg { display: inline-flex; padding: 2px; background: var(--fill); border-radius: 7px; gap: 2px; width: max-content; }
.field .seg, .stack > .seg, .form-section > .seg { justify-self: start; }
.seg button { border: 0; background: none; padding: 3px 12px; border-radius: 5px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--text); white-space: nowrap; }
.seg button.on { background: var(--seg-on); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button .n { font-size: 11.5px; color: var(--text-3); margin-left: 5px; }

.switch { position: relative; width: 32px; height: 19px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 10px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(13px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.list-editor { display: grid; gap: 6px; }
.list-editor .item { display: flex; gap: 6px; align-items: center; }
.table-editor { width: 100%; border-collapse: separate; border-spacing: 0 5px; }
.table-editor th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 0 3px; }
.table-editor td { padding: 0 3px; }

.drop { border: 1px dashed var(--line-2); border-radius: var(--r-l); padding: 18px; color: var(--text-2); cursor: pointer; background: var(--panel); display: flex; align-items: center; gap: 12px; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .art { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: var(--fill); color: var(--text-2); flex: none; }
.drop .art svg { width: 16px; height: 16px; }
.drop strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.drop .small { display: block; }
.files { display: grid; gap: 4px; margin-top: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-s); font-size: 12.5px; }
.file .ext { font-size: 10px; font-weight: 600; padding: 2px 5px; border-radius: 4px; background: var(--fill); color: var(--text-2); text-transform: uppercase; }

/* ── escritório ────────────────────────────────────── */
.office { display: flex; flex-direction: column; height: 100%; min-height: 560px; }
.office-head { display: flex; align-items: flex-end; gap: 24px; padding: 22px 28px 14px; }
.office-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.022em; margin: 0 0 4px; line-height: 1.15; }
.office-head p { margin: 0; color: var(--text-2); max-width: 760px; font-size: 13px; }
.office-stats { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--fill); flex: none; }
.office-stats .stat { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 12px 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; min-width: 74px; }
.office-stats .stat:hover { background: var(--panel); box-shadow: var(--shadow-1); }
.office-stats .stat b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; }
.office-stats .stat span { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.office-stats .stat.warn b { color: var(--red); }
.office-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 1180px) { .office-body { grid-template-columns: 1fr; } .inspector { display: none; } }

.stage { position: relative; overflow: hidden; background: var(--stage-bg); cursor: grab; outline: none; touch-action: none; }
.stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--stage-dot) 1px, transparent 1.2px); background-size: 22px 22px; opacity: .7; pointer-events: none; }
.stage.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.world.anim { transition: transform .45s var(--ease); }
.world .base { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); }
.world .base canvas { display: block; width: 100%; height: 100%; }
.layer.hits { pointer-events: none; }
.hits .hit, .hits [data-agent], .hits [data-goto] { fill: transparent; pointer-events: all; cursor: pointer; }
.ov { position: absolute; inset: 0; pointer-events: none; }

.scene .items { pointer-events: none; }
.scene .items .agent, .scene .items .clickable { pointer-events: auto; cursor: pointer; }
.scene .hit { fill: transparent; cursor: pointer; }
.scene .agent .ring { opacity: 0; }
.scene .away { display: none; }
.layer { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.layer .hl { fill: var(--accent); fill-opacity: 0; stroke: var(--accent); stroke-opacity: 0; stroke-width: 2.4; stroke-linejoin: round; transition: fill-opacity .2s, stroke-opacity .2s; }
.layer .hl.on { fill-opacity: .08; stroke-opacity: .9; }
.people { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.person, .walker { position: absolute; overflow: visible; cursor: pointer; outline: none; }
.walker { left: 0; top: 0; pointer-events: none; will-change: transform; }
.person.away { display: none; }
.person .ring { opacity: 0; transition: opacity .2s; }
.person:hover .ring, .person:focus-visible .ring, .person.lit .ring { opacity: 1; }
.person:hover .fig, .person.lit .fig { filter: drop-shadow(0 0 1.4px rgba(255,255,255,.95)) drop-shadow(0 0 3px rgba(10,100,214,.55)); }
.stage[data-phase="night"] .person, .stage[data-phase="night"] .walker { filter: brightness(.66) saturate(.85); }
.stage[data-phase="dusk"] .person, .stage[data-phase="dusk"] .walker, .stage[data-phase="dawn"] .person, .stage[data-phase="dawn"] .walker { filter: brightness(.9); }
.person.typing .hands { animation: typing .22s ease-in-out infinite alternate; }
.person.typing .hands.b { animation-delay: -.11s; }
@keyframes typing { to { transform: translateY(-.7px); } }
.person.help .fig { animation: fidget 1.6s ease-in-out infinite; }
@keyframes fidget { 50% { transform: translateX(.6px); } }
.walking .leg-a { animation: legA .46s ease-in-out infinite alternate; }
.walking .leg-b { animation: legA .46s ease-in-out infinite alternate-reverse; }
.walking .arm-a { animation: armA .46s ease-in-out infinite alternate; }
.walking .arm-b { animation: armA .46s ease-in-out infinite alternate-reverse; }
.walking .fig { animation: step .23s ease-in-out infinite alternate; }
@keyframes legA { from { transform: rotate(17deg); } to { transform: rotate(-17deg); } }
@keyframes armA { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes step { to { transform: translateY(-1.1px); } }
.fx .steam path { animation: steam 2.6s ease-in infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(2px); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-6px); } }
.fx .led { animation: led 1.6s steps(2) infinite; } .fx .led.b { animation-delay: .4s; } .fx .led.c { animation-delay: .9s; }
@keyframes led { 50% { opacity: .15; } }
.stage[data-phase="day"] .fx .led { opacity: .9; }

.pin { position: absolute; pointer-events: auto; transform: translate(-50%, -100%) scale(var(--k, 1)); transform-origin: 50% 100%; display: inline-flex; align-items: baseline; gap: 7px; padding: 5px 11px 6px; border: 0; border-radius: 9px; background: var(--pin-bg); color: var(--text); box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.12), 0 0 0 .5px var(--line-2); backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); cursor: pointer; white-space: nowrap; font-size: 12.5px; transition: box-shadow .15s, background .15s; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); box-shadow: .5px .5px 0 var(--line-2); border-radius: 0 0 2px 0; }
.pin b { font-weight: 650; }
.pin span { color: var(--text-2); font-size: 11.5px; }
.pin.warn span, .pin.hot span { color: var(--red); font-weight: 600; }
.pin:hover, .pin.on { background: var(--accent); color: #fff; }
.pin:hover span, .pin.on span { color: rgba(255,255,255,.85); }
.stage.close .pin { opacity: .92; }

.bubble { position: absolute; pointer-events: auto; cursor: pointer; transform: translate(-50%, -100%) scale(var(--k, 1)); transform-origin: 50% 100%; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--pin-bg); color: var(--text); font-size: 11.5px; font-weight: 550; white-space: nowrap; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 3px 10px rgba(0,0,0,.14), 0 0 0 .5px var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: pop .35s var(--ease) both; }
.bubble i { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.bubble.help { background: #FF3B30; color: #fff; padding-left: 4px; }
.bubble.help b { width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #FF3B30; display: grid; place-items: center; font-size: 11px; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -80%) scale(calc(var(--k, 1) * .9)); } }

.stage-usage { position: absolute; left: 14px; top: 14px; width: 290px; z-index: 2; }
.game .stage-usage { top: 78px; left: 12px; }
.usage-w { padding: 10px 12px; border-radius: 12px; background: var(--pin-bg); box-shadow: var(--shadow-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.page .usage-w, .card .usage-w { background: none; box-shadow: none; backdrop-filter: none; padding: 0; }
.uw-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; margin-bottom: 7px; }
.uw-h span { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
.uw-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--fill); gap: 1px; }
.uw-bar i { display: block; height: 100%; transition: width .6s var(--ease); }
.uw-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 11.5px; color: var(--text-2); }
.uw-leg span { display: inline-flex; align-items: center; gap: 5px; }
.uw-leg i { width: 7px; height: 7px; border-radius: 2px; }
.uw-leg b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .3; } }
.bubble .btok { color: var(--text-3); border-left: 1px solid var(--line-2); padding-left: 6px; }
.bubble .btok.tick { animation: tick .5s var(--ease); }
@keyframes tick { 30% { color: var(--accent); } }
.person .sip { animation: sip 7s ease-in-out infinite; }
@keyframes sip { 0%, 78%, 100% { transform: rotate(0); } 84%, 92% { transform: rotate(-38deg); } }
.person.celebrate .fig { animation: hop .42s ease-in-out 5 alternate; }
@keyframes hop { to { transform: translateY(-5px); } }
.confetti { position: absolute; width: 0; height: 0; pointer-events: none; transform: scale(var(--k, 1)); }
.confetti i { position: absolute; width: 5px; height: 8px; border-radius: 1px; opacity: 0; animation: burst 1.6s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 60px)) rotate(var(--r)); } }
.stage-tools { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 1px; padding: 3px; border-radius: 10px; background: var(--pin-bg); box-shadow: var(--shadow-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.stage-tools .tool { width: 30px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.stage-tools .tool:hover { background: var(--hover); color: var(--text); }
.stage-legend { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 14px; padding: 7px 12px; border-radius: 10px; background: var(--pin-bg); box-shadow: var(--shadow-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 12px; color: var(--text-2); }
.stage-legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stage-legend .lg i { width: 7px; height: 7px; border-radius: 50%; }
.stage-legend .lg.sep { padding-left: 14px; border-left: 1px solid var(--line); }
.stage-legend svg { width: 13px; height: 13px; }
.agent-tip { position: absolute; z-index: 3; width: 240px; padding: 11px 12px; border-radius: 12px; background: var(--bg-elev); box-shadow: var(--shadow-3); font-size: 13px; pointer-events: none; animation: fadeIn .12s both; }

.inspector { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.inspector section { padding: 16px 18px; }
.inspector section + section { border-top: 1px solid var(--line); }
.inspector .grow-sec { flex: 1; min-height: 160px; }
.insp-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.insp-h h3 { margin: 0; font-size: 13px; font-weight: 650; }
.insp-h span { margin-left: auto; }
.vsteps { list-style: none; margin: 0; padding: 0; position: relative; }
.vsteps::before { content: ""; position: absolute; left: 9.5px; top: 12px; bottom: 12px; width: 1px; background: var(--line-2); }
.vsteps li { position: relative; display: flex; gap: 11px; padding: 0 0 12px; }
.vsteps li:last-child { padding-bottom: 0; }
.vsteps .n { width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 10.5px; font-weight: 650; color: var(--text-2); flex: none; position: relative; }
.vsteps b { font-size: 12.5px; font-weight: 600; display: block; line-height: 1.35; }
.vsteps p { margin: 1px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.45; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; font-size: 12.5px; }
.checks svg { width: 14px; height: 14px; color: var(--green); flex: none; margin-top: 2px; }
.feed { margin: 0 -8px; }
.feed-item { display: flex; gap: 9px; padding: 6px 8px; border-radius: var(--r-s); font-size: 12.5px; line-height: 1.4; }
.feed-item[data-d] { cursor: pointer; }
.feed-item:hover { background: var(--hover); }
.feed-item .t { color: var(--text-3); font-size: 11px; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.feed-item .ic { width: 18px; height: 18px; display: grid; place-items: center; flex: none; color: var(--text-3); }
.feed-item .ic svg { width: 13px; height: 13px; }
.feed-item .ic.warn { color: var(--orange); } .feed-item .ic.error { color: var(--red); }
.now-job { display: flex; gap: 10px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: var(--r); cursor: pointer; }
.now-job:hover { background: var(--hover); }
.now-job .qdot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-3); flex: none; }


/* ── escritório em tela cheia (modo jogo) ─────────── */
.game { position: fixed; inset: 0; background: var(--stage-bg); overflow: hidden; }
.game .stage { position: absolute; inset: 0; }
.game-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--pin-bg); box-shadow: var(--shadow-2); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); z-index: 5; }
.gb-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.gb-id .company-dot { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; display: grid; color: #fff; }
.gb-id b { display: block; font-size: 14px; font-weight: 650; line-height: 1.2; }
.gb-id > div > span { display: block; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-actions { display: flex; gap: 8px; flex: none; }
.game-bar .office-stats { background: var(--fill); }
.office-stats .stat.on { background: var(--accent); color: #fff; box-shadow: none; }
.office-stats .stat.on span { color: rgba(255,255,255,.85); }
.game-panel { position: absolute; top: 76px; right: 12px; bottom: 12px; width: 360px; display: flex; flex-direction: column; overflow-y: auto; border-radius: 14px; background: var(--bg-elev); box-shadow: var(--shadow-3); z-index: 4; animation: slideIn .3s var(--ease) both; }
.game-panel section { padding: 16px 18px; }
.game-panel section + section { border-top: 1px solid var(--line); }
.game-panel .grow-sec { flex: 1; min-height: 140px; }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } }
.game .stage-legend { left: 12px; bottom: 12px; }
.game .stage-tools { right: 384px; bottom: 12px; }
.inspector.has-room #sec-feed, .game-panel.has-room #sec-feed, .inspector.has-room #sec-now, .game-panel.has-room #sec-now { display: none; }
@media (max-width: 900px) { .game-panel { width: auto; left: 12px; top: auto; height: 55vh; } .game .stage-tools { right: 12px; bottom: calc(55vh + 24px); } .game-bar .office-stats { display: none; } }

.room-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.room-head h2 { margin: 0 0 3px; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.room-head p { margin: 0; font-size: 12.5px; color: var(--text-2); }
.room-head .icon-btn { order: 2; margin: -4px -6px 0 0; }
.hint-card { display: flex; gap: 9px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 12.5px; color: var(--text); }
.hint-card svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 2px; }
.people-list { display: grid; gap: 2px; margin: 0 -8px; }
.person-row { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; cursor: pointer; }
.person-row:hover { background: var(--hover); }
.person-row .ava { flex: none; }
.pdot { position: absolute; left: 34px; top: 34px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-elev); }
.pdot.static { position: static; flex: none; width: 8px; height: 8px; box-shadow: none; }
.dq-list { display: grid; gap: 8px; margin-top: 8px; }
.dq { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.dq:hover { border-color: var(--line-2); }
.dq-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dq-actions:empty { display: none; }
.btn.block { width: 100%; }
.sw-dot { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.office-head .btn { align-self: center; }

/* ── kanban ────────────────────────────────────────── */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 10px; overflow-x: auto; padding: 0 32px 32px; align-items: start; min-height: calc(100vh - 260px); }
.kcol { background: var(--fill); border-radius: var(--r-l); padding: 8px; min-height: 220px; }
.kcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.kcol-head { display: flex; align-items: center; gap: 7px; padding: 4px 6px 10px; font-weight: 600; font-size: 12.5px; }
.kcol-head .sw { width: 8px; height: 8px; border-radius: 50%; }
.kcol-head .n { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.kcol-desc { font-size: 11.5px; color: var(--text-3); padding: 0 6px 10px; margin-top: -6px; }
.kcards { display: grid; gap: 6px; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px; cursor: grab; }
.kcard:hover { border-color: var(--line-2); }
.kcard.dragging { opacity: .45; }
.kcard h5 { margin: 0 0 2px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.kcard .meta { font-size: 11.5px; color: var(--text-3); }
.kcard .foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.prio { width: 3px; align-self: stretch; border-radius: 2px; }
.bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .5s var(--ease); }

/* ── avatar ────────────────────────────────────────── */
.ava { display: inline-block; border-radius: 50%; flex: none; overflow: hidden; vertical-align: middle; }

/* ── gaveta e diálogos ─────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.22); z-index: 50; animation: fadeIn .18s both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(800px, 100vw); background: var(--bg-elev); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); z-index: 51; display: flex; flex-direction: column; animation: slide .28s var(--ease) both; }
.sheet.narrow { width: min(540px, 100vw); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.sheet-head { padding: 18px 22px 0; display: flex; gap: 12px; align-items: flex-start; }
.sheet-head h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 22px 26px; }
.sheet-foot { padding: 10px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; background: var(--bg-elev); }
.modal { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); max-height: 76vh; overflow-y: auto; background: var(--bg-elev); border-radius: var(--r-xl); box-shadow: var(--shadow-3); z-index: 61; padding: 20px 22px; animation: drop .2s var(--ease) both; }
.modal.wide { width: min(760px, calc(100vw - 32px)); }
@keyframes drop { from { transform: translate(-50%, -6px); opacity: 0; } }
.modal h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.modal .lead { color: var(--text-2); margin: 0 0 14px; font-size: 13px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.scrim.top { z-index: 60; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 90; width: 340px; }
.toast { display: flex; gap: 10px; padding: 11px 12px; border-radius: var(--r-l); background: var(--bg-elev); box-shadow: var(--shadow-2); animation: fadeUp .25s var(--ease) both; }
.toast.out { animation: fadeOut .2s both; }
@keyframes fadeUp { from { transform: translateY(8px); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.toast .ic { width: 18px; height: 18px; display: grid; place-items: center; flex: none; color: var(--accent); margin-top: 1px; }
.toast .ic svg { width: 16px; height: 16px; }
.toast.success .ic { color: var(--green); } .toast.warn .ic { color: var(--orange); } .toast.error .ic { color: var(--red); }
.toast b { display: block; font-size: 13px; font-weight: 600; } .toast p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-2); }
.toast .act { margin-top: 8px; }

.popover { position: fixed; z-index: 70; width: 360px; max-height: 70vh; overflow-y: auto; background: var(--bg-elev); border-radius: var(--r-l); box-shadow: var(--shadow-3); padding: 5px; animation: fadeIn .12s both; }
.pop-item { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border-radius: var(--r-s); cursor: pointer; font-size: 13px; }
.pop-item:hover { background: var(--accent); color: #fff; }
.pop-item:hover .muted, .pop-item:hover .subtle, .pop-item:hover .tiny { color: rgba(255,255,255,.85); }
.pop-item.unread b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.pop-item svg { width: 15px; height: 15px; flex: none; }
.pop-head { padding: 6px 9px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }

/* ── console, passos, linha do tempo ───────────────── */
.console { background: #141416; color: #D6D6DA; font-family: var(--mono); font-size: 11.8px; line-height: 1.6; border-radius: var(--r); padding: 12px 14px; height: 360px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); }
.console .l-system { color: #7FB8F0; } .console .l-error, .console .l-stderr { color: #F08A80; }
.console .ts { color: #5E5E63; margin-right: 8px; }
.pre { font-family: var(--mono); font-size: 12px; background: var(--fill); border-radius: var(--r-s); padding: 10px 12px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 0; }
.steps { display: flex; gap: 3px; }
.step { flex: 1; }
.step .b { height: 4px; border-radius: 2px; background: var(--fill); margin-bottom: 6px; }
.step.done .b { background: var(--green); } .step.cur .b { background: var(--accent); }
.step span { font-size: 11px; color: var(--text-3); }
.step.done span, .step.cur span { color: var(--text-2); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl { position: relative; padding: 0 0 16px; }
.tl::before { content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-elev); border: 1.5px solid var(--text-3); }
.tl.blue::before { border-color: var(--accent); } .tl.green::before { border-color: var(--green); } .tl.orange::before { border-color: var(--orange); } .tl.red::before { border-color: var(--red); }
.tl .when { font-size: 11.5px; color: var(--text-3); }

.md { font-size: 13.5px; line-height: 1.6; }
.md h1, .md h2, .md h3 { margin: 1.1em 0 .35em; line-height: 1.3; font-weight: 600; }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3 { font-size: 14px; }
.md > :first-child { margin-top: 0; }
.md p { margin: .45em 0; } .md ul, .md ol { padding-left: 1.3em; margin: .35em 0; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--fill); padding: 1px 4px; border-radius: 4px; }
.md pre { background: var(--fill); padding: 10px; border-radius: var(--r-s); overflow: auto; } .md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: .5em 0; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; }
.md th { color: var(--text-2); font-weight: 500; }
.md blockquote { margin: .5em 0; padding: 2px 12px; border-left: 2px solid var(--line-2); color: var(--text-2); }

/* design */
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--fill); color: var(--text-3); font-size: 12px; }
.cchip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cchip.on { background: var(--accent-soft); color: var(--accent); }
.cat-h { font-size: 13px; font-weight: 600; margin: 22px 0 10px; }
.cat-h span { color: var(--text-3); font-weight: 400; margin-left: 4px; }
/* infra e gov: listas */
.clist, .alist { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); overflow: hidden; }
.crow, .arow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.crow + .crow, .arow + .arow { border-top: 1px solid var(--line); }
.arow[data-d] { cursor: pointer; } .arow[data-d]:hover { background: var(--surface-2); }
.arow > svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.envdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.asset { position: relative; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.asset:hover { border-color: var(--line-2); }
.asset .thumb { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--surface-2); cursor: pointer; }
.asset .thumb img { max-width: 84%; max-height: 78%; object-fit: contain; }
.asset .thumb .ext { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; }
.asset .cap { padding: 6px 9px; font-size: 12px; display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.asset .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s; }
.asset:hover .tools { opacity: 1; }
.asset .tools button { width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.asset .tools button svg { width: 13px; height: 13px; }
.swatch { display: grid; gap: 4px; }
.swatch .chipc { position: relative; height: 44px; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); cursor: pointer; overflow: hidden; }
.swatch input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.swatch .k { font-size: 11.5px; font-weight: 500; } .swatch .v { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.ramp { display: flex; border-radius: var(--r-s); overflow: hidden; height: 34px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.ramp label { flex: 1; position: relative; cursor: pointer; }
.ramp input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ── configuração inicial (tela cheia, passos à esquerda) ── */
.setup { display: grid; grid-template-columns: 300px 1fr; height: 100vh; }
.setup-side { background: var(--sidebar-bg); border-right: 1px solid var(--line); padding: 22px 18px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.setup-side .brand { padding: 0 6px 22px; }
.setup-step { display: flex; gap: 11px; padding: 10px 8px; border-radius: var(--r); }
.setup-step .n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); flex: none; background: var(--panel); }
.setup-step.on { background: var(--selected); }
.setup-step.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-step.done .n { background: var(--green); border-color: var(--green); color: #fff; }
.setup-step.done .n svg { width: 12px; height: 12px; }
.setup-step b { display: block; font-size: 13px; font-weight: 600; }
.setup-step span { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.setup-side .foot { margin-top: auto; font-size: 11.5px; color: var(--text-3); padding: 12px 6px 0; }
.setup-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.setup-body { flex: 1; overflow-y: auto; padding: 40px 48px; }
.setup-body > div { max-width: 720px; }
.setup-body h1 { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.012em; margin: 0 0 6px; }
.setup-body .lead { color: var(--text-2); margin: 0 0 22px; font-size: 13.5px; max-width: 680px; }
.setup-foot { border-top: 1px solid var(--line); padding: 12px 48px; display: flex; align-items: center; gap: 8px; background: var(--bg); }
.setup-foot .hint { color: var(--text-3); font-size: 12px; margin-right: auto; }
.facts { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.facts > div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 11px 14px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts b { font-size: 13px; font-weight: 600; }
.facts span { font-size: 13px; color: var(--text-2); }
.color-dots { display: flex; gap: 8px; }
.color-dots button { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.color-dots button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text-2); }
.tag-input { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--panel); }
.tag-input .tg { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 1px 8px; background: var(--fill); border-radius: 4px; font-size: 12.5px; }
.tag-input .tg button { border: 0; background: none; cursor: pointer; color: var(--text-3); padding: 0 2px; font-size: 13px; line-height: 1; }
.tag-input input { border: 0; outline: 0; flex: 1; min-width: 120px; padding: 3px 4px; background: none; font-size: 13px; }

.provider-card { display: grid; gap: 12px; }
.plist { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); overflow: hidden; margin-bottom: 8px; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow.off .prow-main > :not(.switch) { opacity: .55; }
.prow-main { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.prow-main b { font-size: 14px; font-weight: 600; }
.pnum { display: flex; flex-direction: column; align-items: flex-end; min-width: 58px; }
.pnum b { font-size: 14px; font-weight: 600; }
.pnum span { font-size: 11px; color: var(--text-3); }
.adv { padding: 0 16px 0 62px; }
.adv > summary { list-style: none; cursor: pointer; font-size: 12.5px; color: var(--accent); padding: 0 0 10px; width: max-content; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::after { content: " ›"; }
.adv[open] > summary::after { content: " ⌄"; }
.adv[open] { padding-bottom: 14px; }
.usage-bars { display: flex; align-items: flex-end; gap: 2px; height: 36px; }
.usage-bars i { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; background: currentColor; }

.org-area { padding: 0; overflow: hidden; }
.org-area-head { padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.org-sub { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.org-sub:last-child { border-bottom: 0; }
.drag-handle { cursor: grab; color: var(--text-3); }

.kbd { font-family: var(--mono); font-size: 11px; padding: 0 4px; border-radius: 4px; background: var(--fill); border: 1px solid var(--line); }
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; border-left: 3px solid var(--accent); }
.callout.orange { border-left-color: #E08A00; } .callout.green { border-left-color: #2E8B47; } .callout.red { border-left-color: #D33A2F; }
.callout svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--text-2); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--text-2); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.hidden { display: none !important; }

/* ── casca no estilo do Twenty: moldura cinza, barra lateral recolhível, painel branco com borda fina ── */
.shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); background: var(--frame); transition: grid-template-columns .18s var(--ease); }
.shell.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { background: var(--frame); border-right: 0; padding: 10px 8px; gap: 1px; width: var(--sidebar); overflow-x: hidden; transition: opacity .12s; }
.shell.collapsed .sidebar { opacity: 0; pointer-events: none; }
.sb-top { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.company-switch { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 6px; margin: 0; gap: 8px; border-radius: var(--r-s); }
.company-switch:hover { background: var(--hover); }
.company-switch .t { font-size: 13px; font-weight: 600; color: var(--text); }
.company-switch .s { display: none; }
.company-switch svg { width: 12px; height: 12px; margin-left: 2px; }
.company-dot { width: 16px; height: 16px; border-radius: 4px; font-size: 9.5px; }
.sb-btn { border: 0; background: none; width: 24px; height: 24px; border-radius: var(--r-s); display: grid; place-items: center; color: var(--text-3); cursor: pointer; flex: none; }
.sb-btn:hover { background: var(--hover); color: var(--text); }
.sb-btn svg { width: 16px; height: 16px; }
.sidebar .sb-collapse { opacity: 0; transition: opacity .12s; }
.sidebar:hover .sb-collapse, .sb-collapse:focus-visible { opacity: 1; }
.nav-label { font-size: 11px; font-weight: 500; color: var(--text-3); padding: 14px 8px 4px; }
.nav-item { height: 28px; gap: 8px; padding: 0 8px; border-radius: var(--r-s); color: var(--text-2); font-size: 13px; font-weight: 500; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--selected); color: var(--text); font-weight: 500; }
.nav-ico { width: 16px; height: 16px; color: currentColor; }
.nav-count { font-size: 11px; color: var(--text-3); }
.nav-count.alert { color: var(--red); font-weight: 500; }
.skill-pill { font-size: 11px; color: var(--text-3); padding: 4px 8px; }
.main { background: var(--frame); padding: 0 8px 8px 0; }
.shell.collapsed .main { padding-left: 8px; }
.topbar { height: 44px; background: var(--frame); border-bottom: 0; padding: 0 2px 0 6px; gap: 6px; }
.topbar h1 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.topbar h1 svg { width: 16px; height: 16px; color: var(--text-2); }
.topbar .crumb { display: none; }
.topbar .sb-expand { display: none; }
.shell.collapsed .topbar .sb-expand { display: grid; }
.live-chip { font-size: 12px; color: var(--text-3); }
.content { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-l); }
.page { padding: 20px 24px 56px; }

/* cabeçalho de página: o título já está na barra de cima; aqui ficam a linha de contexto e as ações */
.content .ph { margin-bottom: 16px; min-height: 28px; }
.content .ph h1 { display: none; }
.content .ph p { margin: 0; color: var(--text-2); font-size: 13px; }
.help-btn { width: 20px; height: 20px; font-size: 11px; }

/* componentes: planos, borda fina, sem sombra */
.btn { height: 28px; padding: 0 10px; border-radius: var(--r-s); border-color: var(--line); color: var(--text-2); font-size: 13px; font-weight: 500; box-shadow: none; gap: 6px; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn.primary, .btn.primary:hover { color: #fff; }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.lg { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.icon { width: 28px; }
.btn.ghost { color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.icon-btn { color: var(--text-3); padding: 4px; }
.card { border-radius: var(--r-l); border-color: var(--line); padding: 14px 16px; box-shadow: none; }
.card-title { font-size: 13px; }
.card-sub { font-size: 12px; }
.section-title { font-size: 13px; font-weight: 600; margin: 24px 0 8px; }
.group { border-radius: var(--r-l); }
.group-row { min-height: 40px; padding: 8px 12px; }
.input, .select, .textarea { border-color: var(--line); border-radius: var(--r-s); padding: 5px 8px; font-size: 13px; }
.field > label, .label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.chip { height: 20px; border-radius: var(--r-s); font-size: 12px; padding: 0 6px; }
.seg { background: var(--fill); border-radius: var(--r-s); }
.seg button { border-radius: 3px; color: var(--text-2); font-weight: 500; }
.seg button.on { color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.tabs { gap: 4px; }
.tabs button { padding: 8px 4px; margin-right: 8px; color: var(--text-3); }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.switch span { background: var(--line-2); }
.modal, .popover { border-radius: var(--r-l); border: 1px solid var(--line); }
.callout { border-left-width: 1px; border-color: var(--line); background: var(--surface-2); }
.hint-card { border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--line); }
.hint-card svg { color: var(--text-3); }
.kbd { background: var(--surface-2); }

/* ── configuração inicial ── */
.setup { grid-template-columns: 220px 1fr; background: var(--frame); }
.setup-side { background: var(--frame); border-right: 0; padding: 14px 10px 14px 12px; box-sizing: border-box; }
.setup-side .brand { padding: 0 8px 16px; }
.setup-step { padding: 6px 8px; gap: 10px; align-items: center; border-radius: var(--r-s); }
.setup-step b { font-size: 13px; font-weight: 500; color: var(--text-2); }
.setup-step.on b { color: var(--text); }
.setup-step span { display: none; }
.setup-step .n { width: 18px; height: 18px; font-size: 10.5px; }
.setup-main { background: var(--bg); margin: 8px 8px 8px 0; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.setup-body { padding: 48px 56px 40px; }
.setup-body > div { max-width: 1040px; }
.setup-body h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.setup-body .lead { font-size: 13px; margin-bottom: 24px; }
.setup-foot { padding: 10px 16px; }

.ws-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.ws-choice button { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); cursor: pointer; color: var(--text); }
.ws-choice button:hover { background: var(--surface-2); }
.ws-choice button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--panel); }
.ws-choice svg { width: 18px; height: 18px; color: var(--text-3); grid-row: span 2; margin-top: 1px; }
.ws-choice button.on svg { color: var(--accent); }
.ws-choice b { font-size: 13px; font-weight: 600; }
.ws-choice span { font-size: 12px; color: var(--text-2); }
.folder-pick { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.folder-pick > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.folder-pick .fp-text { flex: 1; min-width: 0; }
.folder-pick .fp-label { font-size: 11.5px; color: var(--text-3); }
.folder-pick .fp-path { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-type { margin-top: 6px; font-size: 12px; }
.fp-type button { border: 0; background: none; padding: 0; color: var(--text-3); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fp-type button:hover { color: var(--text); }
.fp-type .input { margin-top: 6px; }
.checks { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-l); }
.checks li { display: grid; grid-template-columns: 16px 1fr; gap: 1px 10px; padding: 9px 12px; font-size: 13px; }
.checks li + li { border-top: 1px solid var(--line); }
.checks li svg { width: 16px; height: 16px; margin-top: 2px; }
.checks li.ok svg { color: var(--green); } .checks li.warn svg { color: var(--orange); } .checks li.fail svg { color: var(--red); }
.checks li .cd { grid-column: 2; font-size: 12px; color: var(--text-3); }
.checks li.loading { color: var(--text-3); }

.ws-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 980px) { .ws-grid { grid-template-columns: 1fr; } }
.pick-zone { display: grid; justify-items: start; gap: 14px; padding: 28px; min-height: 220px; align-content: center; border: 1px dashed var(--line-2); border-radius: var(--r-l); background: var(--surface-2); }
.pick-zone.chosen { border-style: solid; border-color: var(--line); background: var(--panel); }
.pick-zone.bad { border-color: var(--red); }
.pz-ico { width: 40px; height: 40px; border-radius: var(--r-l); display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--text-2); }
.pick-zone.chosen .pz-ico { color: var(--accent); }
.pz-ico svg { width: 20px; height: 20px; }
.pz-text b { display: block; font-size: 14px; font-weight: 600; word-break: break-all; }
.pz-text span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ws-right .checks { margin-top: 0; }
.aside-h { font-size: 12px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }
.checks li .cd .btn { margin-top: 6px; }

/* formulários: um campo por linha, borda visível nos dois temas, 32 px de altura */
.form-stack { display: grid; gap: 20px; }
.fw-m { max-width: 380px; } .fw-l { max-width: 560px; }
.field > label .opt { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.input, .select { height: 32px; padding: 0 10px; border-color: var(--line-2); background: var(--bg); }
.textarea { border-color: var(--line-2); background: var(--bg); padding: 7px 10px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input.lg { height: 38px; }
.group-row .input, .group-row .select { height: 30px; }
.tag-input { padding: 4px; min-height: 32px; border-color: var(--line-2); background: var(--bg); align-items: center; }
.tag-input .tg { height: 22px; }
.color-dots button { box-shadow: inset 0 0 0 1px var(--line-2); }
.color-dots button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); }

/* IAs: ajustes em grade com espaço, sem passar da largura do cartão */
.adv { padding: 0 16px 0 62px; }
.adv-body { display: grid; gap: 16px; max-width: 760px; padding: 4px 0 4px; }
.adv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.adv-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.input.mono { font-family: var(--mono); font-size: 12px; }
.cli-log { margin: 0 16px 12px 62px; max-height: 120px; font-size: 11.5px; }
.prow-main .btn.sm { flex: none; }

.prow-main .grow { min-width: 170px; }
.prow-main .grow > b { white-space: nowrap; }
@media (max-width: 1180px) { .prow-main .usage-bars { display: none; } }
@media (max-width: 980px) { .prow-main .pnum { display: none; } }

/* ─── contas: entrada, usuário na barra lateral, IAM, minha conta ─── */
.auth-body { background: var(--frame); min-height: 100vh; margin: 0; }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 20px; }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.auth-card { width: 100%; max-width: 380px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; box-shadow: var(--shadow-2); }
.auth-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.auth-lead { margin: 0 0 18px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.auth-card form > h1 + .auth-field { margin-top: 18px; }
.auth-field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.auth-field .input { height: 36px; font-size: 14px; width: 100%; box-sizing: border-box; }
.auth-card, .auth-card * { box-sizing: border-box; }
.auth-field small { color: var(--text-3); font-weight: 400; font-size: 12px; }
.auth-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin: 4px 0 14px; line-height: 1.45; }
.auth-check input { margin-top: 2px; width: 16px; height: 16px; flex: none; }
.auth-error { color: var(--red); font-size: 12.5px; min-height: 18px; margin: 0 0 8px; }
.auth-submit { width: 100%; height: 36px; font-size: 14px; }
.auth-foot { margin: 16px 0 0; font-size: 12.5px; color: var(--text-3); text-align: center; }
.auth-legal { display: flex; gap: 8px; font-size: 12px; color: var(--text-3); margin: 0; }
.auth-legal a { color: var(--text-2); }

.user-chip { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-s); cursor: pointer; color: var(--text); text-align: left; min-height: 40px; }
.user-chip:hover { background: var(--hover); }
.user-chip b { display: block; font-size: 12.5px; font-weight: 550; }
.user-chip small { display: block; font-size: 11.5px; color: var(--text-3); }
.user-ava { width: 26px; height: 26px; flex: none; border-radius: var(--r-s); background: var(--surface-3); color: var(--text); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.plan-note { font-size: 12px; color: var(--text-2); padding: 4px 8px; text-decoration: none; }
.plan-note.warn { color: var(--red); font-weight: 550; }
.narrow-page { max-width: 560px; padding-top: 12vh; }

.iam-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.iam-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 9px 14px; border-bottom: 1px solid var(--line); }
.iam-table td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.iam-table tbody tr:first-child td { border-top: 0; }
.iam-table tr.off td { opacity: .55; }
.iam-table .right { text-align: right; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell small { display: block; color: var(--text-3); font-size: 12px; }
.master-row { flex-wrap: wrap; }
.master-row .select, .master-row .input { min-width: 0; width: auto; }
.help-line { font-size: 12.5px; color: var(--text-2); margin: 8px 0 0; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.role-opt { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-l); cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-opt small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.check-list { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; }
.check-list.two { grid-template-columns: 1fr 1fr; }
.check-list label, .check-row { display: flex; gap: 8px; align-items: center; min-height: 28px; }
.check-list label.locked { color: var(--text-3); }
.meter { width: 140px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }

/* alvo de clique maior que o desenho (Fitts) e retorno ao apertar, rápido e sem exagero */
.btn, .icon-btn { position: relative; }
.btn::before, .icon-btn::before { content: ""; position: absolute; inset: -4px; }
.btn:active:not(:disabled), .icon-btn:active { transform: scale(.98); }
.btn { transition: background .12s, transform .08s ease-out; }

.auth-promise { font-size: 12.5px; color: var(--text-2); background: var(--fill); border-radius: var(--r-s); padding: 10px 12px; margin: 2px 0 12px; line-height: 1.45; }

.desk-banner { margin: 14px 22px 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-l); background: var(--accent-soft); color: var(--text); font-size: 13px; }
.desk-banner > svg { color: var(--accent); flex: none; }
.desk-banner b { display: block; font-weight: 600; }
.desk-banner span { color: var(--text-2); font-size: 12.5px; }

/* tabelas do pedido */
.tb-card { border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px; margin-bottom: 10px; background: var(--panel); display: grid; gap: 10px; }
.tb-head { display: flex; align-items: center; gap: 8px; }
.tb-head .tb-name { flex: 1; font-weight: 550; }
.tb-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); background: var(--fill); font-size: 13px; }
.tb-cols { display: grid; gap: 6px; }
.tb-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
.tb-col .hidden + .icon-btn { grid-column: 4; }
.tb-gen, .tb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-foot .select { width: auto; min-width: 150px; }
.tb-add { display: flex; gap: 6px; flex-wrap: wrap; }

/* conhecimento (Notion/Obsidian) */
.kb { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; height: 100%; min-height: calc(100vh - 56px); }
.kb-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.kb-side-top { display: flex; gap: 6px; padding: 12px; }
.kb-list { flex: 1; overflow: auto; padding: 0 8px 8px; }
.kb-folder { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); padding: 10px 8px 4px; }
.kb-item { display: block; padding: 6px 8px; border-radius: var(--r-s); color: var(--text); text-decoration: none; font-size: 13px; min-height: 30px; }
.kb-item.in { padding-left: 22px; }
.kb-item:hover { background: var(--hover); }
.kb-item.on { background: var(--selected); font-weight: 550; }
.kb-item small { display: block; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-side-foot { padding: 8px 12px; border-top: 1px solid var(--line); }
.kb-main { min-width: 0; display: flex; flex-direction: column; }
.kb-bar { display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.kb-title b { font-size: 14px; margin-right: 8px; }
.kb-doc, .kb-edit { max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 32px 80px; box-sizing: border-box; overflow-wrap: anywhere; }
.kb, .kb * { box-sizing: border-box; }
.kb-main { overflow: auto; }
.kb-text { width: 100%; min-height: 60vh; border: 0; outline: none; resize: none; background: transparent; color: var(--text); font: 14.5px/1.7 var(--font); }
.kb-hint { font-size: 12px; color: var(--text-3); margin-top: 12px; }
.kb-hint code { font-size: 11.5px; }
.kb-edit { position: relative; }
.kb-suggest { position: absolute; left: 32px; top: 40px; background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow-3); padding: 4px; display: grid; min-width: 220px; z-index: 5; }
.kb-suggest button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: var(--r-s); cursor: pointer; color: var(--text); font-size: 13px; }
.kb-suggest button:first-child, .kb-suggest button:hover { background: var(--hover); }
.kb-aside { border-left: 1px solid var(--line); padding: 14px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.kb-box { display: grid; gap: 6px; font-size: 13px; }
.kb-box > b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.kb-box.ai { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); }
.kb-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.kb-chips .chip { border: 0; cursor: pointer; }
.kb-toc, .kb-back { color: var(--text-2); text-decoration: none; font-size: 12.5px; padding: 3px 0; display: block; }
.kb-toc.l3 { padding-left: 12px; }
.kb-back small { display: block; color: var(--text-3); font-size: 11.5px; }
.kb-empty { padding: 48px; color: var(--text-2); text-align: center; }
.kb-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.md { font-size: 14.5px; line-height: 1.7; color: var(--text); }
.md h1 { font-size: 26px; margin: 0 0 16px; letter-spacing: -.015em; }
.md h2 { font-size: 19px; margin: 28px 0 8px; }
.md h3 { font-size: 15.5px; margin: 20px 0 6px; }
.md p, .md ul, .md ol { margin: 0 0 12px; }
.md li.task { list-style: none; margin-left: -18px; }
.md blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--line-2); color: var(--text-2); }
.md code { font-family: var(--mono); font-size: .88em; background: var(--fill); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--fill); padding: 12px 14px; border-radius: var(--r-l); overflow: auto; }
.md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { background: var(--fill); font-weight: 600; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md a { color: var(--accent); }
.md a.wikilink { text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.md a.wikilink.missing { color: var(--text-3); border-bottom-style: dashed; border-bottom-color: var(--line-2); }
@media (max-width: 1100px) { .kb { grid-template-columns: 210px minmax(0, 1fr); } .kb-aside { display: none; } }

/* chamados */
.tk { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.tk-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 0; }
.tk-side-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tk-list { overflow: auto; display: grid; gap: 2px; align-content: start; }
.tk-item { display: grid; gap: 3px; padding: 9px 10px; border-radius: var(--r-s); color: var(--text); text-decoration: none; font-size: 13px; }
.tk-item small { color: var(--text-3); font-size: 12px; }
.tk-item:hover { background: var(--hover); }
.tk-item.on { background: var(--selected); }
.tk-item.unread b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.tk-main { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 56px); }
.tk-head { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.tk-head h2 { font-size: 17px; margin: 0 0 2px; }
.tk-thread { flex: 1; overflow: auto; padding: 18px 24px; display: grid; gap: 12px; align-content: start; }
.tk-msg { max-width: 640px; padding: 10px 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; line-height: 1.55; }
.tk-msg.suporte { justify-self: end; background: var(--accent-soft); border-color: transparent; }
.tk-who { display: flex; gap: 8px; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.tk-who b { color: var(--text); font-weight: 600; }
.tk-sys { justify-self: center; font-size: 12px; color: var(--text-3); }
.tk-ctx { margin: 0 24px; font-size: 12px; color: var(--text-2); }
.tk-reply { border-top: 1px solid var(--line); padding: 12px 24px 16px; display: grid; gap: 8px; }
.mm-row .k small { white-space: normal; }
.mm-row .mm-meta { margin-top: 3px; font-size: 11.5px; }
.mm-row.off .k { opacity: .55; }

/* primeiros passos */
.fs-progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin: 2px 0 12px; }
.fs-progress span { display: block; height: 100%; background: var(--accent); transition: width .3s ease-out; }
.fsteps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.fsteps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.fsteps .n { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.fsteps .n svg { width: 12px; height: 12px; }
.fsteps li.done .n { background: var(--green); border-color: var(--green); }
.fsteps li.done b { color: var(--text-3); font-weight: 500; text-decoration: line-through; }
.fsteps li.next .n { border-color: var(--accent); }
.fsteps p { margin: 2px 0 8px; color: var(--text-2); font-size: 12.5px; }
/* faixa da skill nova */
.upgrade-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--accent-soft); font-size: 13px; border-bottom: 1px solid var(--line); }
.upgrade-bar b { font-weight: 600; }
.tk-side .seg button { padding: 3px 6px; font-size: 12px; }
.tk-list { overflow-x: hidden; }

/* preferências: tamanho do texto (escala a interface inteira) e dos ícones */
html[data-font="pequena"] body { zoom: .92; }
html[data-font="grande"] body { zoom: 1.12; }
html[data-icons="pequeno"] { --ico: 14px; }
html[data-icons="medio"] { --ico: 16px; }
html[data-icons="grande"] { --ico: 20px; }
html[data-icons] svg[width="16"], html[data-icons] .nav-ico, html[data-icons] .icon-btn svg { width: var(--ico); height: var(--ico); }
