/* =============================================
   FETAZA.COM - CSS Principal
   Modo Claro / Oscuro + Mobile App
   ============================================= */

/* --- Variables Modo Claro --- */
:root {
  --primary:        #4F46E5;
  --primary-dark:   #3730A3;
  --primary-light:  #EEF2FF;
  --secondary:      #06B6D4;
  --success:        #10B981;
  --danger:         #EF4444;
  --warning:        #F59E0B;
  --info:           #3B82F6;

  --bg-body:        #F1F5F9;
  --bg-card:        #FFFFFF;
  --bg-sidebar:     #1E1B4B;
  --bg-sidebar-hover: #2D2A6E;
  --bg-input:       #F8FAFC;
  --bg-header:      #FFFFFF;

  --text-primary:   #0F172A;
  --text-secondary: #64748B;
  --text-sidebar:   #C7D2FE;
  --text-sidebar-active: #FFFFFF;
  --text-muted:     #94A3B8;

  --border:         #E2E8F0;
  --border-input:   #CBD5E1;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.12);

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --sidebar-width:  260px;
  --header-height:  64px;
  --font:           'Inter', system-ui, -apple-system, sans-serif;

  --income-bg:      #ECFDF5;
  --income-color:   #059669;
  --expense-bg:     #FEF2F2;
  --expense-color:  #DC2626;
  --balance-bg:     #EEF2FF;
  --balance-color:  #4F46E5;
}

/* --- Variables Modo Oscuro --- */
[data-theme="dark"] {
  --bg-body:        #0F172A;
  --bg-card:        #1E293B;
  --bg-sidebar:     #0D0B2E;
  --bg-sidebar-hover: #1a1754;
  --bg-input:       #263348;
  --bg-header:      #1E293B;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;

  --border:         #2D3E55;
  --border-input:   #3D5068;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.5);

  --income-bg:      #052E1C;
  --income-color:   #34D399;
  --expense-bg:     #2D0A0A;
  --expense-color:  #F87171;
  --balance-bg:     #1E1B4B;
  --balance-color:  #818CF8;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-primary);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* --- Layout Principal --- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease, width 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo .logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.sidebar-logo .logo-text span {
  color: var(--secondary);
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-user .user-info .user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.sidebar-user .user-info .user-cat {
  color: var(--text-sidebar);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245,158,11,0.2);
  color: #FCD34D;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
  font-weight: 600;
}

.plan-badge.active { background: rgba(16,185,129,0.2); color: #34D399; }
.plan-badge.expired { background: rgba(239,68,68,0.2); color: #F87171; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-title {
  color: rgba(199,210,254,0.5);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 20px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-sidebar);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s;
  position: relative;
}

.sidebar-nav a:hover {
  background: var(--bg-sidebar-hover);
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--primary);
  color: #fff;
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--secondary);
  border-radius: 0 4px 4px 0;
}

.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* --- Header --- */
.app-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-body);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  position: relative;
}

.btn-icon:hover { background: var(--border); color: var(--text-primary); }

.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-header);
}

.header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid var(--primary-light);
}

/* --- Page Content --- */
.page-content {
  flex: 1;
  padding: 28px 24px;
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }

