/* 67 | 1xBet Mini App: dark navy + electric blue, matching the 67 | 1XBET banner.
   Khmer text: Kantumruy Pro. Numbers, amounts and the brand: Exo 2 (bold italic). */
:root {
  --bg: #050A18;
  --bg2: #050A18;
  --card: #0B1530;
  --card2: #102047;
  --text: #FFFFFF;
  --muted: #93A6CC;
  --accent: #0A6CFF;
  --hi: #84B5FF;           /* light blue for links, icons and highlights */
  --accent-text: #FFFFFF;
  --link: #84B5FF;
  --danger: #FF8A8A;
  --green: #34D399;
  --amber: #FBBF24;
  --line: rgba(92, 193, 255, 0.16);
  --line2: rgba(92, 193, 255, 0.3);
  --glow: 0 12px 30px rgba(10, 108, 255, 0.45);
  --radius: 22px;
  --font: 'Kantumruy Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --num: 'Exo 2', 'Kantumruy Pro', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}
body.no-tabs { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
.num { font-family: var(--num); font-style: italic; font-weight: 800; letter-spacing: 0.2px; }

#app { max-width: 520px; margin: 0 auto; padding: 18px 18px 0; display: flex; flex-direction: column; gap: 18px; }
.center-screen { min-height: 70vh; display: grid; place-items: center; text-align: center; color: var(--muted); }
.center-screen p { margin: 12px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 14px; margin: 0; min-height: 0; }
.error:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---- top bar, brand, round icon buttons ---- */
.topbar, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head h1 { margin: 0; font-size: 17px; font-weight: 700; text-align: center; flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 22px; letter-spacing: 0.5px; }
.brand i { font-style: italic; color: var(--hi); }
.brand .bar { width: 2px; height: 22px; background: var(--hi); box-shadow: 0 0 10px var(--hi); }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--card); border: 1px solid var(--line2); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn:active { transform: scale(0.95); }
.icon-spacer { width: 44px; flex: none; }

/* ---- home ---- */
.hero-banner { border-radius: 22px; overflow: hidden; border: 1px solid rgba(92, 193, 255, 0.35); box-shadow: 0 10px 34px rgba(10, 108, 255, 0.35); aspect-ratio: 2 / 1; background: var(--card); }
.hero-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.greet h1 { margin: 2px 0 0; font-size: 23px; font-weight: 700; line-height: 1.35; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(52, 211, 153, 0.12); color: var(--green); font-size: 12px; font-weight: 600; white-space: nowrap; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.act-grid, .mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line2); color: var(--text); text-align: left; }
.act.primary { background: var(--accent); border-color: transparent; box-shadow: var(--glow); }
.act-ico { width: 46px; height: 46px; border-radius: 15px; background: var(--card2); color: var(--hi); display: flex; align-items: center; justify-content: center; }
.act.primary .act-ico { background: rgba(255, 255, 255, 0.18); color: #fff; }
.act b { display: block; font-size: 21px; font-weight: 700; }
.act small { display: block; font-size: 12px; color: var(--muted); }
.act.primary small { color: rgba(255, 255, 255, 0.88); }
.act:active, .mini:active { transform: scale(0.98); }
.mini { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; }
.mini small { font-size: 12px; color: var(--muted); }
.mini .num { font-size: 28px; line-height: 1; }
.mini .go { font-size: 12px; font-weight: 600; color: var(--hi); }
.mini.game { border: 1.5px solid var(--hi); box-shadow: inset 0 0 22px rgba(10, 108, 255, 0.25); }
.mini.game .num { font-size: 21px; }
.mini.locked { border-color: var(--line); box-shadow: none; opacity: 0.75; }
.mini-top { display: flex; align-items: center; justify-content: space-between; width: 100%; color: var(--hi); }
.sec-head { display: flex; align-items: center; justify-content: space-between; }
.sec-head b { font-size: 16px; }
.link-btn { background: none; border: none; padding: 6px 0; color: var(--hi); font-size: 13px; font-weight: 600; }
.help-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--text); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

