/* Central Navbot — tema charcoal + lilás (escuro por padrão; o painel é pensado para acompanhamento contínuo). */
:root {
  --bg: #141418;
  --bg-2: #18181d;
  --surface: #1e1e24;
  --surface-2: #25252c;
  --surface-3: #2d2d35;
  --line: #2c2c34;
  --line-2: #393943;
  --text: #ededf2;
  --text-2: #c9c9d3;
  --muted: #9797a5;
  --faint: #6b6b78;
  --accent: #8b7cf6;
  --accent-2: #b4a8ff;
  --accent-soft: rgb(139 124 246 / 0.16);
  --blue: #5b9cf5;
  --orange: #f0a04b;
  --green: #4cc38a;
  --red: #ef6b73;
  --amber: #e8b44c;
  --pink: #d49cf2;
  --report: #c9a3f5;
  --radius: 16px;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side: 76px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #0d0b1a; padding: 6px 10px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { flex: none; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; }
.empty { color: var(--faint); font-size: 13px; padding: 6px 2px; }
.err { color: var(--red); min-height: 1.2em; margin-top: 8px; }
.pad { padding: 20px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.warn { color: var(--amber); }
.ok { color: var(--green); }
.link { background: none; border: 0; padding: 0; color: var(--accent-2); text-align: left; }
.link:hover { text-decoration: underline; }
.data { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------- sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 26px; z-index: 30; }
.logo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; letter-spacing: -.02em; background: #0f0f13; border: 1px solid var(--line-2); color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 10px; }
.side-nav button, .side-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; transition: background .15s, color .15s; }
.side-nav button:hover, .side-btn:hover { background: var(--surface-2); color: var(--text); }
.side-nav button.on { background: var(--accent-soft); color: var(--accent-2); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.me { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; color: var(--text); padding: 0; }
button.me:hover { border-color: var(--accent); }
.me-m { display: none; }
.me.big { width: 48px; height: 48px; font-size: 18px; background: var(--accent-soft); color: var(--accent-2); }
.prof-head { display: flex; gap: 14px; align-items: center; }
.pform { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.pform .btn-primary { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.field input { background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.field input:focus { border-color: var(--accent); outline: none; }
.form-msg { font-size: 13px; min-height: 1.2em; }
.form-msg.ok { color: var(--green); } .form-msg.err { color: var(--red); }
.ok-banner { background: rgb(76 195 138 / .12); border-color: rgb(76 195 138 / .35); color: var(--green); }
.login-card .alt { margin: 16px 0 0; }
.login-card .alt a { color: var(--accent-2); }
.live { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.live[data-state="live"] .dot { background: var(--green); box-shadow: 0 0 0 0 rgb(76 195 138 / .5); animation: pulse 2.2s infinite; }
.live[data-state="down"] .dot { background: var(--amber); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(76 195 138 / .5); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- shell / header ---------- */
.shell { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 22px 32px 14px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 12.5px; }
.crumbs .sep { color: var(--faint); }
.crumbs span:last-child { color: var(--text-2); font-weight: 600; }
.title-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.title-row h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.project-pick select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b4a8ff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 30px 6px 10px; font-size: 13px; color: var(--text-2); max-width: 260px; }
.h-right { display: flex; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 44px; width: min(340px, 34vw); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); }
.search input::placeholder { color: var(--faint); }
.search-ico { display: grid; }
.filters { position: relative; }
.filters summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--muted); cursor: pointer; position: relative; }
.filters summary::-webkit-details-marker { display: none; }
.filters[open] summary, .filters summary:hover { color: var(--text); border-color: var(--line-2); }
.filter-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #0d0b1a; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.filters-pop { position: absolute; right: 0; top: 52px; width: 260px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
.filters-pop fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.filters-pop legend { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.filters-pop label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); cursor: pointer; }
.filters-pop input { accent-color: var(--accent); }
.avatars { display: flex; }
.avatars .avatar { margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
.clock { font-family: var(--mono); color: var(--muted); font-size: 13px; min-width: 44px; }

/* avatar: monograma do executor, ponto = conexão real */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; color: #fff; flex: none; box-shadow: 0 0 0 2px var(--bg); position: relative; }
.avatar.sz-22 { width: 22px; height: 22px; font-size: 9px; } .avatar.sz-24 { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.sz-28 { width: 28px; height: 28px; font-size: 11px; } .avatar.sz-30 { width: 30px; height: 30px; font-size: 11px; }
.avatar-claude { background: linear-gradient(135deg, #c9784a, #8a4b2e); }
.avatar-codex { background: linear-gradient(135deg, #4d7ad8, #2f4d97); }
.avatar-none { background: var(--surface-3); color: var(--faint); }
.avatar-more { background: var(--surface-3); color: var(--text-2); }
.avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--bg); background: var(--faint); }
.avatar.ring-online::after { background: var(--green); }
.avatar.ring-offline::after, .avatar.ring-never::after { background: var(--red); }
.avatar.ring-manual::after { background: var(--amber); }
.avatar-none::after, .avatar-more::after { display: none; }

/* ---------- abas + executores ---------- */
.subbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 32px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); padding: 14px 14px 13px; border-bottom: 2px solid transparent; font-weight: 500; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.exec-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.exec-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 12px; max-width: 360px; }
.exec-pill b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exec-pill .exec-state { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.c-online .dot { background: var(--green); } .c-offline .dot, .c-never .dot { background: var(--red); } .c-manual .dot { background: var(--amber); }
.c-online { color: var(--green); } .c-offline, .c-never { color: var(--red); } .c-manual { color: var(--amber); }
.exec-pill.c-online, .exec-pill.c-offline, .exec-pill.c-never, .exec-pill.c-manual { color: var(--text); }
.exec-empty { color: var(--muted); font-size: 12.5px; }
.exec-pill.more { cursor: pointer; color: var(--text); }
.exec-pill.more:hover { border-color: var(--accent); }
.banner { margin: 12px 32px 0; padding: 10px 14px; border-radius: 12px; background: rgb(232 180 76 / .12); border: 1px solid rgb(232 180 76 / .35); color: var(--amber); font-size: 13px; }

main { padding: 22px 32px 32px; flex: 1; outline: none; min-width: 0; }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; align-items: start; }
.col { min-width: 0; scroll-snap-align: start; position: relative; }
.col + .col::before { content: ""; position: absolute; left: -9.5px; top: 6px; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--line-2) 8%, var(--line-2) 92%, transparent); opacity: .7; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col-head h2 { font-size: 15px; font-weight: 600; }
.ccount { color: var(--muted); font-weight: 500; font-size: 13px; }
.cdot { width: 10px; height: 10px; border-radius: 3px; background: var(--faint); flex: none; }
.col-authorization .cdot { background: var(--amber); } .col-queue .cdot { background: var(--blue); } .col-blocked .cdot { background: var(--red); }
.col-running .cdot { background: var(--orange); } .col-execution_done .cdot { background: var(--accent); } .col-in_review .cdot { background: var(--pink); }
.col-ready_to_deploy .cdot { background: #5cc6d0; } .col-deploy_confirmed .cdot { background: #7fd08f; } .col-verified .cdot { background: var(--green); } .col-failed .cdot { background: var(--faint); }
.col-hint { color: var(--faint); font-size: 12px; padding: 2px 4px 12px; }
.col-body { display: flex; flex-direction: column; gap: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 12px; min-height: 120px; }
.col-body > .empty { text-align: center; padding: 26px 0; }

.card { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card.st-running { box-shadow: inset 3px 0 0 var(--orange); }
.card.st-blocked, .card.st-failed { box-shadow: inset 3px 0 0 var(--red); }
.card.st-pending_authorization { box-shadow: inset 3px 0 0 var(--amber); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; line-height: 1; padding: 5px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag-project[data-hue="0"] { background: rgb(139 124 246 / .18); color: #c4bbff; }
.tag-project[data-hue="1"] { background: rgb(91 156 245 / .16); color: #9ec4ff; }
.tag-project[data-hue="2"] { background: rgb(76 195 138 / .15); color: #8fe0b7; }
.tag-project[data-hue="3"] { background: rgb(240 160 75 / .15); color: #f7c48c; }
.tag-project[data-hue="4"] { background: rgb(212 156 242 / .15); color: #e3bdf7; }
.tag-project[data-hue="5"] { background: rgb(92 198 208 / .15); color: #9ae0e6; }
.tag-report { background: rgb(201 163 245 / .10); color: var(--report); box-shadow: inset 0 0 0 1px rgb(201 163 245 / .25); }
.tag-prio.p1 { background: rgb(232 180 76 / .14); color: #f1cd82; }
.tag-prio.p2, .tag-prio.p3 { background: rgb(239 107 115 / .15); color: #f5a0a6; }
.tag-low { color: var(--muted); }
.tag-warn { background: rgb(232 180 76 / .14); color: #f1cd82; }
.when { color: var(--faint); font-size: 12px; white-space: nowrap; }
.card-title { display: flex; gap: 7px; align-items: flex-start; font-weight: 650; font-size: 15px; line-height: 1.35; color: var(--text); }
.card-title .ti { margin-top: 2px; }
.ti-run { color: var(--orange); } .ti-block { color: var(--red); }
.cid { color: var(--faint); font-weight: 500; font-family: var(--mono); font-size: 12.5px; }
.card-text { color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-text.is-reason { color: #f2a3a8; }
.card-text.is-wait { color: #eac98a; }
.ti-wait { color: var(--amber); }
.stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.stages span { height: 4px; border-radius: 4px; background: var(--surface-3); }
.stages span.done { background: rgb(139 124 246 / .55); }
.stages span.cur { background: var(--accent); }
.queue-pos { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.presence { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.presence .sdot { background: var(--faint); border-radius: 50%; }
.presence.conn-online .sdot { background: var(--green); } .presence.conn-offline .sdot, .presence.conn-never .sdot { background: var(--red); }
.presence.conn-manual .sdot { background: var(--amber); }
.pact.act-coding, .pact.act-running { color: #f7c48c; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model .eff { color: var(--green); } .model .eff.warn { color: var(--amber); }
.metrics { display: flex; gap: 12px; align-items: center; color: var(--muted); flex: none; }
.metric { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.metric b { font-weight: 600; color: var(--text-2); }
.m-play { color: var(--orange); } .m-pause { color: var(--red); } .m-doc { color: var(--report); }
.m-play b, .m-pause b, .m-doc b { color: inherit; }

/* ---------- lista / fila ---------- */
.policy { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.policy b { color: var(--text-2); }
.queues { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-bottom: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--text-2); }
.panel-head h2 { font-size: 15px; font-weight: 600; color: var(--text); }
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.queue li { display: flex; gap: 12px; align-items: stretch; }
.qpos { flex: none; width: 40px; display: grid; place-items: center; border-radius: 12px; font-family: var(--mono); font-weight: 700; font-size: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.qpos.ready { color: var(--green); } .qpos.wait { color: var(--amber); }
.qbody { flex: 1; min-width: 0; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.qbody:hover { border-color: var(--line-2); }
.qtitle { font-weight: 600; } .qmeta { font-size: 12px; color: var(--muted); } .qstate { font-size: 12px; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 56px minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: center; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 6px; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); border-radius: 10px; }
.r-id { font-family: var(--mono); color: var(--faint); font-size: 12.5px; }
.r-title { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.r-title small { font-weight: 400; color: var(--muted); font-size: 12px; }
.r-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.sdot { width: 8px; height: 8px; border-radius: 3px; background: var(--faint); flex: none; }
.st-pending_authorization .sdot { background: var(--amber); } .st-queued .sdot { background: var(--blue); } .st-blocked .sdot, .st-failed .sdot { background: var(--red); }
.st-running .sdot { background: var(--orange); } .st-execution_done .sdot { background: var(--accent); } .st-in_review .sdot { background: var(--pink); }
.st-ready_to_deploy .sdot { background: #5cc6d0; } .st-deploy_confirmed .sdot { background: #7fd08f; } .st-verified .sdot { background: var(--green); }
.r-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.r-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-metrics { display: flex; gap: 12px; justify-content: flex-end; }

/* ---------- resumo ---------- */
.sum-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.date-pick { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.date-pick input { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; color-scheme: dark; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.kpi-ico { grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.kpi-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-l { color: var(--muted); font-size: 12.5px; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.sum-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.sum-list .tag { margin-left: 6px; }

/* ---------- estado vazio ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 60px 20px; color: var(--muted); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: 20px; }
.empty-state b { color: var(--text); font-size: 15px; }

/* ---------- painel de detalhes ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgb(6 6 10 / .6); backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; box-shadow: -20px 0 50px rgb(0 0 0 / .45); animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-bar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 12px 16px; background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.drawer-bar-title { text-align: center; font-weight: 600; }
.decisions-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.decisions-btn:hover { border-color: var(--accent); color: var(--text); }
.decisions-btn.has { border-color: var(--warn, #e8b44c); color: var(--text); }
.dec-count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--warn, #e8b44c); color: #1a1405; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.dec-list { list-style: none; margin: 0; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.dec-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dec-item.waiting { border-style: dashed; }
.dec-kind { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--warn, #e8b44c); }
.dec-title { font-weight: 600; }
.dec-meta, .dec-effect { font-size: 12.5px; color: var(--muted); }
.dec-reason { font-size: 13px; color: var(--text-2); }
.dec-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.btn.approve { background: var(--ok, #4cc38a); color: #06140d; border-color: transparent; }
.btn.wait { background: transparent; }
@media (max-width: 760px) and (pointer: coarse) { .dec-label { display: none; } .decisions-btn { padding: 0 10px; } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.only-m { display: none; }
.d-body { padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.d-body h2 { font-size: 21px; font-weight: 700; outline: none; }
.callout { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.callout .ico { margin-top: 2px; }
.callout.bad { background: rgb(239 107 115 / .1); color: #f5a0a6; border: 1px solid rgb(239 107 115 / .25); }
.callout.wait { background: rgb(232 180 76 / .09); color: #eac98a; border: 1px solid rgb(232 180 76 / .25); }
.callout.report { background: rgb(201 163 245 / .08); color: var(--report); border: 1px solid rgb(201 163 245 / .2); }
.props { margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px; }
.prop { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.prop:first-child { border-top: 0; }
.prop dt { color: var(--muted); font-size: 13px; }
.prop dd { margin: 0; font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.times { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.times span { display: inline-flex; align-items: center; gap: 4px; }
.d-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.desc { white-space: pre-wrap; color: var(--text-2); }
.pipeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pipeline li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; color: var(--faint); font-size: 13px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.pipeline li.done { color: var(--text-2); } .pipeline li.done .pdot { background: var(--accent); border-color: var(--accent); }
.pipeline li.cur { color: var(--text); background: var(--accent-soft); font-weight: 600; } .pipeline li.cur .pdot { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgb(139 124 246 / .25); }
.evid { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.evid li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; }
.ekind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.k-test, .k-audit { background: rgb(76 195 138 / .15); color: #8fe0b7; }
.etext { min-width: 0; overflow-wrap: anywhere; }
.evid small { color: var(--faint); }
.mini { margin: 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
.mini li.ok { color: var(--green); } .mini li.warn { color: var(--amber); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.timeline li { position: relative; font-size: 13px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line-2); }
.ev-test-result::before, .ev-audit-result::before { border-color: var(--green) !important; }
.ev-error::before { border-color: var(--red) !important; }
.ev-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ev-head b { color: var(--text); font-weight: 600; }
.ev-head span { font-size: 12px; color: var(--muted); }
.ro { display: flex; align-items: center; gap: 6px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 32px 20px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }
.bottom-nav { display: none; }

/* ---------- login / primeiro acesso ---------- */
.login-page { display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, rgb(139 124 246 / .18), transparent 60%), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; box-shadow: var(--shadow); text-align: center; }
.login-card .logo { margin: 0 auto; }
.login-card h1 { font-size: 22px; margin-top: 14px; }
.login-card .sub { color: var(--muted); margin: 6px 0 22px; font-size: 13.5px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-card input { background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.login-card input:focus { border-color: var(--accent); outline: none; }
.btn-primary { background: var(--accent); color: #0d0b1a; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 16px; }
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.login-card #status a { color: var(--accent-2); }

/* ---------- mobile ---------- */
.m-list { display: flex; flex-direction: column; gap: 14px; }
.status-tabs { display: flex; gap: 18px; overflow-x: auto; margin: -4px -16px 6px; padding: 0 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.stab { flex: none; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 0 11px; color: var(--muted); font-size: 13.5px; }
.stab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.col-hint.m { padding: 10px 2px 12px; }

@media (max-width: 1100px) {
  .search { width: 220px; }
  .clock { display: none; }
}
@media (max-width: 760px) and (pointer: coarse) {
  .sidebar { display: none; }
  .shell { margin-left: 0; padding-bottom: 76px; }
  .header { padding: 14px 16px 8px; align-items: stretch; flex-direction: column; gap: 12px; }
  .crumbs { display: none; }
  .title-row { margin-top: 0; justify-content: space-between; }
  .title-row h1 { font-size: 19px; }
  .project-pick select { max-width: 150px; }
  .h-right { gap: 8px; }
  .search { flex: 1; width: auto; height: 42px; }
  .filters summary { width: 42px; height: 42px; }
  .avatars { display: none; }
  .me-m { display: grid; flex: none; width: 42px; height: 42px; }
  .subbar { padding: 0 16px; border-bottom: 0; }
  .subbar .tabs { display: none; }
  .exec-strip { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding: 4px 0 8px; }
  .exec-strip::-webkit-scrollbar { display: none; }
  .exec-pill { flex: none; max-width: 80vw; }
  .banner { margin: 8px 16px 0; }
  main { padding: 8px 16px 20px; }
  .card { padding: 14px; }
  .queues, .sum-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 44px 1fr auto; grid-template-areas: "id title metrics" "id status who"; row-gap: 4px; }
  .r-id { grid-area: id; } .r-title { grid-area: title; } .r-status { grid-area: status; } .r-who { grid-area: who; justify-content: flex-end; } .r-metrics { grid-area: metrics; }
  .r-who > span:last-child { display: none; }
  .foot { display: none; }
  .drawer-panel { width: 100%; border-left: 0; }
  .only-m { display: block; } .only-d { display: none; }
  .d-body { padding: 16px 16px 40px; }
  .prop { grid-template-columns: 96px 1fr; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; padding: 6px 0; border-radius: 12px; position: relative; }
  .bottom-nav button.on { color: var(--accent-2); }
  .bottom-nav button.on::after { content: ""; position: absolute; bottom: -6px; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 12px; }
  .kpi-v { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Resumo da equipe (diálogo, somente leitura) ---------- */
.ts-open { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ts-dialog { position: fixed; inset: 0; z-index: 70; }
.ts-backdrop { position: absolute; inset: 0; background: rgb(6 6 10 / .6); backdrop-filter: blur(2px); }
.ts-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; box-shadow: -20px 0 50px rgb(0 0 0 / .45); padding: 0 20px 24px; animation: slidein .2s ease-out; }
.ts-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 0 12px; background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ts-titles h2 { font-size: 18px; outline: none; }
.ts-nav { display: flex; align-items: center; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.ts-date { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; color-scheme: dark; }
.ts-nav .icon-btn:disabled, .ts-today:disabled { opacity: .4; cursor: default; }
.ts-body { display: flex; flex-direction: column; gap: 14px; }
.ts-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ts-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.ts-kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ts-kpi span { color: var(--muted); font-size: 12px; }
.ts-agent { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ts-agent-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ts-agent-head h3 { font-size: 15px; }
.ts-agent-head .muted { font-size: 12.5px; }
.ts-agent .ptag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.ts-agent .ptag .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ts-agent .ptag.conn-online .sdot { background: var(--green); }
.ts-agent .ptag.conn-offline .sdot, .ts-agent .ptag.conn-never .sdot { background: var(--red); }
.ts-agent .ptag.conn-manual .sdot { background: var(--amber); }
.ts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ts-sec h4 { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.ts-sec ul { margin: 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.ts-sec .tag { margin-left: 6px; }
.ts-none { color: var(--faint); font-size: 12.5px; }
.ts-task { color: var(--text); }
.ts-times { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 8px; }
.ts-times span { display: inline-flex; align-items: center; gap: 4px; }
.ts-abs { font-size: 12px; color: var(--muted); }
.ts-idle { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 18px; padding: 12px 16px; }
.ts-idle h3 { font-size: 13.5px; margin-bottom: 6px; color: var(--text-2); }
.ts-idle ul { margin: 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.ts-foot { margin-top: 16px; }
.ts-body .warn { color: var(--amber); }
@media (max-width: 760px) and (pointer: coarse) {
  .ts-panel { width: 100%; border-left: 0; padding: 0 14px 20px; }
  .ts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-grid { grid-template-columns: 1fr; }
  .ts-open { margin-left: 0; }
}

/* produtividade do dia */
.pr-verdict { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.pr-verdict b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pr-verdict span { font-size: 14px; color: var(--text-2); }
.pr-verdict small { color: var(--muted); font-size: 12px; }
.pr-verdict.st-above span, .pr-verdict.st-on span, .pr-verdict.st-checkpoint_above span, .pr-verdict.st-checkpoint_on span { color: var(--green); }
.pr-verdict.st-below span, .pr-verdict.st-checkpoint_below span { color: var(--amber); }
.pr-sec p { font-size: 13px; margin: 0 0 4px; color: var(--text-2); }
.pr-sec .warn { color: var(--amber); }

/* fluxo de 8 etapas: colunas, WIP, marcadores */
.col-solicitacoes .cdot { background: var(--amber); } .col-triagem .cdot { background: #c9a44a; } .col-fila .cdot { background: var(--blue); }
.col-execucao .cdot { background: var(--orange); } .col-revisao .cdot { background: var(--pink); } .col-aguardando_victor .cdot { background: var(--accent); }
.col-pronto_deploy .cdot { background: #5cc6d0; } .col-publicadas .cdot { background: var(--green); } .col-encerradas .cdot { background: var(--faint); }
.col-head .wip { margin-left: auto; font: 600 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; }
.col-head .wip.full { color: var(--amber); border-color: rgb(232 180 76 / .5); }
.tag-block { background: rgb(239 107 115 / .14); color: var(--red); } .tag-rework { background: rgb(232 180 76 / .14); color: var(--amber); }
.tag-q { background: rgb(91 156 245 / .14); color: var(--blue); }
.card-roles { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 2px; }
.rchip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip.s { color: var(--orange); } .rchip.k { font-family: var(--mono); } .rchip.r { color: var(--pink); }
.crit li { margin-bottom: 3px; }
.vsec { border: 1px solid rgb(139 124 246 / .45); border-radius: 14px; padding: 12px; background: rgb(139 124 246 / .06); }
.vgate .row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.linklike { background: none; border: 0; padding: 0; text-align: left; color: var(--text); cursor: pointer; font: inherit; }
.linklike:hover { color: var(--accent); text-decoration: underline; }
.dec-list.flush { padding: 0; }
/* PC com janela estreita (mouse): continua no layout de DESKTOP, compacto — nunca cai na visão de celular por largura */
@media (max-width: 760px) and (pointer: fine) {
  :root { --side: 60px; }
  .side-nav button, .side-btn { width: 40px; height: 40px; }
  .header { padding: 14px 14px 10px; gap: 10px; }
  .h-left, .h-right { min-width: 0; max-width: 100%; }
  .h-right { flex-wrap: wrap; gap: 8px; width: 100%; }
  .search { flex: 1 1 160px; width: auto; min-width: 0; }
  .title-row { flex-wrap: wrap; }
  .title-row h1 { font-size: 20px; }
  .project-pick select { max-width: 160px; }
  .dec-label, .clock, .avatars { display: none; }
  main { padding: 14px 14px 24px; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs button { padding: 12px 10px 11px; white-space: nowrap; }
  .exec-strip { max-width: 100%; min-width: 0; }
  .exec-pill { max-width: 100%; min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .exec-pill b, .exec-pill .exec-state { min-width: 0; }
  .board { grid-auto-columns: minmax(260px, 86%); gap: 12px; }
}
