/* ──────────────────────────────────────────────────────────────────────
 * TextBee Web UI — minimal stylesheet (Pico.css-inspired)
 * Cream background, dark text, amber accent #c97b3f matching textbee.online
 * Mobile-first responsive.
 * ────────────────────────────────────────────────────────────────────── */

:root {
    --bg: #fdf8f0;
    --bg-alt: #f5ead4;
    --text: #2c1810;
    --text-muted: #6b5b4e;
    --accent: #c97b3f;
    --accent-dark: #a85e2a;
    --border: #e0d4be;
    --success: #5a8a3a;
    --error: #c0392b;
    --warning: #d4a017;
    --code-bg: #f0e6d2;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; line-height: 1.2; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

code, pre {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    background: var(--code-bg);
    border-radius: 4px;
    padding: 0.1em 0.3em;
    font-size: 0.9em;
}
pre { padding: 1em; overflow-x: auto; }

/* ── Top nav ────────────────────────────────────────────────────── */
nav.topnav {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
nav.topnav .brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
nav.topnav .brand img { height: 24px; width: 24px; }
nav.topnav .nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
nav.topnav .nav-links a { color: var(--text); font-weight: 500; }
nav.topnav .nav-links a:hover { color: var(--accent); }
nav.topnav .user-email { color: var(--text-muted); font-size: 0.9rem; }

/* ── Container ─────────────────────────────────────────────────── */
main.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.center-form {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.card h2, .card h3 { margin-top: 0; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}
/* Типы перечислены поштучно, и каждый новый тип поля приходилось дописывать
   в оба списка — из-за этого 26.07 поле «Адрес (URL)» на странице вебхуков
   осталось узким рядом с полем секрета. `:not()` покрывает всё, кроме
   переключателей и кнопок, которым ширина во всю строку не нужна. */
.form-group input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]) {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    color: var(--text);
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 123, 63, 0.2);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
}
.btn:hover { background: var(--border); }
.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger {
    background: white;
    color: var(--error);
    border-color: var(--error);
}
.btn-danger:hover { background: var(--error); color: white; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

/* ── Tables ────────────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.table th, .table td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--bg-alt);
    font-weight: 600;
    font-size: 0.9rem;
}
.table-striped tbody tr:nth-child(even) {
    background: var(--bg);
}

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success { background: #dff0d8; color: #3c763d; border-color: #d0e9c6; }
.alert-error { background: #f2dede; color: #a94442; border-color: #ebccd1; }
.alert-warning { background: #fcf8e3; color: #8a6d3b; border-color: #faebcc; }

/* ── Plan badges ───────────────────────────────────────────────── */
.plan-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
.plan-free { background: var(--bg-alt); color: var(--text-muted); }
.plan-pro { background: var(--accent); color: white; }
.plan-business { background: var(--accent-dark); color: white; }

/* ── Plan cards ────────────────────────────────────────────────── */
.plan-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: white;
}
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201, 123, 63, 0.15); }
.plan-card .price { font-size: 2rem; font-weight: 700; color: var(--text); margin: 0.5rem 0; }
.plan-card .price small { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0; }
.plan-card ul li { padding: 0.3rem 0; color: var(--text-muted); }
.plan-card ul li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* ── Token display ─────────────────────────────────────────────── */
.token-box {
    background: var(--code-bg);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.token-box .copy-btn {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    main.container { padding: 0 1rem; }
    .center-form { margin: 2rem 1rem; padding: 1.5rem; }
    .table { font-size: 0.85rem; }
    .table th, .table td { padding: 0.4rem 0.5rem; }
    h1 { font-size: 1.5rem; }
}
/* ══════════════════════════════════════════════════════════════════
 * 2026-07-19 — App shell (sidebar layout) + shared components.
 *
 * Everything below replaces CSS that used to be copy-pasted inline into
 * individual templates (~750 lines across 19 files; `.toast` alone was
 * byte-identical in 7 of them). Define once here, never in a page.
 * ══════════════════════════════════════════════════════════════════ */

/* ── Shell ─────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}
.sidebar-brand:hover { text-decoration: none; opacity: 0.85; }
/* Horizontal lockup is 367×64 — size by height, let width follow. */
.sidebar-brand img { height: 30px; width: auto; max-width: 100%; }

.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-section {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.sidebar-nav a,
.sidebar-footer a {
    padding: 0.5rem 1.25rem;
    color: var(--text);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-footer a:hover { background: rgba(201, 123, 63, 0.08); color: var(--accent); text-decoration: none; }
.sidebar-nav a.active,
.sidebar-footer a.active {
    background: rgba(201, 123, 63, 0.13);
    border-left-color: var(--accent);
    color: var(--accent-dark);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sidebar-user {
    padding: 0.6rem 1.25rem 0.2rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    word-break: break-all;
}
.sidebar-logout { color: var(--text-muted) !important; font-size: 0.9rem !important; }

.app-main {
    flex: 1;
    min-width: 0;
    max-width: 1100px;
    padding: 2rem 2rem 4rem;
}

/* ── Mobile: sidebar goes off-canvas ───────────────────────────── */
.mobile-bar { display: none; }
.sidebar-scrim { display: none; }

@media (max-width: 900px) {
    .mobile-bar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 1rem;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 30;
    }
    .mobile-brand { display: flex; align-items: center; }
    .mobile-brand img { height: 24px; width: auto; }
    .burger {
        font-size: 1.3rem;
        line-height: 1;
        background: none;
        border: 1px solid var(--border);
        border-radius: 4px;
        padding: 0.25rem 0.6rem;
        cursor: pointer;
        color: var(--text);
    }
    .sidebar {
        position: fixed;
        z-index: 40;
        left: 0; top: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 35;
    }
    .app-main { padding: 1.25rem 1rem 3rem; }
}

/* ── Toasts (was inline in 7 templates, byte-identical) ────────── */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.toast-success { background: #dff0d8; color: #3c763d; border-color: #c3e6cb; }
.toast-error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.toast-warning { background: #fff3cd; color: #856404; border-color: #ffeeba; }

/* ── Badges (was inline in 5 templates) ────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}
.badge-sent, .badge-approved, .badge-allow, .badge-active { background: #d4edda; color: #155724; }
.badge-delivered { background: #cce5ff; color: #004085; }
.badge-pending, .badge-queued, .badge-created { background: #fff3cd; color: #856404; }
.badge-failed, .badge-rejected, .badge-block, .badge-error { background: #f8d7da; color: #721c24; }
/* 2026-07-25: у входящих статус «received» не имел своего класса, поэтому в истории
   часть строк была с цветной плашкой, а часть — простым текстом. Выглядело как сбой.
   Заодно закрыты остальные конечные состояния, которые встречаются в таблицах. */
.badge-received { background: #e6f0ea; color: #1f5136; }
.badge-canceled, .badge-cancelled, .badge-refunded, .badge-expired { background: #e9e4d8; color: #5c5646; }

/* ── Compact data table (was `table.recent` inline in 4 templates) */
table.recent { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.recent th, table.recent td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: top;
}
table.recent th { background: var(--bg-alt); font-weight: 600; color: var(--text-muted); }

/* ── Inline form rows (was inline in 5 templates) ──────────────── */
.form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 0.75rem; }
.form-row .form-group { margin-bottom: 0; min-width: 180px; flex: 1; }
.form-group label { font-size: 0.9rem; }
.form-group select,
.form-group textarea,
.form-group input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]) {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    color: var(--text);
}
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201, 123, 63, 0.2);
}
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Copyable URL row (integrations page) ──────────────────────── */
.url-box { display: flex; gap: 0.4rem; align-items: center; margin: 0.3rem 0; }
.url-box code {
    flex: 1;
    padding: 0.35rem 0.5rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
}

/* ── Progress bar (bulk send) ──────────────────────────────────── */
.progress-bar { height: 22px; background: var(--bg-alt); border-radius: 11px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
.progress-stats { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* ── Misc shared bits ──────────────────────────────────────────── */
.page-intro { color: var(--text-muted); margin-top: -0.5rem; margin-bottom: 1.5rem; }
.muted { color: var(--text-muted); }
.big-number { font-size: 2rem; font-weight: 700; margin: 0.25rem 0; }
ol.steps { font-size: 0.9rem; margin: 0.5rem 0 0.5rem 1.2rem; padding: 0; }
ol.steps li { margin-bottom: 0.35rem; }

/* ── Plan grid (billing) ───────────────────────────────────────────
 * 2026-07-19: `.plan-grid`, `.plan-price`, `.plan-features`,
 * `.plan-card-current` and `.plan-current-label` were used in billing.html
 * but defined NOWHERE — so the four tariff cards stacked full-width down
 * the page instead of sitting side by side. Defining them here. */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    /* Equal-height cards, so the action blocks below can line up. */
    align-items: stretch;
}
/* 2026-07-19: each card is a column whose feature list absorbs the slack, which
   pins .plan-actions to the bottom edge. Without this the buttons sat wherever
   their own card's text happened to end and stepped down across the row. */
.plan-card {
    display: flex;
    flex-direction: column;
}
.plan-card .plan-features { flex: 1 1 auto; }
.plan-actions { margin-top: auto; padding-top: 1rem; }
.plan-quota {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0.2rem 0;
}
.plan-price { font-size: 1.4rem; margin: 0.4rem 0; }
.plan-price strong { font-size: 1.6rem; }
.plan-features { list-style: none; padding: 0; margin: 0.75rem 0; text-align: left; }
.plan-features li { padding: 0.2rem 0; color: var(--text-muted); font-size: 0.9rem; }
.plan-features li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.plan-card-current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201, 123, 63, 0.15); }
.plan-current-label { margin-top: 1rem; color: var(--accent-dark); font-weight: 600; font-size: 0.9rem; }

/* Long UUIDs in the sidebar footer shouldn't spill outside the rail. */
.sidebar-user { overflow-wrap: anywhere; line-height: 1.3; }

/* ── Page header / tabs / stat cards ───────────────────────────────
 * 2026-07-19: extracted from the admin pages, each of which had its own
 * inline version of a title row and a link strip. */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }

