/* Jaky Crowd — one stylesheet for the public site, member app and admin */
:root {
  --ink: #0B1F1D; --deep: #062824; --teal: #0F766E; --teal-2: #14B8A6; --mint: #CCFBF1;
  --gold: #F2C14E; --gold-2: #B8860B; --sun: #FF8A00;
  --bg: #F3F7F6; --paper: #FFFFFF; --line: #DCE7E5; --line2: #ECF3F1; --muted: #557370; --mist: #8FB3AE;
  --good: #0F7A44; --good-bg: #DCF5E8; --warn: #9A4A00; --warn-bg: #FFF0DB; --bad: #B42318; --bad-bg: #FDE7E5; --info: #1E4E9C; --info-bg: #E5EEFD;
  --r: 16px; --shadow: 0 1px 2px rgba(6, 40, 36, .06), 0 14px 34px -16px rgba(6, 40, 36, .22);
  --f-head: "Sora", system-ui, sans-serif; --f-body: "IBM Plex Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--f-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--teal); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s, background .12s, border-color .12s; }
.btn:hover { transform: translateY(-1px); border-color: var(--teal); }
.btn-primary { background: linear-gradient(135deg, var(--teal), #0B5F58); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(15, 118, 110, .8); }
.btn-gold { background: linear-gradient(180deg, #FFE9A3, var(--gold) 45%, var(--gold-2)); border-color: transparent; color: #1A1306; }
.btn-ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* forms */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; font: 400 16px var(--f-body); color: var(--ink); padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #FBFDFC; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(20, 184, 166, .15); background: #fff; }
.form { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: auto; }
.hp { position: absolute; left: -9999px; }

/* alerts, pills */
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 500; }
.alert-success { background: var(--good-bg); color: var(--good); }
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-mute { background: var(--line2); color: var(--muted); }
.pill-info { background: var(--info-bg); color: var(--info); }

/* cards, tables */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 17px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.empty { text-align: center; padding: 32px 12px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.tile span { font-size: 13px; color: var(--muted); }
.tile b { font: 700 24px/1.15 var(--f-head); }
.tile small { font-size: 12.5px; color: var(--muted); }
.tile.hot { background: var(--warn-bg); border-color: #F5D7AE; }
.tile.hot b { color: var(--warn); }
.tile.good b { color: var(--good); }
.tile.bad { background: var(--bad-bg); border-color: #F3C3BE; }
.tile.bad b { color: var(--bad); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cols > .panel { margin: 0; }

/* ---------- public site ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(6, 40, 36, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 19px var(--f-head); }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal-2), var(--teal)); color: #fff; }
.brand em { font-style: normal; color: var(--gold); }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a { color: #C3DDD9; text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.top-cta { display: flex; gap: 8px; }
.hero { position: relative; background: var(--deep); color: #fff; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(560px 360px at 90% 0%, rgba(242, 193, 78, .18), transparent 70%), radial-gradient(700px 480px at 0% 100%, rgba(20, 184, 166, .28), transparent 70%), linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 42px 42px, linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 42px 42px; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 76px 0 84px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); background: rgba(20, 184, 166, .12); border: 1px solid rgba(20, 184, 166, .3); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); margin: 20px 0 16px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { color: #B7D3CF; font-size: 18px; max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.hero-card h3 { font-size: 15px; color: var(--mint); margin-bottom: 14px; }
.calc { display: grid; gap: 12px; }
.calc label { color: #DDF0EC; }
.calc input, .calc select { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .15); color: #fff; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.calc-out div { background: rgba(0, 0, 0, .22); border-radius: 12px; padding: 12px; }
.calc-out span { font-size: 12.5px; color: var(--mist); display: block; }
.calc-out b { font: 700 20px var(--f-head); color: var(--gold); }
.sec { padding: 80px 0; }
.sec-alt { background: var(--paper); }
.sec-head { max-width: 680px; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(26px, 3vw, 36px); }
.sec-head p { color: var(--muted); font-size: 17px; margin-top: 10px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--teal); font: 700 16px var(--f-head); margin-bottom: 14px; }
.steps h3 { font-size: 17px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pk { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); position: relative; }
.pk.featured { border-color: var(--gold); }
.pk.featured::after { content: "Popular"; position: absolute; top: 14px; right: 14px; font-size: 11.5px; font-weight: 700; background: var(--gold); color: #1A1306; padding: 3px 9px; border-radius: 999px; }
.pk h3 { font-size: 19px; }
.pk .rate { font: 700 34px/1 var(--f-head); color: var(--teal); }
.pk .rate small { font: 500 14px var(--f-body); color: var(--muted); }
.pk ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--muted); }
.pk ul b { color: var(--ink); }
.pk .btn { margin-top: auto; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pj { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.pj-img { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--teal), var(--deep)); display: grid; place-items: center; color: rgba(255, 255, 255, .7); font: 700 18px var(--f-head); }
.pj-img img { width: 100%; height: 100%; object-fit: cover; }
.pj-body { padding: 18px; display: grid; gap: 8px; }
.pj-body h3 { font-size: 18px; }
.bar { height: 8px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-2), var(--teal)); }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin-top: 10px; }
.risk { font-size: 13.5px; color: var(--muted); border-inline-start: 3px solid var(--gold); padding-inline-start: 12px; max-width: 860px; }
.foot { background: var(--deep); color: #A9C9C4; padding: 44px 0 26px; font-size: 14.5px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.foot a { color: #DDF0EC; text-decoration: none; }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: var(--deep); background-image: radial-gradient(600px 400px at 100% 0%, rgba(242, 193, 78, .15), transparent 70%), radial-gradient(600px 400px at 0% 100%, rgba(20, 184, 166, .25), transparent 70%); }
.auth-card { width: min(440px, 100%); background: var(--paper); border-radius: 22px; padding: 28px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.auth-card .brand { color: var(--ink); margin-bottom: 18px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 18px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* ---------- app layout (member + admin) ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--deep); color: #C3DDD9; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.side .brand { padding: 6px 10px 16px; }
.side-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mist); padding: 10px 12px 4px; }
.side a.nav-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #C3DDD9; text-decoration: none; font-weight: 500; }
.side a.nav-i:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.nav-i.on { background: rgba(20, 184, 166, .18); color: #fff; }
.side a.nav-i b.badge { margin-inline-start: auto; background: var(--sun); color: #fff; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding: 12px; font-size: 14px; }
.side-foot b { color: #fff; display: block; }
.side-foot button, .link-btn { background: none; border: 0; color: var(--mist); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.main { min-width: 0; }
.bar-top { display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar-top h1 { font-size: 19px; flex: 1; }
.content { padding: 24px 28px 90px; max-width: 1200px; }
.bal-card { background: linear-gradient(135deg, var(--teal), var(--deep)); color: #fff; border-radius: 20px; padding: 22px; margin-bottom: 18px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.bal-card span { color: var(--mint); font-size: 14px; }
.bal-card b { font: 700 34px/1 var(--f-head); }
.bal-card .row { display: flex; gap: 10px; flex-wrap: wrap; }
.bal-card .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.bal-card .btn.gold { background: linear-gradient(180deg, #FFE9A3, var(--gold) 45%, var(--gold-2)); color: #1A1306; border-color: transparent; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line2); font-size: 14.5px; }
.list li:last-child { border-bottom: 0; }
.amt-pos { color: var(--good); font-weight: 600; }
.amt-neg { color: var(--bad); font-weight: 600; }
.addr { display: flex; gap: 8px; align-items: center; background: var(--line2); border-radius: 12px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; word-break: break-all; }
.addr button { flex: none; }
.qr { width: 180px; height: 180px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.thread { display: grid; gap: 10px; }
.msg { padding: 12px 14px; border-radius: 14px; background: var(--line2); max-width: 85%; }
.msg.me { background: var(--mint); margin-inline-start: auto; }
.msg small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.burger { display: none; }
.bottom-nav { display: none; }

@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding: 50px 0 60px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .navtoggle:checked ~ .side { transform: none; }
  .navtoggle:checked ~ .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; }
  .burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
  .burger span, .burger span::before, .burger span::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; border-radius: 2px; }
  .burger span::before { position: absolute; top: -6px; } .burger span::after { position: absolute; top: 6px; }
  .bar-top { padding: 12px 16px; }
  .content { padding: 16px 16px 96px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; background: var(--paper); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 9px; font-size: 11.5px; color: var(--muted); text-decoration: none; font-weight: 600; }
  .bottom-nav a.on { color: var(--teal); }
  .bottom-nav svg { width: 22px; height: 22px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .sec { padding: 56px 0; }
  .top-cta .btn-ghost { display: none; }
  .bal-card b { font-size: 28px; }
}
.navtoggle { display: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
details.panel > summary { cursor: pointer; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
.scrim { display: none; }
@media (max-width: 860px) { .navtoggle:checked ~ .scrim { display: block; } }
.brand .logo.has-img { background: none; overflow: hidden; }
.brand .logo.has-img img { width: 100%; height: 100%; object-fit: contain; }
.brand-wide img { height: 40px; width: auto; max-width: 100%; display: block; }
.auth-card .brand-wide img { height: 46px; }
.side .brand-wide { padding: 4px 6px 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
