/* =====================================================
   ATLAS — PREMIUM DESIGN SYSTEM
   ===================================================== */

/* --- CSS Variables --- */
:root {
  /* Colors */
  --bg-base:        #f8f9fb;
  --bg-card:        #ffffff;
  --bg-sidebar:     #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #1d4ed8;
  --bg-overlay:     rgba(15,23,42,0.55);

  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --text-white:     #ffffff;
  --text-sidebar:   #94a3b8;
  --text-sidebar-active: #ffffff;

  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;

  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;

  --red-50:  #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --purple-50:  #faf5ff;
  --purple-500: #a855f7;
  --purple-600: #9333ea;

  --yellow-50:  #fefce8;
  --yellow-500: #eab308;

  --border: #e2e8f0;
  --border-focus: #3b82f6;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.10), 0 8px 10px rgba(0,0,0,0.04);
  --shadow-card: 0 0 0 1px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.06);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h:  64px;
  --bottom-nav-h: 68px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration: 220ms;
  --duration-slow: 380ms;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Utilities --- */
.hidden  { display: none !important; }
.flex    { display: flex; }
.flex-col{ display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.absolute { position: absolute; }

/* =====================================================
   LAYOUT SHELL
   ===================================================== */
#app { min-height: 100vh; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--duration) var(--ease);
  overflow: hidden;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}
.sidebar-logo-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.sidebar-logo-tagline {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--text-sidebar);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  user-select: none;
}
.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: #e2e8f0;
}
.nav-item.active {
  background: var(--bg-sidebar-active);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29,78,216,0.4);
}
.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--red-500);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}
.nav-item .nav-badge.green { background: var(--green-500); }
.nav-item .nav-badge.orange { background: var(--orange-500); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast);
}
.sidebar-user:hover { background: var(--bg-sidebar-hover); }
.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  truncate: true;
}
.sidebar-user-plan {
  font-size: 10px;
  color: #64748b;
}
.sidebar-user-plan.premium { color: #f59e0b; }

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--duration) var(--ease);
}

/* --- Topbar --- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-primary);
  padding: 4px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.topbar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative;
}
.topbar-btn:hover { background: var(--border); color: var(--text-primary); }
.topbar-notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--red-500);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* --- Page Content --- */
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1280px;
  width: 100%;
}

/* --- Bottom Nav (mobile) --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 4px 8px;
  align-items: flex-start;
  justify-content: space-around;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--duration-fast);
  min-width: 0;
}
.bottom-nav-item.active { color: var(--blue-600); }
.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item span { font-size: 9.5px; font-weight: 600; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* =====================================================
   CARDS & SURFACES
   ===================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-pad    { padding: 20px; }
.card-pad-sm { padding: 14px 16px; }
.card-pad-lg { padding: 28px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.card-action {
  font-size: 12px;
  color: var(--blue-600);
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--duration-fast);
}
.card-action:hover { opacity: 0.7; }

/* Stat Card */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.stat-card-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-card-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.stat-card-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-card-change.up   { color: var(--green-600); }
.stat-card-change.down { color: var(--red-500); }

/* Color icon variants */
.icon-blue   { background: var(--blue-50); color: var(--blue-600); }
.icon-green  { background: var(--green-50); color: var(--green-600); }
.icon-orange { background: var(--orange-50); color: var(--orange-600); }
.icon-red    { background: var(--red-50); color: var(--red-500); }
.icon-purple { background: var(--purple-50); color: var(--purple-600); }
.icon-yellow { background: var(--yellow-50); color: var(--yellow-500); }

/* =====================================================
   GRID SYSTEM
   ===================================================== */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.1px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--blue-700);
  color: #fff;
  box-shadow: 0 1px 3px rgba(29,78,216,0.3);
}
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 4px 12px rgba(29,78,216,0.3); }

.btn-secondary {
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-base); border-color: var(--border); color: var(--text-primary); }

.btn-danger {
  background: var(--red-500);
  color: #fff;
}
.btn-danger:hover { background: var(--red-600); }

.btn-success {
  background: var(--green-500);
  color: #fff;
}
.btn-success:hover { background: var(--green-600); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-xl { padding: 16px 36px; font-size: 16px; font-weight: 700; border-radius: var(--radius-lg); }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-icon:hover { background: var(--border); color: var(--text-primary); }
.btn-w-full { width: 100%; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.1px;
}
.form-label span { color: var(--red-500); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
  appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}
.form-error {
  font-size: 11.5px;
  color: var(--red-500);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Input with icon */
.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.input-wrapper .form-input { padding-left: 36px; }

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.form-check input[type=checkbox],
.form-check input[type=radio] {
  width: 18px; height: 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  accent-color: var(--blue-600);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label {
  font-size: 14px;
  color: var(--text-primary);
}

/* Toggle */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.toggle-info { flex: 1; }
.toggle-info-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.toggle-info-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--duration) var(--ease);
  box-shadow: var(--shadow-xs);
}
.toggle input:checked + .toggle-slider { background: var(--blue-600); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* =====================================================
   BADGES & TAGS
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-blue   { background: var(--blue-50); color: var(--blue-700); }
.badge-green  { background: var(--green-100); color: var(--green-600); }
.badge-orange { background: var(--orange-100); color: var(--orange-600); }
.badge-red    { background: var(--red-100); color: var(--red-600); }
.badge-purple { background: var(--purple-50); color: var(--purple-600); }
.badge-gray   { background: var(--bg-base); color: var(--text-secondary); border: 1px solid var(--border); }

/* =====================================================
   PROGRESS BARS
   ===================================================== */
.progress-bar-wrap {
  background: var(--bg-base);
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 6px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s var(--ease);
}
.progress-bar-fill.blue   { background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); }
.progress-bar-fill.green  { background: linear-gradient(90deg, var(--green-500), var(--green-600)); }
.progress-bar-fill.orange { background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); }
.progress-bar-fill.purple { background: linear-gradient(90deg, var(--purple-500), var(--purple-600)); }

.progress-labeled {
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-labeled .progress-bar-wrap { flex: 1; }
.progress-labeled .progress-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: right;
}

/* =====================================================
   ALERTS & TOASTS
   ===================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
}
.alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-blue   { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
.alert-green  { background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-100); }
.alert-orange { background: var(--orange-50); color: var(--orange-600); border: 1px solid var(--orange-100); }
.alert-red    { background: var(--red-50); color: var(--red-600); border: 1px solid var(--red-100); }

/* Toast container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-sidebar);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: toast-in 0.3s var(--ease);
  max-width: 340px;
}
.toast.success { background: var(--green-600); }
.toast.error   { background: var(--red-500); }
.toast.warning { background: var(--orange-500); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in var(--duration) var(--ease);
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in var(--duration) var(--ease);
}
.modal-lg { max-width: 680px; }
.modal-xl { max-width: 860px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 24px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
.modal-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--duration-fast);
  margin-top: -2px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

/* =====================================================
   TABLE
   ===================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead tr { border-bottom: 1px solid var(--border); }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
tbody tr {
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
}
tbody tr:hover { background: var(--bg-base); }
tbody td { padding: 12px 14px; color: var(--text-primary); }
tbody td:first-child { font-weight: 500; }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.empty-state-icon {
  font-size: 42px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 20px;
}

/* =====================================================
   TRANSACTION LIST
   ===================================================== */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tx-info { flex: 1; min-width: 0; }
