@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --gold-dark:   #A07830;
  --navy:        #0F172A;
  --navy-2:      #1E293B;
  --navy-3:      #334155;
  --surface:     #0A0F1E;
  --surface-2:   #111827;
  --surface-3:   #1F2937;
  --border:      rgba(201, 168, 76, 0.2);
  --border-hover:rgba(201, 168, 76, 0.5);
  --text:        #F1F5F9;
  --text-muted:  #94A3B8;
  --text-dim:    #64748B;
  --success:     #22C55E;
  --danger:      #EF4444;
  --warning:     #F59E0B;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.15);
  --transition:  0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(10, 15, 30, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text) !important;
}
/* ── Ícones ───────────────────────────────────────────────────────────────
   Os ícones da interface são SVG inline, não emoji: emoji muda de desenho a
   cada sistema operacional e não combina com um produto que entrega documento
   jurídico. O tamanho vem do font-size do slot (1em), então basta trocar a
   fonte do contêiner para escalar o ícone junto. */
.icone {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
}
.brand-gold { color: var(--gold); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-user { display: flex; align-items: center; gap: 8px; }
.navbar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
}
.navbar-links { display: flex; gap: 4px; }
.navbar-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  box-shadow: 0 2px 12px rgba(201,168,76,0.3);
}
.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--gold);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(201,168,76,0.08);
  color: var(--gold-light);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }

.btn-sm  { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg  { padding: 14px 32px; font-size: 1rem; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); }
.card-gold {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #FCA5A5; }
.alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: #86EFAC; }
.alert-info    { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.3); color: var(--gold-light); }

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  background: var(--surface-3);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text);
}
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-gold    { background: rgba(201,168,76,0.2); color: var(--gold); border: 1px solid var(--border-hover); }
.badge-green   { background: rgba(34,197,94,0.15); color: #86EFAC; }
.badge-muted   { background: rgba(255,255,255,0.05); color: var(--text-dim); }

/* ── Spinner ─────────────────────────────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── App Layout (sidebar) ─────────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
}
.sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.06);
  border-left-color: var(--gold);
}
.menu-icon { font-size: 1.1rem; }
.main-content { padding: 32px; overflow-y: auto; }

/* ── Public pages (landing, login, cadastro) ─────────────────────────────── */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}
.auth-brand-icon { font-size: 2.5rem; margin-bottom: 8px; color: var(--gold); }
.auth-brand h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-brand p  { color: var(--text-muted); font-size: 0.9rem; }

/* ── Landing sections ─────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--gold);
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── CTA section ─────────────────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(201,168,76,0.05));
}
.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}
.cta-section p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ── Gold divider ─────────────────────────────────────────────────────────── */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 32px 0;
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 1.8rem; color: var(--text); }
.page-header p  { color: var(--text-muted); margin-top: 6px; font-size: 0.95rem; }

/* ── Grid ──────────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── KPI Card ──────────────────────────────────────────────────────────────── */
.kpi-card { text-align: center; }
.kpi-card .kpi-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.kpi-card .kpi-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main-content { padding: 20px; }
}

/* Texto de apoio abaixo de um campo do formulário. */
.campo-ajuda {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.campo-ajuda strong { color: var(--text-muted); }
