/* ============================================================
   Société Générale — Espace Client · styles
   Palette & type derived from the real SG connection page assets.
   ============================================================ */
:root {
  --red: #e60028;            /* SG logo red */
  --red-dark: #c80319;
  --red-press: #aa0117;
  --navy: #010035;           /* SG signature deep navy */
  --ink: #010035;            /* headings / primary text */
  --muted: #6e6e79;
  --line: #dcdcdc;
  --bg: #f4f5f6;
  --card: #ffffff;
  --green: #29873d;
  --green-bg: #e7f1ea;
  --red-soft: #fdebec;
  --blue: #0072b9;
  --amber: #b46a00;
  --amber-bg: #fdf2e2;
  --logo-black: #1a171b;
  --shadow: 0 1px 2px rgba(1,0,53,.05), 0 6px 22px rgba(1,0,53,.07);
  --shadow-lg: 0 24px 60px rgba(1,0,53,.22);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 262px;
  --font: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --display: 'Montserrat', var(--font);
}
[data-theme="dark"] {
  --ink: #eef0f8;
  --muted: #9a9cae;
  --line: #2a2c3d;
  --bg: #07071a;
  --card: #11122a;
  --navy: #05052e;
  --green-bg: #102619;
  --red-soft: #2a0d14;
  --amber-bg: #2a1d08;
  --logo-black: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background .35s, color .35s;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; }
.icn { display: block; flex: none; }

/* ============ Boot loader ============ */
.boot { position: fixed; inset: 0; display: grid; place-items: center; gap: 20px; background: var(--bg); }
.boot-spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
.boot .brand-logo, .boot .sg-square { width: 48px; height: 48px; }
.boot .sq-red, .boot .sq-black { }

