/* ═══════════════════════════════════════════════════════════════════════════
   IFL-SP Painel Admin — Design System
   Reaproveita os tokens do site público (paleta, tipografia, sombras),
   mas com adaptações ergonômicas pra sessões longas de avaliação:
   - background mais pálido (menos cansativo)
   - cards opacos (sem glassmorphism)
   - densidade compacta
   - Allura só no rodapé do login (legibilidade nas telas operacionais)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────────────
   1. TOKENS
   ─────────────────────────────────────────────────────────────────────────── */
:root {
  /* Cores primárias da marca (Manual oficial IFL-SP) */
  --gold:           #a5801b;   /* Pantone CF 10858 */
  --gold-deep:      #8a6a17;
  --gold-dark:      #715a23;
  --navy:           #0f206c;   /* Pantone 2756 C */
  --navy-dark:      #091552;

  /* Secundárias */
  --champagne:      #d4bf8d;
  --champagne-soft: #ede2c8;
  --gray-soft:      #9d9fa2;
  --text-deep:      #2a2a2a;
  --text-mute:      #6a6a6a;
  --text-faint:     #9a9a9a;

  /* Background neutro pra painel — menos saturado que o site público */
  --white:          #ffffff;
  --bg-base:        #f7f5ef;   /* cream pálido — base */
  --bg-surface:     #ffffff;   /* cards */
  --bg-hover:       #faf6ee;
  --border:         #e8e2d0;
  --border-strong:  #d4cdb6;

  /* Status (recomendação IA) — paleta do doc técnico, dessaturada */
  --rec-forte-aprov: #15803d;   /* verde */
  --rec-aprov:       #b08c1f;   /* amarelo dourado, harmoniza com a marca */
  --rec-neutro:      #6a6a6a;   /* cinza */
  --rec-reprov:      #b35817;   /* laranja queimado */
  --rec-forte-reprov:#9a1c1c;   /* vermelho escuro */
  --rec-pendente:    #9d9fa2;

  /* Tipografia */
  --font-display: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-script:  'Allura', 'Brush Script MT', cursive;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  /* Escala compacta pra painel */
  --fs-xs:   0.75rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  2.5rem;
  --fs-kpi:  2.75rem;

  /* Espaçamento compacto */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Bordas */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Sombras sutis */
  --sh-sm:  0 1px 2px rgba(15, 32, 108, 0.04), 0 1px 3px rgba(165, 128, 27, 0.04);
  --sh-md:  0 2px 6px rgba(15, 32, 108, 0.06), 0 4px 12px rgba(165, 128, 27, 0.05);
  --sh-lg:  0 8px 20px rgba(15, 32, 108, 0.08), 0 12px 32px rgba(165, 128, 27, 0.06);
  --sh-focus: 0 0 0 3px rgba(165, 128, 27, 0.18);

  /* Transições */
  --t-fast: 140ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --header-h: 64px;
  --container-max: 1280px;
}

/* ───────────────────────────────────────────────────────────────────────────
   2. RESET + BASE
   ─────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; font-size: 16px; }

body {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-deep);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--gold-deep); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection { background: var(--gold); color: var(--white); }

/* ───────────────────────────────────────────────────────────────────────────
   3. UTILITIES
   ─────────────────────────────────────────────────────────────────────────── */
.script { font-family: var(--font-script); font-weight: 400; color: var(--navy); letter-spacing: 0.02em; }
.gold { color: var(--gold); }
.navy { color: var(--navy); }
.mute { color: var(--text-mute); }
.faint { color: var(--text-faint); }
.center { text-align: center; }

