/* Swiss Private EG Bank — shared design system (light) */

:root {
  --bg: #f4f5f7;
  --bg-2: #eceff3;
  --card: #ffffff;
  --accent: #0b3d6e;
  --accent-2: #10467f;
  --accent-bright: #1a5a96;
  --accent-soft: rgba(11, 61, 110, 0.08);
  --text: #1c2430;
  --muted: #5c6b7d;
  --green: #147a4c;
  --green-soft: rgba(20, 122, 76, 0.1);
  --red: #b3352b;
  --red-soft: rgba(179, 53, 43, 0.09);
  --amber: #8a6d1f;
  --amber-soft: rgba(138, 109, 31, 0.12);
  --border: #dde3ea;
  --border-strong: #c3cdd9;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.07), 0 4px 14px rgba(16, 24, 40, 0.05);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 15px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }

img, svg { display: block; }

::selection { background: rgba(11, 61, 110, 0.18); }

/* ---------------- logo ---------------- */
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; flex: none; }
.logo-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.logo-name small { display: block; font-size: 0.62rem; font-weight: 500; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--text);
  background: var(--bg-2);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }

.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--accent-2); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

.btn-danger { background: #fff; color: var(--red); border-color: rgba(179, 53, 43, 0.4); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); }

.btn-success { background: #fff; color: var(--green); border-color: rgba(20, 122, 76, 0.4); }
.btn-success:hover:not(:disabled) { background: var(--green-soft); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------------- forms ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 15px; }
.field label { font-size: 0.76rem; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 61, 110, 0.12);
}
.field input::placeholder { color: #9aa6b4; }
.field select option { background: #fff; color: var(--text); }
.field .hint { font-size: 0.75rem; color: var(--muted); }

input[type='range'] { accent-color: var(--accent); padding: 0; }

.form-error {
  background: var(--red-soft);
  border: 1px solid rgba(179, 53, 43, 0.35);
  color: var(--red);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}
.form-error.show { display: block; }

/* ---------------- cards ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-accent { border-top: 3px solid var(--accent); }

.section-title { font-size: 1rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title .sub { font-size: 0.78rem; color: var(--muted); font-weight: 500; }

/* ---------------- badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-completed { background: var(--green-soft); color: var(--green); }
.badge-rejected { background: var(--red-soft); color: var(--red); }
.badge-blocked { background: var(--red-soft); color: var(--red); }
.badge-neutral { background: var(--bg-2); color: var(--muted); }

/* ---------------- toast ---------------- */
#toasts {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.14);
  animation: toast-in 0.25s ease;
}
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error { border-left-color: var(--red); }
.toast.hide { opacity: 0; transform: translateX(20px); transition: all 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------------- landing ---------------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px clamp(16px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topnav .nav-links { display: flex; gap: 26px; }
.topnav .nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.topnav .nav-links a:hover { color: var(--accent); text-decoration: none; }
.topnav .nav-actions { display: flex; gap: 10px; align-items: center; }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) clamp(16px, 5vw, 64px) clamp(36px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 14px 0 18px; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.05rem; max-width: 52ch; margin-bottom: 28px; }
.hero .eyebrow { color: var(--accent-2); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.hero-card .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .row .v { font-weight: 700; }
.hero-card .big { font-size: 1.7rem; font-weight: 800; color: var(--accent); }

.hero-promo-head { font-weight: 700; font-size: 0.95rem; color: var(--accent); margin-bottom: 6px; }
.hero-promo-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.hero-promo-item:last-child { border-bottom: 0; }
.hero-promo-item small { display: block; color: var(--muted); font-size: 0.78rem; }
.hero-promo-icon {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}

.section { max-width: 1180px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) clamp(16px, 5vw, 64px); }
.section .eyebrow { color: var(--accent-2); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.section h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: 10px 0 8px; }
.section .lead { color: var(--muted); max-width: 64ch; margin-bottom: 28px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature-card { transition: box-shadow 0.2s, border-color 0.2s; }
.feature-card:hover { border-color: var(--border-strong); box-shadow: 0 6px 22px rgba(16, 24, 40, 0.09); }
.feature-card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }
.feature-card .rate { margin-top: 10px; font-size: 0.82rem; color: var(--accent-2); font-weight: 600; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  background: var(--accent);
  border-radius: 14px;
  padding: 30px clamp(18px, 4vw, 44px);
  color: #fff;
}
.stats-strip .stat .num { font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 800; color: #fff; }
.stats-strip .stat .lbl { color: rgba(255, 255, 255, 0.72); font-size: 0.84rem; }

.security-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.security-list li {
  list-style: none; display: flex; gap: 12px; align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  color: var(--muted); font-size: 0.9rem;
}
.security-list li svg { flex: none; color: var(--accent); margin-top: 2px; }
.security-list li strong { color: var(--text); display: block; margin-bottom: 2px; }

.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 40px;
  padding: 40px clamp(16px, 5vw, 64px) 30px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer .cols { display: flex; flex-wrap: wrap; gap: 36px; max-width: 1180px; margin: 0 auto 26px; }
.footer .col h4 { color: var(--text); font-size: 0.9rem; margin-bottom: 10px; }
.footer .col a { display: block; color: var(--muted); margin-bottom: 6px; font-size: 0.85rem; }
.footer .legal { max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------------- auth view (login/register) ---------------- */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.auth-switch { margin-top: 16px; font-size: 0.86rem; color: var(--muted); text-align: center; }

/* ---------------- e-banking app ---------------- */
.app-header {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(14px, 4vw, 40px);
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.app-header .user-chip { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.app-header .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.78rem;
}

.app-shell { display: grid; grid-template-columns: 230px 1fr; max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 56px); }

.side-nav {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 22px 12px;
  display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px);
}
.nav-btn {
  display: flex; align-items: center; gap: 12px;
  font: inherit; font-size: 0.9rem; font-weight: 500;
  color: var(--muted);
  background: none; border: 0; border-radius: 8px;
  padding: 10px 13px; cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-btn svg { flex: none; }
.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.view { padding: clamp(18px, 3vw, 34px); max-width: 980px; width: 100%; }
.view h2.view-title { font-size: 1.35rem; margin-bottom: 4px; }
.view .view-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 22px; }

.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(16, 24, 40, 0.06);
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
}
.bottom-nav .nav-btn { flex: 1; flex-direction: column; gap: 3px; font-size: 0.62rem; padding: 6px 2px; border-radius: 8px; align-items: center; }

.balance-hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, #0a3055 100%);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 20px;
  color: #fff;
}
.balance-hero .lbl { color: rgba(255, 255, 255, 0.7); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; }
.balance-hero .amount { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.02em; }
.balance-hero .greeting { color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; }
.balance-hero .hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.eye-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s;
}
.eye-btn:hover { background: rgba(255, 255, 255, 0.24); }

.account-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  margin-bottom: 22px;
  scrollbar-width: thin;
}
.account-scroll .account-card { min-width: min(300px, 84vw); scroll-snap-align: start; margin-bottom: 0; }

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.account-card { position: relative; }
.account-card .type { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.account-card .iban-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; color: var(--muted); font-size: 0.8rem; font-family: 'SFMono-Regular', Consolas, monospace; }
.account-card .iban-row button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 3px; border-radius: 6px; display: grid; place-items: center; }
.account-card .iban-row button:hover { color: var(--accent); background: var(--accent-soft); }
.account-card .bal { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.tx-list { display: flex; flex-direction: column; }
.tx-date-head {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 6px 6px;
  border-bottom: 1px solid var(--border);
}
.tx-date-head:first-child { padding-top: 4px; }
.tx-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border);
}
.tx-row:last-child { border-bottom: 0; }
.tx-icon {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-2); color: var(--muted);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.02em;
}
.tx-icon.in { color: var(--green); background: var(--green-soft); }
.tx-icon.out { color: var(--red); background: var(--red-soft); }
.tx-main { flex: 1; min-width: 0; }
.tx-main .desc { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main .meta { font-size: 0.76rem; color: var(--muted); }
.tx-amt { font-weight: 700; font-size: 0.92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-amt.in { color: var(--green); }
.tx-amt.rejected { text-decoration: line-through; color: var(--muted); }
.tx-row .tx-cancel { flex: none; }
.tx-row .desc .badge { margin-left: 6px; vertical-align: 1px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filter-bar input[type='search'] {
  flex: 1; min-width: 180px;
  font: inherit; color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 9px 13px; outline: none;
}
.filter-bar input[type='search']:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 61, 110, 0.12); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.seg button {
  font: inherit; font-size: 0.8rem; font-weight: 600;
  background: none; border: 0; color: var(--muted);
  padding: 6px 13px; border-radius: 6px; cursor: pointer;
}
.seg button.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  font-size: 0.74rem; font-weight: 600;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 4px 12px; cursor: pointer; color: var(--muted);
  background: #fff; font-family: inherit;
}
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---------------- transfer steps ---------------- */
.review-rows { margin: 4px 0 18px; }
.receipt { text-align: center; padding: 10px 0 4px; min-width: 0; }
.receipt .check {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center;
}
.receipt .check.pending { background: var(--amber-soft); color: var(--amber); }
.receipt .receipt-note {
  color: var(--muted); font-size: 0.86rem;
  max-width: 44ch; margin: 0 auto 16px;
}
.receipt h3 { font-size: 1.15rem; margin-bottom: 4px; }
.receipt .amount {
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 800; color: var(--accent); margin: 10px 0 2px;
  overflow-wrap: anywhere; word-break: break-word;
}
.receipt .to { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; overflow-wrap: anywhere; }
.receipt .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------------- bank card visual ---------------- */
.bank-card {
  position: relative;
  width: 100%; max-width: 380px; aspect-ratio: 1.62;
  border-radius: 16px;
  padding: 22px 24px;
  background:
    radial-gradient(300px 200px at 90% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(135deg, #10467f 0%, #0b3d6e 45%, #071f3a 100%);
  border: 1px solid #0a3055;
  box-shadow: 0 10px 26px rgba(11, 61, 110, 0.35);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.bank-card.frozen { filter: grayscale(0.75); opacity: 0.75; }
.bank-card .bc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.bank-card .bc-brand { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); font-weight: 700; }
.bank-card .bc-frozen-tag { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; color: #ffb4ad; border: 1px solid rgba(255, 180, 173, 0.7); padding: 2px 8px; border-radius: 999px; }
.bank-card .chip {
  width: 46px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #d8dee6, #aab6c4);
  position: relative; margin: 4px 0;
}
.bank-card .chip::before, .bank-card .chip::after {
  content: ''; position: absolute; left: 6px; right: 6px; height: 1px;
  background: rgba(28, 36, 48, 0.45);
}
.bank-card .chip::before { top: 11px; }
.bank-card .chip::after { bottom: 11px; }
.bank-card .bc-number { font-family: Consolas, monospace; font-size: clamp(1rem, 4.4vw, 1.25rem); letter-spacing: 0.08em; }
.bank-card .bc-bottom { display: flex; justify-content: space-between; font-size: 0.76rem; color: rgba(255, 255, 255, 0.65); }
.bank-card .bc-bottom .v { color: #fff; font-weight: 600; display: block; font-size: 0.85rem; }

.cards-layout { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 22px; align-items: start; }

.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; gap: 12px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row .k { color: var(--muted); flex: none; }
.detail-row .v { font-weight: 600; font-family: Consolas, monospace; text-align: right; }
.detail-row .v button { margin-left: 8px; }

/* ---------------- loans ---------------- */
.loan-card .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.loan-card .head h3 { font-size: 1.02rem; }
.loan-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.loan-figures .f .k { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.loan-figures .f .v { font-weight: 700; font-size: 0.95rem; }
.progress { height: 7px; border-radius: 999px; background: var(--bg-2); margin-top: 14px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; background: var(--accent); }

.loan-preview {
  background: var(--accent-soft);
  border: 1px solid rgba(11, 61, 110, 0.18);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 0.9rem;
  margin: 4px 0 16px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.loan-preview .v { font-weight: 800; color: var(--accent); }

.stack { display: grid; gap: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 34px 16px;
  font-size: 0.9rem;
}
.empty-state svg { margin: 0 auto 10px; color: var(--border-strong); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(11, 61, 110, 0.15); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block; vertical-align: -4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-view { display: grid; place-items: center; min-height: 40vh; color: var(--muted); gap: 10px; }

/* ---------------- admin ---------------- */
.admin-shell { max-width: 1360px; margin: 0 auto; padding: 20px clamp(14px, 3vw, 32px) 60px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { padding: 16px 18px; }
.stat-card .k { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card .v { font-size: 1.35rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.01em; }
.stat-card .v.accent { color: var(--accent); }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }

.admin-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }

.client-list { max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.client-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.client-item:hover { background: var(--bg); }
.client-item.active { background: var(--accent-soft); border-color: rgba(11, 61, 110, 0.25); }
.client-item .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.74rem;
}
.client-item .info { flex: 1; min-width: 0; }
.client-item .info .n { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-item .info .m { font-size: 0.74rem; color: var(--muted); }
.client-item .bal { font-size: 0.82rem; font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { text-align: left; color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .mono { font-family: Consolas, monospace; font-size: 0.8rem; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }

.editor-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.editor-section h3 { font-size: 0.95rem; margin-bottom: 12px; color: var(--accent); }

.balance-edit { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 0.88rem; flex-wrap: wrap; }
.balance-edit .meta { flex: 1; min-width: 140px; }
.balance-edit .meta .t { font-weight: 600; }
.balance-edit .meta .i { color: var(--muted); font-size: 0.74rem; font-family: Consolas, monospace; }
.balance-edit input {
  width: 140px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 10px; outline: none;
}
.balance-edit input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 61, 110, 0.12); }

.pending-loan { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid rgba(11, 61, 110, 0.2); border-radius: 10px; background: var(--accent-soft); margin-bottom: 12px; }
.pending-loan .info .t { font-weight: 700; }
.pending-loan .info .m { font-size: 0.8rem; color: var(--muted); }
.pending-loan .acts { display: flex; gap: 8px; }

.tx-edit { width: 100%; border-top: 1px dashed var(--border); padding-top: 12px; }
.tx-edit .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tx-edit .field { margin-bottom: 0; }
.tx-edit .tx-edit-acts { display: flex; gap: 8px; margin-top: 10px; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .admin-grid { grid-template-columns: 1fr; }
  .client-list { max-height: 300px; }
  .cards-layout { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topnav .nav-links { display: none; }
  .topnav .nav-actions .btn-ghost { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .bottom-nav { display: flex; }
  .view { padding-bottom: 92px; }
  .app-header .user-chip span.name { display: none; }
}
