/* ==========================================================================
   SMM Panel design system
   Tokens → base → layout (public / panel) → components → utilities
   Light + dark themes (auto via prefers-color-scheme, manual via data-theme)
   ========================================================================== */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f7;
  --border: #e4e7f0;
  --border-strong: #d3d8e6;
  --text: #161a2b;
  --text-2: #3d4460;
  --muted: #6b7291;
  --primary: #5b4dff;
  --primary-600: #4a3cf0;
  --primary-50: #f0eeff;
  --primary-100: #e2dfff;
  --on-primary: #ffffff;
  --success: #12a150;
  --success-50: #e8f8ef;
  --warning: #c77a00;
  --warning-50: #fff5e0;
  --danger: #e03145;
  --danger-50: #fdecee;
  --info: #1f7ae0;
  --info-50: #e8f1fd;
  --orange: #e2620f;
  --orange-50: #fff0e6;
  --purple: #8a3ffc;
  --purple-50: #f3ebff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 16px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f17; --surface: #151824; --surface-2: #1a1e2c; --surface-3: #222739; --border: #262b3d; --border-strong: #333a52;
    --text: #eceef7; --text-2: #c3c8dc; --muted: #8b92ad; --primary: #7c70ff; --primary-600: #8f85ff; --primary-50: #1f1d3d; --primary-100: #2a2754;
    --success-50: #0f2a1c; --warning-50: #2e2410; --danger-50: #321419; --info-50: #11223a; --orange-50: #2f1c10; --purple-50: #22163b;
    --success: #34c774; --warning: #f0a830; --danger: #ff5c6f; --info: #5aa2ff; --orange: #ff8a3d; --purple: #a978ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 16px 48px rgba(0,0,0,.45);
    --series-1: #3987e5; --series-2: #d95926;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f17; --surface: #151824; --surface-2: #1a1e2c; --surface-3: #222739; --border: #262b3d; --border-strong: #333a52;
  --text: #eceef7; --text-2: #c3c8dc; --muted: #8b92ad; --primary: #7c70ff; --primary-600: #8f85ff; --primary-50: #1f1d3d; --primary-100: #2a2754;
  --success-50: #0f2a1c; --warning-50: #2e2410; --danger-50: #321419; --info-50: #11223a; --orange-50: #2f1c10; --purple-50: #22163b;
  --success: #34c774; --warning: #f0a830; --danger: #ff5c6f; --info: #5aa2ff; --orange: #ff8a3d; --purple: #a978ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 16px 48px rgba(0,0,0,.45);
  --series-1: #3987e5; --series-2: #d95926;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-3); padding: .12em .4em; border-radius: 6px; }
