/* ============================================================
   VORTEILFINANZ — Design System
   Corporate German Banking — Bleu / Blanc / Sobre
============================================================ */

:root {
  --blue-900: #05132e;
  --blue-800: #0a1f4e;
  --blue-700: #0e2a68;
  --blue-600: #1a3a8f;
  --blue-500: #2456c8;
  --blue-400: #3b6fe0;
  --blue-300: #6b9ef8;
  --blue-100: #e8f0fe;
  --blue-50:  #f0f5ff;

  --white:    #ffffff;
  --gray-50:  #f8f9fc;
  --gray-100: #eef1f8;
  --gray-200: #dde3f0;
  --gray-300: #b8c4db;
  --gray-400: #8a99b5;
  --gray-500: #5a6a87;
  --gray-600: #3a4a63;

  --green:    #00a878;
  --green-bg: #e6f7f3;
  --red:      #dc2626;
  --red-bg:   #fef2f2;
  --gold:     #c8960a;
  --gold-bg:  #fef9e7;

  --bg:       #f4f7fc;
  --bg-card:  #ffffff;
  --border:   #e2e8f4;
  --shadow:   0 1px 4px rgba(10,31,78,.06), 0 4px 16px rgba(10,31,78,.04);
  --shadow-md:0 4px 16px rgba(10,31,78,.10), 0 8px 32px rgba(10,31,78,.06);

  --sidebar-w: 260px;
  --radius:    10px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--blue-900);
  line-height: 1.5;
  min-height: 100vh;
}
a { text-decoration: none; color: var(--blue-500); }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   AUTH PAGE
============================================================ */
#authPage {
  display: none;
  min-height: 100vh;
  width: 100%;
  background: var(--blue-900);
  position: relative;
  overflow: hidden;
}
#authPage.show { display: flex !important; }

.auth-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.auth-bg-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(36,86,200,.25) 0%, transparent 70%);
  top: -200px; left: -100px;
  pointer-events: none;
}

.auth-container {
  position: relative; z-index: 1;
  display: flex; width: 100%; min-height: 100vh;
  max-width: 1100px; margin: 0 auto;
}

.auth-left {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 56px;
  gap: 40px;
}
.auth-brand {
  display: flex; align-items: center; gap: 12px;
}
.auth-logo {
  width: 42px; height: 42px;
  background: var(--blue-500);
  color: white;
  font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.auth-brand-name {
  font-size: 1.1rem; font-weight: 700; color: white;
  letter-spacing: .02em;
}
.auth-headline h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem; font-weight: 700;
  color: white; line-height: 1.15;
}
.auth-headline h1 em { color: var(--blue-300); font-style: normal; }
.auth-headline p {
  color: rgba(255,255,255,.6);
  font-size: .9rem; margin-top: 16px;
  max-width: 380px; line-height: 1.6;
}

.auth-stats {
  display: flex; align-items: center; gap: 24px;
}
.auth-stat-val {
  font-size: 1.5rem; font-weight: 800; color: white;
}
.auth-stat-lbl {
  font-size: .72rem; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .06em;
  margin-top: 2px;
}
.auth-stat-sep {
  width: 1px; height: 36px;
  background: rgba(255,255,255,.12);
}

.auth-trust {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.auth-trust span {
  font-size: .75rem; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.05);
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.08);
}

/* RIGHT */
.auth-right {
  width: 460px; flex-shrink: 0;
  background: white;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 44px;
  border-left: 1px solid rgba(255,255,255,.06);
}
.auth-form-panel { width: 100%; }

.form-header { margin-bottom: 28px; }
.form-header h2 {
  font-size: 1.5rem; font-weight: 800;
  color: var(--blue-900);
}
.form-header p { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }

.field-group { margin-bottom: 16px; }
.field-group label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--gray-600); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}
.field-group input, .field-group select, .field-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--blue-900);
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(36,86,200,.12);
  background: white;
}
.field-group textarea { resize: vertical; }

.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-with-btn { position: relative; }
.input-with-btn input { padding-right: 40px; }
.eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: .9rem; color: var(--gray-400); background: none; border: none;
}

.form-row-between {
  display: flex; justify-content: flex-end; margin-bottom: 16px;
}
.link-sm { font-size: .78rem; color: var(--blue-500); }

