/* Ledda Produtividade — tokens do design system "Ledda Cockpit" (ledda-orchestrate/apps/web/DESIGN.md). */
:root {
  --canvas: #f1f5f4;
  --surface: #fafcfb;
  --surface-sunken: #e7eeec;
  --surface-raised: #ffffff;
  --ink-1: #12312f;
  --ink-2: #46605d;
  --ink-3: #58706c;
  --ink-mute: #93a6a3;
  --line-1: #12312f14;
  --line-2: #12312f26;
  --brand: #1e4d4a;
  --brand-hover: #163b39;
  --brand-wash: #1e4d4a0f;
  --brand-line: #1e4d4a2e;
  --deep: #14393a;
  --moss: #c2d9c3;
  --pos: #2c7358;
  --pos-fill: #3e8f6e1a;
  --signal: #a34e2f;
  --signal-fill: #a65e4214;
  --signal-dot: #c2603e;
  --gold: #7f6128;
  --gold-fill: #c09b6e24;
  --gold-dot: #c09b6e;
  --rust: #b23a2e;
  --rust-fill: #c3302a14;
  --rust-dot: #c3302a;

  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;

  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --sh-raised: 0 1px 2px #12312f14;
  --sh-pop: 0 4px 12px -4px #12312f1f;
  --sh-sheet: 0 12px 28px -12px #12312f30;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-1);
  font: 400 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #1e4d4ab3; outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- tipografia ---------- */
.display { font: italic 400 2rem/1.15 var(--serif); margin: 0; letter-spacing: 0; }
.headline { font: 600 1.5rem/1.15 var(--sans); letter-spacing: -0.011em; margin: 0; }
.title { font: 600 1.25rem/1.35 var(--sans); letter-spacing: -0.011em; margin: 0; }
.label {
  font: 500 11px/1.35 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.meta { color: var(--ink-3); font-size: 12.5px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-1); font-weight: 500; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s; min-height: 36px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-raised); box-shadow: var(--sh-raised); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--canvas); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--brand-wash); box-shadow: none; color: var(--ink-1); }
.btn-danger { color: var(--rust); }
.btn-danger:hover { background: var(--rust-fill); border-color: #b23a2e40; }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn-lg { padding: 11px 22px; min-height: 44px; font-size: 15px; }

/* ---------- formulários ---------- */
.field { display: grid; gap: 6px; margin: 0; }
.field > .label-text { font-weight: 600; font-size: 13.5px; }
.field .hint { color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.input, .textarea, .select {
  width: 100%; background: var(--surface-sunken); border: 1px solid transparent;
  border-radius: var(--r-sm); padding: 9px 12px; color: var(--ink-1);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .textarea:focus, .select:focus { outline: none; background: var(--surface-raised); border-color: var(--brand-line); box-shadow: 0 0 0 3px #1e4d4a26; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }

/* segmented control */
.field > .seg { justify-self: start; }
.seg { display: inline-flex; background: var(--surface-sunken); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 6px 14px; border-radius: 4px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg input:checked + span { background: var(--surface-raised); color: var(--ink-1); box-shadow: var(--sh-raised); }
.seg input:focus-visible + span { outline: 3px solid #1e4d4ab3; outline-offset: 1px; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1.35 var(--mono);
  letter-spacing: 0.04em; padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--surface-sunken); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); flex: none; }
.chip.nodot::before { display: none; }
.chip.t-pos { background: var(--pos-fill); color: var(--pos); } .chip.t-pos::before { background: var(--pos); }
.chip.t-signal { background: var(--signal-fill); color: var(--signal); } .chip.t-signal::before { background: var(--signal-dot); }
.chip.t-gold { background: var(--gold-fill); color: var(--gold); } .chip.t-gold::before { background: var(--gold-dot); }
.chip.t-rust { background: var(--rust-fill); color: var(--rust); } .chip.t-rust::before { background: var(--rust-dot); }
.chip.t-brand { background: var(--brand-wash); color: var(--brand); } .chip.t-brand::before { background: var(--brand); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.imp-4 { background: var(--rust-dot); } .imp-3 { background: var(--signal-dot); } .imp-2 { background: var(--gold-dot); } .imp-1 { background: var(--ink-mute); }

/* ---------- painéis e listas ---------- */
.panel { background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-lg); }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-lg); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line-1); }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-2); }
.empty .display { font-size: 1.6rem; color: var(--ink-1); margin-bottom: 6px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.pillbar { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.pill:hover { background: var(--brand-wash); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--canvas); }

/* sheet / modal */
.scrim { position: fixed; inset: 0; z-index: 50; background: #0e2c2b59; display: flex; justify-content: flex-end; }
.sheet {
  background: var(--surface-raised); width: min(560px, 100%); height: 100%; overflow-y: auto;
  box-shadow: var(--sh-sheet); padding: 20px 20px 40px; display: grid; gap: 16px; align-content: start;
  animation: sheet-in .2s ease-out;
}
.sheet-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
@keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  background: var(--deep); color: #edf3f1; padding: 10px 16px; border-radius: var(--r-md); box-shadow: var(--sh-pop);
  font-size: 13.5px; max-width: calc(100% - 32px);
}

/* spinner */
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--ink-3); }

