/* ME Gestor · identidade MüllerEyng (verde institucional, mesma família visual do Painel de Horas) */
:root {
  --fundo: #f3f6f2; --painel: #ffffff; --texto: #1c2620; --suave: #5b6a60; --fraco: #8a978e; --linha: #d9e2d8; --linha-forte: #b8c7b8;
  --marca: #016c3e; --marca-escura: #014a2b; --marca-texto: #ffffff; --marca-suave: #e6efe2; --cab: #c3d69b; --cab-texto: #1c2620;
  --ok: #2b7a3d; --alerta: #a46200; --ruim: #c0392b; --ref: #7d8a80; --info: #2f5f8f;
  --c1: #016c3e; --c2: #7fae55; --c3: #4f7cac; --c4: #c9a227; --c5: #a3aba5; --c6: #b5651d; --c7: #6b5aa6; --c8: #2b9a9a;
  --f-titulo: "Source Serif 4", "Times New Roman", Georgia, serif;
  --f-texto: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --r: 6px; --lateral: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --fundo: #101612; --painel: #18211b; --texto: #e5ece6; --suave: #9fb1a4; --fraco: #73857a; --linha: #2b3830; --linha-forte: #3c4d42;
  --marca: #0f5c37; --marca-escura: #0a3f26; --marca-texto: #f1f7f2; --marca-suave: #1f3327; --cab: #2c4430; --cab-texto: #e5ece6;
  --ok: #6cc282; --alerta: #e0a14a; --ruim: #ef7d6e; --ref: #8e9c92; --info: #7aa6d6;
  --c1: #3fae6e; --c2: #9ccc6c; --c3: #7aa6d6; --c4: #e0bf4e; --c5: #8b948d; --c6: #e08a45; --c7: #9e8fe0; --c8: #4fc1c1;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --fundo: #101612; --painel: #18211b; --texto: #e5ece6; --suave: #9fb1a4; --fraco: #73857a; --linha: #2b3830; --linha-forte: #3c4d42;
  --marca: #0f5c37; --marca-escura: #0a3f26; --marca-texto: #f1f7f2; --marca-suave: #1f3327; --cab: #2c4430; --cab-texto: #e5ece6;
  --ok: #6cc282; --alerta: #e0a14a; --ruim: #ef7d6e; --ref: #8e9c92; --info: #7aa6d6;
  --c1: #3fae6e; --c2: #9ccc6c; --c3: #7aa6d6; --c4: #e0bf4e; --c5: #8b948d; --c6: #e08a45; --c7: #9e8fe0; --c8: #4fc1c1;
  color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fundo); color: var(--texto); font-family: var(--f-texto); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Botões ── */
.btn { font-size: 14px; font-weight: 600; border-radius: var(--r); padding: 8px 14px; cursor: pointer; border: 1px solid var(--linha-forte); background: var(--painel); color: var(--texto); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--marca); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-prim { background: var(--marca); color: var(--marca-texto); border-color: var(--marca); }
.btn-prim:hover { background: var(--marca-escura); }
.btn-perigo { color: var(--ruim); border-color: color-mix(in srgb, var(--ruim) 45%, var(--linha)); }
.btn-perigo:hover { border-color: var(--ruim); background: color-mix(in srgb, var(--ruim) 7%, transparent); }
.btn-claro { background: transparent; color: var(--marca-texto); border-color: color-mix(in srgb, var(--marca-texto) 45%, transparent); }
.btn-claro:hover { background: color-mix(in srgb, var(--marca-texto) 12%, transparent); border-color: var(--marca-texto); }
.btn-mini { font-size: 12.5px; font-weight: 500; padding: 4px 10px; }
.btn-link { border: 0; background: none; padding: 0; color: var(--marca); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.btn:focus-visible, .aba-btn:focus-visible, .nav-item:focus-visible, th button:focus-visible, .hb-row:focus-visible, tr[tabindex]:focus-visible, .ev:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }

