/* PostPilot — hand-written stylesheet, no build step required. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #16181d;
  --text-2: #545b66;
  --text-3: #8a919c;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-text: #3730a3;
  --green: #15803d; --green-soft: #e8f6ed;
  --amber: #b45309; --amber-soft: #fdf3e2;
  --red: #c42b2b;   --red-soft: #fdecec;
  --blue: #1d64d8;  --blue-soft: #e8f0fd;
  --gray-soft: #eef0f3;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
  --sidebar: 236px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #171a20; --surface-2: #1e222a; --border: #272c35; --border-strong: #353b46;
    --text: #eceef2; --text-2: #a8afbb; --text-3: #737b88;
    --accent: #7c7cf6; --accent-hover: #9090fa; --accent-soft: #23244a; --accent-text: #c7c8ff;
    --green: #4ade80; --green-soft: #13291c; --amber: #fbbf24; --amber-soft: #2d2412;
    --red: #f87171; --red-soft: #321a1b; --blue: #7aa7ff; --blue-soft: #16233b; --gray-soft: #232831;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14.5px; font-weight: 600; }
p { margin: 0; }
[x-cloak] { display: none !important; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-top { display: flex; align-items: flex-start; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 520;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .compose-btn { margin: 0 0 16px; justify-content: center; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.avatar-initial { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--text-2); flex: none; }
.main { min-width: 0; }
.topbar { display: none; }
.content { max-width: 1180px; margin: 0 auto; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .content { padding: 20px 16px 48px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 35; }
}

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stat { padding: 16px 18px; }
.stat .label { color: var(--text-2); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 680; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 560;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

label.label { display: block; font-weight: 560; font-size: 13.5px; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; outline: none;
}
.textarea { height: auto; padding: 12px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field + .field { margin-top: 14px; }
.help { color: var(--text-3); font-size: 12.5px; margin-top: 5px; }
.error-text { color: var(--red); font-size: 13px; margin-top: 5px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); color: var(--green); }
.alert-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 25%, transparent); color: var(--red); }
.alert-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); color: var(--blue); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.flash-stack { margin-bottom: 18px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-draft { background: var(--gray-soft); color: var(--text-2); }
.s-scheduled { background: var(--blue-soft); color: var(--blue); }
.s-publishing, .s-pending, .s-retrying { background: var(--amber-soft); color: var(--amber); }
.s-published { background: var(--green-soft); color: var(--green); }
.s-partial { background: var(--amber-soft); color: var(--amber); }
.s-failed, .s-expired { background: var(--red-soft); color: var(--red); }
.s-active { background: var(--green-soft); color: var(--green); }

.net {
  width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff;
  font-weight: 750; font-size: 11px; letter-spacing: -.02em; flex: none; font-family: ui-sans-serif, system-ui, sans-serif;
}
.net-sm { width: 18px; height: 18px; border-radius: 5px; font-size: 8.5px; }
.net-lg { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.acct-avatar { position: relative; flex: none; }
.acct-avatar img, .acct-avatar .avatar-initial { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.acct-avatar .net { position: absolute; right: -4px; bottom: -4px; border: 2px solid var(--surface); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 20px; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--text-2); }
.empty svg { width: 36px; height: 36px; color: var(--text-3); margin-bottom: 8px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 12px; color: var(--text-2); font-weight: 540; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.tabs .count { color: var(--text-3); font-weight: 500; margin-left: 4px; }

.thumbs { display: flex; gap: 4px; }
.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--text-3); }
.thumb svg { width: 18px; height: 18px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; padding-bottom: 22px; font-size: 18px; }

/* ---------- Composer ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .composer { grid-template-columns: 1fr; } }
.acct-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--border-strong);
  border-radius: 999px; cursor: pointer; background: var(--surface); user-select: none; font-weight: 520; font-size: 13.5px;
}
.acct-pill:hover { border-color: var(--text-3); }
.acct-pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent) inset; }
.acct-pill img, .acct-pill .avatar-initial { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; font-size: 11px; }
.acct-pill input { display: none; }
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor textarea { border: 0; outline: 0; width: 100%; min-height: 190px; resize: vertical; padding: 16px; background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.6; display: block; }
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.counters { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counters .over { color: var(--red); font-weight: 650; }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--text-2);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .rm { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: grid; place-items: center; }
.media-item .tag { position: absolute; left: 5px; bottom: 5px; font-size: 10.5px; background: rgba(0,0,0,.65); color: #fff; padding: 1px 6px; border-radius: 4px; }
.media-item .rm svg { width: 13px; height: 13px; }
.media-item.loading { display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.segmented button { border: 0; background: transparent; padding: 7px 6px; border-radius: 5px; font: inherit; font-weight: 560; font-size: 13px; color: var(--text-2); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.issues { margin: 0; padding: 0; list-style: none; }
.issues li { display: flex; gap: 8px; font-size: 13px; color: var(--red); padding: 3px 0; }
.issues li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.preview-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.preview-text { padding: 0 14px 12px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.preview-media { display: grid; gap: 2px; background: var(--surface-2); }
.preview-media.n2, .preview-media.n3, .preview-media.n4 { grid-template-columns: 1fr 1fr; }
.preview-media img, .preview-media video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.preview-media.n1 img, .preview-media.n1 video { aspect-ratio: auto; max-height: 360px; }
.ai-panel { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--radius); padding: 14px; }
.ai-panel .input, .ai-panel .select { background: var(--surface); }
.spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-day { min-height: 118px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; display: flex; flex-direction: column; gap: 4px; }
.cal-day.other { background: var(--bg); }
.cal-day.other .num { color: var(--text-3); }
.cal-day .num { font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 2px 4px; display: flex; justify-content: space-between; align-items: center; }
.cal-day.today .num span:first-child { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-day .add { opacity: 0; color: var(--text-3); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; }
.cal-day:hover .add { opacity: 1; }
.cal-day .add:hover { background: var(--surface-2); color: var(--accent); text-decoration: none; }
.cal-day .add svg { width: 14px; height: 14px; }
.chip { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 5px; font-size: 12px; color: var(--text); background: var(--surface-2); border-left: 3px solid var(--text-3); overflow: hidden; }
.chip:hover { text-decoration: none; filter: brightness(.97); }
.chip .t { color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }
.chip .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.c-scheduled { border-left-color: var(--blue); background: var(--blue-soft); }
.chip.c-published { border-left-color: var(--green); background: var(--green-soft); }
.chip.c-failed, .chip.c-partial { border-left-color: var(--red); background: var(--red-soft); }
.chip.c-publishing { border-left-color: var(--amber); background: var(--amber-soft); }
.chip.c-draft { border-left-color: var(--text-3); }
@media (max-width: 760px) {
  .cal-day { min-height: 72px; }
  .chip .x, .chip .t { display: none; }
  .chip { width: 10px; height: 10px; padding: 0; border-radius: 50%; border-left-width: 0; }
  .chip.c-scheduled { background: var(--blue); } .chip.c-published { background: var(--green); }
  .chip.c-failed, .chip.c-partial { background: var(--red); } .chip.c-publishing { background: var(--amber); } .chip.c-draft { background: var(--text-3); }
  .cal-day .chips { display: flex; flex-wrap: wrap; gap: 3px; }
}

/* ---------- Provider cards ---------- */
.provider { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.provider .desc { color: var(--text-2); font-size: 13px; flex: 1; }
.env-hint { font-size: 12px; color: var(--text-3); }
.env-hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 13px; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .disabled { opacity: .45; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.post-body { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.6; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.cal-day .chips > * + * { margin-top: 4px; }
@media (max-width: 760px) { .cal-day .chips > * + * { margin-top: 0; } }

/* ---------- Billing & admin ---------- */
.nav-label { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 18px 10px 6px; }
.nav-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.alert .btn { flex: none; }
.alert .grow { align-self: center; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.plan .ribbon { position: absolute; top: -11px; left: 22px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 650; padding: 2px 10px; border-radius: 999px; }
.plan .price { font-size: 28px; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 2px; }
.plan li.no { color: var(--text-3); }
.plan li.no svg { color: var(--text-3); }
.plan.current { background: var(--surface-2); }
.meter { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.warn > span { background: var(--amber); }
.meter.full > span { background: var(--red); }
.usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 700px) { .usage { grid-template-columns: 1fr; } }
.toggle { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 3px; border-radius: 999px; gap: 3px; }
.toggle button { border: 0; background: transparent; padding: 6px 16px; border-radius: 999px; font: inherit; font-weight: 560; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.toggle button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.save-chip { font-size: 11.5px; font-weight: 650; color: var(--green); margin-left: 4px; }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 12, 16, .5); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-tab { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; background: var(--surface); text-align: left; font: inherit; color: var(--text); }
.pay-tab.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.pay-tab strong { display: block; font-size: 13.5px; }
.pay-tab span { font-size: 12px; color: var(--text-2); }
.networks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.networks label { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.networks label.on { border-color: var(--accent); background: var(--accent-soft); }
.networks input { accent-color: var(--accent); }
.instructions { white-space: pre-line; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; }
.waiting { text-align: center; padding: 34px 20px; }
.waiting .ring { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.waiting .ring svg { width: 30px; height: 30px; }
.waiting.ok .ring { background: var(--green-soft); color: var(--green); }
.waiting.bad .ring { background: var(--red-soft); color: var(--red); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
.s-paid { background: var(--green-soft); color: var(--green); }
.s-rejected { background: var(--red-soft); color: var(--red); }
.s-trial { background: var(--blue-soft); color: var(--blue); }
.s-suspended { background: var(--red-soft); color: var(--red); }
.search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.search .input { max-width: 320px; }
.plan-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.plan-edit .field + .field { margin-top: 0; }
.check-row { display: flex; gap: 18px; flex-wrap: wrap; }
.s-current { background: var(--green-soft); color: var(--green); }
