/* Layout: barra lateral fixa em azul-petróleo + área de trabalho em grelha; mobile = barra superior com menu */
:root {
  --bg: #eef1f4; --surface: #ffffff; --surface-2: #f6f8fa; --ink: #14212b; --muted: #5b6b78; --line: #d9e0e6;
  --brand: #173f5a; --brand-ink: #ffffff; --brand-soft: #e3edf4; --accent: #d07a0c; --accent-ink: #ffffff;
  --ok: #1f7a4d; --ok-soft: #e2f3ea; --warn: #9a6408; --warn-soft: #fbf0d9; --bad: #b42318; --bad-soft: #fbe6e4;
  --info: #2462a3; --info-soft: #e3eefa; --cycle: #7a3e9d; --cycle-soft: #f1e6f7; --idle: #6b7785; --idle-soft: #eceff2;
  --side: #102f44; --side-ink: #c9d8e3; --side-active: #1d4a68;
  --f-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --f-head: "IBM Plex Sans Condensed", "Arial Narrow", "IBM Plex Sans", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 6px; --shadow: 0 1px 2px rgba(16, 47, 68, .06), 0 6px 18px rgba(16, 47, 68, .07);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f171d; --surface: #16212a; --surface-2: #1b2832; --ink: #e5ecf1; --muted: #94a6b4; --line: #2a3a47;
  --brand: #7fb3d5; --brand-ink: #0f171d; --brand-soft: #1d3242; --accent: #eea047; --accent-ink: #1a1206;
  --ok: #4cc38a; --ok-soft: #173327; --warn: #e3b341; --warn-soft: #33290f; --bad: #f47b72; --bad-soft: #3a1c1a;
  --info: #7ab4ee; --info-soft: #182b40; --cycle: #c896e6; --cycle-soft: #2e1f39; --idle: #9aa7b3; --idle-soft: #222d36;
  --side: #0b1217; --side-ink: #9fb3c2; --side-active: #1a2a36; color-scheme: dark; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
} }
:root[data-theme="dark"] {
  --bg: #0f171d; --surface: #16212a; --surface-2: #1b2832; --ink: #e5ecf1; --muted: #94a6b4; --line: #2a3a47;
  --brand: #7fb3d5; --brand-ink: #0f171d; --brand-soft: #1d3242; --accent: #eea047; --accent-ink: #1a1206;
  --ok: #4cc38a; --ok-soft: #173327; --warn: #e3b341; --warn-soft: #33290f; --bad: #f47b72; --bad-soft: #3a1c1a;
  --info: #7ab4ee; --info-soft: #182b40; --cycle: #c896e6; --cycle-soft: #2e1f39; --idle: #9aa7b3; --idle-soft: #222d36;
  --side: #0b1217; --side-ink: #9fb3c2; --side-active: #1a2a36; color-scheme: dark; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; text-wrap: balance; margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--info); }
button, input, select, textarea { font: inherit; color: inherit; }
.mono, .ref { font-family: var(--f-mono); font-size: .86em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- moldura ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; font: 700 15px var(--f-head); color: #1a1206; letter-spacing: .02em; flex: none; }
.brand b { font: 600 1.02rem var(--f-head); display: block; letter-spacing: .02em; }
.brand span { font-size: .72rem; color: var(--side-ink); text-transform: uppercase; letter-spacing: .08em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; padding: 12px 10px 4px; opacity: .7; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; color: var(--side-ink); text-decoration: none; }
.nav a:hover { background: var(--side-active); color: #fff; }
.nav a.on { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; font: 600 .72rem var(--f-mono); background: var(--accent); color: #1a1206; border-radius: 10px; padding: 1px 7px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 12px 8px 0; display: grid; gap: 8px; font-size: .85rem; }
.side-foot .who b { color: #fff; display: block; font-weight: 500; }
.side-foot button { background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--side-ink); border-radius: 5px; padding: 6px 10px; cursor: pointer; }
.side-foot button:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.topbar { display: none; }
.main { padding-block: 22px 60px; padding-inline: clamp(16px, 3vw, 36px); min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-head .eyebrow { font: 500 .72rem var(--f-head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; }

.demo-bar { background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); padding: 8px clamp(16px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .85rem; }
.demo-bar b { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--warn); }
.demo-bar select, .demo-bar button { padding: 4px 8px; font-size: .82rem; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; height: 100%; padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
  .app.menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--side); color: #fff; padding: 10px 16px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; }
  .topbar b { font-family: var(--f-head); }
}

/* ---------- componentes ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 5px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.cycle { background: var(--cycle); border-color: var(--cycle); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--info); padding-inline: 6px; }
.btn.sm { padding: 4px 9px; font-size: .82rem; }
.btn:disabled { opacity: .55; cursor: default; }
:root[data-theme="dark"] .btn.ok, :root[data-theme="dark"] .btn.cycle { color: #0f171d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ok, :root:not([data-theme="light"]) .btn.cycle { color: #0f171d; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel > header h2 { font-size: 1rem; }
.panel .body { padding: 14px 16px; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; font: 500 .74rem var(--f-body); padding: 2px 8px; border-radius: 10px; white-space: nowrap; background: var(--idle-soft); color: var(--idle); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.st-atribuida { background: var(--info-soft); color: var(--info); }
.pill.st-em_curso { background: var(--brand-soft); color: var(--brand); }
.pill.st-submetida { background: var(--warn-soft); color: var(--warn); }
.pill.st-devolvida { background: var(--cycle-soft); color: var(--cycle); }
.pill.st-concluida { background: var(--ok-soft); color: var(--ok); }
.pill.late { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-block; font: 600 .66rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
.tag.ext { border-color: var(--accent); color: var(--accent); }
.prio { font-size: .8rem; }
.prio.Alta { color: var(--bad); font-weight: 600; }
.cyc { font: 600 .76rem var(--f-mono); color: var(--cycle); white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--muted); }
.kpi .k-label { font: 500 .72rem var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kpi .k-val { font: 600 1.75rem/1.1 var(--f-head); font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .78rem; color: var(--muted); }
.kpi.bad .k-val { color: var(--bad); } .kpi.warn .k-val { color: var(--warn); } .kpi.cycle .k-val { color: var(--cycle); } .kpi.ok .k-val { color: var(--ok); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; min-width: 0; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font: 500 .72rem var(--f-head); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl tr.done td { color: var(--muted); }
.tbl .t-title { font-weight: 500; min-width: 220px; }
.tbl .t-title small { display: block; color: var(--muted); font-weight: 400; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li:hover { background: var(--surface-2); }
.mini-list .ml-title { font-weight: 500; overflow-wrap: anywhere; }
.mini-list .ml-meta { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); min-width: 0; }
.filters input[type=search] { flex: 1 1 200px; }

.bar { height: 8px; border-radius: 4px; background: var(--idle-soft); overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------- detalhe da tarefa ---------- */
.task-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; display: grid; gap: 12px; }
.task-head .th-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.task-head h1 { font-size: 1.45rem; }
.flow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0; }
.flow .step { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.flow .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font: 600 .7rem var(--f-mono); background: var(--surface); }
.flow .step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow .step.now .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.flow .step.now { color: var(--ink); font-weight: 600; }
.flow .step.back .dot { border-color: var(--cycle); background: var(--cycle); color: #fff; }
.flow .step.back { color: var(--cycle); font-weight: 600; }
.flow .sep { width: 28px; height: 2px; background: var(--line); margin: 0 8px; flex: none; }
.flow .sep.done { background: var(--ok); }

.dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; font-size: .88rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 75ch; }
.section-label { font: 500 .72rem var(--f-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress .bar { flex: 1; }
.progress .bar > span { background: var(--brand); }

.cycle-box { border: 1px solid var(--cycle); background: var(--cycle-soft); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; }
.cycle-box .c-item { display: grid; gap: 2px; }
.cycle-box .c-item + .c-item { border-top: 1px dashed color-mix(in srgb, var(--cycle) 40%, transparent); padding-top: 10px; }
.cycle-box b { color: var(--cycle); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: .85rem; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.e-devolvida::before, .timeline li.e-reaberta::before { background: var(--cycle); }
.timeline li.e-aprovada::before { background: var(--ok); }
.timeline li.e-submetida::before { background: var(--warn); }
.timeline li.e-auditada::before { background: var(--info); }
.timeline .tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.timeline .tl-text { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.comments { display: grid; gap: 12px; }
.comment { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font: 600 .78rem var(--f-head); }
.avatar.ext { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.comment .c-meta { font-size: .8rem; color: var(--muted); }
.comment .c-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 8px; margin-top: 12px; }

.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; gap: 10px; align-items: center; font-size: .86rem; flex-wrap: wrap; }
.files a { overflow-wrap: anywhere; }

.scores { display: grid; gap: 6px; }
.scores .s-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 26px; gap: 10px; align-items: center; font-size: .85rem; }
.scores .bar > span { background: var(--info); }

/* ---------- formulários e modais ---------- */
.form { display: grid; gap: 12px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; align-items: start; }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field > span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.field > span em { color: var(--bad); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: .76rem; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: 3px; }
.rating { display: flex; gap: 4px; flex-wrap: wrap; }
.rating label { display: grid; place-items: center; width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font: 600 .85rem var(--f-mono); }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating input:checked + span { color: var(--accent-ink); }
.rating label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rating label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal-bg { position: fixed; inset: 0; background: rgba(8, 20, 30, .5); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--surface); border-radius: 8px; width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); min-height: 0; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal.wide { width: min(820px, 100%); }
.modal > header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal > .m-body { padding: 16px 18px; overflow-y: auto; }
.modal > footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal .x { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.err { background: var(--bad-soft); color: var(--bad); padding: 8px 12px; border-radius: 5px; font-size: .86rem; }
.note { background: var(--info-soft); color: var(--ink); padding: 10px 12px; border-radius: 5px; font-size: .86rem; border-left: 3px solid var(--info); }

.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 6px; z-index: 80; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- autenticação ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
.auth-art { background: var(--side); color: var(--side-ink); padding: clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-art h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 16ch; }
.auth-art p { max-width: 46ch; }
.auth-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 500 .78rem var(--f-mono); }
.auth-flow span { border: 1px solid rgba(255,255,255,.2); padding: 3px 8px; border-radius: 3px; color: #fff; }
.auth-flow span.r { border-color: #c896e6; color: #e3c7f3; }
.auth-flow i { opacity: .5; font-style: normal; }
.auth-box { padding: clamp(24px, 5vw, 56px) 16px; padding-inline: clamp(16px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 18px; background: var(--surface); }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { gap: 18px; } }

.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; cursor: pointer; text-align: left; }
.plan-card:hover { border-color: var(--muted); }
.plan-card .pc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.plan-card .bar > span { background: var(--ok); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .tc { font: .72rem var(--f-mono); color: var(--muted); margin-left: 4px; }

.matrix { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 3px; font-size: .74rem; max-width: 340px; }
.matrix div { padding: 6px; text-align: center; border-radius: 3px; }
.matrix .m-h { color: var(--muted); }
.matrix .m-c { font: 600 .9rem var(--f-mono); }
.mx-1 { background: var(--ok-soft); color: var(--ok); } .mx-2 { background: var(--warn-soft); color: var(--warn); } .mx-3 { background: var(--bad-soft); color: var(--bad); }

.mail-view { background: #eef1f4; border-radius: 6px; overflow: hidden; color: #14212b; }
.notif li.unread .ml-title::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- portal público ---------- */
.p-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--side); color: #fff; padding: 14px clamp(16px, 4vw, 48px); }
.p-head .brand { padding: 0; }
.p-nav { display: flex; gap: 18px; align-items: center; }
.p-nav a { color: var(--side-ink); text-decoration: none; }
.p-nav a:hover { color: #fff; }
.p-nav a.btn { color: var(--ink); }
.p-main { padding-block: 28px 48px; padding-inline: clamp(16px, 4vw, 48px); max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; }
.p-hero { display: grid; gap: 10px; max-width: 760px; }
.p-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.p-hero p { color: var(--muted); max-width: 62ch; margin: 0; }
.p-hero .auth-flow span { color: var(--ink); border-color: var(--line); }
.p-hero .auth-flow span.r { color: var(--cycle); border-color: var(--cycle); }
.p-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.p-plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; align-content: start; }
.p-plan.hi { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.p-plan ul { margin: 4px 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.p-price b { font: 600 2rem var(--f-head); font-variant-numeric: tabular-nums; }
.p-price span { color: var(--muted); margin-left: 4px; }
.p-foot { padding: 18px clamp(16px, 4vw, 48px); font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- dependências, bloqueios e cronograma ---------- */
.pill.blocked { background: var(--bad); color: #fff; }
.pill.blocked::before { background: #fff; }
.dep-open { color: var(--bad); font-weight: 600; }
.block-box { border: 1px solid var(--bad); background: var(--bad-soft); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
.block-why { grid-column: 1 / -1; font-size: .82rem; border-left: 3px solid var(--bad); padding-left: 8px; overflow-wrap: anywhere; }
.dep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dep-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .86rem; flex-wrap: wrap; }
.steps-list { margin: 0; padding: 14px 16px 14px 36px; display: grid; gap: 10px; }
.steps-list li > div { display: inline; }
.steps-list li { padding-left: 4px; }
.steps-list li .btn { margin-left: 10px; vertical-align: middle; }
.steps-list li.ok { color: var(--muted); }
.steps-list li.ok b { text-decoration: line-through; }
.quick-add { margin-bottom: 14px; border-color: var(--accent); }
.qa-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 150px) auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.qa-btns { display: flex; gap: 4px; align-items: center; }
@media (max-width: 860px) { .qa-row { grid-template-columns: 1fr; } }
.gantt { min-width: 760px; padding: 6px 16px 10px; }
.g-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.g-row:hover { background: var(--surface-2); }
.g-head { cursor: default; border-bottom: 0; }
.g-head:hover { background: none; }
.g-label { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-label small { display: block; color: var(--muted); font-size: .74rem; }
.g-track { position: relative; height: 22px; background: linear-gradient(to right, transparent calc(var(--today) - 1px), var(--accent) calc(var(--today) - 1px), var(--accent) calc(var(--today) + 1px), transparent calc(var(--today) + 1px)); }
.g-head .g-track { height: 18px; background: none; }
.g-month, .g-today-lbl { position: absolute; top: 0; font: 500 .7rem var(--f-mono); color: var(--muted); text-transform: uppercase; transform: translateX(-2px); }
.g-today-lbl { color: var(--accent); transform: translateX(-50%); }
.g-bar { position: absolute; top: 4px; height: 14px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--c) 28%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c); }
.g-bar > span { display: block; height: 100%; background: var(--c); }
.g-bar.is-blocked { background: repeating-linear-gradient(45deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 45%, var(--surface)) 4px 8px); }
.tbl td.ref { white-space: nowrap; }
.g-bar.no-end { border-right: 2px dashed var(--c); border-radius: 3px 0 0 3px; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
.imp-new { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 6px; }
.imp-new input, .imp-new select, [data-own], [name^="co_"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); width: 100%; }
.imp-new[hidden] { display: none; }
