/* =========================================================
   Provident Funding — design system
   Brand colours live here: change these tokens to re-skin the whole site.
   ========================================================= */
:root {
  --bg: #040a0a;
  --bg-2: #081110;
  --surface: #0c1718;
  --surface-2: #101e1f;
  --surface-3: #152627;
  --border: #1b2f2e;
  --border-2: #27403e;
  --text: #e9f3f0;
  --text-2: #a7bcb6;
  --muted: #71918a;
  --primary: #13c394;          /* emerald derived from logo green */
  --primary-2: #2ee6b4;
  --primary-ink: #03140e;
  --accent: #027d5f;           /* official logo green */
  --accent-2: #0aa57c;
  --gold: #f5b942;
  --danger: #ff4d6d;
  --warning: #ffb020;
  --success: #13c394;
  --info: #3fa9ff;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(19, 195, 148, .14), rgba(2, 125, 95, .14));
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-2); }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: rgba(19, 195, 148, .3); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
.hidden { display: none !important; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; transition: .18s ease; white-space: nowrap; background: var(--surface-3); color: var(--text); }
.btn:hover { transform: translateY(-1px); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(19, 195, 148, .25); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px rgba(19, 195, 148, .4); }
.btn-green { background: var(--primary); color: var(--primary-ink); }
.btn-green:hover { background: var(--primary-2); color: var(--primary-ink); }
.btn-outline { background: transparent; border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(255, 77, 109, .15); color: var(--danger); border-color: rgba(255, 77, 109, .3); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; text-transform: capitalize; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: rgba(19, 195, 148, .12); color: var(--success); }
.badge.red { background: rgba(255, 77, 109, .12); color: var(--danger); }
.badge.yellow { background: rgba(255, 176, 32, .12); color: var(--warning); }
.badge.blue { background: rgba(63, 169, 255, .14); color: #6cbcff; }
.badge.gold { background: rgba(245, 185, 66, .14); color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border-2); background: rgba(12, 23, 24, .6); font-size: .85rem; color: var(--text-2); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(19, 195, 148, .2); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { font-size: 1.05rem; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat .value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.stat .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.stat .ico { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); }
.stat .ico svg { width: 20px; height: 20px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--text-2); }
.input, .field input, .field select, .field textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 11px 14px; outline: none; transition: .15s; }
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(19, 195, 148, .15); }
.field .hint { font-size: .78rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--primary); }
select option { background: var(--surface); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .015); }
tr.click { cursor: pointer; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- progress ---------- */
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .6s ease; }
.progress.red > span { background: linear-gradient(90deg, var(--warning), var(--danger)); }

/* ---------- tabs ---------- */
.tabs { display: inline-flex; padding: 5px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.tab { padding: 9px 18px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text-2); border: 0; background: transparent; transition: .15s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad); color: #fff; }

/* ---------- toast & modal ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { padding: 12px 18px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-2); border-left: 4px solid var(--primary); box-shadow: var(--shadow); max-width: 360px; animation: slideIn .25s ease; font-size: .9rem; }
.toast.err { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(2, 7, 6, .75); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 1000; animation: fade .2s; }
.modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 22px; }
.modal-x { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
@keyframes fade { from { opacity: 0; } }

/* =========================================================
   Marketing site
   ========================================================= */
.announce { background: var(--grad); color: #fff; text-align: center; font-size: .86rem; font-weight: 600; padding: 8px 16px; }
.nav { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(14px); background: rgba(4, 10, 10, .78); border-bottom: 1px solid rgba(31, 44, 74, .6); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--text); }
.logo:hover { color: var(--text); }
.logo .logo-full { height: 40px; width: auto; display: block; }
.logo-mark { width: 34px; height: 34px; object-fit: contain; display: block; }
.sidebar .logo .logo-full { height: 36px; }
.cert .logo .logo-full { height: 48px; }
.logo small { display: block; font-size: .62rem; letter-spacing: .25em; color: var(--muted); font-weight: 500; margin-top: -3px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: .93rem; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 20px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .burger { display: block; }
  .nav-cta .btn-outline { display: none; }
}

