@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
html, body, h1, h2, h3, h4, h5, h6, p, a, li, span, input, button, textarea, select {
  font-family: 'Inter', Arial, sans-serif !important;
}
:root {
  --bg: #0b1220;
  --surface: #f5f8fc;
  --card: #ffffff;
  --line: #dbe6f3;
  --line-strong: #c8d7ea;
  --text: #10223b;
  --muted: #61728d;
  
  /* NOVA BASE AZUL: Cores otimizadas para contraste profissional */
  --primary: #2563eb;       /* Azul base forte e acessível */
  --primary-dark: #1e40af;  /* Azul escuro para hover perfeito */
  --primary-soft: #eff6ff;  /* Azul bem claro para fundos secundários */
  
  --success-bg: #eaf8ef;
  --success-text: #166534;
  --warning-bg: #fff6e6;
  --warning-text: #9a5d00;
  --error-bg: #fdeceb;
  --error-text: #b42318;
  --muted-pill: #eef2f7;
  --shadow: 0 18px 50px rgba(13, 27, 62, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  /* NOVA FONTE PROFISSIONAL */
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #eef4fb 0%, #f8fbff 25%, #f5f8fc 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body, input, button, textarea {
  font-family: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

.wrap {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 230, 243, 0.85);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}
.brand strong {
  display: block;
  font-size: 1rem;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.main-nav a {
  font-weight: 600;
  color: var(--text);
}

.page-body {
  flex: 1;
  padding: 32px 0 52px;
}

.footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}
.footer-inner p,
.footer-links {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hero-card,
.panel-card,
.access-card {
  background: var(--card);
  border: 1px solid rgba(216, 227, 240, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px);
  gap: 28px;
  padding: 34px;
  overflow: hidden;
  position: relative;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 66%);
}
.hero-copy h1,
.panel-card h1,
.access-card h1,
.narrow-shell h1,
.admin-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.hero-copy p,
.large {
  font-size: 1.06rem;
  line-height: 1.72;
}
.hero-stats,
.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.metric-card.compact { padding: 18px; }
.metric-number {
  display: block;
  font-size: clamp(1.9rem, 2.5vw, 2.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.metric-number.small-number {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-top: 8px;
}
.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta-row,
.actions,
.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.inline-form label { min-width: 220px; }

/* ----------------------------------------------------
   BOTÕES - CORES E CONTRASTES CORRIGIDOS 
   ---------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid transparent; /* Adicionado para evitar pulo de layout na troca pra ghost */
  border-radius: 14px;
  background: var(--primary); /* Fundo sólido em vez de gradiente para melhor contraste */
  color: #ffffff; /* Letra SEMPRE branca no botão principal */
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
  text-decoration: none;
}
.button:hover {
  text-decoration: none;
  transform: translateY(-2px);
  background: var(--primary-dark);
  color: #ffffff; /* Letra branca mantida no hover */
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}
.button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Botões Transparentes/Bordas (Ghost) */
.button.ghost, .button-ghost {
  background: transparent;
  color: var(--primary); /* Texto azul no estado normal */
  border: 1px solid var(--primary);
  box-shadow: none;
}
.button.ghost:hover, .button-ghost:hover {
  background: var(--primary);
  color: #ffffff; /* Texto branco no hover para garantir leitura perfeita */
  border-color: var(--primary);
}

/* Botões de Erro/Aviso */
.button.danger {
  background: #dc2626; /* Vermelho padrão acessível */
  color: #ffffff;
}
.button.danger:hover {
  background: #b91c1c; /* Vermelho escuro */
  color: #ffffff;
}

/* Outros botões específicos da sua grid */
.button-primary { 
  background: var(--primary); 
  color: #ffffff; 
}
.button-primary:hover { 
  background: var(--primary-dark); 
  color: #ffffff;
}

.button-secondary { 
  background: var(--primary-soft); 
  color: var(--primary-dark); 
  border-color: #cfe0ff; 
}
.button-secondary:hover { 
  background: var(--primary); /* Inverte para fundo escuro */
  color: #ffffff; /* Letra branca no hover */
}

.button-wide { min-width: min(100%, 340px); }
/* ---------------------------------------------------- */

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.flash {
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid transparent;
  font-weight: 600;
}
.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #c7ecd3;
}
.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #f5c7c1;
}

