/* ════════════════════════════════════════════════════════════════
   Dashboard DataEvo  ▪  tema claro premium
   Cor de marca: laranja #FF7500
   ════════════════════════════════════════════════════════════════ */

:root {
  --brand:        #FF7500;
  --brand-dark:   #E05F00;
  --brand-soft:   #FFF1E3;
  --brand-glow:   rgba(255, 117, 0, 0.18);

  --ink:          #1A1D21;
  --ink-soft:     #5A6169;
  --ink-faint:    #9AA1A9;

  --bg:           #F4F5F7;
  --surface:      #FFFFFF;
  --surface-alt:  #FBFBFC;
  --line:         #E6E8EC;
  --line-soft:    #F0F1F3;

  --ok:           #1F9D55;
  --ok-soft:      #E4F5EB;
  --warn:         #C9890B;
  --warn-soft:    #FBF0D8;
  --danger:       #D63A3A;
  --danger-soft:  #FBE6E6;

  --shadow-sm: 0 1px 2px rgba(26, 29, 33, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 29, 33, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 29, 33, 0.12);

  --radius:   14px;
  --radius-sm: 9px;

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body:    "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }

/* ─── LOGIN ─────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 12% 0%, var(--brand-glow), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(255,117,0,0.10), transparent 55%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 34px;
}

.login-brand {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.login-brand .dot { color: var(--brand); }

.login-sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: 28px;
}

/* ─── LAYOUT APP ────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  padding: 22px 22px 18px;
}
.sidebar-brand .dot { color: var(--brand); }

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 16px 22px 7px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 22px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-link:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-left-color: var(--brand);
  font-weight: 600;
}
.nav-link .ico { width: 18px; text-align: center; font-size: 15px; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
}
.sidebar-user { font-size: 13px; font-weight: 600; }
.sidebar-role {
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-logout {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 17px; }
.topbar .spacer { flex: 1; }
.topbar .hint { font-size: 12.5px; color: var(--ink-faint); }

.content { padding: 26px 28px 60px; width: 100%; }

/* ─── CARDS / PAINEIS ───────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-head h2 { font-size: 15px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px; }

/* ─── KPI CARDS ─────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--brand);
}
.kpi.ok::before     { background: var(--ok); }
.kpi.warn::before   { background: var(--warn); }
.kpi.danger::before { background: var(--danger); }
.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.kpi-foot { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ─── FORM ──────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], select {
  width: 100%;
  padding: 9px 11px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.check input { width: auto; }

/* ─── BOTOES ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px var(--brand-glow);
}
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.btn-danger {
  background: var(--surface);
  border-color: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger-soft); text-decoration: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* ─── TABELAS ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.grid thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.grid tbody tr:nth-child(even) { background: var(--surface-alt); }
table.grid tbody tr:hover { background: var(--brand-soft); }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid .actions { white-space: nowrap; text-align: right; }

/* ─── BADGES ────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.badge-ok      { background: var(--ok-soft);     color: var(--ok); }
.badge-warn    { background: var(--warn-soft);   color: var(--warn); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--line-soft);   color: var(--ink-soft); }
.badge-brand   { background: var(--brand-soft);  color: var(--brand-dark); }

/* ─── FLASH ─────────────────────────────────────────────────────── */
.flash {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.flash-sucesso { background: var(--ok-soft);     color: var(--ok);     border-color: #c6e9d3; }
.flash-erro    { background: var(--danger-soft); color: var(--danger); border-color: #f1c9c9; }
.flash-aviso   { background: var(--warn-soft);   color: var(--warn);   border-color: #ecd9a8; }

/* ─── DETALHES / MISC ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-faint);
}
.empty-state .big { font-size: 30px; margin-bottom: 8px; }

details.collapse {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
details.collapse > summary {
  padding: 14px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 6px;
  font-weight: 700;
}
details.collapse[open] > summary::before { content: "\2212"; }
details.collapse > .collapse-body {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--line-soft);
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  width: 4px; height: 16px;
  background: var(--brand);
  border-radius: 2px;
}

.chart-box { position: relative; height: 280px; }

.pill-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.pill-filter .field { margin-bottom: 0; min-width: 160px; }

.muted { color: var(--ink-faint); font-size: 12.5px; }

.bar-mini {
  height: 6px;
  background: var(--line-soft);
  border-radius: 100px;
  overflow: hidden;
  min-width: 70px;
}
.bar-mini > span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 100px;
}

/* ─── RESPONSIVO ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform .2s;
    z-index: 50;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex !important; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 0 16px; }
}
.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,29,33,0.4);
  z-index: 40;
}
.scrim.show { display: block; }

/* ─── Aluno fora de vigencia ────────────────────────────────────── */
.expirado { text-decoration: line-through; color: var(--ink-faint); }