/* =====================================================================
   Ledda Produtividade — shell, GTD e foco
   ===================================================================== */
:root {
  --rail-bg: #14393a; --rail-ink: #e8f0ee; --rail-muted: #9fb8b4; --rail-wash: #ffffff14; --rail-line: #ffffff1a;
  --rail-active: #c2d9c3;
  --goal-fill: #3e8f6e; --goal-met: #c2d9c3;
}

.app { display: grid; grid-template-columns: 76px 1fr; min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; background: var(--rail-bg); color: var(--rail-ink);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0; z-index: 30;
}
.rail .mark { width: 34px; height: 34px; margin-bottom: 14px; }
.rail a, .rail button.r {
  width: 64px; display: grid; justify-items: center; gap: 3px; padding: 8px 0; border-radius: 10px;
  color: var(--rail-muted); text-decoration: none; font-size: 10.5px; font-weight: 500; border: 0; background: none; cursor: pointer;
  position: relative;
}
.rail a:hover, .rail button.r:hover { background: var(--rail-wash); color: var(--rail-ink); }
.rail a[aria-current="page"] { background: var(--rail-wash); color: var(--rail-ink); box-shadow: inset 2px 0 0 var(--rail-active); }
.rail svg { width: 20px; height: 20px; }
.rail .badge {
  position: absolute; top: 3px; right: 9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--signal-dot); color: #fff; font: 600 10px/17px var(--mono); text-align: center;
}
.rail .spacer { flex: 1; }
.rail .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--rail-wash); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--rail-ink); }
.rail .focus-btn { background: var(--moss); color: var(--deep); }
.rail .focus-btn:hover { background: #d3e6d4; color: var(--deep); }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; padding-bottom: 68px; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 64px; flex-direction: row; justify-content: space-around;
    padding: 0 4px env(safe-area-inset-bottom);
  }
  .rail .mark, .rail .spacer, .rail .avatar, .rail .desk { display: none; }
  .rail a, .rail button.r { width: auto; flex: 1; }
}

.page { max-width: 980px; margin: 0 auto; padding: 28px 20px 80px; width: 100%; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 60ch; }
.section { margin-top: 28px; }
.section > .label { display: block; margin-bottom: 8px; }

/* captura */
.capture { display: flex; gap: 8px; background: var(--surface-raised); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 6px; box-shadow: var(--sh-raised); }
.capture .input { background: transparent; border: 0; font-size: 15px; }
.capture .input:focus { box-shadow: none; }
.kbd { font: 500 11px var(--mono); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--surface); }

/* linhas de item */
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 12px 16px; align-items: start; }
.row .check {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface);
  margin-top: 2px; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.row .check:hover { border-color: var(--brand); }