.section-gap { margin-top: 26px; }
.section-gap-sm { margin-top: 18px; }
.top-gap { margin-top: 22px; }
.top-gap-sm { margin-top: 12px; }
.stack-lg > * + * { margin-top: 18px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section-head,
.status-head,
.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.admin-hero {
  margin-bottom: 6px;
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 22px;
}
.access-card {
  padding: 30px;
}
.access-card-side {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.narrow-shell {
  width: min(720px, 100%);
  margin: 0 auto;
}
.verify-card,
.admin-login-card { padding: 34px; }

.notice {
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  line-height: 1.65;
}
.notice-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: #f6d89f;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}
.pill-success { background: var(--success-bg); color: var(--success-text); }
.pill-warning { background: var(--warning-bg); color: var(--warning-text); }
.pill-error { background: var(--error-bg); color: var(--error-text); }
.pill-muted { background: var(--muted-pill); color: #53627d; }
.small-pill { font-size: 0.75rem; padding: 6px 10px; }

label {
  display: block;
  font-weight: 700;
  color: var(--text);
}
input,
textarea, select {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  font-size: 0.98rem;
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 120px; }
input:focus,
textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.checkbox-row input {
  width: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.align-end {
  align-self: end;
  padding-bottom: 6px;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.85;
}
.feature-list.ordered { padding-left: 18px; }
.rich-copy,
.muted,
.empty-state,
.small {
  color: var(--muted);
}
.rich-copy {
  line-height: 1.8;
  font-size: 1rem;
}
.empty-state {
  padding: 10px 0 4px;
}
.small { font-size: 0.86rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.support-box,
.inset-card,
.mail-preview {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.support-box p,
.support-box strong { margin: 0; }
.support-box p { margin-top: 8px; color: var(--muted); line-height: 1.7; }

.mail-preview + .mail-preview { margin-top: 18px; }
.mail-preview h2 { margin: 0 0 12px; font-size: 1rem; }
.mail-preview-body {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: auto;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.slim-wrap table { min-width: 0; }
table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: #fff;
}
th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #f8fbff;
  color: #31425f;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
tr:last-child td { border-bottom: 0; }

.code-block,
code {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fbff;
  color: #21324f;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.code-block {
  margin-top: 6px;
  max-width: 100%;
}

.captcha-box {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 220px);
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fbff;
}
.captcha-box span {
  font-weight: 700;
  color: var(--text);
}
.captcha-box input { margin-top: 0; }

@media (max-width: 1040px) {
  .hero-card,
  .access-layout,
  .grid-2,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100vw - 22px, 100%);
  }
  .topbar-inner,
  .section-head,
  .status-head,
  .admin-hero,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-card,
  .panel-card,
  .access-card,
  .verify-card,
  .admin-login-card {
    padding: 22px;
  }
  .hero-stats,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .main-nav {
    gap: 12px;
  }
  .captcha-box {
    grid-template-columns: 1fr;
  }
  table { min-width: 560px; }
}

@media (max-width: 560px) {
  .hero-stats,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .button,
  .button-wide {
    width: 100%;
  }
  .inline-form,
  .actions,
  .cta-row {
    width: 100%;
  }
  .inline-form > * {
    width: 100%;
  }
}

.small-text {
  font-size: 0.9rem;
}

.upload-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.upload-head,
.compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

@media (max-width: 860px) {
  .file-meta-grid {
    grid-template-columns: 1fr;
  }

  .upload-head,
  .compact-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.section-gap { margin-top: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.section-head h2, .section-head h1 { margin: 4px 0 0; font-size: 1.45rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.compact-card { padding: 24px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea, .inline-form input, .inline-form select { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--text); }
.field textarea { resize: vertical; }
.form-grid { display: grid; gap: 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-span-2 { grid-column: 1 / -1; }
.checkbox-field { flex-direction: row; align-items: center; gap: 12px; }
.checkbox-field input { width: 18px; height: 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.table-shell { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-button { background: transparent; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.link-button.danger { color: var(--error-text); }
.files-grid { align-items: start; }
.hero-strip { display: flex; justify-content: space-between; gap: 20px; padding: 28px; }
.hero-strip-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.info-box { border: 1px solid #d8e5ff; background: #f7faff; border-radius: 16px; padding: 16px 18px; color: var(--text); }
.small-table { margin-top: 14px; }
.line-spacer { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.email-preview { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; background: #f8fbff; padding: 16px; border-radius: 14px; border: 1px solid var(--line); }
code { background: #eff4fb; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; }
.wide-shell { max-width: 980px; margin: 0 auto; }
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .dashboard-grid, .two-columns, .hero-strip { grid-template-columns: 1fr; display: grid; }
  .hero-strip-side { align-items: flex-start; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

.logo{
  width: 100px;
  height: auto;
}