/* ═══════════════════════════════════
   LoadPro — Design System v2
   Warm Control: Cream + Terracotta + Fraunces
   Light default, dark mode toggle
   ═══════════════════════════════════ */

:root {
  --bg: #F5F0E8;
  --bg-card: #FDFCFA;
  --bg-card-hover: #EDE6D8;
  --bg-input: #FDFCFA;
  --border: rgba(45,45,45,0.08);
  --border-focus: #C4654A;
  --primary: #C4654A;
  --primary-hover: #A8533B;
  --primary-light: rgba(196,101,74,0.1);
  --success: #5A8F6E;
  --success-light: rgba(90,143,110,0.12);
  --warning: #D4A853;
  --warning-light: rgba(212,168,83,0.12);
  --danger: #C45050;
  --danger-light: rgba(196,80,80,0.1);
  --text: #2D2D2D;
  --text-secondary: #4A4A4A;
  --text-muted: #8C8578;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(45,45,45,0.06);
  --shadow-sm: 0 1px 4px rgba(45,45,45,0.04);
  --transition: .2s ease;
  --sidebar-w: 220px;
  --sidebar-collapsed: 56px;
  --header-h: 56px;
  --gold: #D4A853;
  --gold-light: rgba(212,168,83,0.12);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #1A1816;
  --bg-card: #211F1D;
  --bg-card-hover: #252220;
  --bg-input: #252220;
  --border: rgba(240,235,227,0.08);
  --border-focus: #D4795E;
  --primary: #D4795E;
  --primary-hover: #E08B6E;
  --primary-light: rgba(212,121,94,0.15);
  --success: #6BA67E;
  --success-light: rgba(107,166,126,0.15);
  --warning: #E2B860;
  --warning-light: rgba(226,184,96,0.15);
  --danger: #D46060;
  --danger-light: rgba(212,96,96,0.15);
  --text: #F0EBE3;
  --text-secondary: #C8C0B4;
  --text-muted: #8A8278;
  --shadow: 0 2px 12px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.15);
  --gold: #E2B860;
  --gold-light: rgba(226,184,96,0.15);
}

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

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

body {
  font-family: 'Satoshi', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-family: 'Fraunces', serif; font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.5px; }
h2 { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.3px; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
small { font-size: .875rem; color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: .875rem; border: none; cursor: pointer; transition: all var(--transition);
  font-family: inherit; text-decoration: none; white-space: nowrap;
}
.btn i { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(196,101,74,.2); }
.btn-secondary { background: var(--bg-card-hover); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success-light); color: var(--success); }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Inputs ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.form-control {
  width: 100%; padding: 10px 14px; background: var(--bg-input); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .875rem;
  font-family: inherit; transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238C8578' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; cursor: pointer; }

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: all var(--transition);
}
.card:hover { border-color: var(--border); }
.card-clickable:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); cursor: pointer; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1rem; font-weight: 600; }

