@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ════════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════════ */
:root {
  /* Base */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(31, 41, 55, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #e2e8f0;

  /* Module Colors */
  --save-color: #3b82f6;
  --save-glow: rgba(59, 130, 246, 0.3);
  --invest-color: #a855f7;
  --invest-glow: rgba(168, 85, 247, 0.3);
  --borrow-color: #f97316;
  --borrow-glow: rgba(249, 115, 22, 0.3);
  --repay-color: #22c55e;
  --repay-glow: rgba(34, 197, 94, 0.3);
  --protect-color: #ef4444;
  --protect-glow: rgba(239, 68, 68, 0.3);
  --compare-color: #06b6d4;
  --compare-glow: rgba(6, 182, 212, 0.3);
  --journey-color: #eab308;
  --journey-glow: rgba(234, 179, 8, 0.3);

  /* Gradients */
  --gradient-save: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --gradient-invest: linear-gradient(135deg, #a855f7, #7c3aed);
  --gradient-borrow: linear-gradient(135deg, #f97316, #ea580c);
  --gradient-repay: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-protect: linear-gradient(135deg, #ef4444, #dc2626);
  --gradient-compare: linear-gradient(135deg, #06b6d4, #0891b2);
  --gradient-journey: linear-gradient(135deg, #eab308, #ca8a04);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.15);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.15);

  /* Spacing */
  --nav-width: 260px;
  --header-height: 64px;

  /* Transition */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
}

/* ════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════
   SIDEBAR NAVIGATION
   ════════════════════════════════════════════ */
.sidebar {
  width: var(--nav-width);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.sidebar-brand .brand-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 4px;
}

.sidebar-brand h1 {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.sidebar-brand .brand-tagline {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 6px;
  opacity: 0.7;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  border-left: 3px solid transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.nav-item[data-page="savings"].active {
  border-left-color: var(--save-color);
}

.nav-item[data-page="savings"].active::before {
  background: var(--save-color);
}

.nav-item[data-page="investments"].active {
  border-left-color: var(--invest-color);
}

.nav-item[data-page="investments"].active::before {
  background: var(--invest-color);
}

.nav-item[data-page="loans"].active {
  border-left-color: var(--borrow-color);
}

.nav-item[data-page="loans"].active::before {
  background: var(--borrow-color);
}

.nav-item[data-page="insurance"].active {
  border-left-color: var(--protect-color);
}

.nav-item[data-page="insurance"].active::before {
  background: var(--protect-color);
}

.nav-item[data-page="banking"].active {
  border-left-color: var(--repay-color);
}

.nav-item[data-page="banking"].active::before {
  background: var(--repay-color);
}

.nav-item[data-page="instruments"].active {
  border-left-color: var(--compare-color);
}

.nav-item[data-page="instruments"].active::before {
  background: var(--compare-color);
}

.nav-item[data-page="compare"].active {
  border-left-color: var(--compare-color);
}

.nav-item[data-page="compare"].active::before {
  background: var(--compare-color);
}

.nav-item[data-page="journey"].active {
  border-left-color: var(--journey-color);
}

.nav-item[data-page="journey"].active::before {
  background: var(--journey-color);
}

.nav-item[data-page="dashboard"].active {
  border-left-color: #667eea;
}

.nav-item[data-page="dashboard"].active::before {
  background: #667eea;
}

.nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 16px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

/* ════════════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: var(--nav-width);
  min-height: 100vh;
  padding: 32px;
  padding-bottom: 80px;
  max-width: 1200px;
  overflow-y: auto;
}

.page-view {
  display: none;
  animation: fadeSlideIn 0.4s ease;
}

.page-view.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════ */
.page-header {
  margin-bottom: 32px;
}

.page-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header .page-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.page-header-icon {
  font-size: 1.5rem;
  margin-right: 8px;
}

/* ════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover::before {
  opacity: 1;
}

.card-save::before {
  background: var(--gradient-save);
}

.card-invest::before {
  background: var(--gradient-invest);
}

.card-borrow::before {
  background: var(--gradient-borrow);
}

.card-repay::before {
  background: var(--gradient-repay);
}

.card-protect::before {
  background: var(--gradient-protect);
}

.card-compare::before {
  background: var(--gradient-compare);
}

.card-journey::before {
  background: var(--gradient-journey);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.card-icon.save {
  background: var(--save-glow);
}

.card-icon.invest {
  background: var(--invest-glow);
}

.card-icon.borrow {
  background: var(--borrow-glow);
}

.card-icon.repay {
  background: var(--repay-glow);
}

.card-icon.protect {
  background: var(--protect-glow);
}

.card-icon.compare {
  background: var(--compare-glow);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  background: var(--bg-card-hover);
}

/* ════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value.green {
  color: var(--repay-color);
}

.stat-value.blue {
  color: var(--save-color);
}

.stat-value.purple {
  color: var(--invest-color);
}

.stat-value.orange {
  color: var(--borrow-color);
}

.stat-value.red {
  color: var(--protect-color);
}

.stat-value.cyan {
  color: var(--compare-color);
}

/* ════════════════════════════════════════════
   SUBCATEGORY SECTION
   ════════════════════════════════════════════ */
.subcategory {
  margin-bottom: 32px;
}

.subcategory-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.subcategory-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.subcategory-badge {
  font-size: 0.68rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-save {
  background: var(--save-glow);
  color: var(--save-color);
}

.badge-invest {
  background: var(--invest-glow);
  color: var(--invest-color);
}

.badge-borrow {
  background: var(--borrow-glow);
  color: var(--borrow-color);
}

.badge-protect {
  background: var(--protect-glow);
  color: var(--protect-color);
}

.badge-repay {
  background: var(--repay-glow);
  color: var(--repay-color);
}

.badge-compare {
  background: var(--compare-glow);
  color: var(--compare-color);
}

/* ════════════════════════════════════════════
   INSTRUMENT CARDS (smaller)
   ════════════════════════════════════════════ */
.instrument-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.instrument-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 12px;
}

.instrument-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.instrument-card .inst-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.instrument-card .inst-info {
  flex: 1;
  min-width: 0;
}

.instrument-card .inst-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.instrument-card .inst-rate {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.instrument-card .inst-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.instrument-card:hover .inst-arrow {
  transform: translateX(3px);
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════
   DETAIL PANEL / CALCULATOR
   ════════════════════════════════════════════ */
.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
  animation: fadeSlideIn 0.3s ease;
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-panel-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.detail-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.detail-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--protect-color);
}

/* ════════════════════════════════════════════
   FORM ELEMENTS
   ════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--save-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-save {
  background: var(--gradient-save);
  color: white;
}

.btn-invest {
  background: var(--gradient-invest);
  color: white;
}

.btn-borrow {
  background: var(--gradient-borrow);
  color: white;
}

.btn-protect {
  background: var(--gradient-protect);
  color: white;
}

.btn-repay {
  background: var(--gradient-repay);
  color: white;
}

.btn-outline {
  border: 1px solid var(--border-active);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead {
  background: rgba(255, 255, 255, 0.04);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

td {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-accent);
}

tr:hover td {
  background: var(--bg-glass);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-green {
  color: var(--repay-color);
}

.text-red {
  color: var(--protect-color);
}

.text-blue {
  color: var(--save-color);
}

.text-purple {
  color: var(--invest-color);
}

.text-orange {
  color: var(--borrow-color);
}

/* ════════════════════════════════════════════
   TABS
   ════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

.tab-btn {
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

/* ════════════════════════════════════════════
   CANVAS / CHART WRAPPERS
   ════════════════════════════════════════════ */
.chart-wrapper {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 16px 0;
}

.chart-wrapper canvas {
  width: 100% !important;
  max-height: 300px;
}

.chart-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════
   COMPARISON CARDS
   ════════════════════════════════════════════ */
.compare-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}

.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  padding-top: 60px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.compare-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.recommendation-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.recommendation-box h4 {
  color: var(--repay-color);
  font-size: 1rem;
  margin-bottom: 8px;
}

.recommendation-box p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ════════════════════════════════════════════
   JOURNEY / TIMELINE
   ════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--save-color), var(--invest-color), var(--borrow-color), var(--repay-color));
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.timeline-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.timeline-item .timeline-tips {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--save-color);
}

.timeline-item .timeline-tips li {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-bottom: 4px;
  list-style: none;
  padding-left: 16px;
  position: relative;
}

.timeline-item .timeline-tips li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════
   SHARE / EXPORT BAR
   ════════════════════════════════════════════ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
}

.share-bar .share-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════
   RISK / LEVEL INDICATORS
   ════════════════════════════════════════════ */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.risk-low {
  background: rgba(34, 197, 94, 0.15);
  color: var(--repay-color);
}

.risk-medium {
  background: rgba(234, 179, 8, 0.15);
  color: var(--journey-color);
}

.risk-high {
  background: rgba(249, 115, 22, 0.15);
  color: var(--borrow-color);
}

.risk-very-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--protect-color);
}

/* ════════════════════════════════════════════
   HIGHLIGHT BOX
   ════════════════════════════════════════════ */
.highlight-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  font-size: 0.88rem;
}