.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 900px; height: 900px; left: -300px; top: -450px; background: radial-gradient(circle, rgba(19, 195, 148, .18), transparent 60%); pointer-events: none; }
.hero::after { content: ''; position: absolute; width: 800px; height: 800px; right: -300px; top: -200px; background: radial-gradient(circle, rgba(2, 125, 95, .2), transparent 60%); pointer-events: none; }
.hero .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero h1 { margin: 20px 0; }
.hero p.lead { font-size: 1.15rem; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin: 32px 0; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats b { font-family: var(--font-head); font-size: 1.7rem; display: block; }
.hero-stats span { color: var(--muted); font-size: .85rem; }
.hero-card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-2); border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(19, 195, 148, .05); position: relative; }
.hero-card .float { position: absolute; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: .82rem; animation: bob 4s ease-in-out infinite; }
.hero-card .float b { display: block; font-size: 1.05rem; font-family: var(--font-head); }
.hero-card .f1 { left: -40px; bottom: 40px; }
.hero-card .f2 { right: -24px; top: -22px; animation-delay: 1.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; } .hero-card .f1 { left: 10px; } .hero-card .f2 { right: 10px; } }

.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); padding: 22px 0; }
.strip .container { display: flex; justify-content: space-around; gap: 30px; flex-wrap: wrap; align-items: center; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.strip span { display: flex; align-items: center; gap: 10px; }

section.sec { padding: 96px 0; position: relative; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.sec-head .eyebrow { color: var(--primary); font-weight: 700; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.sec-head h2 { margin: 12px 0 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px; position: relative; overflow: hidden; }
.step::before { counter-increment: s; content: '0' counter(s); font-family: var(--font-head); font-weight: 700; font-size: 3.6rem; position: absolute; right: 18px; top: 4px; color: rgba(255, 255, 255, .04); }
.step .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); margin-bottom: 18px; border: 1px solid rgba(19, 195, 148, .2); }
.step h3 { margin-bottom: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* pricing */
.pricing-ctrl { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 34px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.size { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-weight: 700; font-family: var(--font-head); transition: .15s; color: var(--text-2); }
.size:hover { border-color: var(--primary); color: var(--text); }
.size.active { border-color: var(--primary); background: rgba(19, 195, 148, .1); color: var(--primary); }
.price-box { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--surface); border: 1px solid var(--border-2); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.price-rules { padding: 10px 0; }
.rule-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; padding: 15px 30px; border-bottom: 1px solid var(--border); align-items: center; }
.rule-row:last-child { border: 0; }
.rule-row.head { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.rule-row .k { color: var(--text-2); }
.rule-row .v { font-weight: 600; }
.rule-row.two-col { grid-template-columns: 1.3fr 2fr; }
.price-side { background: linear-gradient(160deg, rgba(19, 195, 148, .1), rgba(2, 125, 95, .12)); padding: 36px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--border-2); }
.price-side .acc { color: var(--muted); font-size: .9rem; }
.price-side .size-big { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; }
.price-side .fee { font-family: var(--font-head); font-size: 2rem; font-weight: 700; margin: 14px 0 4px; }
.price-side ul { list-style: none; margin: 18px 0 26px; display: grid; gap: 10px; }
.price-side li { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: .92rem; }
.price-side li::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; background: rgba(19, 195, 148, .15); color: var(--primary); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
@media (max-width: 860px) { .price-box { grid-template-columns: 1fr; } .price-side { border-left: 0; border-top: 1px solid var(--border-2); } .rule-row { padding: 13px 18px; font-size: .9rem; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; transition: .2s; }
.feature:hover { border-color: rgba(19, 195, 148, .4); transform: translateY(-3px); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--grad-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { font-size: .93rem; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--text-2); }
.compare th { font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--text); padding: 18px 16px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.check-list { list-style: none; display: grid; gap: 14px; margin: 24px 0 30px; }
.check-list li { display: flex; gap: 12px; color: var(--text-2); }
.check-list li::before { content: '✓'; flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: rgba(19, 195, 148, .14); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }

.payout-visual { background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; padding: 24px; }
.payout-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.payout-item:last-child { border: 0; }
.payout-item .who { display: flex; gap: 12px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .85rem; flex-shrink: 0; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 22px; }
.faq details[open] { border-color: rgba(19, 195, 148, .35); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: 18px; }

.cta-band { background: var(--grad); border-radius: 26px; padding: 60px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2, .cta-band p { color: #fff; position: relative; }
.cta-band p { opacity: .9; margin: 12px auto 28px; max-width: 560px; }
.cta-band .btn { background: #fff; color: #06121f; position: relative; }
.cta-band::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px); background-size: 22px 22px; }
@media (max-width: 600px) { .cta-band { padding: 40px 22px; } }

footer.foot { border-top: 1px solid var(--border); padding: 60px 0 30px; background: var(--bg-2); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot h4 { font-size: .95rem; margin-bottom: 14px; }
.foot ul { list-style: none; display: grid; gap: 9px; }
.foot ul a { color: var(--muted); font-size: .9rem; }
.foot ul a:hover { color: var(--text); }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.disclaimer p { color: var(--muted); margin-bottom: 10px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(circle at 20% 20%, rgba(19, 195, 148, .22), transparent 50%), radial-gradient(circle at 80% 80%, rgba(2, 125, 95, .25), transparent 50%), var(--bg-2); padding: 50px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 2rem; margin-bottom: 6px; }
.err-box { background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .3); color: var(--danger); padding: 10px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 14px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* =========================================================
   App shell (client + admin)
   ========================================================= */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { padding: 0 8px 22px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 16px 12px 8px; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .92rem; transition: .15s; }
.side-nav a svg { width: 19px; height: 19px; opacity: .85; flex-shrink: 0; }
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a.active { background: var(--grad-soft); color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.side-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 18px; }
.side-cta { background: var(--grad-soft); border: 1px solid rgba(19, 195, 148, .25); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.side-cta b { display: block; margin-bottom: 4px; }
.side-cta p { font-size: .82rem; margin-bottom: 12px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.user-chip .info { flex: 1; min-width: 0; }
.user-chip .info b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .info span { font-size: .75rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: transparent; border: 1px solid var(--border-2); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); position: relative; flex-shrink: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(4, 10, 10, .85); backdrop-filter: blur(12px); z-index: 50; }
.topbar h2 { font-size: 1.3rem; }
.topbar .crumb { font-size: .8rem; color: var(--muted); }
.view { padding: 28px 32px 60px; flex: 1; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 200; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: grid; }
  .topbar, .view { padding-left: 18px; padding-right: 18px; }
}
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 150; }

.banner { background: var(--grad-soft); border: 1px solid rgba(19, 195, 148, .25); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: .92rem; }
.banner.warn { background: rgba(255, 176, 32, .08); border-color: rgba(255, 176, 32, .3); }

.acc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: .18s; display: block; color: var(--text); }
.acc-card:hover { border-color: rgba(19, 195, 148, .45); color: var(--text); transform: translateY(-2px); }
.acc-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.acc-card .sz { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.acc-card .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; font-size: .85rem; }
.acc-card .kv span { color: var(--muted); display: block; font-size: .75rem; }

.objective { padding: 16px 0; border-bottom: 1px solid var(--border); }
.objective:last-child { border: 0; padding-bottom: 0; }
.objective .row { margin-bottom: 10px; }
.objective .state { margin-left: auto; }

.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cred { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.cred span { font-size: .74rem; color: var(--muted); display: block; }
.cred b { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; word-break: break-all; }
.copy { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .75rem; }
.copy:hover { color: var(--primary); }
@media (max-width: 700px) { .creds { grid-template-columns: 1fr; } }

.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif:last-child { border: 0; }
.notif .nd { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); margin-top: 8px; flex-shrink: 0; }
.notif.unread .nd { background: var(--primary); }
.notif b { font-size: .9rem; display: block; }
.notif p { font-size: .84rem; }

.choice { border: 1px solid var(--border-2); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; align-items: center; transition: .15s; background: var(--bg-2); }
.choice:hover { border-color: var(--primary); }
.choice.active { border-color: var(--primary); background: rgba(19, 195, 148, .07); }
.choice input { accent-color: var(--primary); }
.summary-line { display: flex; justify-content: space-between; padding: 9px 0; color: var(--text-2); font-size: .92rem; }
.summary-line.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.pay-box { background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 12px; padding: 16px; white-space: pre-wrap; font-size: .88rem; word-break: break-all; }

.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.msg { max-width: 80%; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: rgba(19, 195, 148, .08); border-color: rgba(19, 195, 148, .25); }
.msg .meta { font-size: .74rem; color: var(--muted); margin-bottom: 6px; }

.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 220px; }
.kyc-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: .9rem; }
.dl dt { color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 220px; padding: 9px 12px; }
.loader { display: grid; place-items: center; padding: 80px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* certificate */
.cert-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--bg); }
.cert { width: 1000px; max-width: 100%; aspect-ratio: 1.414; background: radial-gradient(circle at 0 0, rgba(19, 195, 148, .25), transparent 40%), radial-gradient(circle at 100% 100%, rgba(2, 125, 95, .3), transparent 45%), #061110; border-radius: 20px; padding: 6%; position: relative; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border-2); overflow: hidden; }
.cert::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(19, 195, 148, .3); border-radius: 12px; pointer-events: none; }
.cert h1 { font-size: clamp(1.6rem, 4.5vw, 3.4rem); }
.cert .name { font-family: var(--font-head); font-size: clamp(1.6rem, 5vw, 3.6rem); font-weight: 700; margin: 2% 0; }
.cert .amt { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2.8rem); font-weight: 700; }
@media print { body { background: #061110; } .no-print { display: none !important; } .cert-page { padding: 0; } @page { size: landscape; margin: 0; } }