/* ── Login ── */
#login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px); }
.login-marca { background: var(--marca); color: var(--marca-texto); display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(24px, 6vw, 80px); gap: 28px; position: relative; overflow: hidden; }
.login-marca::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--marca-texto) 14%, transparent); }
.login-marca img { width: min(420px, 100%); height: auto; }
.login-marca h1 { font-family: var(--f-titulo); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; }
.login-marca p { margin: 0; max-width: 36ch; opacity: .82; font-size: 16px; }
.login-form { background: var(--painel); display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; gap: 14px; }
.login-form h2 { font-family: var(--f-titulo); font-weight: 400; font-size: 28px; }
.login-dica { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--linha); font-size: 13px; color: var(--suave); }
.erro-msg { background: color-mix(in srgb, var(--ruim) 10%, transparent); color: var(--ruim); border-radius: var(--r); padding: 8px 12px; font-size: 13.5px; }
.erro-msg.ok-msg { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--marca); font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; align-self: flex-start; }
.st-grav { font-size: 12.5px; color: var(--suave); margin-left: auto; }
.passos { margin: 4px 0 10px 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; }
.st-grav:empty { display: none; }
.aviso-dif { font-size: 12.5px; color: var(--suave); }
.aviso-dif del { color: var(--ruim); text-decoration: line-through; }
.aviso-dif ins { color: var(--ok); text-decoration: none; font-weight: 600; }
.divisao { display: flex; flex-wrap: wrap; gap: 6px 18px; grid-column: 1 / -1; font-size: 14px; }
.divisao label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ── Estrutura ── */
#app { min-height: 100vh; }
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--marca); color: var(--marca-texto); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.lateral-topo { padding: 22px 20px 16px; border-bottom: 1px solid color-mix(in srgb, var(--marca-texto) 14%, transparent); }
.lateral-topo img { width: 100%; height: auto; display: block; }
.lateral-sis { margin-top: 12px; font-size: 12.5px; letter-spacing: .06em; opacity: .8; display: flex; justify-content: space-between; }
.lateral-usu { padding: 12px 20px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid color-mix(in srgb, var(--marca-texto) 14%, transparent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--marca-texto); color: var(--marca); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.lateral-usu b { display: block; font-size: 14px; font-weight: 600; }
.lateral-usu span { font-size: 12.5px; opacity: .75; }
.nav { flex: 1; padding: 8px 0 14px; display: flex; flex-direction: column; }
.nav-sec { padding: 14px 20px 4px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; opacity: .6; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-left: 3px solid transparent; color: var(--marca-texto); text-align: left; padding: 8px 20px 8px 17px; font-size: 14.5px; cursor: pointer; opacity: .86; }
.nav-item:hover { background: color-mix(in srgb, var(--marca-texto) 8%, transparent); opacity: 1; }
.nav-item.ativo { background: color-mix(in srgb, var(--marca-texto) 14%, transparent); border-left-color: var(--marca-texto); font-weight: 600; opacity: 1; }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav-badge { margin-left: auto; background: var(--marca-texto); color: var(--marca); font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.nav-badge.alerta { background: #f3c66b; color: #3d2600; }
.lateral-pe { padding: 14px 20px; border-top: 1px solid color-mix(in srgb, var(--marca-texto) 14%, transparent); display: flex; flex-direction: column; gap: 8px; }
.lateral-pe small { opacity: .6; font-size: 11.5px; }
.principal { margin-left: var(--lateral); min-height: 100vh; display: flex; flex-direction: column; }
.topo { position: sticky; top: 0; z-index: 30; background: var(--painel); border-bottom: 1px solid var(--linha); min-height: 60px; padding: 10px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topo-tit { display: flex; align-items: center; gap: 12px; }
.topo h1 { font-family: var(--f-titulo); font-weight: 400; font-size: 24px; line-height: 1.15; }
.topo-sub { font-size: 13px; color: var(--suave); }
.topo-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }
.conteudo { padding: 22px 28px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1420px; width: 100%; }
.fundo-lateral { display: none; }

/* ── Cartões, grade, textos ── */
.cartao { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cartao h2 { font-size: 17px; font-weight: 600; text-wrap: balance; }
.cartao h3 { font-size: 15px; font-weight: 600; }
.nota { margin: 0; font-size: 13px; color: var(--suave); }
.linha-tit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 18px; }
.grade-2-3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; align-items: start; }
.sec { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.resumo { margin: 0; font-size: 15.5px; max-width: 86ch; }
.resumo b { font-variant-numeric: tabular-nums; }
.vazio { margin: 0; font-size: 13.5px; color: var(--suave); padding: 6px 0; }
.destaque-txt { color: var(--alerta); font-weight: 600; }
.nw { white-space: nowrap; }
td.nome { min-width: 10.5rem; }
input:disabled, select:disabled { background: var(--fundo); color: var(--fraco); }

/* ── Filtros e abas ── */
.filtros { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--suave); font-weight: 500; }
select, input[type="search"], input[type="text"], input[type="number"], input[type="date"], input[type="month"], input[type="time"], input[type="email"], input[type="password"], input[type="tel"], textarea { font-size: 14px; color: var(--texto); background: var(--painel); border: 1px solid var(--linha-forte); border-radius: var(--r); padding: 7px 10px; min-width: 0; max-width: 100%; }
select:focus, input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--marca) 55%, transparent); outline-offset: 0; border-color: var(--marca); }
input[readonly] { background: var(--fundo); color: var(--suave); }
input:disabled, select:disabled, textarea:disabled { background: var(--fundo); color: var(--fraco); cursor: not-allowed; }
.filtro-ativo { font-size: 13px; color: var(--marca); font-weight: 600; }
.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--linha); overflow-x: auto; }
.aba-btn { font-size: 15px; color: var(--suave); background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.aba-btn[aria-selected="true"] { color: var(--texto); border-bottom-color: var(--marca); font-weight: 600; }
.aba-btn .nav-badge { background: var(--alerta); color: #fff; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button[aria-pressed="true"] { background: var(--marca); color: var(--marca-texto); border-color: var(--marca); }

/* ── Indicadores ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: 12px; }
.kpi { gap: 4px; padding: 14px 16px; border-top: 3px solid var(--marca); }
.kpi-rot { font-size: 13px; color: var(--suave); }
.kpi-num { font-family: var(--f-titulo); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-un { font-size: 14px; color: var(--suave); margin-left: 4px; font-family: var(--f-texto); }
.kpi-sub { font-size: 12.5px; color: var(--suave); font-variant-numeric: tabular-nums; }
.kpi.alerta { border-top-color: var(--ruim); }
.kpi.aviso { border-top-color: var(--alerta); }

/* ── Gráficos ── */
.graf { position: relative; min-height: 220px; }
.graf svg { display: block; overflow: visible; }
.graf text { font-family: var(--f-texto); font-size: 12px; fill: var(--suave); }
.graf .barra { cursor: pointer; }
.leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--suave); }
.leg span { display: inline-flex; align-items: center; gap: 6px; }
.leg i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.leg i.traco { height: 0; border-top: 2px dashed var(--ref); border-radius: 0; width: 16px; }
.dica { position: absolute; pointer-events: none; z-index: 5; background: var(--painel); border: 1px solid var(--linha-forte); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0,0,0,.14); padding: 6px 10px; font-size: 12.5px; line-height: 1.5; min-width: 10rem; max-width: 17rem; font-variant-numeric: tabular-nums; }
.dica .t { color: var(--suave); font-weight: 600; }
.dica div { display: flex; align-items: center; gap: 6px; }
.dica div b { margin-left: auto; font-weight: 600; padding-left: 10px; }
.dica i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.hb { display: flex; flex-direction: column; gap: 1px; }
.hb-row { display: grid; grid-template-columns: minmax(7rem, 36%) 1fr 4.8rem; align-items: center; gap: 10px; font-size: 13px; color: var(--texto); background: none; border: 0; border-radius: 4px; padding: 3px 6px; text-align: left; width: 100%; }
button.hb-row { cursor: pointer; }
button.hb-row:hover { background: var(--marca-suave); }
.hb-lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-trk { position: relative; height: 11px; }
.hb-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; min-width: 2px; }
.hb-ref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed var(--ref); }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--suave); }

