@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ============================================================
   BANCO POSTA — Design System
   Noir · Blanc · Orange  |  Mobile-First
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:      #E85D04;
  --orange-h:    #D04E00;
  --orange-dim:  rgba(232,93,4,.1);
  --orange-glow: rgba(232,93,4,.18);
  --ink:         #0A0A0A;
  --ink-1:       #111111;
  --ink-2:       #181818;
  --ink-3:       #222222;
  --ink-4:       #2A2A2A;
  --border:      rgba(255,255,255,.06);
  --border-2:    rgba(255,255,255,.10);
  --border-3:    rgba(255,255,255,.15);
  --white:       #FFFFFF;
  --gray-1:      #F0F0F0;
  --gray-2:      #AAAAAA;
  --gray-3:      #666666;
  --gray-4:      #3A3A3A;
  --green:       #16A34A;
  --green-dim:   rgba(22,163,74,.12);
  --red:         #DC2626;
  --red-dim:     rgba(220,38,38,.12);
  --blue:        #2563EB;
  --blue-dim:    rgba(37,99,235,.1);
  --font:        'Plus Jakarta Sans', sans-serif;
  --mono:        'DM Mono', monospace;
  --sidebar-w:   252px;
  --topbar-h:    56px;
  --r:           10px;
  --r-sm:        6px;
  --r-lg:        16px;
  --shadow:      0 2px 16px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.7);
}

html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--ink-1); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 2px; }

/* ============================================================
   LOADER
   ============================================================ */
#appLoader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.loader-brand { display: flex; align-items: center; gap: 10px; }
.loader-logo {
  width: 44px; height: 44px; background: var(--orange); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: var(--white);
}
.loader-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.loader-bar { width: 120px; height: 2px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.loader-fill { height: 100%; background: var(--orange); animation: loaderAnim 1.4s ease-in-out infinite; }
@keyframes loaderAnim { 0%{width:0;margin-left:0} 60%{width:100%;margin-left:0} 100%{width:0;margin-left:100%} }

/* ============================================================
   AUTH
   ============================================================ */
#authPage { min-height: 100vh; display: none; }
#authPage.show { display: flex; }
.auth-wrap { display: flex; width: 100%; min-height: 100vh; }

/* Panel gauche — caché mobile */
.auth-left {
  display: none;
  width: 42%;
  background: var(--ink-1);
  border-right: 1px solid var(--border);
  padding: 48px 44px;
  flex-direction: column;
  justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; bottom: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orange-dim) 0%, transparent 70%);
  border-radius: 50%;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-logo {
  width: 40px; height: 40px; background: var(--orange); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: var(--white); flex-shrink: 0;
}
.auth-brand-name { font-size: 1rem; font-weight: 700; }
.auth-brand-sub  { font-size: .62rem; color: var(--orange); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-tagline { position: relative; z-index: 1; }
.auth-headline { font-size: 2.2rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 12px; }
.auth-headline em { font-style: normal; color: var(--orange); }
.auth-sub { font-size: .84rem; color: var(--gray-2); line-height: 1.65; }
.auth-features { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.auth-feat { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: rgba(255,255,255,.75); }
.feat-ico { width: 30px; height: 30px; background: var(--orange-dim); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.auth-security { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--gray-3); }

/* Panel droit — formulaire */
.auth-right {
  flex: 1; width: 100%;
  background: var(--ink-1);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 22px;
}
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-switch-tab { display: flex; gap: 4px; background: var(--ink-2); border-radius: var(--r); padding: 4px; margin-bottom: 28px; }
.tab-btn {
  flex: 1; padding: 9px; border: none; border-radius: 7px;
  font-family: var(--font); font-size: .82rem; font-weight: 600;
  color: var(--gray-2); background: none; cursor: pointer; transition: all .18s;
}
.tab-btn.active { background: var(--orange); color: var(--white); }
.auth-form-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.auth-form-sub   { font-size: .8rem; color: var(--gray-2); margin-bottom: 22px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: .67rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gray-2); margin-bottom: 5px; }
.form-input {
  width: 100%; background: var(--ink-2); border: 1.5px solid var(--border-2);
  color: var(--white); font-family: var(--font); font-size: .85rem;
  padding: 11px 13px; border-radius: var(--r-sm); outline: none;
  transition: border-color .18s; appearance: none; -webkit-appearance: none;
}
.form-input:focus { border-color: var(--orange); }
.form-input::placeholder { color: var(--gray-3); }
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer;
}
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.eye-btn { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-3); font-size: .9rem; }
.form-error { background: var(--red-dim); border: 1px solid rgba(220,38,38,.25); color: #fca5a5; font-size: .76rem; padding: 9px 12px; border-radius: var(--r-sm); margin-bottom: 12px; }
.lang-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-bottom: 16px; }
.lang-btn { background: none; border: 1px solid var(--border-2); color: var(--gray-2); font-family: var(--font); font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 5px; cursor: pointer; transition: all .15s; }
.lang-btn.active { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  width: 100%; background: var(--orange); color: var(--white);
  font-family: var(--font); font-size: .88rem; font-weight: 700;
  padding: 12px; border: none; border-radius: var(--r-sm); cursor: pointer;
  transition: background .18s; letter-spacing: .01em;
}
.btn-primary:hover { background: var(--orange-h); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary {
  background: var(--ink-3); border: 1px solid var(--border-2); color: var(--white);
  font-family: var(--font); font-size: .84rem; font-weight: 600;
  padding: 9px 16px; border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
}
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }
.btn-sm {
  font-family: var(--font); font-size: .74rem; font-weight: 600;
  padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--border-2); background: var(--ink-3); color: var(--white);
  transition: all .15s;
}
.btn-sm:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger { background: var(--red-dim); border-color: rgba(220,38,38,.3); color: var(--red); }

