:root {
  --bg: #f5f7f4;
  --panel: #fff;
  --line: #dde5dc;
  --text: #17211b;
  --muted: #64706a;
  --green: #1f7a4d;
  --blue: #246b9f;
  --red: #b73939;
  --amber: #b06c1d;
  font-family: Inter, system-ui, Segoe UI, Arial, sans-serif;
  font-size: 13px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card, .panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.login-card { width: min(380px, 100%); padding: 22px; }
.login-card h1 { margin: 0 0 6px; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.brand { font-weight: 850; font-size: 18px; }
.nav { display: grid; gap: 5px; }
.nav button { min-height: 34px; border-radius: 8px; background: transparent; text-align: left; padding: 0 10px; color: var(--muted); font-weight: 750; }
.nav button.active, .nav button:hover { background: #edf2ea; color: var(--text); }
.user { margin-top: auto; display: grid; gap: 8px; color: var(--muted); }
.content { padding: 14px; min-width: 0; }
.top { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 10px; }
.top h1 { margin: 0 0 2px; font-size: 22px; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.btn { min-height: 32px; border-radius: 8px; padding: 0 10px; background: var(--green); color: #fff; font-weight: 800; }
.btn.secondary { background: #edf2ea; color: var(--text); }
.btn.danger { background: #f8e7e7; color: var(--red); }
.grid, .stats { display: grid; gap: 8px; }
.stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 9px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.stat strong { display: block; margin-top: 2px; font-size: 22px; }
.dash { display: grid; grid-template-columns: 0.8fr 1.3fr; gap: 8px; margin-bottom: 9px; }
.panel { padding: 10px; }
.panel h2 { margin: 0 0 8px; font-size: 16px; }
.pie-wrap { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; }
.pie { width: 130px; height: 130px; border-radius: 50%; border: 8px solid #fff; }
.legend { display: grid; gap: 4px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bars { height: 140px; display: flex; gap: 10px; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); padding-top: 8px; }
.bar-group { min-width: 62px; display: grid; justify-items: center; gap: 5px; font-size: 11px; color: var(--muted); text-align: center; }
.bar-pair { height: 105px; display: flex; align-items: end; gap: 5px; }
.bar { width: 17px; border-radius: 5px 5px 0 0; display: block; }
.late, .c-atrasado { background: var(--red); }
.ok, .c-aprovado { background: var(--green); }
.c-pendente { background: var(--blue); }
.c-em_analise { background: var(--amber); }
.c-reprovado { background: #8f3f76; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.card { padding: 10px; display: grid; gap: 8px; }
.card h3 { margin: 0; font-size: 16px; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
th, td { padding: 7px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; overflow-wrap: anywhere; vertical-align: top; }
th { background: #edf2ea; }
.pill { display: inline-flex; min-height: 21px; align-items: center; border-radius: 99px; padding: 0 8px; font-size: 11px; font-weight: 850; background: #edf2ea; }
.pill.atrasado, .pill.reprovado { background: #f8e7e7; color: var(--red); }
.pill.aprovado { background: #e5f2ec; color: var(--green); }
.pill.em_analise { background: #f7eee0; color: var(--amber); }
.pill.pendente { background: #e8f0f7; color: var(--blue); }
.late-row { background: #fffafa; }
form { display: grid; gap: 9px; }
label { display: grid; gap: 4px; font-weight: 700; font-size: 12px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 14px; }
.modal { width: min(720px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 8px; padding: 14px; }
.modal-head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.modal-head h2 { margin: 0; }
.history { display: grid; gap: 5px; }
.history-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; display: flex; justify-content: space-between; gap: 10px; }
.hidden { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats, .dash, .cards, .two { grid-template-columns: 1fr; }
}
