:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --ink: #12203d;
  --muted: #5f6b85;
  --line: #dde6f2;
  --brand: #143f91;
  --brand-ink: #ffffff;
  --brand-soft: #e3eefc;
  --ok: #1f7a4d; --ok-bg: #e1f3e8;
  --warn: #8a5a00; --warn-bg: #fdf0d2;
  --bad: #a3271f; --bad-bg: #fbe3e0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 35, .05), 0 4px 16px rgba(20, 24, 35, .04);
  font-family: "Noto Sans Thai", "IBM Plex Sans Thai", "Leelawadee UI", "Sukhumvit Set", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
h4 { font-size: .95rem; margin-top: .4rem; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.block { display: block; }
.center { text-align: center; }
.pre { white-space: pre-line; }
.error { color: var(--bad); background: var(--bad-bg); padding: .5rem .75rem; border-radius: 8px; margin: 0; }
.warn-text { color: var(--warn); }
.note { color: var(--muted); font-style: italic; }

/* ---------- controls */
button, .button {
  font: inherit; font-weight: 600; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
  padding: .55rem 1rem; border-radius: 9px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
}
button:hover, .button:hover { filter: brightness(1.07); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .button.secondary { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
button.ghost, .button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.small, .button.small { padding: .3rem .65rem; font-size: .85rem; }
button.icon { background: none; border: 0; color: var(--muted); font-size: 1.5rem; padding: 0 .25rem; line-height: 1; }
input, select, textarea {
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .55rem .7rem; width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
input[readonly], input:disabled { background: var(--bg); color: var(--muted); }
.field { display: grid; gap: .3rem; }
.field > span { font-size: .88rem; font-weight: 600; }
.field small { color: var(--muted); }
.check { display: flex; gap: .5rem; align-items: center; }
.check input { width: auto; }
.stack { display: grid; gap: .85rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.inline input { flex: 1 1 240px; width: auto; }
.inline select { width: auto; }
.inline input[type=number] { flex: 0 0 90px; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); display: grid; gap: .75rem; justify-items: center; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.muted { color: var(--muted); background: var(--bg); }
.pill { background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; margin-left: .3rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--bg) 60%, var(--surface)); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; }
.card .table-wrap { margin-top: .8rem; box-shadow: none; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.key { display: flex; gap: .5rem; align-items: center; background: var(--bg); border: 1px dashed var(--line); border-radius: 9px; padding: .55rem .7rem; }
.key code { flex: 1; font-size: 1rem; letter-spacing: .03em; word-break: break-all; user-select: all; }
.devices { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .65rem; background: var(--bg); border-radius: 8px; }
.devices small { display: block; color: var(--muted); }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 2rem)); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
dialog.wide { width: min(760px, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(20, 24, 35, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .6rem; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 1rem 1.2rem 1.3rem; max-height: calc(100vh - 8rem); overflow: auto; }

#toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; transition: .2s; background: var(--ink); color: #fff; padding: .65rem 1.1rem; border-radius: 10px; z-index: 50; max-width: calc(100vw - 2rem); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
#toast.warn { background: var(--warn); }

.brand img { border-radius: 50%; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; }

/* ---------- customer (light, warm paper + deep green + amber credit) */
body.customer { --gold: #c9a13e; --paper: #f5f9fe; background: var(--paper); }
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(255, 253, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 1.2rem; padding: .7rem clamp(1rem, 3vw, 2rem); }
.brand span { display: grid; line-height: 1.1; }
.brand small { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.mainnav { display: flex; gap: .25rem; margin: 0 auto; background: #e8f0fb; padding: .25rem; border-radius: 999px; }
.mainnav a { display: flex; align-items: center; gap: .35rem; padding: .45rem .95rem; border-radius: 999px; color: #4c5550; text-decoration: none; font-weight: 600; font-size: .93rem; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.mainnav .ico { font-size: .95rem; opacity: .75; }
.account-box { display: flex; align-items: center; gap: .6rem; }
.wallet-chip { display: flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--ink); background: #fff7e8; border: 1px solid #f1dcb3; border-radius: 999px; padding: .3rem .35rem .3rem .8rem; font-size: .85rem; }
.wallet-chip strong { font-size: 1rem; }
.wallet-chip em { font-style: normal; background: var(--gold); color: #fff; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; padding: 0; background: var(--brand); font-size: 1rem; }
.notice { background: #fff4dc; color: #7a5300; text-align: center; padding: .55rem 1rem; white-space: pre-line; border-bottom: 1px solid #f1dcb3; }

.page { max-width: 1180px; margin: 0 auto; padding: 1.8rem clamp(1rem, 3vw, 2rem) 3rem; display: grid; gap: 1.6rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.7rem; }
.page-head p { margin: .25rem 0 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem; }
.panel h3 { margin-bottom: .8rem; }
.center-panel { text-align: center; display: grid; gap: .8rem; justify-items: center; padding: 2.5rem 1rem; }
.alert { background: #fff4dc; border: 1px solid #f1dcb3; color: #6d4b00; border-radius: 12px; padding: .7rem 1rem; }
.alert a { font-weight: 700; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.actions.left { justify-content: flex-start; }
button.light, .button.light { background: #fff; color: var(--brand); border-color: #fff; }
button.wide { width: 100%; justify-content: flex-start; }
.bad-text { color: var(--bad); font-weight: 700; }
.ok-text { color: var(--ok); }
.grow { flex: 1; }

.home-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; }
.welcome { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: .9rem; align-content: center;
  background-image: radial-gradient(circle at 100% 0, #d9e9fb 0, transparent 45%), radial-gradient(circle at 0 100%, #fbf1d9 0, transparent 40%); }
.welcome .kicker { font-size: .85rem; color: var(--muted); }
.welcome h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); display: grid; }
.welcome h1 .name { color: var(--brand); }
.welcome p { margin: 0; color: #4c5550; max-width: 34rem; }
.wallet-card { border-radius: 22px; padding: 1.5rem; color: #e8f1ff; display: grid; gap: .5rem; align-content: start;
  background: linear-gradient(150deg, #1a4fae 0%, #0b2a66 75%), #143f91; position: relative; overflow: hidden; }
.wallet-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 26px solid rgba(236, 196, 98, .6); }
.wallet-card .label { font-size: .85rem; opacity: .8; }
.wallet-card .amount { font-size: 2.6rem; line-height: 1; color: #fff; }
.wallet-card .amount small { font-size: 1rem; font-weight: 500; opacity: .8; }
.wallet-card .hint { font-size: .78rem; opacity: .65; }
.wallet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .6rem 0; }
.wallet-stats div { background: rgba(255, 255, 255, .09); border-radius: 12px; padding: .55rem .7rem; display: grid; }
.wallet-stats b { font-size: 1.3rem; color: #fff; }
.wallet-stats span { font-size: .75rem; opacity: .8; }
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.tile { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--brand); }
.tile > div:not(.mono) { display: grid; flex: 1; min-width: 0; }
.tile .muted { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mono { --h: 160; width: 2.8rem; height: 2.8rem; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; letter-spacing: .02em;
  color: hsl(var(--h) 45% 22%); background: linear-gradient(135deg, hsl(var(--h) 60% 88%), hsl(calc(var(--h) + 40) 70% 80%)); }
.mono.big { width: 4.2rem; height: 4.2rem; border-radius: 16px; font-size: 1.3rem; }

.tool-list { display: grid; gap: 1rem; }
.tool { background: #fff; border: 1px solid var(--line); border-radius: 18px; display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; }
.tool-main { display: flex; gap: 1rem; padding: 1.3rem; }
.tool-text { display: grid; gap: .45rem; align-content: start; }
.tool-text p { margin: 0; }
.tagline { color: var(--brand); font-weight: 600; }
.features { list-style: none; margin: .2rem 0; padding: 0; display: grid; gap: .25rem; font-size: .9rem; }
.features li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: .45rem; }
.tool-plans { background: #faf8f3; border-left: 1px dashed var(--line); padding: 1rem; display: grid; gap: .6rem; align-content: center; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; display: grid; grid-template-columns: 1fr auto; gap: .35rem .8rem; align-items: center; }
.plan-name { font-weight: 700; display: grid; }
.plan-name small { font-weight: 400; color: var(--muted); }
.plan-price { text-align: right; }
.plan-price strong { font-size: 1.35rem; color: var(--ink); }
.plan-price small { color: var(--muted); }
.renew-note { display: block; font-size: .78rem; color: #7a5300; background: #fff4dc; border-radius: 6px; padding: 0 .4rem; margin-top: .15rem; }
.plan-actions { grid-column: 1 / -1; display: flex; gap: .4rem; }
.plan-actions button { flex: 1; }

.summary { background: var(--brand-soft); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .5rem; }
.summary-row { display: flex; gap: .8rem; align-items: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e8f0fb; border-radius: 10px; padding: .2rem; }
.seg button { background: transparent; border: 0; color: var(--muted); }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.balance-pill { background: #fff7e8; border: 1px solid #f1dcb3; border-radius: 999px; padding: .4rem 1rem; }
.topup-grid { display: grid; grid-template-columns: 220px 1fr 1.2fr; gap: 1rem; align-items: start; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: .9rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; column-gap: .6rem; }
.steps li::before { content: counter(s); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.steps span { font-size: .85rem; color: var(--muted); }
.bank { background: #fffaf0; border-color: #f1dcb3; display: grid; gap: .6rem; align-content: start; }
.bank .label { font-size: .82rem; color: #7a5300; font-weight: 700; }
.bank-text { font-size: 1.1rem; font-weight: 600; margin: 0; line-height: 1.7; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-weight: 600; }
.drop { border: 2px dashed #c5d5ea; border-radius: 14px; padding: 1.3rem; display: grid; place-items: center; text-align: center; cursor: pointer; background: #f9fbfe; position: relative; }
.drop:hover { border-color: var(--brand); }
.drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { display: grid; gap: .25rem; justify-items: center; }
.drop-text span { font-size: .82rem; color: var(--muted); }
.drop-text img { max-height: 180px; max-width: 100%; border-radius: 8px; }
.table-wrap.flat { border: 0; }
.ledger { margin-top: 1rem; }
.ledger summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.ledger ul { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .3rem; font-size: .9rem; }
.ledger li { display: grid; grid-template-columns: 11rem 1fr auto 8rem; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }

.license-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.license { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; display: grid; gap: .8rem; align-content: start; }
.license-head { display: flex; align-items: center; gap: .7rem; }
.life { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
.life-bar { height: 6px; background: #e6edf7; border-radius: 99px; overflow: hidden; }
.life-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.life-bar i.low { background: var(--gold); }
.devices-head { display: flex; justify-content: space-between; font-size: .9rem; }
.footer { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; padding: 1.5rem clamp(1rem, 3vw, 2rem) 5rem; }

@media (max-width: 980px) {
  .home-top, .tool, .topup-grid { grid-template-columns: 1fr; }
  .tool-plans { border-left: 0; border-top: 1px dashed var(--line); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .steps li::before { grid-row: auto; }
}
@media (max-width: 760px) {
  .mainnav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; border-radius: 0; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); z-index: 30; }
  .mainnav a { flex-direction: column; gap: 0; font-size: .7rem; padding: .3rem .4rem; border-radius: 10px; }
  .mainnav .ico { font-size: 1.15rem; }
  .masthead { backdrop-filter: none; background: #fffdf9; }
  .masthead-inner { justify-content: space-between; }
  .brand small { display: none; }
  .ledger li { grid-template-columns: 1fr auto; }
  .license-list { grid-template-columns: 1fr; }
}

/* ---------- admin */
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card { width: min(420px, 100%); display: grid; gap: 1.2rem; }
.qr { width: 200px; height: 200px; justify-self: center; image-rendering: pixelated; }
.codes { background: var(--bg); padding: .8rem 1rem; border-radius: 9px; font-size: 1.05rem; line-height: 1.8; columns: 2; margin: 0; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #0d2252; color: #d9dee8; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff; }
.side nav { display: grid; gap: .15rem; }
.side nav a { color: #c3cad6; text-decoration: none; padding: .5rem .7rem; border-radius: 8px; font-weight: 600; }
.side nav a:hover { background: rgba(255,255,255,.06); }
.side nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: .5rem; }
.side-foot .muted { color: #9aa3b2; font-size: .85rem; }
.side-foot button.ghost { color: #dfe9fb; border-color: #2e4a85; }
.view { padding: 1.6rem clamp(1rem, 3vw, 2.2rem); min-width: 0; }
.stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat { display: grid; gap: .3rem; text-decoration: none; color: var(--ink); }
.stat span { color: var(--muted); font-size: .88rem; }
.stat strong { font-size: 1.7rem; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 700px) { .review { grid-template-columns: 1fr; } }
.slip { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--line); display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; width: 100%; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .topbar nav { gap: .6rem; }
  .license-list { grid-template-columns: 1fr; }
}

/* ---------- members-only login / register page */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background:
  radial-gradient(circle at 12% 18%, #d6e8fb 0, transparent 38%), radial-gradient(circle at 88% 85%, #f7edd2 0, transparent 35%), var(--paper); }
.auth-wrap { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 1.05fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(16, 42, 100, .15); }
.auth-brand { background: linear-gradient(160deg, #1a4fae 0%, #0b2a66 100%); color: #e8f1ff; padding: clamp(1.6rem, 4vw, 3rem); display: grid; gap: .9rem; align-content: center; justify-items: center; text-align: center; position: relative; overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(214, 170, 82, .45); top: 50%; left: 50%; transform: translate(-50%, -62%); }
.auth-brand img { width: 260px; height: 260px; border-radius: 50%; position: relative; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.auth-brand h2 { font-size: 2.1rem; color: #fff; position: relative; }
.auth-brand p { margin: 0; opacity: .9; max-width: 22rem; font-size: 1.05rem; position: relative; }
.auth-card { padding: clamp(1.6rem, 4vw, 3rem); display: grid; gap: .9rem; align-content: center; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card > .muted { margin: -.4rem 0 .3rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
button.big { padding: .75rem 1rem; font-size: 1.02rem; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stack.tight { gap: .5rem; }
.social { width: 100%; background: #f1f5fb; color: #55617a; border-color: #e2e9f3; font-weight: 600; }
.social:disabled { cursor: not-allowed; opacity: 1; }
.social-ico { width: 1.15rem; height: 1.15rem; border-radius: 50%; display: inline-block; }
.social.google .social-ico { background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.social.line .social-ico { background: #06c755; border-radius: 5px; }
.soon { font-size: .72rem; background: #12203d; color: #fff; border-radius: 999px; padding: .05rem .5rem; margin-left: .3rem; white-space: nowrap; }
.switch { margin: .2rem 0 0; }
.switch a { font-weight: 700; }
.mono.img { object-fit: cover; padding: 0; background: none; }
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 1.6rem 1rem; }
  .auth-brand img { width: 150px; height: 150px; }
  .auth-brand::before { display: none; }
  .social { font-size: .86rem; padding: .55rem .6rem; }
}

/* ---------- pastel sky theme (overrides) */
:root {
  --bg: #f2f8ff; --ink: #1f2d4a; --muted: #6b7a96; --line: #dbe8f7;
  --brand: #3a8ee6; --brand-ink: #ffffff; --brand-soft: #e3f1ff; --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 45, 74, .04), 0 8px 24px rgba(58, 142, 230, .08);
}
body.customer { --paper: #f3f9ff; --gold: #f2b84b; }
button, .button { border-radius: 12px; }
button:not(.secondary):not(.ghost):not(.light):not(.chip):not(.social):not(.tab):not(.icon):not(.danger), .button:not(.secondary):not(.ghost):not(.light) {
  background: linear-gradient(135deg, #4fa3f0, #3a8ee6); border-color: transparent; box-shadow: 0 6px 16px rgba(58, 142, 230, .25);
}
.masthead { background: rgba(255, 255, 255, .82); }
.mainnav { background: #e8f3ff; }
.mainnav a { color: #5a6b88; }
.welcome { border-color: #e2eefb; background-image: radial-gradient(circle at 100% 0, #d3ebff 0, transparent 45%), radial-gradient(circle at 0 100%, #ece4ff 0, transparent 42%); }
.welcome p { color: var(--muted); }
.wallet-card { color: #234068; background: linear-gradient(135deg, #9ad6ff 0%, #adc2ff 55%, #d6c3ff 100%); box-shadow: 0 14px 34px rgba(90, 140, 230, .25); }
.wallet-card::after { border-color: rgba(255, 255, 255, .45); }
.wallet-card .amount, .wallet-stats b { color: #0f2b57; }
.wallet-stats div { background: rgba(255, 255, 255, .5); }
.wallet-card .label, .wallet-card .hint, .wallet-stats span { opacity: .85; }
button.light, .button.light { background: #fff; color: #2f7fd6; border-color: #fff; box-shadow: 0 6px 16px rgba(35, 64, 104, .12); }
.panel, .tool, .license, .tile, .card { border-color: #e2eefb; box-shadow: var(--shadow); }
.tool-plans { background: #f6faff; }
.plan { border-color: #e2eefb; }
.mono { border-radius: 14px; }
.side { background: linear-gradient(180deg, #2a5a9e, #1f4680); }
.side nav a { color: #dbe9ff; }
.side nav a.active { background: rgba(255, 255, 255, .2); }
.side-foot .muted { color: #c6d9f5; }
.side-foot button.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.auth-page { background: radial-gradient(circle at 12% 18%, #cfe8ff 0, transparent 40%), radial-gradient(circle at 88% 85%, #ebe2ff 0, transparent 38%), var(--paper); }
.auth-wrap { box-shadow: 0 30px 80px rgba(58, 142, 230, .16); }
.auth-brand { color: #234068; background: linear-gradient(160deg, #a5dcff 0%, #b8c7ff 58%, #dccaff 100%); }
.auth-brand::before { border-color: rgba(255, 255, 255, .7); }
.auth-brand h2 { color: #0f2b57; }
.auth-brand img { filter: drop-shadow(0 12px 26px rgba(35, 64, 104, .28)); }
.soon { background: #3a8ee6; }
.social { background: #f4f8fd; border-color: #e2eefb; }
.life-bar { background: #e6f0fb; }
.life-bar i { background: linear-gradient(90deg, #6cc0ff, #8c9cff); }

/* ---------- stronger pastel blue (less white) */
:root { --bg: #e4f1ff; --line: #c7def7; --brand-soft: #d4e9ff; }
body.customer { --paper: #dcedff; background: linear-gradient(180deg, #cfe7ff 0%, #e1efff 45%, #d8e4ff 100%) fixed; }
body.admin { background: linear-gradient(180deg, #dcedff 0%, #e8f2ff 100%) fixed; }
.masthead { background: rgba(190, 224, 255, .78); border-bottom-color: #b6d6f6; }
.mainnav { background: rgba(255, 255, 255, .55); }
.mainnav a.active { background: #fff; }
.welcome { background-color: #f3f9ff; border-color: #c7def7; background-image: radial-gradient(circle at 100% 0, #bfe1ff 0, transparent 50%), radial-gradient(circle at 0 100%, #dcd3ff 0, transparent 45%); }
.panel, .tool, .license, .tile, .card, .plan, .table-wrap, .auth-card { background-color: #f6fbff; border-color: #c7def7; }
.tool-plans { background: #e3f1ff; border-left-color: #c7def7; }
.plan { background: #fff; }
input, select, textarea { background: #fff; border-color: #c7def7; }
.key, .devices li { background: #e8f3ff; border-color: #c7def7; }
.wallet-card { background: linear-gradient(135deg, #7cc6ff 0%, #93adff 55%, #c2a9ff 100%); }
.auth-page { background: radial-gradient(circle at 12% 18%, #b9ddff 0, transparent 45%), radial-gradient(circle at 88% 85%, #d9ccff 0, transparent 42%), linear-gradient(180deg, #d3e9ff, #e2eeff); }
.auth-card { background: #f6fbff; }
.auth-brand { background: linear-gradient(160deg, #8fd0ff 0%, #a3b6ff 58%, #cdb5ff 100%); }
.social { background: #e8f3ff; border-color: #c7def7; }
.notice { background: #fff3d6; }
dialog { background: #f6fbff; }
.footer { color: #5a6f92; }
@media (max-width: 760px) { .mainnav { background: rgba(214, 235, 255, .96); border-top-color: #b6d6f6; } .masthead { background: #cfe6ff; } }
.auth-wrap { background: #f6fbff; }
