/* Rylnx Payments */
:root {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --panel: #f1f1f3;
  --ink: #0d0d12;
  --text: #24242c;
  --muted: #6b6b78;
  --faint: #a0a0ad;
  --line: #e5e5ea;
  --line-soft: #efeff3;
  --accent: #3b3fd8;
  --accent-2: #2f33c4;
  --accent-soft: #eeeffd;
  --accent-ink: #2f33c4;
  --on-accent: #ffffff;
  --ok: #138a55; --ok-soft: #e6f6ee;
  --warn: #a8650b; --warn-soft: #fdf3e2;
  --bad: #c2343f; --bad-soft: #fcebec;
  --code-bg: #121319; --code-text: #d9dbe8; --code-line: #23242e;
  --shadow-sm: 0 1px 2px rgb(15 15 25 / 5%);
  --shadow: 0 1px 2px rgb(13 13 18 / 4%), 0 18px 48px rgb(59 63 216 / 8%);
  --shadow-pop: 0 2px 6px rgb(15 15 25 / 6%), 0 30px 80px rgb(20 22 60 / 22%);
  --radius: 20px; --radius-sm: 12px; --control-radius: 11px; --sheet-radius: 26px;
  --sidebar: 244px;
  color-scheme: light;
  font-family: Prompt, "Leelawadee UI", Tahoma, system-ui, sans-serif;
  font-size: 14.5px; line-height: 1.6; color: var(--text);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme=dark] {
  --bg: #08080c;
  --surface: #121219;
  --surface-2: #181821;
  --panel: #16161e;
  --ink: #f3f3f7;
  --text: #dcdce4;
  --muted: #9797a6;
  --faint: #6b6b7a;
  --line: #262630;
  --line-soft: #1e1e27;
  --accent: #7175ff;
  --accent-2: #8487ff;
  --accent-soft: rgb(113 117 255 / 14%);
  --accent-ink: #a3a6ff;
  --on-accent: #ffffff;
  --ok: #3ccf8b; --ok-soft: rgb(60 207 139 / 12%);
  --warn: #f0b555; --warn-soft: rgb(240 181 85 / 12%);
  --bad: #ff6b74; --bad-soft: rgb(255 107 116 / 12%);
  --code-bg: #0b0b10; --code-text: #d9dbe8; --code-line: #1f2029;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 22%);
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 18px 48px rgb(0 0 0 / 30%);
  --shadow-pop: 0 30px 80px rgb(0 0 0 / 60%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); }
h2 { font-size: 16.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
h3 { font-size: 14.5px; font-weight: 600; color: var(--ink); }
a { color: var(--accent-ink); text-decoration: none; }
code, pre, .mono { font-family: "JetBrains Mono", Consolas, ui-monospace, monospace; }
code { font-size: 12.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: var(--control-radius); overflow-wrap: anywhere; }
small, .muted { color: var(--muted); }
small { font-size: 12.5px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-soft); }