/* ───────────────────────────────────────────────────────────────────────────
   4. LOGIN — tela única, foco no formulário
   ─────────────────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 80% -10%, rgba(165, 128, 27, 0.12), transparent 50%),
    radial-gradient(circle at 10% 110%, rgba(15, 32, 108, 0.08),  transparent 50%),
    var(--bg-base);
}

.login-header {
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.login-header img { height: 36px; width: auto; }

.login-card {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100vw - 2 * var(--sp-5)));
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-7) var(--sp-6);
  box-shadow: var(--sh-lg);
}

.login-card h1 {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.login-card .subtitle {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-bottom: var(--sp-6);
}

.login-form { display: flex; flex-direction: column; gap: var(--sp-4); }

.field { display: flex; flex-direction: column; gap: var(--sp-1); }

.field label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}

.field input {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-md);
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-deep);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: var(--sh-focus);
}

.btn-primary {
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--r-md);
  transition: background var(--t-fast), transform var(--t-fast);
  letter-spacing: 0.02em;
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-dark);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid transparent;
}

.alert-error {
  background: #fef2f2;
  color: #9a1c1c;
  border-color: #fecaca;
}

.login-footer {
  padding: var(--sp-5);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-mute);
}

.login-footer .tagline {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: var(--sp-1);
  display: block;
  line-height: 1.2;
}

/* ───────────────────────────────────────────────────────────────────────────
   5. APP SHELL — header sólido + main
   ─────────────────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-5);
  padding: 0 var(--sp-6);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.app-header__brand img { height: 32px; width: auto; }

.app-header__brand .name {
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--navy);
  letter-spacing: 0.01em;
}

.app-header__brand .name small {
  font-weight: 400;
  color: var(--text-mute);
  font-size: var(--fs-xs);
  margin-left: var(--sp-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-nav {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
}

.app-nav a {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.app-nav a:hover { color: var(--navy); background: var(--bg-hover); }
.app-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

.app-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}

.app-user .name { color: var(--text-deep); font-weight: 500; }
.app-user .role { color: var(--text-faint); font-size: var(--fs-xs); }

.btn-logout {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.btn-logout:hover { color: var(--rec-forte-reprov); background: #fef2f2; }

.app-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-6);
}

.page-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-1);
}

.page-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-bottom: var(--sp-6);
}

/* ───────────────────────────────────────────────────────────────────────────
   6. DASHBOARD — barra de progresso + cards de KPI
   ─────────────────────────────────────────────────────────────────────────── */
.progress-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  box-shadow: var(--sh-sm);
}

.progress-block__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-3);
}

.progress-block__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
}

.progress-block__value {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--navy);
}

.progress-block__value strong { color: var(--gold); }

.progress-bar {
  height: 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 0;
  transition: width var(--t-base);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.kpi-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.kpi-card__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
}

.kpi-card__value {
  font-size: var(--fs-kpi);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-card__delta {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.kpi-card__delta.positive { color: var(--rec-forte-aprov); }

/* Cards especiais — distribuição IA */
.ia-distrib {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-top: var(--sp-6);
  box-shadow: var(--sh-sm);
}

.ia-distrib h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-4);
}

.ia-distrib__row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.ia-distrib__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.ia-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ia-dot.forte-aprov   { background: var(--rec-forte-aprov); }
.ia-dot.aprov         { background: var(--rec-aprov); }
.ia-dot.neutro        { background: var(--rec-neutro); }
.ia-dot.reprov        { background: var(--rec-reprov); }
.ia-dot.forte-reprov  { background: var(--rec-forte-reprov); }

.ia-distrib__bar {
  height: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.ia-distrib__bar-fill {
  height: 100%;
  transition: width var(--t-base);
}

.ia-distrib__count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
  font-size: var(--fs-sm);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-base) 0%, var(--bg-hover) 50%, var(--bg-base) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
  color: transparent;
}

@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───────────────────────────────────────────────────────────────────────────
   7. CANDIDATOS — tabela de lista + filtros (Sprint 2)
   ─────────────────────────────────────────────────────────────────────────── */
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.toolbar__search {
  position: relative;
}

.toolbar__search input {
  width: 100%;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) calc(var(--sp-3) + 18px);
  font-size: var(--fs-sm);
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.toolbar__search input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: var(--sh-focus);
}

.toolbar__search::before {
  content: '⌕';
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: var(--fs-md);
}