.highlight-green {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  color: var(--repay-color);
}

.highlight-blue {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--save-color);
}

.highlight-orange {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.15);
  color: var(--borrow-color);
}

.highlight-purple {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.15);
  color: var(--invest-color);
}

/* ════════════════════════════════════════════
   BEST RETURN HIGHLIGHT
   ════════════════════════════════════════════ */
.best-return-banner {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.best-return-banner .trophy {
  font-size: 2rem;
}

.best-return-banner .best-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--repay-color);
}

.best-return-banner .best-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════
   EARLY CLOSURE STRATEGIES
   ════════════════════════════════════════════ */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.strategy-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition-fast);
}

.strategy-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.strategy-card h5 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.strategy-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.strategy-card .savings-amount {
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--repay-color);
}

/* ════════════════════════════════════════════
   ABOUT & SUPPORT
   ════════════════════════════════════════════ */
.about-hero {
  text-align: center;
  padding: 48px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.about-hero .hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.about-hero h2 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.about-hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.support-form {
  max-width: 600px;
}

.support-form textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.support-form textarea:focus {
  border-color: var(--save-color);
}

/* ════════════════════════════════════════════
   TOAST / NOTIFICATIONS
   ════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  font-size: 0.88rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ════════════════════════════════════════════
   LOADER
   ════════════════════════════════════════════ */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px;
}

.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--save-color);
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.15s;
  background: var(--invest-color);
}

.loader-dot:nth-child(3) {
  animation-delay: 0.3s;
  background: var(--borrow-color);
}

@keyframes loaderPulse {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ════════════════════════════════════════════
   BACK BUTTON
   ════════════════════════════════════════════ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 16px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.back-btn:hover {
  color: var(--text-primary);
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .menu-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 72px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .instrument-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .compare-layout {
    grid-template-columns: 1fr;
  }

  .compare-vs {
    padding: 0;
    font-size: 1.2rem;
  }

  .page-header h2 {
    font-size: 1.4rem;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }
}

/* ════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════ */
.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 16px;
}

.gap-1 {
  gap: 8px;
}

.w-full {
  width: 100%;
}

.font-bold {
  font-weight: 700;
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.75rem;
}

/* ════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════ */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* Firefox scrollbar */
* {
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.18) rgba(255, 255, 255, 0.02);
}