/* ── Tabelas ── */
.tbox { overflow: auto; max-height: 36rem; border: 1px solid var(--linha); border-radius: var(--r); }
.tbox.curta { max-height: 26rem; }
.tbox.livre { max-height: none; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; z-index: 1; background: var(--cab); color: var(--cab-texto); text-align: left; font-weight: 600; padding: 7px 10px; white-space: nowrap; border-bottom: 1px solid var(--linha-forte); }
th.ord { padding: 0; }
th button { color: inherit; background: none; border: 0; padding: 7px 10px; cursor: pointer; width: 100%; text-align: inherit; font-weight: 600; }
th.n, td.n { text-align: right; }
th.c, td.c { text-align: center; }
th[aria-sort="ascending"] button::after { content: " ↑"; } th[aria-sort="descending"] button::after { content: " ↓"; }
td { padding: 6px 10px; border-bottom: 1px solid var(--linha); vertical-align: top; }
td.txt { min-width: 14rem; max-width: 30rem; }
td.acoes { white-space: nowrap; text-align: right; }
td.acoes .btn + .btn { margin-left: 4px; }
td small, .sub { display: block; font-size: 12px; color: var(--suave); }
tbody tr[tabindex] { cursor: pointer; }
tbody tr:hover { background: var(--marca-suave); }
tbody tr.sel { background: color-mix(in srgb, var(--marca) 16%, transparent); }
tbody tr.destaque { background: color-mix(in srgb, var(--alerta) 10%, var(--painel)); box-shadow: inset 4px 0 0 var(--alerta); }
tbody tr.destaque:hover { background: color-mix(in srgb, var(--alerta) 16%, var(--painel)); }
tbody tr.fraca td { color: var(--fraco); }
tfoot td { font-weight: 700; background: var(--cab); color: var(--cab-texto); position: sticky; bottom: 0; }

