/* Platform admin (super) */

.super .page { max-width: 1320px; }

/* shell */
.super .sp-mark { background: var(--ink); color: var(--surface); }
.super .portal-link .ti { background: var(--surface-3); color: var(--ink-2); }
.super .portal-link:hover { border-color: var(--line-strong); }
.sp-topsearch {
  display: flex; align-items: center; gap: 10px; flex: 1 1 280px; max-width: 560px; height: 44px; padding: 0 14px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--faint);
}
.sp-topsearch:hover { border-color: var(--line-strong); }
.sp-topsearch:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.sp-topsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ink); }
.sp-topsearch input::placeholder { color: #99a1ba; }
.super .topbar .icon-btn.mobile-only { justify-content: center; align-items: center; }

/* square initials tiles for firms */
.sp-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sp-who-main { min-width: 0; }
.sp-av { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 750; }
.sp-av-lg { width: 52px; height: 52px; border-radius: 15px; font-family: var(--font-display); font-stretch: 110%; font-weight: 800; font-size: 17px; }
:root[data-theme="dark"] .sp-av.t-tape { color: var(--tape); }

/* stacked rows on phones: the row menu sits in the card's top corner */
@media (max-width: 720px) {
  .sp-cards tbody tr { position: relative; }
  .sp-cards td.primary { padding-right: 44px !important; }
  .sp-cards td.actions { position: absolute; top: 10px; right: 10px; width: auto; padding: 0 !important; }
}

/* attention tiles on the dashboard */
.sp-inbox { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sp-ib {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; color: var(--ink); min-width: 0;
  border: 1px solid transparent; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.2s;
}
.sp-ib:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -18px rgba(15, 22, 48, 0.45); color: var(--ink); }
.sp-ib .ti { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); }
.sp-ib .ti .icon { width: 19px; height: 19px; }
.sp-ib-text { min-width: 0; }
.sp-ib-text b { display: block; font-family: var(--font-display); font-stretch: 112%; font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sp-ib-text span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-ib-go { margin-left: auto; flex: none; color: var(--muted); }
.sp-ib-tape { background: var(--tape-soft); border-color: color-mix(in srgb, var(--tape) 25%, var(--tape-soft)); }
.sp-ib-tape .ti { color: #b57400; }
.sp-ib-violet { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 10%, var(--violet-soft)); }
.sp-ib-violet .ti { color: var(--violet); }
.sp-ib-coral { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger-bright) 12%, var(--danger-soft)); }
.sp-ib-coral .ti { color: var(--danger); }
.sp-ib-sky { background: var(--sky-soft); border-color: color-mix(in srgb, var(--sky-bright) 14%, var(--sky-soft)); }
.sp-ib-sky .ti { color: var(--sky); }
:root[data-theme="dark"] .sp-ib-tape .ti { color: var(--tape); }
@media (max-width: 1100px) { .sp-inbox { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .sp-inbox { gap: 8px; }
  .sp-ib { padding: 12px; gap: 10px; border-radius: 16px; }
  .sp-ib .ti { width: 34px; height: 34px; border-radius: 10px; }
  .sp-ib .sp-ib-go { display: none; }
  .sp-ib-text b { font-size: 19px; }
  .sp-ib-text span { white-space: normal; font-size: 12.5px; line-height: 1.3; }
}
.super dl.kv { margin: 0; }
.sp-narrow { max-width: 880px; }
.sp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.sp-break { overflow-wrap: anywhere; word-break: break-word; }
.sp-nowrap { white-space: nowrap; }
.sp-gap { display: flex; flex-direction: column; gap: 20px; }
.sp-gap-sm { display: flex; flex-direction: column; gap: 12px; }
.sp-muted-link { color: var(--muted); font-weight: 600; }
.sp-muted-link:hover { color: var(--ink); }
.sp-ext { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.sp-ext .icon { width: 13px; height: 13px; }
.sp-ext:hover { color: var(--brand-text); }
.sp-hr { height: 1px; background: var(--line); margin: 4px 0; border: 0; }
.sp-badge-soft { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.sp-badge-tape { background: var(--tape-soft); color: #8a5a00; }
:root[data-theme="dark"] .sp-badge-tape { color: var(--tape); }
.sp-count { color: var(--faint); font-weight: 650; font-variant-numeric: tabular-nums; }

/* stats rows */
.sp-stats + .sp-stats { margin-top: 12px; }
.sp-stats .stat-value small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.sp-stats .stat-foot .chip { height: 20px; font-size: 11.5px; padding: 0 7px; }
.sp-stats .stat-foot .chip::before { display: none; }
.sp-stat-hint { color: var(--faint); }

/* warning stack on the dashboard */
.sp-warnings { display: grid; gap: 8px; margin-bottom: 18px; }
.sp-warn { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.sp-warn .ti { flex: none; }
.sp-warn-body { flex: 1; min-width: 0; }
.sp-warn-title { font-weight: 700; }
.sp-warn-text { color: var(--muted); margin-top: 1px; }
.sp-warn .btn { flex: none; }
.sp-warn.is-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface)); }
.sp-warn.is-warning { border-color: color-mix(in srgb, var(--tape) 45%, var(--line)); }
@media (max-width: 720px) {
  .sp-warn { flex-wrap: wrap; }
  .sp-warn .btn { width: 100%; }
}

/* CSS column chart (counts) */
.sp-bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--line); position: relative; }
.sp-bars > span { flex: 1 1 0; min-width: 0; position: relative; height: 100%; display: flex; align-items: flex-end; }
.sp-bars > span > i { display: block; width: 100%; min-height: 2px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--brand) 26%, var(--surface)); transition: background 0.12s; }
.sp-bars > span:last-child > i { background: var(--brand); }
.sp-bars > span.is-zero > i { background: var(--line); }
.sp-bars > span:hover > i { background: color-mix(in srgb, var(--brand) 60%, var(--surface)); }
.sp-bars > span:last-child:hover > i { background: var(--brand-strong); }
.sp-bars > span > b {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: 3px 7px; border-radius: 6px;
  background: var(--ink); color: var(--surface); font-size: 11.5px; font-weight: 650; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.1s; z-index: 2;
}
.sp-bars > span:hover > b { opacity: 1; }
.sp-bars-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sp-bars-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.sp-bars-total { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* compact lists inside cards */
.sp-rows { display: flex; flex-direction: column; }
.sp-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); color: inherit; text-decoration: none !important; min-width: 0; }
.sp-row:first-child { border-top: 0; }
a.sp-row:hover { background: var(--surface-2); }
.sp-row-main { flex: 1; min-width: 0; }
.sp-row-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-end { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.sp-card-empty { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sp-card-empty .icon { color: var(--faint); }

/* tenant header */
.sp-entity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sp-entity-mark { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-family: var(--font-display); font-weight: 650; font-size: 17px; flex: none; border: 1px solid var(--line); }
.sp-entity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.sp-entity-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
@media (max-width: 720px) {
  .sp-entity-mark { width: 40px; height: 40px; font-size: 15px; border-radius: 11px; }
  .sp-head-actions { width: 100%; }
  .sp-head-actions > .btn, .sp-head-actions > .dropdown { flex: 1 1 auto; }
  .sp-head-actions > .dropdown > .btn { width: 100%; }
}

/* usage meters */
.sp-usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.sp-usage-item .meter { height: 8px; margin-top: 8px; }
.sp-usage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.sp-usage-top strong { font-variant-numeric: tabular-nums; }
.sp-usage-top .muted { font-size: 12.5px; }
@media (max-width: 720px) { .sp-usage { grid-template-columns: minmax(0, 1fr); } }
.sp-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.sp-mini { padding: 14px 20px; min-width: 0; }
.sp-mini + .sp-mini { border-left: 1px solid var(--line); }
.sp-mini-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sp-mini-value { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .sp-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-mini:nth-child(3) { border-left: 0; }
  .sp-mini:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.sp-features { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-feature { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--faint); }
.sp-feature .icon { width: 13px; height: 13px; }
.sp-feature.is-on { background: var(--success-soft); color: var(--success); }

/* audit timeline */
.sp-log { list-style: none; margin: 0; padding: 0; }
.sp-log li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.sp-log li:first-child { border-top: 0; }
.sp-log .dot { margin-top: 6px; }
.sp-log-title { font-weight: 650; }
.sp-log-meta { color: var(--muted); font-size: 12px; margin-top: 1px; }
.sp-log-detail { color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }

/* domain rows */
.sp-domain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.sp-domain:first-child { border-top: 0; }
.sp-domain-name { font-weight: 700; overflow-wrap: anywhere; }
.sp-domain-actions { margin-left: auto; display: flex; gap: 6px; }
.sp-steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; }

/* plan cards */
.sp-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sp-plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sp-plan.is-featured { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px var(--brand-soft); }
.sp-plan.is-inactive { opacity: 0.72; }
.sp-plan-head { padding: 18px 20px 14px; }
.sp-plan-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; font-weight: 750; }
.sp-plan-desc { color: var(--muted); font-size: 13px; margin-top: 4px; min-height: 2.8em; }
.sp-price { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.sp-price-value { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sp-price-unit { color: var(--muted); font-size: 13px; font-weight: 600; }
.sp-price-alt { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sp-plan-body { padding: 14px 20px; border-top: 1px solid var(--line); flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sp-plan-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; font-size: 13px; }
.sp-limits dt { color: var(--muted); }
.sp-limits dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.sp-switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
@media (max-width: 720px) { .sp-switch-grid { grid-template-columns: minmax(0, 1fr); } }

/* settings layout: vertical nav + content */
.sp-settings { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.sp-subnav { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.sp-subnav a {
  display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 10px; border-radius: 12px;
  color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap;
}
.sp-subnav a:hover { background: var(--surface); color: var(--ink); }
.sp-subnav a.is-active { background: var(--brand-soft); color: var(--ink); font-weight: 700; }
@media (max-width: 1024px) {
  .sp-settings { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sp-subnav { position: static; flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .sp-subnav::-webkit-scrollbar { display: none; }
  .sp-subnav a { flex: none; min-height: 38px; height: 38px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
  .sp-subnav a .ti { display: none; }
  .sp-subnav a.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
}

/* sticky save bar */
.sp-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(8px); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sp-savebar .hint { margin: 0; }
.sp-settings .sp-savebar { border-radius: 0 0 var(--r-xl) var(--r-xl); }
@media (max-width: 1024px) {
  .sp-savebar { bottom: calc(var(--tabbar-h) + var(--safe-b)); }
}
@media (max-width: 720px) {
  .sp-savebar { flex-wrap: wrap; }
  .sp-savebar > .row { width: 100%; }
  .sp-savebar > .row .btn { flex: 1; }
}

/* secret fields */
.sp-secret-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--success); }
.sp-secret-state .icon { width: 14px; height: 14px; }

/* repeatable rows (site editor, bank accounts) */
.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-list-items { display: flex; flex-direction: column; gap: 10px; }
.sp-list-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.sp-list-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.sp-list-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; min-width: 0; }
.sp-list-fields .is-wide { grid-column: 1 / -1; }
.sp-list-fields.is-single { grid-template-columns: minmax(0, 1fr); }
.sp-list-ctrl { display: flex; gap: 2px; }
.sp-list-ctrl .btn { color: var(--muted); }
.sp-list-ctrl .btn:hover { color: var(--ink); }
.sp-list-ctrl .btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.sp-list-row:first-child [data-move="-1"], .sp-list-row:last-child [data-move="1"] { opacity: 0.35; pointer-events: none; }
.sp-list-empty { padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); text-align: center; color: var(--muted); font-size: 13px; }
.sp-list-add { align-self: flex-start; }
.sp-list-row.is-new { animation: sp-row-in 0.22s var(--ease); }
@keyframes sp-row-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 720px) {
  .sp-list-row { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 10px; }
  .sp-list-num { display: none; }
  .sp-list-fields { grid-template-columns: minmax(0, 1fr); }
  .sp-list-ctrl { order: -1; justify-content: flex-end; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: -4px -4px 0; }
}

/* icon field */
.sp-icon-field { display: flex; gap: 8px; align-items: center; }
.sp-icon-preview { width: 40px; height: 40px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink); flex: none; }
.sp-icon-preview.is-missing { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: var(--danger-soft); }
.sp-icon-preview.is-empty { color: var(--faint); }

/* image field */
.sp-image { display: flex; gap: 12px; align-items: center; }
.sp-image-thumb { width: 88px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2) center / contain no-repeat; display: grid; place-items: center; overflow: hidden; flex: none; color: var(--faint); }
.sp-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sp-image-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-file { position: relative; display: inline-flex; }
.sp-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sp-file-name { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* section list on the site editor */
.sp-sections .list-item { padding: 14px 20px; }
.sp-sections .li-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.sp-sections .li-end { display: flex; align-items: center; gap: 8px; }
@media (max-width: 720px) {
  .sp-sections .list-item { flex-wrap: wrap; }
  .sp-sections .li-end { width: 100%; padding-left: 48px; }
  .sp-sections .li-sub { -webkit-line-clamp: 2; }
}

/* legal editor */
.sp-legal-text { min-height: 520px; font-size: 14px; line-height: 1.65; }
.sp-doc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; }

/* log viewer */
.sp-logview { max-height: 460px; overflow: auto; margin: 0; padding: 12px 0; background: #0f1420; color: #c9d1de; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sp-logview div { padding: 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-logview div:hover { background: rgba(255, 255, 255, 0.04); }
.sp-logview .is-err { color: #ff9aa2; }
.sp-logview .is-trace { color: #7f8aa0; }
.sp-logview .ts { color: #7f8aa0; }

/* environment checks */
.sp-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-check { display: flex; align-items: flex-start; gap: 10px; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 13px; min-width: 0; }
.sp-check:nth-child(-n+2) { border-top: 0; }
.sp-check:nth-child(even) { border-left: 1px solid var(--line); }
.sp-check .icon { flex: none; margin-top: 1px; width: 17px; height: 17px; }
.sp-check.is-ok .icon { color: var(--success); }
.sp-check.is-bad .icon { color: var(--danger); }
.sp-check-name { font-weight: 650; }
.sp-check-detail { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .sp-checks { grid-template-columns: minmax(0, 1fr); }
  .sp-check:nth-child(2) { border-top: 1px solid var(--line); }
  .sp-check:nth-child(even) { border-left: 0; }
}

/* copyable command */
.sp-command { display: flex; align-items: stretch; gap: 6px; }
.sp-command .code-block { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* version + update package */
.sp-version { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-version-arrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-version-arrow .icon { color: var(--faint); }
.sp-pkg { border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: var(--r-lg); background: var(--brand-soft); padding: 18px 20px; }
.sp-pkg-files { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; }
.sp-pkg-files li { display: flex; gap: 8px; align-items: center; min-width: 0; }
.sp-pkg-files li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* TOTP setup */
.sp-totp { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; align-items: start; }
.sp-qr { width: 196px; height: 196px; padding: 10px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.sp-qr svg { width: 100%; height: 100%; }
.sp-secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink); overflow-wrap: anywhere; }
.sp-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: sp-step; }
.sp-step-list > li { position: relative; padding-left: 38px; }
.sp-step-list > li::before { counter-increment: sp-step; content: counter(sp-step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-weight: 750; font-size: 12.5px; }
.sp-step-title { font-weight: 700; margin-bottom: 6px; }
.sp-code-input { max-width: 200px; letter-spacing: 0.32em; font-size: 20px; font-weight: 700; text-align: center; font-family: var(--font-display); }
@media (max-width: 720px) {
  .sp-totp { grid-template-columns: minmax(0, 1fr); }
  .sp-qr { margin: 0 auto; }
}

/* misc tables */
.sp-amount-sub { color: var(--muted); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.table td.sp-wrap { white-space: normal; }
.sp-chip-group { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-confirm-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sp-danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.sp-danger-zone .card-head h2 { color: var(--danger); }
.sp-inline-form { display: inline; }
.sp-filters-dates { display: flex; align-items: center; gap: 6px; }
.sp-filters-dates .input { width: 150px; }
/* table toolbars: compact selects instead of full-width rows */
.sp-toolbar .select { width: auto; flex: 0 1 auto; min-width: 140px; max-width: 220px; }
.sp-toolbar .sp-filters-dates .input { width: 148px; }
@media (max-width: 720px) {
  .sp-toolbar { padding: 10px 12px; gap: 8px; }
  .sp-toolbar .input-icon { flex: 1 1 100%; max-width: none; }
  .sp-toolbar .select { flex: 1 1 140px; max-width: none; }
  .sp-toolbar .spacer { display: none; }
  .sp-toolbar .sp-filters-dates { flex: 1 1 100%; }
  .sp-toolbar .sp-filters-dates .input { width: auto; flex: 1; min-width: 0; }
  .sp-hide-sm { display: none !important; }
}
.sp-chart-empty { height: 186px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--muted); font-size: 13px; border: 1.5px dashed var(--line); border-radius: var(--r); padding: 16px; }
.sp-chart-empty .icon { color: var(--faint); }

/* stacked (mobile) table cells: keep a value and its sub line together on the right */
.sp-show-sm { display: none; }
@media (max-width: 720px) {
  .table-stack td.sp-show-sm { display: flex; }
  .table-stack td > .sp-cell { text-align: right; min-width: 0; }
  .table-stack td > .sp-cell .cell-sub { margin-top: 0; }
}

.stats.sp-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.sp-stats-3 .stat:nth-child(3) { border-left: 1px solid var(--line); }
.stats.sp-stats-3 .stat:nth-child(n+3) { border-top: 0; }
@media (max-width: 720px) {
  .stats.sp-stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stats.sp-stats-3 .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}
.sp-filterbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sp-price-contact { font-size: 20px; color: var(--warning); }
.sp-field-sm { max-width: 160px; }
.sp-field-md { max-width: 240px; }
.sp-ann-preview { margin: 0; }
.sp-ann-preview .btn { pointer-events: none; }
.sp-field-end { justify-content: flex-end; }

.sp-border-top { border-top: 1px solid var(--line); }
.sp-checks.is-single { grid-template-columns: minmax(0, 1fr); }
.sp-checks.is-single .sp-check { border-left: 0 !important; border-top: 1px solid var(--line); }
.sp-checks.is-single .sp-check:first-child { border-top: 0; }
.sp-stats .stat-value small.text-danger { color: var(--danger); }

.sp-log-entry { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.sp-log-entry summary { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 12px; padding: 7px 16px; cursor: pointer; list-style: none; }
.sp-log-entry summary::-webkit-details-marker { display: none; }
.sp-log-entry summary:hover { background: rgba(255, 255, 255, 0.04); }
.sp-log-entry .ts { color: #7f8aa0; white-space: nowrap; }
.sp-log-entry .msg { overflow-wrap: anywhere; }
.sp-log-entry.is-err .msg { color: #ff9aa2; }
.sp-log-entry .ctx { grid-column: 2; color: #7f8aa0; overflow-wrap: anywhere; }
.sp-log-entry pre { margin: 0; padding: 6px 16px 10px 124px; color: #7f8aa0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.sp-logview { padding: 0; }
@media (max-width: 720px) {
  .sp-log-entry summary { grid-template-columns: minmax(0, 1fr); }
  .sp-log-entry .ctx { grid-column: 1; }
  .sp-log-entry pre { padding-left: 16px; }
}
.sp-version-new { color: var(--brand-text); }
.sp-row-title, .sp-row-sub { display: block; }
.sp-row-sub.is-wrap { white-space: normal; }

.sp-title-row { gap: 10px; flex-wrap: wrap; }
.sp-title-inline { gap: 8px; align-items: baseline; }
.sp-align-end { align-items: flex-end; }
.sp-align-start { align-items: flex-start; }
.sp-foot-block { display: block; }
.sp-row.is-top { align-items: flex-start; }
.sp-input-num { max-width: 130px; }
.sp-ink-link { color: inherit; }
.chart.sp-chart-sm { height: 186px; }
.super .choice-title, .super .choice-desc { display: block; }

/* update package upload */
.sp-upload-progress .meter { height: 8px; }
.sp-upload-help { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.sp-upload-help summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; color: var(--muted); list-style: none; }
.sp-upload-help summary::-webkit-details-marker { display: none; }
.sp-upload-help summary:hover { color: var(--ink); }
.sp-upload-help[open] summary { color: var(--ink); }
.sp-upload-help ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