.btn-secondary {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}
.btn-secondary:hover { background: var(--bg-alt); }

.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.tabs a {
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 600; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 0.25rem 0; }
.stat-sub { font-size: 0.85rem; color: var(--text-muted); }

.nav-card {
    display: block;
    padding: 1rem 1.15rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}
.nav-card:hover { background: var(--bg-alt); border-color: var(--accent); }
.nav-card strong { display: block; margin-bottom: 0.25rem; }
.nav-card span { font-size: 0.88rem; color: var(--text-muted); }

/* ── API sandbox ───────────────────────────────────────────────────
 * 2026-07-19: the sandbox page was a standalone static file with its own
 * inline styling; these are its rules moved into the shared sheet. */
.endpoint-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.method {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: white;
}
.method-get { background: #2f6f5e; }
.method-post { background: var(--accent-dark); }
.endpoint-path {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92rem;
    color: var(--text);
}
.endpoint h3 { margin: 0.3rem 0; }

.lang-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 1rem 0 0;
    border-bottom: 1px solid var(--border);
}
.lang-tabs button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.lang-tabs button:hover { color: var(--text); }
.lang-tabs button.active { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 600; }

.sample { position: relative; }
.sample pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0 0 0.75rem;
}
.sample code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
}
.sample .copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; }

