/* ============================================================
   Akita Hōshin · Design System — Manual de Marca Akita Mkt v1.0
   Paleta: Void #0A0C10 · Carbon #0F1218 · Onyx #141820 · Slate #1E2530
           Steel #6B7A8D · Electric Cyan #00D4FF · Deep Cyan #00A8CC
           Frost #F0F4F8 · Spark #FF6B35
   Base: Material Design 3 (superfícies tonais, grid 8px, estados)
   ============================================================ */
:root {
  --void: #0A0C10; --carbon: #0F1218; --onyx: #141820; --slate: #1E2530;
  --steel: #6B7A8D; --cyan: #00D4FF; --dcyan: #00A8CC; --frost: #F0F4F8; --spark: #FF6B35;
  --ok: var(--cyan); --warn: #E8B84B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, "Helvetica Neue", Arial, sans-serif; background: var(--void); color: var(--frost); font-size: 14px; letter-spacing: .01em; }
h1,h2,h3,h4 { font-weight: 700; color: var(--frost); letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
input,select,textarea { font-family: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--slate); border-radius: 8px; background: var(--carbon); color: var(--frost); }
input:focus,select:focus,textarea:focus { outline: 2px solid var(--dcyan); border-color: transparent; }
input::placeholder { color: var(--steel); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== estrutura ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; min-width: 232px; background: var(--carbon); border-right: 1px solid var(--slate); padding: 16px 0 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; padding: 4px 16px 2px; letter-spacing: -.02em; }
.sidebar .logo span { color: var(--cyan); font-weight: 700; }
.sidebar .logo svg { flex: 0 0 30px; }
.sidebar .slogan { font-size: 10.5px; color: var(--steel); padding: 2px 16px 14px; border-bottom: 1px solid var(--slate); }
.sidebar .secao { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--steel); padding: 16px 16px 6px; }
.sidebar button.nav { display: block; width: calc(100% - 12px); margin: 1px 6px; text-align: left; background: transparent; border: 0; color: var(--frost); padding: 8px 12px; font-size: 13.5px; border-radius: 8px; transition: background .12s; }
.sidebar button.nav:hover { background: var(--onyx); }
.sidebar button.nav.ativo { background: rgba(0,212,255,.10); color: var(--cyan); font-weight: 600; }
.sidebar-baixo { margin-top: auto; }
.sidebar .fim { padding: 12px 16px 14px; border-top: 1px solid var(--slate); font-size: 12px; color: var(--steel); }
.sidebar .fim b { display: block; font-size: 13px; color: var(--frost); }
.sidebar .fim button { margin-top: 8px; background: transparent; border: 1px solid var(--slate); color: var(--steel); padding: 4px 12px; border-radius: 8px; font-size: 12px; }
.sidebar .fim button:hover { border-color: var(--steel); color: var(--frost); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conteudo { padding: 20px 28px; flex: 1; }
.barra-hoje { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--steel); padding-bottom: 12px; border-bottom: 1px solid var(--slate); margin-bottom: 16px; text-transform: capitalize; }
.barra-hoje b { color: var(--frost); }
.rodape-app { text-align: center; color: var(--steel); font-size: 11.5px; padding: 20px 0 14px; border-top: 1px solid var(--slate); }

