/* JobVPN cabinet — iOS-style grouped interface, colors from the logo (navy briefcase, gold laurels). */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  /* Dark & gold — the original JobVPN cabinet colors, on the iOS-style layout. */
  --bg: #111110; --cell: #1B1A16; --cell-press: #262419; --sep: rgba(224,194,125,.14);
  --ink: #F3EEE2; --ink2: #A8A191; --ink3: #6F6A5E;
  --accent: #E0C27D; --accent-ink: #1D1708; --gold: #E0C27D; --gold-soft: rgba(224,194,125,.14);
  --ok: #8FCF8A; --ok-soft: rgba(143,207,138,.13); --bad: #E88B78; --bad-soft: rgba(232,139,120,.13); --warn: #E7C46B; --warn-soft: rgba(231,196,107,.13);
  --bar: rgba(22,21,18,.88); --shadow: none; --r: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.35; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100svh; background: radial-gradient(ellipse 80% 35% at 50% -5%, rgba(224,194,125,.09), transparent 70%), var(--bg); }
a { color: var(--accent); text-decoration: none; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
* { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(224,194,125,.55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- frame */
.top { position: sticky; top: 0; z-index: 5; background: var(--bar); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); }
.top-in { max-width: 680px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; font-size: 17px; letter-spacing: -.2px; }
.logo { width: 30px; height: 30px; border-radius: 8px; display: block; }
.desk-nav { margin-left: auto; display: flex; background: var(--cell-press); border-radius: 9px; padding: 2px; }
.desk-nav a { padding: 5px 14px; border-radius: 7px; font-size: 14px; font-weight: 550; color: var(--ink); }
.desk-nav a.on { background: #3A3626; color: var(--gold); }
main { max-width: 680px; margin: 0 auto; padding: 8px 16px 120px; }
body.has-tabbar main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

.large { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .2px; margin: 18px 4px 4px; }
.lede { color: var(--ink2); font-size: 15px; margin: 0 4px 18px; }
.group-title { font-size: 13px; color: var(--ink2); margin: 26px 16px 7px; }
.foot-note { font-size: 13px; color: var(--ink2); margin: 7px 16px 0; line-height: 1.4; }

/* ---------- grouped list */
.group { background: var(--cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; position: relative; color: var(--ink); }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.row.with-icon + .row::before, .row + .row.with-icon::before { left: 60px; }
button.row, a.row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font-size: 17px; }
button.row:active, a.row:active { background: var(--cell-press); }
.row .body { flex: 1; min-width: 0; }
.row .title { font-size: 17px; }
.row .sub { font-size: 13px; color: var(--ink2); margin-top: 2px; overflow-wrap: anywhere; }
.row .value { color: var(--ink2); font-size: 16px; white-space: nowrap; }
.chev { width: 8px; height: 13px; flex: none; opacity: .35; }
.icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; }
.icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-blue { background: #2F6BEA; } .i-green { background: #2DB55D; } .i-gold { background: #D6A23C; } .i-grey { background: #8E8E93; } .i-tg { background: #2AABEE; } .i-red { background: #EF4A43; }
.row.danger .title { color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---------- controls */
.btn { background-image: linear-gradient(180deg, #F0D79A, #E0C27D); }
.btn.tinted, .btn.plain, .btn.danger { background-image: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px;
  border-radius: 12px; border: 0; background-color: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px;
  cursor: pointer; transition: transform .08s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.tinted { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.btn.plain { background: none; color: var(--accent); padding: 0 6px; height: 32px; }
.btn.small { height: 32px; padding: 0 14px; font-size: 14px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.seg { display: flex; background: var(--cell-press); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 7px; padding: 7px 6px; font-size: 14px; font-weight: 550; cursor: pointer; color: var(--ink); line-height: 1.2; }
.seg button small { display: block; font-size: 11px; font-weight: 450; color: var(--ink2); margin-top: 1px; }
.seg button.on { box-shadow: 0 1px 3px rgba(0,0,0,.3); color: var(--gold); }
.seg button.on { background: #3A3626; }
.stepper { display: inline-flex; align-items: center; background: var(--cell-press); border-radius: 9px; }
.stepper button { width: 44px; height: 32px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper button:disabled { opacity: .3; }
.stepper span { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.field { width: 100%; height: 44px; border: 0; background: transparent; outline: none; font-size: 17px; }
.field::placeholder { color: var(--ink3); }
.code { letter-spacing: .5em; font-variant-numeric: tabular-nums; font-size: 22px; text-align: center; }
.msg { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 12px; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- home: the term ring */
.status { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 18px 18px 16px; }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring .track { stroke: var(--cell-press); }
.ring .fill { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }
.ring.low .fill { stroke: var(--warn); } .ring.out .fill { stroke: var(--bad); }
.ring img { position: absolute; inset: 21px; width: 50px; height: 50px; border-radius: 12px; }
.status h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: .1px; }
.status p { margin: 3px 0 0; color: var(--ink2); font-size: 15px; }
.status .actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.flags { letter-spacing: 2px; }

/* ---------- purchase */
.buy-row { padding: 12px 16px; }
.buy-row + .buy-row { border-top: .5px solid var(--sep); }
.buy-row .label { font-size: 15px; color: var(--ink2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.plan { text-align: left; border: 1.5px solid transparent; background: var(--cell-press); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.plan.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--cell)); }
.plan b { display: block; font-size: 16px; } .plan span { font-size: 13px; color: var(--ink2); }
.save { color: var(--ok); font-weight: 600; }
.checkout { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bar); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.checkout-in { max-width: 648px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.checkout .sum { flex: 1; } .checkout .sum b { font-size: 22px; font-variant-numeric: tabular-nums; } .checkout .sum div { font-size: 13px; color: var(--ink2); }
body.has-checkout .tabbar { display: none !important; }

/* ---------- tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 550; color: var(--ink3); }
.tabbar a svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.on { color: var(--accent); }

/* ---------- sheet */
.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: min(560px, 100%); max-height: 92svh; overflow: auto; background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 720px) { .sheet { align-items: center; } .sheet-card { border-radius: 16px; } }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--ink3); opacity: .5; margin: 0 auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.sheet-head h2 { font-size: 20px; margin: 0; font-weight: 700; }
.qr { display: flex; gap: 16px; align-items: center; padding: 14px 16px; }
.qr img { width: 112px; height: 112px; border-radius: 10px; background: #fff; flex: none; }
img.app-mark { object-fit: cover; background: #1c1c1e; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.12); }
.qr p { margin: 0; font-size: 14px; color: var(--ink2); }
.key-input { width: 100%; height: 34px; border: 0; background: var(--cell-press); border-radius: 8px; padding: 0 10px; font-size: 12px; color: var(--ink2); margin-top: 6px; }

/* ---------- login */
.login { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.login .logo-big { width: 76px; height: 76px; border-radius: 18px; display: block; margin: 0 auto 14px; box-shadow: 0 10px 40px rgba(224,194,125,.18); }
.login h1 { text-align: center; font-size: 28px; line-height: 34px; margin: 0 0 6px; font-weight: 700; }
.login .lede { text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: rgba(30,30,34,.92); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; max-width: 90vw; text-align: center; }
.toast.err { background: #C4122B; }
@media (max-width: 720px) { .desk-nav { display: none !important; } }

/* ---------- payment sheets & apps */
.pay-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; background: var(--cell); border-radius: var(--r); }
.pay-bar .sum { flex: 1; } .pay-bar .sum b { font-size: 22px; font-variant-numeric: tabular-nums; } .pay-bar .sum div { font-size: 13px; color: var(--ink2); }
.app-row { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.app-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 14px; letter-spacing: .3px; flex: none; }
.row.app-row + .row::before { left: 68px; }
.app-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.best { font-size: 11px; font-weight: 650; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 2px 6px; vertical-align: 2px; margin-left: 4px; }
.warn-text { color: var(--warn) !important; }

.renew-btn { height: 50px; font-size: 17px; gap: 8px; }
.btn svg { width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.renew-btn svg { margin-right: 0; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- business */
.pad { padding: 12px 16px 14px; position: relative; }
.row + .pad::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.biz-balance { display: flex; gap: 14px; align-items: center; padding: 18px 16px 16px; }
.biz-balance .icon { width: 44px; height: 44px; border-radius: 12px; }
.biz-balance .icon svg { width: 24px; height: 24px; }
.biz-balance p { margin: 0; color: var(--ink2); font-size: 14px; }
.biz-balance h2 { margin: 2px 0; font-size: 30px; line-height: 36px; font-weight: 700; font-variant-numeric: tabular-nums; }
.biz-balance h2.neg { color: var(--bad); }
.biz-balance + .row::before { left: 16px; }
.value .plus { color: var(--ok); font-weight: 600; }

.switch-link { width: 100%; height: 36px; margin-top: -4px; font-size: 15px; }

.pay-bar s.was { color: var(--ink3); font-size: 15px; margin-left: 6px; }
