:root {
  --navy-950: #07111f;
  --navy-900: #101c2c;
  --navy-800: #17283e;
  --navy-700: #263a53;
  --teal-600: #0c8f83;
  --teal-500: #12a594;
  --teal-400: #22c7b5;
  --gold-500: #e1a840;
  --gold-400: #f3bd4b;
  --cream-100: #f7f5ef;
  --cream-50: #fcfbf8;
  --ink: #132238;
  --muted: #667386;
  --surface: #fff;
  --surface-soft: #f4f6f5;
  --surface-raised: #fff;
  --border: #dfe5e3;
  --danger: #c84f55;
  --danger-soft: #fff0f0;
  --success: #0d8c72;
  --warning: #b37b14;
  --shadow-sm: 0 8px 24px rgba(17, 31, 47, .07);
  --shadow-lg: 0 24px 80px rgba(11, 26, 43, .14);
  --sidebar: 264px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --ink: #eef6f4;
  --muted: #a7b7c4;
  --surface: #0e1a29;
  --surface-soft: #132235;
  --surface-raised: #17273a;
  --border: #2a3c50;
  --cream-50: #091421;
  --cream-100: #0d1928;
  --danger-soft: #351d26;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, .22);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--cream-50); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-50);
  font: 400 15px/1.55 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { color: inherit; }
::selection { color: var(--navy-950); background: rgba(34, 199, 181, .34); }
:focus-visible { outline: 3px solid rgba(34, 199, 181, .55); outline-offset: 3px; }
.skip-link {
  position: fixed; z-index: 9999; top: 10px; left: 10px; padding: 10px 14px;
  transform: translateY(-150%); border-radius: 10px; color: #fff; background: var(--navy-900);
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--cream-50); }
.boot-screen img { filter: drop-shadow(0 12px 25px rgba(18, 165, 148, .2)); animation: bootPulse 1.8s var(--ease) infinite; }
.boot-dots { display: flex; gap: 7px; }
.boot-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); animation: dot 1.2s infinite; }
.boot-dots i:nth-child(2) { animation-delay: .15s; }
.boot-dots i:nth-child(3) { animation-delay: .3s; }

.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 13px; cursor: pointer;
  font-weight: 700; transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); box-shadow: 0 9px 24px rgba(12, 143, 131, .22); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(12, 143, 131, .32); }
.btn-gold { color: var(--navy-950); background: linear-gradient(135deg, var(--gold-400), var(--gold-500)); box-shadow: 0 9px 24px rgba(225, 168, 64, .24); }
.btn-secondary { border-color: var(--border); background: var(--surface); }
.btn-secondary:hover { border-color: var(--teal-500); }
.btn-ghost { background: transparent; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-sm { min-height: 36px; padding: 7px 12px; border-radius: 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--border);
  border-radius: 13px; cursor: pointer; color: var(--muted); background: var(--surface);
  transition: color .2s, transform .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--teal-500); border-color: var(--teal-500); transform: translateY(-1px); }

.public-nav {
  position: absolute; z-index: 20; inset: 0 0 auto; height: 88px; display: flex; align-items: center;
}
.public-nav .nav-inner { width: min(1180px, calc(100% - 40px)); margin: auto; display: flex; align-items: center; justify-content: space-between; }
.public-nav .brand img { width: 222px; display: block; }
[data-theme="dark"] .public-nav .brand img,
[data-theme="dark"] .auth-brand img,
[data-theme="dark"] .sidebar-brand img { filter: brightness(0) invert(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-text { padding: 10px 12px; color: var(--navy-700); font-weight: 700; }
[data-theme="dark"] .nav-text { color: var(--ink); }

.hero {
  position: relative; min-height: 760px; overflow: hidden; padding: 164px 20px 90px;
  background:
    radial-gradient(circle at 78% 12%, rgba(34, 199, 181, .19), transparent 30%),
    radial-gradient(circle at 10% 60%, rgba(225, 168, 64, .13), transparent 28%),
    linear-gradient(160deg, var(--cream-50) 0%, var(--cream-100) 100%);
}
.hero::before {
  content: ""; position: absolute; width: 660px; height: 660px; right: -190px; top: -170px; border: 1px solid rgba(18, 165, 148, .14);
  border-radius: 50%; box-shadow: inset 0 0 0 80px rgba(18, 165, 148, .025), inset 0 0 0 160px rgba(18, 165, 148, .02);
}
.hero-grid { position: relative; width: min(1180px, 100%); margin: auto; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 70px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--teal-600);
  font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold-500); }