.btn-primary {
  display: block; width: 100%;
  padding: 11px 20px;
  background: var(--blue-500);
  color: white;
  font-size: .9rem; font-weight: 700;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .02em;
}
.btn-primary:hover { background: var(--blue-400); }
.btn-primary:active { transform: scale(.99); }

.btn-outline {
  display: inline-block;
  padding: 9px 18px;
  background: white;
  color: var(--blue-600);
  font-size: .85rem; font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid var(--blue-200, #c0d0f0);
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { background: var(--blue-50); border-color: var(--blue-500); }

.btn-link {
  background: none; border: none; padding: 0;
  color: var(--blue-500); font-size: .82rem; cursor: pointer;
  font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }

.switch-link {
  text-align: center; margin-top: 20px;
  font-size: .82rem; color: var(--gray-500);
}
.switch-link a { color: var(--blue-500); font-weight: 600; }

.checkbox-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; margin-bottom: 16px;
}
.checkbox-wrap input { margin-top: 2px; flex-shrink: 0; }
.checkbox-wrap span { font-size: .78rem; color: var(--gray-500); }

.form-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .82rem;
  margin-bottom: 14px;
}

/* ============================================================
   APP LAYOUT
============================================================ */
#appPage { display: flex; min-height: 100vh; }
#appPage.hidden { display: none !important; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--blue-900);
  height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column;
  padding: 0;
  z-index: 100;
  transition: transform .3s;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo {
  width: 34px; height: 34px;
  background: var(--blue-500);
  color: white; font-weight: 800; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
}
.sidebar-brand-name {
  font-size: .95rem; font-weight: 700; color: white;
  letter-spacing: .01em;
}

.sidebar-nav {
  flex: 1; padding: 16px 12px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
}
.nav-section-label {
  font-size: .65rem; font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .1em;
  padding: 10px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.55);
  font-size: .85rem; font-weight: 500;
  transition: all .15s;
  cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.nav-item.active {
  background: rgba(36,86,200,.3);
  color: white;
  border-left: 3px solid var(--blue-400);
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  background: var(--blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: .85rem;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: .82rem; font-weight: 600; color: white; }
.sidebar-user-balance { font-size: .75rem; color: rgba(255,255,255,.4); }

.sidebar-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  color: rgba(255,255,255,.35);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.04);
  transition: color .2s; width: 100%;
}
.sidebar-logout svg { width: 16px; height: 16px; fill: currentColor; }
.sidebar-logout:hover { color: rgba(255,255,255,.7); }

.main-content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
}
.menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--blue-700);
  transition: background .2s;
}
.menu-btn svg { width: 20px; height: 20px; fill: currentColor; }
.menu-btn:hover { background: var(--gray-100); }

.topbar-title {
  flex: 1;
  font-size: 1rem; font-weight: 700; color: var(--blue-900);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

.notif-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-700);
  transition: background .2s;
}
.notif-btn svg { width: 20px; height: 20px; fill: currentColor; }
.notif-btn:hover { background: var(--gray-100); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  background: var(--red);
  color: white; font-size: .62rem; font-weight: 800;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.topbar-avatar {
  width: 34px; height: 34px;
  background: var(--blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: .82rem;
  cursor: pointer;
}

/* NOTIFS PANEL */
.notifs-panel {
  position: absolute; top: 60px; right: 16px; z-index: 200;
  width: 340px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.notifs-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--blue-900);
}
.notifs-header button { font-size: .75rem; color: var(--blue-500); font-weight: 600; }

/* SECTIONS */
.section { padding: 28px 28px 40px; flex: 1; }
.section.hidden { display: none !important; }

.section-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.greeting { font-size: .82rem; color: var(--gray-500); font-weight: 500; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; font-weight: 700; color: var(--blue-900);
  line-height: 1.2;
}

/* GLASS CARD */
.glass-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: .78rem; font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

/* DASHBOARD */
.dash-cards {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 16px; margin-bottom: 24px;
}
.dash-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.dash-card.primary {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-600) 100%);
  border: none;
  color: white;
}
.dash-card-label {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-400); margin-bottom: 8px;
}
.dash-card.primary .dash-card-label { color: rgba(255,255,255,.6); }
.dash-card-val {
  font-size: 1.6rem; font-weight: 800; color: var(--blue-900);
  line-height: 1;
}
.dash-card.primary .dash-card-val { color: white; }
.dash-card-val.green { color: var(--green); }
.dash-card-iban {
  font-size: .7rem; color: rgba(255,255,255,.5);
  margin-top: 6px; letter-spacing: .04em;
}
.dash-card-sub { font-size: .72rem; color: var(--gray-400); margin-top: 6px; }

