/* ============================================================
   PHOENIX NEOBANK — design system
   ============================================================ */
:root {
  --ember-50: #fff4ec;
  --ember-100: #ffe3cf;
  --ember-300: #ffb27a;
  --ember-400: #ff8a45;
  --ember-500: #f5822e;
  --ember-600: #e4572e;
  --ember-700: #c1440e;
  --gold: #ffc773;

  --ink-900: #0b0b0f;
  --ink-850: #101017;
  --ink-800: #15151f;
  --ink-750: #1b1b28;
  --ink-700: #222232;
  --ink-600: #2e2e42;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f4f3f7;
  --text-dim: #a9a7b8;
  --text-mute: #74728a;

  --good: #35c98a;
  --bad: #ff5c73;
  --warn: #ffb020;
  --info: #5aa9ff;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(245, 130, 46, 0.35);
  --grad-ember: linear-gradient(135deg, var(--ember-400), var(--ember-600) 55%, var(--ember-700));
  --grad-ember-soft: linear-gradient(135deg, rgba(255, 138, 69, 0.16), rgba(193, 68, 14, 0.05));
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--ink-900);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
::selection { background: var(--ember-500); color: #fff; }
img, video { max-width: 100%; display: block; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 20px; border: 2px solid var(--ink-900); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad-ember); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px rgba(245, 130, 46, 0.7); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink-750); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 0.83rem; }
.btn-danger { background: rgba(255, 92, 115, 0.14); border-color: rgba(255, 92, 115, 0.4); color: #ff9aa9; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; background: var(--ink-700); border: 1px solid var(--line);
  color: var(--text-dim); text-transform: capitalize;
}
.chip.good { background: rgba(53, 201, 138, 0.14); color: #6fe0b3; border-color: transparent; }
.chip.bad { background: rgba(255, 92, 115, 0.14); color: #ff9aa9; border-color: transparent; }
.chip.warn { background: rgba(255, 176, 32, 0.16); color: var(--gold); border-color: transparent; }
.chip.info { background: rgba(90, 169, 255, 0.14); color: #9fcaff; border-color: transparent; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--ink-850); border: 1px solid var(--line-strong); color: var(--text);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--ember-500); box-shadow: 0 0 0 3px rgba(245, 130, 46, 0.18);
}
.input::placeholder { color: var(--text-mute); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 0.78rem; color: var(--text-mute); }
.field-label { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; margin-bottom: 2px; }

/* ---------- toast ---------- */
#toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast {
  background: var(--ink-750); border: 1px solid var(--line-strong); border-left: 3px solid var(--ember-500);
  padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 340px; font-size: 0.88rem;
  animation: toastIn 0.25s ease;
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* ============================================================
   LANDING
   ============================================================ */
.landing { position: relative; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px clamp(20px, 5.5vw, 76px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 11, 15, 0.82); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad-ember); box-shadow: 0 8px 20px -8px rgba(245, 130, 46, 0.8); font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9rem; color: var(--text-dim); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* language switcher */
.lang-wrap { position: relative; display: inline-flex; align-items: center; }
.lang-globe { position: absolute; left: 9px; pointer-events: none; font-size: 0.9rem; opacity: 0.9; }
.lang-select {
  -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 999px; padding: 7px 12px 7px 30px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  max-width: 150px;
}
.lang-select:focus { outline: none; border-color: var(--ember-500); }
.lang-select option { background: var(--ink-800); color: var(--text); }
.topbar .lang-wrap .lang-select { background: var(--ink-800); }
[dir="rtl"] .lang-globe { left: auto; right: 9px; }
[dir="rtl"] .lang-select { padding: 7px 30px 7px 12px; }

/* ---------- hero (full-bleed, split layout) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; width: 100%; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  filter: saturate(1.08) contrast(1.05);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg, rgba(9, 9, 13, 0.9) 0%, rgba(9, 9, 13, 0.72) 42%, rgba(9, 9, 13, 0.35) 72%, rgba(9, 9, 13, 0.55) 100%),
    linear-gradient(180deg, rgba(11, 11, 15, 0.35) 0%, rgba(11, 11, 15, 0.2) 55%, var(--ink-900) 100%);
}
.hero-glow {
  position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background:
    radial-gradient(38% 55% at 12% 32%, rgba(245, 130, 46, 0.28), transparent 70%),
    radial-gradient(30% 40% at 88% 78%, rgba(193, 68, 14, 0.22), transparent 70%);
}
.hero-grid {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center;
  gap: clamp(32px, 5vw, 90px);
  padding: clamp(120px, 16vh, 180px) clamp(20px, 5.5vw, 76px) clamp(70px, 12vh, 120px);
}
.hero-copy { max-width: 46rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); backdrop-filter: blur(8px);
}
.hero h1 {
  margin-top: 22px; font-size: clamp(2.7rem, 5.6vw, 5rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.04; max-width: 16ch;
}
.hero h1 .accent { background: var(--grad-ember); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 22px; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text-dim); max-width: 46ch; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn-lg { padding: 15px 24px; font-size: 1rem; }
.btn-lg .arr { transition: transform 0.15s ease; }
.btn-lg:hover .arr { transform: translate(2px, -2px); }
.btn-glass { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); color: #fff; backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.hero-stats { margin-top: 48px; display: flex; gap: clamp(22px, 3vw, 44px); flex-wrap: wrap; }
.hero-stats .s { display: flex; flex-direction: column; }
.hero-stats .s b { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); }
.hero-stats .s span { font-size: 0.8rem; color: var(--text-mute); }

.hero-visual { position: relative; justify-self: end; width: min(452px, 100%); padding: 30px 0 30px 56px; }
.fx-card {
  background: #fdfdfb; color: #14141c; border-radius: 22px; padding: 20px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative; z-index: 2;
}
.fx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fx-head b { font-family: var(--font-display); font-size: 1.15rem; }
.fx-tag { font-size: 0.72rem; font-weight: 600; color: #5b5b68; border: 1px solid #e3e3e0; border-radius: 8px; padding: 5px 10px; }
.fx-body { background: #f4f4f1; border-radius: 16px; padding: 16px; }
.fx-rate { text-align: center; font-size: 0.82rem; color: #6a6a76; margin-bottom: 12px; }
.fx-swap { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.fx-cur { flex: 1; text-align: center; background: #fff; border: 1px solid #e6e6e2; border-radius: 12px; padding: 10px 8px; font-weight: 600; font-size: 0.88rem; }
.fx-swapic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; background: #e9f6ef; color: var(--good); border-radius: 50%; font-size: 0.9rem; }
.fx-amount { text-align: center; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.fx-avail { text-align: center; font-size: 0.82rem; color: #6a6a76; margin-top: 2px; }
.fx-avail b { color: #14141c; }
.fx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.fx-split > div { background: #fff; border: 1px solid #ececE8; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.fx-split span { font-size: 0.7rem; color: #8a8a94; }
.fx-split b { font-size: 0.95rem; }
.fx-go { text-align: center; background: var(--grad-ember); color: #fff; font-weight: 700; padding: 13px; border-radius: 12px; box-shadow: 0 12px 28px -12px rgba(245, 130, 46, 0.8); }
.bal-card {
  position: absolute; left: -8px; top: 49%; width: 224px; z-index: 3;
  background: var(--grad-ember); color: #fff; border-radius: 20px; padding: 16px;
  box-shadow: 0 30px 70px -24px rgba(193, 68, 14, 0.7); overflow: hidden;
}
.bal-card::after { content: "\f7f6"; font-family: bootstrap-icons; position: absolute; right: -16px; bottom: -22px; font-size: 6rem; opacity: 0.16; }
.bal-top { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; opacity: 0.92; }
.bal-plus { width: 26px; height: 26px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.22); border-radius: 50%; font-weight: 700; }
.bal-amt { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; margin: 8px 0 16px; }
.bal-amt small { font-size: 0.8rem; font-weight: 600; opacity: 0.85; }
.bal-actions { display: flex; gap: 8px; }
.bal-btn { flex: 1; text-align: center; font-size: 0.8rem; font-weight: 700; padding: 9px; border-radius: 999px; }
.bal-btn.light { background: #fff; color: var(--ember-700); }
.bal-btn.dark { background: rgba(0, 0, 0, 0.28); color: #fff; }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-mute); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; }
.scroll-cue span { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

.section { padding: clamp(60px, 10vw, 120px) clamp(20px, 5.5vw, 76px); max-width: 1500px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head .kicker { color: var(--ember-400); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 12px; }
.section-head p { color: var(--text-dim); margin-top: 12px; max-width: 60ch; margin-inline: auto; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-ember-soft); border: 1px solid var(--line); font-size: 1.3rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--text-dim); font-size: 0.9rem; margin-top: 8px; }

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.split.rev { direction: rtl; } .split.rev > * { direction: ltr; }
.split h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.split ul { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.split li { display: flex; gap: 10px; color: var(--text-dim); font-size: 0.95rem; }
.split li::before { content: "→"; color: var(--ember-400); font-weight: 700; }
.mock {
  background: linear-gradient(180deg, var(--ink-750), var(--ink-850)); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-glow);
}
.mock .mrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.mock .mrow:last-child { border: 0; }

.contact-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border: 0; }
.contact-line .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--grad-ember-soft); border: 1px solid var(--line); font-size: 1.1rem; }
.contact-line b { display: block; margin-bottom: 2px; }
.form-status { font-size: 0.88rem; margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; display: none; }
.form-status.ok { display: block; background: rgba(53, 201, 138, 0.14); color: #7fe3ba; }
.form-status.err { display: block; background: rgba(255, 92, 115, 0.14); color: #ff9aa9; }

.cta-band {
  margin: 0 clamp(20px, 5.5vw, 76px); border-radius: var(--radius-lg); text-align: center;
  padding: clamp(44px, 8vw, 90px); background: var(--grad-ember-soft); border: 1px solid var(--line-strong);
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-band p { color: var(--text-dim); margin-top: 12px; }

footer.foot { padding: 60px clamp(20px, 5.5vw, 76px) 40px; border-top: 1px solid var(--line); margin-top: 90px; }
.foot-grid { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-mute); margin-bottom: 14px; }
.foot-grid a { display: block; color: var(--text-dim); font-size: 0.88rem; padding: 4px 0; }
.foot-bottom { max-width: 1500px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; }
.auth-aside video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.auth-aside::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, rgba(193, 68, 14, 0.5), rgba(11, 11, 15, 0.86)); }
.auth-aside > * { position: relative; z-index: 2; }
.auth-aside blockquote { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; max-width: 20ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.7rem; }
.auth-card .sub { color: var(--text-dim); margin: 8px 0 26px; font-size: 0.92rem; }
.auth-switch { margin-top: 18px; font-size: 0.88rem; color: var(--text-dim); text-align: center; }
.auth-switch button { background: none; border: 0; color: var(--ember-400); font-weight: 600; cursor: pointer; }
.seg { display: flex; background: var(--ink-800); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.seg button { flex: 1; padding: 9px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.88rem; color: var(--text-dim); }
.seg button.active { background: var(--grad-ember); color: #fff; }
.auth-card form > label { display: block; font-size: 0.8rem; color: var(--text-dim); font-weight: 600; margin-bottom: 6px; }
.linkbtn { background: none; border: 0; color: var(--ember-400); font-weight: 600; cursor: pointer; font-size: 0.86rem; padding: 0; }
.linkbtn:disabled { color: var(--text-mute); cursor: default; }
.otp-row { display: flex; gap: 8px; margin: 6px 0 18px; }
.otp-row .otp {
  flex: 1; text-align: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  padding: 12px 0; min-width: 0;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100svh; }
.sidebar { border-right: 1px solid var(--line); background: var(--ink-850); padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100svh; }
.sidebar .brand { padding: 0 8px 22px; font-size: 1.05rem; }
.nav-group { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-mute); padding: 16px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-dim); font-weight: 500; font-size: 0.92rem; cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover { background: var(--ink-750); color: var(--text); }
.nav-item.active { background: var(--grad-ember-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--ember-500); }
.nav-item .ic { width: 20px; text-align: center; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(16px, 3vw, 34px); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(11, 11, 15, 0.8); backdrop-filter: blur(12px); z-index: 20; }
.topbar h1 { font-size: 1.3rem; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.iconbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--ink-800); display: grid; place-items: center; cursor: pointer; position: relative; }
.iconbtn:hover { background: var(--ink-750); }
.iconbtn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ember-500); border: 2px solid var(--ink-800); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 0.9rem; }

.view { padding: clamp(18px, 3vw, 40px); max-width: 1440px; width: 100%; margin: 0 auto; }
.view.narrow { max-width: 760px; }

/* cards / panels */
.card {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { font-size: 1rem; margin-bottom: 4px; }
.card .muted { color: var(--text-mute); font-size: 0.82rem; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.span2 { grid-column: span 2; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .label { font-size: 0.78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.stat .delta { font-size: 0.82rem; font-weight: 600; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }

.balance-card {
  background: var(--grad-ember); color: #fff; border: 0; position: relative; overflow: hidden;
}
.balance-card::after { content: "\f7f6"; font-family: bootstrap-icons; position: absolute; right: -10px; bottom: -20px; font-size: 8rem; opacity: 0.12; }
.balance-card .value { font-size: 2.3rem; }
.balance-card .label, .balance-card .muted { color: rgba(255,255,255,0.8); }

.acct-pill { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-850); }
.acct-pill .n { font-size: 0.8rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* transactions list */
.txn { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.txn:last-child { border: 0; }
.txn.clickable { cursor: pointer; border-radius: 10px; padding-inline: 8px; transition: background 0.12s ease; }
.txn.clickable:hover { background: var(--ink-800); }
.txn.clickable:focus-visible { outline: 2px solid var(--ember-500); outline-offset: -2px; }
.txn-chev { color: var(--text-mute); font-size: 1.3rem; line-height: 1; padding-left: 2px; }
.txn .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--ink-750); border: 1px solid var(--line); flex-shrink: 0; font-size: 1.05rem; }
.txn .meta { flex: 1; min-width: 0; }
.txn .meta b { font-size: 0.92rem; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn .meta span { font-size: 0.78rem; color: var(--text-mute); }
.txn .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.credit { color: var(--good); }
.amt.debit { color: var(--text); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.tbl th { text-align: left; padding: 12px 14px; color: var(--text-mute); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); }
table.tbl tr:hover td { background: var(--ink-800); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* tabs */
.tabs { display: flex; gap: 4px; background: var(--ink-800); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 22px; width: fit-content; max-width: 100%; overflow: auto; }
.tabs button { padding: 9px 16px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--text-dim); white-space: nowrap; }
.tabs button.active { background: var(--grad-ember); color: #fff; }

/* bank card visual */
.bankcard {
  aspect-ratio: 1.586; border-radius: 18px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2a1206, #7a2d0c 60%, #c1440e);
  border: 1px solid rgba(255,255,255,0.14); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
}
.bankcard.frozen { filter: grayscale(0.7) brightness(0.8); }
.bankcard.mc { background: linear-gradient(135deg, #14100c, #2a1c0c 55%, #5b3a12); }
.bankcard::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,199,115,0.5), transparent 70%); top: -80px; right: -60px; }
.bankcard .num { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; }
.bankcard .brand-row { display: flex; justify-content: space-between; align-items: center; }
.bankcard .foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.9; }
.net-visa { font-family: var(--font-display); font-weight: 800; font-style: italic; letter-spacing: 0.06em; font-size: 0.95rem; opacity: 1; }
.net-mc { position: relative; display: inline-flex; width: 40px; height: 24px; }
.net-mc i { position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; }
.net-mc i:first-child { left: 0; background: #eb601d; }
.net-mc i:last-child { right: 0; background: #f5a623; mix-blend-mode: screen; }

.progress { height: 8px; border-radius: 999px; background: var(--ink-700); overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; background: var(--grad-ember); border-radius: 999px; }

.product {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--ink-850);
  display: flex; flex-direction: column; gap: 8px; transition: border-color .15s ease, transform .15s ease;
}
.product:hover { border-color: var(--ember-600); transform: translateY(-3px); }
.product .apr { font-family: var(--font-display); font-size: 1.5rem; color: var(--ember-400); }

.empty { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty .big { font-size: 2.4rem; margin-bottom: 10px; }

/* modal / drawer */
.modal-back { position: fixed; inset: 0; background: rgba(5,5,8,0.72); backdrop-filter: blur(4px); z-index: 500; display: grid; place-items: center; padding: 20px; animation: toastIn .18s ease; }
.modal { background: var(--ink-800); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); width: 100%; max-width: 460px; padding: 26px; max-height: 90svh; overflow: auto; }
.modal h3 { font-size: 1.25rem; margin-bottom: 4px; }
.modal .close { float: right; background: none; border: 0; color: var(--text-mute); font-size: 1.3rem; cursor: pointer; }
.drawer-back { position: fixed; inset: 0; background: rgba(5,5,8,0.6); z-index: 400; }
.drawer { position: fixed; top: 0; right: 0; height: 100svh; width: min(520px, 94vw); background: var(--ink-850); border-left: 1px solid var(--line-strong); z-index: 401; overflow: auto; padding: 26px; animation: drawerIn .22s ease; }
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.kv:last-child { border: 0; }
.kv span { color: var(--text-mute); }

.skeleton { background: linear-gradient(90deg, var(--ink-800), var(--ink-700), var(--ink-800)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

.pulse-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background: var(--good); box-shadow: 0 0 0 0 rgba(53,201,138,.6); animation: pd 2s infinite; }
@keyframes pd { 70% { box-shadow: 0 0 0 8px rgba(53,201,138,0); } }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .nav-links { display: none; }   /* section anchors — freed up for the language switcher on small screens */
}
@media (max-width: 1080px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; padding: clamp(104px, 13vh, 140px) clamp(20px, 5.5vw, 60px) 60px; }
  .hero-visual { justify-self: start; width: min(400px, 100%); padding: 20px 0 20px 44px; }
  .hero-copy { max-width: none; }
  .scroll-cue { display: none; }
}
@media (max-width: 1024px) {
  .split, .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero-visual { padding-left: 30px; }
  .bal-card { width: 190px; padding: 13px; top: 40%; }
  .bal-amt { font-size: 1.5rem; }
  .hero h1 { font-size: clamp(2.2rem, 9.5vw, 3rem); }
  .hero-grid { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav { padding: 12px 18px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row;
    z-index: 100; padding: 8px; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto;
  }
  .sidebar .brand, .nav-group, .sidebar-foot { display: none; }
  .sidebar .nav-scroll { display: flex; gap: 4px; }
  .nav-item { flex-direction: column; gap: 4px; font-size: 0.68rem; padding: 8px 12px; }
  .nav-item.active { box-shadow: inset 0 2px 0 var(--ember-500); }
  .main { padding-bottom: 74px; }
  .g2, .g3, .g4, .span2 { grid-template-columns: 1fr; grid-column: auto; }
  .row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-cta .lang-select { max-width: 46px; padding: 7px 6px 7px 26px; color: transparent; }
  .nav-cta .lang-select:focus { color: var(--text); }
}
@media (max-width: 520px) {
  .hero-stats { gap: 22px 30px; }
  .foot-grid { grid-template-columns: 1fr; }
  .nav .brand { font-size: 1rem; }
  .nav .brand .mark { width: 30px; height: 30px; }
  .nav-cta .btn-ghost { display: none; }
}

/* loans */
.loan-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 8px 0 12px; border-radius: 10px; background: var(--ink-850); border: 1px solid var(--line); font-size: .85rem; }
.loan-note.warn { border-color: rgba(244,162,89,.5); background: rgba(244,162,89,.08); }
.loan-note.good { border-color: rgba(60,190,120,.45); background: rgba(60,190,120,.08); }

/* ---------- phones ---------- */
html, body { overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
@media (max-width: 520px) {
  .nav { padding: 10px 14px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { padding: 9px 13px; font-size: 0.8rem; white-space: nowrap; }
  .nav .brand { font-size: 0.92rem; gap: 6px; }
  .nav .brand .mark { width: 26px; height: 26px; }
  .modal-back { padding: 12px; align-items: end; }
  .modal { padding: 20px 16px; max-height: 92svh; border-radius: 18px; }
  .drawer { width: 100vw; padding: 18px 14px; }
  .card { padding: 16px; }
  .view { padding-left: 14px; padding-right: 14px; }
  .input, .select, input, select, textarea { font-size: 16px; }   /* stops iOS zooming into fields */
  .btn { min-height: 42px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs button { white-space: nowrap; }
  .tbl-wrap { margin-left: -4px; margin-right: -4px; }
  .tbl th, .tbl td { padding: 10px 10px; font-size: 0.8rem; white-space: nowrap; }
  .toast-host, #toast-host { left: 12px; right: 12px; }
  .txn .meta span { overflow-wrap: anywhere; }
  .loan-note .btn { width: 100%; }
}
@media (max-width: 380px) {
  .nav .brand { font-size: 0.85rem; }
  .nav-cta .btn { padding: 8px 10px; font-size: 0.76rem; }
  .hero h1 { font-size: 2rem; }
}
@media (max-width: 560px) {
  .hero-visual { padding: 8px 0 0; width: 100%; }
  .bal-card { position: relative; left: auto; top: auto; width: auto; margin: -22px 14px 0; }
  .fx-amount { font-size: 1.6rem; }
}
.kv { flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.kv b { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g4 .card { padding: 14px; }
  .stat .value { font-size: 1.35rem; overflow-wrap: anywhere; }
  .topbar h1 { font-size: 1.15rem; }
}

.countdown { font-size: .78rem; color: var(--good); font-variant-numeric: tabular-nums; margin-top: 3px; }
.countdown.late { color: var(--bad, #ff6b6b); font-weight: 700; }
.loan-plan { margin: 10px 0 14px; }
/* keep the live-chat bubble above the phone bottom menu */
@media (max-width: 860px) {
  body:has(.sidebar) jdiv[class*="_orientation"] { bottom: 76px !important; }
}
@media (max-width: 520px) {
  .stat .value { font-size: 1.15rem; overflow-wrap: normal; word-break: keep-all; }
  .bal-hero .amount, .hero-balance { overflow-wrap: normal; }
}
@media (max-width: 860px) {
  .g4 > .span2, .g4 > .balance-card { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .stat .value { word-break: normal; overflow-wrap: normal; white-space: normal; }
}

/* ---------- figures on phones: scale with the card so amounts stay on one line ---------- */
@media (max-width: 860px) {
  .stat { container-type: inline-size; }
  .stat .value, .stat .value.big { font-size: clamp(0.85rem, 8.4cqw, 1.6rem); white-space: nowrap; overflow-wrap: normal; word-break: normal; }
  .balance-card .value { font-size: clamp(1rem, 9cqw, 2.1rem); }
  .txn .amt { font-size: clamp(0.8rem, 3.9vw, 0.95rem); }
  .txn .muted { overflow-wrap: anywhere; }
  .fx-amount { font-size: clamp(1.2rem, 7vw, 1.6rem); white-space: nowrap; }
  .bal-amt { font-size: clamp(1.1rem, 6.4vw, 1.5rem); white-space: nowrap; }
  .hero-stats .s b { font-size: clamp(1.1rem, 5.4vw, 1.5rem); }
}
@media (max-width: 520px) {
  .grid.stats-wide { grid-template-columns: 1fr; }
  .stat .value { font-size: clamp(0.85rem, 8.4cqw, 1.6rem); }
}
@media (max-width: 520px) {
  .acct-pill { flex-wrap: wrap; gap: 4px 12px; }
  .acct-pill > b { white-space: nowrap; margin-left: auto; font-size: clamp(0.85rem, 4.4vw, 1rem); }
}
@media (max-width: 860px) {
  .stat .value { font-size: clamp(0.9rem, 9.4cqw, 1.6rem); }
}

/* ---------- readable text on phones: nothing below ~13px, long names wrap instead of being cut ---------- */
@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-size: 16px; line-height: 1.55; }
  .hint, .field-label { font-size: 0.86rem; }
  .muted { font-size: 0.875rem; }
  .stat .label { font-size: 0.84rem; letter-spacing: 0.05em; }
  .txn .meta b { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
  .txn .meta span { font-size: 0.86rem; }
  .chip { font-size: 0.8rem; }
  table.tbl { font-size: 0.94rem; }
  table.tbl th { font-size: 0.8rem; }
  .nav-item { font-size: 0.75rem; }
  .fx-tag, .fx-split span { font-size: 0.8rem; }
  .bankcard .foot { font-size: 0.82rem; }
  .countdown { font-size: 0.86rem; }
  .nav-cta .btn { font-size: 0.82rem; }
  [style*="font-size: 0.6"], [style*="font-size: 0.7"] { font-size: 0.86rem !important; }
  [style*="font-size: 0.8rem"] { font-size: 0.875rem !important; }
}

/* loan table: stack each loan into labelled lines on phones so nothing needs sideways scrolling */
@media (max-width: 620px) {
  table.tbl.stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .tbl-wrap:has(.stack) { overflow-x: visible; border: 0; }
  .stack tr { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; background: var(--ink-850); }
  .stack td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 7px 0; border: 0; text-align: right; min-width: 0 !important; white-space: normal; }
  .stack td::before { content: attr(data-label); color: var(--text-mute); font-size: 0.86rem; text-align: left; flex-shrink: 0; }
  .stack td:first-child { display: block; text-align: left; }
  .stack td:first-child::before { content: none; }
  .stack td:last-child { justify-content: flex-end; padding-top: 10px; }
  .stack td:last-child:empty { display: none; }
}

/* bootstrap icons */
.bi { line-height: 1; }
.mark { color: #fff; }
.mark .bi { font-size: 1.05em; }
@media (max-width: 860px) {
  .nav-item .ic { font-size: 1.25rem; line-height: 1; }
}

/* admin: compose messages */
.pick-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-850); }
.pick-row { display: flex; gap: 12px; align-items: center; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: var(--ink-800); }
.pick-row input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ember-500); }
.msg-preview { margin-top: 12px; }
.msg-note { padding: 12px 14px; border-radius: 12px; background: var(--ink-850); border: 1px solid var(--line); font-size: .9rem; }
.msg-note.success { border-color: rgba(60,190,120,.5); }
.msg-note.warning { border-color: rgba(244,162,89,.55); }
.notif.success { border-left: 3px solid var(--good); }
.notif.warning { border-left: 3px solid var(--gold); }

/* ---------- pop-up alerts (admin messages), styled by type ---------- */
.alert-back { position: fixed; inset: 0; z-index: 700; display: grid; place-items: center; padding: 20px; background: rgba(5, 5, 8, 0.78); backdrop-filter: blur(5px); animation: toastIn .2s ease; }
.alert-open { overflow: hidden; }
.alert-box { width: 100%; max-width: 480px; border-radius: 20px; background: var(--ink-800); border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: alertIn .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes alertIn { from { transform: translateY(18px) scale(.96); opacity: 0; } }
.alert-head { display: flex; gap: 14px; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.alert-ic { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; }
.alert-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.alert-head h3 { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.alert-body { padding: 18px 22px; font-size: 1rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 45vh; overflow: auto; }
.alert-foot { padding: 14px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.alert-meta { font-size: .82rem; color: var(--text-mute); }
.alert-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.alert-box.info { border-top: 5px solid #5aa9ff; }
.alert-box.info .alert-head { background: linear-gradient(180deg, rgba(90, 169, 255, .14), transparent); }
.alert-box.info .alert-ic { background: rgba(90, 169, 255, .16); color: #9fcaff; }
.alert-box.info .alert-kicker { color: #9fcaff; }
.alert-box.success { border-top: 5px solid var(--good); }
.alert-box.success .alert-head { background: linear-gradient(180deg, rgba(53, 201, 138, .16), transparent); }
.alert-box.success .alert-ic { background: rgba(53, 201, 138, .18); color: #6fe0b3; }
.alert-box.success .alert-kicker { color: #6fe0b3; }
.alert-box.warning { border: 1px solid rgba(255, 176, 32, .55); border-top: 6px solid var(--gold); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 4px rgba(255, 176, 32, .12); }
.alert-box.warning .alert-head { background: linear-gradient(180deg, rgba(255, 176, 32, .22), transparent); }
.alert-box.warning .alert-ic { background: rgba(255, 176, 32, .2); color: var(--gold); animation: alertPulse 1.8s ease-in-out infinite; }
.alert-box.warning .alert-kicker { color: var(--gold); }
@keyframes alertPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 176, 32, .5); } 50% { transform: scale(1.07); box-shadow: 0 0 0 10px rgba(255, 176, 32, 0); } }
.alert-banners { display: flex; flex-direction: column; gap: 10px; }
.alert-banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(255, 176, 32, .12); border: 1px solid rgba(255, 176, 32, .5); color: var(--text); margin-top: 6px; }
.alert-banner > .bi { color: var(--gold); font-size: 1.3rem; flex-shrink: 0; }
.alert-banner-text { font-size: .86rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popup-opt { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 4px; cursor: pointer; }
.popup-opt input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ember-500); }
@media (max-width: 520px) {
  .alert-back { align-items: end; padding: 0; }
  .alert-box { max-width: none; border-radius: 22px 22px 0 0; animation: alertSheet .3s ease; }
  .alert-actions .btn { flex: 1 1 140px; }
}
@keyframes alertSheet { from { transform: translateY(40px); opacity: 0; } }
body.alert-open jdiv { visibility: hidden !important; }

/* ---------- logo ---------- */
.brand .mark { background: #fff; padding: 4px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6); }
.brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-tile { background: #fff; border-radius: 18px; padding: 14px 18px; display: inline-block; box-shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.6); }
.logo-tile img { display: block; width: 190px; max-width: 60vw; height: auto; }
.auth-aside .logo-tile { position: relative; z-index: 2; align-self: flex-start; }

.pop-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pop-row:last-child { border-bottom: 0; }

/* logo: transparent artwork, no tile */
.brand .mark { background: none; padding: 0; box-shadow: none; width: auto; height: 38px; border-radius: 0; display: flex; align-items: center; }
.brand .mark img { height: 100%; width: auto; max-width: none; object-fit: contain; }
.logo-tile { background: none; padding: 0; box-shadow: none; border-radius: 0; }
.logo-tile img { width: 230px; max-width: 70vw; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.45)); }
@media (max-width: 520px) { .nav .brand .mark, .sidebar .brand .mark { height: 32px; width: auto; } }

/* shown only where the sidebar footer (sign-out, language) is hidden */
.phone-only { display: none; }
@media (max-width: 860px) { .phone-only { display: block; } }

/* transaction detail: who the money came from and where it went */
.parties { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.party { min-width: 0; }
.party-k { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.party-n { font-weight: 700; overflow-wrap: anywhere; }
.party-s { font-size: 0.74rem; color: var(--text-dim); overflow-wrap: anywhere; margin-top: 2px; }
.party-arrow { color: var(--ember-400); font-size: 1.1rem; }
@media (max-width: 560px) { .parties { grid-template-columns: 1fr; } .party-arrow { transform: rotate(90deg); justify-self: center; } }

/* account switcher */
.iconbtn.acct-switch { position: relative; }
.iconbtn.acct-switch.multi::after { content: ''; position: absolute; right: 7px; bottom: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ember-500); box-shadow: 0 0 0 2px var(--ink-900, #0b0a12); }
.acct-panel { position: fixed; z-index: 300; width: min(360px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 16px;
  background: var(--ink-850, #14121f); border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75); }
.acct-panel-h { padding: 6px 10px 8px; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.acct-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.acct-opt:hover, .acct-opt:focus-visible { background: rgba(255, 255, 255, 0.05); outline: none; }
.acct-opt.on { background: rgba(245, 130, 46, 0.12); box-shadow: inset 0 0 0 1px rgba(245, 130, 46, 0.35); }
.acct-opt .ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: var(--ember-400); }
.acct-opt .meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.acct-opt .meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-opt .meta span { font-size: 0.72rem; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-opt .bal { font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.acct-opt .tick { color: var(--ember-400); }
.acct-add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ember-400); cursor: pointer; font: inherit; font-weight: 600; }
.acct-add:hover { background: rgba(245, 130, 46, 0.08); }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.mine-k { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); margin-right: 2px; }
.mine-chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: inherit; font: inherit; font-size: 0.78rem; cursor: pointer; }
.mine-chip:hover { border-color: var(--ember-500); background: rgba(245, 130, 46, 0.1); }

/* narrow phones: keep the page title from running into the header buttons */
@media (max-width: 420px) {
  .topbar h1 { font-size: 1.15rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .actions { gap: 6px; flex-shrink: 0; }
  .topbar .actions .btn-sm { padding: 7px 11px; font-size: 0.78rem; }
}

/* account states: frozen = view only, suspended = no access */
.status-banner { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; font-size: 0.86rem; line-height: 1.45; }
.status-banner > i { font-size: 1.15rem; margin-top: 1px; flex: none; }
.status-banner b { display: block; margin-bottom: 2px; }
.status-banner.frozen { background: rgba(87, 170, 255, 0.1); border: 1px solid rgba(87, 170, 255, 0.4); color: #cfe6ff; }
.status-banner.frozen > i { color: #6db6ff; }
.balance-card { position: relative; }
.balance-card.is-frozen { box-shadow: inset 0 0 0 2px rgba(120, 190, 255, 0.55); }
.frozen-tag { position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(10, 30, 60, 0.7); color: #bfe0ff; border: 1px solid rgba(150, 205, 255, 0.6); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.frozen-note { display: block; margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: #e6f3ff; }
.btn.is-disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; filter: grayscale(0.4); }
.acct-notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 92, 115, 0.1); border: 1px solid rgba(255, 92, 115, 0.45); }
.acct-notice > i { font-size: 1.4rem; color: #ff6b81; flex: none; margin-top: 2px; }
.acct-notice b { display: block; margin-bottom: 4px; }
.acct-notice p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--text-dim); }

/* support messages: customer box + admin conversation */
.status-banner-btn { flex: none; align-self: center; background: rgba(120, 190, 255, 0.18); color: #e6f3ff; border: 1px solid rgba(150, 205, 255, 0.5); }
.sup-host { margin-top: 16px; }
.sup-box { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, 0.03); }
.sup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sup-head > i { color: var(--ember-400); }
.sup-status:empty { display: none; }
.sup-status { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; font-size: 0.84rem; line-height: 1.4; }
.sup-status.ok { background: rgba(66, 214, 139, 0.12); border: 1px solid rgba(66, 214, 139, 0.4); color: #bff3d9; }
.sup-status.warn { background: rgba(255, 190, 70, 0.1); border: 1px solid rgba(255, 190, 70, 0.4); }
.sup-list-msgs { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 8px; }
.sup-empty { padding: 14px 4px; font-size: 0.84rem; color: var(--text-dim); line-height: 1.5; }
.sup-msg { max-width: 88%; padding: 8px 11px; border-radius: 14px; font-size: 0.86rem; line-height: 1.45; overflow-wrap: anywhere; }
.sup-msg.mine { align-self: flex-end; background: rgba(245, 130, 46, 0.16); border: 1px solid rgba(245, 130, 46, 0.35); }
.sup-msg.theirs { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.sup-who { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 3px; color: var(--text-dim); }
.sup-who span { font-weight: 400; color: var(--text-mute); }
.sup-body { white-space: pre-wrap; }
.sup-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sup-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: rgba(255, 255, 255, 0.05); }
.sup-compose { margin-top: 8px; }
.sup-compose textarea { width: 100%; resize: vertical; min-height: 56px; }
.sup-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sup-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sup-strip:empty { display: none; }
.sup-chip { position: relative; width: 64px; height: 52px; }
.sup-chip img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.sup-chip button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ff5c73; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; font-size: 0.8rem; }
.sup-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.sup-threads { padding: 6px; max-height: 70vh; overflow-y: auto; }
.sup-row { display: flex; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; align-items: flex-start; }
.sup-row:hover { background: rgba(255, 255, 255, 0.05); }
.sup-row.on { background: rgba(245, 130, 46, 0.12); box-shadow: inset 0 0 0 1px rgba(245, 130, 46, 0.35); }
.sup-row .meta { min-width: 0; flex: 1; }
.sup-row .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row .meta span { display: block; font-size: 0.76rem; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-pane { padding: 14px; }
.sup-pane .sup-list-msgs { max-height: 50vh; min-height: 140px; }
.sup-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 860px) { .sup-layout { grid-template-columns: 1fr; } .sup-threads { max-height: 240px; } }