.row .check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.row-title { font-weight: 500; overflow-wrap: anywhere; cursor: pointer; }
.row.done .row-title { color: var(--ink-3); text-decoration: line-through; }
.row-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.row-side { display: flex; gap: 6px; align-items: center; }
.ai-chip { display: inline-flex; align-items: center; gap: 5px; font: 500 11px var(--mono); color: var(--brand); background: var(--brand-wash); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ai-chip svg { width: 12px; height: 12px; }

.group-title { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 8px; }
.group-title .n { font: 500 11px var(--mono); color: var(--ink-3); }

/* barra de importância 0..4 */
.meter { display: inline-flex; gap: 2px; vertical-align: middle; }
.meter i { width: 6px; height: 10px; border-radius: 2px; background: var(--surface-sunken); }
.meter i.on { background: var(--signal-dot); }
.meter.u i.on { background: var(--gold-dot); }

/* projetos */
.proj { padding: 14px 16px; display: grid; gap: 6px; }
.proj-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.proj-title { font-weight: 600; cursor: pointer; }
.proj .next { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 13px; }
.warn { color: var(--signal); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }

/* ===================== modo foco (esclarecer + sessão) ===================== */
.focus { position: fixed; inset: 0; z-index: 40; background: var(--canvas); display: flex; flex-direction: column; }
.fbar {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--rail-bg); color: var(--rail-ink);
  border-bottom: 1px solid var(--rail-line); min-height: 60px; flex-wrap: wrap;
}
.fbar .btn-ghost { color: var(--rail-muted); }
.fbar .btn-ghost:hover { background: var(--rail-wash); color: var(--rail-ink); }
.fbar .ctx { color: var(--rail-muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.progress { flex: 1; min-width: 80px; height: 6px; border-radius: 999px; background: var(--rail-wash); overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; background: var(--goal-fill); transition: width .2s; }
.progress.met > div { background: var(--goal-met); }
.fbar .pos { font: 500 12px var(--mono); font-variant-numeric: tabular-nums; }
.timer { display: inline-flex; align-items: baseline; gap: 8px; border: 0; background: none; color: var(--rail-ink); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.timer:hover { background: var(--rail-wash); }
.timer b { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; }
.timer span { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rail-muted); }
.timer .paused { color: var(--gold-dot); }
.fbar .btn-primary { background: var(--moss); border-color: var(--moss); color: var(--deep); }
.fbar .btn-primary:hover { background: #d3e6d4; }
.fbar .icon-btn { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; border: 0; background: none; color: var(--rail-ink); cursor: pointer; }
.fbar .icon-btn:hover { background: var(--rail-wash); }
.fbar .icon-btn svg { width: 18px; height: 18px; }

.fcols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, .9fr); }
.fcol { min-height: 0; overflow-y: auto; padding: 20px; display: grid; gap: 14px; align-content: start; }
.fcol + .fcol { border-left: 1px solid var(--line-1); }
.fcol.center { background: var(--surface); }
@media (max-width: 900px) {
  .fcols { grid-template-columns: 1fr; grid-auto-rows: auto; align-content: start; overflow-y: auto; padding-bottom: 90px; }
  .fcol { overflow: visible; min-height: auto; }
  .fcol + .fcol { border-left: 0; border-top: 1px solid var(--line-1); }
  .fcol.seq { order: 3; }
}

.seq-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-md); overflow: hidden; }
.seq-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 10px 12px; align-items: baseline; font-size: 13.5px; }
.seq-list li + li { border-top: 1px solid var(--line-1); }
.seq-list li.cur { background: var(--surface-raised); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.seq-list li.closed { color: var(--ink-3); }
.seq-list .n { font: 500 11px var(--mono); color: var(--ink-3); }
.seq-list .st { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.seq-list .st.done { color: var(--pos); }
.seq-list .st.cur { color: var(--brand); }
.seq-list li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.action-card { background: var(--surface-sunken); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 4px; }
.action-card .big { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -0.011em; overflow-wrap: anywhere; }
.action-card .big-input { font: 600 1.2rem/1.3 var(--sans); background: transparent; border: 0; padding: 0; width: 100%; color: var(--ink-1); }
.action-card .big-input:focus { outline: none; }

/* destinos do esclarecer */
.dests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dest {
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.dest:hover { box-shadow: var(--sh-raised); background: var(--surface-raised); }
.dest .k { font: 500 11px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; width: 20px; text-align: center; }
.dest b { font-weight: 600; font-size: 13.5px; }
.dest small { grid-column: 2 / 4; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.dest .p { font: 500 11px var(--mono); color: var(--ink-3); }
.dest.rec { border-color: var(--brand-line); background: var(--brand-wash); }
.dest.rec .p { color: var(--brand); }
.dest[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-raised); }
@media (max-width: 520px) { .dests { grid-template-columns: 1fr; } }

.qpath { display: grid; gap: 6px; }
.q { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.q .pv { font: 500 12px var(--mono); color: var(--ink-1); }
.pbar { height: 4px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; margin-top: 3px; }
.pbar > div { height: 100%; background: var(--brand); }

.ai-panel { display: grid; gap: 12px; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 13px; align-items: center; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.kv .conf { font: 500 11px var(--mono); color: var(--ink-3); margin-left: 6px; }
.tip { background: var(--gold-fill); color: var(--gold); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12.5px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.mobile-actions { display: none; }
@media (max-width: 900px) {
  .fbar .desk-only { display: none; }
  .mobile-actions { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface-raised); border-top: 1px solid var(--line-1); z-index: 45; }
  .mobile-actions .btn { flex: 1; }
}

/* foco: montar sessão */
.plan-list .row { grid-template-columns: auto 1fr auto; }
.frog { font: 600 10.5px var(--mono); letter-spacing: .12em; color: var(--pos); background: var(--pos-fill); padding: 2px 7px; border-radius: 999px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-md); padding: 14px; display: grid; gap: 2px; }
.stat b { font: 600 1.5rem var(--sans); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .summary { grid-template-columns: 1fr 1fr; } }

/* gate */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(440px, 100%); display: grid; gap: 18px; }
.gate-card img { width: 44px; height: 44px; padding: 7px; background: var(--deep); border-radius: 11px; }
.gate-card p { margin: 0; color: var(--ink-2); }

/* modal central */
.modal-scrim { position: fixed; inset: 0; z-index: 55; background: #0e2c2b59; display: grid; place-items: start center; padding: 12vh 16px 16px; }
.modal { width: min(560px, 100%); background: var(--surface-raised); border-radius: var(--r-lg); box-shadow: var(--sh-sheet); padding: 18px; display: grid; gap: 14px; }

/* ===================== tema escuro =====================
   Escuro tradicional: superfícies neutras (quase preto/cinza). A Ledda fica nos detalhes:
   ação principal, seleção e progresso em Moss; o logo no seu bloco Deep Teal. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0e0e10; --surface: #161618; --surface-sunken: #0a0a0b; --surface-raised: #1c1c1f;
    --ink-1: #ececee; --ink-2: #a3a3a8; --ink-3: #8b8b91; --ink-mute: #5d5d63;
    --line-1: #ffffff12; --line-2: #ffffff21;
    --brand: #c2d9c3; --brand-hover: #d3e6d4; --brand-wash: #c2d9c312; --brand-line: #c2d9c340;
    --deep: #14393a; --pos: #7fc9a3; --pos-fill: #7fc9a31a;
    --signal: #e0967d; --signal-fill: #e0967d1a; --signal-dot: #e0967d;
    --gold: #d6b487; --gold-fill: #d6b4871a; --gold-dot: #d6b487;
    --rust: #e58a7f; --rust-fill: #e0796d1a; --rust-dot: #e58a7f;
    --rail-bg: #0a0a0b; --rail-ink: #ececee; --rail-muted: #8b8b91; --rail-wash: #ffffff0d; --rail-line: #ffffff12;
    --rail-active: #c2d9c3; --goal-fill: #7fc9a3;
    --sh-raised: 0 1px 2px #00000066; --sh-pop: 0 4px 12px -4px #00000080; --sh-sheet: 0 12px 28px -12px #000000a0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0e0e10; --surface: #161618; --surface-sunken: #0a0a0b; --surface-raised: #1c1c1f;
  --ink-1: #ececee; --ink-2: #a3a3a8; --ink-3: #8b8b91; --ink-mute: #5d5d63;
  --line-1: #ffffff12; --line-2: #ffffff21;
  --brand: #c2d9c3; --brand-hover: #d3e6d4; --brand-wash: #c2d9c312; --brand-line: #c2d9c340;
  --deep: #14393a; --pos: #7fc9a3; --pos-fill: #7fc9a31a;
  --signal: #e0967d; --signal-fill: #e0967d1a; --signal-dot: #e0967d;
  --gold: #d6b487; --gold-fill: #d6b4871a; --gold-dot: #d6b487;
  --rust: #e58a7f; --rust-fill: #e0796d1a; --rust-dot: #e58a7f;
  --rail-bg: #0a0a0b; --rail-ink: #ececee; --rail-muted: #8b8b91; --rail-wash: #ffffff0d; --rail-line: #ffffff12;
  --rail-active: #c2d9c3; --goal-fill: #7fc9a3;
  --sh-raised: 0 1px 2px #00000066; --sh-pop: 0 4px 12px -4px #00000080; --sh-sheet: 0 12px 28px -12px #000000a0;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :focus-visible { outline-color: #c2d9c3b3; } }
:root[data-theme="dark"] :focus-visible { outline-color: #c2d9c3b3; }
.row .check.on { color: var(--canvas); }
.rail .avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.rail .avatar-btn:hover .avatar { background: #ffffff26; }
.rail { border-right: 1px solid var(--rail-line); }
@media (max-width: 760px) { .rail { border-right: 0; border-top: 1px solid var(--rail-line); } }

/* ===================== relatório ===================== */
.kpis { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.kpis .stat .meta { font-size: 12px; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.rep-card { padding: 16px; display: grid; gap: 10px; align-content: start; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.rep-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .rep-grid { grid-template-columns: 1fr; } }
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 560px; height: auto; display: block; }
.chart .grid { stroke: var(--line-1); }
.chart .axis { fill: var(--ink-3); font: 500 10.5px var(--mono); }
.chart .cnt { fill: var(--ink-2); font: 600 10.5px var(--mono); }
.b-focus { fill: var(--brand); background: var(--brand); }
.b-clar { fill: var(--gold-dot); background: var(--gold-dot); }
.legend-i { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.legend-i i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.bar-head .mono { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; margin: 4px 0 2px; }
.bar > div { height: 100%; border-radius: 999px; background: var(--brand); }
.bars .meta { font-size: 11.5px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 110px; align-items: end; }
.hours > div { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; }
.hours i { display: block; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.hours span { font: 500 10px var(--mono); color: var(--ink-3); text-align: center; height: 14px; }

/* pergunta de inatividade: não fecha clicando fora nem com Esc */
.gap-scrim { position: fixed; inset: 0; z-index: 80; background: #00000080; display: grid; place-items: center; padding: 16px; }
.gap-scrim .modal { width: min(520px, 100%); }
.gap-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 520px) { .gap-actions { flex-direction: column-reverse; } .gap-actions .btn { width: 100%; } }
@media (max-width: 760px) { .rail .desk, .rail .no-mobile { display: none; } .rail button.r.desk { display: grid; } }

/* ===================== ajustes ===================== */
.settings { display: grid; gap: 12px; }
.set-card { padding: 18px; display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.set-hint { margin: 4px 0 0; color: var(--ink-3); font-size: 12.5px; }
.set-body { display: grid; gap: 14px; align-content: start; }
.set-body .kv { max-width: 420px; }
.set-body .kv dd { text-align: left; }
@media (max-width: 760px) { .set-card { grid-template-columns: 1fr; gap: 12px; } }
.rail .avatar-link { display: block; padding: 0; width: auto; }
.rail .avatar-link:hover .avatar { background: #ffffff26; }

/* ===================== metas ===================== */
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.goal { background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 10px; }
.goal.achieved, .goal.dropped { background: transparent; }
.goal.dropped .goal-title { color: var(--ink-2); }
.goal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.goal-title { font: 600 1.05rem/1.35 var(--sans); letter-spacing: -0.011em; }
.goal-stats { display: grid; justify-items: end; text-align: right; flex: none; }
.goal-stats b { font: 600 1.1rem var(--sans); font-variant-numeric: tabular-nums; }
.goal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.goal-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--brand); text-decoration: none; }
.goal-chip svg { width: 12px; height: 12px; }
.tl-month { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 6px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 1px solid var(--line-2); display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; margin-left: -11px; font-size: 13.5px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-mute); margin-top: 6px; box-shadow: 0 0 0 3px var(--canvas); }
.tl-dot.t-brand { background: var(--brand); } .tl-dot.t-pos { background: var(--pos); } .tl-dot.t-rust { background: var(--rust-dot); } .tl-dot.t-gold { background: var(--gold-dot); }
.note { border-left: 2px solid var(--brand-line); padding: 6px 12px; background: var(--brand-wash); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.note .label { display: block; margin-bottom: 2px; }

/* ===================== pessoas ===================== */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; background: var(--surface-sunken); color: var(--ink-2); }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; background: var(--brand-wash); color: var(--brand); border: 1px solid var(--brand-line); }
.person-chip { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; margin-top: 6px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line-1); background: var(--surface); }
.person-chip:hover { box-shadow: var(--sh-raised); }
.person-chip span:last-child { display: grid; }
.person-chip small { color: var(--ink-3); font-size: 12px; }
.link-form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.link-form .select { width: auto; flex: 1; min-width: 120px; }
.check-line { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.check-line input { accent-color: var(--brand); }
select[multiple].select { background-image: none; padding-right: 12px; }
.walk { display: grid; gap: 6px; border-top: 1px solid var(--line-1); padding-top: 12px; }
.walk-path { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.walk-step { display: inline-grid; padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface-sunken); font-size: 12.5px; }
.walk-step small { font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.walk-step b { font: 500 11px var(--mono); color: var(--brand); }
.walk-arrow { color: var(--ink-mute); }
.rep-card .next { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.person-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface-sunken); border-radius: var(--r-sm); padding: 6px; min-height: 44px; }
.pick { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-raised); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.pick small { font: 500 10.5px var(--mono); color: var(--ink-3); }
.pick.new { border-style: dashed; border-color: var(--brand-line); }
.pick select { border: 0; background: var(--brand-wash); color: var(--brand); border-radius: 999px; font-size: 11.5px; padding: 2px 6px; }
.pick button { border: 0; background: none; color: var(--ink-3); cursor: pointer; width: 22px; height: 22px; border-radius: 50%; font-size: 15px; line-height: 1; }
.pick button:hover { background: var(--surface-sunken); color: var(--ink-1); }
.pick-input { flex: 1; min-width: 140px; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 4px 6px; }
.pick-add { border: 1px dashed var(--brand-line); background: var(--brand-wash); color: var(--brand); border-radius: 999px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.pick-add:hover { background: var(--brand-line); }

/* ===================== magic items ===================== */
.magic { margin-top: 20px; border: 1px solid var(--brand-line); background: linear-gradient(180deg, var(--brand-wash), transparent 140px); border-radius: var(--r-lg); padding: 10px 14px 14px; }
.magic-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.magic-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink-1); cursor: pointer; padding: 4px 0; font: inherit; }
.magic-toggle svg { width: 16px; height: 16px; color: var(--brand); }
.magic-toggle .count { font: 500 11px var(--mono); background: var(--brand); color: var(--canvas); padding: 1px 7px; border-radius: 999px; }
.magic-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.magic-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-md); padding: 12px 14px; }
.magic-body { display: grid; gap: 4px; min-width: 0; }
.magic-title { font-weight: 600; overflow-wrap: anywhere; }
.magic-body .muted { font-size: 13px; }
.magic-body .row-sub a { color: var(--brand); }
.magic-body .goal-chip { margin-top: 0; }
.magic-actions { display: flex; gap: 6px; }
@media (max-width: 640px) { .magic-item { grid-template-columns: 1fr; } }
.ai-retry { border: 1px dashed var(--brand-line); cursor: pointer; background: transparent; }
.ai-retry:hover { background: var(--brand-wash); }

/* ===================== trace das sugestões ===================== */
.k-agent { --k: var(--signal-dot); } .k-llm { --k: #8b7bd8; } .k-tool { --k: var(--gold-dot); } .k-clef { --k: var(--pos); } .k-function { --k: var(--ink-mute); } .k-error { --k: var(--rust-dot); }
.trace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
@media (max-width: 1000px) { .trace { grid-template-columns: 1fr; } }
.trace-tree { background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-lg); overflow: hidden; }
.span-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 110px minmax(160px, 1.6fr); gap: 10px; align-items: center; width: 100%; text-align: left; padding: 7px 12px; border: 0; border-top: 1px solid var(--line-1); background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.span-row.head { cursor: default; border-top: 0; background: var(--surface-sunken); color: var(--ink-3); font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.span-row:not(.head):hover { background: var(--brand-wash); }
.span-row.on { background: var(--brand-wash); box-shadow: inset 2px 0 0 var(--brand); }
.span-row.dim { opacity: .45; }
.span-row.rel .span-name { font-weight: 600; }
.span-name { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.span-name i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); flex: none; }
.span-name .err { color: var(--rust); font: 600 10px var(--mono); }
.span-op { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.span-bar { position: relative; height: 18px; }
.span-bar > span { position: absolute; top: 3px; height: 12px; border-radius: 3px; background: var(--k); opacity: .9; }
.span-bar small { position: absolute; top: 1px; font: 500 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.span-scale { display: flex; justify-content: space-between; }
.span-detail { background: var(--surface); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; }
.sd-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sd-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.sd-kv { font-size: 12.5px; }
.sd-block { display: grid; gap: 6px; }
.sd-pre { margin: 0; background: var(--surface-sunken); border-radius: var(--r-sm); padding: 10px 12px; font: 400 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; color: var(--ink-1); }
.sd-pre.reasoning { font-family: var(--sans); font-size: 13px; color: var(--ink-2); font-style: italic; }
.trace-items { display: grid; gap: 6px; margin-top: 4px; }
.trace-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line-1); border-radius: var(--r-md); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.trace-item small { grid-column: 2; color: var(--ink-3); font-size: 12.5px; }
.trace-item.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.trace-dropped summary { cursor: pointer; padding: 4px 2px; }
.trace-feedback { padding: 16px; display: grid; gap: 10px; margin-top: 14px; }
.linklike { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0 2px; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pref { display: inline-flex; align-items: center; gap: 2px; background: var(--brand-wash); border-radius: 999px; padding: 1px 4px 1px 10px; margin: 2px; }
.magic-form { display: grid; gap: 8px; margin-top: 10px; }
.magic-form .textarea { min-height: 64px; }
.magic-form-row { display: flex; align-items: center; gap: 8px; }
.trace-feedback { position: fixed; left: 76px; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 4px; }
.tf-in { max-width: 980px; margin: 0 auto; width: 100%; display: flex; gap: 10px; align-items: stretch; }
.tf-in .textarea { min-height: 52px; flex: 1; }
.tf-side { display: grid; gap: 4px; align-content: center; justify-items: center; }
.tf-meta { max-width: 980px; margin: 0 auto; width: 100%; font-size: 12px; }
@media (max-width: 760px) { .trace-feedback { left: 0; bottom: 64px; } }
.prefs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prefs li { display: flex; gap: 6px; }

/* sugestões: gaveta fixa no rodapé da Entrada */
.magic.dock { position: fixed; left: 76px; right: 0; bottom: 0; z-index: 24; margin: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0;
  background: var(--surface); box-shadow: 0 -8px 24px -12px #00000040; padding: 0; max-width: 980px; margin-left: auto; margin-right: auto; }
@media (min-width: 761px) { .magic.dock { left: calc(76px + max(0px, (100vw - 76px - 980px) / 2)); right: max(0px, (100vw - 76px - 980px) / 2); } }
.magic.dock .magic-head { padding: 8px 14px; }
.magic.dock .dock-body { display: none; }
.magic.dock.open .dock-body { display: block; max-height: 50vh; overflow-y: auto; padding: 0 14px 14px; border-top: 1px solid var(--line-1); }
.magic.dock .magic-form { padding: 0 14px 12px; }
.dock-chevron { border: 0; background: none; color: var(--ink-3); cursor: pointer; width: 30px; height: 30px; border-radius: 6px; font-size: 13px; }
.dock-chevron:hover { background: var(--brand-wash); color: var(--ink-1); }
.dock-spacer { height: 80px; }
@media (max-width: 760px) { .magic.dock { left: 0; right: 0; bottom: 64px; } }
.magic.dock .dock-body .magic-form { padding: 12px 0 0; }
.dock-chevron { display: grid; place-items: center; }

/* ===================== seletor com busca ===================== */
.combo { position: relative; min-width: 0; }
.combo-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface-sunken); border: 1px solid transparent; border-radius: var(--r-sm); padding: 4px 6px; min-height: 40px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.combo-box:hover { border-color: var(--line-2); }
.combo-box:focus-within { background: var(--surface-raised); border-color: var(--brand-line); box-shadow: 0 0 0 3px #1e4d4a26; }
.combo-input { flex: 1; min-width: 120px; border: 0; background: transparent; padding: 5px 6px; color: var(--ink-1); }
.combo-input:focus { outline: none; }
.combo-input::placeholder { color: var(--ink-mute); }
.person-picks .combo { flex: 1; min-width: 180px; }
.person-picks .combo-box { background: transparent; border: 0; box-shadow: none; padding: 0; min-height: 30px; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 70; list-style: none; margin: 0; padding: 4px; background: var(--surface-raised); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--sh-sheet); max-height: 300px; overflow-y: auto; }
.combo-opt { display: grid; gap: 1px; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; }
.combo-opt small { color: var(--ink-3); font-size: 12px; }
.combo-opt:hover, .combo-opt.on { background: var(--brand-wash); }
.combo-opt.on { box-shadow: inset 2px 0 0 var(--brand); }
.combo-opt.create span { color: var(--brand); font-weight: 600; }
.combo-more { padding: 8px 10px; color: var(--ink-3); font-size: 12.5px; }
.link-form .combo { flex: 1; min-width: 160px; }
.combo-list { min-width: 280px; }

/* ===================== seletor de data ===================== */
.dp { position: relative; display: flex; align-items: center; }
.dp-btn { flex: 1; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--surface-sunken); color: var(--ink-1); cursor: pointer; text-align: left; font: inherit; }
.dp-btn:hover { border-color: var(--line-2); }
.dp-btn:focus-visible { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 3px #1e4d4a26; }
.dp-btn svg { color: var(--ink-3); flex: none; }
.dp-btn.empty span { color: var(--ink-mute); }
.dp-clear { position: absolute; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 15px; }
.dp-clear:hover { background: var(--surface-raised); color: var(--ink-1); }
.dp-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 75; width: 288px; padding: 12px; background: var(--surface-raised); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--sh-sheet); display: grid; gap: 10px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; }
.dp-head b { font-weight: 600; font-size: 14px; text-transform: capitalize; }
.dp-nav { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 17px; line-height: 1; }
.dp-nav:hover { background: var(--brand-wash); color: var(--ink-1); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { text-align: center; font: 500 11px var(--mono); color: var(--ink-3); padding: 4px 0; }
.dp-day { height: 34px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-1); cursor: pointer; font: 500 13px var(--sans); font-variant-numeric: tabular-nums; }
.dp-day:hover:not(:disabled) { background: var(--brand-wash); }
.dp-day.out { color: var(--ink-mute); }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--brand-line); font-weight: 700; }
.dp-day.sel { background: var(--brand); color: var(--canvas); }
.dp-day:disabled { opacity: .3; cursor: default; }
.dp-day:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dp-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line-1); padding-top: 10px; }
.dp-chip { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.dp-chip:hover { background: var(--brand-wash); color: var(--ink-1); }
.dp-chip.ghost { border-color: transparent; }
.dp-time { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.dp-time .input { width: 80px; padding: 6px 10px; font-family: var(--mono); }
.ai-box { border: 1px solid var(--brand-line); background: var(--brand-wash); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 10px; }
.ai-box-head { display: flex; align-items: center; gap: 6px; }
.ai-box-head .label { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); }
.ai-box .kv { font-size: 12.5px; }
.clarity .q { font-size: 13px; }
.clarity .pbar { height: 5px; }

/* AlertDialog (estilo shadcn) */
.alert-scrim { position: fixed; inset: 0; z-index: 90; background: #00000080; display: grid; place-items: center; padding: 16px; animation: fade-in .12s ease-out; }
.alert { width: min(460px, 100%); background: var(--surface-raised); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--sh-sheet); padding: 22px; display: grid; gap: 10px; animation: zoom-in .14s ease-out; }
.alert-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .alert-scrim, .alert { animation: none; } }
@media (max-width: 520px) { .alert-actions { flex-direction: column-reverse; } .alert-actions span { display: none; } }
.clarity.stale { opacity: .5; }

