/* ============================================================
   Make Money Plans — Main Stylesheet
   makemoneyplans.com
   ============================================================ */

/* --- Theme tokens (overridden at runtime by Theme.apply) --- */
:root {
  --primary: #00C896;
  --primary-dark: #009E78;
  --primary-light: #E0FBF4;
  --secondary: #12142B;
  --secondary-light: #1A1D3A;
  --accent: #F4C542;
  --accent-dark: #D4A800;
  --danger: #E74C3C;
  --warning: #F39C12;
  --success: #27AE60;
  --info: #2980B9;

  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.18);

  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: all 0.15s ease;

  --bg: #F9FAFB;
  --card-bg: #FFFFFF;
  --nav-bg: rgba(18,20,43,0.97);

  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-on-dark: #FFFFFF;
  --text-on-primary: #FFFFFF;
}

[data-mode="dark"] {
  --bg: #0B0D18;
  --card-bg: #161A2E;
  --text-primary: #F3F4F6;
  --text-secondary: #B4BAC9;
  --text-muted: #8A90A2;
  --gray-50: #141827;
  --gray-100: #1B2033;
  --gray-200: #262C42;
  --gray-300: #39405A;
  --gray-800: #E5E7EB;
  --gray-900: #F9FAFB;
  --shadow: 0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
}

/* --- Festival / seasonal presets --- */
[data-theme="default"]   { --primary:#00C896; --primary-dark:#009E78; --primary-light:#E0FBF4; --accent:#F4C542; --secondary:#12142B; }
[data-theme="christmas"] { --primary:#C0392B; --primary-dark:#922B21; --primary-light:#FDECEA; --accent:#27AE60; --secondary:#0E2B1E; }
[data-theme="halloween"] { --primary:#E67E22; --primary-dark:#CA6F1E; --primary-light:#FEF5EC; --accent:#8E44AD; --secondary:#170B26; }
[data-theme="newyear"]   { --primary:#F4C542; --primary-dark:#D4A800; --primary-light:#FFFBEA; --accent:#00C896; --secondary:#12142B; }
[data-theme="ramadan"]   { --primary:#1A7F5A; --primary-dark:#145C41; --primary-light:#E0F5ED; --accent:#F4C542; --secondary:#0A2018; }
[data-theme="eid"]       { --primary:#0E7C86; --primary-dark:#0A5D65; --primary-light:#E2F6F7; --accent:#D4AF37; --secondary:#07282C; }
[data-theme="independence"] { --primary:#008751; --primary-dark:#006B40; --primary-light:#E0F5EB; --accent:#F4C542; --secondary:#003321; }
[data-theme="valentine"] { --primary:#E8366F; --primary-dark:#BE2A59; --primary-light:#FDECF1; --accent:#F4C542; --secondary:#2B0C19; }
[data-theme="easter"]    { --primary:#6C5CE7; --primary-dark:#5346C4; --primary-light:#EEECFB; --accent:#F4C542; --secondary:#161338; }
[data-theme="blackfriday"] { --primary:#1F1F1F; --primary-dark:#000000; --primary-light:#F1F1F1; --accent:#F4C542; --secondary:#0A0A0A; }
[data-theme="valentines"] { --primary:#E8366F; --primary-dark:#BE2A59; --primary-light:#FDECF1; --accent:#F4C542; --secondary:#2B0C19; }

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--text-primary); }
.hidden { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ============================================================ NAV */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.navbar-logo {
  width: 40px; height: 40px; background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px; color: #06120E; letter-spacing: -0.5px;
  font-family: var(--font-heading);
}
.navbar-brand-text {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem;
  color: var(--white); letter-spacing: -0.4px; line-height: 1.1;
}
.navbar-brand-text span { color: var(--primary); }
.navbar-brand-sub {
  font-size: 0.6rem; color: var(--gray-400); font-weight: 500;
  letter-spacing: 0.6px; text-transform: uppercase; display: block;
}
.navbar-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  color: var(--gray-300); font-size: 0.88rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: var(--transition-fast); text-decoration: none; white-space: nowrap;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.08); text-decoration: none; }
.nav-link.active { color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: 10px; }
.navbar-menu-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; padding: 6px; }

.currency-switcher {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm); padding: 7px 11px; color: var(--gray-200);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition-fast);
}
.currency-switcher:hover { background: rgba(255,255,255,0.15); }
.currency-dropdown { position: relative; }
.currency-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #1A1D3A; border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 8px; min-width: 220px;
  max-height: 340px; overflow-y: auto; display: none; z-index: 500;
  box-shadow: var(--shadow-lg);
}
.currency-dropdown.open .currency-dropdown-menu { display: block; }
.currency-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--gray-200);
  font-size: 0.86rem; font-weight: 500; transition: var(--transition-fast);
}
.currency-opt:hover { background: rgba(255,255,255,0.08); color: white; }
.currency-opt.active { color: var(--primary); background: rgba(0,200,150,0.1); }

/* Mobile nav */
#mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 1100;
  background: var(--secondary); flex-direction: column;
  padding: 80px 28px 28px; gap: 6px; overflow-y: auto;
}
#mobile-nav.open { display: flex; }
.mobile-nav-close {
  position: absolute; top: 20px; right: 20px; background: none; border: none;
  color: white; font-size: 1.5rem; cursor: pointer;
}
#mobile-nav .nav-link { font-size: 1.1rem; padding: 13px 14px; color: var(--gray-200); }
#mobile-nav .btn { margin-top: 6px; }

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius); font-size: 0.92rem;
  font-weight: 600; border: 2px solid transparent; transition: var(--transition);
  line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--text-on-primary); box-shadow: 0 4px 18px rgba(0,200,150,0.28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-dark { background: var(--secondary); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--text-on-primary); }