/* ===== login ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--void);
  background-image: radial-gradient(circle at 80% 10%, rgba(0,212,255,.08), transparent 45%); }
.login-card { background: var(--onyx); border: 1px solid var(--slate); border-radius: 16px; padding: 40px 42px; width: 400px; }
.login-card h1 { font-size: 26px; margin: 14px 0 2px; }
.login-card h1 span { color: var(--cyan); }
.login-card .sub { color: var(--steel); font-size: 12.5px; margin-bottom: 26px; }
.login-card label { display: block; font-size: 12px; color: var(--steel); margin: 14px 0 5px; }
.login-card input { width: 100%; }
.login-card button.entrar { width: 100%; margin-top: 24px; background: var(--cyan); color: var(--void); border: 0; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.login-card button.entrar:hover { background: var(--dcyan); }
.login-card .erro { color: var(--spark); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ===== botões (MD3) ===== */
.btn { border: 0; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; transition: filter .12s; }
.btn:hover { filter: brightness(1.15); }
.btn-verde, .btn-azul { background: var(--cyan); color: var(--void); }
.btn-claro { background: transparent; border: 1px solid var(--slate); color: var(--frost); }
.btn-claro:hover { border-color: var(--steel); }
.btn-grena { background: var(--spark); color: var(--void); }
.btn-mini { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.c-done { background: rgba(0,212,255,.14); color: var(--cyan); }
.c-doing { background: rgba(0,168,204,.16); color: #55C4DD; }
.c-todo { background: var(--slate); color: var(--steel); }
.c-late { background: rgba(255,107,53,.15); color: var(--spark); }
.c-imp { background: rgba(255,107,53,.15); color: var(--spark); border: 1px solid var(--spark); }
.c-risco { background: rgba(232,184,75,.14); color: var(--warn); }

/* ===== tooltip de legenda (ⓘ) ===== */
.itip { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--steel); color: var(--steel); background: transparent; font-size: 10px; font-weight: 700;
  vertical-align: 2px; margin-left: 5px; line-height: 1; }
.itip:hover { border-color: var(--cyan); color: var(--cyan); }

/* ===== cabeçalho do projeto ===== */
.proj-cab { border-bottom: 1px solid var(--slate); padding-bottom: 0; }
.proj-cab .titulo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proj-cab h2 { font-size: 22px; }
.proj-cab .meta { color: var(--steel); font-size: 13px; margin: 6px 0 2px; }
.proj-cab .meta b { color: var(--frost); }
.proj-cab .dias { font-size: 12px; color: var(--steel); margin: 8px 0 6px; }
.barra-seg { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--slate); margin: 4px 0 0; }
.barra-seg .sg-done { background: var(--cyan); }
.barra-seg .sg-doing { background: var(--dcyan); }
.kpi-strip { display: flex; gap: 40px; padding: 18px 4px 14px; flex-wrap: wrap; }
.kpi-g { display: flex; gap: 10px; align-items: baseline; }
.kpi-g .num { font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.kpi-g .rot { font-size: 12px; color: var(--steel); max-width: 96px; line-height: 1.25; }
.n-grena { color: var(--spark); } .n-azul { color: var(--frost); } .n-verde { color: var(--cyan); }
.n-amarelo { color: var(--warn); } .n-claro { color: var(--steel); }
.kpi-g.destaque { border-bottom: 3px solid var(--cyan); padding-bottom: 10px; }
.barra-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* abas */
.abas { display: flex; gap: 2px; margin: 4px 0 16px; border-bottom: 1px solid var(--slate); }
.abas button { background: transparent; border: 0; padding: 10px 16px; font-size: 13.5px; color: var(--steel); border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; }
.abas button:hover { background: var(--onyx); color: var(--frost); }
.abas button.ativo { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 600; }

/* ===== tabelas ===== */
table.acomp, table.simples { width: 100%; border-collapse: collapse; }
table.acomp th, table.simples th { text-align: left; padding: 8px 10px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); border-bottom: 1px solid var(--slate); }
table.acomp td, table.simples td { padding: 8px 10px; border-bottom: 1px solid var(--onyx); font-size: 13px; vertical-align: middle; }
tr.linha-fase td { background: var(--onyx); font-weight: 700; color: var(--frost); font-size: 13px; padding: 10px; border-top: 1px solid var(--slate); }
tr.linha-etapa td { font-weight: 600; color: #9DB2C4; font-size: 12.5px; }
tr.linha-ativ td:first-child { padding-left: 24px; }
tr.linha-ativ:hover td { background: rgba(0,212,255,.04); }
tr.linha-ativ .nome-ativ { color: var(--frost); cursor: pointer; border-bottom: 1px dashed var(--slate); }
tr.linha-ativ .nome-ativ:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.marcador { color: var(--cyan); margin-right: 6px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--slate); color: var(--cyan); font-size: 10px; font-weight: 700; margin-right: 7px; vertical-align: middle; }
.acao-add { color: var(--dcyan); background: none; border: 0; font-size: 12px; padding: 2px 6px; }
.acao-add:hover { color: var(--cyan); text-decoration: underline; }
td.num { white-space: nowrap; font-size: 12px; color: #C6D2DD; }
.prog { background: var(--slate); border-radius: 4px; height: 6px; overflow: hidden; min-width: 56px; display: inline-block; width: 72px; vertical-align: middle; margin-right: 6px; }
.prog > div { height: 100%; background: var(--cyan); border-radius: 4px; }
.prog.atrasado > div { background: var(--spark); }
.acoes-linha { white-space: nowrap; }
.mini-acao { background: transparent; border: 1px solid var(--slate); border-radius: 6px; padding: 2px 6px; font-size: 11px; color: var(--steel); }
.mini-acao:hover { border-color: var(--cyan); color: var(--cyan); }
.mini-acao.on { background: rgba(255,107,53,.15); border-color: var(--spark); color: var(--spark); }

/* barra de ferramentas do acompanhamento (agora no topo) */
.filtros-acomp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--steel); }
.filtros-acomp .sep { flex: 0 0 1px; height: 20px; background: var(--slate); margin: 0 4px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--frost); }
.check-inline input { width: auto; accent-color: var(--cyan); }