.toolbar select {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
}

.toolbar select:focus {
  outline: none;
  border-color: var(--gold);
}

.toolbar__count {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  white-space: nowrap;
}

.tabela-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.tabela thead th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 600;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.tabela thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.tabela thead th.sortable:hover {
  color: var(--navy);
}

.tabela thead th.sortable.active {
  color: var(--navy);
}

.tabela tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  cursor: pointer;
}

.tabela tbody tr:last-child {
  border-bottom: none;
}

.tabela tbody tr:hover {
  background: var(--bg-hover);
}

.tabela tbody td {
  padding: var(--sp-3) var(--sp-4);
  vertical-align: middle;
}

.tabela tbody td.tabela__nome {
  font-weight: 500;
  color: var(--text-deep);
}

.tabela tbody td.tabela__email {
  color: var(--text-mute);
  font-size: var(--fs-xs);
}

.tabela tbody td.tabela__score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: center;
}

.tabela__empty {
  padding: var(--sp-7);
  text-align: center;
  color: var(--text-mute);
  font-size: var(--fs-sm);
}

/* Status badges (pagamento + decisão) */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill, 999px);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge.pago        { background: #dcfce7; color: #166534; }
.badge.aguardando  { background: #fef3c7; color: #92400e; }
.badge.pendente    { background: #fef3c7; color: #92400e; }
.badge.aprovado    { background: #dcfce7; color: #166534; }
.badge.reprovado   { background: #fee2e2; color: #991b1b; }
.badge.aguardando-app { background: #f3f4f6; color: #6b7280; }

/* Pílula de recomendação IA inline na tabela */
.ia-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-deep);
}

.ia-pill .ia-dot {
  width: 8px;
  height: 8px;
}

/* ───────────────────────────────────────────────────────────────────────────
   8. CANDIDATO — tela de perfil individual
   ─────────────────────────────────────────────────────────────────────────── */
.perfil-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.perfil-header__voltar {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-bottom: var(--sp-2);
}

.perfil-header__voltar:hover {
  color: var(--navy);
}

.perfil-header__nome {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-1);
}

.perfil-header__meta {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.perfil-header__meta span::before {
  content: '·';
  margin-right: var(--sp-3);
  color: var(--text-faint);
}

.perfil-header__meta span:first-child::before {
  content: '';
  margin: 0;
}

.perfil-header__score {
  flex-shrink: 0;
  text-align: center;
}

.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-weight: 700;
  position: relative;
  background: var(--bg-base);
  border: 4px solid var(--rec-neutro);
}

.score-badge.forte-aprov   { border-color: var(--rec-forte-aprov); }
.score-badge.aprov         { border-color: var(--rec-aprov); }
.score-badge.neutro        { border-color: var(--rec-neutro); }
.score-badge.reprov        { border-color: var(--rec-reprov); }
.score-badge.forte-reprov  { border-color: var(--rec-forte-reprov); }

.score-badge__valor {
  font-size: 1.75rem;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-badge__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 500;
  margin-top: 2px;
}

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  box-shadow: var(--sh-sm);
}

.section-card h2 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-card h2 .badge {
  margin-left: auto;
}

.dados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4) var(--sp-5);
}

.dados-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dados-item__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 600;
}

.dados-item__valor {
  font-size: var(--fs-sm);
  color: var(--text-deep);
  word-break: break-word;
}

.dados-item__valor.empty {
  color: var(--text-faint);
  font-style: italic;
}

.dados-item__valor a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Application — Q&A */
.qa-bloco {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
}

.qa-bloco:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qa-bloco:first-child {
  padding-top: 0;
}

.qa-bloco__pergunta {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.qa-bloco__resposta {
  font-size: var(--fs-sm);
  color: var(--text-deep);
  white-space: pre-wrap;
  line-height: 1.6;
}

.qa-bloco__resposta.empty {
  color: var(--text-faint);
  font-style: italic;
}

/* Análise IA — pontos fortes e flags */
.ia-bloco h3 {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-2);
}

