:root {
    --bg: #fafafa;
    --fg: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e2e2e2;
    --error: #dc2626;
    --success: #16a34a;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    font-size: 15px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

/* Topbar burger (mobile) */
.topbar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background .12s;
}
.topbar-burger:hover { background: rgba(255,255,255,.08); }
.topbar-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #9ca3af;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.topbar-burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar-burger--open span:nth-child(2) { opacity: 0; }
.topbar-burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* На десктопе навигация всегда видна */
@media (min-width: 641px) {
    .topbar-burger { display: none !important; }
    #topbar-nav { display: flex !important; position: static; background: none;
        border: none; padding: 0; flex-direction: row; align-items: center;
        box-shadow: none; gap: .25rem; }
    #topbar-nav a { width: auto; padding: 0; border: none; }
    .lang-switcher { margin-left: .75rem; margin-top: 0; padding-top: 0; border-top: none; }
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo { font-weight: 700; font-size: 1.1rem; color: var(--fg); text-decoration: none; }

.topbar nav a {
    margin-left: 1.2rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.topbar nav a:hover { color: var(--fg); }

main { max-width: 1220px; margin: 0 auto; padding: 3rem 1.5rem; }
/* В кабинете main — это .cabinet-content, там свои отступы */
.cabinet main { max-width: none; margin: 0; padding: 0; }

.link-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.link-notice-close {
    background: none;
    border: none;
    color: #9a3412;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.2rem;
    opacity: 0.7;
}
.link-notice-close:hover { opacity: 1; }

/* --- Hero / главная --- */
.hero { text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.subtitle { color: var(--muted); margin-bottom: 2rem; }

.link-form {
    display: flex;
    gap: 0.5rem;
    max-width: 560px;
    margin: 0 auto;
}
.link-form input[type="url"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.link-form button {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
}
.link-form button:hover { background: var(--accent-hover); }

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.htmx-indicator { display: none; color: var(--muted); margin-top: 1rem; }
.htmx-request .htmx-indicator { display: block; }
.htmx-request.link-form { opacity: 0.6; }

#result { margin-top: 2rem; }

.link-result {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.short-url-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.short-url-row input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: monospace;
    text-align: center;
}
.short-url-row button {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
}
.qr-code { width: 160px; height: 160px; margin: 0 auto; display: block; }
.expiry-note { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }

.error-message {
    color: var(--error);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-prompt {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.auth-prompt-btn {
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    color: var(--fg);
}
.auth-prompt-btn--primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.claim-link-form fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.claim-link-form legend {
    padding: 0 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.radio-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}
.radio-row input[type="text"] {
    flex: 1;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.claim-link-form button {
    width: 100%;
    padding: 0.7rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
}

/* --- Auth forms --- */
.auth-form { max-width: 360px; margin: 0 auto; }
.auth-form h1 { margin-bottom: 1.5rem; text-align: center; }
.auth-form form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.auth-form input {
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.auth-form button {
    padding: 0.7rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
}
.auth-switch { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

/* --- Dashboard --- */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.plan-badge {
    background: #eef2ff;
    color: var(--accent);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.new-project-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.new-project-form input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.new-project-form button {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.project-list { list-style: none; }
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}
.project-actions button {
    margin-left: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
}

.empty-state { color: var(--muted); text-align: center; padding: 1rem 0; }

.link-form--compact {
    max-width: none;
    margin: 0 0 1rem 0;
}

.project-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
}

/* --- Cabinet layout --- */
.cabinet {
    display: flex;
    min-height: calc(100vh - 57px);
    position: relative;
    gap: 30px;
}

.sidebar {
    width: 220px;
    min-width: 220px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    background: var(--bg);
    position: sticky;
    top: 0;
    height: calc(100vh - 57px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}
.sidebar-title { font-weight: 700; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-close { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.sidebar-nav { flex: 1; padding: 0.5rem 0; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.2rem;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}
.sidebar-link:hover { background: #f3f4f6; }
.sidebar-link--active {
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    background: #eff6ff;
}
.sidebar-icon { font-size: 1rem; }

.sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sidebar-logout { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.sidebar-logout:hover { color: var(--error); }

.cabinet-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;  /* важно для flex: без этого контент может вылезать за пределы */
    overflow-x: hidden;
}

.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    margin-bottom: 1rem;
}
.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 10;
}
.sidebar-overlay--visible { display: block; }

/* Mobile sidebar */
@media (max-width: 640px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 20;
        transition: left 0.25s ease;
        width: 220px;
        min-width: 220px;
        box-shadow: 2px 0 12px rgba(0,0,0,0.12);
    }
    .sidebar--open { left: 0; }
    .sidebar-close { display: block; }
    .burger-btn { display: flex; }
    .cabinet-content { padding: 1rem; }

    /* Топбар на мобилке — гамбургер */
    .topbar { padding: .75rem 1rem; position: relative; }
    .topbar-inner { padding: 0; }
    .topbar-burger { display: flex; }
    #topbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d0f14;
        border-bottom: 1px solid rgba(255,255,255,.08);
        padding: .75rem 1rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        z-index: 100;
        box-shadow: 0 8px 24px rgba(0,0,0,.4);
    }
    #topbar-nav.topbar-nav--open { display: flex; }
    #topbar-nav a {
        display: block;
        width: 100%;
        padding: .65rem 0;
        font-size: .95rem;
        border-bottom: 1px solid rgba(255,255,255,.05);
        margin: 0;
    }
    #topbar-nav a:last-of-type { border-bottom: none; }
    .lang-switcher { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.08); margin-left: 0; }
}

/* --- Cabinet pages --- */
.cabinet-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-header { margin-bottom: 1.5rem; }
.back-link { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--fg); }

/* --- Account page --- */
.account-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border);
}
.account-row:last-child { border-bottom: none; }
.account-label { color: var(--muted); font-size: 0.9rem; }
.account-value { font-size: 0.95rem; }
.account-value--muted { color: var(--muted); font-size: 0.8rem; font-family: monospace; }

.account-plan-info h2 { font-size: 1rem; margin-bottom: 0.6rem; }
.plan-features { list-style: none; padding: 0; }
.plan-features li {
    padding: 0.3rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.plan-features li::before { content: "✓ "; color: var(--success); }

/* Plan badge variants */
.plan-badge--free { background: #f3f4f6; color: var(--muted); }
.plan-badge--advanced { background: #eff6ff; color: var(--accent); }
.plan-badge--super_advanced { background: #f5f3ff; color: #7c3aed; }
.plan-badge--full { background: #fef9c3; color: #b45309; }

/* --- Projects page --- */
.create-project-details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.create-project-details summary {
    padding: 0.8rem 1rem;
    cursor: pointer;
    color: var(--accent);
    font-size: 0.9rem;
    user-select: none;
}
.create-project-form {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.create-project-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.create-project-form input,
.create-project-form textarea {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}
.create-project-form button {
    align-self: flex-start;
    padding: 0.55rem 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.required { color: var(--error); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.project-card-name {
    font-weight: 600;
    text-decoration: none;
    color: var(--fg);
    font-size: 1rem;
    flex: 1;
}
.project-card-name:hover { color: var(--accent); }
.project-card-desc { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.3rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.project-meta { color: var(--muted); font-size: 0.8rem; }
.project-desc-subtitle { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }

.empty-state-card {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    grid-column: 1/-1;
}

/* --- Buttons --- */
.btn-sm {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--fg);
    background: white;
    cursor: pointer;
    display: inline-block;
}
.btn-sm:hover { background: #f3f4f6; }
.btn-danger { color: var(--error); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    line-height: 1;
}
.btn-copy {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    color: var(--muted);
    margin-left: 0.3rem;
}
.btn-copy:hover { color: var(--fg); }

/* --- Stats page --- */
.stats-link-info {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.stats-link-code {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.stats-link-original { font-size: 0.85rem; color: var(--muted); }
.stats-link-original a { color: var(--muted); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.stats-section {
    margin-bottom: 1.5rem;
}
.stats-section h2 {
    font-size: 0.95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
}

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 140px;
    padding: 0.5rem 0;
    overflow-x: auto;
}
.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 36px;
}
.bar-fill {
    width: 24px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: opacity 0.2s;
}
.bar-fill:hover { opacity: 0.7; cursor: default; }
.bar-label { font-size: 0.65rem; color: var(--muted); white-space: nowrap; }

.clicks-count { font-weight: 600; color: var(--accent); }
.link-row-actions { display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; }

/* --- Topbar link to dashboard --- */
.topbar nav a[href="/dashboard"] { font-weight: 600; }


.edit-project-form {
    max-width: 480px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}
.edit-project-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.links-table, .blacklist-table, .mini-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.links-table th, .links-table td,
.blacklist-table th, .blacklist-table td,
.mini-table th, .mini-table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.original-url { color: var(--muted); }

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}
.status-active { background: #ecfdf5; color: var(--success); }
.status-expired { background: #fff7ed; color: #ea580c; }
.status-deleted { background: #f3f4f6; color: var(--muted); }
.status-blocked { background: #fef2f2; color: var(--error); }

/* --- Stats --- */
.stats-summary { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.link-stat-block { margin-bottom: 1.5rem; }
.stat-line { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

/* --- Admin --- */
.blacklist-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.blacklist-form select, .blacklist-form input {
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.blacklist-form input { flex: 1; }
.blacklist-form button {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

/* --- Language switcher --- */
/* lang-switcher: see definition below */

/* Inline language select in account page */
.lang-form-inline {
    display: inline;
}
.lang-form-inline select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}



/* ══════════════════════════════════════════════════════
   LANG SWITCHER — простые текстовые ссылки
   ══════════════════════════════════════════════════════ */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-left: .75rem;
    flex-shrink: 0;
    width: auto !important;
    border: none;
    background: none;
    padding: 0;
}
.lang-btn {
    display: inline-block;
    padding: .2rem .45rem;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    background: transparent;
    transition: color .15s;
    white-space: nowrap;
    letter-spacing: .02em;
}
.lang-btn:hover { color: var(--fg); }
.lang-btn--active {
    color: var(--fg);
    font-weight: 700;
}
/* Разделитель между кнопками */
.lang-switcher .lang-btn:not(:last-child)::after {
    content: '/';
    margin-left: .45rem;
    color: var(--border);
    font-weight: 400;
    display: inline-block;
}
/* dark topbar */
.topbar--dark .lang-btn { color: #6b7280; }
.topbar--dark .lang-btn:hover { color: #e2e8f0; }
.topbar--dark .lang-btn--active { color: #f1f5f9; }
.topbar--dark .lang-switcher .lang-btn:not(:last-child)::after { color: #2d3748; }

/* ══════════════════════════════════════════════════════
   PAGE-HOME — сбрасываем main
   ══════════════════════════════════════════════════════ */
.page-home main { max-width: none; padding: 0; margin: 0; }

/* ══════════════════════════════════════════════════════
   TOPBAR — dark variant
   ══════════════════════════════════════════════════════ */
.topbar--dark {
    background: #0d0f14;
    border-bottom-color: rgba(255,255,255,.08);
}
.topbar--dark .logo { color: #f1f5f9; }
.topbar--dark nav a { color: #6b7280; }
.topbar--dark nav a:hover { color: #f1f5f9; }

/* ══════════════════════════════════════════════════════
   DARK HERO
   ══════════════════════════════════════════════════════ */
.dark-hero {
    background: #0d0f14;
    padding: 4rem 1.5rem 3.5rem;
}
.dark-hero__inner {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}
.dark-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .78rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}
.dark-hero__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}
.dark-hero__h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.15;
    letter-spacing: -.04em;
    margin-bottom: .75rem;
}
.dark-hero__sub {
    font-size: 1rem;
    color: #b0b8c8;
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto 2rem;
}

/* Форма — input + кнопка в одну строку, select под ними если залогинен */
.dark-hero__form {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    gap: 8px;
    max-width: 540px;
    margin: 0 auto;
}
.dark-hero__input {
    grid-column: 1;
    grid-row: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: .95rem;
    color: #f1f5f9;
    outline: none;
    font-family: inherit;
    transition: border-color .15s;
    min-width: 0;
}
.dark-hero__input::placeholder { color: #6b7280; }
.dark-hero__input:focus { border-color: rgba(99,102,241,.6); }
.dark-hero__btn {
    grid-column: 2;
    grid-row: 1;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 22px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background .15s;
}
.dark-hero__btn:hover { background: #4f46e5; }
.dark-hero__select {
    grid-column: 1 / -1;  /* на всю ширину под input+кнопкой */
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .9rem;
    color: #d1d5db;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.dark-hero__select option { background: #1a1d27; }

.dark-hero__spinner {
    color: #6b7280;
    font-size: .88rem;
    margin-top: 1rem;
    text-align: center;
}
.dark-hero__result { margin-top: 1.5rem; }

/* result card в тёмном hero */
.dark-hero__result .link-result {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.1);
    text-align: left;
}
.dark-hero__result .short-url-row input {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.1);
    color: #f1f5f9;
}
.dark-hero__result .short-url-row button {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.1);
    color: #e2e8f0;
}
.dark-hero__result .expiry-note { color: #6b7280; }
.dark-hero__result .auth-prompt-btn {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.1);
    color: #cbd5e1;
}
.dark-hero__result .auth-prompt-btn--primary {
    background: #6366f1; border-color: #6366f1; color: #fff;
}
.dark-hero__result .error-message {
    background: rgba(220,38,38,.12);
    border-color: rgba(220,38,38,.3);
    color: #fca5a5;
}

/* Stats */
.dark-hero__stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.07);
}
.dark-hero__stat { text-align: center; }
.dark-hero__stat-n {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -.03em;
    line-height: 1;
}
.dark-hero__stat-l {
    display: block;
    font-size: .75rem;
    color: #c4c9d4;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.dark-hero__stat-div {
    width: 1px; height: 2rem;
    background: rgba(255,255,255,.08);
}

/* ══════════════════════════════════════════════════════
   FEATURES — тёмный фон, читаемый текст
   ══════════════════════════════════════════════════════ */
/* секция — full-bleed фон */
.home-features-section {
    background: #111318;
    border-top: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.07);
    padding: 2.5rem 1.5rem;
}
.home-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
}
.home-feature {
    background: #111318;
    padding: 1.75rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home-feature:last-child { border-right: none; }
.home-feature__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(99,102,241,.2);
    color: #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.home-feature h3 {
    font-size: .95rem;
    font-weight: 600;
    color: #f1f5f9;        /* светлый, читаемый */
    margin-bottom: .35rem;
}
.home-feature p {
    font-size: .88rem;
    color: #c4c9d4;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════
   HOW IT WORKS
   ══════════════════════════════════════════════════════ */
.home-how {
    background: #0d0f14;
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 3.5rem 1.5rem;
}
.home-how__inner { max-width: 520px; margin: 0 auto; }
.home-how h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;       /* читаемо */
    text-align: center;
    margin-bottom: 1.75rem;
    letter-spacing: -.02em;
}
.home-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.home-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}
.home-step__num {
    font-size: .7rem;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: .06em;
    padding-top: 2px;
    flex-shrink: 0;
    min-width: 22px;
}
.home-step__body strong {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: #f1f5f9;       /* читаемо */
    margin-bottom: .2rem;
}
.home-step__body p {
    font-size: .82rem;
    color: #9ca3af;       /* читаемо */
    margin: 0;
    line-height: 1.55;
}

/* ══════════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════════ */
.home-faq {
    background: #111318;
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 3.5rem 1.5rem 4rem;
}
.home-faq__inner { max-width: 600px; margin: 0 auto; }
.home-faq h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;       /* читаемо */
    text-align: center;
    margin-bottom: 1.75rem;
    letter-spacing: -.02em;
}
.faq-list { border-top: 1px solid rgba(255,255,255,.08); }
.faq-item { border-bottom: 1px solid rgba(255,255,255,.08); padding: 1rem 0; }
.faq-item dt {
    font-size: .88rem;
    font-weight: 600;
    color: #e2e8f0;       /* читаемо */
    margin-bottom: .4rem;
}
.faq-item dd {
    font-size: .9rem;
    color: #b0b8c8;
    line-height: 1.7;
    margin: 0;
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.site-footer {
    background: #f9fafb;
    border-top: 1px solid var(--border);
    padding: 1.75rem 1.5rem;
}
.site-footer__inner {
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: start;
    gap: 2rem;
    flex-wrap: wrap;
}
.site-footer__brand { }
.site-footer__logo { font-size: .9rem; font-weight: 700; color: var(--fg); text-decoration: none; display: block; margin-bottom: .35rem; }
.site-footer__tagline { font-size: .75rem; color: var(--muted); line-height: 1.5; max-width: 240px; }
.site-footer__copy { font-size: .75rem; color: var(--muted); align-self: end; white-space: nowrap; }
.site-footer__cols { display: flex; gap: 2.5rem; }
.site-footer__col { display: flex; flex-direction: column; gap: .4rem; }
.site-footer__col-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .2rem; }
.site-footer__col a { font-size: .8rem; color: var(--muted); text-decoration: none; transition: color .12s; }
.site-footer__col a:hover { color: var(--fg); }

.site-footer--dark { background: #0d0f14; border-top-color: rgba(255,255,255,.07); }
.site-footer--dark .site-footer__logo { color: #f1f5f9; }
.site-footer--dark .site-footer__tagline { color: #9ca3af; }
.site-footer--dark .site-footer__copy { color: #6b7280; }
.site-footer--dark .site-footer__col-title { color: #6b7280; }
.site-footer--dark .site-footer__col a { color: #9ca3af; }
.site-footer--dark .site-footer__col a:hover { color: #9ca3af; }

/* ══════════════════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .dark-hero { padding: 2.75rem 1.25rem 2.5rem; }
    .dark-hero__h1 { font-size: 1.9rem; }
    .dark-hero__sub { font-size: .9rem; }
    .dark-hero__form {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .dark-hero__input { grid-column: 1; grid-row: 1; }
    .dark-hero__select { grid-column: 1; grid-row: 2; }
    .dark-hero__btn { grid-column: 1; grid-row: 3; width: 100%; }
    .dark-hero__stats { gap: 1.5rem; }
    .dark-hero__stat-n { font-size: 1.25rem; }

    .home-features { grid-template-columns: repeat(2, 1fr); }
    .home-feature { padding: 1.25rem 1rem; }
    .home-feature:last-child { border-bottom: none; }

    .home-how { padding: 2.5rem 1.25rem; }
    .home-faq { padding: 2.5rem 1.25rem 3rem; }

    .site-footer__inner { grid-template-columns: 1fr; gap: 1.25rem; }
    .site-footer__cols { gap: 1.5rem; }
    .site-footer__copy { align-self: auto; }
}

@media (max-width: 400px) {
    .topbar nav a { font-size: .75rem; margin-left: .5rem; }
    .lang-btn { padding: .2rem .5rem; font-size: .68rem; }
}

/* ── Postback token в профиле ── */
.postback-token {
    font-family: var(--font-mono, monospace);
    font-size: .8rem;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    color: #334155;
    word-break: break-all;
    user-select: all;
}
.btn-copy-token {
    margin-left: .5rem;
    font-size: .78rem;
    padding: .2rem .6rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .12s;
}
.btn-copy-token:hover { background: #f1f5f9; }
.account-row--muted .account-value--hint {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.6;
}
.postback-example {
    font-family: var(--font-mono, monospace);
    font-size: .72rem;
    word-break: break-all;
    color: #64748b;
    display: block;
    margin-top: .35rem;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
}

/* ── Stats: unique badge ── */
.unique-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}
.unique-badge--yes { background: #dcfce7; color: #166534; }
.unique-badge--no  { background: #fee2e2; color: #991b1b; }

/* ── Stats: accent stat card (конверсии) ── */
.stat-card--accent {
    border-color: #6366f1;
    background: #eff0ff;
}
.stat-card--accent .stat-value { color: #4338ca; }

/* ── Stats: click_id cell ── */
.click-id-cell {
    font-size: .75rem;
    cursor: default;
    color: #6b7280;
}

/* ── Stats: scrollable table wrapper ── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll .links-table { min-width: 760px; }

/* ── Stats toolbar ── */
.stats-toolbar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .875rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.stats-toolbar__group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.stats-toolbar__label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}
.stats-toolbar__select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .6rem;
    font-size: .82rem;
    color: var(--fg);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .12s;
    font-family: inherit;
}
.stats-toolbar__select:focus { border-color: var(--accent); }
.stats-toolbar__reset {
    align-self: flex-end;
    padding: .32rem .75rem;
    font-size: .8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    transition: background .12s, color .12s;
    font-family: inherit;
}
.stats-toolbar__reset:hover { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.stats-toolbar__count {
    align-self: flex-end;
    font-size: .78rem;
    color: var(--muted);
    margin-left: auto;
    white-space: nowrap;
}

/* ── Conversion icon ── */
.click-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.conv-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    cursor: default;
}
.conv-icon svg { display: block; }

@media (max-width: 640px) {
    .stats-toolbar { gap: .5rem; }
    .stats-toolbar__count { margin-left: 0; width: 100%; }
}

/* ── Click detail page ── */
.click-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}
.click-detail-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: #fff;
}
.click-detail-card__title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}
.click-fields {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.click-fields--subs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
}
.click-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.click-field--full { grid-column: 1 / -1; }
.click-field dt {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}
.click-field dd {
    font-size: .88rem;
    color: var(--fg);
    margin: 0;
    word-break: break-word;
}
.click-field__ua {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.5;
}
.click-id-full {
    font-family: monospace;
    font-size: .82rem;
    color: #334155;
    word-break: break-all;
}
.btn-copy-small {
    margin-left: 4px;
    padding: 1px 6px;
    font-size: .78rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .12s;
    vertical-align: middle;
}
.btn-copy-small:hover { background: #f1f5f9; }
.truncate-url {
    font-size: .82rem;
    word-break: break-all;
    color: var(--accent);
}
.click-id-cell {
    font-family: monospace;
    font-size: .8rem;
    color: var(--accent);
    text-decoration: none;
}
.click-id-cell:hover { text-decoration: underline; }

/* Статус конверсии */
.conv-status {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: capitalize;
}
.conv-status--approved { background: #dcfce7; color: #166534; }
.conv-status--pending  { background: #fef9c3; color: #854d0e; }
.conv-status--rejected { background: #fee2e2; color: #991b1b; }

@media (max-width: 640px) {
    .click-detail-grid { grid-template-columns: 1fr; }
    .click-fields--subs { grid-template-columns: 1fr; }
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.pagination__btn {
    display: inline-block;
    padding: .35rem .8rem;
    font-size: .82rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--fg);
    text-decoration: none;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
}
.pagination__btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.pagination__btn--disabled {
    color: var(--muted);
    pointer-events: none;
    background: #f8fafc;
}
.pagination__info {
    font-size: .78rem;
    color: var(--muted);
    white-space: nowrap;
}
.pagination__pages {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}
.pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .4rem;
    font-size: .82rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--fg);
    text-decoration: none;
    transition: background .12s, border-color .12s;
}
.pagination__page:hover { background: #f1f5f9; border-color: #cbd5e1; }
.pagination__page--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}
.pagination__ellipsis {
    font-size: .82rem;
    color: var(--muted);
    padding: 0 .2rem;
    user-select: none;
}

@media (max-width: 640px) {
    .pagination { gap: .4rem; }
    .pagination__pages { margin-left: 0; }
    .pagination__info { width: 100%; order: -1; }
}

/* ── Country flag emoji ── */
.country-flag {
    font-size: 1.1rem;
    margin-right: 4px;
    vertical-align: middle;
}

/* ── Smart links: badge ── */
.smart-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    background: #ede9fe;
    color: #6d28d9;
    margin-left: 6px;
}

/* ── Smart links: upsell card ── */
.smart-upsell {
    border: 1px dashed #c4b5fd;
    background: #faf5ff;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.smart-upsell h2 {
    font-size: 1.05rem;
    color: #6d28d9;
    margin-bottom: .5rem;
}
.smart-upsell p {
    font-size: .88rem;
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Smart links: toggle ── */
.smart-toggle-form {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #fff;
}
.smart-toggle-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.smart-toggle-label { font-size: .92rem; font-weight: 600; color: var(--fg); }
.smart-toggle-hint { font-size: .8rem; color: var(--muted); margin-top: .4rem; }

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: background .15s;
}
.switch-slider::before {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
}
.switch input:checked + .switch-slider { background: #6366f1; }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* ── Smart links: rule form ── */
.smart-rule-form {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.smart-rule-form__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.smart-rule-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}
.smart-rule-form select,
.smart-rule-form input[type="number"],
.smart-rule-form input[type="url"] {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .6rem;
    font-size: .88rem;
    font-weight: 400;
    color: var(--fg);
    font-family: inherit;
}
.smart-rule-form__url { width: 100%; }
.smart-rule-form__url input { width: 100%; box-sizing: border-box; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }

@media (max-width: 640px) {
    .smart-rule-form__row { flex-direction: column; }
}

/* ── Admin: nav tabs ── */
.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.admin-nav__link {
    padding: .6rem 0;
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.admin-nav__link:hover { color: var(--fg); }
.admin-nav__link--active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Admin: search form ── */
.admin-search-form {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    max-width: 400px;
}
.admin-search-form input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .45rem .7rem;
    font-size: .88rem;
}
.admin-search-form button {
    padding: .45rem 1rem;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--fg);
    cursor: pointer;
}
.admin-search-form button:hover { background: #f1f5f9; }

/* ── Admin: plan select inside table ── */
.admin-plan-form select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .5rem;
    font-size: .82rem;
    cursor: pointer;
    text-transform: capitalize;
}
.admin-you-tag {
    font-size: .72rem;
    color: var(--muted);
    margin-left: 4px;
}

/* ── Smart links: group cards ── */
.smart-group-card { margin-bottom: 1rem; }
.smart-group-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .75rem;
}
.smart-group-card__condition {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.smart-group-card__priority {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    background: #f1f5f9;
    border-radius: 4px;
    padding: 1px 6px;
}
.smart-cond-pill {
    font-size: .78rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    background: #eff6ff;
    color: #1d4ed8;
}
.smart-cond-pill--any {
    background: #f1f5f9;
    color: var(--muted);
    font-weight: 400;
}

.smart-variants-table { margin-bottom: .5rem; }
.smart-variant-empty {
    font-size: .82rem;
    color: var(--muted);
    padding: .5rem 0 .75rem;
}

.smart-add-variant {
    border-top: 1px dashed var(--border);
    padding-top: .6rem;
    margin-top: .5rem;
}
.smart-add-variant summary {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    user-select: none;
}
.smart-add-variant summary:hover { text-decoration: underline; }
.smart-variant-form {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    margin-top: .8rem;
    padding-left: .2rem;
}
.smart-variant-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}
.smart-variant-form input[type="text"],
.smart-variant-form input[type="number"],
.smart-variant-form input[type="url"] {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .6rem;
    font-size: .88rem;
    font-weight: 400;
    color: var(--fg);
    font-family: inherit;
}
.smart-variant-form__url { width: 100%; }
.smart-variant-form__url input { width: 100%; box-sizing: border-box; }

/* ── Smart rules: fallback URL ── */
.smart-fallback-url {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-top: .35rem;
    font-size: .82rem;
    flex-wrap: wrap;
}
.smart-fallback-url__label { color: var(--muted); white-space: nowrap; }
.smart-fallback-url__link {
    color: var(--accent);
    word-break: break-all;
}

/* ── Plan status banners ── */
.plan-banner {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .85rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.plan-banner strong { font-weight: 600; white-space: nowrap; }
.plan-banner--grace {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}
.plan-banner--frozen {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.plan-banner__days {
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
}

/* ── Admin: plan status badges ── */
.plan-status-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
}
.plan-status-badge--active { background: #dcfce7; color: #166534; }
.plan-status-badge--grace  { background: #fef9c3; color: #854d0e; }
.plan-status-badge--frozen { background: #fee2e2; color: #991b1b; }

/* ── Admin: expires date input ── */
.admin-expires-form {
    display: flex;
    align-items: center;
    gap: 4px;
}
.admin-date-input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .25rem .4rem;
    font-size: .78rem;
    color: var(--fg);
    font-family: inherit;
    cursor: pointer;
}
.admin-date-input::-webkit-calendar-picker-indicator { cursor: pointer; }
.admin-reset-btn {
    border: none;
    background: none;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 3px;
    line-height: 1;
}
.admin-reset-btn:hover { color: var(--error); }
.admin-users-table { min-width: 680px; }
.admin-users-table td { vertical-align: middle; }

.admin-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-toolbar .admin-search-form { margin-bottom: 0; }
.worker-result { font-size: .82rem; color: var(--success); padding: .25rem 0; }

/* ── A/B stats ── */
.ab-row--winner { background: #f0fdf4; }
.ab-winner-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    background: #dcfce7;
    color: #166534;
    margin-left: 4px;
}
.ab-cr--best { color: #166534; }
.ab-traffic-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}
.ab-traffic-bar__fill {
    height: 6px;
    border-radius: 3px;
    background: #6366f1;
    min-width: 2px;
    transition: width .3s;
}
.ab-traffic-bar__pct {
    font-size: .75rem;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Impersonation banner ── */
.impersonation-banner {
    background: #581c87;
    color: #f3e8ff;
    padding: .6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: .85rem;
    flex-wrap: wrap;
}
.impersonation-banner__exit {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #f3e8ff;
    padding: .3rem .9rem;
    border-radius: 6px;
    font-size: .82rem;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background .12s;
}
.impersonation-banner__exit:hover { background: rgba(255,255,255,.25); }

/* ── Static pages (pricing, contact, privacy, terms) ── */
.static-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}
.static-page--narrow { max-width: 680px; }
.static-page__hero { text-align: center; margin-bottom: 3rem; }
.static-page__hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.025em;
    margin-bottom: .5rem;
}
.static-page__hero p { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.static-page__updated { font-size: .82rem; color: var(--muted); }
.static-page__section { margin-top: 3rem; }
.static-page__section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 1.25rem;
    letter-spacing: -.01em;
}
.static-page__success {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    color: #166534;
    font-size: .9rem;
    font-weight: 500;
}

/* ── Pricing cards ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}
.pricing-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    background: #fff;
    position: relative;
}
.pricing-card--accent {
    background: #fff;
    border-color: #6366f1;
    border-width: 2px;
}
.pricing-card--accent .pricing-card__name { color: var(--muted); }
.pricing-card--accent .pricing-card__price { color: var(--fg); }
.pricing-card--accent .pricing-card__period { color: var(--muted); }
.pricing-card--accent .pricing-card__features li { color: var(--fg); }
.pricing-card--accent .pricing-card__cta {
    background: var(--accent);
    color: #fff;
}
.pricing-card--accent .pricing-card__cta:hover { background: var(--accent-hover); }
.pricing-card--accent .pricing-card__badge {
    background: #6366f1;
    color: #fff;
}
.pricing-card__badge {
    position: absolute;
    top: -1px;
    right: 1.25rem;
    font-size: .7rem;
    font-weight: 700;
    background: #6366f1;
    color: #fff;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    letter-spacing: .03em;
}
.pricing-card__name {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: .6rem;
}
.pricing-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--fg);
    letter-spacing: -.03em;
    margin-bottom: 1.25rem;
    line-height: 1;
}
.pricing-card__period {
    font-size: .85rem;
    font-weight: 400;
    color: var(--muted);
}
.pricing-card__cta {
    display: block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    padding: .7rem 1rem;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: background .12s;
}
.pricing-card__cta:hover { background: var(--accent-hover); }
.pricing-card__cta--secondary {
    background: transparent;
    color: #6366f1;
    border: 1.5px solid #6366f1;
}
.pricing-card__cta--secondary:hover { background: #eff0ff; }
.pricing-card__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem;
    color: var(--fg);
    line-height: 1.4;
}
.pricing-card__features svg { flex-shrink: 0; margin-top: 1px; }

/* ── Contact form ── */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--fg);
}
.contact-form input,
.contact-form textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .65rem .875rem;
    font-size: .9rem;
    font-family: inherit;
    color: var(--fg);
    background: #fff;
    transition: border-color .12s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
    align-self: flex-start;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: .7rem 1.5rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s;
}
.contact-form button:hover { background: var(--accent-hover); }

/* ── Legal pages ── */
.legal-body { line-height: 1.75; color: var(--fg); }
.legal-body h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 2rem 0 .5rem;
    color: var(--fg);
}
.legal-body p { font-size: .9rem; margin-bottom: .75rem; }
.legal-body ul {
    font-size: .9rem;
    margin: .5rem 0 .75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.legal-body a { color: var(--accent); }
.legal-body code {
    font-family: monospace;
    font-size: .82rem;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .static-page__hero h1 { font-size: 1.5rem; }
}

/* ══════════════════════════════════════
   HERO: hint line
   ══════════════════════════════════════ */
.dark-hero__hint {
    font-size: .85rem;
    color: #8b95a5;
    margin-top: .75rem;
    text-align: center;
}
.dark-hero__hint-link { color: #818cf8; text-decoration: none; }
.dark-hero__hint-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   PILLS
   ══════════════════════════════════════ */
.home-pills {
    background: #111318;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .75rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.home-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: .84rem;
    color: #d1d5db;
}
.home-pill__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   FOR WHO
   ══════════════════════════════════════ */
.home-forwho {
    background: #0d0f14;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 2.5rem 1.5rem;
}
.home-forwho .home-section-label { text-align: center; margin-bottom: 1.25rem; }
.home-forwho__grid {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    overflow: hidden;
}
.home-forwho__item {
    background: #0d0f14;
    padding: 1.5rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home-forwho__icon { font-size: 1.35rem; margin-bottom: .75rem; }
.home-forwho__item h3 {
    font-size: .96rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: .35rem;
}
.home-forwho__item p {
    font-size: .88rem;
    color: #c4c9d4;
    line-height: 1.7;
}

/* section label helper */
.home-section-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ══════════════════════════════════════
   ADVANCED — арбитраж секция
   ══════════════════════════════════════ */
.home-advanced {
    background: #111318;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 2.5rem 1.5rem;
}
.home-advanced__inner { max-width: 780px; margin: 0 auto; }
.home-advanced__head {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.home-advanced__head h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -.01em;
}
.home-advanced__badge {
    font-size: .72rem;
    font-weight: 700;
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 5px;
    padding: 2px 8px;
    letter-spacing: .03em;
}
.home-advanced__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.home-advanced__item {
    background: #111318;
    padding: 1rem 1.1rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.home-advanced__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
    margin-top: .35rem;
}
.home-advanced__item strong {
    display: block;
    font-size: .93rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: .25rem;
}
.home-advanced__item p {
    font-size: .87rem;
    color: #c4c9d4;
    line-height: 1.65;
    margin: 0;
}
.home-advanced__cta-hint {
    font-size: .8rem;
    color: #6b7280;
    text-align: right;
}
.home-advanced__cta-hint a { color: #818cf8; text-decoration: none; }
.home-advanced__cta-hint a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   PLANS — мини-блок
   ══════════════════════════════════════ */
.home-plans {
    background: #0d0f14;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 2.5rem 1.5rem;
}
.home-plans__inner { max-width: 640px; margin: 0 auto; }
.home-plans__inner h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1rem;
    letter-spacing: -.01em;
}
.home-plans__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.home-plan {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 1.1rem;
}
.home-plan--accent { border-color: rgba(99,102,241,.35); }
.home-plan__name {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin-bottom: .35rem;
}
.home-plan__price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -.02em;
    margin-bottom: .35rem;
}
.home-plan__features {
    font-size: .82rem;
    color: #c4c9d4;
    line-height: 1.6;
    margin-bottom: .9rem;
}
.home-plan__cta {
    display: block;
    text-align: center;
    background: #6366f1;
    color: #fff;
    border-radius: 7px;
    padding: .55rem .75rem;
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .12s;
}
.home-plan__cta:hover { background: #4f46e5; }
.home-plan__cta--secondary {
    background: transparent;
    color: #818cf8;
    border: 1px solid rgba(99,102,241,.4);
}
.home-plan__cta--secondary:hover { background: rgba(99,102,241,.1); }

/* ══════════════════════════════════════
   RESPONSIVE — new sections
   ══════════════════════════════════════ */
@media (max-width: 640px) {
    .home-pills { gap: 4px; padding: .65rem 1rem; }
    .home-pill { font-size: .72rem; }
    .home-forwho__grid { grid-template-columns: 1fr; }
    .home-advanced__grid { grid-template-columns: 1fr; }
    .home-plans__grid { grid-template-columns: 1fr; }
    .home-advanced__head h2 { font-size: .9rem; }
}

/* ── Pricing: 4-column grid ── */
.pricing-grid--4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}
/* Billing toggle */
.billing-toggle {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-top: 1.25rem;
}
.billing-toggle__btn {
    padding: .4rem 1rem;
    border-radius: 7px;
    border: none;
    background: transparent;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.billing-toggle__btn--active {
    background: #fff;
    color: var(--fg);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.billing-toggle__save {
    font-size: .7rem;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
    padding: 1px 6px;
    border-radius: 20px;
}
/* No click limits callout */
.pricing-callout {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    background: #eff0ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: .875rem 1.1rem;
    font-size: .85rem;
    color: #3730a3;
    line-height: 1.5;
    margin-bottom: 2.5rem;
}
.pricing-callout svg { flex-shrink: 0; margin-top: 1px; }

@media (max-width: 860px) {
    .pricing-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .pricing-grid--4 { grid-template-columns: 1fr; }
    .billing-toggle { flex-direction: column; }
}

/* ── QR download button ── */
.qr-download-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: #818cf8;
    text-decoration: none;
    padding: .3rem .65rem;
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 6px;
    margin-top: .5rem;
    transition: background .12s, color .12s;
}
.qr-download-btn:hover { background: rgba(99,102,241,.1); color: #6366f1; }

/* ── Topbar pricing link ── */
.topbar-pricing-link {
    font-size: .85rem;
    color: var(--muted);
    text-decoration: none;
    padding: .25rem .5rem;
    border-radius: 6px;
    transition: color .12s;
}
.topbar-pricing-link:hover { color: var(--fg); }
.topbar--dark .topbar-pricing-link { color: #6b7280; }
.topbar--dark .topbar-pricing-link:hover { color: #e2e8f0; }

/* ── Home plans: 3-column grid ── */
.home-plans__inner--3 { max-width: 780px; }
.home-plans__grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ── Pricing: 3-column grid ── */
.pricing-grid--3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
    .home-plans__grid--3 { grid-template-columns: 1fr; }
    .pricing-grid--3 { grid-template-columns: 1fr; }
}

/* ── Account page ── */
.account-value--plan {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.account-value--cancelled { color: var(--muted); text-decoration: line-through; }
.account-row--actions { padding-top: .25rem; }
.btn-cancel-sub {
    font-size: .82rem;
    color: #ef4444;
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: .35rem .8rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s, color .12s;
}
.btn-cancel-sub:hover { background: #fee2e2; }
.plan-upgrade-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.plan-upgrade-link:hover { text-decoration: underline; }

/* Alert messages */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius);
    font-size: .88rem;
    margin-bottom: 1.25rem;
}
.alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ── QR Settings ── */
.qr-settings-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 2rem;
    align-items: start;
}
.qr-settings-form { display: flex; flex-direction: column; gap: 1.25rem; }
.qr-field { display: flex; flex-direction: column; gap: .45rem; }
.qr-field__label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: .01em;
}
.qr-field__hint { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* Color picker + hex input */
.qr-color-row { display: flex; align-items: center; gap: .6rem; }
input[type="color"] {
    width: 40px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 2px;
    cursor: pointer;
    background: none;
}
.qr-hex-input {
    width: 90px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .35rem .6rem;
    font-size: .85rem;
    font-family: monospace;
    color: var(--fg);
}

/* Style options */
.qr-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.qr-style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .6rem .4rem;
    cursor: pointer;
    font-size: .72rem;
    color: var(--muted);
    transition: border-color .12s, color .12s;
}
.qr-style-option input[type="radio"] { display: none; }
.qr-style-option:hover { border-color: var(--accent); color: var(--fg); }
.qr-style-option--active {
    border-color: var(--accent);
    background: #eff6ff;
    color: var(--accent);
    font-weight: 600;
}

/* Style icons — SVG-like CSS shapes */
.qr-style-icon {
    width: 28px;
    height: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.qr-style-icon::before {
    content: '';
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    background:
        currentColor 0 0/8px 8px no-repeat,
        currentColor 10px 0/8px 8px no-repeat,
        currentColor 20px 0/8px 8px no-repeat,
        currentColor 0 10px/8px 8px no-repeat,
        currentColor 20px 10px/8px 8px no-repeat,
        currentColor 0 20px/8px 8px no-repeat,
        currentColor 10px 20px/8px 8px no-repeat,
        currentColor 20px 20px/8px 8px no-repeat;
    width: 28px;
    height: 28px;
}
.qr-style-icon--rounded::before { border-radius: 2px; }
.qr-style-icon--circle::before { border-radius: 50%; }
/* Gapped использует меньший размер квадратиков */

/* Logo section */
.qr-logo-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.qr-logo-current {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.qr-logo-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    padding: 3px;
}
.qr-logo-input {
    font-size: .83rem;
    color: var(--muted);
}
.qr-plan-hint {
    font-size: .82rem;
    color: var(--muted);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .65rem .9rem;
}
.qr-plan-hint a { color: var(--accent); }

/* Preview box */
.qr-preview-wrap {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.qr-preview-box {
    width: 180px;
    height: 180px;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
}
.qr-preview-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-preview-spinner {
    font-size: 1.5rem;
    color: var(--muted);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .qr-settings-layout { grid-template-columns: 1fr; }
    .qr-style-grid { grid-template-columns: repeat(2, 1fr); }
    .qr-preview-wrap { position: static; }
    .qr-preview-box { width: 140px; height: 140px; }
}

/* ── QR Settings v2 ── */
.btn-qr-settings {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #eff0ff;
    color: #6366f1;
    border: 1px solid #c7d2fe;
    font-weight: 600;
}
.btn-qr-settings:hover { background: #e0e7ff; }

/* Color swatch button */
.qr-color-swatch {
    position: relative;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.qr-color-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
}
.qr-color-swatch__dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

/* Style SVG icons */
.qr-style-svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* Dropzone */
.qr-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    color: var(--muted);
    text-align: center;
    font-size: .82rem;
}
.qr-dropzone:hover, .qr-dropzone--over {
    border-color: #6366f1;
    background: #eff0ff;
    color: #6366f1;
}
.qr-dropzone svg { opacity: .5; }
.qr-dropzone:hover svg, .qr-dropzone--over svg { opacity: 1; stroke: #6366f1; }
.qr-dropzone__hint { font-size: .72rem; color: var(--muted); }

/* Preview loading overlay */
.qr-preview-box {
    position: relative;
    width: 200px;
    height: 200px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}
.qr-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .2s;
}
.qr-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248,250,252,.7);
}
.qr-preview-loading svg {
    animation: spin .8s linear infinite;
}

/* ── Smart rules: country search select ── */
.country-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.country-search {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .6rem;
    font-size: .82rem;
    font-family: inherit;
    color: var(--fg);
    width: 100%;
}
#country-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .82rem;
    font-family: inherit;
    width: 100%;
    overflow-y: auto;
}

/* ── Logo images ── */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { display: block; }

/* Топбар светлый — показываем светлый логотип (тёмный текст) */
.logo-img--dark { display: none; }
.logo-img--light { display: block; }

/* Топбар тёмный — показываем тёмный логотип (белый текст) */
.topbar--dark .logo-img--dark { display: block; }
.topbar--dark .logo-img--light { display: none; }

/* Футер светлый — светлый логотип */
.site-footer__logo { text-decoration: none; display: inline-flex; }
.footer-logo-img--dark { display: none; }
.footer-logo-img--light { display: block; }

/* Футер тёмный */
.site-footer--dark .footer-logo-img--dark { display: block; }
.site-footer--dark .footer-logo-img--light { display: none; }

/* ── Link expiry fields ── */
.link-expiry-toggle {
    padding: .4rem .7rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .9rem;
    color: var(--muted);
    transition: background .12s, color .12s;
}
.link-expiry-toggle:hover { background: #eff0ff; color: #6366f1; border-color: #c7d2fe; }

.expiry-fields {
    display: none;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-top: .5rem;
}
.expiry-fields--open { display: block; }

.expiry-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
.expiry-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--fg);
}
.expiry-field--full { grid-column: 1 / -1; }
.expiry-field input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .6rem;
    font-size: .85rem;
    font-family: inherit;
    color: var(--fg);
    background: #fff;
}
.expiry-hint { font-size: .72rem; color: var(--muted); font-weight: 400; }
.expiry-form__actions {
    grid-column: 1 / -1;
    display: flex;
    gap: .5rem;
    padding-top: .25rem;
    border-top: 1px solid var(--border);
}
.expiry-form__url { flex: 1; }
.expiry-form__url {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .45rem .7rem;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fg);
}

@media (max-width: 640px) {
    .expiry-form { grid-template-columns: 1fr; }
}

/* ── Link status: click limit and expires badges ── */
.click-limit-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 20px;
    background: #eff0ff;
    color: #6366f1;
    border: 1px solid #c7d2fe;
    margin-left: 3px;
}
.expires-badge {
    display: inline-block;
    font-size: .7rem;
    padding: 1px 6px;
    border-radius: 20px;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
    margin-left: 3px;
}
.status-expired { background: #fee2e2; color: #991b1b; }

/* ── Project page header ── */
.project-page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.project-page-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.project-page-header__body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.project-page-header__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.project-page-header__desc {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.5;
}

/* ── Icon buttons in links table ── */
.link-row-actions { white-space: nowrap; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
    vertical-align: middle;
}
.icon-btn:hover {
    background: #f1f5f9;
    color: var(--fg);
    border-color: #cbd5e1;
}
.icon-btn--active {
    color: #6366f1;
    border-color: #c7d2fe;
    background: #eff0ff;
}
.icon-btn--active:hover {
    background: #e0e7ff;
    color: #4f46e5;
}
.icon-btn--danger { color: var(--muted); }
.icon-btn--danger:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* ── Link creation card with tabs ── */
.link-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.link-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.link-tab {
    padding: .55rem 1.1rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: color .12s, border-color .12s;
}
.link-tab:hover { color: var(--fg); }
.link-tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: #fff;
}
.link-card form { padding: .875rem 1rem; }
.link-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.link-url-row input[type="url"] {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .55rem .75rem;
    font-size: .9rem;
    font-family: inherit;
    color: var(--fg);
    transition: border-color .12s;
}
.link-url-row input[type="url"]:focus { outline: none; border-color: var(--accent); }
.link-url-row button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: .55rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s;
}
.link-url-row button:hover { background: var(--accent-hover); }

/* Advanced fields */
#advanced-fields {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--border);
}
.adv-fields-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.adv-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
    min-width: 120px;
}
.adv-field--wide { flex: 2; min-width: 200px; }
.adv-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 4px;
}
.adv-field input {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .4rem .65rem;
    font-size: .85rem;
    font-family: inherit;
    color: var(--fg);
    transition: border-color .12s;
}
.adv-field input:focus { outline: none; border-color: var(--accent); }
.adv-hint {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .4rem;
    line-height: 1.5;
}

/* ── Link creation flash message ── */
.link-flash {
    padding: .6rem .9rem;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .75rem;
    transition: opacity .4s;
}
.link-flash--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.link-flash--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Stats link info block ── */
.stats-link-info {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.stats-link-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}
.stats-link-badges { display: flex; gap: .4rem; align-items: center; }
.stats-link-row {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    font-size: .85rem;
}
.stats-link-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    min-width: 90px;
}
.stats-link-url {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.stats-link-url:hover { text-decoration: underline; }
.stats-link-url--fallback { color: #6b7280; }
.stats-link-val { color: var(--fg); }
.stats-link-val--expired { color: #dc2626; }
.stats-link-expired-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
}

/* Click limit progress bar */
.stats-link-progress {
    display: inline-block;
    width: 80px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    vertical-align: middle;
    margin: 0 6px;
    position: relative;
    overflow: hidden;
}
.stats-link-progress__fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: width .3s;
}

/* ── Hero: logged-in user CTA ── */
.dark-hero__user-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin: .5rem 0 2rem;
}
.dark-hero__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #6366f1;
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    padding: .85rem 2.5rem;
    border-radius: 10px;
    letter-spacing: -.01em;
    transition: background .15s, transform .12s;
    box-shadow: 0 4px 20px rgba(99,102,241,.35);
}
.dark-hero__cta-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}
.dark-hero__cta-hint {
    font-size: .8rem;
    color: #4b5563;
}

/* ── QR transparent toggle ── */
.qr-transparent-row { flex-direction: row; align-items: center; gap: .75rem; }
.qr-toggle-wrap { display: flex; align-items: center; gap: .6rem; }
.qr-toggle-wrap input[type="checkbox"] { display: none; }
.qr-toggle {
    width: 36px; height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: background .15s;
    flex-shrink: 0;
}
.qr-toggle::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.qr-toggle-wrap input:checked + .qr-toggle { background: #6366f1; }
.qr-toggle-wrap input:checked + .qr-toggle::after { transform: translateX(16px); }

/* ── Webhook settings ── */
.webhook-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.webhook-form { display: flex; flex-direction: column; gap: 1rem; }
.webhook-field { display: flex; flex-direction: column; gap: .4rem; }
.webhook-label { font-size: .78rem; font-weight: 600; color: var(--fg); }
.webhook-hint { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.webhook-url-row { display: flex; gap: 8px; }
.webhook-url-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fg);
}
.webhook-url-input:focus { outline: none; border-color: var(--accent); }
.webhook-example { margin-top: 1.5rem; }
.webhook-code {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem 1rem;
    font-size: .78rem;
    font-family: monospace;
    color: #374151;
    line-height: 1.6;
    overflow-x: auto;
    margin-top: .4rem;
    white-space: pre;
}
.webhook-section-title { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; color: var(--fg); }
.webhook-empty { font-size: .85rem; color: var(--muted); }
.webhook-deliveries { display: flex; flex-direction: column; gap: 6px; }
.webhook-delivery {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem .875rem;
}
.webhook-delivery__top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wh-event-badge {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    padding: 2px 7px; border-radius: 4px;
}
.wh-event-badge--click { background: #eff0ff; color: #6366f1; }
.wh-event-badge--conversion { background: #f0fdf4; color: #166534; }
.wh-status { font-size: .75rem; font-weight: 600; }
.wh-status--delivered { color: #16a34a; }
.wh-status--failed { color: #dc2626; }
.wh-status--pending { color: #d97706; }
.wh-status--sending { color: #6366f1; }
.wh-time { font-size: .72rem; color: var(--muted); margin-left: auto; }
.wh-attempts { font-size: .7rem; color: var(--muted); }
.wh-error { font-size: .72rem; color: #dc2626; margin-top: 4px; font-family: monospace; }
.btn-webhook--active { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

@media (max-width: 768px) { .webhook-layout { grid-template-columns: 1fr; } }

/* ── Webhook secret block ── */
.webhook-secret-block { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.webhook-secret-row { display: flex; align-items: center; gap: .6rem; }
.webhook-secret-val {
    font-family: monospace;
    font-size: .78rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .65rem;
    color: #374151;
    word-break: break-all;
    flex: 1;
}
.btn-test-webhook {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 600;
}
.btn-test-webhook:hover { background: #dcfce7; }
.alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ══════════════════════════════════════
   DESIGN SYSTEM v1 — единые компоненты
   Всё выше постепенно заменяется этим
   ══════════════════════════════════════ */

/* ── Кнопки ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    font-size: .88rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
    line-height: 1.4;
}
.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--secondary {
    background: #fff;
    color: var(--fg);
    border-color: var(--border);
}
.btn--secondary:hover { background: #f8fafc; }
.btn--danger {
    background: #fff;
    color: var(--error);
    border-color: #fca5a5;
}
.btn--danger:hover { background: #fee2e2; }
.btn--ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
}
.btn--ghost:hover { background: #f1f5f9; color: var(--fg); }

/* ── Page header ── */
.page-header { margin-bottom: 1.75rem; }
.page-header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.page-header__actions { display: flex; gap: .5rem; align-items: center; }
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.page-subtitle {
    font-size: .85rem;
    color: var(--muted);
    margin-top: .25rem;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid transparent;
}
.badge--active { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge--expired { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.badge--frozen { background: #fff7ed; color: #92400e; border-color: #fed7aa; }
.badge--pro { background: #eff0ff; color: #4f46e5; border-color: #c7d2fe; }
.badge--smart { background: #eff0ff; color: #6366f1; border-color: #c7d2fe; }

/* btn-sm модификаторы */
.btn-sm--active {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
.btn-sm--active:hover { background: #dcfce7; }

/* ══════════════════════════════════════
   PROJECT PAGE — redesign
   ══════════════════════════════════════ */

/* Top bar */
.proj-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.proj-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .92rem;
    color: var(--muted);
    text-decoration: none;
    transition: color .12s;
    font-weight: 500;
}
.proj-back:hover { color: var(--fg); }
.proj-topbar__actions { display: flex; gap: .5rem; }
.proj-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 500;
    padding: .35rem .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
    white-space: nowrap;
}
.proj-action-btn:hover { background: #f8fafc; color: var(--fg); border-color: #d1d5db; }
.proj-action-btn--on {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.proj-action-btn--on:hover { background: #dcfce7; }

/* Header */
.proj-header { margin-bottom: 1.25rem; }
.proj-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.03em;
    line-height: 1.1;
}
.proj-desc { font-size: .88rem; color: var(--muted); margin-top: .25rem; }

/* Stat cards */
.proj-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.proj-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}
.proj-stat-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.proj-stat-card__label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
}
.proj-stat-card__val {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.03em;
    line-height: 1;
}
.proj-stat-card__val--active { color: #16a34a; }
.proj-stat-card__val--expired { color: #dc2626; }
.proj-stat-card__val--clicks { color: #2563eb; }

/* Form */
.proj-form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.proj-form-urlrow {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
}
.proj-url-input {
    flex: 1;
    font-size: .9rem;
    font-family: inherit;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem .875rem;
    transition: border-color .12s;
    background: #fafafa;
}
.proj-url-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.proj-add-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s;
}
.proj-add-btn:hover { background: var(--accent-hover); }

/* Tabs */
.proj-tabs {
    display: flex;
    border-top: 1px solid var(--border);
    padding: 0 1rem;
    background: #fafafa;
}
.proj-tab {
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: .55rem .75rem;
    cursor: pointer;
    font-family: inherit;
    transition: color .12s, border-color .12s;
}
.proj-tab:hover { color: var(--fg); }
.proj-tab--active { color: var(--accent); border-bottom-color: var(--accent); }

/* Advanced fields inherit .adv-field from existing CSS */
.adv-input {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .38rem .6rem;
    font-size: .84rem;
    font-family: inherit;
    color: var(--fg);
    background: #fff;
    width: 100%;
}
.adv-input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 768px) {
    .proj-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .proj-stats { grid-template-columns: repeat(2, 1fr); }
    .proj-topbar__actions { flex-wrap: wrap; }
}

/* ══════════════════════════════════════
   HELP / DOCUMENTATION
   ══════════════════════════════════════ */
.help-layout {
    display: flex;
    min-height: calc(100vh - 57px);
    max-width: 1100px;
    margin: 0 auto;
    gap: 0;
}
.help-sidebar {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
    overflow-y: auto;
}
.help-sidebar__logo { padding: 0 1.25rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: .75rem; }
.help-sidebar__title {
    display: flex; align-items: center; gap: .5rem;
    font-size: .9rem; font-weight: 700; color: var(--fg); text-decoration: none;
}
.help-sidebar__title i { font-size: 16px; color: var(--accent); }
.help-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 .75rem; }
.help-nav__item {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .6rem;
    font-size: .82rem; color: var(--muted); text-decoration: none;
    border-radius: 7px;
    transition: background .1s, color .1s;
}
.help-nav__item i { font-size: 15px; flex-shrink: 0; }
.help-nav__item:hover { background: #f1f5f9; color: var(--fg); }
.help-nav__item--active { background: #eff0ff; color: #4f46e5; font-weight: 600; }
.help-sidebar__footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); margin-top: .75rem; }
.help-sidebar__contact {
    display: flex; align-items: center; gap: .4rem;
    font-size: .78rem; color: var(--muted); text-decoration: none;
}
.help-sidebar__contact:hover { color: var(--accent); }

/* Content */
.help-content { flex: 1; padding: 2rem 2.5rem; min-width: 0; }

/* Hero (index) */
.help-hero { margin-bottom: 2rem; }
.help-hero h1 { font-size: 1.6rem; font-weight: 700; color: var(--fg); letter-spacing: -.02em; margin-bottom: .5rem; }
.help-hero p { font-size: 1rem; color: var(--muted); }

/* Cards (index) */
.help-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.help-card {
    display: flex; flex-direction: column; gap: .35rem;
    padding: 1.1rem 1.1rem;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; transition: border-color .12s, box-shadow .12s;
}
.help-card:hover { border-color: #818cf8; }
.help-card i { font-size: 20px; color: #6366f1; }
.help-card strong { font-size: .88rem; font-weight: 600; color: var(--fg); }
.help-card span { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* Article */
.help-article h1 { font-size: 1.5rem; font-weight: 700; color: var(--fg); letter-spacing: -.02em; margin-bottom: .5rem; }
.help-article h2 { font-size: 1.05rem; font-weight: 700; color: var(--fg); margin: 2rem 0 .6rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.help-article h2:first-of-type { margin-top: 1.5rem; }
.help-article h3 { font-size: .9rem; font-weight: 600; color: var(--fg); margin: 1.25rem 0 .4rem; }
.help-article p { font-size: .9rem; color: #374151; line-height: 1.75; margin-bottom: .75rem; }
.help-article strong { color: var(--fg); }

/* TOC */
.help-toc {
    background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
    padding: .875rem 1rem; margin-bottom: 1.5rem;
    display: flex; flex-direction: column; gap: .25rem;
}
.help-toc__label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .25rem; }
.help-toc a { font-size: .82rem; color: var(--accent); text-decoration: none; }
.help-toc a:hover { text-decoration: underline; }

/* Badge */
.help-badge { display: inline-flex; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-bottom: 1rem; }
.help-badge--pro { background: #eff0ff; color: #4f46e5; border: 1px solid #c7d2fe; }

/* Lists */
.help-steps { padding-left: 1.25rem; display: flex; flex-direction: column; gap: .4rem; }
.help-steps li { font-size: .9rem; color: #374151; line-height: 1.65; }
.help-list { padding-left: 1.25rem; display: flex; flex-direction: column; gap: .35rem; list-style: disc; }
.help-list li { font-size: .9rem; color: #374151; line-height: 1.65; }

/* Callouts */
.help-tip, .help-warn {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .75rem 1rem; border-radius: 8px; font-size: .85rem; line-height: 1.6;
    margin: .75rem 0;
}
.help-tip { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.help-tip i { color: #3b82f6; flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.help-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.help-warn i { color: #d97706; flex-shrink: 0; font-size: 16px; margin-top: 1px; }

/* Code */
.help-code {
    background: #0f172a; color: #e2e8f0;
    font-family: 'SF Mono', 'Fira Code', monospace; font-size: .8rem;
    padding: 1rem 1.1rem; border-radius: 8px; line-height: 1.7;
    overflow-x: auto; white-space: pre; margin: .75rem 0;
}

/* Tables */
.help-table-wrap { overflow-x: auto; margin: .75rem 0; }
.help-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.help-table th { text-align: left; padding: .5rem .75rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--border); }
.help-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); color: #374151; line-height: 1.5; }
.help-table tr:last-child td { border-bottom: none; }
.help-table code { font-family: monospace; font-size: .82rem; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; color: #1e40af; }

/* Example blocks */
.help-example { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin: .75rem 0; }
.help-example__before { font-size: .8rem; color: #dc2626; font-family: monospace; word-break: break-all; margin-bottom: .5rem; }
.help-example__arrow { text-align: center; color: var(--muted); margin: .25rem 0; }
.help-example__after { font-size: .9rem; font-weight: 700; color: #16a34a; font-family: monospace; }
.help-example--flow { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.help-flow-item { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: .5rem 1rem; font-size: .82rem; color: var(--fg); }
.help-flow-item--split { display: flex; flex-direction: column; gap: .25rem; align-items: center; }

/* CTA link */
.help-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--accent); color: #fff; text-decoration: none;
    padding: .55rem 1.1rem; border-radius: 8px; font-size: .88rem; font-weight: 600;
    margin-top: .5rem; transition: background .12s;
}
.help-cta:hover { background: var(--accent-hover); }

/* Bottom nav */
.help-nav-bottom {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.help-nav-bottom a { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--accent); text-decoration: none; }
.help-nav-bottom a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .help-layout { flex-direction: column; }
    .help-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
    .help-content { padding: 1.25rem 1rem; }
    .help-cards { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   HELP / DOCUMENTATION
   ══════════════════════════════════════ */
.help-layout { display:flex; min-height:calc(100vh - 57px); max-width:1100px; margin:0 auto; }
.help-sidebar { width:220px; flex-shrink:0; border-right:1px solid var(--border); padding:1.5rem 0; display:flex; flex-direction:column; position:sticky; top:57px; height:calc(100vh - 57px); overflow-y:auto; }
.help-sidebar__logo { padding:0 1.25rem 1rem; border-bottom:1px solid var(--border); margin-bottom:.75rem; }
.help-sidebar__title { display:flex; align-items:center; gap:.5rem; font-size:.9rem; font-weight:700; color:var(--fg); text-decoration:none; }
.help-sidebar__title i { font-size:16px; color:var(--accent); }
.help-nav { flex:1; display:flex; flex-direction:column; gap:2px; padding:0 .75rem; }
.help-nav__item { display:flex; align-items:center; gap:.5rem; padding:.45rem .6rem; font-size:.82rem; color:var(--muted); text-decoration:none; border-radius:7px; transition:background .1s,color .1s; }
.help-nav__item i { font-size:15px; flex-shrink:0; }
.help-nav__item:hover { background:#f1f5f9; color:var(--fg); }
.help-nav__item--active { background:#eff0ff; color:#4f46e5; font-weight:600; }
.help-sidebar__footer { padding:.75rem 1.25rem; border-top:1px solid var(--border); margin-top:.75rem; }
.help-sidebar__contact { display:flex; align-items:center; gap:.4rem; font-size:.78rem; color:var(--muted); text-decoration:none; }
.help-sidebar__contact:hover { color:var(--accent); }
.help-content { flex:1; padding:2rem 2.5rem; min-width:0; }
/* Hero */
.help-hero { margin-bottom:2rem; }
.help-hero h1 { font-size:1.6rem; font-weight:700; color:var(--fg); letter-spacing:-.02em; margin-bottom:.5rem; }
.help-hero p { font-size:1rem; color:var(--muted); }
/* Cards */
.help-cards { display:grid; grid-template-columns:repeat(2,1fr); gap:.75rem; }
.help-card { display:flex; flex-direction:column; gap:.35rem; padding:1.1rem; background:#fff; border:1px solid var(--border); border-radius:10px; text-decoration:none; transition:border-color .12s; }
.help-card:hover { border-color:#818cf8; }
.help-card i { font-size:20px; color:#6366f1; }
.help-card strong { font-size:.88rem; font-weight:600; color:var(--fg); }
.help-card span { font-size:.78rem; color:var(--muted); line-height:1.5; }
/* Article */
.help-article h1 { font-size:1.5rem; font-weight:700; color:var(--fg); letter-spacing:-.02em; margin-bottom:.5rem; }
.help-article h2 { font-size:1.05rem; font-weight:700; color:var(--fg); margin:2rem 0 .6rem; padding-top:1.5rem; border-top:1px solid var(--border); }
.help-article h3 { font-size:.9rem; font-weight:600; color:var(--fg); margin:1.25rem 0 .4rem; }
.help-article p { font-size:.9rem; color:#374151; line-height:1.75; margin-bottom:.75rem; }
/* TOC */
.help-toc { background:#f8fafc; border:1px solid var(--border); border-radius:8px; padding:.875rem 1rem; margin-bottom:1.5rem; display:flex; flex-direction:column; gap:.25rem; }
.help-toc__label { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:.25rem; }
.help-toc a { font-size:.82rem; color:var(--accent); text-decoration:none; }
.help-toc a:hover { text-decoration:underline; }
/* Badge */
.help-badge { display:inline-flex; font-size:.7rem; font-weight:700; padding:2px 8px; border-radius:20px; margin-bottom:1rem; }
.help-badge--pro { background:#eff0ff; color:#4f46e5; border:1px solid #c7d2fe; }
/* Lists */
.help-steps,.help-list { padding-left:1.25rem; display:flex; flex-direction:column; gap:.4rem; }
.help-list { list-style:disc; }
.help-steps li,.help-list li { font-size:.9rem; color:#374151; line-height:1.65; }
/* Callouts */
.help-tip,.help-warn { display:flex; align-items:flex-start; gap:.6rem; padding:.75rem 1rem; border-radius:8px; font-size:.85rem; line-height:1.6; margin:.75rem 0; }
.help-tip { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }
.help-tip i { color:#3b82f6; flex-shrink:0; font-size:16px; margin-top:1px; }
.help-warn { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.help-warn i { color:#d97706; flex-shrink:0; font-size:16px; margin-top:1px; }
/* Code */
.help-code { background:#0f172a; color:#e2e8f0; font-family:'SF Mono','Fira Code',monospace; font-size:.8rem; padding:1rem 1.1rem; border-radius:8px; line-height:1.7; overflow-x:auto; white-space:pre; margin:.75rem 0; }
/* Tables */
.help-table-wrap { overflow-x:auto; margin:.75rem 0; }
.help-table { width:100%; border-collapse:collapse; font-size:.85rem; }
.help-table th { text-align:left; padding:.5rem .75rem; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:2px solid var(--border); }
.help-table td { padding:.6rem .75rem; border-bottom:1px solid var(--border); color:#374151; line-height:1.5; }
.help-table tr:last-child td { border-bottom:none; }
.help-table code { font-family:monospace; font-size:.82rem; background:#f1f5f9; padding:1px 5px; border-radius:4px; color:#1e40af; }
/* Examples */
.help-example { background:#f8fafc; border:1px solid var(--border); border-radius:8px; padding:1rem; margin:.75rem 0; }
.help-example__before { font-size:.8rem; color:#dc2626; font-family:monospace; word-break:break-all; margin-bottom:.5rem; }
.help-example__arrow { text-align:center; color:var(--muted); margin:.25rem 0; }
.help-example__after { font-size:.9rem; font-weight:700; color:#16a34a; font-family:monospace; }
.help-example--flow { display:flex; flex-direction:column; align-items:center; gap:.4rem; }
.help-flow-item { background:#fff; border:1px solid var(--border); border-radius:7px; padding:.5rem 1rem; font-size:.82rem; color:var(--fg); }
.help-flow-item--split { display:flex; flex-direction:column; gap:.25rem; align-items:center; }
/* CTA */
.help-cta { display:inline-flex; align-items:center; gap:.4rem; background:var(--accent); color:#fff; text-decoration:none; padding:.55rem 1.1rem; border-radius:8px; font-size:.88rem; font-weight:600; margin-top:.5rem; transition:background .12s; }
.help-cta:hover { background:var(--accent-hover); }
/* Bottom nav */
.help-nav-bottom { display:flex; justify-content:space-between; align-items:center; margin-top:3rem; padding-top:1.25rem; border-top:1px solid var(--border); }
.help-nav-bottom a { display:flex; align-items:center; gap:.35rem; font-size:.85rem; color:var(--accent); text-decoration:none; }
.help-nav-bottom a:hover { text-decoration:underline; }
@media (max-width:768px) {
    .help-layout { flex-direction:column; }
    .help-sidebar { width:100%; height:auto; position:static; border-right:none; border-bottom:1px solid var(--border); }
    .help-content { padding:1.25rem 1rem; }
    .help-cards { grid-template-columns:1fr; }
}

/* ── FAQ на светлом фоне (pricing page) ── */
.static-page__section .faq-list {
    border-top: 1px solid var(--border);
}
.static-page__section .faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.static-page__section .faq-item dt {
    font-size: .9rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: .4rem;
}
.static-page__section .faq-item dd {
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* ── Pricing page redesign ── */
.pricing-hero {
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    max-width: 620px;
    margin: 0 auto;
}
.pricing-hero__label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6366f1;
    background: #eff0ff;
    border: 1px solid #c7d2fe;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: .875rem;
}
.pricing-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.03em;
    margin-bottom: .6rem;
}
.pricing-hero__desc {
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Card desc */
.pricing-card__desc {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.5;
    margin: .25rem 0 .875rem;
}
.pricing-card--accent .pricing-card__desc { color: #6b7280; }

/* Features grid */
.pricing-features {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}
.pricing-features__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fg);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -.02em;
}
.pricing-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .875rem;
}
.pricing-feature-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.pricing-feature-card i {
    font-size: 20px;
    color: #6366f1;
}
.pricing-feature-card strong {
    font-size: .88rem;
    font-weight: 600;
    color: var(--fg);
}
.pricing-feature-card span {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.55;
}

/* FAQ section */
.pricing-faq-section {
    max-width: 620px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}
.pricing-faq-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 1.25rem;
    text-align: center;
}
.pricing-faq-section .faq-list { border-top: 1px solid var(--border); }
.pricing-faq-section .faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.pricing-faq-section .faq-item dt { font-size: .9rem; font-weight: 600; color: var(--fg); margin-bottom: .4rem; }
.pricing-faq-section .faq-item dd { font-size: .875rem; color: var(--muted); line-height: 1.7; margin: 0; }

@media (max-width: 768px) {
    .pricing-features__grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-hero h1 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    .pricing-features__grid { grid-template-columns: 1fr; }
}

/* ── Webhook settings page (redesign) ── */
.wh-section { margin-bottom: 1.25rem; }
.wh-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: .4rem;
}
.wh-hint {
    font-size: .75rem;
    color: var(--muted);
    line-height: 1.55;
    margin-top: .35rem;
}
.wh-hint a { color: var(--accent); text-decoration: none; }
.wh-hint a:hover { text-decoration: underline; }

/* URL row */
.wh-url-row { display: flex; gap: 8px; }
.wh-url-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fg);
    transition: border-color .12s;
}
.wh-url-input:focus { outline: none; border-color: var(--accent); }
.wh-save-btn {
    padding: .5rem 1.1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s;
}
.wh-save-btn:hover { background: var(--accent-hover); }

/* Secret */
.wh-secret-row { display: flex; align-items: center; gap: .5rem; }
.wh-secret-val {
    flex: 1;
    font-family: monospace;
    font-size: .77rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .4rem .65rem;
    color: #374151;
    word-break: break-all;
    line-height: 1.5;
}
.wh-copy-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .12s, color .12s;
    font-size: 15px;
}
.wh-copy-btn:hover { background: #f1f5f9; color: var(--fg); }

/* Test button */
.wh-test-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s;
}
.wh-test-btn:hover { background: #dcfce7; }

/* Code block */
.wh-code {
    background: #0f172a;
    color: #e2e8f0;
    font-family: monospace;
    font-size: .78rem;
    padding: .875rem 1rem;
    border-radius: 8px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    margin: .4rem 0 0;
}

/* History */
.wh-section-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: .75rem;
}
.wh-http {
    font-size: .72rem;
    color: var(--muted);
    font-family: monospace;
}

/* Alerts with icons */
.alert {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .9rem;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.alert i { font-size: 16px; flex-shrink: 0; }
.alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert--warn    { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Docs link in webhook settings */
.wh-docs-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .5rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid #c7d2fe;
    background: #eff0ff;
    border-radius: 6px;
    padding: 3px 9px;
    transition: background .12s;
}
.wh-docs-link:hover { background: #e0e7ff; }
.wh-docs-link i { font-size: 13px; }

/* ── Home plans section redesign ── */
.home-plans { background: #0d0f14; padding: 4rem 1.5rem; }
.home-plans__inner { max-width: 900px; margin: 0 auto; }
.home-plans__inner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-align: center;
    letter-spacing: -.02em;
    margin-bottom: .4rem;
}
.home-plans__subtitle {
    text-align: center;
    font-size: .9rem;
    color: #64748b;
    margin-bottom: 2rem;
}
.home-plans__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: start;
}
.home-plan-card {
    background: #161a22;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
}
.home-plan-card--accent {
    border-color: #6366f1;
    border-width: 2px;
}
.home-plan-card__badge {
    position: absolute;
    top: -1px;
    right: 1.25rem;
    font-size: .68rem;
    font-weight: 700;
    background: #6366f1;
    color: #fff;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.home-plan-card__name {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin-bottom: .5rem;
}
.home-plan-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.03em;
    line-height: 1;
    margin-bottom: 1rem;
}
.home-plan-card__period {
    font-size: .82rem;
    font-weight: 400;
    color: #64748b;
}
.home-plan-card__desc {
    font-size: .8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.home-plan-card__cta {
    display: block;
    text-align: center;
    border-radius: 8px;
    padding: .65rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: background .12s, color .12s;
}
.home-plan-card__cta--primary {
    background: #6366f1;
    color: #fff;
}
.home-plan-card__cta--primary:hover { background: #4f46e5; }
.home-plan-card__cta--outline {
    background: transparent;
    color: #818cf8;
    border: 1px solid rgba(99,102,241,.4);
}
.home-plan-card__cta--outline:hover { background: rgba(99,102,241,.1); }
.home-plan-card__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.home-plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    font-size: .82rem;
    color: #cbd5e1;
    line-height: 1.4;
}
.home-plan-card__features svg { flex-shrink: 0; margin-top: 1px; }
.home-plans__footer {
    text-align: center;
    margin-top: 1.25rem;
}
.home-plans__footer a {
    font-size: .82rem;
    color: #818cf8;
    text-decoration: none;
}
.home-plans__footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .home-plans__grid { grid-template-columns: 1fr; }
}

/* ── Account page ── */
.acct-sections { display: flex; flex-direction: column; gap: 1.25rem; }

.acct-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.acct-section__title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.acct-section__badge {
    font-size: .65rem;
    padding: 1px 7px;
    background: #eff0ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.acct-rows { display: flex; flex-direction: column; }
.acct-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.acct-row:last-child { border-bottom: none; }
.acct-row--features { align-items: flex-start; }
.acct-row__label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 140px;
    flex-shrink: 0;
    padding-top: 1px;
}
.acct-row__val { font-size: .88rem; color: var(--fg); flex: 1; }
.acct-row__val--mono { font-family: monospace; font-size: .78rem; }
.acct-row__val--muted { color: var(--muted); }
.acct-row__actions { display: flex; gap: .5rem; }

/* Plan badge */
.acct-plan-badge {
    display: inline-flex;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: capitalize;
}
.acct-plan-badge--free { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.acct-plan-badge--starter { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.acct-plan-badge--pro { background: #eff0ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.acct-plan-badge--agency { background: #fdf4ff; color: #7c3aed; border: 1px solid #e9d5ff; }

.acct-status-badge {
    display: inline-flex;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 4px;
}
.acct-status-badge--active { background: #f0fdf4; color: #16a34a; }
.acct-status-badge--frozen { background: #fff7ed; color: #c2410c; }
.acct-status-badge--cancelled { background: #fef2f2; color: #991b1b; }

/* Features list */
.acct-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: 0;
    padding: 0;
}
.acct-features li {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--fg);
}
.acct-features i { color: #16a34a; font-size: 14px; flex-shrink: 0; }

/* Buttons */
.acct-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    border: none;
    transition: background .12s;
}
.acct-btn--primary { background: var(--accent); color: #fff; }
.acct-btn--primary:hover { background: var(--accent-hover); }
.acct-btn--danger { background: #fff; color: #dc2626; border: 1px solid #fca5a5; }
.acct-btn--danger:hover { background: #fee2e2; }

/* Token */
.acct-token-row { display: flex; align-items: center; gap: .5rem; }
.acct-token {
    font-family: monospace;
    font-size: .77rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .35rem .65rem;
    color: #374151;
    word-break: break-all;
}
.acct-postback-url {
    font-family: monospace;
    font-size: .72rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .35rem .65rem;
    color: #374151;
    word-break: break-all;
    display: block;
    line-height: 1.6;
}

/* Language */
.acct-select {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .35rem .65rem;
    font-size: .85rem;
    font-family: inherit;
    color: var(--fg);
    background: #fff;
    cursor: pointer;
}

/* ══════════════════════════════════════
   AUTH PAGES — clean, no card
   ══════════════════════════════════════ */
.auth-page {
    min-height: calc(100vh - 57px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3.5rem 1rem 2rem;
}
.auth-wrap {
    width: 100%;
    max-width: 360px;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.02em;
    margin-bottom: .35rem;
}
.auth-subtitle {
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
}
.auth-icon-success {
    margin-bottom: 1rem;
}
.auth-icon-success i { font-size: 2.5rem; color: #16a34a; }

/* Error */
.auth-error {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: .83rem;
    padding: .6rem .875rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.auth-error i { font-size: 15px; flex-shrink: 0; }

/* Fields */
.auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.auth-field { display: flex; flex-direction: column; gap: .3rem; }
.auth-field label { font-size: .78rem; font-weight: 600; color: var(--fg); }
.auth-field__row { display: flex; justify-content: space-between; align-items: center; }
.auth-field__hint { font-size: .72rem; color: var(--muted); }
.auth-forgot { font-size: .75rem; color: var(--accent); text-decoration: none; }
.auth-forgot:hover { text-decoration: underline; }
.auth-field input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .55rem .75rem;
    font-size: .9rem;
    font-family: inherit;
    color: var(--fg);
    transition: border-color .12s;
    width: 100%;
    box-sizing: border-box;
}
.auth-field input:focus { outline: none; border-color: var(--accent); }

/* Submit */
.auth-submit {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s;
    box-sizing: border-box;
}
.auth-submit:hover { background: var(--accent-hover); }

/* Switch */
.auth-switch {
    font-size: .83rem;
    color: var(--muted);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Account change password form ── */
.acct-pw-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 320px;
}
.acct-pw-form .auth-field input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fg);
    width: 100%;
    box-sizing: border-box;
}
.acct-pw-form .auth-field input:focus { outline: none; border-color: var(--accent); }

/* ── TOTP setup page ── */
.totp-setup { max-width: 480px; }
.totp-steps { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.totp-step {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .88rem;
    color: var(--fg);
    line-height: 1.5;
}
.totp-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.totp-qr-wrap {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.totp-qr {
    width: 140px;
    height: 140px;
    border-radius: 6px;
    flex-shrink: 0;
}
.totp-manual { display: flex; flex-direction: column; gap: .4rem; padding-top: .25rem; }
.totp-manual__label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.totp-manual__key {
    font-family: monospace;
    font-size: .8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .6rem;
    color: var(--fg);
    word-break: break-all;
    letter-spacing: .05em;
}
.totp-confirm-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: 1rem;
}

/* ── Email verification banner ── */
.plan-banner--verify {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    padding: .65rem 1.25rem;
    font-size: .84rem;
    line-height: 1.5;
}
.plan-banner--verify i { font-size: 16px; flex-shrink: 0; color: #d97706; }
.plan-banner__btn {
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    background: #fff;
    color: #92400e;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s;
}
.plan-banner__btn:hover { background: #fef9c3; }

/* ── API Key page ── */
.api-new-key-wrap {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.api-new-key__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: .75rem;
}
.api-new-key__header i { font-size: 16px; }
.api-key-display {
    font-family: monospace;
    font-size: .82rem;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    padding: .6rem .875rem;
    color: #1a1a1a;
    word-break: break-all;
    letter-spacing: .03em;
    margin-bottom: .75rem;
    line-height: 1.6;
}
.api-new-key__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.api-new-key__warn {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: #92400e;
}
.api-new-key__warn i { color: #d97706; }

/* ── CSV Import ── */
.csv-upload-wrap { max-width: 560px; }
.csv-format-hint {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.csv-format-hint__title { font-size: .78rem; font-weight: 600; color: var(--fg); margin-bottom: .25rem; }
.csv-format-hint__desc { font-size: .75rem; color: var(--muted); margin-bottom: .5rem; }

/* ── Home integrations strip ── */
.home-integrations {
    background: #0d0f14;
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 3rem 1.5rem;
}
.home-integrations__label {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
    margin-bottom: 1.75rem;
}
.home-integrations__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,.06);
    border-radius: 12px;
    overflow: hidden;
}
.home-integrations__item {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.25rem 1.5rem;
    background: #0d0f14;
    text-decoration: none;
    transition: background .12s;
}
.home-integrations__item:hover { background: #161a22; }
.home-integrations__item i { font-size: 20px; color: #6366f1; }
.home-integrations__item strong { font-size: .88rem; font-weight: 600; color: #e2e8f0; }
.home-integrations__item span { font-size: .75rem; color: #64748b; line-height: 1.5; }

/* ── Home CTA banner ── */
.home-cta-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    padding: 4rem 1.5rem;
    text-align: center;
}
.home-cta-banner__inner { max-width: 520px; margin: 0 auto; }
.home-cta-banner h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.home-cta-banner p {
    font-size: .95rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 1.75rem;
}
.home-cta-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}
.home-cta-banner__btn {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #312e81;
    font-weight: 700;
    font-size: .95rem;
    padding: .75rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background .12s, transform .1s;
}
.home-cta-banner__btn:hover { background: #e0e7ff; transform: translateY(-1px); }
.home-cta-banner__login {
    font-size: .82rem;
    color: rgba(255,255,255,.5);
    text-decoration: none;
}
.home-cta-banner__login:hover { color: rgba(255,255,255,.8); }

@media (max-width: 768px) {
    .home-integrations__grid { grid-template-columns: repeat(2, 1fr); }
    .home-cta-banner h2 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
    .home-integrations__grid { grid-template-columns: 1fr; }
}

/* ── Stats chart ── */
.stats-chart-section { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.25rem; }
.stats-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.stats-chart-header h2 { font-size: .9rem; font-weight: 600; color: var(--fg); margin: 0; }
.stats-chart-wrap { position: relative; }

/* ══════════════════════════════════════
   MOBILE — 640px и ниже
   ══════════════════════════════════════ */
@media (max-width: 640px) {

    /* ── Account page ── */
    .acct-row {
        flex-direction: column;
        gap: .5rem;
    }
    .acct-row__label {
        min-width: unset;
        font-size: .75rem;
    }
    .acct-pw-form { max-width: 100%; }
    .acct-sections { gap: 1rem; }
    .acct-token { font-size: .68rem; word-break: break-all; }
    .acct-postback-url { font-size: .65rem; }

    /* ── Project page ── */
    .proj-topbar {
        flex-wrap: wrap;
        gap: .5rem;
    }
    .proj-topbar__actions {
        display: flex;
        flex-wrap: wrap;
        gap: .4rem;
    }
    .proj-action-btn { font-size: .75rem; padding: .35rem .6rem; }
    .proj-stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
    .proj-stat-card { padding: .75rem; }
    .proj-stat-card__value { font-size: 1.5rem; }
    .proj-tabs { gap: 0; }
    .proj-tab { font-size: .8rem; padding: .5rem .75rem; }
    .proj-form-wrap { padding: .875rem; }

    /* ── Link stats ── */
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stats-toolbar {
        flex-wrap: wrap;
        gap: .5rem;
    }
    .stats-toolbar__group { flex: 1 1 calc(50% - .25rem); }
    .stats-chart-header { flex-direction: column; align-items: flex-start; gap: .5rem; }

    /* ── Pricing ── */
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pricing-card--accent { order: -1; }
    .pricing-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ── Home page ── */
    .home-integrations__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-cta-banner h2 { font-size: 1.25rem; }
    .home-plans-grid { grid-template-columns: 1fr; }

    /* ── Auth pages ── */
    .auth-wrap { padding: 0 .25rem; }

    /* ── Dashboard links list ── */
    .links-table th:nth-child(3),
    .links-table td:nth-child(3),
    .links-table th:nth-child(4),
    .links-table td:nth-child(4) { display: none; }

    /* ── CSV import ── */
    .csv-upload-wrap { max-width: 100%; }

    /* ── API key page ── */
    .api-new-key__actions { flex-direction: column; align-items: flex-start; }

    /* ── Help pages ── */
    .help-layout { grid-template-columns: 1fr; }
    .help-sidebar { display: none; }
    .help-table-wrap { overflow-x: auto; }

    /* ── Smart rules ── */
    .smart-rule-form__row { flex-direction: column; gap: .75rem; }
    .country-select-wrap { width: 100%; }

    /* ── TOTP setup ── */
    .totp-qr-wrap { flex-direction: column; }
    .totp-qr { width: 120px; height: 120px; }
}

@media (max-width: 400px) {
    .proj-stat-cards { grid-template-columns: 1fr; }
    .pricing-features-grid { grid-template-columns: 1fr; }
    .home-integrations__grid { grid-template-columns: 1fr; }
    .stats-summary { grid-template-columns: 1fr; }
}

/* ── Links table → cards on mobile ── */
@media (max-width: 640px) {

    /* Топбар проекта */
    .proj-topbar { flex-wrap: wrap; gap: .4rem; }
    .proj-topbar__actions { flex-wrap: wrap; gap: .4rem; }
    .proj-action-btn { font-size: .75rem; padding: .3rem .55rem; }
    .proj-back { font-size: .82rem; }

    /* Таблица → карточки */
    .links-table { display: block; }
    .links-table thead { display: none; }
    .links-table tbody { display: flex; flex-direction: column; gap: .5rem; }
    .links-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: .75rem;
        gap: .25rem .5rem;
    }
    /* Short code — строка 1 колонка 1 */
    .links-table td:nth-child(1) {
        grid-column: 1; grid-row: 1;
        font-size: .85rem;
    }
    /* Original URL — строка 2 полная ширина */
    .links-table td:nth-child(2) {
        grid-column: 1 / -1; grid-row: 2;
        font-size: .78rem;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 3rem);
    }
    /* Status — строка 3 колонка 1 */
    .links-table td:nth-child(3) {
        grid-column: 1; grid-row: 3;
        display: flex;
        flex-wrap: wrap;
        gap: .3rem;
        align-items: center;
    }
    /* Clicks — строка 1 колонка 2 — справа */
    .links-table td:nth-child(4) {
        grid-column: 2; grid-row: 1;
        text-align: right;
        font-size: .85rem;
        font-weight: 600;
        color: #2563eb;
    }
    /* Date — скрываем */
    .links-table td:nth-child(5) { display: none; }
    /* Actions — строка 3 колонка 2 */
    .links-table td:nth-child(6) {
        grid-column: 2; grid-row: 3;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: .25rem;
    }
    .link-row-actions { flex-direction: row !important; justify-content: flex-end; }

    /* Форма создания */
    .proj-form-wrap { padding: .75rem; }
    #link-url { font-size: .88rem; }
}

/* ══════════════════════════════════════
   Smart Rules page — redesign
   ══════════════════════════════════════ */

/* Toggle card */
.sr-toggle-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

/* Rules list */
.sr-rules-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

/* Rule card */
.sr-rule-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

/* Rule header */
.sr-rule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    gap: .75rem;
}
.sr-rule-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.sr-rule-priority {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
}
.sr-rule-arrow { color: var(--muted); font-size: .9rem; }
.sr-rule-conditions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* Condition pills */
.sr-cond-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 600;
}
.sr-cond-pill i { font-size: 13px; }
.sr-cond-pill--set {
    background: #eff0ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}
.sr-cond-pill--any {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid var(--border);
    font-weight: 400;
}
.sr-ab-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    padding: 3px 9px;
    border-radius: 20px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-weight: 600;
}
.sr-ab-badge i { font-size: 13px; }

/* Variants */
.sr-variants {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sr-variant-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.sr-variant-row:last-child { border-bottom: none; }

/* Weight bar */
.sr-variant-weight-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e2e8f0;
    overflow: hidden;
}
.sr-variant-weight-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    background: #6366f1;
    height: 100%;
}

/* Variant info */
.sr-variant-info {
    flex: 1;
    min-width: 0;
    padding-left: .5rem;
}
.sr-variant-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    margin-bottom: .15rem;
}
.sr-variant-pct {
    font-size: .72rem;
    color: #6366f1;
    font-weight: 700;
    background: #eff0ff;
    padding: 1px 6px;
    border-radius: 10px;
}
.sr-variant-url {
    font-size: .75rem;
    color: var(--muted);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Variant stats */
.sr-variant-stats {
    display: flex;
    gap: 1.25rem;
    flex-shrink: 0;
}
.sr-variant-stat {
    text-align: center;
}
.sr-variant-stat__val {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--fg);
}
.sr-variant-stat__label {
    font-size: .65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Add variant */
.sr-add-variant {
    border-top: 1px solid var(--border);
}
.sr-add-variant summary {
    padding: .6rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
}
.sr-add-variant summary i { font-size: 14px; }
.sr-add-variant[open] summary { border-bottom: 1px solid var(--border); }
.sr-add-variant-form {
    padding: 1rem;
}
.sr-add-variant-form .auth-field input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fg);
    width: 100%;
    box-sizing: border-box;
}

/* Empty state */
.sr-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}
.sr-empty i { font-size: 2rem; opacity: .3; display: block; margin-bottom: .5rem; }
.sr-empty p { font-size: .9rem; }

/* Add rule card */
.sr-add-rule-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.sr-add-rule-form__row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.sr-add-rule-form__row > div { flex: 1; min-width: 140px; }

.hidden { display: none !important; }

/* ══════════════════════════════════════
   VS (Comparison) pages
   ══════════════════════════════════════ */
.vs-page { overflow-x: hidden; }

/* Hero */
.vs-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #0d0f14 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}
.vs-hero__inner { max-width: 700px; margin: 0 auto; }
.vs-hero__badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #a5b4fc;
    background: rgba(99,102,241,.15);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 1.25rem;
}
.vs-hero__title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    margin-bottom: .875rem;
    line-height: 1.1;
}
.vs-hero__vs {
    color: #475569;
    font-weight: 400;
    font-size: 2.5rem;
    margin: 0 .5rem;
}
.vs-hero__desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,.65);
    line-height: 1.7;
    margin-bottom: 2rem;
}
.vs-hero__cta {
    display: inline-flex;
    align-items: center;
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .75rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background .12s;
}
.vs-hero__cta:hover { background: #4f46e5; }

/* Sections */
.vs-section { padding: 4rem 1.5rem; }
.vs-section--light { background: #f8fafc; }
.vs-inner { max-width: 860px; margin: 0 auto; }
.vs-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.02em;
    margin-bottom: 2rem;
    text-align: center;
}

/* Comparison table */
.vs-table-wrap { overflow-x: auto; }
.vs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.vs-table thead tr { background: #f8fafc; }
.vs-table th {
    padding: 1rem 1.25rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.vs-table__tapurl { text-align: center; background: #eff0ff; color: #4f46e5 !important; }
.vs-table__competitor { text-align: center; }
.vs-table__logo { font-size: .9rem; font-weight: 800; }

.vs-table td {
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}
.vs-table tr:last-child td { border-bottom: none; }
.vs-table__tapurl-cell { text-align: center; background: rgba(99,102,241,.03); }
.vs-table__comp-cell { text-align: center; }

.vs-row--highlight td { background: #fafafa; }
.vs-row--highlight .vs-table__tapurl-cell { background: rgba(99,102,241,.06); }
.vs-row__note {
    display: block;
    font-size: .72rem;
    color: var(--muted);
    margin-top: 2px;
}

/* Check marks */
.vs-check { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; }
.vs-check i { font-size: 15px; }
.vs-check--yes { background: #f0fdf4; color: #16a34a; }
.vs-check--no { background: #fef2f2; color: #dc2626; }
.vs-check--val { width: auto; font-size: .85rem; font-weight: 600; color: var(--fg); background: none; }
.vs-check--neutral { width: auto; font-size: .85rem; color: var(--muted); background: none; }

/* Reasons */
.vs-reasons { display: flex; flex-direction: column; gap: 1.25rem; }
.vs-reason {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}
.vs-reason__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6366f1;
    font-size: 20px;
}
.vs-reason__title { font-size: .95rem; font-weight: 700; color: var(--fg); margin-bottom: .3rem; }
.vs-reason__desc { font-size: .85rem; color: var(--muted); line-height: 1.6; }

/* Добавляем ссылки на vs страницы в nav */

@media (max-width: 640px) {
    .vs-hero__title { font-size: 2rem; }
    .vs-hero__vs { font-size: 1.75rem; }
    .vs-table th, .vs-table td { padding: .65rem .75rem; font-size: .8rem; }
}

/* ══════════════════════════════════════
   For/Use-case pages
   ══════════════════════════════════════ */
.for-page { overflow-x: hidden; }

/* Hero */
.for-hero {
    background: linear-gradient(135deg, #0d0f14 0%, #1e1b4b 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}
.for-hero__inner { max-width: 680px; margin: 0 auto; }
.for-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #a5b4fc;
    background: rgba(99,102,241,.15);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 1.25rem;
}
.for-hero__badge i { font-size: 14px; }
.for-hero__title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
    white-space: pre-line;
}
.for-hero__desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,.65);
    line-height: 1.7;
    margin-bottom: 2rem;
}
.for-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}
.for-hero__cta {
    display: inline-flex;
    align-items: center;
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .75rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background .12s;
}
.for-hero__cta:hover { background: #4f46e5; }
.for-hero__cta-sub { font-size: .8rem; color: rgba(255,255,255,.4); }

/* Common */
.for-inner { max-width: 900px; margin: 0 auto; }
.for-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -.02em;
    text-align: center;
    margin-bottom: 2rem;
}

/* Features grid */
.for-features { padding: 4rem 1.5rem; background: #fff; }
.for-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.for-feat {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}
.for-feat__icon {
    width: 44px;
    height: 44px;
    background: #eff0ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 20px;
    margin-bottom: .875rem;
}
.for-feat__title { font-size: .92rem; font-weight: 700; color: var(--fg); margin-bottom: .3rem; }
.for-feat__desc { font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* Steps */
.for-steps { padding: 4rem 1.5rem; background: #f8fafc; }
.for-steps__list { display: flex; flex-direction: column; gap: 1rem; max-width: 640px; margin: 0 auto; }
.for-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}
.for-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.for-step__title { font-size: .92rem; font-weight: 700; color: var(--fg); margin-bottom: .25rem; }
.for-step__desc { font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* Plan card */
.for-plan { padding: 4rem 1.5rem; background: #fff; }
.for-plan__card {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #6366f1;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}
.for-plan__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #6366f1;
    margin-bottom: .5rem;
}
.for-plan__name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--fg);
    margin-bottom: .25rem;
}
.for-plan__price {
    font-size: 3rem;
    font-weight: 800;
    color: #6366f1;
    letter-spacing: -.03em;
    margin-bottom: .5rem;
}
.for-plan__period { font-size: 1rem; font-weight: 400; color: var(--muted); }
.for-plan__desc { font-size: .85rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.5rem; }
.for-plan__cta {
    display: block;
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .75rem;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: .75rem;
    transition: background .12s;
}
.for-plan__cta:hover { background: #4f46e5; }
.for-plan__pricing-link { font-size: .82rem; color: var(--muted); text-decoration: none; }
.for-plan__pricing-link:hover { color: var(--fg); }

@media (max-width: 768px) {
    .for-hero__title { font-size: 2.25rem; }
    .for-features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .for-hero__title { font-size: 1.75rem; }
    .for-features__grid { grid-template-columns: 1fr; }
}

.home-forwho__item--link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .12s, box-shadow .12s;
    cursor: pointer;
}
.home-forwho__item--link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.home-forwho__more {
    display: inline-block;
    margin-top: .75rem;
    font-size: .82rem;
    font-weight: 600;
    color: #6366f1;
}

/* ── Abuse page ── */
.abuse-form-wrap { max-width: 580px; }
.abuse-form { display: flex; flex-direction: column; gap: 1rem; }
.abuse-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: .82rem;
    color: #166534;
    line-height: 1.5;
}
.abuse-note i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.abuse-sent {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 480px;
    margin: 0 auto;
}
.abuse-sent__icon { font-size: 3rem; color: #16a34a; margin-bottom: 1rem; }
.abuse-sent h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.abuse-sent p { color: var(--muted); line-height: 1.6; }
