/* =========================================================
   styles.css — tema leve, profissional e responsivo
   Pensado para marketing; header claro para logo escura.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #0f172a;         /* slate-900 */
  --text-muted: #475569;   /* slate-600 */
  --border: #e5e7eb;       /* gray-200 */
  --accent: #2563eb;       /* azul primário */
  --accent-2: #0ea5e9;     /* azul secundário */
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 8px 30px rgba(2, 6, 23, .06);
  --shadow-2: 0 12px 40px rgba(2, 6, 23, .08);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
               "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* ---------- Reset/Normalize suave ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, #f3f6ff 0, rgba(255,255,255,0) 60%),
    radial-gradient(1200px 600px at 110% 110%, #f4fff6 0, rgba(255,255,255,0) 60%),
    var(--bg);
  font: 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Faixa de marca (clara p/ logo escura) ---------- */
.brand-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.brand-wrap {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand-logo {
  width: auto; height: 36px; display: inline-block;
  /* a logo é escura: mantenha a barra clara para contraste */
}
.brand-title {
  font-weight: 700; font-size: 1.05rem; letter-spacing: .2px;
}

/* ---------- Container principal ---------- */
.container {
  max-width: 1100px;
  margin: 26px auto;
  padding: 0 20px 40px;
}

/* ---------- Títulos e textos ---------- */
h1, h2, h3 { margin: 0 0 10px }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
.lead { color: var(--text-muted); margin-bottom: 18px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
  transition: transform .08s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card + .card { margin-top: 16px; }
.card-header { font-weight: 700; margin-bottom: 10px; }

/* ---------- Grid responsiva ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.row-2col {
  display: grid; gap: 10px 16px;
  grid-template-columns: 220px 1fr;
}
@media (max-width: 640px) {
  .row-2col { grid-template-columns: 1fr; }
}

/* ---------- Pares rótulo/valor ---------- */
.kv { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .lbl { color: var(--text-muted); }
.kv .val { font-weight: 600; word-break: break-word; }

/* ---------- Formulários ---------- */
.form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.help { font-size: .92rem; color: var(--text-muted); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none; font-weight: 700; cursor: pointer;
  transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn.primary {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  color: var(--text);
}
.btn.accent {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
}

/* ---------- Tabelas ---------- */
.table-wrap { overflow: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-1); }
table {
  width: 100%; border-collapse: collapse; min-width: 720px;
}
th, td {
  padding: 12px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  position: sticky; top: 0; z-index: 1;
}
tbody tr:hover { background: #f8fbff; }

/* ---------- Alertas ---------- */
.alert {
  padding: 12px 14px; border-radius: 10px; border: 1px solid;
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff;
}
.alert.ok     { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.alert.warn   { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.alert.error  { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

/* ---------- Navegação simples (opcional) ---------- */
.nav {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.nav a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  color: var(--text-muted); border: 1px solid transparent;
}
.nav a:hover { border-color: var(--border); background: var(--surface-2); }
.nav a.active { color: var(--text); border-color: var(--accent); }

/* ---------- Rodapé ---------- */
.footer {
  margin-top: 22px; padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: .95rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- Utilitários ---------- */
.muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.center { text-align: center; }
.mt-0{margin-top:0}.mt-4{margin-top:16px}.mt-6{margin-top:24px}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:8px}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}
.w-100 { width: 100%; }

/* ---------- Animações sutis ---------- */
.fade-in { animation: fade .18s ease-out both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

/* ---------- Modo escuro opcional (respeita sistema) ----------
   Observação: a brand-bar continua CLARA para preservar contraste da logo escura. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #0f172a;
    --surface-2: #0b1220;
    --text: #e5e7eb;
    --text-muted: #94a3b8;
    --border: #1f2937;
  }
  body { background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,.10) 0, rgba(255,255,255,0) 50%),
    radial-gradient(1200px 600px at 110% 110%, rgba(14,165,233,.10) 0, rgba(255,255,255,0) 50%),
    var(--bg);
  }
  /* mantém header claro para logo escura */
  .brand-bar { background: #ffffff; border-bottom: 1px solid #e5e7eb; }
  .brand-title { color: #0f172a; }
  .btn.primary { background: linear-gradient(180deg, #ffffff, #f6f9ff); color: #0f172a; }
}