/* ===== cards / superfícies ===== */
.card { background: var(--onyx); border: 1px solid var(--slate); border-radius: 14px; padding: 18px; }
.grade-projetos { display: grid; grid-template-columns: repeat(auto-fill,minmax(330px,1fr)); gap: 14px; margin-top: 14px; }
.proj-card { cursor: pointer; transition: border-color .15s, transform .15s; }
.proj-card:hover { border-color: var(--dcyan); transform: translateY(-2px); }
.proj-card h3 { font-size: 15px; margin-bottom: 4px; }
.proj-card .empresa { color: var(--steel); font-size: 12px; margin-bottom: 10px; }
.proj-card .linha-prog { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.proj-card .linha-prog .prog { flex: 1; width: auto; }
.proj-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--onyx); border: 1px solid var(--slate); border-radius: 14px; padding: 14px 16px; }
.kpi.alerta { border-color: rgba(255,107,53,.5); }
.kpi .num { font-size: 28px; font-weight: 700; color: var(--cyan); letter-spacing: -.02em; }
.kpi.alerta .num { color: var(--spark); }
.kpi .rot { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }

/* ===== gantt ===== */
.gantt-wrap { border: 1px solid var(--slate); border-radius: 14px; padding: 14px; overflow-x: auto; background: var(--onyx); }
.gantt-grid { position: relative; min-width: 820px; }
.gantt-mes { display: flex; border-bottom: 1px solid var(--slate); margin-left: 320px; }
.gantt-mes div { font-size: 11px; color: var(--steel); padding: 4px 0; border-left: 1px solid var(--slate); text-align: center; text-transform: capitalize; }
.gantt-linha { display: flex; align-items: center; height: 30px; border-bottom: 1px solid var(--carbon); }
.gantt-rotulo { width: 320px; min-width: 320px; font-size: 12px; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-rotulo.n-fase { font-weight: 700; color: var(--frost); }
.gantt-rotulo.n-etapa { padding-left: 16px; font-weight: 600; color: #9DB2C4; }
.gantt-rotulo.n-ativ { padding-left: 32px; color: #C6D2DD; }
.gantt-area { position: relative; flex: 1; height: 100%; }
.gantt-barra { position: absolute; top: 9px; height: 12px; border-radius: 6px; }
.gb-fase { background: var(--slate); border: 1px solid var(--steel); }
.gb-etapa { background: var(--dcyan); opacity: .55; }
.gb-ativ { background: var(--cyan); }
.gb-ativ.atrasada { background: var(--spark); }
.gantt-hoje { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--spark); z-index: 5; }
.gantt-hoje::after { content: "hoje"; position: absolute; top: -2px; left: 4px; font-size: 10px; color: var(--spark); }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--steel); margin-top: 10px; }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ===== kanban ===== */
.kanban { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; align-items: start; }
.kb-col { background: var(--carbon); border: 1px solid var(--slate); border-radius: 14px; padding: 10px; min-height: 300px; }
.kb-col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 4px 6px 10px; color: var(--steel); }
.kb-col.drag-over { outline: 2px dashed var(--cyan); }
.kb-card { background: var(--onyx); border: 1px solid var(--slate); border-left: 3px solid var(--cyan); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; }
.kb-card:hover { border-color: var(--dcyan); }
.kb-card.atrasada { border-left-color: var(--spark); }
.kb-card .fase { font-size: 10px; color: var(--steel); text-transform: uppercase; letter-spacing: .06em; }
.kb-card .nome { font-size: 13px; font-weight: 600; margin: 3px 0 6px; }
.kb-card .rodape { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--steel); }