.param-label { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 0.75rem; }
.param-label span {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.response { margin-top: 0.75rem; }
.response-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    word-break: break-all;
}
.response pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
    max-height: 24rem;
}
.response code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    white-space: pre;
}

.hidden { display: none; }

/* ── Billing period toggle (TZ-B6) ─────────────────────────────────── */
.period-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.period-toggle button {
    background: white;
    border: none;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.period-toggle button:hover { background: var(--bg-alt); }
.period-toggle button.active { background: var(--accent); color: white; font-weight: 600; }
.yearly-note { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0 0; }
.balance-btn { width: 100%; }
.balance-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.balance-note { font-size: 0.82rem; margin: 0.4rem 0 0; }

/* ── Scenario cards (rules / forwarders) ───────────────────────────
 * 2026-07-19: both pages opened straight onto a form full of regex fields.
 * These describe a real situation and prefill the form for it. */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.scenario {
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    font: inherit;
    color: var(--text);
}
.scenario:hover { background: var(--bg-alt); border-color: var(--accent); }
.scenario.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201, 123, 63, 0.15); }
.scenario strong { display: block; margin-bottom: 0.3rem; }
.scenario span { font-size: 0.87rem; color: var(--text-muted); line-height: 1.4; }

.telegram-howto {
    margin-top: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}
.telegram-howto ol.steps { margin: 0.5rem 0; padding-left: 1.2rem; }
.telegram-howto ol.steps li { margin-bottom: 0.4rem; }
.form-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0 0; }

/* Radio cards for "what to forward" — the three cases spelled out, instead of a
   dropdown that said allow-list / block-list and left the commonest case
   ("everything") unwritten. */
.choice-set {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin: 0 0 0.9rem;
}
.choice-set legend { font-weight: 600; padding: 0 0.4rem; }
.choice {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.45rem 0;
    cursor: pointer;
}
.choice input { margin-top: 0.25rem; }
.choice > span { display: flex; flex-direction: column; }
.choice strong { font-weight: 600; }
.choice .muted { font-size: 0.88rem; }

/* Live ntfy feed on the forwarders page: messages the browser receives while
   the tab is open, newest first. Capped in height so a chatty topic cannot push
   the form off the screen. */
.ntfy-feed {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    max-height: 12rem;
    overflow-y: auto;
    font-size: 0.9rem;
}
.ntfy-feed li {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
}
.ntfy-feed li:last-child { border-bottom: none; }

/* ── Plan pricing / quotas (2026-07-19) ────────────────────────────── */
.plan-price .per { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.price-from { font-size: 0.9rem; color: var(--text-muted); }
.plan-quotas {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text);
}
.plan-quotas li { padding: 0.15rem 0; }
.included { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1.25rem; }
.included h4 { margin: 0 0 0.6rem; }
.included ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.3rem 1.5rem;
}
.included li { color: var(--text-muted); font-size: 0.92rem; padding: 0.15rem 0; }
.included li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