.hero h1 { max-width: 670px; margin: 0; font-size: clamp(45px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; }
.hero h1 em { color: var(--teal-500); font-style: normal; }
.hero-copy { max-width: 620px; margin: 26px 0 30px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; color: var(--muted); font-size: 13px; }
.hero-proof span { display: flex; align-items: center; gap: 8px; }
.hero-proof i { color: var(--teal-500); }

.trust-orbit { position: relative; width: min(480px, 90vw); aspect-ratio: 1; margin: auto; animation: float 6s var(--ease) infinite; }
.orbit-ring { position: absolute; inset: 8%; border: 1px solid rgba(18, 165, 148, .24); border-radius: 50%; animation: rotate 34s linear infinite; }
.orbit-ring::before, .orbit-ring::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-400); box-shadow: 0 0 20px var(--teal-400); }
.orbit-ring::before { left: 15%; top: 9%; }
.orbit-ring::after { right: 4%; bottom: 25%; background: var(--gold-400); box-shadow: 0 0 20px var(--gold-400); }
.hero-card {
  position: absolute; left: 15%; right: 8%; top: 23%; padding: 27px; border: 1px solid rgba(255,255,255,.3);
  border-radius: 27px; color: #fff; background: linear-gradient(145deg, rgba(16, 28, 44, .97), rgba(23, 50, 68, .97));
  box-shadow: 0 35px 90px rgba(7, 17, 31, .28); transform: rotate(-3deg); backdrop-filter: blur(18px);
}
.hero-card-top { display: flex; justify-content: space-between; align-items: start; }
.mini-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.mini-brand img { width: 39px; }
.signal { color: var(--teal-400); font-size: 12px; }
.balance-label { margin: 31px 0 2px; color: #9eb0c2; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.hero-balance { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.progress { height: 8px; overflow: hidden; margin: 22px 0 13px; border-radius: 99px; background: rgba(255,255,255,.1); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-400), var(--gold-400)); }
.card-meta { display: flex; justify-content: space-between; color: #a9bac8; font-size: 12px; }
.peer-bubble {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.peer-bubble b { display: block; font-size: 13px; }
.peer-bubble small { color: var(--muted); }
.peer-bubble .avatar { width: 38px; height: 38px; }
.peer-one { right: -1%; top: 12%; animation: bob 4s .4s ease-in-out infinite; }
.peer-two { left: 1%; bottom: 9%; animation: bob 4.6s 1s ease-in-out infinite; }

.section { padding: 100px 20px; }
.section-inner { width: min(1180px, 100%); margin: auto; }
.section-heading { max-width: 680px; margin-bottom: 46px; }
.section-heading h2 { margin: 0 0 14px; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 17px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card { position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.value-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -42px; top: -42px; border-radius: 50%; background: rgba(18, 165, 148, .09); transition: transform .4s var(--ease); }
.value-card:hover::after { transform: scale(1.4); }
.value-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: var(--teal-600); background: rgba(18, 165, 148, .11); font-size: 20px; }
.value-card:nth-child(2) .value-icon { color: var(--warning); background: rgba(225, 168, 64, .15); }
.value-card h3 { margin: 22px 0 8px; font-size: 20px; }
.value-card p { margin: 0; color: var(--muted); }
.how-section { color: #f3f7f6; background: var(--navy-900); }
.how-section .section-heading p { color: #aab9c7; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { position: relative; }
.step-no { color: var(--gold-400); font-size: 13px; font-weight: 850; letter-spacing: .13em; }
.step h3 { margin: 14px 0 9px; font-size: 19px; }
.step p { margin: 0; color: #aab9c7; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 72%; right: -20%; top: 10px; border-top: 1px dashed #3d536a; }
.cta-band { position: relative; overflow: hidden; padding: 54px; border-radius: 34px; color: var(--navy-950); background: linear-gradient(135deg, #f4c766, var(--gold-500)); }
.cta-band::after { content: ""; position: absolute; width: 340px; height: 340px; right: -100px; top: -170px; border: 60px solid rgba(255,255,255,.18); border-radius: 50%; }
.cta-band h2 { max-width: 680px; margin: 0 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.04em; }
.cta-band p { max-width: 610px; margin: 0 0 26px; }
.public-footer { padding: 30px 20px 42px; color: var(--muted); background: var(--cream-50); }
.public-footer .section-inner { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); padding-top: 28px; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) 1.1fr; background: var(--surface); }
.auth-form-pane { position: relative; display: flex; flex-direction: column; padding: 34px clamp(28px, 5vw, 76px); }
.auth-brand { display: flex; justify-content: space-between; align-items: center; }
.auth-brand img { width: 210px; }
.auth-form-wrap { width: min(440px, 100%); margin: auto; padding: 45px 0; }
.auth-form-wrap h1 { margin: 0 0 9px; font-size: 38px; line-height: 1.1; letter-spacing: -.04em; }
.auth-form-wrap > p { margin: 0 0 30px; color: var(--muted); }
.auth-visual {
  position: relative; overflow: hidden; display: grid; place-items: center; min-height: 100vh; padding: 50px;
  color: #fff; background:
    radial-gradient(circle at 30% 25%, rgba(34,199,181,.23), transparent 28%),
    radial-gradient(circle at 75% 70%, rgba(225,168,64,.18), transparent 32%),
    var(--navy-950);
}
.auth-visual::before, .auth-visual::after {
  content: ""; position: absolute; width: 540px; height: 540px; border: 1px solid rgba(34,199,181,.14); border-radius: 50%;
}
.auth-visual::before { right: -160px; top: -130px; animation: rotate 34s linear infinite; }
.auth-visual::after { left: -240px; bottom: -250px; border-width: 70px; border-color: rgba(225,168,64,.05); }
.auth-story { position: relative; z-index: 2; width: min(560px, 100%); }
.auth-story h2 { max-width: 510px; margin: 28px 0 14px; font-size: clamp(38px, 5vw, 61px); line-height: 1.02; letter-spacing: -.05em; }
.auth-story > p { max-width: 480px; color: #aebcca; font-size: 17px; }
.economy-scene { position: relative; height: 245px; margin-top: 38px; }
.network-line { position: absolute; height: 1px; transform-origin: left; background: linear-gradient(90deg, rgba(34,199,181,.1), var(--teal-400), rgba(34,199,181,.1)); }
.line-a { width: 76%; left: 10%; top: 48%; transform: rotate(-8deg); }
.line-b { width: 60%; left: 20%; top: 35%; transform: rotate(19deg); }
.line-c { width: 55%; left: 30%; top: 70%; transform: rotate(-25deg); }
.economy-node {
  position: absolute; width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.13);
  border-radius: 22px; color: var(--teal-400); background: rgba(21,39,58,.85); box-shadow: 0 18px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(10px); animation: nodeFloat 5s ease-in-out infinite;
}
.economy-node i { font-size: 23px; }
.node-a { left: 3%; top: 35%; }
.node-b { left: 40%; top: 3%; color: var(--gold-400); animation-delay: .8s; }
.node-c { right: 3%; top: 43%; animation-delay: 1.4s; }
.node-d { left: 46%; bottom: 0; color: var(--gold-400); animation-delay: 2s; }
.coin {
  position: absolute; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--navy-950);
  background: var(--gold-400); font-size: 9px; box-shadow: 0 0 20px rgba(243,189,75,.35); animation: coinTravel 4s linear infinite;
}
.coin-a { left: 14%; top: 42%; }
.coin-b { left: 49%; top: 28%; animation-delay: 1.5s; }
.coin-c { left: 60%; top: 65%; animation-delay: 2.7s; }
.back-link { color: var(--muted); font-weight: 700; }
.back-link:hover { color: var(--teal-500); }
.divider { display: flex; align-items: center; gap: 13px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.oidc-btn { color: var(--ink); background: var(--surface); border-color: var(--border); }
.oidc-badge { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--navy-900); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-weight: 750; font-size: 13px; }
.field-help { color: var(--muted); font-size: 11.5px; }
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap input { padding-left: 43px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--ink); background: var(--surface); transition: border .2s, box-shadow .2s;
}
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18,165,148,.1); }
.form-error { min-height: 21px; margin: 0 0 10px; color: var(--danger); font-size: 13px; }
.auth-switch { margin: 20px 0 0; text-align: center; color: var(--muted); }
.auth-switch a { color: var(--teal-600); font-weight: 750; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); background: var(--surface-soft); transition: grid-template-columns .3s var(--ease); }
.app-shell.sidebar-collapsed { --sidebar: 86px; }
.sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky; z-index: 30; top: 0; height: 100vh; display: flex; flex-direction: column; min-width: 0;
  padding: 24px 16px 18px; border-right: 1px solid var(--border); background: var(--surface);
}
.sidebar-scrim { display: none; }
.sidebar-head { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 4px 18px; }
.sidebar-brand { min-width: 0; flex: 1; overflow: hidden; }
.sidebar-brand img { width: 190px; min-width: 190px; display: block; }
.sidebar-toggle { flex: 0 0 auto; }
.sidebar-nav { display: grid; gap: 5px; margin-top: 16px; }
.nav-item {
  min-height: 46px; display: flex; align-items: center; gap: 13px; padding: 10px 14px; overflow: hidden;
  border-radius: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; transition: color .2s, background .2s;
}
.nav-item i { width: 21px; flex: 0 0 21px; text-align: center; }
.nav-item:hover { color: var(--ink); background: var(--surface-soft); }
.nav-item.active { color: var(--teal-600); background: rgba(18,165,148,.11); }
.sidebar-label { margin: 18px 14px 4px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.sidebar-footer { margin-top: auto; display: grid; gap: 5px; }
.user-chip { display: flex; align-items: center; gap: 11px; margin-top: 10px; padding: 11px; border-top: 1px solid var(--border); }
.user-chip-info { min-width: 0; overflow: hidden; white-space: nowrap; }
.user-chip b { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.user-chip small { color: var(--muted); }
.system-version { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 26px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.system-version i { width: 14px; text-align: center; }
.avatar {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden;
  border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--teal-500), var(--navy-800)); font-weight: 850;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-collapsed .sidebar-brand, .sidebar-collapsed .nav-item span, .sidebar-collapsed .sidebar-label, .sidebar-collapsed .user-chip-info, .sidebar-collapsed .system-version span { opacity: 0; pointer-events: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 10px; }
.sidebar-collapsed .user-chip { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-head { justify-content: center; }
.sidebar-collapsed .sidebar-toggle i { transform: rotate(180deg); }

.app-main {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}
.topbar {
  position: sticky; z-index: 20; top: 0; height: 78px; display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(18px, 3vw, 42px); border-bottom: 1px solid rgba(140,154,164,.16);
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent); backdrop-filter: blur(18px);
}
.mobile-menu { display: none; }
.page-context { min-width: 0; flex: 1; }
.page-context small { display: block; color: var(--muted); }
.page-context b { display: block; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.app-content { padding: 30px clamp(18px, 3vw, 42px) 60px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin: 0 0 5px; font-size: clamp(27px, 4vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-600); background: rgba(18,165,148,.1); }
.stat-value { margin: 17px 0 3px; font-size: clamp(24px, 3vw, 31px); line-height: 1; font-weight: 820; letter-spacing: -.035em; }
.stat-note { color: var(--muted); font-size: 11px; }
.stat-card.warn .stat-icon { color: var(--warning); background: rgba(225,168,64,.14); }
.stat-card.danger .stat-icon { color: var(--danger); background: var(--danger-soft); }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; margin-top: 18px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 17px; }
.panel-body { padding: 22px; }
.cash-visual { position: relative; min-height: 250px; display: grid; align-items: end; overflow: hidden; }
.cash-bars { height: 180px; display: flex; align-items: end; justify-content: space-between; gap: 9px; padding-top: 22px; border-bottom: 1px solid var(--border); }
.cash-bar { position: relative; flex: 1; max-width: 46px; min-width: 12px; height: var(--height); border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--teal-400), var(--teal-600)); animation: growBar .8s var(--ease) both; transform-origin: bottom; }
.cash-bar:nth-child(3n) { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); }
.cash-bar span { position: absolute; left: 50%; bottom: -25px; color: var(--muted); font-size: 10px; transform: translateX(-50%); }
.upcoming-list, .activity-list { display: grid; gap: 4px; }
.upcoming-item, .activity-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.upcoming-item:last-child, .activity-item:last-child { border-bottom: 0; }
.upcoming-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--teal-600); background: rgba(18,165,148,.1); }
.upcoming-info { min-width: 0; flex: 1; }
.upcoming-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.upcoming-info small { color: var(--muted); }
.amount { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-box { position: relative; width: min(360px, 100%); }
.search-box i { position: absolute; left: 14px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.search-box .input { padding-left: 41px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 820px; }
.data-table th, .data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); background: var(--surface-soft); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 62%, transparent); }
.truncate { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-actions { position: sticky; z-index: 2; right: 0; box-shadow: -8px 0 15px rgba(15,31,48,.04); background: var(--surface); }
th.sticky-actions { background: var(--surface-soft); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active { color: var(--success); background: rgba(13,140,114,.11); }
.status-late { color: var(--danger); background: var(--danger-soft); }
.status-paid { color: #376dba; background: rgba(55,109,186,.11); }
.status-draft, .status-cancelled { color: var(--muted); background: var(--surface-soft); }
.status-pending { color: var(--warning); background: rgba(225,168,64,.12); }
.status-proposed { color: #376dba; background: rgba(55,109,186,.11); }
.status-accepted { color: var(--success); background: rgba(13,140,114,.11); }
.status-declined, .status-expired { color: var(--muted); background: var(--surface-soft); }
.trust-stars { color: var(--gold-500); white-space: nowrap; font-size: 11px; }
.empty-state { display: grid; place-items: center; min-height: 340px; padding: 40px; text-align: center; }
.empty-icon { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 24px; color: var(--teal-600); background: rgba(18,165,148,.1); font-size: 27px; }
.empty-state h3 { margin: 20px 0 8px; font-size: 20px; }
.empty-state p { max-width: 430px; margin: 0 0 20px; color: var(--muted); }
.card-list { display: none; }

.circle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.person-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), border-color .25s; }
.person-card:hover { transform: translateY(-4px); border-color: rgba(18,165,148,.5); }
.person-top { display: flex; gap: 13px; align-items: center; }
.person-info { min-width: 0; }
.person-info h3 { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.person-info p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.person-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.person-stat { padding: 11px; border-radius: 11px; background: var(--surface-soft); }
.person-stat small { display: block; color: var(--muted); }
.person-stat b { font-size: 14px; }

.role-grid { display: grid; gap: 14px; }
.role-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.role-card h3 { margin: 0 0 3px; }
.role-meta { color: var(--muted); font-size: 12px; }
.role-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.tag { max-width: 250px; padding: 4px 8px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.system-tag { color: var(--warning); border-color: rgba(225,168,64,.35); background: rgba(225,168,64,.08); }

.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.profile-card { padding: 28px; text-align: center; }
.profile-card .avatar { width: 82px; height: 82px; margin: 0 auto 15px; border-radius: 25px; font-size: 28px; }
.profile-card h2 { margin: 0; }
.profile-card p { margin: 4px 0; color: var(--muted); }
.role-pill { display: inline-flex; margin-top: 12px; padding: 5px 10px; border-radius: 99px; color: var(--teal-600); background: rgba(18,165,148,.11); font-size: 11px; font-weight: 800; }
.security-list { display: grid; gap: 12px; }
.security-row { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.security-row > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-600); background: rgba(18,165,148,.1); }
.security-row div { min-width: 0; flex: 1; }
.security-row b { display: block; }
.security-row small { color: var(--muted); }

.modal-backdrop {
  position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 24px;
  background: rgba(5,14,25,.64); backdrop-filter: blur(8px); animation: fadeIn .2s;
}
.modal { width: min(680px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease); }
.modal-lg { width: min(880px, 100%); }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.modal-head h2 { margin: 0 0 3px; font-size: 22px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 13px; }
.modal-body { padding: 24px; }
.modal-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; padding: 17px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.privilege-groups { display: grid; gap: 18px; }
.privilege-group h4 { margin: 0 0 8px; font-size: 13px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-card { display: flex; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; }
.check-card:hover { border-color: var(--teal-500); }
.check-card input { margin-top: 4px; accent-color: var(--teal-500); }
.check-card b { display: block; font-size: 12px; }
.check-card small { display: block; color: var(--muted); font-size: 10.5px; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(380px, calc(100% - 40px)); }
.toast { display: flex; align-items: start; gap: 11px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); }
.toast i { margin-top: 3px; color: var(--teal-500); }
.toast.error i { color: var(--danger); }
.toast b { display: block; font-size: 13px; }
.toast p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.api-notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(225,168,64,.35); border-radius: 12px; color: var(--warning); background: rgba(225,168,64,.08); font-size: 12px; }
.nav-badge {
  min-width: 21px; height: 21px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 6px;
  border-radius: 99px; color: var(--navy-950); background: var(--gold-400); font-size: 10px; font-weight: 900;
}
.notification-button { position: relative; }
.notification-button > span {
  position: absolute; min-width: 18px; height: 18px; right: -6px; top: -6px; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid var(--surface); border-radius: 99px; color: var(--navy-950);
  background: var(--gold-400); font-size: 9px; font-weight: 900;
}
.notification-button.has-notification, .nav-item.has-notification {
  border-color: rgba(225,168,64,.7); box-shadow: 0 0 0 4px rgba(225,168,64,.1);
}
.notification-button.has-notification i { animation: bellRing 2.5s ease-in-out infinite; }
.request-new { background: linear-gradient(90deg, rgba(225,168,64,.13), rgba(18,165,148,.04)); }
.request-new td:first-child { box-shadow: inset 4px 0 var(--gold-400); }
.request-direction { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.access-live { color: var(--teal-600); font-size: 12px; font-weight: 750; }
.consent-card {
  display: flex; gap: 12px; padding: 16px; border: 1px solid rgba(18,165,148,.35); border-radius: 14px;
  background: rgba(18,165,148,.06); cursor: pointer;
}
.consent-card input { margin-top: 4px; accent-color: var(--teal-500); }
.consent-card b, .consent-card small { display: block; }
.consent-card small { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.request-summary, .dossier-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px;
}
.request-summary > span, .dossier-grid > span {
  min-width: 0; padding: 12px; border-radius: 12px; background: var(--surface-soft);
}
.request-summary small, .dossier-grid small { display: block; color: var(--muted); font-size: 10px; }
.request-summary b, .dossier-grid b { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 13px; }
.dossier-card {
  margin: 18px 0; padding: 18px; border: 1px solid rgba(18,165,148,.3); border-radius: 16px;
  background: linear-gradient(135deg, rgba(18,165,148,.08), transparent);
}
.dossier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.dossier-head > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-600); background: rgba(18,165,148,.12); }
.dossier-head b, .dossier-head small { display: block; }
.dossier-head small { color: var(--muted); }
.dossier-card .dossier-grid { margin-bottom: 0; }
.message-card { display: flex; gap: 11px; margin: 18px 0; padding: 14px; border-left: 3px solid var(--gold-400); border-radius: 0 12px 12px 0; background: var(--surface-soft); }
.message-card i { margin-top: 4px; color: var(--gold-500); }
.message-card p { margin: 0; white-space: pre-wrap; }
.proposal-summary { margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--border); }
.proposal-summary h3, .proposal-form h3, .amortization-head h3 { margin: 0 0 10px; }
.proposal-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.amortization-section { margin-top: 20px; }
.amortization-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.amortization-head h3 { margin-bottom: 2px; }
.amortization-head p { margin: 0; color: var(--muted); font-size: 12px; }
.amortization-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--border); border-radius: 13px; }
.amortization-page .amortization-wrap { max-height: none; overflow-y: visible; }
.amortization-table { min-width: 650px; font-variant-numeric: tabular-nums; font-size: 12px; }
.amortization-table thead { position: sticky; z-index: 1; top: 0; }
.schedule-gap td { text-align: center; color: var(--muted); letter-spacing: .5em; }
.schedule-paid td { background: rgba(13,140,114,.13); }
.schedule-paid td:first-child { box-shadow: inset 4px 0 var(--success); }
.schedule-due td { background: rgba(225,168,64,.16); }
.schedule-due td:first-child { box-shadow: inset 4px 0 var(--gold-500); }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.schedule-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.legend-dot.paid { background: var(--success); }
.legend-dot.due { background: var(--gold-500); }
.action-group { display: flex; gap: 5px; }
.credits-table { min-width: 1180px; }
.mobile-actions-wrap { flex-wrap: wrap; }
.mobile-actions-wrap .btn { flex: 1 1 45%; }
.calendar-nav { display: flex; gap: 7px; }
.calendar-date-form { display: flex; align-items: center; gap: 8px; }
.calendar-date-form .input { width: 170px; }
.calendar-events { display: grid; gap: 10px; }
.calendar-event {
  display: grid; grid-template-columns: 58px 44px 1fr auto; align-items: center; gap: 14px;
  padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface);
}
.calendar-event.collect { border-left: 4px solid var(--teal-500); }
.calendar-event.pay { border-left: 4px solid var(--gold-500); }
.calendar-date { display: grid; justify-items: center; padding: 7px; border-radius: 11px; background: var(--surface-soft); text-transform: capitalize; }
.calendar-date b { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.calendar-date span { font-size: 22px; font-weight: 850; }
.calendar-event-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-600); background: rgba(18,165,148,.1); }
.calendar-event.pay .calendar-event-icon { color: var(--warning); background: rgba(225,168,64,.13); }
.calendar-event-main h3 { margin: 2px 0; font-size: 15px; }
.calendar-event-main p { margin: 0; color: var(--muted); font-size: 11px; }
.event-kind { color: var(--teal-600); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.calendar-event.pay .event-kind { color: var(--warning); }
.calendar-event-amount { display: grid; justify-items: end; gap: 4px; }
.calendar-event-amount > b { font-size: 16px; }
.statement-toolbar { align-items: end; }
.statement-selector { width: min(600px, 100%); margin: 0; }
.statement-current-balance { text-align: right; }
.statement-current-balance small { display: block; color: var(--muted); }
.statement-current-balance b { font-size: 23px; font-variant-numeric: tabular-nums; }
.statement-parties { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 18px; }
.statement-parties span { padding: 16px; border-radius: 14px; background: var(--surface-soft); }
.statement-parties small, .statement-parties b { display: block; }
.statement-parties small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.statement-parties i { color: var(--teal-500); }
.statement-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.statement-table { min-width: 760px; }
.statement-date { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.statement-charge { color: var(--danger); }
.statement-credit { color: var(--success); }
.statement-concept-button { max-width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.statement-concept-button:hover b { color: var(--teal-600); text-decoration: underline; }
.statement-payment-deleted td { opacity: .72; }
.statement-payment-deleted .statement-concept-button b { text-decoration: line-through; }
.loan-detail-hero { padding: 24px; }
.loan-detail-summary { display: flex; align-items: start; justify-content: space-between; gap: 22px; }
.loan-detail-summary h2 { margin: 3px 0; font-size: clamp(25px, 4vw, 38px); }
.loan-detail-summary p { margin: 0; color: var(--muted); }
.loan-detail-status { display: grid; justify-items: end; gap: 7px; }
.loan-detail-status small { color: var(--muted); font-weight: 700; }
.loan-action-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.loan-detail-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 18px; margin-top: 18px; }
.loan-timeline-panel { grid-column: 1 / -1; }
.loan-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.loan-fact { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px; border-radius: 13px; background: var(--surface-soft); }
.loan-fact > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; color: var(--teal-600); background: rgba(18,165,148,.11); }
.loan-fact small, .loan-fact b { display: block; }
.loan-fact small { color: var(--muted); font-size: 10px; }
.loan-fact b { margin-top: 2px; overflow-wrap: anywhere; }
.loan-parties { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 13px; }
.loan-parties > div { min-width: 0; padding: 14px; border-radius: 13px; background: var(--surface-soft); }
.loan-parties small, .loan-parties b, .loan-parties span { display: block; }
.loan-parties small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.loan-parties b { margin: 3px 0; overflow-wrap: anywhere; }
.loan-parties span { color: var(--muted); font-size: 11px; }
.loan-parties > i { color: var(--teal-500); }
.loan-rating { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 15px; border: 1px solid rgba(225,168,64,.35); border-radius: 13px; background: rgba(225,168,64,.07); }
.loan-rating small, .loan-rating b { display: block; }
.loan-rating small { color: var(--muted); font-size: 10px; }
.loan-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.loan-timeline-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--border); border-radius: 13px; }
.loan-timeline-item > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-soft); }
.loan-timeline-item.complete > span { color: #fff; background: var(--teal-500); }
.loan-timeline-item b, .loan-timeline-item small { display: block; }
.loan-timeline-item small { margin-top: 2px; color: var(--muted); }
.loan-payment-history { margin-top: 18px; }
.loan-payments-table { min-width: 840px; }
.payment-deleted td { opacity: .7; }
.payment-deleted td:nth-child(3) { text-decoration: line-through; }
.payment-method-label { display: inline-flex; align-items: center; gap: 7px; }
.payment-method-field { padding: 0; border: 0; }
.payment-method-field legend { margin-bottom: 8px; font-weight: 800; }
.payment-method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.payment-method-option { cursor: pointer; }
.payment-method-option input { position: absolute; opacity: 0; pointer-events: none; }
.payment-method-option span { min-height: 76px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; color: var(--muted); background: var(--surface); text-align: center; transition: .2s; }
.payment-method-option span i { font-size: 20px; }
.payment-method-option input:checked + span { border-color: var(--teal-500); color: var(--teal-600); background: rgba(18,165,148,.09); box-shadow: 0 0 0 3px rgba(18,165,148,.09); }
.payment-method-option input:focus-visible + span { outline: 3px solid rgba(18,165,148,.25); outline-offset: 2px; }
.shared-image-input { margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.shared-image-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.shared-image-head label { display: block; font-weight: 800; }
.image-count { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.shared-image-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.image-paste-zone { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.image-paste-zone:focus { border-color: var(--teal-500); outline: 3px solid rgba(18,165,148,.12); }
.image-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.image-preview-card { min-width: 0; display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.image-preview-card img { width: 72px; height: 72px; grid-row: 1 / 3; object-fit: cover; border-radius: 9px; }
.image-preview-card > div { min-width: 0; }
.image-preview-card b, .image-preview-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-card b { font-size: 11px; }
.image-preview-card small { color: var(--muted); font-size: 9px; }
.image-preview-actions { display: flex; align-self: end; gap: 4px; }
.image-preview-actions .icon-btn { width: 28px; height: 28px; font-size: 10px; }
.icon-btn.danger { color: var(--danger); }
.payment-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.payment-detail-grid > span { padding: 13px; border-radius: 12px; background: var(--surface-soft); }
.payment-detail-grid small, .payment-detail-grid b { display: block; }
.payment-detail-grid small { color: var(--muted); font-size: 10px; }
.payment-detail-grid b { margin-top: 3px; }
.payment-attachments-section { margin-top: 20px; }
.payment-attachments-section h3 { margin: 0 0 10px; }
.payment-attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.payment-attachment { position: relative; min-width: 0; display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--border); border-radius: 12px; }
.payment-attachment img { width: 82px; height: 72px; display: block; object-fit: cover; border-radius: 9px; }
.payment-attachment div { min-width: 0; }
.payment-attachment b, .payment-attachment small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-attachment b { font-size: 11px; }
.payment-attachment small { color: var(--muted); font-size: 9px; }
.danger-notice { border-color: rgba(204,69,69,.35); color: var(--danger); background: rgba(204,69,69,.07); }
.danger-notice > div { display: grid; gap: 3px; }
.danger-notice span { color: var(--muted); }
.level-pill { padding: 5px 10px; border-radius: 99px; color: var(--navy-950); background: var(--gold-400); font-size: 11px; font-weight: 850; }
.level-activation { padding: 18px 22px; border-bottom: 1px solid var(--border); background: rgba(225,168,64,.08); }
.level-activation p { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.level-activation-controls { display: flex; gap: 9px; }
.level-activation-controls .input { flex: 1; }
.notification-list { display: grid; gap: 8px; }
.notification-item {
  width: 100%; display: flex; align-items: start; gap: 12px; padding: 13px; border: 1px solid var(--border);
  border-radius: 13px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer;
}
.notification-item:hover { border-color: var(--teal-500); }
.notification-item.unread { border-color: rgba(225,168,64,.5); background: rgba(225,168,64,.07); }
.notification-item > span:last-child { min-width: 0; flex: 1; }
.notification-item b, .notification-item small, .notification-item time { display: block; }
.notification-item small { margin-top: 3px; color: var(--muted); }
.notification-item time { margin-top: 6px; color: var(--muted); font-size: 10px; }
.skeleton { overflow: hidden; border-radius: 8px; background: var(--border); position: relative; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.3s infinite; }

@keyframes bootPulse { 50% { transform: scale(1.06); } }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes bob { 50% { transform: translateY(-9px); } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes nodeFloat { 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes coinTravel { 0% { opacity: 0; transform: translate(0,0) scale(.7); } 20%, 75% { opacity: 1; } 100% { opacity: 0; transform: translate(300px, -35px) scale(1); } }
@keyframes growBar { from { transform: scaleY(0); opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes bellRing { 0%, 82%, 100% { transform: rotate(0); } 86%, 94% { transform: rotate(14deg); } 90%, 98% { transform: rotate(-14deg); } }

@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr 420px; gap: 25px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .circle-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: minmax(400px, .95fr) 1.05fr; }
}
@media (max-width: 820px) {
  .hero { padding-top: 135px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { margin-inline: auto; }
  .hero-actions, .hero-proof { justify-content: center; }
  .trust-orbit { margin-top: 35px; }
  .eyebrow { justify-content: center; }
  .value-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .auth-shell { display: block; }
  .auth-visual { display: none; }
  .auth-form-pane { min-height: 100vh; }
  .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .app-main { grid-column: 1; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); height: 100vh; transform: translateX(-105%);
    box-shadow: var(--shadow-lg); transition: transform .3s var(--ease);
  }
  .sidebar.open { transform: none; }
  .sidebar-collapsed .sidebar-brand, .sidebar-collapsed .nav-item span, .sidebar-collapsed .sidebar-label, .sidebar-collapsed .user-chip-info, .sidebar-collapsed .system-version span { opacity: 1; pointer-events: auto; }
  .sidebar-collapsed .nav-item { justify-content: flex-start; padding-inline: 14px; }
  .sidebar-collapsed .user-chip { justify-content: flex-start; padding-inline: 11px; }
  .sidebar-collapsed .sidebar-head { justify-content: flex-start; }
  .sidebar-toggle { display: none; }
  .mobile-menu { display: inline-grid; }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; display: none; background: rgba(5,14,25,.52); }
  .sidebar-scrim.show { display: block; }
  .profile-grid { grid-template-columns: 1fr; }
  .loan-detail-grid { grid-template-columns: 1fr; }
  .loan-timeline-panel { grid-column: auto; }
  .loan-timeline { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .public-nav { height: 72px; }
  .public-nav .nav-inner { width: calc(100% - 28px); }
  .public-nav .brand img { width: 177px; }
  .nav-text { display: none; }
  .hero { min-height: 700px; padding: 118px 16px 70px; }
  .hero h1 { font-size: 47px; }
  .hero-proof { gap: 12px; flex-direction: column; align-items: center; }
  .trust-orbit { width: 330px; }
  .hero-card { left: 8%; right: 5%; padding: 21px; }
  .hero-balance { font-size: 31px; }
  .peer-one { right: 0; top: 7%; }
  .peer-two { left: 0; bottom: 5%; }
  .section { padding: 72px 16px; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 26px; }
  .public-footer .section-inner { flex-direction: column; }
  .auth-form-pane { padding: 24px 20px; }
  .auth-brand img { width: 176px; }
  .auth-form-wrap { padding-top: 55px; }
  .form-row, .checkbox-grid { grid-template-columns: 1fr; gap: 0; }
  .topbar { height: 68px; padding-inline: 14px; }
  .top-actions .icon-btn:nth-child(2) { display: none; }
  .app-content { padding: 22px 14px 45px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-actions .btn { flex: 1; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 22px; }
  .table-wrap { display: none; }
  .card-list { display: grid; gap: 10px; }
  .mobile-data-card { padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .mobile-data-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
  .mobile-data-card h3 { margin: 0; font-size: 15px; }
  .mobile-data-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
  .mobile-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 15px 0; }
  .mobile-data-grid small { display: block; color: var(--muted); font-size: 10px; }
  .mobile-actions { display: flex; gap: 7px; }
  .mobile-actions .btn { flex: 1; }
  .circle-grid { grid-template-columns: 1fr; }
  .role-card { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; }
  .request-summary, .dossier-grid { grid-template-columns: 1fr 1fr; }
  .level-activation-controls { align-items: stretch; flex-direction: column; }
  .calendar-event { grid-template-columns: 52px 1fr; }
  .calendar-event-icon { display: none; }
  .calendar-event-amount { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .calendar-week .panel-head, .statement-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-date-form .input, .statement-selector { width: 100%; }
  .statement-current-balance { text-align: left; }
  .statement-parties { grid-template-columns: 1fr; }
  .statement-parties i { transform: rotate(90deg); justify-self: center; }
  .loan-detail-summary { flex-direction: column; }
  .loan-detail-status { justify-items: start; }
  .loan-action-bar .btn { flex: 1 1 100%; }
  .loan-facts { grid-template-columns: 1fr; }
  .loan-parties { grid-template-columns: 1fr; }
  .loan-parties > i { justify-self: center; transform: rotate(90deg); }
  .payment-method-grid { grid-template-columns: 1fr 1fr; }
  .shared-image-actions .btn { flex: 1 1 100%; }
  .image-preview-grid, .payment-attachment-grid { grid-template-columns: 1fr; }
  .payment-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
