/* =============================================================
   OGE-RR · Design System v3 (oficial — MIV-GOV-RR)
   Cores oficiais: #064975 (azul institucional) e #EFECEA (areia)
   Tipografia: Inter (fallback Unineue)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Cores OFICIAIS Governo de Roraima (Manual de Identidade Visual) */
  --c-azul:        #064975;     /* Azul institucional — avatar oficial */
  --c-azul-d:      #033554;
  --c-azul-l:      #E6EFF5;
  --c-areia:       #EFECEA;     /* Cor de fundo oficial */

  /* Cores OFICIAIS OGE-RR (extraídas da logo) */
  --c-oge-verde:   #1A8754;     /* Verde escuro do OGE */
  --c-oge-petr:    #176A6F;     /* Verde-petróleo do balão */
  --c-oge-amarelo: #F9C846;     /* Amarelo da estrela */

  /* Cores funcionais */
  --c-verde:       #1A8754;
  --c-verde-d:     #0F5C36;
  --c-amarelo:     #F9C846;
  --c-vermelho:    #C8102E;

  /* Texto e superfícies (LIGHT) */
  --c-bg:          #F5F3F0;
  --c-card:        #FFFFFF;
  --c-text:        #0F172A;
  --c-text-2:      #475569;
  --c-text-3:      #94A3B8;
  --c-border:      #E2E8F0;

  /* Estilos */
  --grad-header:   linear-gradient(135deg,#033554 0%,#064975 50%,#0A6FA8 100%);
  --grad-cta:      linear-gradient(135deg,#064975 0%,#0A6FA8 100%);
  --shadow-card:   0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lift:   0 10px 25px -5px rgba(6,73,117,.10), 0 4px 6px -2px rgba(15,23,42,.05);
  --shadow-cta:    0 8px 16px -4px rgba(6,73,117,.30);

  --r-sm: .5rem;  --r-md: .75rem;  --r-lg: 1rem;  --r-xl: 1.25rem;  --r-2xl: 1.5rem;
}

/* ───── DARK MODE ───── */
html[data-theme="dark"] {
  --c-azul:        #4DA3D6;
  --c-azul-d:      #064975;
  --c-azul-l:      #0F2A3F;
  --c-areia:       #1A1D24;
  --c-bg:          #0E1117;
  --c-card:        #161B22;
  --c-text:        #E6EDF3;
  --c-text-2:      #B1BAC4;
  --c-text-3:      #7D8590;
  --c-border:      #30363D;
  --grad-header:   linear-gradient(135deg,#021A2A 0%,#033554 50%,#064975 100%);
  --shadow-card:   0 1px 3px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.20);
  --shadow-lift:   0 10px 25px -5px rgba(0,0,0,.50);
  --shadow-cta:    0 8px 16px -4px rgba(0,0,0,.50);
}

/* ───── Reset e base ───── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body {
  background: var(--c-bg); color: var(--c-text);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}

/* ───── Header institucional oficial ───── */
.oge-header {
  background: var(--grad-header);
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lift);
  position: relative;
  min-height: 76px;
}
.oge-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-oge-verde) 0%, var(--c-oge-amarelo) 50%, var(--c-vermelho) 100%);
}
.oge-header .logo-stack { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.oge-header .logo-oge {
  height: 48px; width: auto; padding: 6px 10px; background: #fff;
  border-radius: 8px; display: block; flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
}
.oge-header .titles { min-width: 0; flex: 1; }
.oge-header .t1 {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--c-oge-amarelo); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oge-header .t2 {
  font-size: 15px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oge-header .t3 {
  font-size: 11px; color: rgba(255,255,255,.75); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.oge-header .actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.oge-header .btn-back, .oge-header .icon-action {
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s; font-family: inherit;
  font-size: 18px;
}
.oge-header .btn-back:hover, .oge-header .icon-action:hover { background: rgba(255,255,255,.28); }

/* Em mobile: header ocupa 2 linhas (logo+títulos em cima, ações embaixo se necessário) */
@media (max-width: 480px) {
  .oge-header { padding: 12px 14px; gap: 10px; }
  .oge-header .logo-oge { height: 44px; padding: 5px 8px; }
  .oge-header .t2 { font-size: 14px; }
  .oge-header .t3 { font-size: 10.5px; }
}

/* Rodapé institucional com brasão Governo */
.oge-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-card);
  padding: 18px 20px;
  text-align: center;
  margin-top: 40px;
}
.oge-footer .gov-stack {
  display: inline-flex; align-items: center; gap: 14px;
  flex-wrap: wrap; justify-content: center;
}
.oge-footer img { height: 36px; opacity: .9; }
.oge-footer p { font-size: 11px; color: var(--c-text-3); margin: 8px 0 0; line-height: 1.5; }

/* ───── Botões ───── */
.btn {
  font-family: inherit; font-weight: 600; border-radius: var(--r-lg);
  cursor: pointer; transition: all .2s; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary {
  background: var(--c-azul); color: #fff;
  padding: 14px 22px; font-size: 15px; min-height: 48px;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--c-azul-d); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-cta {
  background: var(--grad-cta); color: #fff;
  padding: 18px 28px; font-size: 17px; min-height: 60px;
  border-radius: var(--r-xl); box-shadow: var(--shadow-cta);
  width: 100%; font-weight: 700;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -4px rgba(6,73,117,.45); }

.btn-success { background: var(--c-verde); color: #fff; }
.btn-success:hover { background: var(--c-verde-d); }

.btn-ghost {
  background: transparent; color: var(--c-text-2);
  border: 1px solid var(--c-border);
  padding: 12px 18px; font-size: 14px; min-height: 44px;
}
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text); }

.btn-outline-blue {
  background: var(--c-card); color: var(--c-azul);
  border: 1px solid var(--c-azul-l);
  padding: 10px 16px; font-size: 13px; min-height: 38px; font-weight: 600;
}
.btn-outline-blue:hover { background: var(--c-azul-l); }

.btn-outline-green { background: var(--c-card); color: var(--c-verde-d); border: 1px solid #BBF7D0; padding: 10px 16px; font-size: 13px; min-height: 38px; font-weight: 600; }
.btn-outline-green:hover { background: #ECFDF5; }
html[data-theme="dark"] .btn-outline-green { color: #4ADE80; border-color: #166534; background: #14201A; }
html[data-theme="dark"] .btn-outline-green:hover { background: #1A2E22; }

.btn-outline-red { background: var(--c-card); color: var(--c-vermelho); border: 1px solid #FECACA; padding: 10px 16px; font-size: 13px; min-height: 38px; font-weight: 600; }
.btn-outline-red:hover { background: #FEF2F2; }
html[data-theme="dark"] .btn-outline-red { color: #FB7185; border-color: #7F1D1D; background: #20131A; }

/* ───── Cards ───── */
.card {
  background: var(--c-card); border-radius: var(--r-xl); padding: 20px;
  box-shadow: var(--shadow-card); border: 1px solid var(--c-border);
}
.card-pad { padding: 24px; }

/* ───── Inputs ───── */
.input, .select, .textarea {
  width: 100%; padding: 14px 16px; font-size: 16px; line-height: 1.4;
  background: var(--c-card); color: var(--c-text);
  border: 1.5px solid var(--c-border); border-radius: var(--r-lg);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--c-azul);
  box-shadow: 0 0 0 4px rgba(6,73,117,.12);
}
.input-label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-2); margin-bottom: 6px; }
.input-big { padding: 18px 20px; font-size: 18px; min-height: 60px; }

/* ───── Opções clicáveis (multipla escolha / likert) ───── */
.opt {
  width: 100%; padding: 18px 20px; font-size: 16px; font-weight: 500;
  background: var(--c-card); color: var(--c-text);
  border: 2px solid var(--c-border); border-radius: var(--r-lg);
  cursor: pointer; text-align: left; transition: all .15s;
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; font-family: inherit;
}
.opt:hover { border-color: var(--c-azul); background: var(--c-azul-l); }
.opt.selected {
  border-color: var(--c-azul); background: var(--c-azul-l);
  color: var(--c-azul-d); font-weight: 600;
}
html[data-theme="dark"] .opt.selected { color: #B7E0F5; }
.opt .radio {
  width: 24px; height: 24px; border-radius: 999px;
  border: 2px solid var(--c-border); flex: 0 0 24px;
  position: relative; transition: all .15s;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-card);
}
.opt.selected .radio {
  border-color: var(--c-azul);
  background: var(--c-azul);
  box-shadow: 0 0 0 4px rgba(6,73,117,.15);
}
.opt.selected .radio::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #fff;
}

/* ───── Badge / Pill ───── */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 999px; letter-spacing: .3px; }
.pill-blue   { background: var(--c-azul-l); color: var(--c-azul-d); }
.pill-green  { background: #D1FAE5; color: #065F46; }
.pill-yellow { background: #FEF3C7; color: #854D0E; }
.pill-red    { background: #FEE2E2; color: #991B1B; }
.pill-gray   { background: var(--c-bg); color: var(--c-text-2); }
.pill-purple { background: #EDE9FE; color: #5B21B6; }

html[data-theme="dark"] .pill-green  { background: #14302C; color: #4ADE80; }
html[data-theme="dark"] .pill-red    { background: #2A1414; color: #FB7185; }
html[data-theme="dark"] .pill-yellow { background: #2A1F12; color: #FBBF24; }
html[data-theme="dark"] .pill-purple { background: #221A33; color: #C4B5FD; }

/* ───── NPS (botões 0-10) ───── */
.nps-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; }
@media (min-width: 480px) { .nps-grid { grid-template-columns: repeat(11,1fr); gap: 8px; } }
.nps-btn {
  height: 56px; border-radius: var(--r-md); border: 2px solid transparent;
  font-weight: 800; font-size: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.nps-det { background:#FEE2E2; color:#991B1B; }
.nps-neu { background:#FEF3C7; color:#854D0E; }
.nps-pro { background:#D1FAE5; color:#065F46; }
.nps-sel { transform: scale(1.08); box-shadow: 0 0 0 3px var(--c-azul); border-color: var(--c-azul); }
html[data-theme="dark"] .nps-det { background:#3A1A1A; color:#FCA5A5; }
html[data-theme="dark"] .nps-neu { background:#3A2E18; color:#FCD34D; }
html[data-theme="dark"] .nps-pro { background:#15331E; color:#86EFAC; }

/* ───── Progresso ───── */
.progress-track { height: 4px; background: rgba(255,255,255,.20); width: 100%; }
.progress-fill { height: 100%; background: linear-gradient(90deg,var(--c-oge-amarelo) 0%,#FFFFFF 100%); transition: width .3s; }

/* ───── Toast ───── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--c-text); color: var(--c-card); padding: 14px 22px; border-radius: var(--r-lg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lift); }

/* ───── Switch dark mode ───── */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 999px;
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s; font-family: inherit;
  font-size: 18px;
}
.theme-toggle:hover { background: rgba(255,255,255,.28); }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

/* ───── Utilitários ───── */
.center-screen { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fade-in { animation: fadeIn .35s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.cursor-pointer { cursor: pointer; }

/* ───── Acessibilidade ───── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
*:focus-visible { outline: 2px solid var(--c-azul); outline-offset: 2px; }

/* ───── Estados vazios ───── */
.empty { text-align: center; padding: 64px 20px; color: var(--c-text-3); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--c-text-3); opacity: .5; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--c-text-2); margin-bottom: 6px; }
.empty-sub { font-size: 14px; color: var(--c-text-3); }

/* ───── Stripe (bandeira RR) ───── */
.stripe-rr { height: 4px; background: linear-gradient(90deg, var(--c-oge-verde) 0%, var(--c-oge-amarelo) 50%, var(--c-vermelho) 100%); }

/* ───── Print ───── */
@page { size: A4; margin: 14mm; }
@media print {
  body { background: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
  html[data-theme="dark"] {
    --c-bg: #fff; --c-card: #fff; --c-text: #0F172A; --c-text-2: #475569;
    --c-border: #E2E8F0;
  }
}
