/* CSS DESIGN SYSTEM - FINANZAS PERSONALES */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-inverse: #0f172a;
  
  --accent-primary: #38bdf8;
  --accent-primary-hover: #0284c7;
  --accent-glow: rgba(56, 189, 248, 0.25);
  
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-danger: #f43f5e;
  --color-danger-bg: rgba(244, 63, 94, 0.15);
  --color-warning: #f59e0b;
  --color-excel: #107c41;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 189, 248, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-backdrop: blur(16px) saturate(180%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Glassmorphism Common Style */
.glass-card, .glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-main);
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.positive { color: var(--color-success) !important; }
.negative { color: var(--color-danger) !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-excel {
  background: linear-gradient(135deg, #0e5c2f 0%, #107c41 100%);
  color: #ffffff;
}
.btn-excel:hover {
  background: #107c41;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: var(--glass-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-block { width: 100%; }

.btn-demo {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
}
.btn-demo:hover {
  background: rgba(56, 189, 248, 0.25);
}
.btn-demo-admin {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.3);
}
.btn-demo-admin:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-weight: 500;
}
.btn-text:hover { text-decoration: underline; }

/* Alerts */
.alert-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.alert-box.alert-error {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  color: #fca5a5;
}
.alert-box.alert-success {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success);
  color: #6ee7b7;
}

/* AUTH SECTION */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Force dark theme background on option elements */
select option {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 0.5rem;
}

.demo-accounts {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}
.demo-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-align: center;
}
.demo-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.auth-toggle {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
}
.auth-toggle a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.3rem;
}

/* MAIN DASHBOARD LAYOUT */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 0;
  border-right: var(--glass-border);
  border-top: none; border-bottom: none; border-left: none;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
}
.brand-icon {
  font-size: 1.4rem;
  color: var(--accent-primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.nav-item.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
  font-weight: 600;
  border-left: 3px solid var(--accent-primary);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.user-info {
  flex-grow: 1;
  overflow: hidden;
}
.user-email {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-badge {
  font-size: 0.7rem;
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem;
}
.btn-logout:hover { color: var(--color-danger); }

/* Workspace */
.main-workspace {
  margin-left: 260px;
  flex-grow: 1;
  padding: 2rem;
  max-width: 1400px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.header-title h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
}
.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* TAB CONTENT */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: var(--glass-border);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.kpi-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.balance-card .kpi-icon { background: rgba(56, 189, 248, 0.15); color: var(--accent-primary); }
.income-card .kpi-icon { background: var(--color-success-bg); color: var(--color-success); }
.expense-card .kpi-icon { background: var(--color-danger-bg); color: var(--color-danger); }

.kpi-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-family: var(--font-heading); font-size: 1.65rem; font-weight: 700; margin: 0.2rem 0; }
.kpi-subtext { font-size: 0.78rem; color: var(--text-muted); }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-container, .recent-container {
  padding: 1.5rem;
  min-height: 380px;
}
.chart-header, .recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.chart-header h4, .recent-header h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.recent-item-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.recent-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.recent-title { font-weight: 600; font-size: 0.9rem; }
.recent-date { font-size: 0.78rem; color: var(--text-muted); }
.recent-amount { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; }

/* Filters Bar */
.filters-bar {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
}
.filter-group input, .filter-group select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-family);
  font-weight: 600;
  outline: none;
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}
.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
}

/* Data Table */
.table-container {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.category-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.chart-card {
  padding: 1.5rem;
}
.chart-card h4 {
  font-family: var(--font-heading);
  margin-bottom: 1.25rem;
}
.chart-wrapper, .chart-body {
  height: 330px;
  position: relative;
  width: 100%;
}

/* Admin Controls */
.admin-controls {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-filter-box {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-filter-box select {
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 1rem;
  overflow-y: auto;
}

.modal-content {
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  padding: 1.5rem;
  border: 1px solid var(--border-highlight);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-main); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .dashboard-grid, .analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: var(--glass-border);
  }
  .dashboard-layout {
    flex-direction: column;
  }
  .main-workspace {
    margin-left: 0;
    padding: 1rem;
  }
  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CRUZ CAPITAL ADVISORY BANNER & BUDGETS / SAVINGS GOALS STYLES
   ========================================================================== */

/* Gold Button Accent */
.btn-gold-cruz {
  background: linear-gradient(135deg, #b59226 0%, #d4af37 50%, #fef08a 100%);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-gold-cruz:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.55);
  color: #000000;
}

/* Advisory Banner */
.cruz-advisory-banner {
  background: linear-gradient(135deg, rgba(0, 43, 73, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 30px -5px rgba(212, 175, 55, 0.15);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.cruz-advisory-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(to bottom, #d4af37, #b59226);
}
.advisory-badge-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.advisory-text-col {
  flex: 1;
}
.advisory-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d4af37;
  margin-bottom: 0.3rem;
}
.advisory-text-col h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #f8fafc;
  margin-bottom: 0.3rem;
}
.advisory-text-col p {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 650px;
}

/* Section Title Bar */
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.section-title-bar h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Budgets Grid & Cards */
.budgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.budget-card {
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.budget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
}
.budget-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.budget-category-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.budget-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
}
.status-ok { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-warn { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.budget-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.budget-spent { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; }
.budget-limit { font-size: 0.85rem; color: var(--text-muted); }

/* Progress Bar */
.budget-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.budget-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background-color 0.3s ease;
}

/* Savings Goals Grid & Cards */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.goal-card {
  padding: 1.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.goal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.goal-deadline {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.goal-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.goal-icon.ppr {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}

.goal-kpis {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.goal-saved-val {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-success);
}
.goal-target-val {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.goal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* MOBILE & TABLET RESPONSIVE SYSTEM */
@media (max-width: 992px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: var(--glass-border);
    padding: 0.85rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .sidebar-brand {
    margin-bottom: 0.75rem !important;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav .nav-item {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 50px;
  }

  .sidebar-user {
    display: none;
  }

  .main-workspace {
    padding: 1rem;
  }

  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 1rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .dashboard-grid, .analytics-grid, .kpi-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .filter-group select, .filter-group input {
    flex: 1;
  }

  .cruz-advisory-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .advisory-cta-col {
    width: 100%;
  }

  .advisory-cta-col .btn {
    width: 100%;
  }

  .section-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
}

/* MOBILE TOP & BOTTOM NAV BARS */
.mobile-top-bar {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: flex-start;
}

.mobile-drawer-content {
  width: 82vw;
  max-width: 320px;
  height: 100%;
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
}

.mobile-drawer-header {
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.drawer-nav-item i {
  color: var(--accent-primary);
  width: 20px;
}

@media (max-width: 992px) {
  .sidebar {
    display: none !important;
  }

  .mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 99;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .mobile-brand img {
    height: 32px;
    width: auto;
    border-radius: 4px;
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .btn-logout-sm {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.38rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .mobile-menu-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
  }

  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 999;
    padding: 0 0.5rem;
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
  }

  .mobile-nav-btn i {
    font-size: 1.15rem;
  }

  .mobile-nav-btn.active {
    color: var(--accent-primary);
  }

  .mobile-nav-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 3px solid #0f172a;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    margin-top: -24px;
    cursor: pointer;
  }

  .main-workspace {
    padding-bottom: 85px !important;
  }
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-start;
  }

  .modal-content {
    max-width: 100%;
    max-height: 85vh;
    padding: 1.2rem 1rem;
    margin-top: 0.5rem;
    border-radius: var(--radius-md);
  }

  .modal-footer {
    position: sticky;
    bottom: -1px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding: 0.85rem 0 0.2rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .modal-footer .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
  }
}