pre { background: #0f1222; color: #dfe3f5; padding: 16px; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.icon { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary-100); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; text-decoration: none !important; line-height: 1; user-select: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(91,77,255,.25); }
.btn-primary:hover { background: var(--primary-600); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); color: #fff; }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--text-2); }
/* Toggles and checkboxes are labels too: keep their control and text vertically centred. */
.field > label.switch, .field > label.check { display: inline-flex; align-items: center; margin-bottom: 0; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; transition: border-color .15s, box-shadow .15s; appearance: none; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.textarea.code { font-family: var(--mono); font-size: 13px; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7291' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.input[readonly] { background: var(--surface-2); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; min-height: 44px; }
.input-prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.input-prefix + .input { border-radius: 0 10px 10px 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 40px; height: 22px; background: var(--border-strong); border-radius: 22px; position: relative; cursor: pointer; transition: background .2s; margin: 0; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { padding: 0 6px; font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card + .card { margin-top: 20px; }
.card-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.card-sub { color: var(--muted); font-size: 13.5px; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-sm); min-width: 0; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.stat-icon.success { background: var(--success-50); color: var(--success); }
.stat-icon.warning { background: var(--warning-50); color: var(--warning); }
.stat-icon.info { background: var(--info-50); color: var(--info); }
.stat-icon.danger { background: var(--danger-50); color: var(--danger); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.stat-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.balance-card { background: linear-gradient(135deg, var(--primary) 0%, #7a4dff 100%); color: #fff; border: 0; }
.balance-card .stat-label, .balance-card .stat-meta { color: rgba(255,255,255,.8); }
.balance-card .stat-icon { background: rgba(255,255,255,.18); color: #fff; }

/* ---------------------------------------------------------------- badges & alerts */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-orange { background: var(--orange-50); color: var(--orange); }
.badge-purple { background: var(--purple-50); color: var(--purple); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; font-size: 14px; align-items: flex-start; }
.alert .icon { margin-top: 1px; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--success-50); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--text); }
.alert-success .icon { color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-50); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--text); }
.alert-error .icon, .alert-danger .icon { color: var(--danger); }
.alert-warning { background: var(--warning-50); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: var(--text); }
.alert-warning .icon { color: var(--warning); }
.alert-info { background: var(--info-50); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--text); }
.alert-info .icon { color: var(--info); }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 90; width: min(420px, calc(100vw - 32px)); }
.flash-stack .alert { box-shadow: var(--shadow-lg); animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .link-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.cell-title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cell-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 13px; }
tr.row-attention td { background: var(--warning-50) !important; }

/* Responsive tables → stacked cards */
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .table-cards tbody tr:hover td { background: none; }
  .table-cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: right; min-width: 0; overflow-wrap: anywhere; }
  .table-cards td > * { min-width: 0; }
  .table-cards td::before { content: attr(data-label); font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: left; flex-shrink: 0; }
  .table-cards td.cell-main { display: block; text-align: left; padding-bottom: 8px; }
  .table-cards td.cell-main::before { display: none; }
  .table-cards td.actions { justify-content: flex-end; padding-top: 10px; }
  .table-cards td.actions::before { display: none; }
  /* The row spans the full card; only the link text itself is truncated. */
  .table-cards td.link-cell { max-width: none; overflow: visible; white-space: normal; }
  .table-cards td.link-cell > a, .table-cards td.link-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table-cards td.actions { gap: 8px; flex-wrap: wrap; }
  .table-cards td.actions > .btn, .table-cards td.actions > .inline-form { flex: 1 1 120px; }
  .table-cards td.actions > .inline-form .btn { width: 100%; }
  .table-cards td.actions .btn-ghost { border-color: var(--border); }
}

/* ---------------------------------------------------------------- misc components */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; color: var(--border-strong); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 16px; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); text-decoration: none; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .4; }
.pagination .gap { border: 0; background: none; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-bottom: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; text-decoration: none !important; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .count { font-size: 12px; opacity: .75; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { min-height: 40px; width: auto; min-width: 160px; flex: 1 1 180px; max-width: 320px; }
.toolbar .spacer { flex: 1; }

.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-rows > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-rows > li > :first-child { min-width: 0; flex: 1 1 auto; } /* long names/URLs wrap instead of widening the page */
.list-rows > li > :last-child:not(:first-child) { flex: 0 0 auto; } /* status/actions keep their size */
.list-rows > li:last-child { border-bottom: 0; }

.progress { height: 8px; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 8px; }

.copy-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 8px 8px 14px; font-family: var(--mono); font-size: 13.5px; overflow: hidden; }
.copy-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }

details.dropdown { position: relative; }
details.dropdown > summary { list-style: none; cursor: pointer; }
details.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { padding: 10px 12px; font-size: 13px; color: var(--muted); }

dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 12, 25, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; }

.notif-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

.announcement { border-left: 4px solid var(--info); }
.announcement.success { border-left-color: var(--success); }
.announcement.warning { border-left-color: var(--warning); }
.announcement.danger { border-left-color: var(--danger); }

.prose { font-size: 16px; line-height: 1.75; color: var(--text-2); }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 3px solid var(--primary); color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }

.ticket-msg { display: flex; gap: 12px; margin-bottom: 16px; }
.ticket-msg .avatar { flex-shrink: 0; }
.ticket-msg .bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 12px 16px; max-width: 100%; min-width: 0; flex: 1; }
.ticket-msg.staff .bubble { background: var(--primary-50); border-color: var(--primary-100); }
.ticket-msg .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ticket-msg .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-100); color: var(--primary); font-weight: 700; font-size: 14px; text-transform: uppercase; }