/* ── Situações (chips) ── */
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; font-weight: 500; }
.st1 { color: var(--ruim); background: color-mix(in srgb, var(--ruim) 13%, transparent); }
.st2 { color: var(--alerta); background: color-mix(in srgb, var(--alerta) 16%, transparent); }
.st3 { color: var(--alerta); background: color-mix(in srgb, var(--alerta) 7%, transparent); }
.st4 { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.st5 { color: var(--suave); background: color-mix(in srgb, var(--texto) 7%, transparent); }
.st6 { color: var(--info); background: color-mix(in srgb, var(--info) 13%, transparent); }
.cons { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cons-trk { position: relative; width: 4.8rem; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--texto) 9%, transparent); flex: none; }
.cons-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.cons-100 { position: absolute; top: -3px; bottom: -3px; left: 66.667%; border-left: 1.5px solid var(--suave); }
.mini { position: relative; display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: color-mix(in srgb, var(--texto) 9%, transparent); }
.mini span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.det-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.det-cab h2 { font-family: var(--f-titulo); font-weight: 400; font-size: 26px; }
.det-fig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 8px; }
.det-fig > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid var(--linha); border-radius: var(--r); font-size: 13px; color: var(--suave); }
.det-fig b { font-family: var(--f-titulo); font-weight: 400; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--texto); }

/* ── Avisos dentro das páginas ── */
.faixa { border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.faixa b { font-weight: 600; }
.faixa.aviso { background: color-mix(in srgb, var(--alerta) 9%, var(--painel)); border-color: color-mix(in srgb, var(--alerta) 35%, var(--linha)); color: var(--texto); }
.faixa.erro { background: color-mix(in srgb, var(--ruim) 8%, var(--painel)); border-color: color-mix(in srgb, var(--ruim) 35%, var(--linha)); }
.faixa.info { background: var(--marca-suave); border-color: var(--linha); }
.faixa .ic { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--alerta); margin-top: 1px; }
.faixa.erro .ic { background: var(--ruim); }
.faixa.info .ic { background: var(--marca); }

