/* Atelier II: the original admin composition, dressed in Atelier's materials. */
@font-face {
  font-family: Vazirmatn;
  src: url('../shared/assets/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --control-revision: 2;
  --bg: #101110; --card: #1a1b19; --card2: #242521;
  --text: #f5f3ed; --muted: #a9aaa2; --border: #383a33;
  --primary: #ffb78c; --primary-ink: #24180f; --primary-text: #ffb78c;
  --success: #9ddbb6; --danger: #ff9393; --warning: #e8c17b; --info: #b6c6d3;
  --accent: #242521; --radius: 8px; --radius-sm: 6px;
  --shadow: none; --nav-h: 72px; color-scheme: dark;
}
html.light {
  --bg: #f3f3ef; --card: #fff; --card2: #eaece5;
  --text: #20221e; --muted: #63675c; --border: #d8dbd0;
  --primary: #f7ad7e; --primary-ink: #271c14; --primary-text: #925020;
  --success: #287647; --danger: #af3035; --warning: #886115; --info: #476b82;
  --accent: #eaece5; --shadow: none; color-scheme: light;
}
body { font-family: Vazirmatn, system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: #ffb78c1f; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary-text); outline-offset: 3px;
}
input, select, textarea { accent-color: var(--primary); }
button, input, select, textarea, .card, .stat-card { min-width: 0; }
h1, h2, p { overflow-wrap: anywhere; }
[dir="ltr"], .stat-value, .mini-value, .today-amount, .plan-price, .kv-value, .bc-number {
  font-variant-numeric: tabular-nums;
}
[dir="ltr"] { unicode-bidi: isolate; overflow-wrap: anywhere; }
.line-icon { display: inline-flex; flex: 0 0 auto; vertical-align: middle; align-items: center; justify-content: center; }
.line-icon svg { display: block; }
.topbar {
  padding: calc(11px + env(safe-area-inset-top, 0px)) max(18px, calc((100vw - 724px)/2)) 11px;
  min-height: calc(78px + env(safe-area-inset-top,0px)); background: var(--bg); backdrop-filter: none; gap: 8px;
}
.brand, .brand-spacer { width: 62px; flex: 0 0 62px; }
.brand-spacer { justify-content: flex-end; }
.brand-badge { border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; color: var(--muted); font-weight: 500; }
.topbar-heading { flex: 1; min-width: 0; text-align: center; }
.edition-label { color: var(--muted); font-size: 9px; letter-spacing: 2px; font-weight: 500; display: block; }
.topbar-title { font-size: 19px; font-weight: 650; margin: 2px 0 0; line-height: 1.6; }
.icon-button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--muted);
}
.view { padding: 16px 18px 24px; }
.route-view { animation: reveal-view .28s ease-out both; }
.section-label { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; margin: 24px 1px 12px; }
.section-label:first-child { margin-top: 0; }
.section-label::after { content: ''; height: 1px; flex: 1; background: var(--border); opacity: .7; }
.stat-grid { gap: 10px; margin-bottom: 20px; }
.stat-card {
  position: relative; align-items: flex-start; gap: 12px; min-height: 108px;
  padding: 15px; background: var(--card); box-shadow: none;
}
.stat-icon, .stat-card[class*="accent-"] .stat-icon {
  width: 22px; height: 22px; border-radius: 0; background: transparent;
  color: var(--muted); margin-top: 3px;
}
.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 28px; font-weight: 550; line-height: 1.35; letter-spacing: -.7px; overflow-wrap: anywhere; }
.stat-label { font-size: 11px; line-height: 1.7; margin-top: 6px; }
.stat-card.accent-success .stat-icon { color: var(--success); }
.stat-card.accent-danger .stat-icon { color: var(--danger); }
.stat-card.accent-warning .stat-icon { color: var(--warning); }
.card { margin: 14px 0; background: var(--card); box-shadow: none; border-radius: 8px; }
.card-head { padding: 16px; }
.card-title { font-size: 13px; font-weight: 600; line-height: 1.8; }
.card-icon { color: var(--muted); display: inline-flex; }
.card-icon svg { width: 18px; height: 18px; }
.card-body { padding: 16px; }
.card-actions { flex-wrap: wrap; justify-content: flex-end; }
.today-card { border-top: 2px solid var(--primary); }
.today-hero { text-align: right; padding: 4px 0 20px; }
.today-amount { color: var(--primary-text); font-size: 30px; font-weight: 550; line-height: 1.6; letter-spacing: -.6px; }
.today-amount-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.today-row { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mini-stat { border: 0; background: transparent; border-radius: 0; padding: 16px 5px; }
.mini-stat + .mini-stat { border-inline-start: 1px solid var(--border); }
.mini-icon { display: none; }
.mini-value { font-size: 20px; font-weight: 500; }
.mini-label { font-size: 10px; color: var(--muted); }
.today-section-label { margin: 24px 0 10px; font-size: 11px; font-weight: 500; }
.breakdown-list, .top-users { gap: 0; }
.breakdown-row, .top-user-row {
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  border-radius: 0; padding: 12px 0; gap: 8px; color: var(--text);
}
.breakdown-row:last-child, .top-user-row:last-child { border-bottom: 0; }
.breakdown-title, .breakdown-amount, .top-user-amount { font-size: 12px; font-weight: 500; }
.breakdown-count { font-size: 10px; }
.breakdown-amount { color: var(--text); }
.top-user-rank { width: 24px; height: 27px; border: 1px solid var(--border); border-radius: 4px; font-size: 10px; background: transparent; color: var(--muted); }
.top-user-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.top-user-row { width: 100%; text-align: start; }
.top-user-sub, .top-user-count { font-size: 10px; }
.today-analytics-link { border-top: 1px solid var(--border); margin-top: 15px; padding-top: 15px; }
.today-analytics-link .btn { width: 100%; color: var(--primary-text); }
.revenue-definition { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.9; }
.setup-prog, .setup-done { gap: 20px; }
.ring-value { font-size: 22px; font-weight: 500; }
.ring-sub { font-size: 10px; direction: ltr; unicode-bidi: isolate; }
.ua-val { direction: ltr; unicode-bidi: isolate; }
.panel-name { font-size: 12px; font-weight: 600; }
.dot.on, .dot.off { box-shadow: none; }
.launch-grid { gap: 10px; }
.launch-card { background: transparent; border-radius: 8px; padding: 15px 12px; gap: 10px; box-shadow: none; }
.launch-icon { width: 24px; height: 28px; background: transparent; color: var(--primary-text); }
.launch-meta { min-width: 0; }
.launch-title { font-size: 12px; font-weight: 600; }
.launch-desc { font-size: 10px; line-height: 1.8; margin-top: 5px; }
.launch-chevron { color: var(--muted); }
.bottom-nav {
  max-width: 760px; margin-inline: auto; padding: 8px 10px calc(8px + env(safe-area-inset-bottom,0px));
  background: var(--bg); backdrop-filter: none; gap: 4px; overscroll-behavior-inline: contain;
}
.nav-item { position: relative; min-width: 62px; min-height: 54px; gap: 4px; padding: 7px 6px; border-radius: 6px; }
.nav-item .nav-icon { filter: none; opacity: 1; display: flex; }
.nav-item .nav-label { font-size: 10px; font-weight: 500; }
.nav-item.active { background: color-mix(in srgb,var(--primary) 9%,transparent); color: var(--primary-text); }
.nav-item.active::before { content: ''; position: absolute; top: 0; width: 16px; height: 2px; border-radius: 2px; background: var(--primary); }
.btn {
  min-height: 44px; padding: 10px 14px; border-radius: 6px; background: var(--primary);
  border: 1px solid var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: none; line-height: 1.7;
  transition: background .15s, transform .15s; text-align: center;
}
.btn.small { min-height: 40px; padding: 8px 11px; font-size: 11px; }
.btn .line-icon svg { width: 17px; height: 17px; }
.btn.ghost { color: var(--text); background: transparent; border-color: var(--border); }
.btn.success { color: var(--success); background: color-mix(in srgb,var(--success) 8%,var(--card)); border-color: color-mix(in srgb,var(--success) 28%,var(--border)); }
.btn.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 8%,var(--card)); border-color: color-mix(in srgb,var(--danger) 28%,var(--border)); }
.btn:active:not(:disabled), .launch-card:active { transform: translateY(1px); }
.pill { border-radius: 5px; font-size: 10px; padding: 3px 7px; background: var(--accent); }
.pill.ok { color: var(--success); background: color-mix(in srgb,var(--success) 9%,transparent); }
.pill.warn { color: var(--warning); background: color-mix(in srgb,var(--warning) 9%,transparent); }
.pill.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 9%,transparent); }
.pill.info { color: var(--info); background: color-mix(in srgb,var(--info) 9%,transparent); }
.subtabs {
  display: flex; align-items: stretch; gap: 12px; width: 100%; min-width: 0;
  background: transparent; padding: 0; margin: 0 0 16px; border: 0;
  border-bottom: 1px solid var(--border); border-radius: 0;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; gap: 6px; min-height: 44px; padding: 10px 6px;
  font: inherit; font-size: 12px; line-height: 22px; font-weight: 500; white-space: nowrap;
  border: 0; border-radius: 0; color: var(--muted); background: transparent;
}
.subtab .line-icon svg { width: 17px; height: 17px; }
.subtab.active { color: var(--primary-text); background: transparent; font-weight: 600; }
.tab-count { font-size: 10px; font-weight: 500; min-width: 19px; text-align: center; padding: 0 4px; color: var(--muted); background: var(--accent); border-radius: 4px; }
.activity-tabs { position: sticky; top: calc(78px + env(safe-area-inset-top,0px)); z-index: 25; background: var(--bg); padding-top: 8px; margin-top: -8px; gap: 6px; overflow: visible; }
.activity-tabs .subtab { flex: 1; gap: 6px; font-size: 11px; padding-inline: 3px; }
.activity-list > .card:first-child { margin-top: 0; }
.activity-toolbar { margin-bottom: 14px; }
.subtab.active::after { content: ''; position: absolute; inset-inline: 6px; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }
.subtab:focus-visible { outline-offset: -3px; border-radius: 4px; }
.subcontent > :first-child { margin-top: 0; }
.toolbar { margin-block: 0 14px; gap: 8px; align-items: center; }
.toolbar > .btn { flex-shrink: 0; }
.field { margin-bottom: 16px; }
.row.two-col > .field { display: flex; flex-direction: column; }
.row.two-col > .field > label { display: flex; align-items: flex-end; flex: 1; }
.row.two-col > .field > input, .row.two-col > .field > select { flex-shrink: 0; }
.danger-section-label { border-top: 1px solid var(--border); padding-top: 18px; color: var(--danger); }
.field label { color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.field input, .field select, .field textarea, .search-box, .setting-row input,
.sd-num, .rev-date-field input, .pcx-editor input:not([type="checkbox"]):not([type="radio"]), .pcx-editor select {
  min-height: 46px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); padding: 10px 12px; box-shadow: none;
}
.field textarea { min-height: 105px; resize: vertical; }
.field input, .field select, .field textarea { font-size: 13px; }
.field-hint, .hint { color: var(--muted); font-size: 11px; line-height: 1.9; }
.field.ltr label { direction: rtl; text-align: right; }
.tg-switch {
  --switch-width: 44px; --switch-height: 26px; --switch-knob: 18px;
  appearance: none; position: relative; display: inline-block; flex: 0 0 auto;
  width: var(--switch-width); min-width: var(--switch-width); height: var(--switch-height);
  margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 999px;
  box-sizing: border-box; background: var(--accent); vertical-align: middle;
  cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.tg-switch .tg-knob {
  position: absolute; top: 50%; inset-inline-start: 3px;
  width: var(--switch-knob); height: var(--switch-knob); border-radius: 50%;
  transform: translateY(-50%); background: var(--muted); box-shadow: none;
  pointer-events: none; transition: inset-inline-start .18s ease, background .18s ease;
}
.tg-switch.on { background: var(--primary); border-color: var(--primary); }
.tg-switch.on .tg-knob { inset-inline-start: calc(100% - var(--switch-knob) - 3px); background: var(--primary-ink); }
.tg-switch::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(44px,100%); height: max(44px,100%); transform: translate(-50%,-50%); }
.tg-switch.disabled { opacity: .45; cursor: default; }
.tg-switch.pending { cursor: progress; }
.tg-switch.pending .tg-knob::after { content: ''; position: absolute; inset: 4px; border: 1px solid currentColor; border-top-color: transparent; color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.setting-row { gap: 12px; padding-block: 13px; }
.check-toggle {
  min-height: 52px; gap: 14px; margin: 0; padding: 12px 0; background: transparent;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 12px;
}
.check-toggle:last-child { border-bottom: 0; }
.check-toggle > span:first-child { min-width: 0; }
.chip-toggles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.chip-toggle { justify-content: space-between; gap: 5px; padding: 6px 8px; background: transparent; border-color: var(--border); border-radius: 6px; min-height: 42px; font-size: 11px; }
.chip-toggle .tg-switch { --switch-width: 34px; --switch-height: 22px; --switch-knob: 14px; }
.plan-grid { gap: 12px; }
.plan-grid > .card { margin: 0; }
.plan-title { font-size: 16px; font-weight: 600; }
.plan-price, .plan-final { color: var(--primary-text); }
.plan-meta { color: var(--muted); }
.plan-card .card-head { background: transparent; }
.bank-card { border-radius: 8px; background: #32382d !important; box-shadow: none; border: 1px solid #555e4b; min-height: 174px; aspect-ratio: auto; gap: 15px; }
.bc-top, .bc-bottom { gap: 12px; }
.bc-bank { font-size: 14px; font-weight: 650; text-shadow: none; }
.bc-bottom > div { min-width: 0; }
.bc-holder { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.bc-audience { flex-wrap: wrap; justify-content: flex-end; }
.bc-shine { display: none; }
.bc-number { font-weight: 500; font-size: clamp(17px,5.3vw,25px); letter-spacing: 1px; text-shadow: none; }
.bc-chip { background: #c4bea7; }
.bc-status { background: #ffffff12; color: #c8eccd; }
.bc-status.off { background: #ff939317; color: #ffb1b1; }
.card-usage { padding-block: 16px; margin-top: 14px; gap: 16px; border-bottom: 1px solid var(--border); }
.ua-row { flex-direction: column; gap: 3px; align-items: stretch; margin-bottom: 8px; }
.ua-label { font-size: 11px; }
.ua-val { font-weight: 500; font-size: 13px; text-align: start; }
.usage-cap, .reset-pill { font-size: 10px; }
.card-actions-row { padding-top: 0; margin-top: 14px; gap: 8px; flex-wrap: wrap; }
.pay-card .card-actions-row { margin-top: 0; padding-top: 14px; }
.card-actions-row .check-toggle { border: 0; min-height: 44px; padding: 0; margin: 0; gap: 8px; }
.inline-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 11px; cursor: pointer; }
.wallet-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.wallet-option.btn { padding: 9px 8px; font-size: 10px; gap: 5px; }
.wallet-option::after { content: ''; width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; margin-inline-start: auto; background: var(--muted); }
.wallet-option.enabled::after { background: var(--success); }
.method-card .kv:last-child:nth-child(odd) { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cb-pct { color: var(--primary-text); font-weight: 500; }
.kv { background: transparent; border: 1px solid var(--border); border-radius: 6px; }
.kv-label { font-size: 10px; }
.kv-value { overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.technical-reference { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; padding: 11px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.technical-reference code { font: 11px ui-monospace,Consolas,monospace; color: var(--text); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.card:has(.technical-reference) .kv:last-child { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.row-between h3 { margin: 0; font-size: 14px; font-weight: 600; }
.avatar { background: var(--accent); color: var(--primary-text); border: 1px solid var(--border); border-radius: 50%; font-weight: 500; }
.profile-name { font-size: 22px; font-weight: 600; }
.profile-stats .stat-card { display: block; padding: 14px 12px; min-height: 112px; }
.profile-stats .stat-icon { position: absolute; inset-inline-end: 12px; top: 14px; margin: 0; width: 17px; height: 17px; }
.profile-stats .stat-icon svg { width: 17px; height: 17px; }
.profile-stats .stat-body { display: flex; flex-direction: column; }
.profile-stats .stat-label { order: -1; margin: 0 0 10px; padding-inline-end: 20px; }
.profile-stats .stat-value { direction: ltr; text-align: right; font-size: clamp(17px,4.8vw,26px); line-height: 1.6; white-space: nowrap; letter-spacing: -.4px; }
.user-row, .pick-row, .link-row, .act-job-row { border-radius: 8px; background: var(--card); box-shadow: none; }
.user-row { min-height: 74px; padding: 14px; }
.link-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 15px 0; text-align: start; color: var(--text); border: 0; border-bottom: 1px solid var(--border); }
.link-row:has(.dot.off) { border-inline-start: 2px solid var(--danger); padding-inline-start: 12px; }
.link-title, .sd-name, .server-sub, .cp-url, .act-item-name, .act-item-user { overflow-wrap: anywhere; }
.sd-tl-dot { box-shadow: none; }
.sd-tl-body { background: transparent; border-color: var(--border); border-radius: 6px; }
.act-job-row { border-inline-start: 2px solid var(--primary); padding: 16px; }
.act-job-title { font-size: 14px; font-weight: 600; }
.seg-group { padding: 3px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); }
.seg-btn { min-height: 36px; border-radius: 4px; }
.seg-btn.active { color: var(--text); background: var(--accent); box-shadow: none; }
.filter-chip { min-height: 36px; border-radius: 5px; }
.filter-chip.active { color: var(--primary-text); border-color: color-mix(in srgb,var(--primary) 40%,var(--border)); background: color-mix(in srgb,var(--primary) 8%,transparent); }
.rev-kpi-hero { background: var(--card); border-top: 2px solid var(--primary); }
.revenue-filter-summary { display: flex; align-items: center; gap: 10px; padding: 17px 16px; cursor: pointer; font-size: 12px; font-weight: 500; list-style: none; }
.revenue-filter-summary::-webkit-details-marker { display: none; }
.revenue-filter-summary::after { content: '+'; font-size: 20px; color: var(--primary-text); font-weight: 400; }
details[open] > .revenue-filter-summary::after { content: '−'; }
details[open] > .revenue-filter-summary { border-bottom: 1px solid var(--border); }
.filter-summary-value { color: var(--primary-text); font-size: 11px; margin-inline-start: auto; }
.rev-kpi-hero .stat-value { color: var(--primary-text); }
.rev-notice, .sm-warn, .sd-warn, .pcx-warn, .warn-note, .ok-note { border-radius: 6px; }
.chart-tip { border-radius: 6px; background: var(--card); box-shadow: 0 8px 24px #0002; z-index: 2; }
.chart-axis-text { font-family: Vazirmatn, sans-serif; }
.data-table { font-size: 11px; }
.data-table td, .data-table th { padding: 12px 10px; }
.data-table tbody tr:hover { background: var(--accent); }
.info-btn { min-width: 40px; min-height: 40px; border-radius: 50%; color: var(--muted); }
.pcx-group { border-inline-start: 2px solid var(--primary); background: var(--bg); border-radius: 6px; }
.pcx-group .pcx-group { background: var(--card); }
.pcx-method { border-radius: 6px; }
.pcx-method input[type="checkbox"] { min-height: 16px; padding: 0; }
.gateway-shortcuts { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.gateway-shortcut-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.gateway-shortcut-grid .btn { justify-content: flex-start; font-weight: 500; }
.method-card .card-head { gap: 8px; }
.method-card .card-head .btn { font-size: 10px; padding-inline: 9px; }
.provider-intro { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.provider-intro-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.provider-intro-title > strong { font-size: 18px; font-weight: 600; }
.provider-intro p { margin: 8px 0 0; }
.provider-save-note { font-size: 10px; color: var(--muted); line-height: 1.9; margin: -5px 0 18px; }
.provider-group { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; background: var(--card); }
.provider-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; cursor: pointer; list-style: none; }
.provider-group summary::-webkit-details-marker { display: none; }
.provider-group summary strong { font-size: 12px; font-weight: 600; display: block; }
.provider-group summary .hint { display: block; font-size: 10px; margin-top: 3px; }
.provider-group .disclosure-arrow { font: 21px/1 system-ui; color: var(--muted); transform: rotate(0); transition: transform .15s; }
.provider-group[open] > summary { border-bottom: 1px solid var(--border); color: var(--primary-text); }
.provider-group[open] > summary .disclosure-arrow { transform: rotate(180deg); }
.provider-group-body { padding: 16px 14px; }
.provider-group-body > .field:last-child { margin-bottom: 0; }
.provider-group-body .check-toggle { margin-bottom: 14px; font-size: 11px; }
.provider-group-body .check-toggle:last-child { margin-bottom: 0; }
.provider-group-body .check-toggle > span { overflow-wrap: anywhere; }
.provider-callback { padding: 12px 0; border-top: 1px solid var(--border); }
.provider-callback .copyable { margin-top: 6px; }
.rules-intro { margin: 0 0 18px; line-height: 2; }
.pcx-guided { font-size: 12px; }
.pcx-step + .pcx-step, .pcx-guided > .pcx-step:not(:first-child) { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 22px; }
.pcx-step-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.pcx-step-head h3 { font-size: 13px; font-weight: 600; line-height: 1.9; margin: 0; }
.pcx-step-number { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--primary-text); font-size: 11px; }
.pcx-step > .hint { margin: 0 0 12px; }
.pcx-guided .pcx-methods { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.pcx-guided .pcx-method { border-radius: 6px; min-height: 44px; padding: 9px; gap: 8px; font-size: 11px; background: transparent; }
.pcx-guided .pcx-method:has(:checked) { border-color: color-mix(in srgb,var(--primary) 60%,var(--border)); background: color-mix(in srgb,var(--primary) 6%,transparent); color: var(--primary-text); }
.pcx-guided .pcx-warn p { margin: 4px 0 0; font-size: 10px; line-height: 1.9; }
.pcx-guided .pcx-group { padding: 12px; border: 1px solid var(--border); border-inline-start: 2px solid var(--primary); background: transparent; }
.pcx-guided .pcx-root { padding: 0; border: 0; }
.pcx-guided .pcx-children { border: 0; padding: 0; gap: 0; margin: 0; }
.pcx-guided .pcx-group .pcx-group .pcx-group { padding-inline: 0; border-inline: 0; }
.pcx-group-head, .pcx-condition-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pcx-group-head:empty { display: none; }
.pcx-group-head strong, .pcx-condition-head > span { font-size: 11px; font-weight: 500; color: var(--muted); }
.pcx-condition-head .btn, .pcx-group-head .btn { color: var(--muted); background: transparent; border: 0; padding: 4px; min-height: 36px; font-size: 10px; }
.pcx-condition-head .btn:hover, .pcx-group-head .btn:hover { color: var(--danger); }
.pcx-condition-head .btn svg, .pcx-group-head .btn svg { width: 14px; height: 14px; }
.pcx-guided .pcx-cond { display: block; padding: 10px 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; container-type: inline-size; }
.pcx-guided .field { margin-bottom: 12px; }
.pcx-guided .field label { font-size: 10px; margin-bottom: 6px; }
.pcx-guided .field input, .pcx-guided .field select { font-size: 12px; border-radius: 6px; background: var(--card); min-height: 44px; padding: 10px; }
.pcx-guided .field select { width: 100%; }
.pcx-threshold { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 8px; }
.pcx-threshold .field { margin-bottom: 0; }
.pcx-threshold .field.ltr label { text-align: start; }
.pcx-connector { margin-bottom: 12px; }
.pcx-connector:empty { display: none; }
.pcx-connector-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; margin-top: 6px; background: var(--bg); }
.pcx-connector-options .btn { border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; min-height: 38px; padding: 6px; }
.pcx-connector-options .selected { background: var(--accent); color: var(--primary-text); }
.pcx-join { text-align: center; color: var(--primary-text); font-size: 10px; padding: 8px 0; }
.pcx-group-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.pcx-guided .pcx-group-options { padding: 0; border: 0; background: transparent; margin: 0; flex: 1; min-width: 115px; }
.pcx-guided .pcx-group-options > summary { min-height: 40px; padding: 9px 0; font-size: 10px; }
.pcx-group-options .hint { font-size: 10px; margin: 0 0 10px; }
.pcx-guided .pcx-summary { border-radius: 6px; border-inline-start: 2px solid var(--primary); margin-top: 16px; padding: 12px 14px; background: color-mix(in srgb,var(--primary) 5%,transparent); color: var(--text); }
.pcx-summary-label { display: block; font-size: 10px; color: var(--primary-text); }
.pcx-summary p { margin: 5px 0 0; font-size: 12px; line-height: 2.1; overflow-wrap: anywhere; }
.pcx-guided > .pcx-test-disclosure { margin: 20px 0 0; background: transparent; padding: 3px 12px 10px; border-radius: 6px; }
.pcx-guided > .pcx-test-disclosure > summary { color: var(--primary-text); min-height: 44px; padding-block: 11px; }
.pcx-guided > .pcx-test-disclosure:not([open]) { padding-bottom: 3px; }
.pcx-guided .pcx-extra { padding: 0; background: transparent; border: 0; margin: 12px 0 0; }
.pcx-guided .pcx-extra > summary { min-height: 44px; padding: 12px 0; font-size: 11px; }
.pcx-test-out { margin-top: 12px; }
.pcx-test-leaf { padding: 10px 0; border-bottom: 1px solid var(--border); }
.pcx-test-leaf > div { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.pcx-test-leaf p { margin: 6px 0 0; }
@container (max-width: 210px) { .pcx-threshold { grid-template-columns: 1fr; } }
.dialog-open { overflow: hidden; }
dialog.modal-overlay {
  inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; color: var(--text); background: transparent;
  align-items: flex-end; overflow: hidden; opacity: 1;
}
dialog.modal-overlay:not([open]) { display: none; }
dialog.modal-overlay::backdrop { background: #070907a6; backdrop-filter: blur(5px); }
.modal-sheet {
  width: 100%; max-width: 620px; max-height: min(90dvh,960px); background: var(--card);
  border: 1px solid var(--border); border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 90px #0003; overscroll-behavior: contain;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px); transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.modal-head { z-index: 3; flex: 0 0 auto; position: static; padding: 12px 18px; background: var(--card); }
.modal-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.8; }
.modal-x { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; font-weight: 300; font-size: 24px; flex-shrink: 0; }
.modal-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px; scroll-padding-block: 16px; }
.modal-body > .field:last-child, .modal-body > :last-child > .field:last-child { margin-bottom: 0; }
.modal-body:empty { padding: 0; }
.modal-actions { flex: 0 0 auto; position: static; padding: 14px 18px calc(14px + env(safe-area-inset-bottom,0px)); background: var(--card); border-top: 1px solid var(--border); z-index: 2; }
.confirmation-copy { font-size: 14px; line-height: 2; white-space: pre-line; margin: 0; }
.toast { border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); bottom: calc(92px + env(safe-area-inset-bottom,0px)); font-size: 12px; max-width: min(90vw,500px); box-shadow: 0 8px 30px #0003; z-index: 100; }
.toast.success { border-color: var(--success); background: var(--card); color: var(--success); }
.toast.error { border-color: var(--danger); background: var(--card); color: var(--danger); }
.preferences { display: grid; gap: 14px; }
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.preference-link { display: block; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); padding: 12px 0; }
.preference-link::after { content: '←'; float: left; color: var(--primary-text); }
.demo-details { margin-top: 15px; color: var(--muted); font-size: 12px; }
.demo-details summary { cursor: pointer; min-height: 44px; }
.demo-details > .btn { margin: 5px 0; width: 100%; }
.fatal { max-width: 560px; margin: 0 auto; }
.fatal .btn { margin: 18px 5px 0; }
.fatal-emoji { color: var(--danger); }
.fatal-emoji svg { width: 40px; height: 40px; }
.spinner { border-color: var(--border); border-top-color: var(--primary); }
.center-note { font-size: 12px; padding-block: 34px; line-height: 2; }
.bar { height: 4px; border-radius: 3px; }
.bar-fill { transition: width .7s cubic-bezier(.2,.8,.2,1); }
.ring-fg { animation: draw-ring .8s ease-out; }
@keyframes reveal-view { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes draw-ring { from { stroke-dashoffset: var(--ring-circumference); } }
@media (min-width: 760px) {
  .view { padding: 28px 22px 40px; }
  .stat-card { padding: 20px; min-height: 115px; }
  .stat-value { font-size: 32px; }
  .card-body { padding: 22px; }
  .card-head { padding: 18px 22px; }
  .today-amount { font-size: 38px; }
  dialog.modal-overlay { align-items: center; padding: 24px; }
  .modal-sheet { border-radius: 12px; max-height: 88dvh; }
  .nav-item { flex: 1 1 0; }
}
@media (max-width: 380px) {
  .stat-card { padding: 13px 11px; gap: 8px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 10px; }
  .launch-card { gap: 8px; padding: 14px 10px; }
  .launch-icon { width: 20px; }
  .launch-chevron { display: none; }
  .today-amount { font-size: 26px; }
  .breakdown-row { flex-wrap: wrap; }
  .breakdown-amount { margin-inline-start: auto; }
  .row.two-col > .field { min-width: 0; flex-basis: calc(50% - 8px); }
  .modal-body { padding: 18px 16px; }
}
@media (max-width: 350px) {
  .chip-toggles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-options { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