/* ---------------------------------------------------------------- panel layout (user + admin) */
.panel { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 50; transition: transform .25s ease; }
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.sidebar-brand img { max-height: 32px; width: auto; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #8b5cff); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.sidebar-nav { padding: 12px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: 14.5px; text-decoration: none !important; margin-bottom: 2px; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-link .badge { margin-left: auto; }
.nav-link .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 0 24px; position: sticky; top: 0; z-index: 40; }
.topbar-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); background: none; border: 0; cursor: pointer; }
.topbar .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 10px; background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: 14px; text-decoration: none !important; }
.balance-chip:hover { background: var(--primary-100); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 12px; }
.user-chip:hover { background: var(--surface-3); }
.content { padding: 24px; width: 100%; max-width: 1400px; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > * { min-width: 0; } /* flex items default to min-width:auto: an unbreakable e-mail/URL in the title made the page wider than the phone (shifted/zoomed-out admin pages) */
.page-head > :first-child { flex: 1 1 auto; }
.page-head h1 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.page-head p { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.breadcrumb { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; list-style: none; padding: 0; min-width: 0; }
.breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--muted); }
.menu-toggle, .topbar .menu-toggle { display: none; }
.backdrop { display: none; }
.bottom-nav { display: none; }
.panel-footer { padding: 16px 24px; font-size: 12.5px; color: var(--muted); text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.grid-main-wide { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 20px); }