/* ── Pendências ── */
.pend { display: flex; flex-direction: column; }
.pend-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--linha); font-size: 14px; }
.pend-item:last-child { border-bottom: 0; }
.pend-n { font-family: var(--f-titulo); font-size: 22px; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.pend-item small { display: block; color: var(--suave); font-size: 12.5px; }

/* ── Formulários ── */
.form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.campo { display: flex; flex-direction: column; gap: 4px; grid-column: span 3; min-width: 0; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--suave); }
.campo.s1 { grid-column: span 1; } .campo.s2 { grid-column: span 2; } .campo.s4 { grid-column: span 4; } .campo.s6 { grid-column: 1 / -1; }
.campo input, .campo select, .campo textarea { width: 100%; }
.campo textarea { min-height: 70px; resize: vertical; }
.campo .ajuda { font-size: 12px; color: var(--suave); font-weight: 400; }
/* horário da marcação: Manhã / Tarde-Noite (início às fim) e total calculado */
.turno { display: flex; align-items: center; gap: 6px; }
.turno input { flex: 1; min-width: 0; }
.turno > span { font-size: 12.5px; color: var(--suave); }
.campo input.horas-tot { font-weight: 700; text-align: center; background: var(--fundo, #f4f6f5); cursor: default; }
.inv, input.inv, select.inv, textarea.inv { border-color: var(--ruim) !important; outline: 2px solid color-mix(in srgb, var(--ruim) 35%, transparent); }
.form-sec { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--marca); margin-top: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--linha); }
.form-linha { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.marcar { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--linha-forte); border-radius: var(--r); cursor: pointer; font-size: 14px; background: var(--painel); }
.marcar:has(input:checked) { border-color: var(--marca); background: var(--marca-suave); }
.marcar input { width: 16px; height: 16px; accent-color: var(--marca); margin: 0; }
/* relatório Horas Área Pública: escolha dos clientes e tabela por cliente e dia */
.hp-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 6px 22px; margin-top: 4px; }
.hp-grupo h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); margin: 6px 0 4px; }
.hp-grupo h3 small { font-weight: 400; }
.hp-it { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: var(--r); cursor: pointer; font-size: 14px; }
.hp-it:hover { background: var(--marca-suave); }
.hp-it input { width: 16px; height: 16px; accent-color: var(--marca); margin: 0; flex: none; }
.hp-it span { flex: 1; min-width: 0; }
.hp-it small { color: var(--suave); font-variant-numeric: tabular-nums; }
.hp-tab { max-height: 40rem; }
.hp-tab tr.hp-cli td { font-weight: 700; background: var(--marca-suave); }
.hp-tab td.hp-dia { padding-left: 26px; }
.hp-tab td, .hp-tab th { white-space: nowrap; }
.reemb { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 10px; }
.reemb-item { border: 1px solid var(--linha); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.reemb-item:has(input[type=checkbox]:checked) { border-color: var(--marca); background: color-mix(in srgb, var(--marca) 5%, var(--painel)); }
.reemb-item label.topo-r { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.reemb-item label.topo-r input { width: 16px; height: 16px; accent-color: var(--marca); margin: 0; }
.reemb-item .val { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--suave); }
.reemb-item .val input { width: 7.5rem; }
.desp { display: grid; grid-template-columns: minmax(9rem, 1.1fr) minmax(8rem, 1.4fr) 7.5rem minmax(9rem, 1.2fr) auto; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--linha); }
.desp label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--suave); font-weight: 600; min-width: 0; }
.desp input[type=file] { font-size: 12.5px; max-width: 100%; }
.contato { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr auto; gap: 8px; align-items: end; padding: 8px; border: 1px solid var(--linha); border-radius: var(--r); background: var(--fundo); }
.contato label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--suave); font-weight: 600; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--linha-forte); border-radius: 999px; font-size: 13px; cursor: pointer; }
.checks label:has(input:checked) { background: var(--marca); color: var(--marca-texto); border-color: var(--marca); }
.checks input { accent-color: var(--marca); margin: 0; }

/* ── Modal ── */
.fundo-modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 20, 14, .48); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow: auto; }
.modal { background: var(--painel); color: var(--texto); border-radius: 10px; border: 1px solid var(--linha); width: min(640px, 100%); display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.modal.lg { width: min(880px, 100%); } .modal.sm { width: min(460px, 100%); }
.modal-cab { padding: 18px 22px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--linha); }
.modal-cab h2 { font-family: var(--f-titulo); font-weight: 400; font-size: 23px; line-height: 1.2; }
.modal-cab .sub { margin-top: 2px; }
.modal-x { border: 0; background: var(--fundo); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; color: var(--suave); font-size: 16px; flex: none; }
.modal-corpo { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-pe { padding: 12px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--linha); }
.modal-pe .esq { margin-right: auto; }
.ficha { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 14px; font-size: 14px; }
.ficha dt { color: var(--suave); }
.ficha dd { margin: 0; font-weight: 500; }

/* ── Avisos flutuantes ── */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--texto); color: var(--painel); border-radius: var(--r); padding: 10px 14px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); border-left: 4px solid var(--c2); }
.toast.erro { border-left-color: var(--ruim); }
.toast.aviso { border-left-color: var(--c4); }