/* Buttons */
button, .btn {
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--control-radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
button:hover, .btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--line) 60%, var(--muted)); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: none; }
.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.danger { color: var(--bad); }
.danger:hover { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.primary.danger, button.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: none; }
.primary.danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.ghost:hover { background: var(--surface-2); border-color: transparent; }
.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--control-radius); gap: 6px; }
.sm .icon { width: 15px; height: 15px; }
.lg { min-height: 48px; font-size: 15px; border-radius: var(--control-radius); }
.link { border: 0; background: none; box-shadow: none; padding: 0; min-height: 0; color: var(--accent-ink); font-weight: 600; font-size: 13.5px; }
.link:hover { background: none; color: var(--accent); text-decoration: underline; }
.block { width: 100%; }
.busy { pointer-events: none; opacity: .65; }
.icon-btn { width: 40px; padding: 0; }
.icon-btn.sm { width: 32px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.optional { font-weight: 400; color: var(--faint); margin-left: 4px; }
input, select, textarea {
  font: inherit; font-size: 14.5px; display: block; width: 100%; margin-top: 7px;
  min-height: 44px; padding: 10px 14px; border-radius: var(--control-radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a98' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
input[type=number] { appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
label small { display: block; font-weight: 400; margin-top: 6px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.error { color: var(--bad); font-size: 13px; min-height: 0; }
.error:empty { display: none; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; pointer-events: none; }
.input-icon input { margin: 0; padding-left: 38px; min-height: 38px; border-radius: var(--control-radius); font-size: 13.5px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15.5px; letter-spacing: -.01em; }
.brand b { font-weight: 700; }
.brand-name { font-weight: 500; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--control-radius); display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #5458f0, #2f33c4); box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), 0 4px 12px rgb(59 63 216 / 30%); }
.brand-mark .icon { width: 18px; height: 18px; stroke-width: 2.6; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--sheet-radius); box-shadow: var(--shadow); overflow: hidden; }
.login-hero { position: relative; padding: 40px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.login-hero h2 { margin-top: 40px; font-size: 36px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.login-hero h2 span { color: var(--faint); }
.login-hero p { color: var(--muted); max-width: 380px; line-height: 1.75; }
.login-points { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.login-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink); }
.login-points .icon { width: 34px; height: 34px; padding: 8px; border-radius: var(--control-radius); background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.login-card { position: relative; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-card h1 { font-size: 28px; }
.login-card .muted { margin: 6px 0 28px; }
.login-card .theme-toggle { position: absolute; top: 18px; right: 18px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; }
.sidebar > * { flex-shrink: 0; }
.sidebar > :empty { display: none; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; }
.sidebar-close { display: none; }
.new-btn { min-height: 42px; }
#nav { display: flex; flex: 0 1 auto; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; }
#nav > * { flex: none; }
.nav-label { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 12px 12px 4px; }
.nav-label:first-child { padding-top: 0; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--control-radius); color: var(--muted); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
#nav a:hover { background: var(--surface-2); color: var(--ink); }
#nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
#nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--control-radius); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.status-card { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.status-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.status-line .badge { margin-left: auto; font-size: 12px; }
.foot-row { display: flex; justify-content: space-between; gap: 6px; }
.foot-row .sm { flex: 1; }
.topbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgb(8 8 12 / 45%); z-index: 35; }
main { --main-top: 36px; --main-x: 40px; min-width: 0; padding: 36px 40px 64px; }
#content { max-width: 1240px; margin: 0 auto; display: grid; gap: 20px; outline: 0; }

/* Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 20px 24px 14px; margin: 0; }
.card.soft { background: var(--panel); box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card > p, .prose { color: var(--muted); line-height: 1.75; }
.card > p + p { margin-top: 10px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: grid; gap: 14px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; margin-top: 12px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-value small { font-size: 13px; font-weight: 500; margin-left: 4px; }
.stat > small { display: block; margin-top: 6px; }
.chip { width: 36px; height: 36px; border-radius: var(--control-radius); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.lg { width: 48px; height: 48px; border-radius: var(--control-radius); }
.chip.lg .icon { width: 22px; height: 22px; }

/* Badges */
.badge { display: inline; font-size: .88em; font-weight: 600; padding: 0; color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
.badge.info { color: var(--accent-ink); }
.ok-text { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.warn-text { color: var(--warn); }
.error-text { display: block; color: var(--bad); font-size: 12px; margin-top: 4px; }

/* Toolbar & segmented control */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 24px 16px; }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 320px; margin-left: auto; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--control-radius); background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { min-height: 30px; padding: 0 12px; border: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: var(--control-radius); }
.seg button:hover { color: var(--ink); background: transparent; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg button .n { font-size: 11.5px; color: var(--faint); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); font-weight: 600; }
td small { display: block; margin-top: 1px; }
td .actions { justify-content: flex-end; flex-wrap: nowrap; }
.money { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.table-foot { padding: 12px 24px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; }

/* Empty, callout, notice */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; color: var(--muted); text-align: center; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); font-size: 13.5px; line-height: 1.7; }
.callout > .icon { color: var(--warn); margin-top: 2px; }
.callout.info { background: var(--accent-soft); }
.callout.info > .icon { color: var(--accent-ink); }
.callout.bad { background: var(--bad-soft); }
.callout.bad > .icon { color: var(--bad); }
.callout.ok { background: var(--ok-soft); }
.callout.ok > .icon { color: var(--ok); }
.callout .actions { margin-top: 8px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.banner > div { flex: 1; min-width: 200px; }
.banner strong { display: block; color: var(--ink); }
.banner small { display: block; }

/* Code */
pre { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 18px 20px; border-radius: 0 0 16px 16px; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.8; }
.code { border-radius: var(--control-radius); overflow: hidden; border: 1px solid var(--code-line); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%); }
.code-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; background: var(--code-bg); border-bottom: 1px solid var(--code-line); color: #8d8fa3; font-size: 12px; font-weight: 600; }
.code-head button { margin-left: auto; background: transparent; border-color: #2c2d39; color: #c5c7d6; box-shadow: none; }
.code-head button:hover { background: #1d1e28; border-color: #3a3b48; }
.code + p, .code + .callout, p + .code { margin-top: 14px; }
/* Boxes stacked in plain flow never touch (the "shown once" warning sat glued to the API key). */
:is(.callout, .code, .copy-field, .notice-card) + :is(.callout, .code, .copy-field, .notice-card) { margin-top: 12px; }

/* Key/value list */
.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv > div > span:first-child { color: var(--muted); flex: none; }
.kv > div > :last-child { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.copy-field { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface-2); }
.copy-field code { flex: 1; background: none; border: 0; padding: 0; font-size: 12.5px; min-width: 0; }

/* Checklist & progress */
.progress { height: 8px; border-radius: var(--control-radius); background: var(--line-soft); overflow: hidden; margin: 4px 0 14px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #8a6bff); }
.checklist { display: grid; gap: 4px; }
.checklist a { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: var(--control-radius); color: var(--text); }
.checklist a:hover { background: var(--surface-2); }
.checklist strong { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.checklist small { display: block; line-height: 1.45; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed var(--faint); display: grid; place-items: center; flex: none; color: transparent; }
.checklist .done .tick { border: 0; background: var(--ok); color: #fff; }
.checklist .done .tick .icon { width: 14px; height: 14px; stroke-width: 3; }
.checklist .done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.checklist .go { margin-left: auto; color: var(--faint); width: 16px; height: 16px; }

/* Bar chart */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 190px; padding-top: 10px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 44px; min-height: 4px; border-radius: 7px 7px 6px 6px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8a6bff)); }
.bar.zero i { background: var(--line); }
.bar span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bar b { font-size: 11px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.chart-total strong { font-size: 24px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }

/* Accounts */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.account-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); display: grid; gap: 16px; align-content: start; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.account-card:hover { box-shadow: var(--shadow); }
.account-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--line); }
.account-card.is-ready::before { background: var(--ok); }
.account-card.is-blocked::before { background: var(--bad); }
.ac-head { display: flex; gap: 12px; align-items: center; }
.ac-head > div { flex: 1; min-width: 0; display: grid; }
.ac-head small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ac-head strong { color: var(--ink); font-size: 15.5px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-bank { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.ac-bank .icon { width: 20px; height: 20px; }
.ac-bank.bank-kbank { background: #138f2d; } .ac-bank.bank-scb { background: #4e2a84; } .ac-bank.bank-ktb { background: #1ba5e1; }
.ac-fields { margin: 0; display: grid; border: 1px solid var(--line-soft); border-radius: var(--control-radius); overflow: hidden; }
.ac-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 13px; }
.ac-row + .ac-row { border-top: 1px solid var(--line-soft); }
.ac-row dt { color: var(--muted); flex: none; }
.ac-row dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ac-row .mono { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ac-row .link { font-size: 13px; padding: 0; }
.ac-progress { display: grid; gap: 8px; }
.ac-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ac-bar span { height: 6px; border-radius: 99px; background: var(--line); }
.ac-bar span.done { background: var(--ok); }
.ac-bar span.now { background: var(--warn); }
.is-blocked .ac-bar span.now { background: var(--bad); }
.ac-progress small { font-size: 12.5px; color: var(--muted); }
.is-ready .ac-progress small { color: var(--ok); }
.account-card .hint { margin: 0; font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: var(--control-radius); background: var(--surface-2); }
.bind-list { display: grid; gap: 8px; }
.bind-list button { white-space: normal; text-align: left; justify-content: flex-start; line-height: 1.5; padding: 8px 12px; height: auto; }
.account-card .actions { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.add-card { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; min-height: 200px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); border-radius: var(--radius); font-weight: 600; white-space: normal; }
.add-card:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.reqs { display: grid; gap: 6px; margin-top: 14px; }
details.advanced summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 18px 24px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.advanced summary::-webkit-details-marker { display: none; }
details.advanced summary .icon { transition: transform .2s; }
details.advanced[open] summary .icon { transform: rotate(180deg); }
details.advanced summary:hover { color: var(--ink); }

/* 2FA */
.qr { display: block; width: 180px; height: 180px; padding: 10px; border-radius: var(--control-radius); background: #fff; border: 1px solid var(--line); }

/* Dialog */
dialog { width: 480px; max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--sheet-radius); padding: 28px; box-shadow: var(--shadow-pop); color: var(--text); background: var(--surface); }
dialog.wide { width: 680px; }
dialog::backdrop { background: rgb(8 8 12 / 50%); }
dialog[open] { animation: fade 160ms ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.dialog-head > div { flex: 1; min-width: 0; }
.dialog-head h2 { font-size: 19px; line-height: 1.4; }
.dialog-head p { color: var(--muted); margin-top: 4px; line-height: 1.65; font-size: 13.5px; }
.dialog-head .x { margin: -6px -8px 0 0; }
dialog .actions.end { margin-top: 22px; }
dialog pre { max-height: 50vh; overflow: auto; border-radius: var(--control-radius); }
.big-amount { text-align: center; padding: 22px; border-radius: var(--radius); background: var(--panel); margin-bottom: 16px; }
.big-amount span { display: block; color: var(--muted); font-size: 13px; }
.big-amount strong { display: block; font-size: 38px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.3; font-variant-numeric: tabular-nums; }

/* Toast */
#toast { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; gap: 10px; align-items: flex-start; max-width: min(420px, calc(100% - 32px)); padding: 14px 18px; background: var(--ink); color: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: 13.5px; line-height: 1.55; font-weight: 500; animation: fade 160ms ease-out; }
#toast .icon { color: #5fe0a8; margin-top: 1px; }
#toast.bad .icon { color: #ff8a92; }

/* LINE connect dialog (line-modal.js): plain QR, numbered steps, one status line */
dialog.line-dialog { width: min(440px, calc(100vw - 32px)); padding: 30px 32px 22px; text-align: center; }
.line-dialog h2 { margin: 0 44px 14px 0; text-align: left; font-size: 18px; }
.line-close { position: absolute; right: 10px; top: 10px; padding: 0; min-height: 44px; width: 44px; border: 1px solid transparent; border-radius: 50%; background: var(--surface); color: var(--muted); }
.line-close svg { width: 15px; height: 15px; }
.line-intro { text-align: left; color: var(--muted); margin: 0 0 18px; }
.line-consent { display: grid; gap: 14px; text-align: left; }
.line-consent label, .line-consent .error { margin: 0; }
.line-stage { display: flex; flex-direction: column; align-items: center; }
.line-stage[data-view=error] .line-visual { display: none; }
.line-stage[data-view=success] .line-visual { min-height: 60px; }
.line-visual { display: grid; place-items: center; min-height: min(212px, 52dvh); width: 100%; }
.line-qr { position: relative; width: min(208px, 100%); aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--control-radius); background: #fff; overflow: hidden; }
.line-qr img, .line-qr-ghost { width: 100%; height: 100%; object-fit: contain; transition: opacity 160ms ease-out; }
.line-qr img { animation: fade 160ms ease-out; }
.line-qr-ghost { display: block; border-radius: var(--control-radius); background: var(--surface-2); }
:root[data-theme=dark] .line-qr { background: #fff; }
.line-qr.has-pin img, .line-qr.has-pin .line-qr-ghost { opacity: .08; }
.line-pin-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; animation: fade 160ms ease-out both; }
.line-pin-label { color: #55555f; font-size: 13px; font-weight: 500; }
.line-pin { display: flex; gap: 6px; color: #121218; font-size: 36px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; line-height: 1.15; }
.line-pin span { display: inline-block; min-width: .62em; }
.line-steps { margin: 22px 0 0; padding: 0 0 0 22px; text-align: left; color: var(--text); font-size: 13.5px; line-height: 1.95; align-self: stretch; max-width: 320px; margin-inline: auto; }
.line-stage[data-view=success] .line-steps, .line-stage[data-view=error] .line-steps { display: none; }
.line-state { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; }
.line-status { margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.line-stage[data-view=success] .line-status, .line-stage[data-view=error] .line-status { font-size: 16px; font-weight: 600; color: var(--ink); }
.line-hint { margin-top: 4px; font-size: 13px; color: var(--muted); }
.line-hint:empty { display: none; }
.line-cancel { background: transparent; border: 0; box-shadow: none; color: var(--muted); font-weight: 500; }
.line-cancel:hover { background: var(--surface-2); color: var(--ink); }
.line-success { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); animation: fade 180ms ease-out both; }
.line-success svg { width: 62px; height: 62px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.line-success svg circle { opacity: .2; }
.line-success svg path { stroke-dasharray: 34; stroke-dashoffset: 34; animation: line-draw 180ms ease-out forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes line-draw { to { stroke-dashoffset: 0; } }

/* Profile switch (Sandbox / live) */
.env-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: var(--control-radius); background: var(--surface-2); border: 1px solid var(--line); }
.env-seg button { min-height: 34px; padding: 0 8px; border: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: 13px; border-radius: var(--control-radius); gap: 6px; }
.env-seg button .icon { width: 15px; height: 15px; }
.env-seg button:hover { background: transparent; color: var(--ink); }
.env-seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
:root[data-env=test] .env-seg button[aria-pressed=true] { color: var(--warn); }
:root[data-env=live] .env-seg button[aria-pressed=true] { color: var(--ok); }
.env-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; max-width: 1240px; margin: -12px auto 20px; padding: 8px 16px; border-radius: var(--control-radius); background: var(--warn-soft); color: var(--text); font-size: 13px; text-align: center; }
.env-bar > span { display: inline-flex; align-items: center; gap: 8px; }
.env-bar .icon { color: var(--warn); width: 16px; height: 16px; }
.env-bar b { color: var(--warn); }
.env-pill { min-height: 34px; padding: 0 12px; border-radius: var(--control-radius); font-size: 12.5px; gap: 6px; box-shadow: none; }
.env-pill .icon { width: 14px; height: 14px; }
:root[data-env=test] .env-pill { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
:root[data-env=live] .env-pill { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.topbar-end { display: flex; align-items: center; gap: 8px; }

/* Dashboard hub (LINE + live/sandbox) */
.grid.hub { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.hub-card { display: flex; flex-direction: column; gap: 16px; }
.hub-top { display: flex; align-items: flex-start; gap: 14px; }
.hub-top > div { flex: 1; min-width: 0; }
.hub-top h2 { font-size: 16.5px; }
.hub-top small { display: block; margin-top: 2px; line-height: 1.5; }
.hub-actions { margin-top: auto; }
.hub-actions small { flex: 1 1 160px; }
.hub-card.sandbox { background: linear-gradient(160deg, color-mix(in srgb, var(--warn-soft) 70%, var(--surface)), var(--surface) 60%); }
.mini-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.mini-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.mini-steps li::before { content: counter(s); width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.mini-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-kv span { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--control-radius); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.mini-kv strong { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.reqs { margin-top: 0; }
.reqs .step { padding: 8px 10px; border-radius: var(--control-radius); color: var(--muted); }
.reqs .step:hover { background: var(--surface-2); }
.reqs .step.done { color: var(--ok); }
.step span { min-width: 0; }

/* Cards & misc polish */
.card.flush > .toolbar:first-child { padding-top: 18px; }
.card-actions { display: flex; }
.push { margin-left: auto; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.nowrap { white-space: nowrap; }
.add-card small { font-weight: 400; color: var(--faint); }
.add-card .chip { margin: 0 auto; }
.banner .btn, .banner button { flex: none; }
.page-head > div:first-child { min-width: 0; }

/* Small spacing utilities used by dialogs */
.note { margin-top: 14px; font-size: 12.5px; line-height: 1.6; }
.note.top { margin: 0 0 16px; }
label.cap { margin: 14px 0 8px; }
label.cap:first-child { margin-top: 0; }
.gap { height: 16px; }
.card > p + .actions, .card > p + form, .card > .kv + .actions { margin-top: 16px; }

/* ---------- Responsive ---------- */
/* Wide screens: give content room, keep line length sane */
@media (min-width: 1600px) {
  #content, .env-bar { max-width: 1360px; }
  main { --main-top: 44px; --main-x: 56px; padding: 44px 56px 72px; }
}
/* Laptop */
@media (max-width: 1280px) {
  :root { --sidebar: 224px; }
  main { --main-top: 32px; --main-x: 28px; padding: 32px 28px 56px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .grid.wide-left, .grid.hub { grid-template-columns: minmax(0, 1fr); }
  .grid.two { grid-template-columns: 1fr; }
}
/* Tablet: sidebar becomes a drawer */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100dvh; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar .brand-name { white-space: nowrap; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, calc(100vw - 42px)); transform: translateX(-102%); transition: transform 190ms var(--ease-out), visibility 190ms; visibility: hidden; border-radius: 0 var(--radius) var(--radius) 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .sidebar.open { transform: none; visibility: visible; box-shadow: var(--shadow-pop); }
  .sidebar-close { display: inline-flex; }
  main { --main-top: 24px; --main-x: 20px; padding: 24px 20px 56px; }
  .env-bar { margin: 0 auto 14px; }
  .stats { gap: 12px; }
  .stat { padding: 16px; }
  .stat .chip { width: 30px; height: 30px; border-radius: var(--control-radius); }
  .stat .chip .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 22px; }
  h1 { font-size: 26px; }
  body:has(.sidebar.open) { overflow: hidden; }
  .sidebar { overscroll-behavior-y: contain; }
  #nav { overscroll-behavior-y: contain; }
}
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; border-radius: var(--sheet-radius); }
  .login-hero { display: none; }
  .login-card { padding: 44px 24px 32px; }
}
/* Phone */
@media (max-width: 600px) {
  :root { font-size: 14px; }
  main { --main-top: 16px; --main-x: 14px; padding: 16px 14px 48px; }
  #content { gap: 14px; }
  h1 { font-size: 23px; }
  .page-head { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 2px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > * { flex: 1; }
  .hide-sm { display: none !important; }
  .card { padding: 18px 16px; border-radius: var(--radius); }
  .card.flush > .card-head { padding: 16px 16px 10px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; border-radius: var(--radius); }
  .stat-top { font-size: 12px; }
  .stat .chip { display: none; }
  .stat-value { font-size: 20px; margin-top: 6px; }
  .stat > small { font-size: 11.5px; line-height: 1.4; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar { padding: 0 16px 12px; gap: 8px; }
  .card.flush > .toolbar:first-child { padding-top: 14px; }
  .toolbar .seg { max-width: 100%; flex-wrap: wrap; }
  .toolbar .seg button { flex: 0 0 auto; }
  .toolbar .input-icon { max-width: none; margin-left: 0; flex-basis: 100%; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  td { white-space: nowrap; }
  .table-foot { padding: 10px 16px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-card { padding: 16px; border-radius: var(--radius); }
  .banner { padding: 12px 14px; gap: 12px; border-radius: var(--radius); }
  .banner > div { min-width: 0; flex-basis: calc(100% - 60px); }
  .banner .btn, .banner > button { width: 100%; }
  .hub-top .badge { display: none; }
  .mini-kv strong { font-size: 14px; }
  .hub-actions > button, .hub-actions > a { flex: 1; }
  .bars { gap: 6px; height: 150px; }
  .bar b { display: none; }
  .bar span { font-size: 10.5px; white-space: normal; text-align: center; line-height: 1.3; }
  .chart-total strong { font-size: 20px; }
  .kv > div { flex-wrap: wrap; gap: 2px 12px; padding: 10px 0; }
  .kv > div > :last-child { margin-left: auto; }
  .code-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  pre { padding: 14px; font-size: 11.5px; }
  /* Dialogs become bottom sheets */
  dialog, dialog.wide { width: 100%; max-width: 100%; margin: auto 0 0; padding: 22px 16px max(18px, env(safe-area-inset-bottom)); border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top))); border-bottom: 0; }
  dialog[open] { animation: sheet .22s ease; }
  dialog .actions.end > * { flex: 1; }
  .big-amount strong { font-size: 32px; }
  dialog.line-dialog { width: 100%; padding: 22px 16px max(18px, env(safe-area-inset-bottom)); }
  #toast { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; }
}
@keyframes sheet { from { transform: translateY(14px); opacity: 0; } }
/* Very small phones */
@media (max-width: 360px) {
  .stat { padding: 12px; }
  .topbar .brand-name { display: none; }
  .mini-kv { grid-template-columns: 1fr 1fr; }
}
/* Short landscape screens: keep sidebar scrollable and compact */
@media (max-height: 640px) and (min-width: 961px) {
  .sidebar { gap: 12px; padding-top: 14px; }
  #nav a { padding: 7px 12px; }
  .nav-label { padding-top: 8px; }
}
@media (hover: none) {
  .sm { min-height: 36px; }
  .icon-btn.sm { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .line-success svg path { stroke-dashoffset: 0; }
}
/* Grid tracks must never grow past the viewport because of a wide child (tables, code, long IDs). */
#content { grid-template-columns: minmax(0, 1fr); }
.grid > *, .stats > *, .account-grid > * { min-width: 0; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar .brand { min-width: 0; }
}
@media (max-width: 440px) {
  .topbar .brand-name { display: none; }
}
.chart-card { display: flex; flex-direction: column; }
.chart-card .bars { flex: 1; min-height: 190px; height: auto; }
td.num, td strong { white-space: nowrap; }
@media (max-width: 960px) {
  td { white-space: nowrap; }
}
@media (max-width: 600px) {
  .chart-card .bars { min-height: 150px; }
}
.mini-steps li { align-items: flex-start; line-height: 1.55; }
.mini-steps li::before { margin-top: 0; }

/* Motion uses short opacity or transform transitions on the element being changed. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); }
dialog[open], .login-shell, #toast { animation: fade 160ms var(--ease-out) both; }
@media (max-width: 600px) {
  dialog[open] { animation: sheet 190ms var(--ease-out) both; }
}

/* ---------- Simplified navigation: 4 sidebar items + in-page tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; color: var(--muted); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: color .2s; }
.tabs a:hover { color: var(--ink); }
.tabs a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease-out); }
.tabs a.active { color: var(--accent-ink); font-weight: 600; }
.tabs a.active::after { transform: scaleX(1); }
.tabs .count { min-width: 20px; height: 19px; padding: 0 6px; border-radius: var(--control-radius); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
#nav .nav-label { padding-top: 0; }

/* ---------- LINE onboarding + status row ---------- */
.onb-icon { width: 68px; height: 68px; border-radius: var(--control-radius); display: grid; place-items: center; background: #06c755; color: #fff; box-shadow: none; }
.onb-icon .icon { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.onb-error { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--control-radius); background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 500; }
.onb-error .icon { width: 16px; height: 16px; }
.onb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(820px, 100%); margin: 14px auto 10px; }
.onb-step { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 16px; border-radius: var(--control-radius); background: var(--surface-2); border: 1px solid var(--line-soft); }
.onb-step > span { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--line); color: var(--muted); }
.onb-step.on > span { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.onb-step strong { display: block; color: var(--ink); font-size: 14px; }
.onb-step small { display: block; line-height: 1.5; margin-top: 2px; }
.onboarding { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 28px 32px; }
.onboarding > p { max-width: 640px; color: var(--muted); text-wrap: balance; }
.line-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--control-radius); background: var(--surface-2); border: 1px solid var(--line-soft); flex-wrap: wrap; }
.line-row > div:not(.actions) { flex: 1; min-width: 180px; }
.line-row strong { display: block; color: var(--ink); font-weight: 600; }
.line-row small { display: block; }
.line-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); flex: none; }
.line-avatar.ok { background: #06c755; color: #fff; }
.line-avatar.warn { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 720px) {
  .onb-steps { grid-template-columns: 1fr; }
  .onboarding { padding: 32px 18px 28px; }
  .onboarding .lg { width: 100%; }
}

/* ---------- Custom dropdown (replaces native select) ---------- */
.dd { position: relative; margin-top: 7px; }
.dd-trigger { width: 100%; justify-content: space-between; min-height: 44px; padding: 0 12px 0 14px; border-radius: var(--control-radius); font-weight: 500; font-size: 14.5px; color: var(--ink); box-shadow: none; text-align: left; }
.dd-trigger:active { transform: none; }
.dd-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dd-trigger .icon { color: var(--faint); width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.dd.open .dd-trigger { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.dd.open .dd-trigger .icon { transform: rotate(180deg); color: var(--accent); }
.dd-menu { position: fixed; z-index: 1000; max-height: 280px; overflow-y: auto; padding: 6px; border-radius: var(--control-radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: dd-in .16s var(--ease-out); }
.dd-menu [role=option] { width: 100%; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--control-radius); box-shadow: none; background: transparent; color: var(--text); font-weight: 500; font-size: 14px; text-align: left; white-space: normal; line-height: 1.4; }
.dd-menu [role=option]:hover, .dd-menu [role=option]:focus-visible { background: var(--surface-2); outline: 0; }
.dd-menu [role=option] .icon { width: 16px; height: 16px; color: var(--accent); opacity: 0; flex: none; }
.dd-menu [role=option][aria-selected=true] { color: var(--accent-ink); font-weight: 600; background: var(--accent-soft); }
.dd-menu [role=option][aria-selected=true] .icon { opacity: 1; }
.dd-menu [role=option]:active { transform: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Custom tooltip (replaces native title) ---------- */
[data-tip] { position: relative; }
[data-tip]::after { content: none; position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 60; transform: translate(-50%, 4px); padding: 6px 10px; border-radius: var(--control-radius); background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: var(--shadow-sm); }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); opacity: 1; transform: translate(-50%, 0); animation: tip-in .15s ease; }
@keyframes tip-in { from { opacity: 0; } }
td:last-child [data-tip]::after { left: auto; right: 0; transform: translate(0, 4px); }
td:last-child [data-tip]:hover::after, td:last-child [data-tip]:focus-visible::after { transform: none; }
.bar[data-tip]::after { bottom: auto; top: -6px; }
@media (hover: none) { [data-tip]::after { display: none; } }

/* ---------- Drop-down alert (replaces the corner toast) ---------- */
#toast { left: 50%; right: auto; top: 16px; bottom: auto; width: min(440px, calc(100% - 24px)); max-width: none; transform: translateX(-50%); display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); overflow: hidden; animation: fade 160ms var(--ease-out) both; }
#toast .t-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
#toast.bad .t-ic { background: var(--bad-soft); color: var(--bad); }
#toast .t-ic .icon { width: 17px; height: 17px; stroke-width: 2.4; color: inherit; margin: 0; }
#toast .t-msg { flex: 1; min-width: 0; display: grid; gap: 1px; padding-top: 1px; }
#toast .t-msg strong { color: var(--ink); font-size: 14px; }
#toast .t-msg span { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; font-weight: 400; }
#toast .t-x { width: 28px; min-height: 28px; padding: 0; border: 0; box-shadow: none; background: transparent; color: var(--faint); border-radius: var(--control-radius); }
#toast .t-x:hover { background: var(--surface-2); color: var(--ink); }
#toast .t-x .icon { width: 15px; height: 15px; animation: none; color: inherit; margin: 0; }
@media (max-width: 600px) { #toast { top: max(10px, env(safe-area-inset-top)); left: 50%; right: auto; bottom: auto; } }

/* ---------- Native chrome replaced: scrollbars, autofill, search/reveal buttons ---------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 35%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 32%, transparent); border-radius: var(--control-radius); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 55%, transparent); }
::-webkit-scrollbar-corner { background: transparent; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--surface) inset; caret-color: var(--ink); transition: background-color 9999s; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
input::-ms-reveal, input::-ms-clear { display: none; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: calc(50% + 3.5px); transform: translateY(-50%); width: 36px; min-height: 36px; padding: 0; border-radius: var(--control-radius); color: var(--faint); }
.pw-eye:active { transform: translateY(-50%) scale(.95); }
.pw-eye.on { color: var(--accent); }

/* ---------- Auth (sign in / sign up / Google completion / 2FA) ---------- */
.login-shell { position: relative; min-height: 500px; }
.auth-theme { position: absolute; top: 18px; right: 18px; z-index: 2; }
.login-card { gap: 0; padding: 52px 48px 40px; }
.login-card h1 { font-size: 28px; letter-spacing: -.02em; }
.login-card > .muted { margin: 6px 0 24px; }
.login-card > .chip.lg { margin-bottom: 16px; }
.login-card > .callout { margin-bottom: 18px; }
.login-card form.form-grid { gap: 0 14px; }
.login-card label { margin-bottom: 14px; }
.login-card .error:not(:empty) { margin: -2px 0 12px; }
.google-btn { gap: 12px; background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 600; box-shadow: var(--shadow-sm); }
.google-btn:hover { background: var(--surface-2); }
.g-logo { width: 20px; height: 20px; flex: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch a { font-weight: 600; }
.who { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 8px 14px; margin-bottom: 18px; border-radius: var(--control-radius); background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; font-size: 13.5px; color: var(--ink); max-width: 100%; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otp-input { font-size: 24px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* Custom checkbox (no native control) */
.check { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; color: var(--text) !important; font-size: 13.5px !important; line-height: 1.6; cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.check .box { width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent); background: var(--surface); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.check .box .icon { width: 13px; height: 13px; stroke-width: 3; transform: scale(.4); transition: transform .2s var(--ease-out); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check input:checked + .box .icon { transform: scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.check .link { font-size: inherit; margin: 0 4px; font-weight: 600; }

/* ---------- Sidebar user card ---------- */
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--control-radius); color: var(--text); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.user-card:hover { background: var(--surface-2); border-color: var(--line); }
.user-card:empty { display: none; }
.user-card > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.user-card strong { color: var(--ink); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .go { width: 15px; height: 15px; color: var(--faint); transform: rotate(-90deg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-2); color: #fff; font-weight: 700; font-size: 15px; }
#nav .count.bad { background: var(--bad-soft); color: var(--bad); }
#nav .nav-label { padding-top: 14px; }
#nav .nav-label:first-child { padding-top: 0; }

/* ---------- Welcome, plan, billing ---------- */
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card.feature { display: grid; gap: 6px; align-content: start; }
.card.feature .chip { margin-bottom: 6px; }
.card.feature strong { color: var(--ink); font-size: 15px; }
.plan-usage strong { font-size: 30px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-usage strong small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan-usage .progress { margin: 10px 0 18px; }
.plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan-list li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
.plan-list .icon { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 2.6; }
.fee-figure { display: grid; gap: 2px; margin-bottom: 12px; }
.fee-figure strong { font-size: 30px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 60%, var(--surface)); }
.pay-box { display: grid; justify-items: center; gap: 4px; }
.pay-box .big-amount { width: 100%; }
.pay-qr { width: 240px; height: 240px; padding: 10px; border-radius: var(--control-radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pay-box .line-state { margin-top: 12px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 25%, var(--line)); }
.danger-zone h2 { color: var(--bad); }
.legal-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 4px 0 8px; }
.legal-links .link { color: var(--muted); font-weight: 500; }
ol.legal { margin: 0; padding-left: 20px; display: grid; gap: 12px; color: var(--text); line-height: 1.75; font-size: 14px; }
ol.legal strong { color: var(--ink); }
.skeleton { height: 18px; border-radius: var(--control-radius); background: var(--surface-2); margin: 8px 0; }
.skeleton.short { width: 55%; }
@media (max-width: 1100px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) { .grid.three { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .login-shell { min-height: 0; }
  .login-card { padding: 44px 22px 30px; }
  .login-card form.form-grid { grid-template-columns: 1fr; }
}
.grid.top { align-items: start; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-grid > .card:first-child { grid-column: 1 / -1; }
.settings-grid > .card:first-child .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid > .card { padding: clamp(16px, 2vw, 24px); }
.settings-grid > .card > .actions { margin-top: 14px; }
.settings-grid .card-head { margin-bottom: 12px; }
.settings-grid .kv > div { gap: 12px; }
.settings-grid input[readonly] { text-overflow: ellipsis; }
.audit-head { align-items: center; }
.audit-head .input-icon { flex: 0 1 240px; }
.audit-card td, .audit-card td small { white-space: normal; overflow-wrap: anywhere; }

.device-list { list-style: none; padding: 0; margin: 0; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.device-list small { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.device-list .badge { margin-inline-start: 6px; }
.totp-setup { display: grid; gap: 12px; margin-bottom: 16px; }
.totp-setup img { justify-self: center; width: min(180px, 100%); height: auto; }
.totp-setup summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; }
.totp-setup .copy-field { margin-top: 8px; }
.pager { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); }
#content[data-page=billing] .empty { padding: 12px 24px 24px; align-items: flex-start; text-align: start; }
#content[data-page=billing] .empty .chip { display: none; }
.suspension-note { white-space: normal; overflow-wrap: anywhere; width: max-content; max-width: 22ch; }
.legal-page { max-width: 860px; }
.legal-copy { display: grid; gap: 10px; overflow-wrap: anywhere; }
.legal-copy h2:not(:first-child) { margin-top: 14px; }
.legal-copy ul { margin: 0; padding-inline-start: 1.4rem; }
.legal-copy li + li { margin-top: 8px; }
.legal-copy a, .login-card .legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; }
[data-public-legal] .login-shell { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
[data-public-legal] .login-hero { display: none; }
[data-public-legal] .login-card { padding: clamp(16px, 4vw, 40px); }
[data-public-legal] .legal-page { box-shadow: none; }
[data-public-legal] .login-card > p { margin-top: 16px; }
.table-wrap:focus-visible { outline-offset: -3px; }
.table-wrap th { text-wrap: nowrap; }
.table-wrap td:first-child strong { overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .audit-head .input-icon { flex-basis: 100%; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-wrap tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px 18px; border-top: 1px solid var(--line-soft); }
  .table-wrap tr:hover { background: transparent; }
  .table-wrap td, .table-wrap td strong, .table-wrap td small { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td { display: block; padding: 0; border: 0; }
  .table-wrap td:first-child, .table-wrap td[data-label=""] { grid-column: 1 / -1; }
  .table-wrap td:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
  .table-wrap td .actions { justify-content: flex-start; flex-wrap: wrap; }
  .table-wrap td[data-label=""]:has(.actions:empty) { display: none; }
}
@media (max-width: 680px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .settings-grid > .card:first-child .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar .input-icon { min-width: 0; }
  #status-card { display: none; }
  .topbar { gap: 8px; }
  .env-bar > button { display: none; }
  dialog .actions.end { gap: 8px; }
  dialog .actions.end > * { min-width: 0; white-space: normal; }
}
@media (max-width: 820px) and (pointer: coarse) {
  input, select, textarea, .input-icon input { font-size: 16px; }
  .seg button { min-height: 38px; }
  .table-wrap td button, .table-wrap td .btn { min-height: 40px; }
}
input[readonly] { background: var(--surface-2); color: var(--muted); cursor: default; }
input[readonly]:focus { border-color: var(--line); box-shadow: none; }

/* ---------- Admin charts (2026-11-20) ---------- */
:root { --series-1: var(--accent); --series-2: #d97706; }
.announce { max-width: 1240px; margin: 0 auto 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-line; }
.range-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.vchart { margin: 0; min-width: 0; }
.vc-readout { margin: 0 0 10px; min-height: 1.6em; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vc-plot { position: relative; height: 200px; padding-left: 52px; }
.vc-grid { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.vc-grid span { display: block; border-top: 1px solid var(--line-soft); font-size: 11px; line-height: 1; color: var(--faint); width: 100%; padding-top: 2px; font-variant-numeric: tabular-nums; }
.vc-grid span:last-child { border-top-color: var(--line); }
.vc-cols { position: relative; display: flex; align-items: stretch; gap: 2px; height: 100%; }
.vc-col { all: unset; position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 22px; cursor: pointer; border-radius: 4px; }
.vc-col:hover, .vc-col:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.vc-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vc-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: 70%; max-width: 28px; margin: 0 auto; height: 0; }
.vc-stack i { display: block; min-height: 2px; flex-basis: 0; }
.vc-stack i:last-child { border-radius: 4px 4px 0 0; }
.vc-col em { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.vc-cols .vc-col:first-child em { left: 0; transform: none; }
.vc-cols .vc-col:last-child em { left: auto; right: 0; transform: none; }
i.s1 { background: var(--series-1); } i.s2 { background: var(--series-2); }
i.ok { background: var(--ok); } i.warn { background: var(--warn); } i.bad { background: var(--bad); } i.muted, i.empty { background: var(--line); }
.vc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text); }
.vc-legend span, .breakdown li { display: inline-flex; align-items: center; gap: 8px; }
.vc-legend i, .breakdown li > i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.vc-table { margin-top: 12px; font-size: 13px; }
.vc-table summary { cursor: pointer; color: var(--muted); width: fit-content; }
.vc-table .table-wrap { margin-top: 10px; max-height: 280px; overflow: auto; }
.breakdown .bd-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.breakdown .bd-bar i { display: block; flex-basis: 0; min-width: 4px; }
.breakdown ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.breakdown li { display: grid; grid-template-columns: 10px 1fr auto 44px; font-size: 13.5px; }
.breakdown li strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.breakdown li small { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.breakdown + .kv { margin-top: 12px; border-top: 1px solid var(--line-soft); }
@media (max-width: 600px) {
  .vc-plot { height: 170px; padding-left: 44px; }
  .range-row { justify-content: flex-start; }
  .vc-cols { gap: 1px; }
}
.bars.is-empty { position: relative; }
.bars.is-empty::before { content: attr(data-empty); position: absolute; inset: 0 0 36px; display: grid; place-items: center; color: var(--faint); font-size: 13px; text-align: center; }
/* LINE-first gate: shop tools stay hidden until LINE is linked once */
/* The Sandbox/live switch stays visible while gated, so the shop can always switch back. */
:root[data-gated] .new-btn, :root[data-gated] .topbar [data-action=new-payment], :root[data-gated] #env-bar { display: none !important; }

/* ---------- Dialogs ---------- */
dialog { width: min(500px, calc(100vw - 32px)); padding: 24px; }
dialog.wide { width: min(680px, calc(100vw - 32px)); }
dialog.payment-dialog { width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(8 8 12 / 50%); backdrop-filter: blur(4px); }
.dialog-head { align-items: flex-start; text-align: start; gap: 12px; margin-bottom: 16px; padding-inline-end: 34px; }
.dialog-head .chip { width: 38px; height: 38px; border-radius: 11px; }
.dialog-head .chip .icon { width: 19px; height: 19px; }
.dialog-head h2 { font-size: 18px; color: var(--ink); }
.dialog-head p { margin-top: 2px; }
.dialog-head .x { position: absolute; inset-inline-end: 10px; top: 10px; margin: 0; padding: 0; width: 44px; min-height: 44px; border-radius: 50%; color: var(--muted); }
.dialog-head .x .icon { width: 15px; height: 15px; }
.dialog-head .x:hover { color: var(--ink); }
dialog form { text-align: left; }
dialog .error:empty { display: none; }
dialog .error { margin-top: 12px; }
dialog:not(.line-dialog) .actions.end { align-items: stretch; gap: 8px; margin-top: 16px; }
dialog:not(.line-dialog) .actions.end > * { min-width: 0; justify-content: center; min-height: 44px; }
.form-dialog .form-grid > label { min-width: 0; }
.clipboard-field { position: fixed; inset-inline-start: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
dialog .actions.end > [data-close]:not(.primary) { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); font-weight: 500; }
dialog .actions.end > [data-close]:not(.primary):hover { background: var(--surface-2); color: var(--ink); }
dialog .big-amount { border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-soft); }
dialog .kv { text-align: left; }
.line-state.busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.pay-stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pay-amount span { display: block; color: var(--muted); font-size: 13px; }
.pay-amount strong { display: block; font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.pay-visual { display: grid; place-items: center; width: 100%; margin-top: 12px; }
.pay-stage[data-view=success] .pay-visual { margin-top: 8px; }
.pay-stage[data-view=success] .line-steps { display: none; }
.pay-stage .line-steps { margin-top: 18px; }
.pay-stage .line-status { font-variant-numeric: tabular-nums; }
.pay-stage[data-view=success] .line-status { font-size: 16px; font-weight: 600; color: var(--ink); }
@media (max-width: 600px) {
  dialog, dialog.wide, dialog.payment-dialog { width: 100%; max-width: 100%; padding: 20px 16px max(16px, env(safe-area-inset-bottom)); }
  dialog:not(.line-dialog) .actions.end > * { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .line-state.busy::before { animation: none; } }

/* ---------- Layout polish (2026-11-20) ---------- */
.foot-links { display: flex; justify-content: center; gap: 14px; font-size: 12px; }
.foot-links a { color: var(--faint); }
.foot-links a:hover { color: var(--ink); }
.chart-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.chart-foot span { display: block; font-size: 12px; color: var(--muted); }
.chart-foot strong { display: block; font-size: 15px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chart-card .bars { max-height: 300px; }
.card .line-row + .kv { margin-top: 12px; }
.card-pad { padding: 4px 24px 24px; }
.compact-empty .empty { padding: 28px 20px 32px; }
.mini-steps.roomy { gap: 16px; }
.mini-steps.roomy li { align-items: flex-start; }
.mini-steps.roomy strong { display: block; color: var(--ink); font-weight: 600; }
.mini-steps.roomy small { display: block; color: var(--muted); }
.grid.two > .add-card { min-height: 100%; }
#content[data-page=billing] .billing-summary .card > p { color: var(--muted); }
#content[data-page=billing] .billing-summary .card .actions { margin-top: 14px; }
@media (max-width: 600px) {
  .chart-foot { gap: 8px; }
  .chart-foot strong { font-size: 13.5px; }
  .card-pad { padding: 4px 16px 16px; }
}
.plan-list + .kv { margin-top: 14px; border-top: 1px solid var(--line-soft); }
dialog form > .note { margin: 12px 0 18px; color: var(--muted); }
.payment-dialog form > .payment-hint { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--control-radius); background: var(--surface-2); }
.platform-settings > .card { display: flex; flex-direction: column; }
.platform-settings form { display: flex; flex-direction: column; flex: 1; }
.platform-settings form > .actions { margin-top: auto; padding-top: 8px; }
.platform-connections section + section { border-inline-start: 1px solid var(--line-soft); padding-inline-start: 20px; }
.platform-connections section > p { color: var(--muted); overflow-wrap: anywhere; }
.platform-connections section > p + form, .platform-connections section > .actions { margin-top: 12px; }
.platform-connections form + .billing-connections { padding-top: 12px; border-top: 1px solid var(--line-soft); }
@media (max-width: 1100px) {
  .platform-connections section + section { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line-soft); padding-top: 16px; }
}
.ac-row .link.muted { color: var(--muted); font-weight: 500; }

/* Account verification QR (2026-12-04) */
.verify-qr { display: grid; justify-items: center; gap: 10px; text-align: center; margin: 4px 0 8px; }
.verify-qr .qr { width: 240px; height: 240px; background: #fff; border-radius: 12px; padding: 8px; }
.verify-qr strong { font-size: 22px; }

/* Receipt: print only the open dialog */
@media print {
  body > *:not(dialog[open]) { display: none !important; }
  dialog[open] { position: static; box-shadow: none; border: 0; max-width: none; width: 100%; }
  dialog[open] .actions, dialog[open] [data-close], dialog::backdrop { display: none !important; }
}

/* Separator between inline facts: a thin rule instead of a middle dot (2026-12-05) */
.sep { display: inline-block; width: 1px; height: .85em; margin: 0 .6em; vertical-align: -.08em; background: currentColor; opacity: .3; font-style: normal; }


/* Admin user detail (2026-12-05) */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.detail-sec { min-width: 0; }
.detail-sec h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.detail-sec h4 { font-size: 12.5px; font-weight: 600; margin: 12px 0 6px; color: var(--muted); }
.detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.detail-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.detail-list li > span { display: grid; min-width: 0; }
.detail-list small { color: var(--muted); }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
/* System settings: the operator form takes a full row instead of leaving a hole beside it */
.platform-settings > .card:nth-child(3) { grid-column: 1 / -1; }

/* Long references (invoice numbers) wrap instead of pushing tables wider */
.table-wrap td .link, .table-wrap td code, .table-wrap td .mono { white-space: normal; overflow-wrap: anywhere; text-align: start; }

.detail-grid > .detail-sec:last-child { grid-column: 1 / -1; }


/* ---------- 2026-12-05: announcement card, sign-in notice, trial banner ---------- */
.announce { --ann-bg: #fff8e3; --ann-line: #f3e2ae; --ann-ink: #4f3b0a; --ann-text: #6b5419; --ann-ic: #b7791f; --ann-soft: #fcedbf; --ann-chip: #fffdf6; --ann-chip-line: #efd98f; --ann-code: #fdf2d0; --ann-code-text: #4f3b0a; --ann-btn: #f8e3a1; display: flex; align-items: flex-start; gap: 14px; max-width: none; margin: calc(-1 * var(--main-top)) calc(-1 * var(--main-x)) 28px; padding: 16px var(--main-x); border-radius: 0; background: var(--ann-bg); border: 0; border-bottom: 1px solid var(--ann-line); box-shadow: none; color: var(--ann-text); font-size: 14.5px; line-height: 1.65; white-space: normal; }
.announce[hidden] { display: none; }
:root[data-theme=dark] .announce { --ann-bg: #1c1a13; --ann-line: #3a3320; --ann-ink: #f6e3ac; --ann-text: #d9c99c; --ann-ic: #f2c46b; --ann-soft: #2c2716; --ann-chip: #25211a; --ann-chip-line: #4a4027; --ann-code: #14130e; --ann-code-text: #f3e5bd; --ann-btn: #3a3220; }
.announce .ann-copy:hover { filter: brightness(.97); }
.announce .ann-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ann-soft); color: var(--ann-ic); }
.announce .ann-ic svg { width: 18px; height: 18px; }
.announce .ann-main { flex: 1; min-width: 0; padding-top: 5px; }
.announce strong { display: block; color: var(--ann-ink); font-weight: 700; font-size: 15px; }
.announce .ann-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 4px; }
.announce .ann-body p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--ann-text); font-weight: 500; }
.announce .ann-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; min-height: 0; margin: 0 2px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--ann-chip-line); background: var(--ann-chip); color: var(--ann-ink); font: inherit; vertical-align: baseline; cursor: copy; box-shadow: none; }
.announce .ann-chip code { font-family: "JetBrains Mono", Consolas, ui-monospace, monospace; font-size: .92em; font-weight: 600; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; overflow-wrap: anywhere; }
.announce .ann-chip svg { width: 13px; height: 13px; flex: none; opacity: .7; }
.announce .ann-chip:hover { background: var(--ann-soft); }
.announce .ann-code { position: relative; border-radius: 10px; border: 1px solid var(--ann-line); background: var(--ann-code); color: var(--ann-code-text); }
.announce .ann-code pre { margin: 0; padding: 12px 96px 12px 14px; overflow-x: auto; font-family: "JetBrains Mono", Consolas, ui-monospace, monospace; font-size: 13px; line-height: 1.6; white-space: pre; word-break: normal; background: none; color: inherit; border-radius: 0; }
.announce .ann-copy { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 4px 10px; border-radius: 7px; border: 0; background: var(--ann-btn); color: var(--ann-ink); font-size: 12.5px; font-weight: 600; cursor: copy; box-shadow: none; }
.announce .ann-copy svg { width: 13px; height: 13px; }
.announce .ann-chip:focus-visible, .announce .ann-copy:focus-visible, .announce .announce-x:focus-visible { outline: 2px solid var(--ann-ink); outline-offset: 2px; }
.announce .announce-x { flex: none; margin: 0 -8px 0 0; color: var(--ann-ink); background: transparent; }
.announce .announce-x:hover { background: var(--ann-soft); color: var(--ann-ink); }
.auth-notice { position: fixed; z-index: 30; top: 0; left: 0; right: 0; transform: none; width: auto; max-height: 60vh; overflow-y: auto; margin: 0; padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); animation: noticeIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes noticeIn { from { opacity: 0; transform: translateY(-10px); } }
.banner.trial { margin-bottom: 18px; }
.banner.trial.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }

/* ---------- Sandbox/live switch: a sliding thumb and a short content transition ---------- */
.env-seg { position: relative; isolation: isolate; }
.env-seg::before { content: ''; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 4.5px); border-radius: var(--control-radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .3s; }
:root[data-env=live] .env-seg::before { transform: translateX(calc(100% + 3px)); }
.env-seg button[aria-pressed=true] { background: transparent; box-shadow: none; }
.env-seg button { transition: color .25s; }
:root.env-switching #content { animation: envIn .4s cubic-bezier(.2, .8, .2, 1); }
:root.env-switching #env-pill { animation: envPulse .5s ease; }
@keyframes envIn { from { opacity: .3; transform: translateY(8px); } }
@keyframes envPulse { 40% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .env-seg::before, .auth-notice, :root.env-switching #content, :root.env-switching #env-pill { transition: none; animation: none; } }

/* ---------- Fonts: one weight family everywhere, no thin or monospace system text ---------- */
:root { font-weight: 500; }
.optional, label small, .add-card small, #toast .t-msg span, .check { font-weight: 500 !important; }
.mono, code { font-family: Prompt, "Leelawadee UI", Tahoma, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .01em; font-weight: 500; }
pre, pre code, .code pre { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-weight: 600; }
small { font-weight: 500; }
.op-more { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.op-more summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.op-more[open] summary { margin-bottom: 12px; }
.legal-copy .op-link { font-weight: 600; }


/* A card left alone on the last row takes the full width instead of leaving a hole (2026-12-05) */
.grid.two > :last-child:nth-child(odd):not(:first-child), .settings-grid > .card:last-child:nth-child(even) { grid-column: 1 / -1; }
.grid.three > :last-child:nth-child(3n+1):not(:first-child) { grid-column: 1 / -1; }

.promo-card > .actions { padding: 0 clamp(16px, 2vw, 24px) 14px; }


/* ---------- Discount code form: option pills, reveal rows, our own date picker (2026-12-05) ---------- */
.promo-form { display: grid; gap: 14px; }
.opt-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.opt-group legend { padding: 0 6px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills label { position: relative; margin: 0; cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.pills label:hover span { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pills input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.pills input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.reveal-date-start, .reveal-days, .reveal-date-exp, .reveal-limit, .reveal-per { display: none; animation: revealIn .25s cubic-bezier(.2, .8, .2, 1); }
.opt-group:has(input[name=start][value=date]:checked) .reveal-date-start,
.opt-group:has(input[name=exp][value=days]:checked) .reveal-days,
.opt-group:has(input[name=exp][value=date]:checked) .reveal-date-exp,
.opt-group:has(input[name=total][value=limit]:checked) .reveal-limit,
.opt-group:has(input[name=per][value=many]:checked) .reveal-per { display: block; }
@keyframes revealIn { from { opacity: 0; transform: translateY(-4px); } }
.opt-num { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; }
.num-wrap { position: relative; display: block; }
.num-wrap input { padding-right: 52px; }
.opt-num .num-wrap { width: 160px; }
.opt-num .num-wrap input { margin-top: 0; }
.num-wrap em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 600; pointer-events: none; }
label > .num-wrap em { top: calc(50% + 3.5px); }
.code-input { text-transform: uppercase; letter-spacing: .06em; }
.code-chip { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); letter-spacing: .05em; }

.dp { display: grid; gap: 8px; }
.dp-trigger { justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--control-radius); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; box-shadow: none; }
.dp.picked .dp-trigger, .dp-trigger[aria-expanded=true] { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dp-trigger .dp-chev { margin-left: auto; transition: transform .2s; }
.dp-trigger[aria-expanded=true] .dp-chev { transform: rotate(180deg); }
.dp-pop { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); padding: 12px; animation: revealIn .22s cubic-bezier(.2, .8, .2, 1); max-width: 340px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head strong { color: var(--ink); }
.dp-head [data-dp-nav="-1"] .icon { transform: rotate(90deg); }
.dp-head [data-dp-nav="1"] .icon { transform: rotate(-90deg); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dp-grid i { font-style: normal; font-size: 12px; color: var(--faint); font-weight: 600; padding: 4px 0; }
.dp-grid button { aspect-ratio: 1; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--text); font-weight: 600; font-size: 13.5px; justify-content: center; transition: background-color .15s, color .15s; }
.dp-grid button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.dp-grid button.today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.dp-grid button.on { background: var(--accent); color: #fff; }
.dp-grid button:disabled { color: var(--faint); opacity: .45; cursor: not-allowed; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-quick button { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .reveal-date-start, .reveal-days, .reveal-date-exp, .reveal-limit, .reveal-per, .dp-pop { animation: none; } }

/* Discount code form, balanced: equal pills, full-width rows, calendar spans the group (2026-12-05) */
.pills { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pills span { width: 100%; justify-content: center; text-align: center; border-color: transparent; background: transparent; min-height: 38px; padding: 0 10px; }
.pills label:hover span { border-color: transparent; }
.opt-group { padding: 14px 16px 16px; }
.opt-group legend { margin: 0 auto; padding: 0 10px; }
.opt-num { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.opt-num .num-wrap { width: auto; }
.dp-pop { max-width: none; width: 100%; padding: 14px 16px; }
.dp-grid { gap: 6px; }
.dp-grid button { aspect-ratio: auto; height: 40px; }
.dp-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dp-quick button { justify-content: center; padding: 0 6px; }
.promo-form > .form-grid:first-child { align-items: start; }
@media (max-width: 520px) { .pills { grid-auto-flow: row; grid-auto-columns: auto; border-radius: var(--radius-sm); } .dp-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.num-wrap input { margin-top: 0 !important; }
label > .num-wrap { margin-top: 7px; }
.opt-num > .num-wrap { margin-top: 0; }
.num-wrap em, label > .num-wrap em { top: 50%; transform: translateY(-50%); line-height: 1; }


/* UI audit (2026-12-05): copy buttons, Telegram dialog, mobile topbar, mobile table cards */
.copy-field { padding: 6px 6px 6px 14px; }
.copy-field code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; line-height: 1.5; padding: 4px 0; user-select: all; }
.copy-field button { flex: none; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.copy-field button:hover { background: var(--accent); color: var(--on-accent); }
button.copied, .copy-field button.copied { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tg-steps > li > span { display: grid; gap: 8px; flex: 1; min-width: 0; }
.tg-steps .btn { justify-self: start; }
.tg-steps small { margin-top: -4px; }
dialog .note { margin-top: 16px; }
@media (max-width: 960px) {
  /* Menu and logo sit together on the left; actions on the right. */
  .topbar { justify-content: flex-start; }
  .topbar .brand { margin-right: auto; gap: 8px; }
  .topbar .brand-mark { display: none; }
  .topbar .brand-name, .topbar .brand-name b { display: inline; font-size: 16px; white-space: nowrap; }
}
@media (max-width: 360px) { .topbar .brand-name, .topbar .brand-name b { font-size: 14px; } .topbar .env-pill { padding: 0 8px; } }
@media (max-width: 820px) {
  /* The first cell is the card title: its column label only adds noise. */
  .table-wrap td:first-child::before { display: none !important; }
  .table-wrap tbody tr { gap: 10px 16px; padding: 14px 16px; }
  .table-wrap td:first-child strong { font-size: 14.5px; }
}
.add-card { padding: 24px 16px; line-height: 1.4; }
@media (max-width: 1100px) { .grid.two > .add-card { min-height: 160px; } }

/* Bank notice card in the event detail: each bank in its own colour (2026-12-05) */
.notice-card { --bank: var(--accent); border: 1px solid color-mix(in srgb, var(--bank) 28%, var(--line)); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--surface); }
.notice-card.bank-scb { --bank: #6b2fd0; }
.notice-card.bank-kbank { --bank: #00a94f; }
.notice-card.bank-ktb { --bank: #0098d8; }
.notice-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; background: color-mix(in srgb, var(--bank) 12%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--bank) 20%, var(--line)); }
.notice-top > span { display: grid; gap: 2px; font-weight: 600; color: var(--ink); }
.notice-top small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.notice-top strong { font-size: 24px; font-weight: 700; color: var(--bank); white-space: nowrap; }
:root[data-theme=dark] .notice-top strong { color: color-mix(in srgb, var(--bank) 70%, #fff); }
.notice-card .kv { padding: 4px 18px; }
.raw-notice { margin-top: 14px; }
.raw-notice summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
.raw-notice .code { margin-top: 8px; }
@media (max-width: 600px) { .notice-top { padding: 12px 14px; } .notice-top strong { font-size: 21px; } .notice-card .kv { padding: 2px 14px; } }

/* Admin site: platform / own-shop menu switch (same thumb as the Sandbox switch) */
:root[data-area=admin] .env-seg::before { transform: none; }
:root[data-area=shop] .env-seg::before { transform: translateX(calc(100% + 3px)); }
:root[data-area] .area-seg button[aria-pressed=true] { color: var(--ink); }
/* The toast sits over the top bar on phones: taps go through it to the menu button; only its close button takes them. */
#toast { pointer-events: none; }
#toast .t-x { pointer-events: auto; }
/* ---------- 2026-12-05: readable audit details ---------- */
.audit-detail { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.audit-detail small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.audit-detail .audit-ref { font-size: 13px; text-align: left; }
.audit-detail .mono { color: var(--muted); }
/* ---------- 2026-12-05: announcement promo code (own field, copies on click) ---------- */
.announce .ann-promo { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 0; margin-top: 10px; padding: 7px 14px; border-radius: 10px; border: 1.5px dashed var(--ann-chip-line); background: var(--ann-chip); color: var(--ann-text); font: inherit; font-size: 13.5px; cursor: copy; box-shadow: none; }
.announce .ann-promo code { font-family: "JetBrains Mono", Consolas, ui-monospace, monospace; font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--ann-ic); background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.announce .ann-promo svg { width: 15px; height: 15px; flex: none; color: var(--ann-ic); }
.announce .ann-promo:hover { background: var(--ann-soft); border-color: var(--ann-ic); }
.announce .ann-promo:focus-visible { outline: 2px solid var(--ann-ink); outline-offset: 2px; }