/* ============================================================
   SIDEBAR — masquée mobile par défaut
   ============================================================ */
.sidebar {
  width: var(--sidebar-w); background: var(--ink-1); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 300;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }

.sidebar-header { padding: 18px 16px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sb-logo { width: 34px; height: 34px; background: var(--orange); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem; color: var(--white); flex-shrink: 0; }
.sb-name { font-size: .9rem; font-weight: 700; }
.sb-sub  { font-size: .58rem; color: var(--orange); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.sb-user-card { background: var(--ink-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.sb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; color: var(--white); flex-shrink: 0; }
.sb-user-name { font-size: .8rem; font-weight: 600; }
.sb-user-email { font-size: .66rem; color: var(--gray-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-section-label { font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-3); padding: 10px 8px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--gray-2); font-size: .82rem; font-weight: 500;
  margin-bottom: 2px; text-decoration: none;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--white); }
.nav-item.active { background: var(--orange-dim); color: var(--orange); font-weight: 600; }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.nav-item.active .nav-ico { opacity: 1; }
.nav-badge { margin-left: auto; background: var(--orange); color: var(--white); font-size: .6rem; font-weight: 700; padding: 2px 6px; border-radius: 10px; }

.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.lang-toggle { display: flex; gap: 5px; margin-bottom: 10px; }
.btn-logout {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.2);
  color: var(--red); font-family: var(--font); font-size: .78rem; font-weight: 600;
  padding: 9px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s;
}
.btn-logout:hover { background: rgba(220,38,38,.14); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h); background: var(--ink-1); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--gray-2); cursor: pointer; padding: 6px; border-radius: 6px; flex-shrink: 0; }
.topbar-title { font-size: .88rem; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.notif-btn { position: relative; background: none; border: none; color: var(--gray-2); cursor: pointer; padding: 6px; border-radius: 6px; }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--orange); border-radius: 50%; border: 1.5px solid var(--ink-1); }
.user-chip { display: flex; align-items: center; gap: 6px; background: var(--ink-2); border: 1px solid var(--border-2); border-radius: 20px; padding: 4px 10px 4px 4px; cursor: pointer; }
.chip-av { width: 26px; height: 26px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .7rem; color: var(--white); flex-shrink: 0; }
.chip-name { font-size: .76rem; font-weight: 600; display: none; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
#appPage { display: none; min-height: 100vh; }
#appPage.show { display: block; }
.main { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.page-content { flex: 1; padding: 16px 14px 80px; width: 100%; overflow-x: hidden; }
.section { display: block; }
.section.hidden { display: none !important; }
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.sec-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--ink-2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; width: 100%; }
.card-form { background: var(--ink-2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; width: 100%; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-label { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-2); }
.card-action { background: none; border: none; color: var(--orange); font-family: var(--font); font-size: .74rem; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* ============================================================
   DASHBOARD HERO
   ============================================================ */
.dash-hero {
  background: linear-gradient(135deg, var(--ink-2) 0%, rgba(232,93,4,.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 18px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.dash-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--orange-dim) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero-top { margin-bottom: 18px; }
.hero-greeting { font-size: .76rem; color: var(--gray-2); margin-bottom: 3px; }
.hero-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.hero-balance-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-2); margin-bottom: 4px; }
.hero-balance { font-family: var(--mono); font-size: 2rem; font-weight: 500; color: var(--orange); letter-spacing: -.01em; }
.hero-stats { display: flex; gap: 10px; }
.hero-stat { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; flex: 1; min-width: 0; }
.hs-label { font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-2); margin-bottom: 3px; }
.hs-val { font-family: var(--mono); font-size: .9rem; font-weight: 500; }

/* ============================================================
   GRIDS — Mobile: flex colonne
   ============================================================ */
.dash-grid         { display: flex; flex-direction: column; gap: 12px; }
.transfer-layout   { display: flex; flex-direction: column; gap: 12px; }
.loans-layout      { display: flex; flex-direction: column; gap: 12px; }
.card-layout       { display: flex; flex-direction: column; gap: 12px; }
.profile-layout    { display: flex; flex-direction: column; gap: 12px; }
.accounts-layout   { display: flex; flex-direction: column; gap: 12px; }
.invest-layout     { display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   TRANSACTIONS
   ============================================================ */
.tx-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tx-item:last-child { border-bottom: none; }
.tx-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: .82rem; flex-shrink: 0; }
.tx-ico.credit   { background: var(--green-dim); }
.tx-ico.debit    { background: var(--red-dim); }
.tx-ico.transfer { background: var(--blue-dim); }
.tx-ico.pending  { background: var(--orange-dim); }
.tx-info { flex: 1; min-width: 0; }
.tx-label { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date  { font-size: .68rem; color: var(--gray-2); margin-top: 1px; }
.tx-amount { font-family: var(--mono); font-size: .84rem; font-weight: 500; flex-shrink: 0; white-space: nowrap; }
.tx-amount.credit { color: var(--green); }
.tx-amount.debit  { color: var(--red); }
.tx-amount.pending { color: var(--orange); }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-block; font-size: .6rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .04em; white-space: nowrap; }
.badge-green  { background: var(--green-dim); color: var(--green); }
.badge-red    { background: var(--red-dim); color: var(--red); }
.badge-orange { background: var(--orange-dim); color: var(--orange); }
.badge-gray   { background: rgba(255,255,255,.06); color: var(--gray-2); }
.badge-blue   { background: var(--blue-dim); color: var(--blue); }

/* ============================================================
   COMPTE BANCAIRE
   ============================================================ */
.account-card {
  background: linear-gradient(135deg, var(--ink-3) 0%, rgba(232,93,4,.04) 100%);
  border: 1px solid rgba(232,93,4,.2); border-radius: var(--r-lg);
  padding: 18px 16px; margin-bottom: 12px; width: 100%;
}
.ac-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ac-type { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--orange-dim); color: var(--orange); padding: 3px 8px; border-radius: 4px; }
.ac-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.ac-balance { font-family: var(--mono); font-size: 1.7rem; font-weight: 500; margin-bottom: 12px; }
.ac-iban { font-family: var(--mono); font-size: .66rem; color: var(--gray-2); letter-spacing: .03em; margin-bottom: 3px; word-break: break-all; }
.ac-bic  { font-family: var(--mono); font-size: .64rem; color: var(--gray-3); }
.ac-actions { display: flex; gap: 8px; margin-top: 14px; }
.ac-btn { flex: 1; padding: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border-2); color: var(--white); font-family: var(--font); font-size: .74rem; font-weight: 600; border-radius: var(--r-sm); cursor: pointer; transition: all .15s; text-align: center; }
.ac-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   TABLE — scrollable mobile
   ============================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.data-table th { font-size: .61rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gray-2); padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px; border-bottom: 1px solid var(--border); font-size: .8rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

