:root {
  /* Youth Brand Colors */
  --bg-dark: #090e17;
  --surface: #111a2a;
  --surface-elevated: #1a273e;
  --surface-border: rgba(255, 255, 255, 0.05);

  --gold: #c8a96e;
  --gold-dim: rgba(200, 169, 110, 0.15);
  --teal: #2d6e7e;
  
  --text-primary: #f7f3ec;
  --text-muted: #8e99b0;
  --text-locked: #4b5563;

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'DM Sans', sans-serif;
  
  --radius: 8px;
  --transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

html.light-mode {
  --bg-dark: #fbfbfb;
  --surface: #ffffff;
  --surface-elevated: #f1f5f9;
  --surface-border: rgba(0, 0, 0, 0.08);

  --gold: #a37c35;
  --gold-dim: rgba(163, 124, 53, 0.15);
  --teal: #245865;
  
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --text-locked: #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Global Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  padding: 16px 34px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.menu-toggle {
  background: none;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--surface-elevated);
}

.site-title {
  font-family: var(--font-sans);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}

.site-subtitle {
  font-family: var(--font-sans);
  font-size: 6.5pt;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}



/* ── Sidebar & Overlay ────────────────────────────────────────────── */
.app-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--surface-border);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.5);
}

.app-sidebar.active {
  transform: translateX(0);
}

.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  padding: 30px 24px 20px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header .sh-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0;
}

.menu-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
}

.sb-nivel {
  font-family: var(--font-sans);
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 24px;
  margin-top: 32px;
  margin-bottom: 12px;
}
.sb-nivel:first-child { margin-top: 0; }

.sb-modulo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  padding: 0 24px;
  margin-bottom: 8px;
  font-weight: 500;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.sb-item:hover:not(.locked) {
  background: var(--surface-elevated);
  border-left-color: var(--teal);
  color: var(--text-primary);
}

.sb-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Área do Aluno (Dashboard Header) ────────────────────────────── */
.dashboard-header {
  background: radial-gradient(circle at top right, var(--surface-elevated), var(--bg-dark));
  padding: 60px 34px;
  border-bottom: 2px solid var(--gold);
}

.dh-content {
  max-width: 800px;
}

.dh-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

.dh-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dh-subtitle {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  font-weight: 300;
}

/* ── Grid Principal (Home Weeks) ─────────────────────────────────── */
.home-weeks {
  padding: 48px 34px;
}

.module-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
}

.mh-badge {
  font-family: var(--font-sans);
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.mh-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Cards de Aula ────────────────────────────────────────────────── */
.week-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.week-card.is-unlocked:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.1);
}

.week-card.is-locked {
  opacity: 0.5;
  background: transparent;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-badge {
  font-family: var(--font-sans);
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: var(--gold);
  padding: 4px 10px;
  border-radius: 20px;
}

.card-status i {
  font-size: 20px;
  color: var(--text-muted);
}
.is-unlocked .card-status i {
  color: var(--teal);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.card-date {
  font-family: var(--font-sans);
  font-size: 8pt;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.card-button {
  font-family: var(--font-sans);
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--surface-border);
  color: var(--text-muted);
  padding: 40px 34px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 7.5pt;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-static-links { padding: 12px 0; border-bottom: 1px solid var(--surface-border); background: var(--bg-dark); }
.sidebar-static-links .sb-item { display: flex; align-items: center; padding: 12px 24px; font-family: var(--font-sans); font-size: 0.95rem; color: var(--text-muted); text-decoration: none; transition: background 0.2s; border-left: 3px solid transparent; }
.sidebar-static-links .sb-item:hover:not(.locked) { background: var(--surface-elevated); border-left-color: var(--teal); color: var(--text-primary); }
.sidebar-static-links .sb-item.active { background: var(--surface-elevated); border-left-color: var(--gold); color: var(--text-primary); font-weight: 600; }

@media (min-width: 992px) {
  .app-sidebar { 
    position: fixed; 
    transform: translateX(100%); 
    width: 320px; 
    box-shadow: -4px 0 24px rgba(0,0,0,0.5); 
    border-left: 1px solid var(--surface-border); 
  }
}