.ia-bloco h3:first-child {
  margin-top: 0;
}

.ia-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ia-lista li {
  position: relative;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-deep);
  border-bottom: 1px dashed var(--border);
}

.ia-lista li:last-child {
  border-bottom: none;
}

.ia-lista.fortes li::before {
  content: '✓';
  position: absolute;
  left: var(--sp-2);
  color: var(--rec-forte-aprov);
  font-weight: 700;
}

.ia-lista.flags li::before {
  content: '!';
  position: absolute;
  left: 12px;
  color: var(--rec-forte-reprov);
  font-weight: 700;
}

.ia-justificativa {
  font-size: var(--fs-sm);
  color: var(--text-deep);
  line-height: 1.7;
  white-space: pre-wrap;
  background: var(--bg-base);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--gold);
}

.ia-breakdown {
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--text-mute);
  white-space: pre-wrap;
  background: var(--bg-base);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  margin-top: var(--sp-2);
}

/* Decisão — botões grandes + textarea */
.decisao-historico {
  background: var(--champagne-soft);
  border-left: 3px solid var(--gold);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-5);
}

.decisao-historico strong {
  color: var(--navy);
}

.decisao-acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.btn-decisao {
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-md);
  font-weight: 600;
  border-radius: var(--r-md);
  border: 2px solid;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.btn-aprovar {
  border-color: var(--rec-forte-aprov);
  color: var(--rec-forte-aprov);
}

.btn-aprovar:hover {
  background: var(--rec-forte-aprov);
  color: var(--white);
}

.btn-aprovar.ativa {
  background: var(--rec-forte-aprov);
  color: var(--white);
}

.btn-reprovar {
  border-color: var(--rec-forte-reprov);
  color: var(--rec-forte-reprov);
}

.btn-reprovar:hover {
  background: var(--rec-forte-reprov);
  color: var(--white);
}

.btn-reprovar.ativa {
  background: var(--rec-forte-reprov);
  color: var(--white);
}

.btn-decisao:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.decisao-comentario {
  width: 100%;
  min-height: 100px;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-family: inherit;
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-deep);
  resize: vertical;
  line-height: 1.5;
}

.decisao-comentario:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: var(--sh-focus);
}

.decisao-comentario__hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-mute);
  margin-top: var(--sp-1);
}

/* ───────────────────────────────────────────────────────────────────────────
   9. MODAL (confirmação de decisão)
   ─────────────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 108, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--sp-5);
  animation: modal-fade var(--t-fast);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--sh-lg);
}

.modal h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-3);
}

.modal p {
  font-size: var(--fs-sm);
  color: var(--text-deep);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
}

.modal__acoes {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

.btn-secundario {
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-mute);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.btn-secundario:hover {
  color: var(--navy);
  border-color: var(--border-strong);
}

/* Toast (mensagem fugaz após salvar decisão) */
.toast {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  background: var(--navy);
  color: var(--white);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  box-shadow: var(--sh-lg);
  z-index: 1100;
  animation: toast-slide var(--t-base);
}

.toast.error {
  background: var(--rec-forte-reprov);
}

@keyframes toast-slide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ───────────────────────────────────────────────────────────────────────────
   10. RESPONSIVO
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-header { padding: 0 var(--sp-4); gap: var(--sp-3); }
  .app-header__brand .name small { display: none; }
  .app-nav { display: none; }
  .app-main { padding: var(--sp-4); }
  .ia-distrib__row { grid-template-columns: 130px 1fr 40px; }
  .kpi-card__value { font-size: var(--fs-2xl); }

  .toolbar { grid-template-columns: 1fr; }
  .tabela tbody td.tabela__email { display: none; }
  .perfil-header { flex-direction: column; }
  .decisao-acoes { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .login-card { padding: var(--sp-5) var(--sp-4); }
  .tabela thead th:nth-child(3),
  .tabela tbody td:nth-child(3) { display: none; } /* esconde data inscrição */
}