/* ── Stats Card ── */
.stat-card { text-align: center; }
.stat-card .stat-value { font-family: 'Fraunces', serif; font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: var(--radius-xs); font-size: .75rem; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

/* ── Layout — App Shell ── */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 100; transition: width var(--transition);
  overflow: hidden;
}
.sidebar-brand { padding: 18px 16px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.sidebar-brand span { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-xs); color: var(--text-secondary); font-size: .85rem;
  font-weight: 500; transition: all var(--transition); text-decoration: none;
}
.sidebar-nav a:hover { background: var(--bg-card-hover); color: var(--text); }
.sidebar-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-nav a i { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section { padding: 16px 10px 6px; font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user img { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: .65rem; color: var(--text-muted); }

/* Theme toggle in sidebar */
.theme-toggle-sidebar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 4px 8px;
  border-radius: var(--radius-xs); cursor: pointer;
  font-size: .8rem; color: var(--text-muted);
  transition: all var(--transition); border: none; background: none;
  font-family: inherit; width: calc(100% - 16px);
}
.theme-toggle-sidebar:hover { background: var(--bg-card-hover); color: var(--text); }
.theme-toggle-track {
  width: 36px; height: 20px;
  background: var(--bg-card-hover);
  border-radius: 10px;
  position: relative;
  transition: background .3s;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  width: 16px; height: 16px;
  background: var(--bg-card);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: all .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
[data-theme="dark"] .theme-toggle-track { background: var(--primary); }
[data-theme="dark"] .theme-toggle-thumb { left: 18px; }

/* Main content */
.main-content { flex: 1; margin-left: var(--sidebar-w); padding: 28px; min-height: 100vh; transition: margin-left var(--transition); }
.main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.main-header h1 { font-size: 1.4rem; }

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

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: .875rem; }
th { background: var(--bg-card-hover); font-weight: 600; color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
td { border-top: 1px solid var(--border); }
tr:hover td { background: var(--bg-card); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.6); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 0;
  transform: scale(.95); transition: transform var(--transition); box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab {
  padding: 10px 20px; font-size: .85rem; font-weight: 500; color: var(--text-muted);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap; font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Search ── */
.search-box {
  position: relative; max-width: 320px;
}
.search-box input { padding-left: 40px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius-sm); font-size: .875rem;
  font-weight: 500; display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s ease; min-width: 280px; box-shadow: var(--shadow);
}
.toast-success { background: #166534; color: #bbf7d0; }
.toast-error { background: #991b1b; color: #fecaca; }
.toast-warning { background: #854d0e; color: #fef08a; }
[data-theme="light"] .toast-success, :root .toast-success { background: var(--success); color: #fff; }
[data-theme="light"] .toast-error, :root .toast-error { background: var(--danger); color: #fff; }
[data-theme="light"] .toast-warning, :root .toast-warning { background: var(--warning); color: var(--text); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { width: 64px; height: 64px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { max-width: 360px; margin: 0 auto 24px; }

/* ── Avatar ── */
.avatar { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); font-size: .9rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; border-radius: var(--radius); }

/* ── Streak / progress ── */
.progress-bar { height: 6px; background: var(--bg-card-hover); border-radius: 100px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 100px; transition: width .5s ease; }

/* ── Alerts ── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .875rem; display: flex; align-items: flex-start; gap: 10px; border-left: 3px solid; }
.alert-warning { background: var(--warning-light); color: var(--text); border-left-color: var(--warning); }
.alert-danger { background: var(--danger-light); color: var(--text); border-left-color: var(--danger); }
.alert-success { background: var(--success-light); color: var(--text); border-left-color: var(--success); }

/* ── Chip select (dias da semana) ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: var(--radius-xs); font-size: .8rem; font-weight: 600;
  background: var(--bg-card-hover); color: var(--text-muted); border: 1.5px solid var(--border);
  cursor: pointer; transition: all var(--transition); user-select: none;
}
.chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ── Skeleton loader ── */
.skeleton { background: linear-gradient(90deg, var(--bg-card-hover) 25%, var(--bg-card) 50%, var(--bg-card-hover) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive ── */
.mobile-header {
  display: none; position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--bg-card); border-bottom: 1px solid var(--border); z-index: 99;
  padding: 0 16px; align-items: center; justify-content: space-between;
}
.mobile-header .menu-toggle { background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 99; display: none; }
[data-theme="dark"] .sidebar-backdrop { background: rgba(0,0,0,.5); }

@media (max-width: 768px) {
  .mobile-header { display: none !important; }
  .sidebar { transform: translateX(-100%); z-index: 200; width: min(240px, 85vw); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
  .sidebar-backdrop.active { display: block; opacity: 1; visibility: visible; z-index: 199; }
  .main-content { margin-left: 0; padding: 16px; padding-top: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main-header { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.3rem; }

  .modal-overlay { padding: 0; }
  .modal { max-width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; margin: 0; }
  .modal-header { position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
  .modal-footer { position: sticky; bottom: 0; background: var(--bg-card); z-index: 1; }
  .modal-body { padding: 16px; }

  .modal-close { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .serie-check { width: 44px; height: 44px; }

  .table-wrap table th:first-child,
  .table-wrap table td:first-child { position: sticky; left: 0; background: var(--bg-card); z-index: 1; min-width: 120px; }

  .tabs { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs { position: relative; }
  .tab { padding: 8px 14px; font-size: .8rem; }

  .search-box { max-width: 100%; }

  .section { padding: 60px 16px; }
  .section-title { margin-bottom: 36px; }

  .personal-bottom-nav { display: flex; }
  .main-content { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)); }

  #calendarioSemanal { grid-template-columns: 1fr !important; }
  #calendarioSemanal > div { display: none; }
  #calendarioSemanal > div.dia-ativo { display: block; }
  .agenda-nav-mobile { display: flex; }

  .chat-layout .chat-list.hidden-mobile { display: none; }
  .chat-layout .chat-area { display: flex !important; }
  .chat-back-mobile { display: inline-flex !important; }

  .form-control, input, select, textarea { font-size: 16px; }

  .grid { gap: 12px; }

  .main-header > div { width: 100%; }
  .main-header > div[style*="display:flex"] { flex-wrap: wrap; }
  .main-header select.form-control { width: 100% !important; }

  .grid-2.stats-keep { grid-template-columns: repeat(2, 1fr); }
  .modal .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .modal .grid-3 { grid-template-columns: repeat(2, 1fr); }
  #resultadoCalc.grid-4 { grid-template-columns: repeat(2, 1fr); }

  .tabs-wrapper { position: relative; }
  .tabs-wrapper::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0;
    width: 32px; background: linear-gradient(to left, var(--bg) 20%, transparent);
    pointer-events: none; z-index: 1;
  }

  .horario-dia-inputs { flex-direction: column !important; gap: 8px !important; }
  .horario-turno { display: flex; align-items: center; gap: 6px; }

  .hero::before { animation: none; }
}

/* Bottom nav personal (hidden por default, show via media query) */
.personal-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-card); border-top: 1px solid var(--border);
  z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0);
}
.personal-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 0; font-size: .7rem; color: var(--text-muted);
  text-decoration: none; transition: color .2s;
}
.personal-bottom-nav a.active { color: var(--primary); }
.personal-bottom-nav a i { width: 20px; height: 20px; }

/* Agenda nav mobile (hidden por default) */
.agenda-nav-mobile {
  display: none; align-items: center; justify-content: space-between;
  padding: 12px 0; margin-bottom: 8px;
}
.agenda-nav-mobile button { background: none; border: none; color: var(--text); cursor: pointer; padding: 12px; min-width: 44px; min-height: 44px; }
.agenda-nav-mobile .dia-label { font-weight: 700; font-size: 1.1rem; }

/* Chat back button (hidden por default) */
.chat-back-mobile { display: none !important; }

/* Bottom sheet — grid rápido de navegação mobile */
.bottom-sheet { display: none; }
@media (max-width: 768px) {
  .bottom-sheet { display: block; position: fixed; inset: 0; z-index: 300; pointer-events: none; }
  .bottom-sheet.open { pointer-events: auto; }
  .bottom-sheet-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,.3);
    opacity: 0; transition: opacity .25s ease;
  }
  .bottom-sheet.open .bottom-sheet-backdrop { opacity: 1; }
  .bottom-sheet-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--bg-card); border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%); transition: transform .25s ease;
  }
  .bottom-sheet.open .bottom-sheet-content { transform: translateY(0); }
  .bottom-sheet-handle {
    width: 40px; height: 4px; background: var(--bg-card-hover); border-radius: 2px;
    margin: 0 auto 16px;
  }
  .bottom-sheet-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  }
  .bottom-sheet-grid a {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 8px; border-radius: var(--radius-sm); color: var(--text-secondary);
    text-decoration: none; font-size: .8rem; font-weight: 500; transition: all .15s;
  }
  .bottom-sheet-grid a:active { background: var(--bg-card-hover); transform: scale(.95); }
  .bottom-sheet-grid a.active { color: var(--primary); }
  .bottom-sheet-grid a i { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .btn { padding: 10px 18px; font-size: .85rem; }
  .card { padding: 16px; }
  .hero h1 { font-size: 1.8rem; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .empty-state { padding: 36px 16px; }
  .toast { max-width: calc(100vw - 40px); min-width: auto; }
}

/* ── Landing page specific ── */
.landing-body { background: var(--bg); }

.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(196,101,74,.06) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite;
}
@keyframes heroPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { font-size: 3rem; font-weight: 700; line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--primary); font-style: italic; }
.hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 540px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 32px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(245,240,232,.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .landing-nav { background: rgba(26,24,22,.85); }
.landing-nav .logo { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.landing-nav .logo span { color: var(--primary); }
.landing-nav-links { display: flex; align-items: center; gap: 24px; }
.landing-nav-links a { color: var(--text-secondary); font-size: .875rem; font-weight: 500; }
.landing-nav-links a:hover { color: var(--text); }

.section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 1.75rem; margin-bottom: 12px; }
.section-title p { font-size: 1rem; max-width: 560px; margin: 0 auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 28px; text-align: center; border-left: 3px solid var(--primary); text-align: left; }
.feature-card:nth-child(2) { border-left-color: var(--gold); }
.feature-card:nth-child(3) { border-left-color: var(--success); }
.feature-card:nth-child(4) { border-left-color: var(--warning); }
.feature-card:nth-child(5) { border-left-color: var(--primary); }
.feature-card:nth-child(6) { border-left-color: var(--gold); }
.feature-card i { width: 40px; height: 40px; color: var(--primary); margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; font-family: 'Fraunces', serif; }
.feature-card p { font-size: .875rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 700px; margin: 0 auto; }
.pricing-card { padding: 36px 28px; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--primary); border-left: 3px solid var(--primary); }
.pricing-card.featured::before {
  content: 'Mais Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 4px 16px; border-radius: var(--radius-xs); font-size: .75rem; font-weight: 700;
}
.pricing-card h3 { font-family: 'Fraunces', serif; font-size: 1.25rem; margin-bottom: 8px; }
.pricing-card .price { font-family: 'Fraunces', serif; font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: 16px 0; }
.pricing-card .price small { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-card .limit { font-size: .875rem; color: var(--text-secondary); margin-bottom: 24px; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 32px; }
.pricing-card ul li { padding: 8px 0; font-size: .875rem; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }
.pricing-card ul li i { color: var(--success); width: 18px; height: 18px; flex-shrink: 0; }

.cta-section { text-align: center; padding: 80px 20px; background: linear-gradient(180deg, transparent, rgba(196,101,74,.04)); }
.cta-section h2 { font-family: 'Fraunces', serif; font-size: 2rem; margin-bottom: 16px; }
.cta-section p { margin-bottom: 32px; }

.landing-footer { padding: 40px 20px; border-top: 1px solid var(--border); text-align: center; }
.landing-footer p { font-size: .85rem; }

/* Hamburger mobile */
.landing-hamburger { display:none; background:none; border:none; color:var(--text); cursor:pointer; padding:8px; }

/* Bottom nav (aluno) */
.bottom-nav { position:fixed; bottom:0; left:0; right:0; background:var(--bg-card); border-top:1px solid var(--border); display:flex; z-index:100; padding-bottom:env(safe-area-inset-bottom, 0); }
.bottom-nav a { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 0; font-size:.75rem; color:var(--text-muted); text-decoration:none; transition:color .2s; min-height:44px; }
.bottom-nav a.active { color:var(--primary); }
.bottom-nav a i { width:20px; height:20px; }
.aluno-main { padding:16px; padding-bottom:calc(80px + env(safe-area-inset-bottom, 0)); }

/* Auth pages */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.auth-box { width:100%; max-width:420px; }
.auth-logo { display:flex; align-items:center; gap:10px; justify-content:center; margin-bottom:40px; font-family:'Fraunces',serif; font-size:42px; font-weight:700; letter-spacing:-1.5px; }
.auth-card { padding:32px; }
.auth-card h2 { text-align:center; margin-bottom:8px; }
.auth-card p { text-align:center; margin-bottom:24px; font-size:.9rem; }
.auth-footer { text-align:center; margin-top:20px; font-size:.9rem; }
.pwd-wrap { position:relative; }
.pwd-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--text-muted); cursor:pointer; padding:4px; }
.trial-badge { text-align:center; margin-bottom:24px; }
.trial-badge span { background:var(--success-light); color:var(--success); padding:6px 16px; border-radius:var(--radius-xs); font-size:.85rem; font-weight:600; }

/* Spinner */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-nav-links { display: none; }
  .landing-nav-links.open { display:flex; flex-direction:column; position:absolute; top:100%; left:0; right:0; background:var(--bg-card); border-bottom:1px solid var(--border); padding:16px; gap:12px; }
  .landing-hamburger { display:block; }
}