.dash-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px;
}

/* TRANSFERS */
.transfer-list { display: flex; flex-direction: column; gap: 2px; }
.transfer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .15s;
}
.transfer-item:hover { background: var(--gray-50); }
.transfer-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.transfer-icon.out { background: var(--red-bg); }
.transfer-icon.in  { background: var(--green-bg); }
.transfer-icon.admin { background: var(--blue-100); }
.transfer-info { flex: 1; min-width: 0; }
.transfer-name {
  font-size: .85rem; font-weight: 600; color: var(--blue-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.transfer-date { font-size: .72rem; color: var(--gray-400); }
.transfer-amount { font-size: .9rem; font-weight: 700; flex-shrink: 0; }
.transfer-amount.out { color: var(--red); }
.transfer-amount.in  { color: var(--green); }
.transfer-status {
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  text-transform: uppercase;
}
.transfer-status.pending  { background: var(--gold-bg); color: var(--gold); }
.transfer-status.completed{ background: var(--green-bg); color: var(--green); }
.transfer-status.rejected { background: var(--red-bg); color: var(--red); }

/* PRODUCTS */
.product-list { display: flex; flex-direction: column; gap: 2px; }
.product-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.product-item:hover { background: var(--gray-50); }
.product-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.product-icon.blue  { background: var(--blue-100); color: var(--blue-600); }
.product-icon.green { background: var(--green-bg); color: var(--green); }
.product-icon.gold  { background: var(--gold-bg); color: var(--gold); }
.product-name { font-size: .85rem; font-weight: 600; color: var(--blue-900); }
.product-rate { font-size: .72rem; color: var(--gray-400); }
.product-arrow { width: 18px; height: 18px; fill: var(--gray-300); margin-left: auto; }

/* ACCOUNT */
.account-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.account-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
}
.account-row span { color: var(--gray-500); }
.account-row strong { color: var(--blue-900); font-weight: 600; }
.iban-copy { display: flex; align-items: center; gap: 8px; }
.copy-btn {
  background: var(--gray-100); border: none;
  padding: 3px 7px; border-radius: 5px; cursor: pointer; font-size: .75rem;
  transition: background .2s;
}
.copy-btn:hover { background: var(--blue-100); }

.balance-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.balance-item.total { padding-top: 14px; }
.balance-label { font-size: .82rem; color: var(--gray-500); }
.balance-val { font-size: 1.1rem; font-weight: 800; color: var(--blue-900); }
.balance-val.green { color: var(--green); }
.balance-val.blue  { color: var(--blue-500); }
.balance-divider { height: 1px; background: var(--gray-100); }

/* CARTE VIRTUELLE */
.card-section-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.virtual-card {
  width: 360px;
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-600) 60%, var(--blue-400) 100%);
  border-radius: 18px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(10,31,78,.35);
  color: white;
}
.virtual-card::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.vc-brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.vc-logo {
  font-weight: 800; font-size: .9rem;
  background: rgba(255,255,255,.15);
  padding: 5px 10px; border-radius: 6px;
}
.vc-chip {
  width: 32px; height: 24px;
  background: linear-gradient(135deg, #f4d03f, #d4ac0d);
  border-radius: 4px;
}
.vc-number {
  font-size: 1.2rem; font-weight: 600;
  letter-spacing: .18em; margin-bottom: 20px;
  font-family: 'DM Mono', monospace, 'DM Sans', sans-serif;
}
.vc-bottom { display: flex; align-items: flex-end; gap: 20px; }
.vc-label { font-size: .62rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.vc-holder { font-size: .82rem; font-weight: 600; letter-spacing: .06em; }
.vc-expiry { font-size: .82rem; font-weight: 600; }
.vc-mc { display: flex; margin-left: auto; }
.mc-circle {
  width: 28px; height: 28px; border-radius: 50%; opacity: .9;
}
.mc-red    { background: #eb001b; }
.mc-orange { background: #f79e1b; margin-left: -10px; }
.vc-frozen-overlay {
  position: absolute; inset: 0;
  background: rgba(10,31,78,.75);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; font-weight: 700;
  border-radius: 18px;
}
.vc-frozen-icon { font-size: 2rem; }

.card-cvv-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  font-size: .82rem; color: var(--gray-500);
}
.cvv-hidden { letter-spacing: .15em; }
.card-details { }
.card-detail-row {
  display: flex; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
}
.card-detail-row span { color: var(--gray-500); }
.card-detail-row strong { color: var(--blue-900); font-weight: 600; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.card-security { display: flex; flex-direction: column; gap: 6px; }
.security-item { font-size: .78rem; color: var(--gray-500); }

/* TRANSFER */
.transfer-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.virement-form { display: flex; flex-direction: column; gap: 0; }
.amount-input-wrap { position: relative; }
.currency-symbol {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-weight: 600;
}
.amount-input-wrap input { padding-left: 28px; }
.field-hint { font-size: .72rem; color: var(--gray-400); margin-top: 4px; }

/* CRÉDIT */
.credit-products {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
  margin-bottom: 24px;
}
.credit-product {
  background: white; border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px; text-align: center;
  cursor: pointer; transition: all .2s;
}
.credit-product:hover { border-color: var(--blue-300); }
.credit-product.active { border-color: var(--blue-500); background: var(--blue-50); }
.cp-rate {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; color: var(--blue-500);
}
.cp-name { font-size: .85rem; font-weight: 700; color: var(--blue-900); margin: 4px 0 2px; }
.cp-desc { font-size: .72rem; color: var(--gray-400); }

.credit-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
.credit-result {
  background: var(--blue-50); border-radius: var(--radius);
  padding: 14px 16px; margin: 16px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.cr-item { display: flex; justify-content: space-between; font-size: .85rem; }
.cr-item span { color: var(--gray-500); }
.cr-item strong { color: var(--blue-900); font-weight: 700; }
input[type=range] {
  width: 100%; margin-top: 8px;
  accent-color: var(--blue-500);
}
.range-labels {
  display: flex; justify-content: space-between;
  font-size: .68rem; color: var(--gray-400); margin-top: 4px;
}

.credit-list { display: flex; flex-direction: column; gap: 8px; }
.credit-item {
  background: var(--gray-50); border-radius: 8px; padding: 12px 14px;
}
.credit-item-top { display: flex; justify-content: space-between; align-items: center; }
.credit-item-name { font-size: .85rem; font-weight: 600; color: var(--blue-900); }
.credit-item-amount { font-size: .95rem; font-weight: 800; color: var(--blue-600); }
.credit-item-bottom { display: flex; gap: 12px; margin-top: 4px; }
.credit-item-sub { font-size: .72rem; color: var(--gray-400); }
.credit-status {
  font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  text-transform: uppercase;
}
.credit-status.pending  { background: var(--gold-bg); color: var(--gold); }
.credit-status.approved { background: var(--green-bg); color: var(--green); }
.credit-status.active   { background: var(--blue-100); color: var(--blue-600); }
.credit-status.rejected { background: var(--red-bg); color: var(--red); }

/* ÉPARGNE */
.savings-products {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
  margin-bottom: 24px;
}
.saving-product {
  background: white; border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px; text-align: center;
  cursor: pointer; transition: all .2s;
  position: relative;
}
.saving-product:hover { border-color: var(--blue-300); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.saving-product.featured { border-color: var(--blue-400); }
.saving-product.best { border-color: var(--green); }
.sp-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: white;
  font-size: .65rem; font-weight: 700;
  padding: 2px 10px; border-radius: 99px;
  white-space: nowrap;
}
.sp-rate {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; font-weight: 700; color: var(--blue-500);
}
.saving-product.best .sp-rate { color: var(--green); }
.sp-name { font-size: .85rem; font-weight: 700; color: var(--blue-900); margin: 4px 0 2px; }
.sp-desc { font-size: .7rem; color: var(--gray-400); margin-bottom: 8px; }
.sp-tag {
  display: inline-block;
  background: var(--blue-50); color: var(--blue-600);
  font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.savings-list { display: flex; flex-direction: column; gap: 8px; }
.saving-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--gray-50); border-radius: 8px; padding: 12px 14px;
}
.saving-item-left .saving-name { font-size: .85rem; font-weight: 600; color: var(--blue-900); }
.saving-item-left .saving-sub  { font-size: .72rem; color: var(--gray-400); }
.saving-item-right { text-align: right; }
.saving-amount { font-size: .95rem; font-weight: 800; color: var(--blue-600); }
.saving-interest { font-size: .72rem; color: var(--green); }

/* PROFIL */
.profile-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.profile-avatar-block { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-avatar {
  width: 56px; height: 56px;
  background: var(--blue-600); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: white; flex-shrink: 0;
}
.profile-name { font-size: 1rem; font-weight: 700; color: var(--blue-900); }
.profile-email { font-size: .78rem; color: var(--gray-500); }

.kyc-section { }
.kyc-badge {
  font-size: .72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .04em;
}
.kyc-pending  { background: var(--gold-bg); color: var(--gold); }
.kyc-approved { background: var(--green-bg); color: var(--green); }
.kyc-rejected { background: var(--red-bg); color: var(--red); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,19,46,.55);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none !important; }
.modal {
  background: white; border-radius: var(--radius-lg);
  width: 440px; max-width: 95vw;
  box-shadow: var(--shadow-md);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--blue-900); }
.modal-close { font-size: 1.1rem; color: var(--gray-400); transition: color .2s; }
.modal-close:hover { color: var(--blue-900); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 22px; border-top: 1px solid var(--border);
}
.modal-product-info {
  background: var(--blue-50); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 16px;
}
.savings-preview {
  background: var(--gray-50); border-radius: 8px;
  padding: 12px 14px; margin-top: 12px;
  font-size: .82rem; color: var(--gray-500);
}
.savings-preview strong { color: var(--green); font-size: .95rem; }

/* NOTIF ITEM */
.notif-item {
  display: flex; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}
.notif-item:hover { background: var(--gray-50); }
.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-title { font-size: .82rem; font-weight: 600; color: var(--blue-900); }
.notif-msg   { font-size: .75rem; color: var(--gray-500); margin-top: 2px; }
.notif-time  { font-size: .68rem; color: var(--gray-400); margin-top: 2px; }

/* TOAST */
#toastContainer {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  min-width: 280px; max-width: 380px;
  animation: toastIn .3s ease;
  border-left: 4px solid var(--blue-500);
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast-icon { font-size: 1.1rem; }
.toast-content { flex: 1; }
.toast-title { font-size: .85rem; font-weight: 700; color: var(--blue-900); }
.toast-msg   { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }

/* SIDEBAR BACKDROP */
.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5,19,46,.4);
}
.sidebar-backdrop.hidden { display: none !important; }

/* MISC */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .dash-cards { grid-template-columns: 1fr 1fr; }
  .savings-products { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 860px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }

  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: flex; }

  .dash-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .transfer-grid { grid-template-columns: 1fr; }
  .credit-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .card-section-grid { grid-template-columns: 1fr; }
  .virtual-card { width: 100%; }
  .credit-products { grid-template-columns: 1fr; }
  .section { padding: 20px 16px 32px; }
}

@media (max-width: 540px) {
  .dash-cards { grid-template-columns: 1fr; }
  .savings-products { grid-template-columns: repeat(2,1fr); }
  .field-row-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   SÉLECTEUR DE DEVISES
============================================================ */
.currency-selector {
    display: flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.currency-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--gray-500);
    border: none;
    background: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.currency-btn.active {
    background: white;
    color: var(--blue-700);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.currency-btn:hover:not(.active) {
    color: var(--blue-600);
}
#currencyRateInfo {
    font-size: .68rem;
    color: var(--gray-400);
    margin-top: 4px;
    display: block;
}

/* BOUTON RELEVÉ */
.btn-releve {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--blue-900);
    color: white;
    font-size: .82rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}
.btn-releve:hover { background: var(--blue-700); }
.btn-releve svg { width: 16px; height: 16px; fill: currentColor; }

/* ============================================================
   SÉLECTEUR DE LANGUE FR / DE
============================================================ */
.lang-selector {
    display: flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    margin-right: 6px;
}
.lang-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--gray-500);
    border: none;
    background: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.lang-btn.active {
    background: white;
    color: var(--blue-700);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.lang-btn:hover:not(.active) { color: var(--blue-600); }