/* ---------------------------------------------------------------- order form */
.svc-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.svc-summary div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.svc-summary small { display: block; color: var(--muted); font-size: 12px; }
.svc-summary strong { font-size: 14.5px; }
.svc-desc { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; max-height: 220px; overflow-y: auto; }
.charge-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.charge-box .amount { font-size: 1.5rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.svc-flags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.method-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 14px; margin: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.method-card input { margin: 3px 0 0; accent-color: var(--primary); }
.method-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.method-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.search-results { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 6px; background: var(--surface); }
.search-results button { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.search-results button:hover { background: var(--surface-3); }
.search-results button small { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- public site */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 820px; }
.site-nav { height: 68px; display: flex; align-items: center; gap: 24px; }
.site-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none !important; }
.site-nav .brand img { max-height: 34px; width: auto; }
.site-links { display: flex; gap: 4px; align-items: center; }
.site-links a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 550; font-size: 14.5px; text-decoration: none; }
.site-links a:hover, .site-links a.active { color: var(--text); background: var(--surface-3); }
.site-nav .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.mobile-menu { display: none; }
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 620px; background: radial-gradient(closest-side, var(--primary-100), transparent 70%); opacity: .8; z-index: -1; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-50); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.035em; line-height: 1.08; margin-bottom: 18px; }
.hero h1 .accent { color: var(--primary); }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; color: var(--muted); font-size: 14px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon { color: var(--success); }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; gap: 12px; }
.mock-row:last-child { border-bottom: 0; }
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.section-alt .feature { background: var(--bg); }
.feature .stat-icon { margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; font-size: 14.5px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 1rem; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }
.cta-band { background: linear-gradient(135deg, var(--primary), #7c4dff); color: #fff; border-radius: 24px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }
.cta-band .btn-secondary { background: #fff; color: var(--primary); border-color: #fff; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.faq-list summary { cursor: pointer; padding: 16px 20px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { transition: transform .2s; color: var(--muted); }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list .answer { padding: 0 20px 18px; color: var(--text-2); }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 28px; margin-top: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-2); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 13px; }
.page-hero { padding: 56px 0 28px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -.02em; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 640px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); text-decoration: none !important; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.post-card .thumb { aspect-ratio: 16 / 9; background: var(--surface-3); object-fit: cover; width: 100%; }
.post-card .body { padding: 18px; }
.post-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: 14px; margin: 0; }
.meta-line { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, #2b1f9e 0%, var(--primary) 55%, #8c5cff 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 2rem; letter-spacing: -.02em; max-width: 440px; }
.auth-side p, .auth-side li { color: rgba(255,255,255,.85); }
.auth-side ul { list-style: none; padding: 0; }
.auth-side li { display: flex; gap: 10px; margin-bottom: 12px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 1.6rem; }
.auth-box .sub { color: var(--muted); margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.brand-row { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: inherit; text-decoration: none !important; }
.brand-row:hover { color: inherit; }

/* ---------------------------------------------------------------- utilities */
.text-muted { color: var(--muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.fw-bold { font-weight: 700; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.inline-form { display: inline; }
.hide-mobile { }
.show-mobile { display: none !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-main-wide { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(10,12,25,.5); z-index: 45; }
  body.nav-open { overflow: hidden; }
  .main { margin-left: 0; }
  .menu-toggle, .topbar .menu-toggle { display: grid; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .features, .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-links { display: none; }
  .mobile-menu { display: block; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .content { padding: 16px 16px 96px; }
  .topbar { padding: 0 12px; gap: 6px; }
  .page-head h1 { font-size: 1.3rem; }
  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; }
  .stats { gap: 12px; }
  .stat { padding: 14px; flex-direction: column; gap: 10px; }
  .stat-value { font-size: 1.2rem; }
  .stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stat-icon { width: 36px; height: 36px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .features, .blog-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 40px; }
  .cta-band { padding: 28px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .svc-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .svc-summary div { padding: 8px; }
  .toolbar .input, .toolbar .select { max-width: none; flex-basis: 100%; }
  .toolbar .btn { flex: 1; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .balance-chip .balance-chip-label { display: none; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.primary-action .icon { background: var(--primary); color: #fff; border-radius: 12px; width: 40px; height: 32px; padding: 6px; margin-top: -2px; }
  .flash-stack { top: auto; bottom: 84px; right: 16px; }
  .site-nav .actions .btn-secondary { display: none; }
  .site-nav { gap: 10px; }
  .site-nav .actions { gap: 4px; }
  .site-nav .actions > [data-theme-toggle] { display: none; }
  .site-nav .brand { min-width: 0; font-size: 16px; }
  .site-nav .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav .actions .btn-primary { padding: 0 12px; }
  .hide-xs { display: none !important; }
}
@media (max-width: 380px) {
  .svc-summary { gap: 5px; }
  .svc-summary div { padding: 7px 6px; }
  .svc-summary small { font-size: 11px; }
  .svc-summary strong { font-size: 13.5px; overflow-wrap: anywhere; }
  .site-nav .actions .btn { padding: 0 12px; }
}
/* ---------------------------------------------------------------- order page: platforms, loading, confirm */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.order-layout > .card { margin: 0; }
@media (min-width: 1024px) { .order-layout { grid-template-columns: 300px minmax(0, 1fr); } .pf-panel { position: sticky; top: 80px; } }
@media (min-width: 1280px) { .order-layout { grid-template-columns: 340px minmax(0, 1fr); } }
.pf-panel { padding: 14px; }
.pf-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pf-panel-title { margin: 0; font-size: 15px; }
.pf-search { flex: 1 1 150px; max-width: 220px; }
.pf-search .input { min-height: 38px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-card { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 60px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.pf-card:hover:not(:disabled) { border-color: var(--primary); }
.pf-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pf-card.active { border-color: var(--primary); background: var(--primary-50); box-shadow: inset 0 0 0 1px var(--primary); }
.pf-card:disabled { cursor: default; opacity: .5; }
.pf-card-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.pf-card.active .pf-card-icon { background: var(--primary); color: #fff; }
.pf-card-icon .icon { width: 20px; height: 20px; }
.pf-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pf-card-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-card-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pf-empty { grid-column: 1 / -1; margin: 4px 0; }
.input-icon, .select-icon { position: relative; }
.input-icon-glyph, .select-icon-glyph { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted); pointer-events: none; }
.input-icon .input, .select-icon .select { padding-left: 42px; }
.select-icon-glyph { color: var(--primary); }
.search-results button { display: flex; align-items: flex-start; gap: 10px; }
.search-results .result-icon { display: inline-flex; flex: 0 0 auto; color: var(--primary); padding-top: 2px; }
.search-results .result-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); text-align: center; line-height: 1.2; }
.segmented input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-left: 10px; }
.spinner-sm { width: 14px; height: 14px; margin: 0 6px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.charge-box .amount { display: flex; align-items: center; }
.is-updating { opacity: .55; transition: opacity .15s; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
dialog.modal-order { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.dl-confirm { grid-template-columns: 150px minmax(0, 1fr); margin-bottom: 14px; }
.dl-confirm dd { font-weight: 600; }
.confirm-notes { margin: 0 0 14px; padding-left: 18px; color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.modal-actions-center { justify-content: center; }
.done-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success-50); color: var(--success); margin: 4px auto 10px; }
.done-icon .icon { width: 34px; height: 34px; }
.done-icon.is-error { background: var(--danger-50); color: var(--danger); }
.progress-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.progress-line .progress { flex: 1 1 60px; min-width: 60px; }
.stat-value.text-base, .text-base { font-size: 1rem; }
@media (max-width: 767px) {
  .dl-confirm { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl-confirm dd { margin-bottom: 10px; }
  .modal-actions .btn { flex: 1 1 140px; }
  .segmented span { font-size: 13px; padding: 0 6px; }
}

.dropdown-form { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.select-sm { min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 13.5px; }

.heading-icon { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.heading-icon .platform-icon { flex: 0 0 auto; color: var(--primary); }

/* ---------------------------------------------------------------- homepage */
ul.hero-trust, ol.steps, .platform-grid { list-style: none; padding: 0; margin-left: 0; }
.hero-trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual img { width: 100%; max-width: 480px; height: auto; }
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 0; }
.platform-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.platform-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.platform-card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: var(--primary-50); color: var(--primary); }
.platform-card-icon .icon { width: 24px; height: 24px; }
.platform-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.platform-card-text small { color: var(--muted); font-size: 13px; }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 32px auto 0; max-width: 720px; text-align: center; }
.stat-band > div { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.stat-band dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-band dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 1023px) {
  .hero-visual img { max-width: 400px; }
}
@media (max-width: 767px) {
  .hero-visual img { max-width: 280px; }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .platform-card { padding: 12px; gap: 10px; }
  .platform-card-icon { width: 38px; height: 38px; }
}

.toolbar .toolbar-search { flex: 2 1 280px; max-width: 440px; }
.link-line { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-line a { color: var(--primary); }
@media (max-width: 767px) { .link-line { max-width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .btn { display: none !important; }
  .main { margin: 0; }
}

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .s1 { fill: var(--series-1); }
.chart .s2 { fill: var(--series-2); }
.chart .bar:hover { opacity: .8; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---- utilities + provider cards (2026-10) ---- */
.min-w-0 { min-width: 0; }
.break-words { overflow-wrap: anywhere; word-break: break-word; }
.provider-card .card-header { gap: 12px; }
.provider-card .card-header > .badge { flex-shrink: 0; }
.dl.dl-provider { grid-template-columns: 140px minmax(0, 1fr); }
@media (max-width: 640px) { .dl.dl-provider { grid-template-columns: 1fr; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.badge .icon { width: 12px; height: 12px; }

/* ---- auth pages (login / register / Google) ---- */
.auth-body { background: var(--bg); }
.auth-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-side { position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); pointer-events: none; }
.auth-side h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.2; margin-bottom: 28px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 420px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.auth-points strong { display: block; color: #fff; font-size: 15px; margin-bottom: 2px; }
.auth-point-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; }
.auth-main { padding: 28px 24px; }
.auth-box { max-width: 420px; }
.auth-mobile-brand { display: none; margin-bottom: 14px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px 26px 22px; }
.auth-head { margin-bottom: 16px; }
.auth-head h1 { font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 4px; }
.auth-head .sub { margin: 0; line-height: 1.5; }
.auth-alerts { display: grid; gap: 8px; margin-bottom: 14px; }
.auth-alerts .alert { margin: 0; }
.auth-form .field { margin-bottom: 12px; }
.auth-form label, .auth-form .label-row { margin-bottom: 5px; }
.auth-form .input { min-height: 44px; font-size: 15px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.label-row label { margin: 0; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.auth-remember { margin: 0 0 14px; }
.auth-foot { margin: 16px 0 0; }
.btn-google { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong, var(--border)); gap: 12px; font-weight: 600; }
.btn-google:hover { background: var(--surface-2, var(--bg)); border-color: var(--muted); color: var(--text); }
.google-g { flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pw-field { position: relative; }
.pw-field .input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--bg); }
.pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pw-rules { list-style: none; padding: 0; margin: -4px 0 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.pw-rules li { display: inline-flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok::before { background: var(--success); }
.fw-normal { font-weight: 400; }
@media (max-width: 1023px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-main { place-items: start center; padding: 18px 16px 28px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 20px 16px 18px; border-radius: 16px; }
  .auth-head h1 { font-size: 1.35rem; }
}
.setting-sub { margin: -6px 0 14px 18px; padding-left: 16px; border-left: 2px solid var(--border); }
@media (max-width: 480px) { .setting-sub { margin-left: 6px; padding-left: 12px; } }
.balance-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.balance-summary-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
/* ---- admin blog list ---- */
.blog-toolbar { flex-wrap: wrap; gap: 10px; align-items: center; }
.tabs.tabs-inline { margin: 0; border-bottom: 0; }
.tabs.tabs-inline a { padding: 6px 10px; border-radius: 8px; border-bottom: 0; margin: 0; }
.tabs.tabs-inline a.active { background: var(--primary-50); }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 18px; text-align: center; }
.blog-search { margin-left: auto; min-width: 200px; flex: 0 1 260px; }
.blog-search .input { min-height: 38px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); }
.post-thumb { width: 96px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-main { min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.post-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.post-actions form { display: inline-flex; }
.featured-preview { display: block; width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; background: var(--surface-2); }
@media (max-width: 640px) {
  .blog-search { margin-left: 0; flex: 1 1 100%; }
  .post-row { grid-template-columns: 64px minmax(0, 1fr); padding: 14px 16px; }
  .post-thumb { width: 64px; height: 48px; }
  .post-actions { grid-column: 1 / -1; justify-content: flex-start; margin-left: -8px; }
}
/* ---- user API page ---- */
.api-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.api-item .label { margin-bottom: 6px; }
.api-item .copy-box { min-height: 44px; }
.api-value { min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.copy-box code { background: none; padding: 0; font-size: 13.5px; }
.copy-box-lg code { font-size: 15px; }
.api-steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.api-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.api-tabs button { border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.api-tabs button.active { color: var(--primary); background: var(--primary-50); }
.api-example pre { margin: 0 0 12px; max-width: 100%; overflow-x: auto; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; min-height: 32px; }
.api-warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); }
.api-warning h3 { display: flex; align-items: center; gap: 8px; }
.api-warning ul { padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 640px) { .api-grid { grid-template-columns: 1fr; } }
.copy-box > code, .copy-box > span:first-child { flex: 1 1 auto; min-width: 0; }
/* ---- rich select (order page category / service pickers) ---- */
.rs { position: relative; }
.rs-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0,0,0,0); }
.rs-trigger { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 40px 8px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.rs-trigger::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.rs.is-open .rs-trigger::after { transform: translateY(-30%) rotate(-135deg); }
.rs-trigger:hover { border-color: var(--muted); }
.rs-trigger:focus-visible, .rs.is-open .rs-trigger { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.rs-trigger:disabled { opacity: .6; cursor: not-allowed; }
.rs-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; }
.rs-icon svg { width: 18px; height: 18px; }
.rs-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.rs-placeholder { color: var(--muted); font-weight: 500; }
.rs-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rs-meta { font-weight: 700; font-size: 13.5px; white-space: nowrap; color: var(--text); }
.rs-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--primary-50); color: var(--primary); white-space: nowrap; }
.rs-panel { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; }
.rs-search { min-height: 40px; margin-bottom: 6px; }
.rs-list { list-style: none; margin: 0; padding: 0; max-height: min(360px, 55vh); overflow-y: auto; overscroll-behavior: contain; outline: none; }
.rs-option { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.rs-option.is-active { background: var(--surface-2); }
.rs-option[aria-selected="true"] { background: var(--primary-50); }
.rs-option[aria-selected="true"] .rs-title { color: var(--primary); }
.rs-empty { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 480px) {
  .rs-trigger { padding-right: 34px; gap: 10px; }
  .rs-trigger::after { right: 13px; }
  .rs-meta { font-size: 12.5px; }
  .rs-list { max-height: 50vh; }
}
/* Component fixes from the 2026-10 UI audit */
.table-wrap { position: relative; } /* keeps .sr-only / absolutely positioned cell content inside the scroll area */
.alert > div { min-width: 0; overflow-wrap: anywhere; }
.alert code { word-break: break-all; }
.balance-chip-label { font-weight: 600; color: var(--text-2); }
.provider-card .card-header { flex-wrap: nowrap; align-items: flex-start; }
/* ---- post-based subscription form (order page) ---- */
.sub-posts { border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); padding: 16px 16px 4px; margin: 0 0 16px; min-width: 0; }
.sub-posts[hidden] { display: none; }
.sub-posts-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; padding: 0 6px; margin-left: -6px; color: var(--text); }
.sub-posts .input, .sub-posts .select { background: var(--surface); }
.minmax { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.minmax-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.minmax-sep { padding-bottom: 12px; color: var(--muted); font-weight: 700; }
@media (max-width: 480px) { .sub-posts { padding: 14px 12px 2px; } }

/* Gateway deposit bonus */
.method-bonus { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .75rem; font-weight: 600; color: var(--success); }
.method-bonus svg { width: 14px; height: 14px; flex: none; }
.bonus-preview { margin-top: 6px; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--success); font-size: .8125rem; font-weight: 600; color: var(--text); background: var(--success-50); }
.bonus-preview-muted { color: var(--text-2); background: var(--surface-2); border-left-color: var(--border-strong); font-weight: 500; }

/* reCAPTCHA on auth forms */
.recaptcha-field { margin-bottom: 14px; }
.recaptcha-field .g-recaptcha { min-height: 78px; max-width: 100%; }
@media (max-width: 374px) { .recaptcha-field .g-recaptcha { transform: scale(.92); transform-origin: 0 0; } }
.recaptcha-note { margin: -2px 0 12px; font-size: 12px; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 13px; color: var(--danger); }

/* ---- public API documentation ---- */
.api-hero { padding-bottom: 20px; }
.api-docs { padding-bottom: 40px; }
.api-docs .copy-box { white-space: normal; }
.break-all { word-break: break-all; overflow-wrap: anywhere; }
.api-overview .copy-box code { white-space: normal; }
.api-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin: 16px 0 0; }
.api-facts > div { min-width: 0; }
.api-facts dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.api-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.api-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.api-nav-link { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.api-nav-link:hover, .api-nav-link:focus-visible { border-color: var(--primary); color: var(--primary); }
.api-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1100px) { .api-layout { grid-template-columns: minmax(0, 1fr) 400px; } .api-side { position: sticky; top: 84px; } }
.api-main, .api-side { min-width: 0; }
.api-method { scroll-margin-top: 84px; }
.api-method-head { flex-wrap: wrap; gap: 6px 12px; }
.api-method-head h2 { margin: 0; }
.api-action { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--primary-50); color: var(--primary); white-space: nowrap; }
.api-params { margin: 6px 0 18px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.api-param { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 4px 16px; padding: 10px 14px; border-top: 1px solid var(--border); }
.api-param:first-child { border-top: 0; }
.api-param dt { min-width: 0; }
.api-param dt code { font-size: 13px; overflow-wrap: anywhere; }
.api-param dd { margin: 0; font-size: 14px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .api-param { grid-template-columns: minmax(0, 1fr); } }
.code-block { min-width: 0; margin-bottom: 14px; }
.code-block:last-child { margin-bottom: 0; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-bottom: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.code-copy { min-height: 36px; text-transform: none; letter-spacing: 0; }
.code-block pre { margin: 0; max-width: 100%; overflow-x: auto; font-size: 13px; -webkit-overflow-scrolling: touch; }
.code-block pre:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.api-errors { padding-left: 18px; display: grid; gap: 6px; }

/* ---- footer social icons ---- */
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: color .15s, border-color .15s, background .15s, transform .15s; }
.social-link .icon { width: 20px; height: 20px; }
.social-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-50); transform: translateY(-1px); }
.social-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .social-link { transition: none; } .social-link:hover { transform: none; } }
.footer-bottom { align-items: center; }

/* admin cron page */
.cron-option-title { font-size: 15px; margin: 18px 0 8px; }
.cron-url-diag { margin-top: 8px; }
.copy-box code.break-all { white-space: normal; }

/* admin platforms */
.platform-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.platform-row-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.platform-row-name { min-width: 0; flex: 1 1 auto; max-width: 260px; }
.platform-row-name .input { min-height: 38px; }
.platform-table tr.is-off .platform-row-icon { opacity: .45; }

/* promo code gateways */
.coupon-gateways { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.coupon-gateways .check { display: flex; margin-bottom: 6px; }
.coupon-gateway-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; margin: 4px 0 6px 26px; }

/* blog SEO editor */
.serp-preview { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); min-width: 0; }
.serp-url { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.serp-title { font-size: 17px; line-height: 1.3; color: #1a0dab; margin: 2px 0 4px; overflow-wrap: anywhere; }
:root[data-theme="dark"] .serp-title { color: #8ab4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .serp-title { color: #8ab4f8; } }
.serp-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.seo-checks { list-style: none; padding: 0; margin: 6px 0 8px; display: grid; gap: 6px; font-size: 13px; }
.seo-checks li { display: flex; gap: 8px; align-items: flex-start; }
.seo-checks li .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.seo-checks li.ok .icon { color: var(--success); }
.seo-checks li.todo .icon { color: var(--warning); }