/* ============================================================
   VIREMENT
   ============================================================ */
.transfer-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.transfer-item:last-child { border-bottom: none; }
.transfer-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.transfer-benef { font-size: .82rem; font-weight: 600; }
.transfer-amount { font-family: var(--mono); font-size: .82rem; }
.transfer-iban { font-family: var(--mono); font-size: .66rem; color: var(--gray-2); word-break: break-all; }
.transfer-date { font-size: .66rem; color: var(--gray-3); margin-top: 2px; }

/* ============================================================
   PACKS INVESTISSEMENT
   ============================================================ */
.packs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack-card {
  background: var(--ink-3); border: 1.5px solid var(--border-2);
  border-radius: var(--r); padding: 16px 12px; text-align: center;
  cursor: pointer; transition: border-color .2s, transform .15s;
  position: relative; overflow: hidden;
}
.pack-card:active, .pack-card:hover { border-color: var(--orange); }
.pack-card.featured { border-color: var(--orange); background: linear-gradient(145deg, var(--ink-3), rgba(232,93,4,.06)); }
.pack-featured-badge { position: absolute; top: 0; right: 0; background: var(--orange); color: var(--white); font-size: .55rem; font-weight: 700; letter-spacing: .05em; padding: 3px 7px; border-radius: 0 var(--r-sm) 0 6px; text-transform: uppercase; }
.pack-name { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-2); margin-bottom: 8px; }
.pack-rate { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--white); }
.pack-rate-label { font-size: .62rem; color: var(--orange); font-weight: 600; }
.pack-duration { font-size: .7rem; color: var(--gray-2); margin: 5px 0; }
.pack-min { font-size: .68rem; color: var(--gray-1); font-weight: 600; margin-top: 6px; }
.pack-cta { margin-top: 12px; width: 100%; background: var(--orange-dim); border: 1px solid rgba(232,93,4,.3); color: var(--orange); font-family: var(--font); font-size: .74rem; font-weight: 700; padding: 8px; border-radius: var(--r-sm); cursor: pointer; transition: all .15s; }
.pack-card:hover .pack-cta, .pack-card.featured .pack-cta { background: var(--orange); color: var(--white); }