/* --- Stat Cards --- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.income  { background: var(--income-bg);  color: var(--income-color); }
.stat-icon.expense { background: var(--expense-bg); color: var(--expense-color); }
.stat-icon.balance { background: var(--balance-bg); color: var(--balance-color); }
.stat-icon.members { background: #F0FDF4; color: #16A34A; }

.stat-info .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.form-control::placeholder { color: var(--text-muted); }

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group-text {
  padding: 10px 14px;
  background: var(--border);
  border: 1.5px solid var(--border-input);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.input-group .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--primary);  color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

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

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

.btn-secondary { background: var(--border);   color: var(--text-primary); }
.btn-secondary:hover { background: var(--border-input); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-input);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* =============================================
   TABLES
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--bg-body);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:hover { background: var(--bg-body); }
tbody tr:last-child td { border-bottom: none; }

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success  { background: var(--income-bg);  color: var(--income-color); }
.badge-danger   { background: var(--expense-bg); color: var(--expense-color); }
.badge-warning  { background: #FEF3C7; color: #D97706; }
.badge-info     { background: #EFF6FF; color: #2563EB; }
.badge-primary  { background: var(--primary-light); color: var(--primary); }

[data-theme="dark"] .badge-warning { background: #2D1F00; color: #FCD34D; }
[data-theme="dark"] .badge-info    { background: #0C1E3D; color: #60A5FA; }

/* =============================================
   ALERTS
   ============================================= */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-danger  { background: var(--expense-bg); color: var(--expense-color); border-color: #FECACA; }
.alert-success { background: var(--income-bg);  color: var(--income-color);  border-color: #A7F3D0; }
.alert-warning { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.alert-info    { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }

[data-theme="dark"] .alert-warning { background: #2D1F00; border-color: #92400E; }
[data-theme="dark"] .alert-info    { background: #0C1E3D; border-color: #1D4ED8; }

/* =============================================
   LANDING PAGE
   ============================================= */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  transition: background 0.3s;
}

[data-theme="dark"] .landing-nav {
  background: rgba(15,23,42,0.95);
}

.landing-nav .logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.landing-nav .logo span { color: var(--secondary); }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}
.nav-links a:hover { background: var(--bg-body); color: var(--primary); }

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 5% 60px;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0FDFA 50%, #FFF7ED 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #0F172A 0%, #0D1B2A 50%, #0F172A 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content { max-width: 580px; position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title span { color: var(--primary); }

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Sección Categorías --- */
.section { padding: 80px 5%; }

.section-header { text-align: center; margin-bottom: 52px; }

.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

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

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.category-card:hover::before { transform: scaleX(1); }

.cat-emoji { font-size: 3rem; margin-bottom: 16px; display: block; }
.cat-name { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.cat-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

.cat-features {
  margin-top: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-feature {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-feature::before { content: '✓'; color: var(--success); font-weight: 700; }

/* --- Planes Landing --- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.plan-card.featured {
  border-color: var(--primary);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}

.plan-featured-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 18px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-name { font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }

.plan-price {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.plan-price sup { font-size: 1.2rem; vertical-align: top; margin-top: 8px; }
.plan-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }

.plan-features { list-style: none; margin-bottom: 28px; text-align: left; }
.plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
  padding: 20px;
}

[data-theme="dark"] .auth-wrapper {
  background: linear-gradient(135deg, #0F172A 0%, #0D1B2A 100%);
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  padding: 40px;
  border: 1px solid var(--border);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.auth-logo .logo-text span { color: var(--secondary); }
.auth-logo p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 4px; }

.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.currency-display {
  background: var(--income-bg);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--income-color);
  font-weight: 600;
  margin-top: 8px;
}

/* =============================================
   MOBILE / PWA
   ============================================= */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.mobile-nav-item .nav-icon { font-size: 1.3rem; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item:hover { color: var(--primary); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .sidebar-overlay.show { display: block; }

  .main-content { margin-left: 0; }

  .page-content { padding: 16px; padding-bottom: 80px; }

  .mobile-nav { display: flex; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .stat-card { padding: 14px; }

  .stat-icon { width: 42px; height: 42px; font-size: 1.1rem; }

  .stat-info .stat-value { font-size: 1.2rem; }

  .auth-card { padding: 28px 20px; border-radius: var(--radius-lg); }

  .hero-section { padding: 90px 5% 40px; text-align: center; }

  .hero-buttons { justify-content: center; }

  .plans-grid { grid-template-columns: 1fr; }

  .plan-card.featured { transform: scale(1); }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 0.875rem; }
  table { font-size: 0.8rem; }
  thead th, tbody td { padding: 10px 10px; }
}

/* =============================================
   UTILITIES
   ============================================= */
.text-income  { color: var(--income-color) !important; }
.text-expense { color: var(--expense-color) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold      { font-weight: 700; }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.p-0   { padding: 0; }
.p-16  { padding: 16px; }
.p-20  { padding: 20px; }
.p-24  { padding: 24px; }

.w-100 { width: 100%; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.9rem; }

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

/* Animaciones */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.fade-in  { animation: fadeIn 0.4s ease forwards; }
.slide-in { animation: slideIn 0.3s ease forwards; }

/* Toast */
.toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  animation: slideIn 0.3s ease;
  font-size: 0.875rem;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-danger  { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
  display: none;
}

.dropdown-menu.show { display: block; animation: fadeIn 0.2s ease; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover { background: var(--bg-body); }
.dropdown-item.danger { color: var(--danger); }