/* ── Agenda (calendário) ── */
.cal-cab { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cab div { text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--suave); text-transform: uppercase; padding: 4px 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dia { min-height: 98px; border: 1px solid var(--linha); border-radius: var(--r); background: var(--painel); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dia.fora { opacity: .35; }
.dia.fds { background: var(--fundo); }
.dia.hoje { border-color: var(--marca); box-shadow: inset 0 0 0 1px var(--marca); }
.dia-n { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--suave); }
.dia.hoje .dia-n b { background: var(--marca); color: var(--marca-texto); border-radius: 999px; padding: 0 7px; }
.dia-mais { border: 0; background: none; color: var(--marca); font-weight: 700; cursor: pointer; padding: 0 4px; border-radius: 4px; font-size: 15px; line-height: 1; }
.dia-mais:hover { background: var(--marca-suave); }
.ev { display: block; width: 100%; text-align: left; border-radius: 4px; padding: 2px 6px; font-size: 12px; line-height: 1.3; cursor: pointer; border: 1px solid transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small { opacity: .85; font-size: 11px; }
.ev.ag { background: color-mix(in srgb, var(--c3) 13%, var(--painel)); color: var(--texto); border: 1px solid color-mix(in srgb, var(--c3) 50%, transparent); border-left: 3px solid var(--c3); }
.ev.conf { background: var(--marca); color: var(--marca-texto); }
.ev.pend { background: color-mix(in srgb, var(--alerta) 13%, var(--painel)); color: var(--alerta); border: 1px dashed var(--alerta); }
.ev.conc { background: color-mix(in srgb, var(--texto) 8%, var(--painel)); color: var(--suave); }
.ev.conc::before { content: "✓ "; font-weight: 700; color: var(--ok); }
.ev.atras { background: color-mix(in srgb, var(--ruim) 10%, var(--painel)); color: var(--ruim); border: 1px solid var(--ruim); }
.ev.nr { background: none; color: var(--fraco); text-decoration: line-through; border: 1px dashed var(--linha-forte); }
.ev.marc { background: none; color: var(--suave); border: 1px solid var(--linha); cursor: pointer; }
.ev.aus { background: color-mix(in srgb, var(--c5) 30%, var(--painel)); color: var(--texto); }
.leg-ag { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--suave); align-items: center; }
.leg-ag .ev { display: inline-block; width: auto; cursor: default; }

/* ── Quadro da programação ── */
.quadro { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.quadro th, .quadro td { border-bottom: 1px solid var(--linha); border-right: 1px solid var(--linha); padding: 0; }
.quadro th { padding: 4px 2px; text-align: center; font-weight: 600; position: sticky; top: 0; z-index: 2; }
.quadro th.aud, .quadro td.aud { position: sticky; left: 0; z-index: 3; background: var(--painel); text-align: left; padding: 6px 10px; min-width: 9.5rem; font-size: 13px; }
.quadro th.aud { z-index: 4; background: var(--cab); }
.quadro td.cel { min-width: 4.6rem; max-width: 4.6rem; height: 46px; vertical-align: top; padding: 2px; cursor: pointer; }
.quadro td.cel:hover { background: var(--marca-suave); }
.quadro td.fds, .quadro th.fds { background: var(--fundo); cursor: default; min-width: 1.4rem; max-width: 1.4rem; width: 1.4rem; }
.quadro th.fds { color: var(--fraco); }
.quadro th.hoje { background: var(--marca); color: var(--marca-texto); }
.quadro .ev { font-size: 11px; padding: 1px 4px; margin-bottom: 2px; }

/* ── Planejamento ── */
.plan-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 8px; }
.plan-ct { text-align: left; border: 1px solid var(--linha); border-radius: var(--r); background: var(--painel); padding: 9px 12px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 14px; }
.plan-ct:hover { border-color: var(--marca); }
.plan-ct.sel { border-color: var(--marca); box-shadow: inset 0 0 0 1px var(--marca); background: var(--marca-suave); }
.plan-ct.destaque { background: color-mix(in srgb, var(--alerta) 10%, var(--painel)); box-shadow: inset 4px 0 0 var(--alerta); }
.plan-ct.destaque.sel { box-shadow: inset 4px 0 0 var(--alerta), inset 0 0 0 1px var(--marca); }
.plan-ct small { grid-column: 1 / -1; color: var(--suave); font-size: 12.5px; }
.lado { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 3.45fr); gap: 16px; align-items: start; }
.lado-tit { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); margin-bottom: 6px; }

/* ── Responsivo ── */
@media (max-width: 1100px) { .grade-2-3, .lado { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  #login { grid-template-columns: 1fr; }
  .login-marca { padding: 36px 24px; }
  .lateral { transform: translateX(-100%); transition: transform .2s; }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto .fundo-lateral { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.4); }
  .principal { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topo { padding: 10px 16px; }
  .conteudo { padding: 16px 16px 40px; }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campo, .campo.s1, .campo.s2, .campo.s4 { grid-column: span 1; }
  .campo.s6, .campo.s3, .campo.s4, .campo.larga { grid-column: 1 / -1; }
  .campo.vazio { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 12px; } .kpi-num { font-size: 24px; }
  .topo-sub { display: none; }
  .topo h1 { font-size: 21px; }
  .desp, .contato { grid-template-columns: 1fr 1fr; }
  .dia { min-height: 70px; }
  .ev small { display: none; }
}
@media print { .lateral, .topo-acoes, .menu-btn { display: none !important; } .principal { margin-left: 0; } }