/* ---- activity feed (home + history) ---- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(92, 193, 255, 0.1); }
.feed-item:last-child { border-bottom: none; }
.f-ico { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(10, 108, 255, 0.22); color: var(--hi); }
.f-ico.wd { background: var(--card2); color: #fff; }
.f-ico.ref { background: rgba(185, 166, 255, 0.16); color: #C4B5FD; }
.f-ico.off { background: var(--card2); color: var(--muted); }
.f-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.f-mid b { font-size: 15px; font-weight: 600; }
.f-mid small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.f-right .num { font-size: 16px; font-weight: 700; }
.f-right .num.off { color: var(--muted); text-decoration: line-through; }
.st { font-size: 12px; font-weight: 500; }
.st.wait { color: var(--amber); } .st.ok { color: var(--green); } .st.off { color: var(--muted); } .st.bad { color: var(--danger); }
.day { font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 0 2px; }
.day:first-child { padding-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 14px; }

/* ---- big main button ---- */
.cta { width: 100%; height: 60px; border: none; border-radius: 999px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; box-shadow: var(--glow); }
.cta:disabled { opacity: 0.45; box-shadow: none; }
.cta.light { background: #F5F6F8; color: #050A18; box-shadow: none; }
.cta.outline { height: 52px; background: transparent; border: 1px solid var(--line2); box-shadow: none; font-size: 15px; font-weight: 600; }
.cta-danger { width: 100%; height: 48px; border: none; background: none; color: var(--danger); font-size: 15px; font-weight: 600; }
.cta:active:not(:disabled) { transform: scale(0.99); }

/* ---- top-up: 1xBet ID, amount, keypad ---- */
.id-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.id-card.editing { border-color: var(--hi); box-shadow: 0 0 0 3px rgba(10, 108, 255, 0.18); }
.id-badge { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--card2); color: var(--hi); display: flex; align-items: center; justify-content: center; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 13px; }
.id-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.id-txt small { font-size: 12px; color: var(--muted); }
.id-txt b { font-family: var(--num); font-weight: 700; font-size: 18px; letter-spacing: 0.5px; }
.id-input { width: 100%; border: none; background: transparent; outline: none; padding: 0; font-family: var(--num); font-weight: 700; font-size: 18px; letter-spacing: 0.5px; color: #fff; }
.id-input::placeholder { color: #4A5B85; font-weight: 600; }
.pill-btn { height: 38px; flex: none; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: #fff; font-size: 13px; font-weight: 600; }
.amount-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 0; }
.amount-display { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 72px; line-height: 1.15; letter-spacing: -1px; padding: 0 12px; text-shadow: 0 0 28px rgba(10, 108, 255, 0.7); white-space: nowrap; }
.amount-display.long { font-size: 56px; }
.amount-display .ghost { color: #2B3C66; text-shadow: none; }
.presets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.preset { height: 42px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: #fff; font-family: var(--num); font-weight: 700; font-size: 15px; padding: 0; }
.preset.is-active { background: var(--accent); border-color: transparent; box-shadow: 0 0 16px rgba(10, 108, 255, 0.6); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.key { height: 58px; border: none; border-radius: 18px; background: transparent; color: #fff; font-family: var(--num); font-size: 28px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.key:active { background: var(--card); }

/* ---- payment: the white KHQR ticket ---- */
.timer-pill { height: 34px; flex: none; padding: 0 12px; border-radius: 999px; background: rgba(251, 191, 36, 0.14); color: var(--amber); display: flex; align-items: center; gap: 6px; font-family: var(--num); font-weight: 700; font-size: 15px; }
.ticket { position: relative; background: #fff; color: #050A18; border-radius: 26px; box-shadow: 0 16px 44px rgba(10, 108, 255, 0.35); }
.ticket-head { height: 46px; border-radius: 26px 26px 0 0; background: var(--bg); border: 1px solid var(--line2); border-bottom: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 17px; color: #fff; }
.ticket-head i { font-style: italic; color: var(--hi); }
.ticket-head .bar { width: 2px; height: 16px; background: var(--hi); }
.ticket-body { padding: 18px 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ticket-body .label { font-size: 13px; color: #4B5563; }
.ticket-amount { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 46px; line-height: 1.05; }
.khqr { width: 214px; border-radius: 16px; overflow: hidden; border: 1px solid #E5E7EB; }
.khqr-bar { height: 30px; background: #E1232E; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.khqr img { display: block; width: 100%; height: auto; padding: 10px; background: #fff; }
.tear { position: relative; height: 0; border-top: 2px dashed #E5E7EB; margin: 0 22px; }
.tear::before, .tear::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.tear::before { left: -36px; } .tear::after { right: -36px; }
.ticket-rows { padding: 14px 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.trow > span:first-child { color: #4B5563; }
.trow b { font-family: var(--num); font-weight: 700; }
.wait-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #92400E; }
.wait-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #D97706; }
.note { margin: 0; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---- result screens ---- */
.done-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 24px; }
.ring { width: 108px; height: 108px; border-radius: 50%; background: rgba(10, 108, 255, 0.2); box-shadow: 0 0 44px rgba(10, 108, 255, 0.45); display: flex; align-items: center; justify-content: center; }
.ring > span { width: 78px; height: 78px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.ring.warn { background: rgba(251, 191, 36, 0.14); box-shadow: none; } .ring.warn > span { background: var(--amber); color: #050A18; }
.ring.bad { background: rgba(255, 138, 138, 0.14); box-shadow: none; } .ring.bad > span { background: var(--danger); color: #050A18; }
.done-hero h2 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.45; }
.done-hero p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.big-num { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 56px; line-height: 1; }
.steps { padding: 20px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.stp { display: flex; gap: 14px; }
.stp-rail { display: flex; flex-direction: column; align-items: center; }
.stp-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #1B2B55; display: flex; align-items: center; justify-content: center; }
.stp-line { width: 2px; height: 24px; background: #1B2B55; }
.stp.done .stp-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.stp.done .stp-line { background: var(--accent); }
.stp.now .stp-dot { border-color: var(--hi); box-shadow: 0 0 12px rgba(10, 108, 255, 0.6); }
.stp.now .stp-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--hi); }
.stp-txt { flex: 1; display: flex; flex-direction: column; padding-top: 3px; }
.stp-txt b { font-size: 15px; font-weight: 600; }
.stp-txt small { font-size: 12px; color: var(--muted); }
.stp.todo .stp-txt b { color: var(--muted); }
.kvline { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; font-size: 14px; }
.kvline > span { color: var(--muted); }
.kvline b { font-family: var(--num); font-weight: 700; }
.btn-stack { display: flex; flex-direction: column; gap: 8px; }

/* ---- withdraw ---- */
.step-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--num); font-weight: 800; font-size: 13px; box-shadow: 0 0 12px rgba(10, 108, 255, 0.6); }
.step-block { display: flex; flex-direction: column; gap: 14px; }
.code-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.code-box { height: 76px; min-width: 0; border-radius: 20px; border: 1.5px solid var(--line2); background: var(--card); color: #fff; text-align: center; font-family: var(--num); font-style: italic; font-weight: 800; font-size: 32px; outline: none; text-transform: uppercase; caret-color: var(--hi); }
.code-box.filled, .code-box:focus { border-color: var(--hi); box-shadow: 0 0 14px rgba(10, 108, 255, 0.35); }
.qr-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border-radius: 24px; border: 1.5px dashed var(--line2); background: rgba(11, 21, 48, 0.6); color: var(--muted); text-align: center; cursor: pointer; }
.qr-pick b { color: #fff; font-size: 15px; }
.qr-pick .pick-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--card2); color: var(--hi); display: flex; align-items: center; justify-content: center; }
.qr-file { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.qr-file img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: #fff; flex: none; }
.qr-file .ok { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--green); font-weight: 600; }
.warn-card { display: flex; gap: 12px; padding: 16px; border-radius: 20px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.22); font-size: 13px; color: #E5E7EB; line-height: 1.6; }
.warn-card svg { flex: none; margin-top: 2px; color: var(--amber); }

/* ---- history ---- */
.page-title { margin: 4px 0 0; font-size: 28px; font-weight: 700; line-height: 1.3; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: #fff; font-size: 14px; }
.filter.is-active { background: var(--accent); border-color: transparent; font-weight: 700; box-shadow: 0 0 16px rgba(10, 108, 255, 0.55); }

/* ---- refer ---- */
.voucher { position: relative; border-radius: 28px; background: var(--accent); color: #fff; box-shadow: 0 16px 40px rgba(10, 108, 255, 0.45); }
.voucher-top { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.voucher-top small { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.88); }
.voucher-top .big-num { font-size: 58px; }
.voucher-stats { display: flex; gap: 18px; margin-top: 8px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.voucher .tear { border-top-color: rgba(255, 255, 255, 0.35); }
.voucher-bottom { padding: 16px 22px 20px; }
.voucher-btn { width: 100%; height: 52px; border: none; border-radius: 999px; background: #fff; color: #050A18; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; }
.voucher-btn:disabled { background: rgba(255, 255, 255, 0.25); color: #fff; }
.panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.panel h2 { margin: 0; font-size: 16px; font-weight: 700; }
.link-line { display: flex; align-items: center; gap: 10px; }
.link-line span { flex: 1; min-width: 0; font-family: var(--num); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how { display: flex; flex-direction: column; gap: 12px; }
.how b { font-size: 16px; }
.how-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.how-num { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1.5px solid var(--hi); color: var(--hi); display: flex; align-items: center; justify-content: center; font-family: var(--num); font-weight: 800; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }

/* ---- bottom navigation: floating pill ---- */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); width: calc(100% - 36px); max-width: 484px; height: 64px; padding: 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; z-index: 20; }
.tabs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab { border: none; border-radius: 999px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 0; min-width: 0; }
.tab-label { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab.is-active { background: var(--accent); color: #fff; box-shadow: 0 0 18px rgba(10, 108, 255, 0.6); }
.tab.is-active .tab-label { display: inline; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); max-width: calc(100% - 40px); background: #F5F6F8; color: #050A18; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 50; white-space: pre-line; text-align: center; }

/* ---- channel / group join ---- */
.join-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 4px; color: var(--text); }
.join-card h2 { margin: 0; font-size: 18px; line-height: 1.5; }
.join-card p { margin: 0; font-size: 14px; }
.join-ico { width: 84px; height: 84px; border-radius: 50%; background: rgba(10, 108, 255, 0.2); box-shadow: 0 0 40px rgba(10, 108, 255, 0.4); color: var(--hi); display: flex; align-items: center; justify-content: center; }
.join-card .btn, .join-card .cta { width: 100%; }

/* ================= shared pieces (admin panel uses these too) ================= */
#adminBody, #sres { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { margin: 0; font-size: 16px; font-weight: 700; }
.section-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 6px 4px -6px; }
.banner { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.28); color: #FDE68A; border-radius: 18px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.input { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card2); padding: 0 14px; color: #fff; outline: none; font-size: 15px; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--hi); box-shadow: 0 0 0 3px rgba(10, 108, 255, 0.2); }
.input::placeholder { color: #4A5B85; }
.btn { width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.green { background: #10B981; }
.btn.red { background: #E5484D; }
.btn.ghost { background: transparent; border-color: var(--line2); color: #fff; font-weight: 600; }
.btn:disabled { opacity: 0.5; }
.btn-row { display: flex; gap: 10px; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.is-active { background: var(--accent); border-color: transparent; }
.pills.small .pill { height: 32px; padding: 0 12px; font-size: 12px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.seg.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg button { height: 38px; border: none; border-radius: 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 4px; }
.seg button.is-active { background: var(--accent); color: #fff; }
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(92, 193, 255, 0.08); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv > span { color: var(--muted); }
.rows { display: flex; flex-direction: column; }
code { font-family: var(--num); font-weight: 600; font-size: 0.95em; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.badge.wait { background: rgba(251, 191, 36, 0.14); color: var(--amber); }
.badge.off { background: var(--card2); color: var(--muted); }
.badge.bad { background: rgba(255, 138, 138, 0.14); color: var(--danger); }
.link-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 0; border: none; border-bottom: 1px solid rgba(92, 193, 255, 0.08); background: none; color: #fff; text-align: left; font-size: 14px; }
.link-row > span:nth-child(2) { flex: 1; }
.link-row:last-child { border-bottom: none; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat-card small { font-size: 12px; color: var(--muted); }
.stat-card b { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 22px; }
.stat-card span { font-size: 12px; color: var(--muted); }
.stat-card.green { border-color: rgba(52, 211, 153, 0.35); }
.stat-card.blue { border-color: var(--line2); }
.row-card { gap: 6px; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-amt { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.wd-qr { width: 120px; border-radius: 12px; background: #fff; cursor: zoom-in; transition: width .2s; }
.wd-qr.is-zoomed { width: 100%; cursor: zoom-out; }
.setting { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.switch { width: 52px; height: 30px; flex: none; border-radius: 999px; border: none; background: #2B3C66; position: relative; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--accent); box-shadow: 0 0 12px rgba(10, 108, 255, 0.5); }
.switch.on span { left: 25px; }
.progress { height: 10px; border-radius: 999px; background: var(--card2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.luck-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.luck-row span { width: 96px; flex: none; }
.luck-row input { flex: 1; accent-color: var(--accent); }
.luck-val { width: 48px; text-align: right; font-family: var(--num); }
