/* 1. CORES: altere estas variáveis para mudar a identidade do site. */
:root { --green: #0b5f4c; --dark: #073d32; --background: #f4f6f8; --text: #203e33; --border: #e1e9e4; --muted: #657d70; }
/* 2. ESTILO GERAL. */
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 Arial, sans-serif; color: var(--text); background: var(--background); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 8px; padding: 11px 16px; background: var(--green); color: white; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid #52966f; outline-offset: 3px; }
input, select { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #baccc0; background: white; color: var(--text); border-radius: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 19px; }
small, .muted { color: var(--muted); font-size: 14px; }
.secondary { background: #edf4ef; color: var(--green); }
/* 3. NAVEGAÇÃO E LAYOUT DO COMPUTADOR. */
.sidebar { width: 220px; position: fixed; inset: 0 auto 0 0; padding: 30px 18px; background: white; border-right: 1px solid var(--border); }
.brand { display: block; color: var(--dark); font-size: 21px; font-weight: 700; margin-bottom: 35px; text-decoration: none; }
.brand span { display: block; font-size: 12px; font-weight: 400; margin-top: 5px; color: var(--muted); }
.desktop-nav a { display: block; margin: 6px 0; padding: 13px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.desktop-nav a.active { background: #eaf3ed; color: var(--green); font-weight: 700; }
.sidebar-note { position: absolute; bottom: 20px; font-size: 14px; color: var(--muted); }
.workspace { margin-left: 220px; }
.topbar { padding: 18px 30px; display: flex; gap: 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: white; }
main { max-width: 1200px; padding: 30px; margin: auto; }
.page-heading p { font-size: 12px; letter-spacing: 1px; color: var(--muted); margin-bottom: 7px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { min-width: 0; background: white; border: 1px solid var(--border); border-radius: 13px; padding: 24px; margin-bottom: 20px; }
.cards .panel { margin: 0; }
.dark { background: var(--dark); color: white; border-color: var(--dark); }
.dark small { color: #b8d1c1; }
.big { font-size: 30px; line-height: 1.25; font-weight: 600; display: block; margin: 12px 0; overflow-wrap: anywhere; }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 8px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 400; }
.right { text-align: right; }
.badge { background: #ecf4ee; color: var(--green); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.notice { background: #fff5df; color: #765d28; border-radius: 8px; padding: 14px; font-size: 14px; margin-bottom: 20px; }
.error { color: #ac3040; }
.success { color: var(--green); background: #eaf5ed; border-radius: 8px; padding: 12px; }
progress { width: 100%; height: 16px; accent-color: var(--green); }
.bar-item { margin: 18px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.bar { background: #edf2ef; height: 10px; overflow: hidden; border-radius: 8px; }
.bar span { display: block; height: 100%; border-radius: 8px; }
.chart { display: flex; gap: 15px; align-items: end; height: 190px; border-bottom: 1px solid var(--border); padding-top: 15px; }
.chart-column { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.chart-column span { display: block; width: min(45px, 80%); background: #559878; border-radius: 5px 5px 0 0; min-height: 2px; }
.list-row { padding: 15px 0; border-bottom: 1px solid var(--border); }
footer { font-size: 12px; color: var(--muted); padding: 15px 0; }
/* 4. JANELAS E FORMULÁRIOS. */
dialog { width: min(520px, calc(100% - 30px)); max-height: 90vh; border: 1px solid var(--border); border-radius: 14px; padding: 25px; color: var(--text); }
dialog::backdrop { background: #102a2066; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.dialog-head button { background: transparent; color: var(--muted); padding: 0 7px; font-size: 27px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0; }
label input, label select { margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.mobile-nav { display: none; }
/* 5. RESPONSIVIDADE: regras aplicadas em telas menores. */
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding-bottom: 90px; }
  main { padding: 24px 16px; }
  .topbar { padding: 15px 16px; font-size: 14px; }
  h1 { font-size: 28px; }
  .panel { padding: 20px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--border); padding: 12px 5px max(12px, env(safe-area-inset-bottom)); z-index: 10; }
  .mobile-nav a { flex: 1; min-width: 0; text-align: center; padding: 7px 2px; text-decoration: none; font-size: 14px; color: var(--muted); }
  .mobile-nav a.active { color: var(--green); font-weight: 700; }
  .split { flex-wrap: wrap; }
}