.btn-light { background: var(--white); color: var(--secondary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost { background: var(--gray-100); color: var(--text-primary); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 9px; font-size: 0.72rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 44px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-cta {
  background: var(--primary); color: var(--text-on-primary); padding: 17px 44px;
  font-size: 1.02rem; font-weight: 800; border-radius: var(--radius-full);
  box-shadow: 0 6px 34px rgba(0,200,150,0.38);
}
.btn-cta:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ============================================================ LAYOUT */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.pt-nav { padding-top: 72px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-4{gap:4px}.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-24{gap:24px}.gap-32{gap:32px}
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}
.text-center{text-align:center}.text-right{text-align:right}
.text-primary{color:var(--primary)!important}.text-secondary{color:var(--text-secondary)!important}
.text-muted{color:var(--text-muted)!important}.text-danger{color:var(--danger)!important}
.text-success{color:var(--success)!important}.text-warning{color:var(--warning)!important}
.text-sm{font-size:0.85rem}.text-xs{font-size:0.76rem}.text-lg{font-size:1.1rem}
.font-bold{font-weight:700}.font-black{font-weight:800}
.divider { height: 1px; background: var(--gray-200); margin: 24px 0; }

/* ============================================================ CARDS */
.card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.card-sm { padding: 18px 20px; border-radius: var(--radius); }
.card-flat { box-shadow: none; border: 1px solid var(--gray-200); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-title { font-size: 1.05rem; font-weight: 700; }
.section-tag {
  display: inline-block; background: var(--primary-light); color: var(--primary-dark);
  padding: 5px 15px; border-radius: var(--radius-full); font-size: 0.74rem;
  font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem,4vw,2.6rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -0.8px; }
.section-subtitle { font-size: 1.02rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto; line-height: 1.7; }

/* ============================================================ FORMS */
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 7px; color: var(--text-primary); }
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-hint { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.form-input, .form-select, .form-textarea,
.admin-input, .admin-select, .admin-textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--gray-200);
  border-radius: var(--radius); font-size: 0.93rem; color: var(--text-primary);
  background: var(--card-bg); transition: var(--transition-fast);
  outline: none; appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus,
.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,150,0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; display: none; }
.form-input.invalid, .form-select.invalid, .form-textarea.invalid { border-color: var(--danger); }
.form-input.invalid + .form-error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.form-label .req-note { font-weight: 400; color: var(--text-muted); font-size: 0.76rem; }

.input-group { display: flex; align-items: center; border: 2px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; background: var(--card-bg); }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,150,0.15); }
.input-prefix, .input-suffix { padding: 12px 14px; background: var(--gray-100); color: var(--text-secondary); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.input-group .form-input { border: none; box-shadow: none !important; flex: 1; border-radius: 0; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.choice-card {
  border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 14px 12px;
  cursor: pointer; transition: var(--transition-fast); text-align: center;
  background: var(--card-bg); font-size: 0.86rem; font-weight: 600; color: var(--text-primary);
}
.choice-card:hover { border-color: var(--primary); }
.choice-card.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.choice-card input { display: none; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--gray-200); background: var(--card-bg); color: var(--text-primary);
  padding: 8px 14px; border-radius: var(--radius-full); font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: var(--transition-fast); user-select: none;
}
.chip:hover { border-color: var(--primary); }
.chip.selected { background: var(--primary); border-color: var(--primary); color: var(--text-on-primary); }

.checkbox-wrap, .radio-wrap { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 0.9rem; padding: 5px 0; }
.checkbox-wrap input, .radio-wrap input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; margin-top: 3px; flex-shrink: 0; }