/* ===== histórico / listas ===== */
.hist-item { display: flex; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--onyx); font-size: 13px; align-items: baseline; }
.hist-item .quando { color: var(--steel); font-size: 11.5px; white-space: nowrap; min-width: 120px; }
.linha-lista { padding: 8px 0; border-bottom: 1px solid var(--onyx); font-size: 13px; }

/* ===== insights ===== */
.grade-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ins-kpis { display: flex; gap: 26px; flex-wrap: wrap; margin: 10px 0 14px; }
.ins-kpis > div { display: flex; flex-direction: column; }
.ins-kpis b { font-size: 24px; font-weight: 700; color: var(--frost); }
.ins-kpis span { font-size: 11px; color: var(--steel); max-width: 110px; }
.narrativa-ia { margin-top: 12px; border-left: 3px solid var(--cyan); font-size: 13.5px; line-height: 1.6; }

/* ===== painel baselines ===== */
.proj-corpo { display: flex; gap: 14px; align-items: flex-start; }
.painel-baselines { width: 224px; min-width: 224px; background: var(--carbon); border: 1px solid var(--slate); border-radius: 14px; padding: 12px; }
.painel-baselines h4 { font-size: 12px; margin-bottom: 10px; }
.bl-item { background: var(--onyx); border: 1px solid var(--slate); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; }
.bl-item.ativa { border-color: var(--cyan); }
.bl-meta { color: var(--steel); font-size: 11px; margin: 3px 0; }
.grade-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tutorial { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tutorial .card p, .historia p { font-size: 13.5px; line-height: 1.65; color: #C6D2DD; }
.tutorial .card h3, .historia h3 { margin-bottom: 8px; font-size: 15px; }
.historia .kanji { font-size: 64px; color: var(--cyan); font-weight: 700; line-height: 1; }
.seigaiha { height: 8px; background: radial-gradient(circle at 6px -2px, transparent 5px, rgba(0,212,255,.25) 5.5px, transparent 6.5px) repeat-x; background-size: 12px 8px; border: 0; margin: 14px 0; }

/* ===== modal ===== */
.modal-fundo { position: fixed; inset: 0; background: rgba(10,12,16,.72); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(2px); }
.modal { background: var(--onyx); border: 1px solid var(--slate); border-radius: 16px; padding: 24px 26px; width: 540px; max-width: 94vw; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; }
.modal .campo { margin-bottom: 12px; }
.modal label { display: block; font-size: 12px; color: var(--steel); margin-bottom: 4px; }
.modal input,.modal select,.modal textarea { width: 100%; }
.modal .linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .acoes { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

.barra-topo-view { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.barra-topo-view h2 { margin-right: auto; font-size: 20px; }
.aviso-leitura { background: rgba(232,184,75,.1); color: var(--warn); border: 1px solid rgba(232,184,75,.4); padding: 8px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 12px; }
@media (max-width: 1100px) { .grade-insights, .grade-2col, .tutorial { grid-template-columns: 1fr; } .proj-corpo { flex-direction: column; } .painel-baselines { width: 100%; } .kanban { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ===== impressão (fundo claro) ===== */
@media print {
  :root { --void:#fff; --carbon:#fff; --onyx:#fff; --slate:#bbb; --steel:#555; --cyan:#00688C; --dcyan:#00688C; --frost:#000; --spark:#B33000; }
  body { background: #fff; color: #000; font-size: 12px; }
  .sidebar, .nao-imprimir, .abas, .aviso-leitura, .itip { display: none !important; }
  .conteudo { padding: 0; }
  .card, .kpi { border: 1px solid #999; break-inside: avoid; }
  table.acomp th, table.acomp td, table.simples th, table.simples td { padding: 4px 6px; font-size: 10.5px; }
  a { color: #000; }
}

/* ===== v3: tema claro, menu recolhível, kpi-cards, resizer, gantt crítico ===== */
html[data-theme='light'] {
  --void: #F0F4F8; --carbon: #FFFFFF; --onyx: #FFFFFF; --slate: #D5DDE5;
  --steel: #5B6B7D; --cyan: #00A8CC; --dcyan: #007A99; --frost: #0A0C10; --spark: #D14A1A;
}
html[data-theme='light'] body { background: var(--void); }
html[data-theme='light'] .login-wrap { background-image: radial-gradient(circle at 80% 10%, rgba(0,168,204,.10), transparent 45%); }
html[data-theme='light'] .kb-card, html[data-theme='light'] .bl-item { box-shadow: 0 1px 3px rgba(10,12,16,.08); }
html[data-theme='light'] .card, html[data-theme='light'] .kpi { box-shadow: 0 1px 3px rgba(10,12,16,.06); }
html[data-theme='light'] tr.linha-ativ:hover td { background: rgba(0,168,204,.06); }
html[data-theme='light'] .avatar { color: var(--dcyan); background: #E2EAF0; }
html[data-theme='light'] td.num { color: #33414F; }
html[data-theme='light'] .gantt-rotulo.n-ativ { color: #33414F; }

/* menu recolhível */
body.menu-recolhido .sidebar { display: none; }

/* kpi strip como cards alinhados, ⓘ no canto superior direito */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; padding: 16px 0 14px; }
.kpi-g { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  background: var(--onyx); border: 1px solid var(--slate); border-radius: 12px; padding: 12px 14px 10px; min-height: 74px; }
.kpi-g .num { font-size: 30px; }
.kpi-g .rot { max-width: none; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.kpi-g.destaque { border-color: var(--cyan); border-bottom-width: 3px; padding-bottom: 8px; }
.kpi-g.alerta { border-color: rgba(255,107,53,.55); }
.kpi-g .itip, .kpi .itip { position: absolute; top: 8px; right: 8px; margin: 0; }
.kpi { position: relative; }
.barra-hoje .itip { position: static; }

/* redimensionador de colunas */
.col-resizer { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 3; }
.col-resizer:hover { background: linear-gradient(to right, transparent 2px, var(--cyan) 3px, transparent 5px); }
table.acomp { table-layout: auto; }
table.acomp th { user-select: none; }

/* gantt: caminho crítico e linha de término */
.gantt-barra.critica { outline: 2px solid var(--spark); outline-offset: 1px; }
.gantt-fim { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--steel); }
.gantt-fim::after { content: "término"; position: absolute; top: -2px; left: 4px; font-size: 10px; color: var(--steel); }

/* ===== v4: mobile/responsivo + cabeçalho fixo ===== */
/* cabeçalho da tabela fixo ao rolar */
table.acomp thead th { position: sticky; top: 0; background: var(--carbon); z-index: 6; box-shadow: 0 1px 0 var(--slate); }
.tabela-scroll { overflow-x: auto; max-height: calc(100vh - 120px); overflow-y: auto; border-radius: 8px; }
/* evita quebras desnecessárias */
table.acomp td, table.simples td { line-height: 1.35; }
tr.linha-ativ td:nth-child(2) { white-space: nowrap; }
.chip { line-height: 1.6; }
.menu-backdrop { display: none; }

@media (max-width: 1100px) {
  /* menu vira drawer sobreposto */
  .sidebar { display: flex !important; position: fixed; left: -256px; top: 0; bottom: 0; z-index: 300;
    transition: left .22s ease; box-shadow: 4px 0 24px rgba(0,0,0,.45); height: 100vh; }
  body.menu-mobile-aberto .sidebar { left: 0; }
  body.menu-mobile-aberto .menu-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,12,16,.6); z-index: 250; }
  body.menu-recolhido .sidebar { display: flex !important; }

  .conteudo { padding: 12px 12px 20px; }
  .barra-hoje { flex-wrap: wrap; gap: 6px; font-size: 11.5px; }
  .proj-cab h2 { font-size: 17px; }
  .proj-cab .titulo { gap: 8px; }
  .barra-acoes { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .barra-acoes .btn { white-space: nowrap; }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0 10px; }
  .kpi-g { min-height: 62px; padding: 10px 10px 8px; }
  .kpi-g .num { font-size: 22px; }
  .kpi-g .rot { font-size: 9.5px; }
  .abas { overflow-x: auto; }
  .abas button { padding: 9px 12px; font-size: 12.5px; white-space: nowrap; }
  .filtros-acomp { gap: 6px; font-size: 12px; }
  .tabela-scroll { max-height: none; }
  table.acomp { min-width: 980px; }   /* rola na horizontal em vez de quebrar */
  table.acomp thead th { top: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi .num { font-size: 22px; }
  .grade-projetos { grid-template-columns: 1fr; }
  .modal { padding: 18px; border-radius: 14px; }
  .barra-topo-view { gap: 8px; }
  .barra-topo-view h2 { font-size: 17px; }
  .gantt-rotulo { width: 180px; min-width: 180px; font-size: 11px; }
  .gantt-mes { margin-left: 180px; }
  .login-card { width: 92vw; padding: 28px 22px; }
}

/* ===== v5: mobile best practices (bottom nav, touch targets, iOS) ===== */
.navbar-mobile { display: none; }
@media (max-width: 1100px) {
  /* barra de navegação inferior (padrão Material) */
  .navbar-mobile { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--carbon); border-top: 1px solid var(--slate);
    padding-bottom: env(safe-area-inset-bottom); }
  .navbar-mobile button { flex: 1; min-height: 52px; background: transparent; border: 0;
    color: var(--steel); font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .navbar-mobile button span { font-size: 18px; line-height: 1; }
  .navbar-mobile button.ativo { color: var(--cyan); }
  .conteudo { padding-bottom: 76px; }               /* espaço para a barra */
  .rodape-app { display: none; }

  /* alvos de toque ≥ 44px */
  .barra-hoje .btn, .barra-acoes .btn { min-height: 40px; }
  .barra-hoje .btn:first-child { min-width: 44px; font-size: 17px; }  /* ☰ */
  .mini-acao { padding: 6px 8px; font-size: 13px; }
  .abas button { min-height: 44px; }
  .sidebar button.nav { padding: 12px 12px; }

  /* iOS: inputs com 16px não disparam zoom automático */
  input, select, textarea { font-size: 16px; }
  /* drawer acima da navbar */
  .sidebar { z-index: 400; }
  body.menu-mobile-aberto .menu-backdrop { z-index: 350; }
}

/* v4: cabecalhos fixos + gantt */
.tabela-scroll:has(table.acomp){max-height:calc(100vh - 150px);overflow-y:auto}
.gantt-wrap{max-height:calc(100vh - 150px);overflow-y:auto}
.gantt-mes{position:sticky;top:0;z-index:10;background:var(--onyx)}

/* v5: marcos + kanban (a densidade da tabela de acompanhamento é a definida
   nas seções "estrutura" e "tabelas" no topo do arquivo, com padding 8px/10px
   e fonte 13px/12.5px — removida aqui uma regra corrompida e duplicada que
   sobrescrevia a tabela inteira para 8.5px, tornando-a ilegível) */
.gantt-marco { position: absolute; top: 50%; width: 12px; height: 12px; background: var(--spark); transform: translate(-50%, -50%) rotate(45deg); z-index: 6; border: 1px solid rgba(0,0,0,.5); }
.kb-empresa { font-size: 10px; color: var(--spark); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.kb-filtros { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.kb-col h4 { position: sticky; top: 0; background: var(--carbon); z-index: 5; padding: 8px 4px; margin: 0; }


/* ---------- v3.7 ---------- */
/* dropzone: anexar ou soltar arquivos (tracejado; realce ao arrastar) */
.dropzone { border: 2px dashed var(--slate); border-radius: 12px; padding: 20px 16px; text-align: center; color: var(--steel); cursor: pointer; transition: border-color .15s, background .15s, color .15s; background: var(--onyx); margin-bottom: 8px; }
.dropzone:hover { border-color: var(--cyan); color: var(--frost); }
.dropzone.drag { border-color: var(--cyan); background: rgba(0, 212, 255, .07); color: var(--cyan); }
.dropzone .dz-ico { font-size: 22px; margin-bottom: 4px; }
.dropzone .dz-sub { font-size: 11.5px; color: var(--steel); margin-top: 4px; }

/* cabeçalho de colunas fixo (como tabela do Excel) dentro do container rolável */
.tabela-scroll thead th { position: sticky; top: 0; background: var(--carbon); z-index: 12; box-shadow: 0 1px 0 var(--slate); }

/* cabeçalho do projeto gruda no topo e compacta ao rolar */
.proj-cab { position: sticky; top: 0; z-index: 30; background: var(--void); }
.kpi-strip, .kpi-g .num, .kpi-g { transition: padding .15s ease, font-size .15s ease, gap .15s ease; }
body.rolado .proj-cab .meta, body.rolado .proj-cab .dias, body.rolado .proj-cab .barra-seg { display: none; }
body.rolado .proj-cab h2 { font-size: 17px; }
body.rolado .kpi-strip { padding: 8px 0 8px; gap: 8px; }
body.rolado .kpi-g { min-height: 0; padding: 6px 10px 5px; }
body.rolado .kpi-g .num { font-size: 18px; }
body.rolado .kpi-g.destaque { padding-bottom: 5px; }
@media print { .proj-cab { position: static; } }

/* ===== acessibilidade: foco visível ao navegar por teclado =====
   Sem isto, um usuário de teclado (ou leitor de tela) não enxerga qual
   elemento está focado — botões, abas e itens de menu não tinham nenhum
   estado de :focus definido além do padrão (frequentemente invisível
   sobre fundo escuro). Usa :focus-visible para não exibir o anel em
   cliques de mouse, só em navegação por teclado. */
button:focus-visible, a:focus-visible, .sidebar button.nav:focus-visible,
.abas button:focus-visible, .mini-acao:focus-visible, .acao-add:focus-visible,
.kb-card:focus-visible, .proj-card:focus-visible, .nome-ativ:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--dcyan); }

/* ===== acessibilidade: respeita a preferência de menos movimento ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .proj-card:hover { transform: none; }
}

/* ===== notificações não bloqueantes (toast) — substituem alert() nativo =====
   alert() do navegador trava a interface inteira até o clique em OK, não
   segue a identidade visual e não empilha múltiplas mensagens. O toast
   aparece, some sozinho e não interrompe o que o usuário está fazendo. */
#toast-wrap { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(86vw, 420px); padding: 11px 18px; border-radius: 10px;
  font-size: 13px; line-height: 1.4; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.mostrar { opacity: 1; transform: translateY(0); }
.toast-erro { background: #7A1F1F; }
.toast-aviso { background: #8A5A16; }
.toast-ok { background: #0F5C42; }

/* ===== confirmação acessível — substitui confirm() nativo =====
   Segue a mesma identidade visual do .modal, mas em camada própria
   (z-index maior) para poder ser aberta por cima de um modal já aberto
   (ex.: excluir um projeto a partir da tela de edição) sem fechá-lo. */
.confirm-fundo { position: fixed; inset: 0; background: rgba(10,12,16,.72); display: flex;
  align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(2px); }
.confirm-caixa { background: var(--onyx); border: 1px solid var(--slate); border-radius: 16px;
  padding: 22px 24px; width: 380px; max-width: 90vw; }
.confirm-caixa p { font-size: 14px; line-height: 1.55; color: var(--frost); margin-bottom: 18px; }
.confirm-caixa .acoes { display: flex; gap: 10px; justify-content: flex-end; }
html[data-theme='light'] .toast { box-shadow: 0 6px 20px rgba(10,12,16,.18); }
