/* ========== THEME SYSTEM ========== */
:root[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #121b2e;
  --panel-2: #1a2540;
  --border: #223056;
  --text: #e6ecf5;
  --text-dim: #8ea0c4;
  --text-muted: #6277a0;
  --accent: #f0b429;
  --apm: #3b82f6;
  --dompra: #f97316;
  --externo: #ef4444;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --card-hover: rgba(255,255,255,0.04);
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --border: #d8dee9;
  --text: #1a2540;
  --text-dim: #5a6987;
  --text-muted: #8a98b3;
  --accent: #c9910a;
  --apm: #2563eb;
  --dompra: #ea580c;
  --externo: #dc2626;
  --shadow: 0 4px 20px rgba(30,40,80,0.06);
  --card-hover: rgba(0,0,0,0.02);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.25s, color 0.25s;
}
body { min-height: 100vh; }

/* ========== NAV BAR ========== */
.nav {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1220;
  font-weight: 700;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
}
.nav-menu {
  display: flex;
  gap: 4px;
}
.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}
.nav-link:hover { background: var(--card-hover); color: var(--text); }
.nav-link.active { color: var(--text); background: var(--panel-2); }
.nav-link.soon::after {
  content: "PRÓXIMO";
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 8px;
  background: var(--accent);
  color: #0b1220;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.05em;
}
.nav-link.soon { opacity: 0.6; cursor: not-allowed; }
.nav-link.soon:hover { background: transparent; color: var(--text-dim); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.last-update {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ========== CONTAINERS ========== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 64px;
}

/* ========== HEADINGS ========== */
.page-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-header .subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 6px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ========== BUTTONS & CARDS ========== */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  padding: 32px 20px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .nav { padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .nav-left { flex-wrap: wrap; gap: 16px; }
  .nav-menu { flex-wrap: wrap; }
  .main-container { padding: 20px; }
  .page-header h1 { font-size: 26px; }
  .last-update { display: none; }
}