/* foco: botão nas ações e widget minimizado */
.row-focus { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--brand-line); background: var(--brand-wash); color: var(--brand); border-radius: 999px; padding: 2px 10px 2px 8px; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.row:hover .row-focus, .row-focus:focus-visible { opacity: 1; }
@media (hover: none) { .row-focus { opacity: 1; } }
.row-focus:hover { background: var(--brand); color: var(--canvas); }
.focus-pill { position: fixed; top: 12px; right: 16px; z-index: 35; display: flex; align-items: center; gap: 8px; max-width: min(420px, calc(100vw - 110px));
  background: var(--rail-bg); color: var(--rail-ink); border: 1px solid var(--rail-line); border-radius: 999px; padding: 6px 6px 6px 14px; box-shadow: var(--sh-pop); }
.fp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--goal-fill); flex: none; animation: pulse 1.8s ease-in-out infinite; }
.fp-dot.paused { background: var(--gold-dot); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .fp-dot { animation: none; } }
.fp-title { color: var(--rail-ink); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fp-title:hover { text-decoration: underline; }
.fp-clock { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; flex: none; }
.fp-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--rail-wash); color: var(--rail-ink); cursor: pointer; flex: none; text-decoration: none; }
.fp-btn:hover { background: #ffffff26; }
@media (max-width: 760px) { .focus-pill { top: auto; bottom: 76px; right: 12px; left: 12px; max-width: none; } }
.btn-destructive { background: var(--rust); border-color: var(--rust); color: #fff; }
.btn-destructive:hover { filter: brightness(1.08); }
.plan-over { margin-top: 12px; }