.tx-name  { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.tx-cat   { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.tx-amount { font-size: 14px; font-weight: 700; }
.tx-amount.positive { color: var(--green-600); }
.tx-amount.negative { color: var(--red-500); }

/* =====================================================
   HABIT TRACKER
   ===================================================== */
.habit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-base);
}
.habit-item:last-child { border-bottom: none; }
.habit-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.habit-info { flex: 1; }
.habit-name   { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.habit-streak { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.habit-streak span { color: var(--orange-500); font-weight: 700; }
.habit-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
  color: transparent;
  background: none;
}
.habit-check.done { border-color: var(--green-500); background: var(--green-500); color: #fff; }

/* =====================================================
   GOAL CARD
   ===================================================== */
.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration), box-shadow var(--duration);
}
.goal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.goal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.goal-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.goal-card-title  { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.goal-card-desc   { font-size: 12px; color: var(--text-muted); }
.goal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.goal-card-pct { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.goal-card-deadline { font-size: 11px; color: var(--text-muted); }

/* =====================================================
   TASK / PLANNING
   ===================================================== */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-base);
}
.task-item:last-child { border-bottom: none; }
.task-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all var(--duration-fast);
  background: none;
}
.task-check.done { border-color: var(--green-500); background: var(--green-500); color: #fff; }
.task-info { flex: 1; }
.task-name { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.task-name.done { text-decoration: line-through; color: var(--text-muted); }
.task-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.task-priority {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.task-priority.high   { background: var(--red-500); }
.task-priority.medium { background: var(--orange-500); }
.task-priority.low    { background: var(--green-500); }

/* =====================================================
   ONBOARDING
   ===================================================== */
.onboarding-shell {
  min-height: 100vh;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.onboarding-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  animation: modal-in 0.4s var(--ease);
}
.onboarding-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  padding: 32px 36px 28px;
}
.onboarding-step-track {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.onboarding-step-dot {
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  flex: 1;
  transition: background var(--duration);
}
.onboarding-step-dot.active { background: #fff; }
.onboarding-step-dot.done   { background: var(--blue-500); }
.onboarding-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.onboarding-header-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
.onboarding-body { padding: 28px 36px 32px; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.choice-item {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  text-align: left;
  user-select: none;
}
.choice-item:hover {
  border-color: var(--blue-300, #93c5fd);
  background: var(--blue-50);
}
.choice-item.selected {
  border-color: var(--blue-600);
  background: var(--blue-50);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.choice-icon {
  font-size: 22px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  flex-shrink: 0;
  transition: background var(--duration-fast);
}
.choice-item.selected .choice-icon { background: var(--blue-100, #dbeafe); }
.choice-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.choice-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.choice-check {
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: transparent;
  flex-shrink: 0;
  transition: all var(--duration-fast);
}
.choice-item.selected .choice-check {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.profile-item {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  text-align: center;
  user-select: none;
}
.profile-item:hover  { border-color: var(--blue-300, #93c5fd); background: var(--blue-50); }
.profile-item.selected { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.profile-item-icon { font-size: 26px; }
.profile-item-label { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}
.onboarding-step-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}
.auth-bg-blob-1 {
  width: 600px; height: 600px;
  background: #3b82f6;
  top: -200px; left: -100px;
}
.auth-bg-blob-2 {
  width: 400px; height: 400px;
  background: #8b5cf6;
  bottom: -100px; right: -100px;
}

.auth-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: modal-in 0.4s var(--ease);
}
.auth-card-head {
  padding: 36px 36px 24px;
  text-align: center;
}
.auth-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}
.auth-title { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.4px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
.auth-body { padding: 0 36px 36px; }
.auth-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 16px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%; width: calc(50% - 30px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 36px 28px;
  border-top: 1px solid var(--border);
}
.auth-footer a { color: var(--blue-600); font-weight: 600; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; }

/* Pending state card */
.auth-pending {
  text-align: center;
  padding: 48px 36px;
}
.auth-pending-icon {
  font-size: 52px;
  color: var(--orange-500);
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.auth-pending-title { font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 10px; }
.auth-pending-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* =====================================================
   LANDING PAGE
   ===================================================== */
.landing {
  min-height: 100vh;
  background: var(--bg-card);
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 70px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  z-index: 50;
}
.landing-logo {
  display: flex; align-items: center; gap: 10px;
}
.landing-logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: #fff;
}
.landing-logo-name { font-size: 18px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.landing-nav-links { display: flex; align-items: center; gap: 6px; }
.landing-nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  border: none; background: none;
}
.landing-nav-link:hover { color: var(--text-primary); background: var(--bg-base); }

.hero {
  padding: 100px 60px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  border: 1px solid var(--blue-100);
}
.hero-title {
  font-size: 52px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-title span { color: var(--blue-600); }
.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mockup {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 40px 80px rgba(15,23,42,0.25);
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-mockup::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(59,130,246,0.2);
  border-radius: 50%;
  filter: blur(40px);
}
.mockup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mockup-title { font-size: 14px; font-weight: 700; color: #fff; }
.mockup-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.mockup-card-label { font-size: 10px; color: rgba(255,255,255,0.5); font-weight: 500; margin-bottom: 4px; }
.mockup-card-value { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.mockup-card-sub   { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.mockup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mockup-mini { background: rgba(255,255,255,0.06); border-radius: var(--radius-md); padding: 10px; }
.mockup-mini-label { font-size: 9px; color: rgba(255,255,255,0.4); margin-bottom: 3px; }
.mockup-mini-val   { font-size: 14px; font-weight: 700; color: #fff; }
.mockup-bar-wrap {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.mockup-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.features { padding: 80px 60px; background: var(--bg-base); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 40px auto 0; }
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration), box-shadow var(--duration);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.feature-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.feature-desc  { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--blue-600);
  margin-bottom: 10px;
}
.section-title {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.15;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 560px;
}

/* Pricing */
.pricing { padding: 80px 60px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 800px; margin: 40px auto 0; }
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration), box-shadow var(--duration);
}
.pricing-card.featured {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-color: transparent;
  box-shadow: var(--shadow-xl);
  transform: scale(1.02);
}
.pricing-card:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.pricing-card.featured:hover { transform: scale(1.04); }
.pricing-plan { font-size: 13px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }
.pricing-card.featured .pricing-plan { color: rgba(255,255,255,0.6); }
.pricing-price { font-size: 40px; font-weight: 900; letter-spacing: -1px; margin-bottom: 4px; }
.pricing-card.featured .pricing-price { color: #fff; }
.pricing-period { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-card.featured .pricing-period { color: rgba(255,255,255,0.5); }
.pricing-features { list-style: none; margin-bottom: 28px; }
.pricing-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-secondary);
  padding: 6px 0;
}
.pricing-card.featured .pricing-features li { color: rgba(255,255,255,0.75); }
.pricing-features li i { color: var(--green-500); flex-shrink: 0; font-size: 12px; }

/* =====================================================
   ADMIN AREA
   ===================================================== */
.admin-sidebar {
  width: var(--sidebar-w);
  background: #0a0f1a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}
.admin-header { background: #0a0f1a; border-bottom-color: rgba(255,255,255,0.05) !important; }
.admin-badge {
  padding: 2px 8px;
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User status */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.status-dot.active    { background: var(--green-500); box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.status-dot.pending   { background: var(--orange-500); box-shadow: 0 0 0 3px rgba(249,115,22,0.2); }
.status-dot.suspended { background: var(--red-500); }
.status-dot.blocked   { background: #374151; }
.status-dot.rejected  { background: #6b7280; }

/* Analytics number */
.analytics-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin: 8px 0 4px;
}
.analytics-change {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.analytics-change.up   { color: var(--green-600); }
.analytics-change.down { color: var(--red-500); }

/* =====================================================
   REPORTS / CHARTS
   ===================================================== */
.chart-container {
  position: relative;
  height: 240px;
  margin-top: 16px;
}
.chart-container.sm { height: 160px; }
.chart-container.lg { height: 320px; }

/* =====================================================
   SETTINGS
   ===================================================== */
.settings-section { margin-bottom: 32px; }
.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.module-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  margin-bottom: 8px;
  transition: all var(--duration-fast);
  cursor: default;
}
.module-card.active-module { border-color: var(--blue-500); background: var(--blue-50); }
.module-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.module-card-info { flex: 1; }
.module-card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.module-card-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Drag handle */
.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: 4px;
  font-size: 14px;
}
.drag-handle:active { cursor: grabbing; }

/* =====================================================
   LEGAL PAGES
   ===================================================== */
.legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 28px;
}
.legal-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.legal-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.legal-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
  letter-spacing: -0.2px;
}
.legal-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.legal-text + .legal-text { margin-top: 10px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* ── Base: evitar overflow horizontal em qualquer tamanho ── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
#app, .app-shell, .main-content, .page-content,
.landing, .auth-shell {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── TABLET: 1024px ── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .sidebar-overlay.visible { display: block; }
  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .bottom-nav { display: flex; }
  .page-content { padding: 20px 16px calc(var(--bottom-nav-h) + 16px); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding: 60px 24px; }
  .hero-title { font-size: 36px; }
  .hero-mockup { min-height: 280px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .pricing-card.featured { transform: none; }
  .landing-nav { padding: 0 20px; }
  .features { padding: 60px 24px; }
  .pricing { padding: 60px 24px; }
}

/* ── MOBILE: 640px ── */
@media (max-width: 640px) {
  :root {
    --topbar-h: 56px;
    --bottom-nav-h: 64px;
  }

  /* === BASE === */
  .grid-2  { grid-template-columns: 1fr !important; }
  .grid-3  { grid-template-columns: 1fr !important; }
  .grid-4  { grid-template-columns: repeat(2, 1fr) !important; }
  .choice-grid  { grid-template-columns: 1fr !important; }
  .profile-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .hero-cta { flex-direction: column; }

  /* === MODAL === */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100vw !important;
    width: 100% !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    margin: 0 !important;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-card { border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important; }

  /* === AUTH === */
  .auth-shell {
    padding: 0;
    align-items: stretch;
    min-height: 100dvh;
  }
  .auth-card {
    max-width: 100%;
    border-radius: 0;
    min-height: 100dvh;
    box-shadow: none;
    border: none;
  }
  .auth-card-head { padding: 32px 20px 18px; }
  .auth-body      { padding: 0 20px 24px; }
  .auth-footer    { padding: 12px 20px 24px; }

  /* === TOPBAR === */
  .topbar { padding: 0 12px; }
  .topbar-title { font-size: 15px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-subtitle { display: none; }
  .topbar-btn { width: 34px; height: 34px; font-size: 14px; }

  /* === PAGE CONTENT === */
  .page-content {
    padding: 16px 12px calc(var(--bottom-nav-h) + 20px) !important;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* === CARDS === */
  .card-pad { padding: 14px 14px; }
  .card-pad-lg { padding: 18px 14px; }
  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 20px; }
  .stat-card-icon { width: 36px; height: 36px; font-size: 16px; margin-bottom: 10px; }

  /* === ONBOARDING === */
  .onboarding-header { padding: 24px 16px 18px; }
  .onboarding-body   { padding: 16px 16px 20px; }

  /* === SECTION TITLE === */
  .section-title { font-size: 24px; }
  .section-desc  { font-size: 14px; }

  /* === LANDING === */
  .landing-nav {
    padding: 0 16px;
    height: 56px;
  }
  .landing-nav-links .landing-nav-link { display: none; }
  .landing-nav-links .btn { padding: 8px 12px; font-size: 12px; }

  .hero {
    padding: 40px 16px 32px;
    gap: 32px;
  }
  .hero-title { font-size: 28px; letter-spacing: -1px; }
  .hero-desc  { font-size: 14px; }
  .hero-mockup {
    min-height: auto;
    padding: 18px;
  }
  .mockup-card-value { font-size: 18px; }

  .features { padding: 40px 16px; }
  .features-grid { gap: 12px; }
  .feature-card { padding: 18px; }

  .pricing { padding: 40px 16px; }
  .pricing-grid { gap: 16px; max-width: 100%; }
  .pricing-card { padding: 22px 18px; }
  .pricing-price { font-size: 32px; }

  /* === REFERRAL === */
  .referral-hero { padding: 22px 16px; }
  .referral-hero-title { font-size: 20px; }
  .referral-hero-desc  { font-size: 13px; }
  .referral-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .referral-stat  { padding: 10px 6px; }
  .referral-stat-val { font-size: 18px; }
  .referral-code-value { font-size: 18px; letter-spacing: 2px; }
  .referral-how-item { padding: 14px 16px; }

  /* === HELP === */
  .help-categories { grid-template-columns: 1fr; gap: 10px; }
  .help-cat-card { padding: 14px 12px; }
  .help-hero { padding: 20px 16px; }
  .help-hero-title { font-size: 18px; }
  .help-step { padding: 12px; }

  /* === ADMIN === */
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* === FINANCE CATEGORY GRID === */
  .budget-grid { grid-template-columns: 1fr !important; }
}

/* ── SMALL MOBILE: 430px ── */
@media (max-width: 430px) {
  .page-content {
    padding: 12px 10px calc(var(--bottom-nav-h) + 16px) !important;
  }

  /* Hero card */
  .hero-card { padding: 18px 14px !important; }
  .hero-card-value { font-size: 22px !important; }

  /* Quick actions */
  .quick-actions { gap: 7px; }
  .quick-action-btn { padding: 10px 4px; }
  .quick-action-icon { width: 38px !important; height: 38px !important; font-size: 17px !important; }
  .quick-action-label { font-size: 9.5px !important; }

  /* Stat cards */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .stat-card { padding: 12px 10px; }
  .stat-card-value { font-size: 18px; }
  .stat-card-icon { width: 32px; height: 32px; font-size: 14px; }

  /* Tasks / habits */
  .task-item, .habit-item { padding: 10px 0; }
  .tx-item { padding: 10px 0; }

  /* Auth */
  .auth-card-head { padding: 24px 16px 14px; }
  .auth-body      { padding: 0 16px 20px; }
  .auth-footer    { padding: 10px 16px 20px; }
  .auth-logo      { width: 44px; height: 44px; font-size: 20px; }
  .auth-title     { font-size: 20px; }

  /* Forms */
  .form-input, .form-select { font-size: 16px; } /* evita zoom iOS */
  .btn-xl { padding: 13px 20px; font-size: 14px; }
  .btn-lg { padding: 11px 18px; font-size: 13.5px; }

  /* Plan cards */
  .plan-card { padding: 20px 16px; }

  /* Referral */
  .referral-code-box { flex-direction: column; gap: 10px; align-items: flex-start; }
  .referral-copy-btn { width: 100%; justify-content: center; }
}

/* ── VERY SMALL: 360px ── */
@media (max-width: 360px) {
  .hero-card-value { font-size: 19px !important; }
  .quick-action-label { font-size: 9px !important; }
  .bottom-nav-item span { font-size: 8.5px; }
  .bottom-nav-item i { font-size: 18px; }
  .stat-card-value { font-size: 16px; }
  .auth-title { font-size: 18px; }
  .referral-stat-val { font-size: 16px; }
  .referral-hero-title { font-size: 18px; }
}

/* ── Horizontal scroll para listas secundárias (chips, tabs) ── */
.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* Fade lateral para indicar scroll horizontal */
.scroll-x-wrap {
  position: relative;
}
.scroll-x-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 4px;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-base));
  pointer-events: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ── Tabs com scroll horizontal no mobile ── */
@media (max-width: 640px) {
  .filter-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
    flex-wrap: nowrap !important;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tabs .btn { flex-shrink: 0; white-space: nowrap; }

  .pill-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .pill-tabs::-webkit-scrollbar { display: none; }
  .pill-tab { white-space: nowrap; flex-shrink: 0; }

  /* Quick actions horizontal scroll no mobile pequeno */
  .quick-actions-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding-bottom: 4px;
  }
  .quick-actions-scroll::-webkit-scrollbar { display: none; }
  .quick-actions-scroll > * { flex-shrink: 0; width: 72px; }
}

/* ── Bottom nav no mobile: garantir ícones legíveis ── */
@media (max-width: 640px) {
  .bottom-nav {
    padding: 0 0 8px;
    height: var(--bottom-nav-h);
  }
  .bottom-nav-item {
    padding: 8px 2px 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  .bottom-nav-item i { font-size: 19px; }
  .bottom-nav-item span {
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56px;
  }
}

/* ── Topbar: esconder subtitle no mobile, manter compacto ── */
@media (max-width: 480px) {
  .topbar-subtitle { display: none; }
  .topbar-right { gap: 4px; }
  .topbar-btn { width: 32px; height: 32px; font-size: 13px; }
  .topbar-title { font-size: 14px; }
}

/* ── Table: scroll horizontal em tabelas ── */
@media (max-width: 640px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  table {
    min-width: 520px;
  }
  .table-compact td, .table-compact th {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* ── Cards que podem ter conteúdo longo ── */
@media (max-width: 640px) {
  .card-header { flex-wrap: wrap; gap: 6px; }
  .card-title  { font-size: 13.5px; }
  .card-action { font-size: 11.5px; }

  /* Overflow em listas longas dentro do card */
  .tx-name, .task-name, .habit-name { word-break: break-word; }

  /* Ocultar colunas secundárias de tabelas no mobile */
  .hide-mobile { display: none !important; }
}

/* ── Upgrade inline: vertical no mobile ── */
@media (max-width: 500px) {
  .upgrade-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .upgrade-inline-btn { width: 100%; justify-content: center; }
}

/* ── Notif dropdown: full-width mobile ── */
@media (max-width: 480px) {
  .notif-dropdown {
    right: 0 !important;
    left: 0 !important;
    width: auto !important;
    max-width: 100vw;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}

/* ── Offline bar responsiva ── */
@media (max-width: 640px) {
  .offline-bar { font-size: 12px; padding: 8px 12px; }
}

/* ── Plan cards mobile ── */
@media (max-width: 640px) {
  .plans-grid { grid-template-columns: 1fr !important; gap: 16px; }
  .plan-card  { padding: 22px 18px; }
}

/* ── Settings grid mobile ── */
@media (max-width: 640px) {
  .settings-modules-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Input / select: evitar zoom iOS ── */
@media (max-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Feedback / choices grid ── */
@media (max-width: 500px) {
  #feedbackTypeGrid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .choice-item { padding: 12px 8px; }
  .choice-icon { font-size: 20px; }
  .choice-label { font-size: 11px; }
}

/* ── Safe area iOS ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }
  .page-content {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 20px) !important;
  }
  .fab {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px);
  }
}

/* =====================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ===================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.slide-up { animation: slide-up 0.3s var(--ease) both; }

@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-base) 25%, var(--border) 50%, var(--bg-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* FAB */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  right: 20px;
  width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(29,78,216,0.4);
  cursor: pointer;
  z-index: 90;
  transition: all var(--duration-fast);
}
.fab:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(29,78,216,0.5); }
.fab:active { transform: scale(0.95); }
.fab.desktop-hidden { display: none; }

@media (max-width: 1024px) { .fab.desktop-hidden { display: flex; } }

/* Water tracker */
.water-cups {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.water-cup {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: all var(--duration-fast);
  background: var(--bg-base);
}
.water-cup.filled { background: var(--blue-50); border-color: var(--blue-500); }
.water-cup:hover  { transform: scale(1.1); }

/* Streak badge */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

/* Calendar */
.mini-calendar { width: 100%; }
.mini-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mini-cal-month { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.mini-cal-nav {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}
.mini-cal-nav:hover { background: var(--bg-base); color: var(--text-primary); }
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mini-cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
  text-transform: uppercase;
}
.mini-cal-day {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
  position: relative;
}
.mini-cal-day:hover { background: var(--bg-base); color: var(--text-primary); }
.mini-cal-day.today {
  background: var(--blue-700);
  color: #fff;
  font-weight: 800;
}
.mini-cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 1px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange-500);
}
.mini-cal-day.other-month { color: var(--border); }

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  animation: modal-in 0.2s var(--ease);
}
.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-title { font-size: 13px; font-weight: 700; }
.notif-mark  { font-size: 11px; color: var(--blue-600); cursor: pointer; font-weight: 600; }
.notif-item {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-base); }
.notif-item.unread { background: var(--blue-50); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0; margin-top: 5px;
}
.notif-dot.read { background: transparent; }
.notif-text   { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.notif-time   { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.step-indicator-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.step-indicator-item.active { color: var(--blue-600); }
.step-indicator-item.done   { color: var(--green-600); }
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
}
.step-indicator-item.done .step-num { background: var(--green-500); border-color: var(--green-500); color: #fff; }
.step-line {
  height: 1.5px;
  flex: 1;
  background: var(--border);
  margin: 0 2px;
}

/* Report card number large */
.report-big {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}
.report-period {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Donut wrapper */
.donut-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-center-val  { font-size: 22px; font-weight: 900; color: var(--text-primary); }
.donut-center-label { font-size: 10px; color: var(--text-muted); font-weight: 600; }

/* =====================================================
   ATLAS v2 — UX/UI PREMIUM UPGRADE
   Inspired by Nubank · iFood · Apple
   ===================================================== */

/* ── Glassmorphism cards ── */
.glass-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(15,23,42,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
}

/* ── Gradient hero cards (Nubank style) ── */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero-card-content { position: relative; z-index: 1; }
.hero-card-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; margin-bottom: 6px; }
.hero-card-value { font-size: 32px; font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.hero-card-sub   { font-size: 12px; opacity: 0.7; margin-top: 6px; }

.hero-card-blue   { background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%); }
.hero-card-dark   { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); }
.hero-card-green  { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.hero-card-purple { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); }
.hero-card-orange { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); }

/* ── Quick action buttons (iFood style) ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}
.quick-action-btn:hover, .quick-action-btn:active {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200, #bfdbfe);
}
.quick-action-btn:active { transform: scale(0.97); }
.quick-action-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.quick-action-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ── Premium section divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
}
.section-divider-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Activity feed items ── */
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
  cursor: default;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--bg-base); margin: 0 -16px; padding: 14px 16px; border-radius: var(--radius-md); }
.feed-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.feed-dot.blue   { background: var(--blue-500); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.feed-dot.green  { background: var(--green-500); box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
.feed-dot.orange { background: var(--orange-500); box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.feed-dot.red    { background: var(--red-500); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.feed-dot.purple { background: var(--purple-500); box-shadow: 0 0 0 3px rgba(168,85,247,0.15); }
.feed-body { flex: 1; }
.feed-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.feed-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.feed-time  { font-size: 11px; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }

/* ── Referral card ── */
.referral-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #312e81 100%);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.referral-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.referral-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.referral-hero-content { position: relative; z-index: 1; }
.referral-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.referral-hero-title {
  font-size: 26px; font-weight: 900; color: #fff;
  letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 8px;
}
.referral-hero-desc { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.6; margin-bottom: 24px; }

.referral-code-box {
  background: rgba(255,255,255,0.1);
  border: 1.5px dashed rgba(255,255,255,0.3);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.referral-code-label { font-size: 10px; color: rgba(255,255,255,0.5); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 3px; }
.referral-code-value { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: 3px; font-family: 'Courier New', monospace; }
.referral-copy-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.referral-copy-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.02); }
.referral-copy-btn:active { transform: scale(0.97); }

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.referral-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
}
.referral-stat-val { font-size: 24px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.referral-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }

.referral-how {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 20px;
}
.referral-how-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
}
.referral-how-item:last-child { border-bottom: none; }
.referral-how-item:hover { background: var(--bg-base); }
.referral-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-700);
  color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.referral-how-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.referral-how-desc  { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.referral-friends-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.referral-friend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bg-base);
  transition: background var(--duration-fast);
}
.referral-friend-item:last-child { border-bottom: none; }
.referral-friend-item:hover { background: var(--bg-base); }
.referral-friend-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.referral-friend-name  { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.referral-friend-date  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.referral-friend-reward {
  margin-left: auto;
  font-size: 12px; font-weight: 700; color: var(--green-600);
  background: var(--green-50); border: 1px solid var(--green-100);
  padding: 3px 9px; border-radius: var(--radius-full);
}

/* ── Help / Guide ── */
.help-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 24px;
  text-align: center;
}
.help-hero-icon { font-size: 44px; margin-bottom: 12px; }
.help-hero-title { font-size: 22px; font-weight: 900; margin-bottom: 6px; letter-spacing: -0.4px; }
.help-hero-desc  { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.6; }

.help-search {
  position: relative;
  margin-bottom: 24px;
}
.help-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  box-shadow: var(--shadow-sm);
}
.help-search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.help-search-input::placeholder { color: var(--text-muted); }
.help-search-icon {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px;
  pointer-events: none;
}

.help-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.help-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-card);
}
.help-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200, #bfdbfe);
}
.help-cat-card:active { transform: scale(0.98); }
.help-cat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.help-cat-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.help-cat-desc  { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.help-cat-arrow { margin-left: auto; color: var(--text-muted); font-size: 13px; flex-shrink: 0; }

.help-article {
  animation: slide-up 0.25s var(--ease) both;
}
.help-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--blue-600);
  cursor: pointer; margin-bottom: 20px;
  padding: 6px 0;
  background: none; border: none;
  transition: opacity var(--duration-fast);
}
.help-back-btn:hover { opacity: 0.7; }

.help-article-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.help-article-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.help-article-title { font-size: 22px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.4px; }
.help-article-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.help-step {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-base);
  border-radius: var(--radius-lg);
  transition: background var(--duration-fast);
}
.help-step:hover { background: var(--blue-50); }
.help-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-700); color: #fff;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.help-step-content {}
.help-step-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.help-step-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.help-tip {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; gap: 10px;
  margin: 16px 0;
}
.help-tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.help-tip-text { font-size: 13px; color: var(--blue-700); line-height: 1.6; }

.help-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow var(--duration-fast);
}
.help-faq-item:hover { box-shadow: var(--shadow-sm); }
.help-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  background: var(--bg-card);
  user-select: none;
  gap: 12px;
}
.help-faq-q i { color: var(--text-muted); font-size: 12px; flex-shrink: 0; transition: transform var(--duration); }
.help-faq-item.open .help-faq-q i { transform: rotate(180deg); }
.help-faq-a {
  display: none;
  padding: 0 16px 14px;
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.7;
  background: var(--bg-base);
}
.help-faq-item.open .help-faq-a { display: block; }

/* ── Onboarding v2 (premium feel) ── */
.onboard-progress {
  display: flex; gap: 4px; margin-bottom: 24px;
}
.onboard-prog-bar {
  height: 4px; border-radius: 99px; flex: 1;
  background: rgba(255,255,255,0.15);
  transition: background 0.4s var(--ease);
  overflow: hidden;
}
.onboard-prog-bar.done   { background: var(--blue-500); }
.onboard-prog-bar.active { background: rgba(255,255,255,0.8); }

/* ── Upgrade prompt (premium inline) ── */
.upgrade-inline {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.upgrade-inline-icon { font-size: 32px; flex-shrink: 0; }
.upgrade-inline-text {}
.upgrade-inline-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.upgrade-inline-desc  { font-size: 13px; color: rgba(255,255,255,0.65); }
.upgrade-inline-btn {
  background: #fff; color: var(--blue-700);
  padding: 10px 20px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 800; border: none; cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.upgrade-inline-btn:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.upgrade-inline-btn:active { transform: scale(0.97); }

/* ── Number input stepper ── */
.input-stepper {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.stepper-btn {
  width: 40px; height: 40px; border: none;
  background: var(--bg-base); color: var(--text-secondary);
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background var(--duration-fast);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stepper-btn:hover { background: var(--border); color: var(--text-primary); }
.stepper-value {
  flex: 1; text-align: center; font-size: 15px; font-weight: 700;
  color: var(--text-primary); background: var(--bg-card);
  border: none; outline: none; padding: 8px 4px;
  min-width: 60px;
}

/* ── Pill tabs (premium) ── */
.pill-tabs {
  display: flex; gap: 4px;
  background: var(--bg-base);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 20px;
}
.pill-tab {
  flex: 1; padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--duration) var(--ease);
  text-align: center;
  white-space: nowrap;
}
.pill-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ── Floating summary bar (mobile) ── */
.float-summary {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 12px);
  left: 16px; right: 16px;
  background: var(--bg-sidebar);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 80;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
  animation: slide-up 0.3s var(--ease);
}
.float-summary-label { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 600; }
.float-summary-value { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; }

/* ── Confetti animation ── */
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall 2s ease-in forwards;
}

/* ── Streak animation ── */
@keyframes streak-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.streak-pop { animation: streak-pop 0.4s var(--ease) both; }

/* ── Smooth number counter ── */
.counter-animate {
  display: inline-block;
  animation: count-up 0.5s var(--ease) both;
}

/* ── Loading skeleton variants ── */
.skeleton-text { height: 14px; border-radius: var(--radius-sm); }
.skeleton-title { height: 24px; border-radius: var(--radius-sm); }
.skeleton-avatar { border-radius: 50%; }
.skeleton-card { border-radius: var(--radius-lg); }

/* ── Ripple effect ── */
.ripple {
  position: relative; overflow: hidden;
}
.ripple::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0; transform: scale(0);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.ripple:active::after { opacity: 1; transform: scale(2); transition: none; }

/* ── Success state ── */
.success-check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-50);
  border: 2px solid var(--green-200, #bbf7d0);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  animation: bounce-in 0.5s var(--ease);
}

/* ── Invite link input ── */
.invite-link-box {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card);
}
.invite-link-input {
  flex: 1; padding: 11px 14px;
  font-size: 12px; color: var(--text-muted);
  background: none; border: none; outline: none;
  font-family: monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.invite-link-copy {
  padding: 11px 16px;
  background: var(--blue-700); color: #fff;
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 700;
  transition: background var(--duration-fast);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.invite-link-copy:hover { background: var(--blue-600); }
.invite-link-copy:active { background: var(--blue-700); transform: scale(0.98); }

/* ── Share buttons ── */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.share-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
  transition: all var(--duration-fast);
}
.share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.share-btn:active { transform: scale(0.97); }
.share-btn-whatsapp { background: #25D366; color: #fff; }
.share-btn-copy     { background: var(--bg-base); color: var(--text-primary); border: 1px solid var(--border); }
.share-btn-more     { background: var(--bg-base); color: var(--text-primary); border: 1px solid var(--border); }

/* ── Responsive overrides ── */
@media (max-width: 640px) {
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick-action-btn { padding: 12px 6px; }
  .quick-action-icon { width: 40px; height: 40px; font-size: 18px; }
  .referral-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .help-categories { grid-template-columns: 1fr; }
  .hero-card-value { font-size: 26px; }
  .referral-hero { padding: 24px 18px; }
  .referral-hero-title { font-size: 22px; }
}

/* =====================================================
   ATLAS v3 — PREMIUM UX UPGRADE
   Nubank · iFood · Apple Inspired
   ===================================================== */

/* ── Page entry animation ── */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content {
  animation: page-enter 0.25s var(--ease) both;
}

/* ── Hero balance card premium ── */
.hero-card {
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

/* ── Quick action ripple enhanced ── */
.quick-action-btn {
  transition: all 200ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.quick-action-btn:active {
  transform: scale(0.93) !important;
}

/* ── Stat card enhanced ── */
.stat-card {
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ── Mobile hero text ── */
@media (max-width: 480px) {
  .hero-card-value { font-size: 24px !important; }
  .hero-card { padding: 20px !important; }
  .quick-action-label { font-size: 10px !important; }
  .quick-action-icon { width: 40px !important; height: 40px !important; }
}

/* ── Bottom nav enhanced (iFood style) ── */
.bottom-nav-item {
  transition: all 180ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item:active {
  transform: scale(0.88);
}
.bottom-nav-item.active .bottom-nav-icon {
  animation: bounce-icon 0.35s var(--ease);
}
@keyframes bounce-icon {
  0%,100% { transform: translateY(0); }
  40%      { transform: translateY(-5px); }
  70%      { transform: translateY(-2px); }
}

/* ── Card hover premium ── */
.card {
  transition: box-shadow var(--duration) var(--ease);
}

/* ── Feedback submitted success ── */
.feedback-success-wrap {
  text-align: center;
  padding: 40px 20px;
  animation: page-enter 0.3s var(--ease) both;
}
.feedback-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-50);
  border: 2px solid var(--green-200, #bbf7d0);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 18px;
  animation: bounce-in 0.5s var(--ease);
}

/* ── Referral code pulse animation ── */
@keyframes code-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
.referral-code-box {
  animation: code-pulse 2.5s ease-in-out infinite;
}

/* ── Help search focus ── */
.help-search-input:focus + .help-search-icon,
.help-search-input:focus ~ .help-search-icon {
  color: var(--blue-500);
}

/* ── Onboarding v3 premium card ── */
.onboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}
.onboard-head {
  background: linear-gradient(135deg,#0f172a,#1e3a8a);
  padding: 28px 28px 20px;
  color: #fff;
}
.onboard-body { padding: 24px 28px 28px; }

/* ── Settings quick links ── */
.settings-quick-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--bg-base);
  cursor: pointer; transition: opacity var(--duration-fast);
}
.settings-quick-link:last-child { border-bottom: none; }
.settings-quick-link:hover { opacity: 0.75; }
.settings-quick-link-icon {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.settings-quick-link-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-quick-link-desc  { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ── Premium badge animated ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.premium-badge-shimmer {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Toast premium ── */
.toast {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Modal premium entrance ── */
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-card { animation: modal-enter 0.22s var(--ease) both; }

/* ── Empty state enhanced ── */
.empty-state {
  animation: page-enter 0.3s var(--ease) 0.1s both;
}

/* ── Habit streak fire emoji bounce ── */
@keyframes fire-bounce {
  0%,100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.15); }
}
.streak-fire { display: inline-block; animation: fire-bounce 1.2s ease-in-out infinite; }

/* ── Referral Hero mobile ── */
@media (max-width: 600px) {
  .referral-stats { grid-template-columns: repeat(3, 1fr); }
  .referral-stat-val { font-size: 20px; }
}

/* ── Table responsive ── */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Transition slide-in from right ── */
@keyframes slide-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.slide-right { animation: slide-right 0.2s var(--ease) both; }

/* ── Loading dot animation ── */
@keyframes dot-pulse {
  0%,80%,100% { opacity: 0.3; transform: scale(0.8); }
  40%         { opacity: 1; transform: scale(1); }
}
.dot-pulse { animation: dot-pulse 1.2s ease-in-out infinite; }
.dot-pulse:nth-child(2) { animation-delay: 0.2s; }
.dot-pulse:nth-child(3) { animation-delay: 0.4s; }

/* ── Mobile bottom safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }
  .main-content {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 16px);
  }
}

/* ── Personalization grid mobile ── */
@media (max-width: 768px) {
  .personalization-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* ── Landing hero mockup: esconder no mobile pequeno para evitar overflow ── */
@media (max-width: 640px) {
  .hero-mockup { display: none; }
  .hero { padding: 36px 16px 28px !important; }
  .hero-title { font-size: 26px !important; letter-spacing: -0.8px; }
  .hero-desc { font-size: 14px !important; max-width: 100%; }
  .hero-eyebrow { font-size: 11px; }
}

/* ── Features e pricing no mobile ── */
@media (max-width: 640px) {
  .features { padding: 36px 16px !important; }
  .pricing  { padding: 36px 16px !important; }
  .section-title { font-size: 22px !important; letter-spacing: -0.5px; }
  .feature-card  { padding: 16px 14px !important; }
  .pricing-card  { padding: 20px 16px !important; }
  .pricing-price { font-size: 28px !important; }
}

/* ── Corrigir topbar: online/offline badge no mobile ── */
@media (max-width: 480px) {
  /* Esconder badge online/offline no mobile para economizar espaço */
  .topbar-online-badge { display: none !important; }
}

/* ── Corrigir grids inline dos módulos no mobile ── */

/* Grids 2 colunas inline → 1 coluna no mobile */
@media (max-width: 600px) {

  /* Hero card: receitas/despesas lado a lado fica comprimido */
  .hero-card [style*="grid-template-columns: 1fr 1fr"],
  .hero-card [style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    justify-content: space-between;
    gap: 8px;
  }

  /* Finance stats topo: forçar 1 col se necessário */
  .finance-stats-row [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Grids de formulário de 2 col → 1 col */
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Grid 4 colunas inline → 2 colunas */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Grid 5 colunas inline → 3 colunas */
  [style*="grid-template-columns:repeat(5,1fr)"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ── Dashboard: hero card receitas/despesas ── */
@media (max-width: 430px) {
  .hero-card [style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
}

/* ── Finance: stat cards superiores ── */
@media (max-width: 640px) {
  /* Stat cards do finance — 3 colunas → 1 coluna */
  .finance-toprow { grid-template-columns: 1fr !important; }

  /* Transaction list */
  .tx-item { gap: 10px; }
  .tx-icon  { width: 34px !important; height: 34px !important; font-size: 14px !important; flex-shrink: 0; }
  .tx-amount { font-size: 13px; white-space: nowrap; }

  /* Budget grid → 1 col */
  .budget-grid-container { grid-template-columns: 1fr !important; }
}

/* ── Health: números de log inline ── */
@media (max-width: 500px) {
  [style*="grid-template-columns:1fr 1fr;gap:12px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Goal cards ── */
@media (max-width: 640px) {
  .goal-card { padding: 16px 14px; }
  .goal-actions { flex-wrap: wrap; gap: 6px; }
}

/* ── Planning: calendário ── */
@media (max-width: 640px) {
  .mini-calendar { font-size: 11px; }
  .calendar-day  { height: 28px; font-size: 11px; }
}

/* ── Projects cards ── */
@media (max-width: 640px) {
  .project-card { padding: 16px 14px; }
}

/* ── Reports: charts ── */
@media (max-width: 640px) {
  .chart-container    { height: 200px; }
  .chart-container.lg { height: 240px; }
  .donut-center-val   { font-size: 16px; }
}

/* ── Settings: módulos grid ── */
@media (max-width: 500px) {
  .module-card { padding: 10px 12px; gap: 10px; }
  .module-card-icon { width: 32px; height: 32px; font-size: 16px; }
  .module-card-name { font-size: 13px; }
  .module-card-desc { display: none; }
}

/* ── Admin: tabela overflow scroll ── */
@media (max-width: 640px) {
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table-wrap table { min-width: 560px; }
}

/* ── Plans page ── */
@media (max-width: 640px) {
  .plans-page-grid { grid-template-columns: 1fr !important; }
}

/* ── AI Panel ── */
@media (max-width: 480px) {
  #mealAIResult [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* =====================================================
   ATLAS RESPONSIVE PATCH — MOBILE-FIRST DEFINITIVE
   Covers: 320px, 360px, 375px, 390px, 412px, 430px
   ===================================================== */

/* ── Global Mobile Safety ── */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
* { box-sizing: border-box; }

/* Prevent any element from causing horizontal overflow */
.app-shell, .main-content, .page-content,
.card, .card-pad, .stat-card, .hero-card,
.modal, .modal-card { max-width: 100%; }

/* All inline grids inside content must respect container width */
.page-content > div, .page-content > section {
  max-width: 100%;
  min-width: 0;
}

/* ── Main content area ── */
.main-content {
  min-width: 0;
  overflow-x: hidden;
  width: 100%;
}

/* ── TX item (transactions): prevent overflow ── */
.tx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-base);
  min-width: 0;
}
.tx-info { flex: 1; min-width: 0; overflow: hidden; }
.tx-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-cat  { font-size: 11px; color: var(--text-muted); }
.tx-amount { font-size: 14px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.tx-amount.positive { color: var(--green-600); }
.tx-amount.negative { color: var(--red-500); }

/* ── Habit item ── */
.habit-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bg-base); min-width: 0; }
.habit-info { flex: 1; min-width: 0; overflow: hidden; }
.habit-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.habit-streak { font-size: 11px; color: var(--text-muted); }

/* ── Task item ── */
.task-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bg-base); min-width: 0; }
.task-info  { flex: 1; min-width: 0; overflow: hidden; }
.task-name  { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta  { font-size: 11px; color: var(--text-muted); }

/* ── Quick actions: always 4 cols, fluid ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.quick-action-btn:active { transform: scale(0.95); }
.quick-action-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quick-action-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  max-width: 100%;
}

/* ── Hero card ── */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.hero-card::before, .hero-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero-card::before { width: 200px; height: 200px; top: -60px; right: -60px; }
.hero-card::after  { width: 140px; height: 140px; bottom: -40px; left: -30px; }
.hero-card-content { position: relative; z-index: 1; }
.hero-card-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; opacity: 0.65; margin-bottom: 8px;
}
.hero-card-value {
  font-size: 32px; font-weight: 900; letter-spacing: -1px;
  line-height: 1.1; word-break: break-word;
}
.hero-card-blue   { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.hero-card-dark   { background: linear-gradient(135deg, #0f172a, #1e3a8a); }
.hero-card-green  { background: linear-gradient(135deg, #065f46, #16a34a); }
.hero-card-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.hero-card-purple { background: linear-gradient(135deg, #6d28d9, #a855f7); }

/* ── Card padding ── */
.card-pad   { padding: 18px; }
.card-pad-lg{ padding: 22px; }

/* ── Budget grid – 2 cols on mobile ── */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Form grid (2 cols) responsive ── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Filter tabs: horizontal scroll ── */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  margin-bottom: 16px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .btn { flex-shrink: 0; white-space: nowrap; }

/* ── Topbar safe ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.topbar-title { font-size: 16px; font-weight: 800; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-subtitle { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Bottom nav: fixed, safe area ── */
.bottom-nav {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

/* ── Float summary bar ── */
.float-summary {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(var(--bottom-nav-h) + 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 12px 20px;
  z-index: 80;
  box-shadow: var(--shadow-xl);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

/* ── Referral hero: no pseudo overflow ── */
.referral-hero {
  overflow: hidden;
  position: relative;
}
.referral-hero::before, .referral-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.referral-hero::before { width: 180px; height: 180px; top: -60px; right: -40px; }
.referral-hero::after  { width: 120px; height: 120px; bottom: -30px; left: -20px; }

/* ── Onboarding card: safe widths ── */
.onboarding-card { max-width: 100%; box-sizing: border-box; }

/* ── Alert: wrappable ── */
.alert { flex-wrap: wrap; word-break: break-word; }

/* ── Plans grid: stacked on small ── */
.plans-grid-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── Admin tables: scroll container ── */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.table-scroll-wrap table { min-width: 560px; }

/* ===================================================
   MEDIA QUERIES — COMPREHENSIVE RESPONSIVE FIXES
   =================================================== */

/* 1024px: Tablet adjustments */
@media (max-width: 1024px) {
  .plans-grid-wrap { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

/* 768px: Small tablets */
@media (max-width: 768px) {
  .hero-card-value { font-size: 28px; }
  .budget-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* 640px: Large phones */
@media (max-width: 640px) {
  /* Page content */
  .page-content {
    padding: 16px 14px calc(var(--bottom-nav-h) + 20px) !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* All grids → 1 col, except quick-actions */
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: repeat(2,1fr) !important; }

  /* Quick actions: always 4 cols on mobile (compact) */
  .quick-actions { grid-template-columns: repeat(4,1fr) !important; gap: 8px; }
  .quick-action-icon { width: 40px !important; height: 40px !important; }
  .quick-action-label { font-size: 10px !important; }

  /* Hero card */
  .hero-card { padding: 18px 16px; }
  .hero-card-value { font-size: 26px; }
  .hero-card-label { font-size: 9px; }

  /* Stats */
  .stat-card { padding: 13px 12px; }
  .stat-card-value { font-size: 19px; }
  .stat-card-icon { width: 34px; height: 34px; font-size: 15px; margin-bottom: 8px; }
  .stat-card-change { font-size: 10px; }

  /* Cards */
  .card-pad, .card-pad-lg { padding: 14px; }

  /* Budget grid → 2 col */
  .budget-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px; }

  /* Form grid → 1 col */
  .form-grid-2 { grid-template-columns: 1fr !important; }

  /* Goal cards */
  .goal-card { padding: 14px; }
  .goal-actions { flex-wrap: wrap; gap: 6px; }

  /* Referral */
  .referral-hero { padding: 20px 16px; }
  .referral-hero-title { font-size: 20px; }
  .referral-stats { grid-template-columns: repeat(3,1fr) !important; gap: 8px; }
  .referral-stat { padding: 10px 6px; }
  .referral-stat-val { font-size: 18px; }
  .referral-code-box { flex-wrap: wrap; gap: 10px; }

  /* Help */
  .help-categories { grid-template-columns: 1fr; }
  .help-hero { padding: 20px 16px; }
  .help-hero-title { font-size: 18px; }

  /* Plans */
  .plans-grid-wrap { grid-template-columns: 1fr !important; }

  /* Admin */
  .admin-stat-grid { grid-template-columns: repeat(2,1fr) !important; }

  /* Modal bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal-card {
    max-width: 100vw !important;
    width: 100% !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    margin: 0 !important;
  }

  /* Topbar */
  .topbar { padding: 0 12px; }
  .topbar-title { font-size: 15px; max-width: 140px; }
  .topbar-subtitle { display: none; }
  .topbar-btn { width: 34px; height: 34px; font-size: 14px; }

  /* Section heading */
  .section-title { font-size: 24px; }

  /* Landing */
  .landing-nav { padding: 0 16px; height: 56px; }
  .landing-nav-links .landing-nav-link { display: none; }
  .hero { padding: 40px 16px; }
  .hero-title { font-size: 28px; }
  .features { padding: 40px 16px; }
  .features-grid { grid-template-columns: 1fr !important; }
  .pricing { padding: 40px 16px; }
  .pricing-grid { grid-template-columns: 1fr !important; max-width: 100%; }
  .hero-cta { flex-direction: column; }

  /* Auth */
  .auth-shell { padding: 0; align-items: stretch; }
  .auth-card { max-width: 100%; border-radius: 0; box-shadow: none; border: none; min-height: 100dvh; }
  .auth-card-head { padding: 28px 16px 16px; }
  .auth-body { padding: 0 16px 20px; }
  .auth-footer { padding: 10px 16px 20px; }

  /* Fix: no horizontal scroll on body */
  body { overflow-x: hidden; }
  #app { overflow-x: hidden; }
}

/* 480px: Medium-small phones */
@media (max-width: 480px) {
  .hero-card-value { font-size: 24px; }
  .stat-card-value { font-size: 17px; }
  .quick-action-icon { width: 38px !important; height: 38px !important; }
  .budget-grid { grid-template-columns: repeat(2,1fr) !important; }
  .ai-grid { grid-template-columns: repeat(2,1fr) !important; }
  /* AI meal result */
  #mealAIResult [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2,1fr) !important;
  }
}

/* 430px: Standard large phones (iPhone 14/15 Pro Max) */
@media (max-width: 430px) {
  .page-content { padding: 12px 12px calc(var(--bottom-nav-h) + 16px) !important; }
  .hero-card { padding: 16px 14px; }
  .hero-card-value { font-size: 22px; }
  .quick-actions { gap: 7px; }
  .quick-action-btn { padding: 10px 4px; }
  .quick-action-icon { width: 36px !important; height: 36px !important; font-size: 17px !important; }
  .quick-action-label { font-size: 9.5px !important; }
  .stat-card { padding: 11px 10px; }
  .stat-card-value { font-size: 16px; }
  .stat-card-icon { width: 30px; height: 30px; font-size: 13px; }
  .form-input, .form-select, .form-textarea { font-size: 16px !important; } /* iOS zoom fix */
  .btn-xl { padding: 13px 18px; font-size: 14px; }
  .btn-lg { padding: 11px 16px; font-size: 13px; }
  .task-item, .habit-item, .tx-item { padding: 9px 0; }
  .card-pad { padding: 12px 12px; }
  .referral-code-box { flex-direction: column; gap: 10px; }
  .referral-copy-btn { width: 100%; justify-content: center; }
  .referral-stats { gap: 6px; }
  .referral-stat-val { font-size: 17px; }
  .plans-grid-wrap { grid-template-columns: 1fr !important; }
}

/* 390px: iPhone 14/15 Pro */
@media (max-width: 390px) {
  .hero-card-value { font-size: 20px; }
  .quick-action-label { font-size: 9px !important; }
  .stat-card-value { font-size: 15px; }
  .tx-amount { font-size: 13px; }
  .referral-stats { grid-template-columns: repeat(3,1fr) !important; }
}

/* 375px: iPhone SE/13 mini */
@media (max-width: 375px) {
  .page-content { padding: 10px 10px calc(var(--bottom-nav-h) + 14px) !important; }
  .hero-card-value { font-size: 19px; }
  .quick-action-icon { width: 34px !important; height: 34px !important; font-size: 16px !important; }
  .bottom-nav-item i { font-size: 18px; }
  .bottom-nav-item span { font-size: 8.5px; }
  .stat-card-label { font-size: 10px; }
}

/* 360px: Common Android (Moto, Samsung A-series) */
@media (max-width: 360px) {
  .hero-card-value { font-size: 18px !important; }
  .quick-action-label { font-size: 8.5px !important; }
  .stat-card-value { font-size: 14px; }
  .stat-card-icon { width: 28px; height: 28px; font-size: 12px; }
  .bottom-nav-item i { font-size: 17px; }
  .bottom-nav-item span { font-size: 8px; }
  .topbar-title { max-width: 110px; }
  .card-pad { padding: 10px 10px; }
  .auth-card-head { padding: 22px 14px 14px; }
  .auth-body { padding: 0 14px 16px; }
}

/* 320px: Very small (iPhone SE 1st gen) */
@media (max-width: 320px) {
  .hero-card-value { font-size: 16px !important; }
  .page-content { padding: 8px 8px calc(var(--bottom-nav-h) + 12px) !important; }
  .quick-actions { gap: 5px; }
  .quick-action-icon { width: 30px !important; height: 30px !important; font-size: 14px !important; }
  .stat-card-value { font-size: 13px; }
  .topbar-title { max-width: 90px; font-size: 13px; }
}

/* ── Prevent overflow from feed-item hover effect ── */
.feed-item { position: relative; margin: 0 !important; }
.feed-item:hover { margin: 0 !important; background: var(--bg-base); }

/* ── Inline styles override for mobile grids ── */
@media (max-width: 640px) {
  /* Dashboard hero grid 1fr 1fr → stack */
  .hero-income-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }

  /* Goal progress inline */
  .goal-progress-row { flex-wrap: wrap; gap: 6px; }

  /* Form inline grids */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  /* Exception: keep budget grid 2-col */
  .budget-grid [style],
  .quick-actions [style] { /* keep as is */ }
}

/* ── iOS-specific safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .page-content {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 20px) !important;
  }
  .float-summary {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px);
  }
}

/* ── Landing personalization grid responsive ── */
.personalization-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 768px) {
  .personalization-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Landing section padding ── */
.landing-personalization-section {
  padding: 60px 16px;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── Pricing grid on landing ── */
.landing-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 40px auto 0;
}
@media (max-width: 640px) {
  .landing-pricing-grid { grid-template-columns: 1fr; }
}

/* ── Footer mobile ── */
@media (max-width: 640px) {
  footer { flex-direction: column; align-items: flex-start !important; padding: 32px 16px !important; }
}

/* ── Hero mockup habits row ── */
.mockup-habits-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.mockup-habit-tag {
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  flex: 1;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Remove any overflow causes from sidebar ── */
.sidebar-nav { overflow: hidden; }
.nav-item-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Ensure main-content doesn't cause overflow ── */
.main-content {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Global inline grid override for small screens ── */
@media (max-width: 640px) {
  /* Any div with inline display:grid and 2+ cols → stacked */
  /* This uses attribute selectors as a fallback */
  .page-content div[style*="grid-template-columns"]:not(.hero-income-grid):not(.form-grid-2):not(.budget-grid):not(.quick-actions):not(.ai-grid):not(.mini-cal-grid):not(.choice-grid):not(.profile-grid) {
    /* Don't override — too broad, could break things */
  }
}

/* Ensure modals don't cause overflow */
.modal-body { overflow-y: auto; max-height: 70vh; }

/* ==========================================================
   DEMO MODE — banner + CTA pill + impersonate banner
   ========================================================== */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  padding: 0;
  box-shadow: 0 2px 12px rgba(22,163,74,0.25);
  animation: slideDown 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideDown { from { transform:translateY(-100%); opacity:0; } to { transform:translateY(0); opacity:1; } }

.demo-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.demo-banner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.35);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{box-shadow:0 0 0 3px rgba(74,222,128,0.35)} 50%{box-shadow:0 0 0 6px rgba(74,222,128,0.1)} }

.demo-banner-text {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  min-width: 180px;
}
.demo-banner-text strong { color: #fff; font-weight: 700; }

.demo-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.demo-banner-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.demo-banner-btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.demo-banner-btn-ghost:hover { background: rgba(255,255,255,0.25); }
.demo-banner-btn-solid {
  background: #fff;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.demo-banner-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.demo-banner-btn-solid i { margin-right: 5px; }

/* Demo CTA pill — fixed bottom right */
#demoCTA {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  z-index: 999;
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}
@keyframes popIn { from { transform:scale(0.4) translateY(40px); opacity:0; } to { transform:scale(1) translateY(0); opacity:1; } }

.demo-cta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(22,163,74,0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.demo-cta-pill:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 28px rgba(22,163,74,0.55); }
.demo-cta-pill:active { transform: scale(0.97); }

@media (max-width: 1024px) {
  #demoCTA { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: 12px; }
}

/* Impersonate banner */
.impersonate-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
  box-shadow: 0 2px 12px rgba(146,64,14,0.3);
  animation: slideDown 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

/* ==========================================================
   ADMIN — stats grid premium (3 col on mobile, 6 col desktop)
   ========================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (min-width: 768px) { .admin-stats-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 480px)  { .admin-stats-grid { grid-template-columns: repeat(2, 1fr); } }

.admin-stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ==========================================================
   PITCH DECK — premium startup landing
   ========================================================== */
.pitch-shell {
  min-height: 100vh;
  background: #0a0f1e;
  color: #fff;
  font-family: var(--font);
  overflow-x: hidden;
}

/* Nav */
.pitch-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pitch-nav-logo { display:flex; align-items:center; gap:10px; }
.pitch-logo-mark {
  width:34px; height:34px; border-radius:10px;
  background: linear-gradient(135deg,#3b82f6,#8b5cf6);
  display:flex; align-items:center; justify-content:center;
  font-size:18px; font-weight:900; color:#fff;
}
.pitch-logo-name { font-size:20px; font-weight:800; color:#fff; letter-spacing:-0.5px; }
.pitch-nav-actions { display:flex; gap:8px; }

/* Hero */
.pitch-hero {
  text-align: center;
  padding: 80px 5% 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.18) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
}
.pitch-hero::before {
  content:'';
  position:absolute; inset:0;
  background: radial-gradient(ellipse 40% 40% at 70% 30%, rgba(139,92,246,0.12) 0%, transparent 70%);
  pointer-events:none;
}
.pitch-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.18);
  border: 1px solid rgba(59,130,246,0.35);
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  animation: fadeInUp 0.5s ease 0.1s both;
}
.pitch-hero-title {
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease 0.2s both;
}
.pitch-hero-highlight {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pitch-hero-desc {
  font-size: clamp(15px, 2.5vw, 18px);
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
  animation: fadeInUp 0.5s ease 0.3s both;
}
.pitch-hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease 0.4s both;
}
.pitch-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(59,130,246,0.45);
  transition: all 0.2s ease;
}
.pitch-cta-primary:hover { transform:translateY(-2px); box-shadow:0 8px 32px rgba(59,130,246,0.6); }
.pitch-cta-primary:active { transform:scale(0.97); }

.pitch-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.pitch-cta-secondary:hover { background:rgba(255,255,255,0.14); transform:translateY(-2px); }

.pitch-hero-note {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 12px;
  animation: fadeInUp 0.5s ease 0.5s both;
}
.pitch-hero-note i { margin-right:4px; }

/* Mockup */
.pitch-mockup-wrap {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.6s ease 0.6s both;
}
.pitch-mockup {
  width: min(380px, 90vw);
  background: linear-gradient(145deg, #1e2740, #131929);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.2);
}
.pitch-mockup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pitch-mockup-dots { display:flex; gap:5px; }
.pitch-mockup-dots span { width:9px; height:9px; border-radius:50%; }
.pitch-mockup-dots span:nth-child(1) { background:#ef4444; }
.pitch-mockup-dots span:nth-child(2) { background:#f59e0b; }
.pitch-mockup-dots span:nth-child(3) { background:#22c55e; }
.pitch-mockup-content { padding: 20px; }
.pitch-mock-greeting { font-size:14px; color:rgba(255,255,255,0.6); margin-bottom:14px; }
.pitch-mock-balance {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.pitch-mock-balance-label { font-size:10px; font-weight:700; color:rgba(255,255,255,0.5); letter-spacing:1px; margin-bottom:6px; }
.pitch-mock-balance-val { font-size:28px; font-weight:900; color:#fff; margin-bottom:8px; }
.pitch-mock-balance-row { display:flex; justify-content:space-between; font-size:12px; font-weight:600; }
.pitch-mock-chips { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pitch-mock-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

/* Sections */
.pitch-section {
  padding: 80px 5%;
}
.pitch-section-inner { max-width: 1080px; margin: 0 auto; }
.pitch-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3b82f6;
  margin-bottom: 14px;
}
.pitch-eyebrow-light { color: rgba(255,255,255,0.5); }
.pitch-section-title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: #fff;
  margin-bottom: 16px;
}
.pitch-title-light { color: #fff; }
.pitch-section-desc { font-size:16px; color:rgba(255,255,255,0.6); max-width:560px; line-height:1.65; margin-bottom:40px; }
.pitch-desc-light { color:rgba(255,255,255,0.7); }

/* Problem */
.pitch-problem { background:#0d1220; }
.pitch-problem-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px; margin-top:40px; }
.pitch-problem-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.pitch-problem-card:hover { transform:translateY(-4px); border-color:rgba(239,68,68,0.3); }
.pitch-problem-icon { font-size:32px; margin-bottom:12px; }
.pitch-problem-title { font-size:15px; font-weight:700; color:#fff; margin-bottom:8px; }
.pitch-problem-desc { font-size:13.5px; color:rgba(255,255,255,0.5); line-height:1.6; }

/* Solution */
.pitch-solution { background:linear-gradient(135deg,#0f172a,#1e1b4b); }
.pitch-solution-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin-top:40px; }
.pitch-feature-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pitch-feature-card:hover { transform:translateY(-4px); box-shadow:0 12px 32px rgba(0,0,0,0.3); }
.pitch-feature-icon { width:52px; height:52px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:24px; margin:0 auto 12px; }
.pitch-feature-title { font-size:14px; font-weight:700; color:#fff; margin-bottom:6px; }
.pitch-feature-desc { font-size:12.5px; color:rgba(255,255,255,0.5); line-height:1.55; }

/* Benefits */
.pitch-benefits-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:18px; margin-top:36px; }
.pitch-benefit-item { display:flex; gap:16px; align-items:flex-start; }
.pitch-benefit-icon { font-size:28px; flex-shrink:0; margin-top:2px; }
.pitch-benefit-title { font-size:15px; font-weight:700; color:#fff; margin-bottom:5px; }
.pitch-benefit-desc { font-size:13px; color:rgba(255,255,255,0.55); line-height:1.6; }

/* How */
.pitch-how { background:linear-gradient(135deg,#0f172a,#1a1030); }
.pitch-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:24px; margin-top:44px; }
.pitch-step { text-align:center; }
.pitch-step-num {
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:900; color:#fff;
  margin:0 auto 12px;
}
.pitch-step-icon { font-size:32px; margin-bottom:12px; }
.pitch-step-title { font-size:15px; font-weight:700; color:#fff; margin-bottom:6px; }
.pitch-step-desc { font-size:13px; color:rgba(255,255,255,0.55); line-height:1.6; }

/* Pricing */
.pitch-pricing-section { background:#0a0f1e; }
.pitch-pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px; max-width:680px; margin:40px auto 0; }
.pitch-plan-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 30px 24px;
  position: relative;
  transition: transform 0.2s;
}
.pitch-plan-card:hover { transform:translateY(-4px); }
.pitch-plan-featured {
  background: linear-gradient(145deg,#1d2d5c,#2d1b5e);
  border-color: rgba(139,92,246,0.5);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.3), 0 16px 48px rgba(139,92,246,0.2);
}
.pitch-plan-badge {
  position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:linear-gradient(135deg,#8b5cf6,#6d28d9);
  color:#fff; font-size:11px; font-weight:700; padding:4px 14px; border-radius:999px;
  white-space:nowrap;
}
.pitch-plan-name { font-size:18px; font-weight:800; color:#fff; margin-bottom:8px; }
.pitch-plan-price { font-size:36px; font-weight:900; color:#fff; margin-bottom:4px; }
.pitch-plan-price span { font-size:16px; font-weight:400; color:rgba(255,255,255,0.5); }
.pitch-plan-desc { font-size:13px; color:rgba(255,255,255,0.45); margin-bottom:20px; }
.pitch-plan-features { list-style:none; padding:0; margin:0 0 24px; }
.pitch-plan-features li { display:flex; align-items:center; gap:9px; font-size:13.5px; color:rgba(255,255,255,0.75); padding:6px 0; border-bottom:1px solid rgba(255,255,255,0.05); }
.pitch-plan-features li i { color:#22c55e; font-size:11px; flex-shrink:0; }
.pitch-plan-btn {
  width:100%; padding:13px; border-radius:12px; font-size:14px; font-weight:700; cursor:pointer; border:none; transition:all 0.2s ease;
}
.pitch-plan-btn-outline { background:rgba(255,255,255,0.08); color:#fff; border:1.5px solid rgba(255,255,255,0.2); }
.pitch-plan-btn-outline:hover { background:rgba(255,255,255,0.15); }
.pitch-plan-btn-primary { background:linear-gradient(135deg,#8b5cf6,#6d28d9); color:#fff; box-shadow:0 4px 16px rgba(139,92,246,0.4); }
.pitch-plan-btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(139,92,246,0.5); }
.pitch-plan-btn-primary i { margin-right:6px; }

/* Testimonials */
.pitch-testimonials { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:18px; margin-top:40px; }
.pitch-testimonial {
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  padding:22px;
  transition:transform 0.2s;
}
.pitch-testimonial:hover { transform:translateY(-3px); }
.pitch-testimonial-stars { font-size:14px; margin-bottom:10px; }
.pitch-testimonial-text { font-size:14px; color:rgba(255,255,255,0.75); line-height:1.65; margin-bottom:14px; font-style:italic; }
.pitch-testimonial-author { display:flex; align-items:center; gap:10px; }
.pitch-testimonial-avatar {
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; font-weight:800; color:#fff; flex-shrink:0;
}
.pitch-testimonial-name { font-size:13.5px; font-weight:700; color:#fff; }
.pitch-testimonial-role { font-size:12px; color:rgba(255,255,255,0.45); }

/* CTA Final */
.pitch-cta-final {
  padding: 80px 5%;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(59,130,246,0.15) 0%, transparent 70%);
}
.pitch-final-title { font-size:clamp(26px,4vw,44px); font-weight:900; color:#fff; letter-spacing:-0.8px; margin-bottom:14px; }
.pitch-final-desc { font-size:16px; color:rgba(255,255,255,0.6); max-width:480px; margin:0 auto 32px; line-height:1.65; }
.pitch-cta-large { padding:18px 36px; font-size:17px; border-radius:14px; box-shadow:0 6px 32px rgba(59,130,246,0.55); }
.pitch-final-note { font-size:12px; color:rgba(255,255,255,0.35); margin-top:14px; }

/* Pitch share bar */
.pitch-share-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,15,30,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  z-index: 100;
  gap: 12px;
}
.pitch-share-bar-text { font-size:13px; color:rgba(255,255,255,0.6); flex:1; }
.pitch-share-bar-actions { display:flex; gap:8px; }

/* Pitch footer */
.pitch-footer {
  padding: 40px 5% 80px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  background: #070c18;
}
.pitch-footer-logo { display:flex; align-items:center; gap:8px; justify-content:center; margin-bottom:12px; }
.pitch-footer-tagline { font-size:14px; color:rgba(255,255,255,0.4); margin-bottom:20px; }
.pitch-footer-links { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }
.pitch-footer-links button { background:none; border:none; font-size:13px; color:rgba(255,255,255,0.4); cursor:pointer; transition:color 0.15s; }
.pitch-footer-links button:hover { color:rgba(255,255,255,0.75); }

@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* Responsive pitch */
@media (max-width: 768px) {
  .pitch-hero { padding:60px 5% 40px; }
  .pitch-hero-title { font-size:clamp(28px,8vw,42px); }
  .pitch-section { padding:60px 5%; }
  .pitch-pricing-grid { max-width:100%; }
  .pitch-share-bar { flex-direction:column; gap:8px; padding:12px 5%; }
  .pitch-share-bar-text { text-align:center; }
}
@media (max-width: 480px) {
  .pitch-hero { padding:48px 4% 32px; }
  .pitch-hero-cta { flex-direction:column; align-items:stretch; }
  .pitch-cta-primary, .pitch-cta-secondary { justify-content:center; }
  .pitch-mockup { width:100%; }
  .pitch-section { padding:48px 4%; }
}

/* ==========================================================
   MICRO-INTERAÇÕES & ANIMAÇÕES GLOBAIS
   ========================================================== */
.card { transition: box-shadow 0.2s ease; }
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.btn { position:relative; overflow:hidden; }
.btn::after {
  content:'';
  position:absolute;
  inset:0;
  background:rgba(255,255,255,0);
  transition:background 0.15s ease;
  border-radius:inherit;
  pointer-events:none;
}
.btn:active::after { background:rgba(255,255,255,0.12); }

/* Stat card hover lift */
.stat-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.stat-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,0.1); }

/* Page entrance animation */
.page-content > * { animation: fadeInUp 0.35s ease both; }

/* Progress bar animated */
.progress-bar-fill { transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1) !important; }

/* Bottom nav active dot */
.bottom-nav-item.active::after {
  content:'';
  display:block;
  width:4px; height:4px;
  border-radius:50%;
  background:var(--blue-600);
  margin:2px auto 0;
}

/* Tag/badge pulse on new */
.badge-orange { animation: badgePulse 2s infinite; }
@keyframes badgePulse { 0%,100%{opacity:1} 50%{opacity:0.75} }

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

/* Toast melhorado */
.toast { animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes toastIn { from{transform:translateY(20px) scale(0.9);opacity:0} to{transform:translateY(0) scale(1);opacity:1} }

/* Modal entrance */
.modal-dialog { animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes modalIn { from{transform:scale(0.92) translateY(16px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }

/* ==========================================================
   DASHBOARD INTELIGENTE — estados novo / demo / vazio / recorrente
   ========================================================== */

/* ── Shared: greeting header ── */
.db-greeting-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}
.db-greeting-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}
.db-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #7c2d12;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
  white-space: nowrap;
}

/* ── NOVO USUÁRIO — welcome hero ── */
.db-new-shell { animation: fadeInUp 0.4s ease both; }

.db-welcome-hero {
  text-align: center;
  padding: 36px 20px 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--blue-100);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.db-welcome-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(59,130,246,0.1), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.db-welcome-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  animation: bounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes bounceIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.db-welcome-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.db-welcome-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 12px;
}
.db-welcome-meta {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Primeiro passo (card destaque) ── */
.db-first-step-card {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  margin-bottom: 20px;
  color: #fff;
  animation: fadeInUp 0.4s ease 0.15s both;
}
.db-first-step-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.db-first-step-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.db-first-step-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.db-first-step-content { flex: 1; }
.db-first-step-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}
.db-first-step-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}
.db-first-step-btn {
  width: 100%;
  padding: 13px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  backdrop-filter: blur(4px);
}
.db-first-step-btn:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}
.db-first-step-btn:active { transform: scale(0.98); }

/* ── Setup steps ── */
.db-setup-steps { display: flex; flex-direction: column; gap: 0; }
.db-setup-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-base);
  transition: background 0.15s;
}
.db-setup-step:last-child { border-bottom: none; padding-bottom: 0; }
.db-setup-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}
.db-setup-step-num.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.db-setup-step-info { flex: 1; min-width: 0; }
.db-setup-step-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-setup-step-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Módulos grid ── */
.db-modules-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.db-module-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
}
.db-module-tile:hover { background: var(--bg-base); }
.db-module-tile:active { background: var(--border); }
.db-module-tile-icon { font-size: 22px; flex-shrink: 0; }
.db-module-tile-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.db-module-tile-arrow {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Upsell soft ── */
.db-upsell-soft {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.db-upsell-soft-icon { font-size: 24px; flex-shrink: 0; }
.db-upsell-soft-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.db-upsell-soft-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── FROM DEMO — conta real banner ── */
.db-from-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.db-returning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.db-real-account-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.db-real-account-icon { font-size: 28px; flex-shrink: 0; }
.db-real-account-text { flex: 1; min-width: 160px; }
.db-real-account-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--green-700, #15803d);
  margin-bottom: 3px;
}
.db-real-account-desc {
  font-size: 12.5px;
  color: var(--green-600, #16a34a);
}

/* ── EMPTY HERO ── */
.db-empty-hero {
  text-align: center;
  padding: 44px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1.5px dashed var(--border);
  margin-bottom: 20px;
  animation: fadeInUp 0.4s ease both;
}
.db-empty-hero-icon {
  font-size: 52px;
  margin-bottom: 14px;
  animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
.db-empty-hero-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.db-empty-hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.db-empty-hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── QUICK WIN card (destaque do dia) ── */
.db-quickwin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1.5px solid var(--blue-200, #bfdbfe);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  flex-wrap: wrap;
}
.db-quickwin-health {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  border-color: #fed7aa;
}
.db-quickwin-goal {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #ddd6fe;
}
.db-quickwin-done {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
}
.db-quickwin-icon { font-size: 28px; flex-shrink: 0; }
.db-quickwin-content { flex: 1; min-width: 120px; }
.db-quickwin-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.db-quickwin-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}
.db-quickwin-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Suggestions list ── */
.db-suggestion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg-base);
}
.db-suggestion-row:last-child { border-bottom: none; padding-bottom: 0; }
.db-suggestion-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.db-suggestion-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Responsividade mobile ── */
@media (max-width: 640px) {
  .db-welcome-hero { padding: 28px 16px 22px; }
  .db-welcome-emoji { font-size: 40px; }
  .db-welcome-title { font-size: 20px; }
  .db-welcome-subtitle { font-size: 13px; }

  .db-first-step-card { padding: 18px 16px; }
  .db-first-step-title { font-size: 15px; }
  .db-first-step-desc { display: none; }

  .db-setup-step-desc { display: none; }

  .db-real-account-banner { padding: 13px 14px; gap: 10px; }
  .db-real-account-desc { display: none; }

  .db-empty-hero { padding: 32px 16px; }
  .db-empty-hero-title { font-size: 20px; }
  .db-empty-hero-actions { flex-direction: column; }

  .db-quickwin-card { padding: 13px 14px; gap: 10px; }
  .db-quickwin-sub { display: none; }

  .db-upsell-soft { padding: 12px 14px; }

  .db-greeting-title { font-size: 19px; }
}

@media (max-width: 430px) {
  .db-first-step-body { gap: 10px; }
  .db-first-step-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 11px; }
  .db-first-step-title { font-size: 14px; }

  .db-setup-step { gap: 10px; }
  .db-setup-step-title { font-size: 13px; }

  .db-modules-grid { gap: 0; }
  .db-module-tile { padding: 10px 8px; }
  .db-module-tile-icon { font-size: 20px; }
  .db-module-tile-label { font-size: 13px; }
}

/* ==========================================================
   MODULE EMPTY STATES — estados vazios elegantes por módulo
   ========================================================== */

.module-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  animation: fadeInUp 0.4s ease both;
}

.module-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
  line-height: 1;
}

.module-empty-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.module-empty-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 22px;
}

/* Mini empty state — para cards menores */
.module-empty-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  flex-wrap: wrap;
}

.module-empty-mini > span {
  font-size: 26px;
  flex-shrink: 0;
}

/* Tip card — dica de próxima ação */
.module-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f0f9ff, #eff6ff);
  border: 1.5px solid var(--blue-200, #bfdbfe);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  margin-bottom: 20px;
  animation: fadeInUp 0.35s ease both;
}

.module-tip-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.module-tip-content { flex: 1; }

.module-tip-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue-700, #1d4ed8);
  margin-bottom: 3px;
}

.module-tip-desc {
  font-size: 12px;
  color: var(--blue-600, #2563eb);
  line-height: 1.5;
}

/* ── Stats banner onboarding (módulo finance sem dados) ── */
.finance-onboard-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.finance-onboard-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.finance-onboard-steps {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.finance-onboard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: background 0.2s;
}

.finance-onboard-step:hover { background: rgba(255,255,255,0.18); }
.finance-onboard-step i { font-size: 14px; }

/* ── Goals empty — grade de inspiração ── */
.goals-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.goals-inspiration-card {
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.goals-inspiration-card:hover {
  border-color: var(--blue-400, #60a5fa);
  background: #eff6ff;
  transform: translateY(-2px);
}

.goals-inspiration-card:active { transform: scale(0.97); }

.goals-inspiration-icon { font-size: 28px; margin-bottom: 6px; }
.goals-inspiration-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

/* ── Planning empty — sugestão de produtividade ── */
.planning-empty-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
  max-width: 320px;
}

.planning-tip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.planning-tip-item:hover { background: var(--border); }
.planning-tip-item i { color: var(--blue-500); font-size: 13px; flex-shrink: 0; }
.planning-tip-item span { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ── Health empty — card de motivação ── */
.health-motivation-card {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  animation: fadeInUp 0.4s ease both;
}

.health-motivation-title {
  font-size: 15px;
  font-weight: 800;
  color: #92400e;
}

.health-motivation-desc {
  font-size: 12.5px;
  color: #b45309;
  line-height: 1.5;
}

.health-habits-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  justify-content: center;
}

.health-habit-pill {
  background: rgba(255,255,255,0.7);
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s;
}

.health-habit-pill:hover {
  background: #fff;
  border-color: #f97316;
  transform: scale(1.03);
}

/* ── btn-xl ── */
.btn-xl {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  font-weight: 800;
  min-height: 52px;
}

/* ── Responsividade mobile ── */
@media (max-width: 640px) {
  .module-empty-state { padding: 32px 16px; }
  .module-empty-icon  { font-size: 40px; }
  .module-empty-title { font-size: 16px; }
  .module-empty-desc  { font-size: 13px; }

  .finance-onboard-steps { gap: 8px; }
  .finance-onboard-step  { font-size: 12px; padding: 7px 11px; }

  .goals-inspiration-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .goals-inspiration-icon { font-size: 22px; }
  .goals-inspiration-label { font-size: 11px; }

  .btn-xl { padding: 13px 20px; font-size: 14px; width: 100%; }
  .db-empty-hero-actions .btn-xl { width: 100%; }
}

@media (max-width: 430px) {
  .module-empty-icon { font-size: 36px; }
  .module-empty-title { font-size: 15px; }
  .health-habit-pill { font-size: 11px; padding: 5px 12px; }
  .finance-onboard-steps { flex-direction: column; }
  .finance-onboard-step { justify-content: center; }
}

/* ==========================================================
   SECURITY & TRUST UI — badges, banners, indicadores
   ========================================================== */

/* ── Auth Trust Bar ── */
.auth-trust-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #15803d;
  font-weight: 600;
}

.auth-trust-item i {
  color: #16a34a;
  font-size: 12px;
}

/* ── Auth Security Banner (signup) ── */
.auth-security-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  margin: 0 24px 0;
}

.auth-security-icon {
  font-size: 24px;
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-security-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1d4ed8;
  margin-bottom: 3px;
}

.auth-security-desc {
  font-size: 11.5px;
  color: #3b82f6;
  line-height: 1.5;
}

/* ── Settings Security Card ── */
.security-card {
  border: 1.5px solid #bbf7d0 !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.security-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.security-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.security-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.security-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.security-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.security-feature-dot.green { background: #22c55e; }
.security-feature-dot.blue  { background: #3b82f6; }
.security-feature-dot.orange{ background: #f97316; }

.security-feature-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.security-feature-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.security-feature-text span {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Admin Privacy Notice ── */
.admin-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #f0f9ff, #eff6ff);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  margin-bottom: 20px;
  animation: fadeInUp 0.3s ease both;
}

.admin-privacy-icon {
  font-size: 22px;
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.admin-privacy-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.admin-privacy-desc {
  font-size: 12px;
  color: #3b82f6;
  line-height: 1.55;
}

/* ── Trust Seal (pitch / landing) ── */
.trust-seals {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.trust-seal {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.trust-seal i {
  font-size: 13px;
  color: #4ade80;
}

/* ── Password strength bar in signup ── */
#pwStrengthBar {
  margin-top: 6px;
  background: var(--border);
}

/* ── Privacy page ── */
.privacy-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  color: white;
  margin-bottom: 28px;
  text-align: center;
}

.privacy-hero-icon { font-size: 48px; margin-bottom: 14px; }
.privacy-hero-title { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 10px; }
.privacy-hero-desc  { font-size: 14px; opacity: 0.75; line-height: 1.65; max-width: 420px; margin: 0 auto; }

.privacy-principle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-base);
}
.privacy-principle:last-child { border-bottom: none; padding-bottom: 0; }
.privacy-principle-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.privacy-principle-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.privacy-principle-desc  { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

/* ── Responsividade ── */
@media (max-width: 640px) {
  .auth-security-banner { margin: 0 16px 0; padding: 12px 14px; }
  .auth-security-title  { font-size: 13px; }
  .auth-security-desc   { font-size: 11px; }

  .auth-trust-bar { gap: 6px; padding: 10px 8px; }
  .auth-trust-item { font-size: 10.5px; }

  .admin-privacy-notice { padding: 12px 14px; gap: 10px; }
  .admin-privacy-title  { font-size: 12.5px; }
  .admin-privacy-desc   { font-size: 11.5px; }

  .security-card-icon { width: 36px; height: 36px; font-size: 16px; }
  .security-feature-text strong { font-size: 12.5px; }
  .security-feature-text span   { font-size: 11px; }

  .privacy-hero { padding: 28px 18px; }
  .privacy-hero-title { font-size: 20px; }
  .privacy-hero-icon { font-size: 40px; }
}
