:root {
  --bg: #f5f6f8; --card: #fff; --txt: #1d2330; --muted: #667085; --line: #e3e6eb;
  --pri: #1f5eff; --red: #d92d20; --red-bg: #fee4e2; --amber: #b54708; --amber-bg: #fef0c7;
  --green: #067647; --green-bg: #dcfae6; --blue-bg: #e0eaff;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, "Segoe UI", sans-serif; background: var(--bg); color: var(--txt); }
header { background: #10203f; color: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
header h1 { font-size: 17px; margin: 0; white-space: nowrap; }
nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav button { background: none; border: 0; color: #c8d3ea; padding: 7px 11px; border-radius: 6px; cursor: pointer; font: inherit; }
nav button:hover { background: #ffffff18; color: #fff; }
nav button.ativa { background: #ffffff26; color: #fff; font-weight: 600; }
#salvo { font-size: 12px; color: #9fb0d0; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
h2 { font-size: 19px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; }
.kpi .n { font-size: 28px; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi.red .n { color: var(--red); } .kpi.amber .n { color: var(--amber); } .kpi.green .n { color: var(--green); }
.barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.barra .esp { flex: 1; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; position: sticky; top: 0; }
tr:hover td { background: #fafbff; }
.tabela { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 70vh; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.amber { background: var(--amber-bg); color: var(--amber); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.blue { background: var(--blue-bg); color: var(--pri); }
.tag.gray { background: #eef0f3; color: var(--muted); }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--txt); }
button:hover { border-color: #b9c0cc; }
button.pri { background: var(--pri); color: #fff; border-color: var(--pri); }
button.mini { padding: 2px 8px; font-size: 12px; }
button.perigo { color: var(--red); }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #cfd4dc; border-radius: 7px; background: #fff; }
input[type=checkbox] { width: 16px; height: 16px; vertical-align: middle; }
label.campo { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
label.campo > * { color: var(--txt); }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
dialog { border: 0; border-radius: 12px; padding: 0; width: min(680px, 95vw); box-shadow: 0 20px 60px #0004; }
dialog form { padding: 20px; }
dialog .acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.vazio { padding: 30px; text-align: center; color: var(--muted); }
.aviso { background: var(--amber-bg); color: #7a2e0e; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.muted { color: var(--muted); font-size: 12px; }
@media print { header, .barra, button { display: none !important; } main { padding: 0; } .tabela { max-height: none; } }

/* checklist do mês */
table.checklist td.cl, table.checklist td.cl-na, table.checklist th.cl-h { text-align: center; white-space: nowrap; }
table.checklist th.cl-h { min-width: 82px; }
table.checklist td.cl label { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-size: 11px; color: var(--muted); }
table.checklist td.cl input { width: 20px; height: 20px; cursor: pointer; }
table.checklist td.cl-na { color: #c5cad3; }
table.checklist td.cl-ok { background: var(--green-bg); }
table.checklist td.cl-ok span { color: var(--green); }
table.checklist td.cl-atraso { background: var(--red-bg); }
table.checklist td.cl-atraso span { color: var(--red); font-weight: 600; }
table.checklist td.cl-perto { background: var(--amber-bg); }
.barra-prog { width: 70px; height: 6px; background: #eef0f3; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.barra-prog div { height: 100%; background: var(--green); }

/* dashboard de férias */
.fx-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fx-venc { --c: #d92d20; --bg: #fee4e2; } .fx-30 { --c: #e04f16; --bg: #fdead7; } .fx-60 { --c: #dc6803; --bg: #fef0c7; }
.fx-90 { --c: #a15c07; --bg: #fef7c3; } .fx-120 { --c: #1f5eff; --bg: #e0eaff; } .fx-mais { --c: #067647; --bg: #dcfae6; }
.fx-card { border-top: 4px solid var(--c); transition: transform .1s; }
.fx-card:hover { transform: translateY(-1px); }
.fx-card.sel { outline: 2px solid var(--pri); }
.fx-card .n { color: var(--c); }
.fx-card .muted { margin-top: 4px; }
.fx-barra { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: -4px 0 16px; gap: 2px; }
.fx-barra div { background: var(--c); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; min-width: 22px; }
.fx-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--c); white-space: nowrap; }
.fx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }
.fx-num, .fx-th { text-align: center !important; }

#usuarioLogado { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #dbe3f3; }
#usuarioLogado button { background: #ffffff1a; color: #fff; border-color: #ffffff33; }