/* ============ SG logo mark + wordmark ============ */
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.sg-square { position: relative; width: 30px; height: 30px; flex: none; }
.sg-square .sq-red { position: absolute; top: 0; left: 0; right: 0; height: 50%; background: var(--red); }
.sg-square .sq-black { position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: var(--logo-black); }
.sg-square::after { content: ""; position: absolute; left: 17%; right: 17%; top: calc(50% - 1.5px); height: 3px; background: #fff; }
.wm-text { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .4px; line-height: .92; font-size: 14px; color: var(--ink); }
.wordmark.on-dark .wm-text { color: #fff; }
.wordmark.on-dark .sg-square .sq-black { background: #fff; }
.wordmark.lg .sg-square { width: 44px; height: 44px; }
.wordmark.lg .wm-text { font-size: 21px; }
.wordmark.card .sg-square { width: 22px; height: 22px; }
.wordmark.card .wm-text { font-size: 10.5px; color: #fff; }
.wordmark.card .sg-square .sq-black { background: #fff; }

/* ============ SG-style full login page ============ */
.lg-page { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.lg-top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.lg-top-inner { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lg-top-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.lg-top-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.lg-top-nav a:hover { color: var(--red); }
.lg-top-cta { border: 1.5px solid var(--red); color: var(--red) !important; padding: 8px 16px; border-radius: 8px; }
.lg-top-cta:hover { background: var(--red); color: #fff !important; }

.lg-main { background: linear-gradient(135deg, #010035 0%, #1a1a4e 60%, #5a0a1c 130%); padding: 56px 24px; display: flex; justify-content: center; position: relative; overflow: hidden; }
.lg-main::after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); top: -180px; right: -80px; }
.lg-login-col { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.lg-page .login-card { animation: rise .5s ease both; }
.lg-page .login-title { font-size: 21px; margin-bottom: 22px; line-height: 1.25; }
.lg-page .remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.lg-page .remember input { accent-color: var(--red); }

.lg-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.lg-help-q { font-weight: 700; font-size: 14px; margin-top: 8px; }
.lg-help-a { font-size: 13px; color: var(--muted); line-height: 1.5; }
.lg-help .link-muted { font-size: 13.5px; }

.lg-sections { background: #f4f5f6; padding: 44px 24px; border-top: 1px solid var(--line); }
.lg-sections-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.lg-col h3 { font-size: 17px; color: var(--ink); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--red); display: inline-block; }
.lg-col .lg-sub { font-weight: 700; font-size: 14px; margin: 14px 0 4px; }
.lg-col a { display: block; color: var(--blue); text-decoration: none; font-size: 13.5px; padding: 3px 0; }
.lg-col a:hover { text-decoration: underline; }

.lg-footer { background: #fff; padding: 24px; border-top: 1px solid var(--line); }
.lg-footer-row { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; padding-bottom: 16px; }
.lg-footer-row a { color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.lg-footer-row a:hover { color: var(--red); }
.lg-footer-legal { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding-top: 16px; border-top: 1px solid var(--line); }
.lg-footer-legal span { font-size: 12px; color: var(--muted); }
.lg-page .login-disclaimer { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--muted); }
.lg-page .login-hint { margin-top: 16px; }

@media (max-width: 760px) {
  .lg-top-nav { gap: 12px; font-size: 12.5px; }
  .lg-top-cta { padding: 6px 10px; }
  .lg-sections-inner { grid-template-columns: 1fr; gap: 28px; }
  .lg-main { padding: 32px 16px; }
}

/* ============ LOGIN (legacy split layout, still used by some styles) ============ */
.login-screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: auto; }
.login-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .12; animation: float 18s ease-in-out infinite; }
.orb-1 { width: 460px; height: 460px; background: #e60028; top: -160px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: #010035; bottom: -160px; right: 6%; animation-delay: -5s; opacity: .16; }
.orb-3 { display: none; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-40px) scale(1.08); } }

.login-split { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; max-width: 1080px; width: 100%; margin: auto; padding: 32px 24px; gap: 40px; align-items: center; position: relative; z-index: 1; }
.login-promo { color: #fff; background: linear-gradient(160deg, #010035, #12123a); border-radius: 18px; padding: 46px 40px; box-shadow: var(--shadow-lg); animation: rise .7s cubic-bezier(.2,.8,.2,1) both; border-top: 4px solid var(--red); }
.login-promo .wordmark { margin-bottom: 36px; }
.login-promo h2 { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.login-promo > p { opacity: .82; margin-top: 12px; font-size: 15.5px; line-height: 1.5; max-width: 360px; }
.promo-list { list-style: none; margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.promo-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; opacity: .95; }
.promo-list li .icn { color: #ff5470; flex: none; }

.login-card { background: var(--card); border-radius: 18px; padding: 40px 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: rise .7s cubic-bezier(.2,.8,.2,1) .08s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
.login-card .brand { margin-bottom: 26px; }
.login-title { font-size: 24px; font-weight: 800; }
.login-sub { color: var(--muted); margin: 7px 0 26px; font-size: 14.5px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink); background: var(--card); transition: border .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,0,40,.14); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); padding: 6px; display: grid; place-items: center; }
.login-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); gap: 12px; }
.remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember input { accent-color: var(--red); }
.link-muted { color: var(--red); text-decoration: none; font-weight: 600; }
.login-error { display: flex; align-items: center; gap: 8px; background: var(--red-soft); color: var(--red-dark); font-size: 13px; font-weight: 600; padding: 10px 13px; border-radius: 10px; border: 1px solid #f6c9ce; animation: rise .25s both; }
.login-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-footer { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 24px; font-size: 12.5px; color: var(--muted); }
.login-disclaimer { text-align: center; padding: 14px; font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }

/* ============ Buttons ============ */
.btn-primary { background: var(--red); color: #fff; font-weight: 700; font-size: 15.5px; padding: 14px; border-radius: 10px; transition: background .18s, transform .12s, box-shadow .2s; box-shadow: 0 6px 16px rgba(230,0,40,.28); display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-primary:active { background: var(--red-press); transform: none; }
.btn-block { width: 100%; margin-top: 4px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { padding: 11px 18px; border-radius: 10px; font-weight: 700; font-size: 14px; transition: background .18s, transform .12s, border-color .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 5px 14px rgba(230,0,40,.25); }
.btn.primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.light { background: #fff; color: var(--red); }
.btn.light:hover { transform: translateY(-1px); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 8px; }
.btn.full { width: 100%; }

/* ============ APP LAYOUT ============ */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .3s; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; }
.sidebar-close { display: none; color: var(--muted); }
.sidebar-seg { margin: 0 18px 10px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--red); background: var(--red-soft); padding: 6px 10px; border-radius: 7px; align-self: flex-start; }
.nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: background .16s, color .16s; text-align: left; position: relative; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--red-soft); color: var(--red); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--red); }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); }
.logout-btn { width: 100%; padding: 11px 13px; border-radius: 9px; color: var(--muted); font-weight: 600; text-align: left; display: flex; align-items: center; gap: 12px; }
.logout-btn:hover { background: var(--red-soft); color: var(--red); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(1,0,53,.45); z-index: 39; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 11px 26px; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); transition: background .16s; position: relative; }
.icon-btn:hover { background: var(--bg); }
.icon-btn.active { background: var(--red-soft); color: var(--red); }
.search { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 9px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; color: var(--muted); }
.search input { flex: 1; background: none; border: none; outline: none; font-size: 14px; color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.last-login { font-size: 11px; color: var(--muted); text-align: right; line-height: 1.3; }
.last-login strong { color: var(--ink); font-size: 11.5px; }
.bell .badge { position: absolute; top: 4px; right: 4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 9px; display: grid; place-items: center; padding: 0 3px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; border-radius: 16px; }
.uc-text { display: flex; flex-direction: column; line-height: 1.2; }
.uc-text strong { font-size: 13.5px; }
.uc-text span { font-size: 11.5px; color: var(--muted); }

.content { padding: 26px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ============ Reusable ============ */
.page-head { margin-bottom: 20px; animation: fade .5s both; }
.page-head h1 { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.page-head p { color: var(--muted); margin-top: 5px; font-size: 14.5px; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.cols-4 { grid-template-columns: repeat(4,1fr); }
.span-2 { grid-column: span 2; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); animation: fade .5s both; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.more { color: var(--red); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.more:hover { text-decoration: underline; }

.stagger > * { animation: fade .5s both; }
.stagger > *:nth-child(1){animation-delay:.02s}.stagger > *:nth-child(2){animation-delay:.07s}
.stagger > *:nth-child(3){animation-delay:.12s}.stagger > *:nth-child(4){animation-delay:.17s}
.stagger > *:nth-child(5){animation-delay:.22s}.stagger > *:nth-child(6){animation-delay:.27s}

.muted { color: var(--muted); } .sm { font-size: 13px; } .right, .r { text-align: right; }
.flex { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.big-num { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.big-num.xl { font-size: 34px; }
.up-txt { color: var(--green); }

/* Hero */
.hero { grid-column: 1 / -1; background: linear-gradient(135deg, #010035, #14143c); color: #fff; border-radius: 16px; padding: 26px 28px; position: relative; overflow: hidden; box-shadow: var(--shadow); border-left: 4px solid var(--red); }
.hero::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); top: -120px; right: -60px; }
.hero .label { opacity: .82; font-size: 13px; }
.hero .balance { font-family: var(--display); font-size: 42px; font-weight: 800; margin: 6px 0 6px; letter-spacing: -1px; }
.hero .sub { opacity: .9; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.hero .chips { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.hero .chip { background: rgba(255,255,255,.13); padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; transition: background .18s, transform .12s; }
.hero .chip:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.eye-btn { background: rgba(255,255,255,.16); width: 34px; height: 34px; border-radius: 9px; position: absolute; top: 22px; right: 24px; color: #fff; display: grid; place-items: center; }
.hero .delta { color: #7ce8a0; }

/* Stat cards */
.stat { display: flex; flex-direction: column; gap: 5px; }
.s-top { display: flex; align-items: center; justify-content: space-between; }
.s-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.s-label { color: var(--muted); font-size: 13px; }
.s-val { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.s-sub { color: var(--muted); font-size: 12px; }
.delta { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }

/* Ticker */
.ticker { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.tick { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; white-space: nowrap; box-shadow: var(--shadow); flex: 1; min-width: max-content; }
.tk-n { font-weight: 700; font-size: 13px; }
.tk-v { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Mini accounts */
.mini-accts { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.mini-acct { text-align: left; border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px 13px 16px; position: relative; background: var(--card); transition: border-color .18s, transform .12s, box-shadow .2s; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.mini-acct:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow); }
.ma-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.ma-name { font-weight: 700; font-size: 13.5px; }
.ma-bal { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.ma-type { font-size: 11.5px; color: var(--muted); }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 178px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; gap: 5px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 16px; border-radius: 5px 5px 2px 2px; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; }
.bar.in { background: linear-gradient(180deg,#29873d,#43c463); }
.bar.out { background: linear-gradient(180deg,#e60028,#ff5470); }
@keyframes grow { from { height: 0 !important; } }
.bar-col > span { font-size: 11.5px; color: var(--muted); }
.legend-inline { display: flex; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.legend-inline span { display: flex; align-items: center; gap: 7px; }
.legend-inline i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap.compact { justify-content: center; }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 150px; }
.legend.tight { margin-top: 12px; gap: 7px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.legend-item.sm { font-size: 12.5px; }
.legend-item .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-item .lv { margin-left: auto; font-weight: 700; }

/* Quick actions */
.quick { display: flex; flex-wrap: wrap; gap: 11px; }
.quick button { flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: 13px; transition: transform .12s, border-color .18s, box-shadow .2s; }
.quick button:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: var(--shadow); }
.q-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }

/* Progress */
.progress { height: 8px; background: var(--bg); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; border-radius: 10px; background: var(--red); animation: fill 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fill { from { width: 0 !important; } }
@keyframes dash { to { stroke-dashoffset: 0; } }

/* Rows / transactions */
.tx-row, .ben-row { display: flex; align-items: center; gap: 13px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.tx-row:last-child, .ben-row:last-child { border-bottom: none; }
.mono { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-main .t1 { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.row-main .t2 { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-amt { font-family: var(--display); font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-amt.in { color: var(--green); }
.star { color: #e8a800; }

.pill { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.grey { background: var(--bg); color: var(--muted); }

/* Account cards */
.acct-card { cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: transform .12s, box-shadow .2s; }
.acct-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.acct-card.sel { box-shadow: 0 0 0 2px var(--red), var(--shadow); }
.ac-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ac-name { font-weight: 700; font-size: 15px; margin-top: 8px; }
.acct-card .big-num { font-size: 24px; margin: 2px 0 8px; }
.ac-iban { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.ac-bic { font-size: 11px; color: var(--muted); }

/* Segmented */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { padding: 7px 13px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--card); color: var(--red); box-shadow: var(--shadow); }
.seg.seg-wrap { display: flex; flex-wrap: wrap; }

/* Forms */
.form-grid { display: grid; gap: 15px; }
.f-label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.f-label input, .f-label select, .f-label textarea { padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14.5px; background: var(--card); color: var(--ink); font-weight: 500; transition: border .2s, box-shadow .2s; }
.f-label input:focus, .f-label select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,0,40,.12); }

/* Transfer recap */
.recap { background: linear-gradient(150deg,#010035,#26264f); color: #fff; border: none; }
.recap h3 { color: #fff; }
.recap-list { margin-top: 18px; display: flex; flex-direction: column; gap: 13px; font-size: 14px; }
.recap-list .flex span { opacity: .8; }
.recap-list .big { padding-top: 6px; border-top: 1px solid rgba(255,255,255,.15); }
.recap-list .big strong { font-family: var(--display); font-size: 22px; }
.iban-sm { font-size: 11.5px; font-variant-numeric: tabular-nums; max-width: 55%; text-align: right; }
.recap-note { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding: 13px; background: rgba(255,255,255,.1); border-radius: 10px; font-size: 12.5px; opacity: .92; }

/* Bank cards */
.bankcard { border-radius: 16px; padding: 20px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-height: 200px; transition: transform .3s; }
.bankcard:hover { transform: translateY(-5px); }
.bankcard.infinite { background: linear-gradient(135deg,#010035,#2a2a5c); }
.bankcard.gold { background: linear-gradient(135deg,#6e5407,#c9a227 55%,#7a5c00); }
.bankcard.biz { background: linear-gradient(135deg,#1a171b,#3a3a3a); }
.bankcard.frozen { filter: grayscale(.65) brightness(.82); }
.bankcard::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle,rgba(255,255,255,.14),transparent 70%); top: -80px; right: -40px; }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.bc-net { font-weight: 800; letter-spacing: 1px; font-size: 13px; }
.bankcard .chip { width: 40px; height: 30px; border-radius: 6px; background: linear-gradient(135deg,#e6c66e,#b8902a); position: relative; z-index: 1; }
.bc-num { font-family: var(--display); font-size: 18px; letter-spacing: 2px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: auto; position: relative; z-index: 1; }
.bc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; position: relative; z-index: 1; }
.bc-cap { opacity: .65; font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; }
.bc-name { text-transform: uppercase; letter-spacing: .8px; font-weight: 600; font-size: 12.5px; }

/* Toggle rows */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; }
.tr-label { font-size: 13.5px; font-weight: 600; }
.tr-hint { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.toggle { position: relative; width: 44px; height: 25px; border-radius: 20px; background: var(--line); transition: background .2s; flex: none; }
.toggle.on { background: var(--green); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle.on::after { transform: translateX(19px); }

/* Projects / sec rows */
.proj-dot { width: 34px; height: 34px; border-radius: 10px; }
.sec-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }

/* Holdings table */
.htable-wrap { overflow-x: auto; margin: 0 -4px; }
.htable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.htable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 0 12px 12px; border-bottom: 1px solid var(--line); }
.htable th.r { text-align: right; }
.htable td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.htable tr:last-child td { border-bottom: none; }
.htable .tnum { font-variant-numeric: tabular-nums; }
.htable .strong { font-weight: 700; }
.hv { display: flex; align-items: center; gap: 11px; }
.hv .mono { width: 36px; height: 36px; border-radius: 9px; font-size: 12px; }
.hv-n { font-weight: 700; font-size: 13.5px; }
.hv-t { font-size: 11.5px; color: var(--muted); }
.pf-head .big-num.xl { margin-top: 2px; }
.pf-head .delta { font-size: 14px; }

/* Promo / help cards */
.promo-card { background: linear-gradient(135deg,#e60028,#aa0117); color: #fff; border: none; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.promo-card h3 { color: #fff; font-size: 18px; }
.promo-card p { opacity: .92; font-size: 14px; margin-bottom: 8px; }
.help-card { display: flex; flex-direction: column; }
.legal { text-align: center; margin-top: 26px; font-size: 11.5px; color: var(--muted); }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 372px; max-width: 92vw; background: var(--card); border-left: 1px solid var(--line); z-index: 60; transform: translateX(100%); transition: transform .3s; display: flex; flex-direction: column; }
.drawer.open { transform: none; box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px; }
.notif { display: flex; gap: 12px; padding: 13px; border-radius: 11px; transition: background .16s; cursor: pointer; }
.notif:hover { background: var(--bg); }
.n-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.n-t { font-weight: 700; font-size: 14px; }
.n-d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.n-time { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(1,0,53,.45); z-index: 55; }
.drawer-overlay.show { display: block; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(1,0,53,.5); backdrop-filter: blur(3px); z-index: 70; display: grid; place-items: center; padding: 20px; animation: fade .25s; }
.modal { background: var(--card); border-radius: 16px; padding: 26px; width: 100%; max-width: 430px; box-shadow: var(--shadow-lg); animation: rise .3s both; }
.modal h3 { font-family: var(--display); font-size: 19px; margin-bottom: 6px; }
.modal p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
.check-anim { width: 62px; height: 62px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; animation: pop .4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .3s both; display: flex; align-items: center; gap: 9px; }
[data-theme="dark"] .toast { background: #fff; color: var(--navy); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============ Added: single bars, flow summary, year banner, tax ============ */
.bar.solo { width: 62%; max-width: 30px; border-radius: 6px 6px 2px 2px; }

.flow-summary { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; padding: 12px 2px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.flow-summary .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.flow-summary strong { font-family: var(--display); font-size: 15px; }

.year-banner { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow); }
.yb-stats { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.yb-stats > div { display: flex; flex-direction: column; gap: 2px; }
.year-banner strong { font-family: var(--display); font-size: 19px; font-weight: 800; }
.yb-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; display: block; margin-bottom: 2px; }
.yb-note { margin-left: auto; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px; align-self: center; }
.yb-src { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }

.htable tr.row-peak td { background: color-mix(in srgb, var(--red-soft) 60%, transparent); }
[data-theme="dark"] .htable tr.row-peak td { background: rgba(230,0,40,.12); }

/* ============ Responsive ============ */
@media (max-width: 1100px) { .cols-4 { grid-template-columns: 1fr 1fr; } .cols-3 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
@media (max-width: 920px) { .login-split { grid-template-columns: 1fr; max-width: 460px; } .login-promo { display: none; } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: grid; }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .content { padding: 18px 14px; }
  .last-login { display: none; }
  .uc-text { display: none; }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4, .span-2 { grid-template-columns: 1fr; grid-column: auto; }
  .hero .balance { font-size: 33px; }
  .search { display: none; }
  .login-card { padding: 30px 22px; }
  .page-head h1 { font-size: 22px; }
}