.form-range { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--gray-200); outline: none; margin: 10px 0; }
.form-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; }

/* Wizard */
.progress-bar-wrap { background: var(--gray-200); border-radius: var(--radius-full); height: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: var(--radius-full); transition: width 0.45s cubic-bezier(0.4,0,0.2,1); }
.wizard-steps { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.step-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gray-300); transition: var(--transition-fast); }
.step-dot.active { background: var(--primary); transform: scale(1.35); }
.step-dot.done { background: var(--success); }

/* ============================================================ ALERTS / BADGES */
.alert { padding: 13px 18px; border-radius: var(--radius); font-size: 0.88rem; display: flex; align-items: flex-start; gap: 11px; margin-bottom: 16px; line-height: 1.6; }
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.alert-success { background: #E6F9F1; border: 1px solid #B7EEDD; color: #14614A; }
.alert-warning { background: #FEF9EC; border: 1px solid #FDE9A2; color: #7D5500; }
.alert-danger  { background: #FDECEA; border: 1px solid #F5B7B1; color: #7B241C; }
.alert-info    { background: #EBF5FB; border: 1px solid #AED6F1; color: #1A5276; }
[data-mode="dark"] .alert-success { background: rgba(39,174,96,0.14); border-color: rgba(39,174,96,0.35); color: #8DE5B6; }
[data-mode="dark"] .alert-warning { background: rgba(243,156,18,0.14); border-color: rgba(243,156,18,0.35); color: #F7CE7B; }
[data-mode="dark"] .alert-danger  { background: rgba(231,76,60,0.14); border-color: rgba(231,76,60,0.35); color: #F4A79D; }
[data-mode="dark"] .alert-info    { background: rgba(41,128,185,0.16); border-color: rgba(41,128,185,0.4); color: #9CCBEE; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.35px; text-transform: uppercase; white-space: nowrap; }
.badge-success { background: #E6F9F1; color: #14614A; }
.badge-warning { background: #FEF9EC; color: #7D5500; }
.badge-danger  { background: #FDECEA; color: #7B241C; }
.badge-info    { background: #EBF5FB; color: #1A5276; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-dark    { background: var(--secondary); color: var(--white); }

/* ============================================================ TABLE */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 11px 14px; text-align: left; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200); white-space: nowrap;
}
tbody td { padding: 12px 14px; font-size: 0.87rem; border-bottom: 1px solid var(--gray-100); color: var(--text-primary); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
.table-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ============================================================ MODALS */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card-bg); border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; padding: 30px;
  transform: translateY(24px) scale(0.98); transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-xl);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1100px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: var(--gray-100); border: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  color: var(--text-secondary); cursor: pointer; flex-shrink: 0;
}
.modal-close:hover { background: var(--gray-200); color: var(--text-primary); }

/* ============================================================ TOASTS */
#toast-container { position: fixed; bottom: 22px; left: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 9px; max-width: 370px; width: calc(100% - 44px); }
.toast {
  background: var(--secondary); color: #fff; padding: 12px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px;
  font-size: 0.87rem; animation: slideInLeft 0.28s ease; border-left: 4px solid var(--primary);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast-close { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1rem; padding: 0 3px; }

/* ============================================================ FLOATING CONTACT */
.floating-contact {
  position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column;
  gap: 10px; z-index: 9980;
}
.fc-btn {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; text-decoration: none; font-size: 1.35rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25); transition: transform 0.2s, box-shadow 0.2s;
}
.fc-btn:hover { transform: scale(1.09); text-decoration: none; }
.fc-whatsapp { background: #25D366; }
.fc-email { background: var(--primary); }
.fc-btn .fc-tip {
  position: absolute; right: 62px; background: var(--secondary); color: #fff;
  font-size: 0.74rem; padding: 5px 10px; border-radius: var(--radius-sm);
  opacity: 0; pointer-events: none; transition: opacity 0.18s; white-space: nowrap;
}
.fc-btn:hover .fc-tip { opacity: 1; }

/* ============================================================ FOOTER */
footer.site-footer { background: var(--secondary); color: var(--gray-300); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-text { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; color: #fff; margin-bottom: 10px; }
.footer-brand-text span { color: var(--primary); }
.footer-tagline { font-size: 0.87rem; margin-bottom: 16px; line-height: 1.7; color: var(--gray-400); }
.footer-heading { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: #fff; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-link { color: var(--gray-400); font-size: 0.85rem; text-decoration: none; transition: var(--transition-fast); }
.footer-link:hover { color: var(--primary); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: var(--gray-400); font-size: 1.1rem; }
.footer-social a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 0.8rem; color: var(--gray-500); }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { font-size: 0.8rem; color: var(--gray-500); text-decoration: none; }
.footer-legal a:hover { color: var(--gray-300); }

.disclaimer-strip {
  background: var(--gray-800); color: var(--gray-400); font-size: 0.76rem;
  text-align: center; padding: 12px 24px; line-height: 1.6;
}
[data-mode="dark"] .disclaimer-strip { background: #0A0C16; color: var(--gray-500); }

/* ============================================================ PLAN CONTENT */
.plan-content { line-height: 1.8; font-size: 0.95rem; }
.plan-content h2 {
  font-size: 1.3rem; margin: 34px 0 12px; color: var(--primary-dark);
  border-bottom: 2px solid var(--primary-light); padding-bottom: 8px;
}
[data-mode="dark"] .plan-content h2 { color: var(--primary); border-bottom-color: rgba(255,255,255,0.1); }
.plan-content h2:first-child { margin-top: 0; }
.plan-content h3 { font-size: 1.02rem; margin: 18px 0 8px; }
.plan-content p { margin-bottom: 11px; }
.plan-content ul, .plan-content ol { margin: 10px 0 14px 22px; list-style: disc; }
.plan-content ol { list-style: decimal; }
.plan-content li { margin-bottom: 5px; }
.plan-content table { margin: 14px 0; font-size: 0.85rem; }
.plan-content strong { color: var(--text-primary); font-weight: 700; }
.plan-content blockquote {
  border-left: 3px solid var(--primary); background: var(--gray-50);
  padding: 12px 16px; border-radius: var(--radius-sm); margin: 14px 0; color: var(--text-secondary);
}
.plan-content .disclaimer-box {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px 18px; font-size: 0.82rem; color: var(--text-secondary); margin-top: 26px;
}
.plan-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px;
  background: var(--gray-50); border-radius: var(--radius); font-size: 0.8rem;
  color: var(--text-secondary); margin-bottom: 20px;
}

/* ============================================================ DASHBOARD SHELL */
.app-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.app-sidebar {
  background: var(--secondary); color: #fff; padding: 0 0 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60;
}
.app-sidebar .sidebar-brand { padding: 20px 22px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 10px; }
.sidebar-brand-text { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: #fff; }
.sidebar-brand-text span { color: var(--primary); }
.sidebar-brand-sub { font-size: 0.6rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.7px; }
.sidebar-section { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); padding: 16px 22px 6px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 22px; color: var(--gray-300);
  font-size: 0.86rem; font-weight: 500; cursor: pointer; transition: var(--transition-fast);
  border: none; background: none; width: 100%; text-align: left; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar-nav-item.active { color: var(--primary); background: rgba(0,200,150,0.12); border-left-color: var(--primary); }
.sidebar-nav-item .nav-icon { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-nav-item .nav-count { margin-left: auto; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 800; padding: 1px 7px; border-radius: var(--radius-full); }

.app-main { background: var(--bg); min-width: 0; }
.app-topbar {
  height: 62px; background: var(--card-bg); border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 50;
}
.app-topbar-title { font-weight: 700; font-size: 1rem; }
.app-topbar-actions { display: flex; align-items: center; gap: 9px; }
.app-content { padding: 24px 22px 60px; }
.app-sidebar-toggle { display: none; background: var(--gray-100); border: none; padding: 7px 11px; border-radius: var(--radius-sm); font-size: 0.95rem; color: var(--text-primary); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); }
.stat-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 7px; }
.stat-value { font-size: 1.7rem; font-weight: 800; font-family: var(--font-heading); line-height: 1.1; }
.stat-sub { font-size: 0.76rem; color: var(--text-secondary); margin-top: 5px; }

.empty-state { text-align: center; padding: 46px 20px; color: var(--text-secondary); }
.empty-state .es-icon { font-size: 2.6rem; margin-bottom: 12px; opacity: 0.7; }
.empty-state h3 { margin-bottom: 8px; font-size: 1.05rem; }

/* ============================================================ ADMIN SPECIFIC */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.admin-tab {
  padding: 8px 15px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600;
  background: none; border: none; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
.admin-tab:hover { background: var(--gray-100); color: var(--text-primary); }
.admin-tab.active { background: var(--primary); color: var(--text-on-primary); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-input, .admin-select, .admin-textarea { padding: 9px 12px; font-size: 0.87rem; border-width: 1px; }
.admin-textarea { min-height: 100px; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.55; }
.admin-label { display: block; font-size: 0.78rem; font-weight: 700; margin-bottom: 5px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.admin-field { margin-bottom: 16px; }
.admin-help { font-size: 0.74rem; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.color-row input[type=color] { width: 42px; height: 34px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: none; padding: 2px; cursor: pointer; }
.color-row .form-input { flex: 1; font-family: var(--font-mono); font-size: 0.8rem; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 62px; height: 46px; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; position: relative; }
.swatch.active { border-color: var(--text-primary); }
.swatch span { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 0.55rem; font-weight: 800; text-transform: uppercase; }

/* ============================================================ MISC */
.skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
.spinner-lg { width: 34px; height: 34px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
.loading-block { text-align: center; padding: 46px 20px; color: var(--text-secondary); font-size: 0.88rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.45 } }
@keyframes fadeIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity:0; transform: translateX(-24px); } to { opacity:1; transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.fade-in { animation: fadeIn 0.45s ease; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .app-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 900px) {
  .navbar-nav { display: none; }
  .navbar-menu-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: 0; top: 0; width: 270px; height: 100vh; transform: translateX(-100%); transition: transform 0.25s; }
  .app-sidebar.open { transform: translateX(0); }
  .app-sidebar-toggle { display: block; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container, .container-sm, .container-xs { padding: 0 16px; }
  .section { padding: 52px 0; }
  .card { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #toast-container { left: 16px; bottom: 16px; width: calc(100% - 32px); }
  .modal { padding: 22px; }
  .btn-cta { padding: 15px 28px; font-size: 0.95rem; }
  .floating-contact { right: 14px; bottom: 14px; }
  .fc-btn { width: 46px; height: 46px; font-size: 1.15rem; }
  .choice-grid { grid-template-columns: repeat(2,1fr); }
  .app-content { padding: 16px 14px 60px; }
  .app-topbar { padding: 0 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 1.3rem; }
}

/* ============================================================ PRINT (PDF download) */
@media print {
  .navbar, footer.site-footer, .floating-contact, #toast-container,
  .app-sidebar, .app-topbar, .no-print, .disclaimer-strip, .btn { display: none !important; }
  .app-layout { display: block; }
  .app-content { padding: 0; }
  body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  .card { box-shadow: none !important; border: none !important; padding: 0 !important; }
  .print-header { display: block !important; margin-bottom: 18px; border-bottom: 2px solid #000; padding-bottom: 10px; }
  .plan-content h2 { color: #000 !important; border-bottom: 1px solid #bbb !important; page-break-after: avoid; }
  .plan-content h3 { page-break-after: avoid; }
  .plan-content li, .plan-content p { page-break-inside: avoid; }
  a { color: #000 !important; text-decoration: none; }
  @page { margin: 16mm 14mm; }
}
.print-header { display: none; }