/* Invest rows */
.invest-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.invest-row:last-child { border-bottom: none; }
.invest-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--orange-dim); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.invest-info { flex: 1; min-width: 0; }
.invest-name { font-size: .82rem; font-weight: 700; }
.invest-meta { font-size: .68rem; color: var(--gray-2); margin-top: 2px; }
.invest-progress { height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.invest-progress-fill { height: 100%; background: linear-gradient(90deg, var(--orange), #F48C06); border-radius: 2px; }
.invest-right { text-align: right; flex-shrink: 0; }
.invest-amount { font-family: var(--mono); font-size: .82rem; font-weight: 500; }
.invest-return { font-family: var(--mono); font-size: .72rem; color: var(--green); margin-top: 2px; }

/* ============================================================
   PRÊTS
   ============================================================ */
.loan-sim { background: var(--ink-3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; margin-bottom: 14px; }
.loan-sim-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .82rem; }
.loan-sim-row:last-child { border-bottom: none; }
.loan-sim-label { color: var(--gray-2); }
.loan-sim-val { font-family: var(--mono); font-weight: 600; }

.loan-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.loan-row:last-child { border-bottom: none; }
.loan-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.loan-amount-val { font-family: var(--mono); font-weight: 600; font-size: .86rem; }
.loan-meta { font-size: .7rem; color: var(--gray-2); margin-top: 2px; }
.loan-progress-bar { height: 4px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.loan-progress-fill { height: 100%; background: var(--orange); border-radius: 2px; }

/* ============================================================
   CARTE VIRTUELLE
   ============================================================ */
.virtual-card {
  width: 100%; max-width: 340px; height: 190px;
  border-radius: 14px; padding: 20px 18px;
  background: linear-gradient(135deg, #1C1C1C 0%, #2A1200 60%, #1A0A00 100%);
  border: 1px solid rgba(232,93,4,.25);
  position: relative; overflow: hidden;
}
.virtual-card::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(232,93,4,.18) 0%, transparent 70%);
  border-radius: 50%;
}
.vc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; position: relative; }
.vc-bank-name { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.8); letter-spacing: .04em; }
.vc-chip { width: 28px; height: 20px; background: linear-gradient(135deg, #D4A853, #A8832A); border-radius: 3px; }
.vc-number { font-family: var(--mono); font-size: .88rem; letter-spacing: .14em; color: rgba(255,255,255,.9); margin-bottom: 16px; position: relative; }
.vc-footer { display: flex; justify-content: space-between; align-items: flex-end; position: relative; }
.vc-holder-label { font-size: .5rem; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.4); }
.vc-holder-name { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.85); }
.vc-expiry-label { font-size: .5rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.4); }
.vc-expiry-val { font-family: var(--mono); font-size: .72rem; color: rgba(255,255,255,.85); }
.vc-network { font-size: 1.1rem; }
.vc-frozen-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px;
}
.vc-frozen-text { font-size: .76rem; color: var(--gray-1); font-weight: 600; }

.card-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .8rem; gap: 10px; }
.card-detail-row:last-child { border-bottom: none; }
.card-detail-label { color: var(--gray-2); flex-shrink: 0; }
.card-detail-val { font-family: var(--mono); font-size: .76rem; text-align: right; word-break: break-all; }

/* ============================================================
   PROFIL
   ============================================================ */
.profile-avatar-block { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-av { width: 56px; height: 56px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--white); flex-shrink: 0; }
.profile-fullname { font-size: 1rem; font-weight: 700; }
.profile-email { font-size: .76rem; color: var(--gray-2); margin-top: 2px; }
.pi-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.pi-row:last-child { border-bottom: none; }
.pi-label { color: var(--gray-2); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0; }
.pi-val { font-size: .8rem; font-weight: 600; text-align: right; word-break: break-all; }

.kyc-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.kyc-status-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; padding: 7px 14px; border-radius: 20px; margin-bottom: 12px; }
.kyc-status-badge.none, .kyc-status-badge.pending { background: var(--orange-dim); color: var(--orange); }
.kyc-status-badge.approved { background: var(--green-dim); color: var(--green); }
.kyc-status-badge.rejected { background: var(--red-dim); color: var(--red); }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 5px; }
.notif-dot.read { background: transparent; border: 1.5px solid var(--border-2); }
.notif-title { font-size: .82rem; font-weight: 600; margin-bottom: 3px; }
.notif-msg   { font-size: .74rem; color: var(--gray-2); line-height: 1.45; }
.notif-time  { font-size: .64rem; color: var(--gray-3); margin-top: 4px; }

/* ============================================================
   MODALS — bottom sheet mobile
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.82); backdrop-filter: blur(4px); display: flex; align-items: flex-end; padding: 0; }
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--ink-2); border: 1px solid var(--border-2);
  border-radius: 18px 18px 0 0; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 20px 16px 36px;
}
.modal-handle { width: 36px; height: 4px; background: var(--ink-4); border-radius: 2px; margin: 0 auto 16px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: .95rem; font-weight: 700; }
.modal-close { background: rgba(255,255,255,.06); border: 1px solid var(--border-2); color: var(--gray-2); width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .82rem; flex-shrink: 0; }

/* Pack info dans modal invest */
.pack-modal-info { background: var(--ink-3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.pmi-name { font-weight: 700; font-size: .9rem; }
.pmi-rate { font-size: 1.4rem; font-weight: 800; color: var(--orange); }
.pmi-sub  { font-size: .7rem; color: var(--gray-2); }

/* ============================================================
   TOAST
   ============================================================ */
#toastArea { position: fixed; bottom: 20px; right: 16px; z-index: 9000; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--ink-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--orange); border-radius: var(--r);
  padding: 12px 14px; min-width: 220px; max-width: calc(100vw - 32px);
  pointer-events: all; animation: toastIn .28s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-ico   { font-size: .88rem; flex-shrink: 0; }
.toast-title { font-weight: 700; font-size: .8rem; }
.toast-msg   { font-size: .72rem; color: var(--gray-2); margin-top: 1px; }

/* ============================================================
   UTILS
   ============================================================ */
.empty-state { text-align: center; padding: 24px 16px; color: var(--gray-3); font-size: .8rem; }
.hidden { display: none !important; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 290; background: rgba(0,0,0,.65); }
.sidebar-backdrop.show { display: block; }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ================================================================
   DESKTOP ≥ 768px
   ================================================================ */
@media (min-width: 768px) {
  .sidebar { transform: translateX(0); box-shadow: none; }
  .sidebar-backdrop { display: none !important; }
  .menu-btn { display: none; }
  .main { margin-left: var(--sidebar-w); }
  .chip-name { display: block; }
  .topbar { padding: 0 22px; }
  .page-content { padding: 22px 24px 48px; }
  .sec-title { font-size: 1.3rem; }
  .card { padding: 20px; }
  .card-form { padding: 20px; }
  .auth-left { display: flex; }
  .auth-right { padding: 48px 44px; }
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .hero-balance { font-size: 2.3rem; }
  .dash-hero { padding: 26px 24px; }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-box { border-radius: var(--r-lg); max-width: 440px; max-height: 90vh; }
  .modal-handle { display: none; }
  .packs-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ================================================================
   LARGE DESKTOP ≥ 1024px
   ================================================================ */
@media (min-width: 1024px) {
  .dash-grid       { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
  .transfer-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; }
  .loans-layout    { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }
  .card-layout     { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
  .profile-layout  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .accounts-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .invest-layout   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .sec-title { font-size: 1.4rem; }
  .hero-balance { font-size: 2.5rem; }
}