﻿:root,
html[data-theme="dark"] {
    --bg: #07090d;
    --bg2: #0f1218;
    --bg3: #161b24;
    --bg4: #1f2632;
    --border: #232a36;
    --border2: #2d3543;
    --text: #e6edf3;
    --text2: #8b949e;
    --text3: #5b6573;
    --blue: #4d8bff;
    --blue-glow: rgba(77, 139, 255, 0.35);
    --green: #2ea043;
    --red: #f85149;
    --orange: #d2991d;
    --gold: #d4a04a;
    --accent: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    --accent-hover: linear-gradient(135deg, #5a96ff 0%, #b07eff 100%);
    --radius: 12px;
    --radius-sm: 10px;
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
    --surface: linear-gradient(180deg, rgba(77, 139, 255, 0.05), transparent 64%), var(--bg2);
    --surface-hover: linear-gradient(180deg, rgba(77, 139, 255, 0.08), transparent 64%), var(--bg3);
    --space-section: 18px;
    --header-height: 72px;
    --body-glow-a: rgba(77, 139, 255, 0.08);
    --body-glow-b: rgba(163, 113, 247, 0.07);
    --btn-font-size: 14px;
    --btn-font-weight: 500;
    --btn-line-height: 1;
    --btn-radius: 10px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    --control-h: 42px;
    --control-radius: 10px;
    --control-pad-x: 14px;
    --control-font-size: 14px;
    --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.28);
    --sidebar-bg: var(--bg2);
    --header-bg: var(--bg2);
}

html[data-theme="light"] {
    --bg: #e8edf5;
    --bg2: #ffffff;
    --bg3: #f3f6fb;
    --bg4: #e7eef8;
    --border: #d5deeb;
    --border2: #c0cce0;
    --text: #0f172a;
    --text2: #334155;
    --text3: #475569;
    --blue: #1d4ed8;
    --blue-glow: rgba(37, 99, 235, 0.28);
    --green: #15803d;
    --red: #b91c1c;
    --orange: #b45309;
    --gold: #92400e;
    --accent: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --accent-hover: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
    --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-elevated: 0 2px 4px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08);
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --body-glow-a: rgba(37, 99, 235, 0.08);
    --body-glow-b: rgba(79, 70, 229, 0.06);
    --sidebar-bg: #f7f9fc;
    --header-bg: rgba(255, 255, 255, 0.92);
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(1200px 600px at 10% -10%, var(--body-glow-a), transparent 50%),
        radial-gradient(900px 500px at 110% 10%, var(--body-glow-b), transparent 50%),
        var(--bg);
    color: var(--text);
    padding: 24px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body.app-body {
    padding: 0;
    overflow: hidden;
}

button,
input,
select,
textarea,
code,
pre,
kbd,
samp,
.cron-code,
.ss-code,
.ops-table-name,
.diagnostics-output {
    font-family: var(--font);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

::selection {
    background: var(--blue-glow);
    color: #fff;
}

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

.app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-height);
    padding: 14px 22px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.app-header .app-brand-link {
    flex: 0 0 auto;
}

.app-header .app-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-header .app-brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-header .version {
    font-size: 11px;
    color: var(--text3);
}

.app-header-burger {
    display: none;
}

.app-header-spacer {
    flex: 1;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header-actions .app-logout-form {
    margin: 0;
}

.app-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--btn-radius);
    background: var(--bg3);
    color: var(--text2);
    font-family: inherit;
    font-size: 13px;
    font-weight: var(--btn-font-weight);
    line-height: var(--btn-line-height);
    letter-spacing: normal;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

button.app-header-btn,
a.app-header-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: var(--btn-font-weight);
    line-height: var(--btn-line-height);
}

.app-header-btn .ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.app-header-btn:hover {
    background: var(--bg4);
    border-color: var(--border2);
    color: var(--text);
}

.app-header-btn.is-active {
    color: var(--text);
    border-color: rgba(77, 139, 255, .35);
    background: rgba(77, 139, 255, .12);
}

#appThemeToggle .theme-ico-light {
    display: none;
}

html[data-theme="light"] #appThemeToggle .theme-ico-dark {
    display: none;
}

html[data-theme="light"] #appThemeToggle .theme-ico-light {
    display: block;
}

.app-header-btn-icon {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.app-header-btn-danger:hover {
    color: var(--red);
    border-color: rgba(248, 81, 73, .45);
    background: rgba(248, 81, 73, .1);
}

.app-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.app-sidebar {
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    z-index: 40;
}

.app-sites-spoiler {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg3);
    overflow: hidden;
}

.app-sites-spoiler > .app-nav-link {
    border-radius: 0;
    border-top: 1px solid var(--border);
}

.app-sites-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--text2);
}

.app-sites-summary::-webkit-details-marker {
    display: none;
}

.app-sites-summary::marker {
    content: '';
}

.app-sites-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform .15s ease;
}

.app-sites-spoiler[open] > .app-sites-summary .app-sites-chevron {
    transform: rotate(180deg);
}

.app-sites-summary-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.app-sites-summary-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
}

.app-sites-summary-current {
    margin-left: 8px;
    min-width: 0;
    max-width: 48%;
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.app-sites-spoiler[open] .app-sites-summary-current {
    display: none;
}

.app-sites-summary:hover {
    background: color-mix(in srgb, var(--text) 4%, transparent);
    color: var(--text);
}

.app-site-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: min(36vh, 280px);
    overflow-y: auto;
    padding: 4px 6px 6px;
    border-top: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
}

.app-site-empty {
    font-size: 12px;
    color: var(--text3);
    padding: 8px 10px;
}

.app-site-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text2);
    min-height: 40px;
}

.app-site-item:hover {
    background: var(--bg3);
    color: var(--text);
}

.app-site-item.is-active {
    background: rgba(77, 139, 255, 0.14);
    color: var(--text);
}

.app-site-favicon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--bg4);
    object-fit: contain;
}

.app-site-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-site-meta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--blue);
    border: none;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.app-nav-danger {
    color: var(--text3);
}

.app-nav-danger:hover {
    color: var(--red);
    background: rgba(248, 81, 73, 0.1);
}

.site-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(77, 139, 255, 0.06), transparent 70%), var(--bg2);
}

.site-command-identity {
    min-width: 0;
    flex: 1 1 220px;
}

.site-command-domain {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.site-command-domain > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-command-favicon,
.settings-page-title .site-command-favicon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
    object-fit: contain;
}

.site-command-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.site-command-count {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}

.site-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg3);
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
    cursor: help;
}

.site-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text3);
    flex-shrink: 0;
}

.site-status-ok {
    color: var(--green);
    border-color: rgba(63, 185, 80, 0.28);
    background: rgba(63, 185, 80, 0.1);
}

.site-status-ok .site-status-dot {
    background: var(--green);
}

.site-status-warn {
    color: var(--orange);
    border-color: rgba(227, 167, 47, 0.3);
    background: rgba(227, 167, 47, 0.1);
}

.site-status-warn .site-status-dot {
    background: var(--orange);
}

.site-status-err {
    color: var(--red);
    border-color: rgba(248, 81, 73, 0.3);
    background: rgba(248, 81, 73, 0.1);
}

.site-status-err .site-status-dot {
    background: var(--red);
}

.site-status-muted {
    color: var(--text3);
}

.site-command-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.site-cmd-action {
    min-width: 72px;
}

.site-cmd-action .tv-check-meta {
    max-width: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
}

.site-command-settings {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

.site-command-actions .btn {
    min-height: 40px;
}

.site-command-actions .btn-primary {
    box-shadow: 0 6px 18px rgba(77, 139, 255, 0.22);
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-lead {
    margin: 0;
    color: var(--text3);
    font-size: 13px;
}

.urls-page-panel {
    padding-top: 0;
}

.ui-section[aria-label="URL"] .filter-bar {
    margin-bottom: 10px;
}

.ui-section[aria-label="URL"] .urls-table-wrap {
    border-radius: var(--radius);
    background: var(--surface);
}

.app-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
    flex: 1;
}

.app-brand-link .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px var(--blue-glow);
    flex-shrink: 0;
}

.app-brand-link .logo-mark .ico {
    color: #fff;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.app-brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-brand-text .version {
    font-size: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
    width: fit-content;
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
}

.app-nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-nav-section--jobs {
    margin-top: auto;
    padding-top: 8px;
}

.app-nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 4px 10px 8px;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text2);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.app-nav-link:hover {
    background: var(--bg3);
    color: var(--text);
}

.app-nav-link.is-active,
.app-nav-link.is-active:hover {
    background: rgba(77, 139, 255, 0.14);
    color: var(--text);
}

html[data-theme="light"] .app-nav-link.is-active,
html[data-theme="light"] .app-nav-link.is-active:hover {
    background: rgba(59, 114, 232, 0.12);
    color: var(--blue);
}

.app-nav-link.is-active-soft {
    color: var(--text);
}

.app-nav-link .ico {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.app-nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--text2);
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

.app-nav-badge--end {
    margin-left: auto;
    flex-shrink: 0;
}

.app-sites-summary {
    width: 100%;
}

.app-sites-summary > .app-nav-badge--end {
    margin-left: auto;
}

.app-sites-summary-main {
    flex: 1;
    min-width: 0;
}

.app-sites-summary .app-sites-summary-current + .app-nav-badge--end,
.app-sites-summary .app-sites-summary-title + .app-nav-badge--end {
    margin-left: auto;
}

.app-sidebar-foot {
    padding: 10px;
    border-top: 1px solid var(--border);
}

.app-logout-form {
    margin: 0;
}

.app-nav-logout {
    color: var(--text3);
}

.app-nav-logout:hover {
    color: var(--red);
    background: rgba(248, 81, 73, 0.1);
}

.app-sidebar-backdrop {
    display: none;
}

.app-frame {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 18px;
    background: rgba(15, 18, 24, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    z-index: 20;
}

.app-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    cursor: pointer;
}

.app-icon-btn:hover {
    background: var(--bg4);
}

.app-topbar-title {
    min-width: 0;
    flex: 1;
}

.app-topbar-heading {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-sub {
    font-size: 11px;
    color: var(--text3);
    margin-top: 1px;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-topbar-select {
    min-width: 200px;
    max-width: 280px;
}

.app-content {
    flex: 1;
    overflow: auto;
    padding: 18px 20px 28px;
    scroll-behavior: smooth;
}

#section-overview,
#section-add,
#section-urls,
#section-log,
#overview-sites {
    scroll-margin-top: 18px;
}

@media (max-width: 960px) {
    :root,
    html[data-theme="dark"],
    html[data-theme="light"] {
        --header-height: 52px;
    }

    .app-icon-btn {
        display: inline-flex;
    }

    .app-header-burger {
        display: inline-flex;
    }

    .app-header {
        gap: 8px;
        padding: 8px 10px;
        min-height: 52px;
    }

    .app-header .app-brand-text {
        display: flex;
        flex-direction: column;
        gap: 0;
        min-width: 0;
    }

    .app-header .app-brand-name {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.15;
        white-space: nowrap;
    }

    .app-header .version {
        display: none;
    }

    .app-header .app-brand-link {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 42%;
    }

    .app-header-actions {
        gap: 6px;
    }

    .app-header-actions .app-header-btn span {
        display: none;
    }

    .app-header-actions .app-header-btn,
    .app-header-btn-icon {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        padding: 0;
    }

    .app-brand-link .logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        box-shadow: 0 4px 14px var(--blue-glow);
    }

    .app-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        width: min(300px, 86vw);
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
        z-index: 40;
        border-right: 1px solid var(--border);
        border-radius: 0 14px 14px 0;
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 35;
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
    }

    .app-sidebar-backdrop[hidden] {
        display: none !important;
    }

    .app-nav-link,
    .app-site-item {
        min-height: 44px;
        padding: 12px 12px;
        font-size: 14px;
    }

    .app-site-list {
        max-height: min(42vh, 320px);
    }

    .site-command-bar,
    .dash-command-bar {
        padding: 12px 14px;
        margin-bottom: 12px;
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }

    .site-command-identity {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .site-command-domain {
        font-size: 17px;
    }

    .site-command-meta {
        margin-top: 8px;
        gap: 6px;
    }

    .site-status-pill {
        font-size: 10px;
        padding: 3px 8px 3px 7px;
        min-height: 24px;
    }

    .site-command-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 18px;
        flex-shrink: 0;
    }

    .site-command-actions .btn:not(.site-command-settings) {
        flex: 0 0 auto;
    }

    .site-command-settings {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .site-panel-actions {
        flex-wrap: wrap;
    }

    .site-panel-actions .btn {
        min-height: 44px;
    }

    .app-content {
        padding: 10px 10px 24px;
    }

    .app-topbar {
        padding: 10px 12px;
        min-height: 52px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-bar-aside {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #filterSelect,
    #perPageSelect {
        min-height: 44px;
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .app-topbar {
        align-items: center;
    }

    .app-topbar-actions {
        display: none;
    }

    .site-command-actions .btn-text {
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }

    .page-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-actions .btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    .table-wrap {
        margin: 0 -4px;
    }

    .bulk-bar-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .bulk-bar-actions .btn {
        flex: 1;
        min-height: 44px;
        justify-content: center;
    }

    .charts-grid,
    .overview-charts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* SVG icons */
.ico {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.ico-lg {
    width: 20px;
    height: 20px;
}

.ico-xl {
    width: 48px;
    height: 48px;
    opacity: 0.4;
    stroke-width: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 14px;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.header h1 .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px var(--blue-glow);
}

.header h1 .version {
    font-size: 11px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.btn {
    padding: 12px 20px;
    border: 1px solid var(--border2);
    border-radius: var(--btn-radius);
    cursor: pointer;
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    background: var(--bg3);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, filter .15s ease;
    font-family: inherit;
    line-height: var(--btn-line-height);
    letter-spacing: normal;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.btn:hover {
    border-color: #3a455a;
    background: var(--bg4);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 13px 22px;
    box-shadow: 0 10px 28px var(--blue-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    filter: brightness(1.05);
    box-shadow: 0 14px 36px var(--blue-glow);
}

.btn-success {
    background: linear-gradient(135deg, #2ea043, #3fb950);
    border: none;
    color: #fff;
    box-shadow: 0 8px 24px rgba(46, 160, 67, 0.35);
}

.btn-success:hover {
    filter: brightness(1.08);
}

.btn-danger {
    background: linear-gradient(135deg, #d83838, #f85149);
    border: none;
    color: #fff;
    box-shadow: 0 8px 24px rgba(248, 81, 73, 0.3);
}

.btn-danger:hover {
    filter: brightness(1.08);
    background: linear-gradient(135deg, #d83838, #f85149);
    color: #fff;
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
}

.btn-icon {
    padding: 10px;
}

.btn-sm {
    padding: 9px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 26px;
    font-size: 15px;
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 60%), var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 60px rgba(0, 0, 0, 0.35);
}

.sites-bar {
    width: 100%;
    margin-bottom: 22px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(77, 139, 255, 0.08), transparent 38%),
        var(--bg2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 36px rgba(0, 0, 0, 0.22);
}

.site-chip {
    padding: 10px 18px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s ease;
}

.site-chip:hover {
    border-color: var(--border2);
    background: var(--bg4);
    transform: translateY(-1px);
}

.site-chip.active {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 24px var(--blue-glow);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg2);
    -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
    height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 10px;
}

.table-wrap::-webkit-scrollbar-track {
    background: var(--bg2);
}

table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

th {
    background: linear-gradient(180deg, var(--bg3), var(--bg2));
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    color: var(--text2);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr {
    transition: background .15s;
}

tbody tr:hover {
    background: rgba(77, 139, 255, 0.04);
}

tbody tr:last-child td {
    border-bottom: none;
}

.url-cell {
    min-width: 0;
    max-width: 0;
    width: 45%;
}

.url-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.url-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    object-fit: contain;
}

.url-link {
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

.url-link:hover {
    color: var(--blue);
}

.url-meta {
    font-size: 11px;
    color: var(--text3);
    margin-top: 3px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px currentColor;
    filter: opacity(.25);
}

.badge-green {
    background: rgba(46, 160, 67, 0.12);
    color: #3fb950;
    border-color: rgba(46, 160, 67, 0.3);
}

.badge-red {
    background: rgba(248, 81, 73, 0.10);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.28);
}

.badge-gray {
    background: rgba(139, 148, 158, 0.10);
    color: var(--text2);
    border-color: var(--border);
}

.badge-orange {
    background: rgba(210, 153, 29, 0.12);
    color: #e3a72f;
    border-color: rgba(210, 153, 29, 0.3);
}

.badge-blue {
    background: rgba(77, 139, 255, 0.12);
    color: var(--blue);
    border-color: rgba(77, 139, 255, 0.3);
}

.sent-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sent-date {
    font-size: 11px;
    color: var(--text3);
}

textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="time"],
input[type="date"],
input[type="datetime-local"],
select {
    width: 100%;
    min-height: var(--control-h);
    padding: 10px var(--control-pad-x);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--control-font-size);
    line-height: 1.35;
    margin-bottom: 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="time"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
    background: var(--bg2);
}

textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.45;
    padding-top: 12px;
    padding-bottom: 12px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input::placeholder,
textarea::placeholder {
    color: var(--text3);
    opacity: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text2);
    font-size: 11px;
    margin-top: 8px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 10px;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg2);
    border: 1px solid var(--border2);
    padding: 28px;
    border-radius: 18px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    min-width: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    margin: auto;
}

.modal-content h3 {
    margin-bottom: 14px;
    font-size: 18px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 10px;
}

.modal-head h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text);
    border-color: var(--border2);
    background: var(--bg3);
}

.modal-sub {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 18px;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.stat-label {
    font-size: 11px;
    color: var(--text2);
    text-transform: uppercase;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.1;
}

/* Split layout внутри stat-card: "всего | сегодня", "в индексе | отправлено" */
.stat-split {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 6px;
}

.stat-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.stat-sep {
    width: 1px;
    background: var(--border);
    align-self: stretch;
    opacity: 0.7;
}

.stat-sub {
    font-size: 10.5px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    margin-top: 2px;
}

.stat-today {
    font-variant-numeric: tabular-nums;
}

.stat-today-badge {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
    line-height: 1.5;
    white-space: nowrap;
}

.stat-today-badge.negative,
.today-chip.negative {
    background: rgba(248, 81, 73, 0.12);
    color: var(--red);
}

.stat-net-alltime,
.net-alltime-line {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    margin-top: 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--green);
}

.stat-net-alltime-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

.index-change-today-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin-top: 4px;
}

.site-stats-col > .index-change-today-row {
    display: flex;
}

.net-alltime-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    color: inherit;
    font-weight: 500;
}

.net-alltime-label {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
}

.stat-net-alltime.negative,
.net-alltime-line.negative {
    color: var(--red);
}

.stat-denom {
    font-size: 0.62em;
    font-weight: 600;
    color: var(--text3);
    vertical-align: baseline;
}

.stat-cover-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 6px;
}

.stat-cover-chip,
.site-stats-cover {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
}

a.stat-cover-chip {
    text-decoration: none;
    color: inherit;
}

.stat-cover-chip-warn {
    color: #d29922;
}

.site-stats-of {
    font-size: 11px;
}

.alert {
    padding: 12px 14px;
    margin: 0 0 16px;
    border-radius: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-left-width: 3px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    flex-shrink: 0;
}

.alert--success {
    border-color: var(--border);
    border-left-color: var(--green);
    background: rgba(46, 160, 67, 0.08);
}

.alert--warn {
    border-color: var(--border);
    border-left-color: var(--orange);
    background: rgba(210, 153, 34, 0.08);
}

.alert--neutral {
    border-color: var(--border);
    border-left-color: var(--text2);
    background: var(--bg2);
}

.alert--info {
    border-color: var(--border);
    border-left-color: var(--blue);
    background: rgba(77, 139, 255, 0.06);
}

.api-status {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text2);
}

.api-status .ok {
    color: var(--green);
}

.api-status .miss {
    color: var(--orange);
}

.row-actions {
    display: flex;
    gap: 4px;
}

details.log-details {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text2);
}

details.log-details pre {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 8px;
    border-radius: 4px;
    margin-top: 4px;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text2);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 10px 14px;
    border-radius: 9px;
    background: transparent;
    border: none;
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: var(--bg3);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fade .2s ease;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.instr {
    background: linear-gradient(180deg, rgba(77, 139, 255, 0.06), rgba(77, 139, 255, 0.02));
    border: 1px solid rgba(77, 139, 255, 0.18);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    max-width: 100%;
    overflow-wrap: break-word;
}

.instr-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--blue);
    margin-bottom: 8px;
}

.instr ol {
    margin: 0 0 0 18px;
    padding: 0;
    color: var(--text2);
    font-size: 12.5px;
    line-height: 1.7;
}

.instr ol li::marker {
    color: var(--blue);
    font-weight: 700;
}

.instr a {
    color: var(--blue);
    text-decoration: none;
}

.instr a:hover {
    text-decoration: underline;
}

.instr code {
    background: var(--bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    color: var(--text);
    border: 1px solid var(--border);
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.danger-zone {
    margin-top: 22px;
    padding: 16px;
    border: 1px dashed rgba(248, 81, 73, 0.35);
    border-radius: 12px;
    background: rgba(248, 81, 73, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.danger-zone .text strong {
    color: var(--red);
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.danger-zone .text span {
    color: var(--text2);
    font-size: 12px;
}

.chip-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    margin-left: 4px;
    font-weight: 600;
}

.site-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.22);
}

.sent-cell {
    white-space: nowrap;
}

.sent-cell .date {
    display: block;
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
    font-weight: 400;
}

/* Quota grid */
.quota-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
}

.quota-item {
    min-width: 0;
    padding: 2px 20px 0;
}

.quota-item:first-child {
    padding-left: 0;
}

.quota-item:last-child {
    padding-right: 0;
}

.quota-item + .quota-item {
    border-left: 1px solid var(--border);
}

.quota-row {
    padding: 10px 0;
    border-top: 1px dashed var(--border);
}

.quota-row:first-of-type {
    border-top: none;
    padding-top: 4px;
}

.quota-row:last-of-type {
    padding-bottom: 0;
}

.quota-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.quota-row-label {
    font-size: 12px;
    color: var(--text2);
    font-weight: 600;
}

.quota-row-nums {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.quota-row-left {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

.quota-row-sub {
    font-size: 11px;
    color: var(--text3);
    font-weight: 500;
}


.quota-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.quota-label {
    font-size: 12px;
    color: var(--text2);
    font-weight: 500;
}

.quota-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.quota-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 999px;
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .4s ease;
}

.quota-fill.g {
    background: linear-gradient(90deg, #4d8bff, #a371f7);
}

.quota-fill.y {
    background: linear-gradient(90deg, #d2991d, #f85149);
}

.quota-sub {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text2);
}

.quota-sub strong {
    color: var(--text);
    font-weight: 600;
}

.quota-label-top {
    font-size: 12px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    margin-bottom: 8px;
}

.quota-provider-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}

.quota-provider-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
}

.quota-item-google .quota-provider-mark {
    background: linear-gradient(135deg, #4d8bff, #7c5cff);
}

.quota-item-yandex .quota-provider-mark {
    background: linear-gradient(135deg, #f85149, #d2991d);
}

@media (max-width: 700px) {
    .quota-grid {
        grid-template-columns: 1fr;
    }

    .quota-item,
    .quota-item:first-child,
    .quota-item:last-child {
        padding-right: 0;
        padding-left: 0;
    }

    .quota-item + .quota-item {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--border);
        border-left: 0;
    }
}

.quota-big {
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
}

.quota-sub-top {
    font-size: 11px;
    color: var(--text3);
    margin-bottom: 12px;
}

/* Cell statuses */
.cell-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cell-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.cell-row .lbl {
    color: var(--text2);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    min-width: 64px;
    font-weight: 600;
}

.cell-row .val {
    font-weight: 600;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cell-row .val.yes {
    color: #3fb950;
}

.cell-row .val.no {
    color: var(--text2);
}

.cell-row .val.unknown {
    color: #d29922;
}

.cell-row .val.sent {
    color: #e3a72f;
}

.cell-reason {
    padding-left: 0;
    min-height: 0;
}

.reason-chip {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.3;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid transparent;
    vertical-align: middle;
}

.reason-g.reason-discovered,
.reason-g.reason-crawled {
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
    border-color: rgba(210, 153, 34, 0.28);
}

.reason-g.reason-excluded,
.reason-g.reason-blocked_robots,
.reason-g.reason-noindex,
.reason-g.reason-duplicate,
.reason-y.reason-excluded,
.reason-y.reason-removed {
    color: #f0883e;
    background: rgba(240, 136, 62, 0.12);
    border-color: rgba(240, 136, 62, 0.28);
}

.reason-g.reason-soft_404,
.reason-g.reason-not_found,
.reason-g.reason-redirect,
.reason-g.reason-fetch_error,
.reason-g.reason-error,
.reason-y.reason-error {
    color: #f85149;
    background: rgba(248, 81, 73, 0.12);
    border-color: rgba(248, 81, 73, 0.28);
}

.reason-g.reason-unknown,
.reason-y.reason-unknown,
.reason-y.reason-not_in_search,
.reason-g.reason-not_configured,
.reason-y.reason-not_configured {
    color: var(--text3);
    background: rgba(139, 148, 158, 0.12);
    border-color: rgba(139, 148, 158, 0.25);
}

.cell-row a.idx-link {
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    cursor: pointer;
    transition: filter .15s, transform .15s;
}

.cell-row a.idx-link:hover {
    filter: brightness(1.25);
    transform: translateY(-1px);
}

.cell-row .val .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px currentColor;
    filter: opacity(.22);
}

.cell-row .date {
    color: var(--text3);
    font-size: 11px;
    font-weight: 400;
    margin-left: 4px;
}

/* Cron block */
.cron-box {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg4);
    border-radius: 24px;
    transition: .2s;
}

.switch .slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}

.switch input:checked+.slider {
    background: linear-gradient(135deg, #4d8bff, #a371f7);
}

.switch input:checked+.slider:before {
    transform: translateX(20px);
}

.ios-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 22px;
    margin: 0;
    vertical-align: middle;
    cursor: pointer;
    flex: 0 0 36px;
}

.ios-toggle-input {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transform: none !important;
}

.ios-toggle-input::after,
.ios-toggle-input:checked::after,
.ios-toggle-input:indeterminate::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

.ios-toggle-input:hover,
.ios-toggle-input:checked,
.ios-toggle-input:focus-visible,
.ios-toggle-input:active,
.ios-toggle-input:indeterminate {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
}

.ios-toggle-ui {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #e9e9eb;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: background-color .2s ease;
    pointer-events: none;
}

.ios-toggle-ui::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.18),
        0 1px 1px rgba(0, 0, 0, 0.12);
    transition: transform .2s ease;
}

.ios-toggle-input:checked + .ios-toggle-ui {
    background: #34c759;
    box-shadow: none;
}

.ios-toggle-input:checked + .ios-toggle-ui::before {
    transform: translateX(14px);
}

.ios-toggle-input:disabled {
    cursor: not-allowed !important;
}

.ios-toggle-input:disabled + .ios-toggle-ui {
    opacity: 0.45;
}

.tv-sites-table .ios-toggle,
.tv-toggle-cell .ios-toggle {
    width: 36px;
    height: 22px;
    flex-basis: 36px;
}

.cron-toggle-row .ios-toggle {
    width: 36px;
    height: 22px;
    flex: 0 0 36px;
}

.cron-code {
    display: block;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text);
    user-select: all;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    margin-top: 8px;
}

/* Test connection result */
.test-result {
    margin-top: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.55;
}

.test-result .tr-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 4px 0;
}

.test-result .tr-row+.tr-row {
    border-top: 1px dashed var(--border);
    margin-top: 4px;
    padding-top: 8px;
}

.test-result .tr-ico {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
}

.test-result .tr-row.ok .tr-ico {
    background: rgba(46, 160, 67, 0.18);
    color: #3fb950;
}

.test-result .tr-row.warn .tr-ico {
    background: rgba(210, 153, 29, 0.18);
    color: #e3a72f;
}

.test-result .tr-row.err .tr-ico {
    background: rgba(248, 81, 73, 0.18);
    color: #f85149;
}

.test-result .tr-row.info .tr-ico {
    background: rgba(77, 139, 255, 0.18);
    color: var(--blue);
}

.test-result .tr-text {
    color: var(--text);
}

.test-result .tr-text code {
    background: var(--bg3);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text);
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    body.app-body {
        padding: 0;
        overflow: hidden;
    }

    .container {
        padding-bottom: 56px;
    }

    .header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
    }

    .header h1 {
        font-size: 18px;
        min-width: 0;
        flex: 1 1 auto;
    }

    .header h1 > a {
        min-width: 0;
        gap: 8px;
    }

    .header h1 .version {
        display: none;
    }

    .header-actions {
        flex-shrink: 0;
        gap: 6px;
    }

    .header-actions .btn {
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
        gap: 0;
    }

    .header-actions .btn-text {
        display: none;
    }

    .site-panel-head {
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 8px;
    }

    .site-panel-head > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-panel-head h2 {
        font-size: 16px;
        word-break: break-word;
    }

    .site-panel-actions {
        flex-shrink: 0;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .site-panel-actions .btn {
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
        gap: 0;
    }

    .site-panel-actions .btn-text {
        display: none;
    }

    .site-panel-actions .btn-has-badge {
        position: relative;
    }

    .site-panel-actions .btn-has-badge .btn-count-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        margin-left: 0;
        min-width: 17px;
        padding: 1px 5px;
        font-size: 10px;
        line-height: 1.4;
        text-align: center;
    }

    .modal {
        padding: 12px 8px;
        align-items: flex-start;
    }

    .modal-content {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .modal-head h3 {
        font-size: 17px;
    }

    .modal-sub {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .modal-content .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 14px;
        max-width: 100%;
    }

    .modal-content .tabs::-webkit-scrollbar {
        display: none;
    }

    .modal-content .tabs .tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal-content .tab-pane {
        min-width: 0;
        overflow-x: hidden;
    }

    .instr {
        padding: 12px;
    }

    .instr ol {
        margin-left: 16px;
        padding-right: 4px;
    }

    .instr ol li {
        overflow-wrap: anywhere;
    }

    .cron-label-row {
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
    }

    .cron-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cron-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .test-actions {
        justify-content: stretch;
    }

    .test-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .danger-zone {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-activity-log {
        margin-bottom: 32px;
    }

    .stat-card {
        padding: 10px 12px;
    }

    .stat-value {
        font-size: 19px;
    }

    .stat-split {
        gap: 8px;
        margin-top: 4px;
    }

    .stat-today-badge {
        font-size: 10px;
        padding: 1px 5px;
    }

    .sites-bar-main {
        flex: 1 1 100%;
        width: 100%;
    }

    .text-muted-sm {
        display: none;
    }

    .filter-bar-aside {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .sitemap-input {
        min-width: 0;
        width: 100%;
    }

    .sitemap-row .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .container {
        padding-bottom: 72px;
    }

    .panel-activity-log {
        margin-bottom: 48px;
    }

    .header h1 {
        font-size: 15px;
    }

    .header h1 .logo-mark {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .panel-head-aside {
        display: none;
    }

    .log-table td.type {
        display: none;
    }

    .log-table td.time {
        width: auto;
        font-size: 10px;
        padding: 8px 8px 8px 10px;
    }

    .log-table td.msg {
        padding: 8px 10px 8px 0;
        font-size: 11.5px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-sub {
        font-size: 10px;
    }
}


/* Login page */
.login-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    background:
        radial-gradient(800px 500px at 20% 10%, rgba(77, 139, 255, 0.18), transparent 60%),
        radial-gradient(700px 400px at 80% 90%, rgba(163, 113, 247, 0.15), transparent 60%),
        #07090d;
    color: #e6edf3;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(15, 18, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #2d3543;
    border-radius: 20px;
    padding: 40px 36px;
    width: 420px;
    max-width: 95%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 12px 40px rgba(77, 139, 255, 0.4);
}

.login-logo svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-sub {
    color: #8b949e;
    font-size: 13px;
    text-align: center;
    margin-bottom: 28px;
}

.login-box label {
    display: block;
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    background: #07090d;
    border: 1px solid #232a36;
    border-radius: 10px;
    color: #e6edf3;
    font-size: 15px;
    margin-bottom: 18px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.login-box input:focus {
    outline: none;
    border-color: #4d8bff;
    box-shadow: 0 0 0 3px rgba(77, 139, 255, 0.25);
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform .12s, filter .15s, box-shadow .15s;
    box-shadow: 0 10px 28px rgba(77, 139, 255, 0.35);
}

.login-box button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(77, 139, 255, 0.45);
}

.login-box button:active {
    transform: translateY(0);
}

.login-box .err {
    color: #f85149;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

/* ============================================================
   Чекбоксы (глобально) + скроллбары
   ============================================================ */

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--border2);
    border-radius: 5px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%),
        var(--bg3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    transition:
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease,
        transform .12s ease;
}

input[type="checkbox"]:hover {
    border-color: var(--blue);
    background:
        linear-gradient(180deg, rgba(77, 139, 255, 0.12), transparent 70%),
        var(--bg4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 3px rgba(77, 139, 255, 0.12);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: var(--blue);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 3px var(--blue-glow);
}

input[type="checkbox"]:active {
    transform: scale(0.94);
}

input[type="checkbox"]:checked {
    border-color: transparent;
    background: linear-gradient(135deg, #4d8bff 0%, #7b6cff 55%, #a371f7 100%);
    box-shadow:
        0 0 0 1px rgba(77, 139, 255, 0.25),
        0 4px 12px rgba(77, 139, 255, 0.28);
}

input[type="checkbox"]:checked:hover {
    box-shadow:
        0 0 0 1px rgba(77, 139, 255, 0.35),
        0 0 0 3px rgba(77, 139, 255, 0.14),
        0 4px 14px rgba(77, 139, 255, 0.32);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

input[type="checkbox"]:indeterminate {
    border-color: transparent;
    background: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    box-shadow: 0 4px 12px rgba(77, 139, 255, 0.28);
}

input[type="checkbox"]:indeterminate::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 7px;
    width: 8px;
    height: 2px;
    border: none;
    border-radius: 1px;
    background: #fff;
    transform: none;
    filter: none;
}

input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

input[type="checkbox"].row-check,
input[type="checkbox"].url-check,
input[type="checkbox"]#checkAllUrls {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

input[type="checkbox"].row-check:checked::after,
input[type="checkbox"].url-check:checked::after,
input[type="checkbox"]#checkAllUrls:checked::after {
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
}

input[type="checkbox"]#checkAllUrls:indeterminate::after {
    left: 3px;
    top: 6px;
    width: 8px;
}

.switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    cursor: default;
    transform: none;
}

.switch input[type="checkbox"]:hover,
.switch input[type="checkbox"]:checked,
.switch input[type="checkbox"]:focus-visible,
.switch input[type="checkbox"]:active,
.switch input[type="checkbox"]:indeterminate {
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
}

.switch input[type="checkbox"]::after,
.switch input[type="checkbox"]:checked::after,
.switch input[type="checkbox"]:indeterminate::after {
    content: none;
    display: none;
}

.checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.checkbox-inline input[type="checkbox"] {
    margin-top: 1px;
}

.checkbox-inline span {
    line-height: 1.35;
}

/* Скроллбары */
* {
    scrollbar-width: thin;
    scrollbar-color: #30363d #0d1117;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #0d1117;
    border-radius: 6px;
}

*::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 6px;
    border: 2px solid #0d1117;
}

*::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

*::-webkit-scrollbar-corner {
    background: #0d1117;
}

html[data-theme="light"] * {
    scrollbar-color: #b6c2d4 #eef2f7;
}

html[data-theme="light"] *::-webkit-scrollbar-track {
    background: #eef2f7;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb {
    background: #b6c2d4;
    border-color: #eef2f7;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html[data-theme="light"] *::-webkit-scrollbar-corner {
    background: #eef2f7;
}

html[data-theme="light"],
html[data-theme="light"] body {
    scrollbar-color: #b6c2d4 #eef2f7;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
:root {
    scrollbar-color: #30363d #0d1117;
}

/* === Поле пароля с глазиком "показать/скрыть" === */
.login-pass-wrap {
    position: relative;
    margin-bottom: 18px;
}

.login-pass-wrap input {
    margin-bottom: 0 !important;
    padding-right: 40px !important;
    width: 100% !important;
}

.login-pass-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: #5b6573;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    opacity: .55;
    transition: opacity .15s, color .15s;
    width: 22px !important;
    font-size: 0;
}

.login-pass-toggle:hover {
    color: #e6edf3;
    opacity: 1;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    filter: none !important;
}

.login-pass-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ====== LOGIN PAGE (moved from index.php) ====== */
/* ВАЖНО: глобальные правила * { } и body { } удалены — они ломали скролл
   на основной странице (body { display:flex; align-items:center; min-height:100vh }
   центрировал контент по вертикали и обрезал верх). Стили входа уже заданы
   через .login-body { ... } выше — этого достаточно. */

.login-box {

    background: rgba(15, 18, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #2d3543;
    border-radius: 20px;
    padding: 40px 36px;
    width: 420px;
    max-width: 95%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 12px 40px rgba(77, 139, 255, 0.4);
}

.login-logo svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-sub {
    color: #8b949e;
    font-size: 13px;
    text-align: center;
    margin-bottom: 28px;
}

.login-box label {
    display: block;
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    background: #07090d;
    border: 1px solid #232a36;
    border-radius: 10px;
    color: #e6edf3;
    font-size: 15px;
    margin-bottom: 18px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.login-box input:focus {
    outline: none;
    border-color: #4d8bff;
    box-shadow: 0 0 0 3px rgba(77, 139, 255, 0.25);
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4d8bff 0%, #a371f7 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform .12s, filter .15s, box-shadow .15s;
    box-shadow: 0 10px 28px rgba(77, 139, 255, 0.35);
}

.login-box button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(77, 139, 255, 0.45);
}

.login-box button:active {
    transform: translateY(0);
}

.login-box .err {
    color: #f85149;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

/* ===== Styles migrated from index.php inline ===== */

.header h1 > a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: inherit;
}

.logo-mark .ico {
    color: #fff;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.sites-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.sites-bar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.sites-bar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sites-bar-label .ico {
    width: 18px;
    height: 18px;
}

.site-select-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.site-select-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    color: var(--text2);
    pointer-events: none;
    transform: translateY(-50%);
}

.site-select-chevron polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sites-bar-action {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
}

.sites-bar-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text2);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ico-blue {
    color: var(--blue);
}

.ico-muted {
    color: var(--text2);
}

.ico-accent {
    color: var(--blue);
}

.field-label-sm {
    font-size: 11px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

#siteSelect,
#filterSelect,
#perPageSelect {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
}

#siteSelect {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 44px;
    padding: 0 44px 0 16px;
    appearance: none;
    -webkit-appearance: none;
    border-color: var(--border2);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
        var(--bg);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#siteSelect:hover {
    border-color: #3a4658;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
        var(--bg3);
}

#siteSelect:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(77, 139, 255, 0.16);
}

#siteSelect option {
    background: var(--bg2);
    color: var(--text);
    font-weight: 500;
}

#filterSelect,
#perPageSelect {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

#filterSelect optgroup {
    background: var(--bg2);
    color: var(--text2);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#filterSelect option {
    background: var(--bg3);
    color: var(--text);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 768px) {
    .sites-bar {
        padding: 10px;
    }

    .sites-bar-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px;
    }

    .sites-bar-label {
        min-width: 0;
    }

    .sites-bar-count {
        justify-self: end;
    }

    .sites-bar-main {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px 44px;
        gap: 8px;
    }

    .sites-bar-action {
        width: 44px;
        min-width: 44px;
        padding: 10px;
        justify-content: center;
    }

    .sites-bar-action .btn-text {
        display: none;
    }
}

@media (max-width: 420px) {
    #siteSelect {
        padding-left: 12px;
        padding-right: 36px;
        font-size: 13px;
    }

    .site-select-chevron {
        right: 11px;
    }
}

.text-muted-sm {
    font-size: 12px;
    color: var(--text2);
    flex-shrink: 0;
    white-space: nowrap;
}

.text-muted-sm strong,
.count-label strong,
.pagination-info strong,
.panel-head-aside strong {
    color: var(--text);
    font-weight: 600;
}

.count-label {
    font-weight: 500;
}

.stat-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-link-external {
    color: var(--text3);
    display: inline-flex;
    text-decoration: none;
}

.stat-link-plain {
    text-decoration: none;
}

.ico-xs {
    width: 12px;
    height: 12px;
}

.stat-value.color-blue { color: var(--blue); }
.stat-value.color-green { color: var(--green); }
.stat-value.color-orange { color: var(--orange); }

.stat-value.stat-sent-link {
    color: var(--orange);
    border-bottom: 1px dashed currentColor;
    display: inline-block;
    cursor: pointer;
}

.stat-today.positive { color: var(--green); }
.stat-today.zero { color: var(--text3); }

.stat-today-badge.sent {
    background: rgba(227, 167, 47, .15);
    color: var(--orange);
}

.stat-card-wide {
    min-width: 0;
}

.ico-cron {
    width: 13px;
    height: 13px;
}

.ico-cron.enabled { color: var(--green); }
.ico-cron.disabled { color: var(--text3); }

.cron-status-on { color: var(--green); }
.cron-status-off { color: var(--text3); }

.cron-stats-row {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.cron-stat-label {
    font-size: 10.5px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

.cron-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.cron-hint {
    font-size: 12px;
    color: var(--text2);
    margin-top: 8px;
}

.quota-note {
    color: var(--text3);
    font-weight: 400;
}

.quota-source-real {
    color: var(--green);
    font-weight: 600;
}

.quota-source-local,
.quota-source-nolimit {
    color: var(--text3);
}

.quota-row-left.color-green { color: var(--green); }
.quota-row-left.color-orange { color: var(--orange); }
.quota-row-left.color-red { color: var(--red); }
.quota-row-left.color-default { color: var(--text); }

.quota-sub.muted { color: var(--text3); }

.quota-error-note {
    color: var(--red);
    font-weight: 400;
}

.quota-link-external {
    color: var(--text3);
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.panel-tight {
    padding: 18px 22px;
}

.panel-activity-log {
    margin-bottom: 24px;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.panel-head-wrap {
    flex-wrap: wrap;
}

.panel-head-title {
    font-weight: 600;
    font-size: 14px;
}

.panel-head-aside {
    margin-left: auto;
    font-size: 11px;
    color: var(--text3);
}

.site-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.site-panel-head h2 {
    font-size: 18px;
}

.site-panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.api-status .help-tip {
    border-bottom: 1px dotted currentColor;
    cursor: help;
}

.btn-count-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 4px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tabs-add-url {
    margin: 18px 0 12px;
    max-width: 420px;
}

.addtab-pane {
    margin: 0 0 4px;
}

.addtab-pane[data-addpane="manual"] {
    display: block;
}

.addtab-pane[data-addpane="sitemap"] {
    display: none;
}

.ui-collapse {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg2);
    overflow: hidden;
}

.ui-collapse-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ui-collapse-summary::-webkit-details-marker {
    display: none;
}

.ui-collapse-summary::marker {
    content: '';
}

.ui-collapse-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.ui-collapse-heading > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ui-collapse-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.ui-collapse-lead {
    font-size: 12px;
    color: var(--text3);
}

.ui-collapse-chevron {
    flex-shrink: 0;
    color: var(--text3);
    transition: transform .15s ease;
}

.ui-collapse[open] > .ui-collapse-summary .ui-collapse-chevron {
    transform: rotate(180deg);
}

.ui-collapse-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

.ui-collapse-body .tabs-add-url {
    margin-top: 14px;
}

.ss-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.ss-top-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ss-favicon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    object-fit: contain;
}

.ss-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text);
}

.ss-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text3);
}

.sshell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    max-width: none;
    width: 100%;
    min-height: 420px;
    padding: 0;
    overflow: hidden;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.sshell-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    background: color-mix(in srgb, var(--bg3) 80%, var(--bg2));
    border-right: 1px solid var(--border);
}

.sshell-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text2);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.sshell-nav-item:hover {
    background: color-mix(in srgb, var(--blue) 8%, transparent);
    color: var(--text);
}

.sshell-nav-item.active {
    background: color-mix(in srgb, var(--blue) 14%, var(--bg2));
    color: var(--blue);
    font-weight: 600;
}

.sshell-nav-label {
    min-width: 0;
}

.sshell-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--border2);
}

.sshell-dot.is-ok {
    background: #22c55e;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

.sshell-dot.is-warn {
    background: #f59e0b;
}

.sshell-dot.is-bad {
    background: #ef4444;
}

.sshell-dot.is-off {
    background: color-mix(in srgb, var(--text3) 55%, transparent);
}

.sshell-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg2);
}

.sshell-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.sshell .tab-pane {
    display: none;
    padding: 20px 22px 16px;
    animation: none;
}

.sshell .tab-pane.active {
    display: block;
}

.sshell-lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text2);
    max-width: 62ch;
}

.ss-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg3);
    overflow: hidden;
}

.sshell .ss-card + .ss-card {
    margin-top: 14px;
}

.ss-svc-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ss-svc-stack > .ss-card {
    margin-top: 0;
}

.ss-svc-card {
    overflow: hidden;
}

.ss-svc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    background: color-mix(in srgb, var(--bg2) 55%, var(--bg3));
}

.ss-svc-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text3);
}

.ss-svc-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.3;
}

.ss-svc-desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text3);
    max-width: 52ch;
}

.ss-svc-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 18px;
}

.ss-svc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.ss-svc-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
}

.field-control {
    position: relative;
    display: block;
    width: 100%;
}

.field-control > input[type="text"],
.field-control > input[type="password"],
.field-control > textarea,
.field-control > select {
    width: 100%;
    box-sizing: border-box;
}

.field-control.is-saved > input[type="text"],
.field-control.is-saved > input[type="password"],
.field-control.is-saved > textarea {
    padding-right: 40px;
    border-color: color-mix(in srgb, #22c55e 45%, var(--border));
}

.field-saved-check {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, #22c55e 16%, transparent);
    color: #16a34a;
    pointer-events: auto;
    z-index: 1;
}

.field-control.is-saved.field-control-area .field-saved-check {
    top: 12px;
    transform: none;
}

.field-saved-check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme="light"] .field-saved-check {
    color: #15803d;
}

.ss-svc-field input[type="text"] {
    width: 100%;
    min-height: 40px;
    margin: 0;
    box-sizing: border-box;
}

.ss-svc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ss-svc-ddl {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text2);
}

.ss-oauth-guide {
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg2) 70%, transparent);
    overflow: hidden;
}

.ss-oauth-guide > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    line-height: 1.3;
}

.ss-oauth-guide > summary::-webkit-details-marker {
    display: none;
}

.ss-oauth-guide[open] > summary {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--blue) 6%, transparent);
}

.ss-oauth-guide-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ss-oauth-steps {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text2);
}

.ss-oauth-steps li + li {
    margin-top: 8px;
}

.ss-oauth-uri {
    display: inline-block;
    margin-top: 4px;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.ss-scope-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    vertical-align: middle;
}

.ss-scope-list code {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg3);
    font-size: 12px;
    font-weight: 650;
    color: var(--text);
}

.ss-oauth-panel {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg3);
}

.ss-oauth-panel-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 650;
    color: var(--text3);
}

.ss-oauth-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ss-oauth-row input[type="text"] {
    flex: 1 1 200px;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    width: auto;
}

.ss-oauth-row .btn {
    flex: 0 0 auto;
}

.ss-oauth-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text3);
}

.ss-oauth-hint code {
    font-size: 12px;
    font-weight: 650;
}

.ss-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-top: 0;
    box-shadow: inset 0 1px 0 var(--border);
}

.ss-row:first-child {
    box-shadow: none;
}

.ss-row-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.ss-row-meta {
    min-width: 0;
    flex: 1;
}

.ss-row-meta > label,
.ss-row-title {
    display: block;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    text-transform: none;
    line-height: 1.3;
}

.ss-row-meta > span,
.ss-row-meta .form-hint {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--text3);
    line-height: 1.4;
}

.ss-row-meta-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    position: relative;
    flex-wrap: wrap;
}

.ss-row-meta-inline > label {
    margin: 0;
}

.ss-row input[type="text"],
.ss-row input[type="number"],
.ss-row input[type="password"],
.ss-row input[type="time"],
.ss-row input[type="email"],
.ss-row input[type="search"],
.ss-row input[type="url"],
.ss-row select,
.ss-row textarea,
.ss-code {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin: 0;
}

.ss-code {
    min-height: 120px;
    max-height: 220px;
    resize: vertical;
    font-family: var(--font);
    font-size: var(--control-font-size);
    line-height: 1.45;
    background: var(--bg2);
}

.ss-row-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.ss-row-toggle .ios-toggle {
    flex-shrink: 0;
}

.ss-row-inline {
    align-items: center;
}

.ss-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 4px 4px 4px 4px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg2) 70%, transparent);
    border: 1px solid var(--border);
}

.ss-inline-control input {
    width: 72px;
    min-width: 72px;
    min-height: 36px;
    margin: 0;
    padding: 8px 10px;
    text-align: center;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ss-inline-control input:focus {
    box-shadow: none;
    outline: none;
}

.ss-inline-control span {
    font-size: 13px;
    color: var(--text2);
    padding-right: 10px;
    white-space: nowrap;
}

.ss-inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ss-mini-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.ss-mini-field span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    text-transform: none;
    letter-spacing: 0;
}

.ss-mini-field input[type="time"] {
    min-height: 40px;
    margin: 0;
    width: 140px;
}

.ss-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text2);
    white-space: nowrap;
}

.ss-badge-ok {
    color: #15803d;
    border-color: color-mix(in srgb, #22c55e 35%, var(--border));
    background: color-mix(in srgb, #22c55e 12%, var(--bg2));
}

.ss-badge-warn {
    color: #b45309;
    border-color: color-mix(in srgb, #f59e0b 35%, var(--border));
    background: color-mix(in srgb, #f59e0b 12%, var(--bg2));
}

.ss-badge-bad {
    color: #b91c1c;
    border-color: color-mix(in srgb, #ef4444 35%, var(--border));
    background: color-mix(in srgb, #ef4444 12%, var(--bg2));
}

.ss-badge-off {
    color: var(--text3);
}

.ss-help {
    position: relative;
    flex-shrink: 0;
}

.ss-help[open] {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

.ss-help summary {
    list-style: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    user-select: none;
    padding: 4px 0;
    line-height: 1.3;
}

.ss-help summary::-webkit-details-marker {
    display: none;
}

.ss-help[open] summary {
    margin-bottom: 0;
}

.ss-help-body {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 8px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    box-shadow: none;
}

.ss-help ol {
    position: static;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 0 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}

.ss-help li + li {
    margin-top: 6px;
}

.ss-help code,
.ss-help .oauth-code {
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
}

.ss-help .oauth-code {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 8px;
    word-break: break-all;
}

.ss-oauth-builder {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.ss-oauth-builder > label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
}

.ss-oauth-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ss-oauth-row input[type="text"] {
    flex: 1 1 180px;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    width: auto;
}

.ss-oauth-row .btn {
    flex: 0 0 auto;
}

.ss-help-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text3);
    line-height: 1.45;
}

.ss-advanced {
    margin: 16px 0 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg3);
    overflow: hidden;
}

.ss-advanced > summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    user-select: none;
    transition: background .15s;
}

.ss-advanced > summary:hover {
    background: color-mix(in srgb, var(--blue) 6%, transparent);
}

.ss-advanced > summary::-webkit-details-marker {
    display: none;
}

.ss-advanced > summary::before {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text3);
    border-bottom: 2px solid var(--text3);
    transform: rotate(-45deg);
    transition: transform .18s ease;
    flex-shrink: 0;
    margin-top: -2px;
}

.ss-advanced[open] > summary::before {
    transform: rotate(45deg);
    margin-top: 2px;
}

.ss-advanced > summary::after {
    content: 'Свернуть';
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
}

.ss-advanced:not([open]) > summary::after {
    content: 'Открыть';
    color: var(--blue);
}

.ss-advanced-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

.sshell-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: auto;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg3) 55%, var(--bg2));
}

.ss-danger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 14px 22px;
    border-top: 1px solid color-mix(in srgb, #ef4444 22%, var(--border));
    background: color-mix(in srgb, #ef4444 6%, var(--bg2));
}

.ss-danger strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.ss-danger span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text3);
}

.sshell .cron-once-daily-row.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.settings-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sitemap-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.sitemap-input {
    flex: 1;
    min-width: 280px;
    margin-bottom: 0 !important;
}

.btn-nowrap {
    white-space: nowrap;
}

.form-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text3);
    margin-top: 8px;
}

.sshell .form-hint,
.ss-row .form-hint,
#opsPage .form-hint {
    margin-top: 6px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 14px 0 10px;
}

.filter-bar > select,
.filter-bar #filterSelect,
.filter-bar #perPageSelect,
#filterSelect,
#perPageSelect {
    width: auto;
    max-width: 100%;
    min-width: 160px;
    flex: 1 1 220px;
    margin-bottom: 0;
}

.filter-bar #perPageSelect,
#perPageSelect {
    flex: 0 0 auto;
    min-width: 88px;
    width: auto;
}

.filter-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.filter-bar-aside {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    flex-wrap: wrap;
}

.filter-bar-aside select {
    flex: 0 0 auto;
}

.count-label {
    font-size: 12px;
    color: var(--text2);
}

#bulkBar {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 10px 14px;
    background: rgba(77, 139, 255, 0.08);
    border: 1px solid rgba(77, 139, 255, 0.3);
    border-radius: 10px;
}

#bulkCount {
    color: var(--blue);
}

.bulk-bar-text {
    font-size: 13px;
    color: var(--text);
}

.bulk-bar-meta {
    font-size: 12px;
    color: var(--text3);
}

.bulk-bar-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ico-sm {
    width: 13px;
    height: 13px;
}

th.col-check {
    width: 36px;
    text-align: center;
    padding-right: 0;
}

th.col-google,
th.col-yandex {
    width: 210px;
}

th.col-check-time,
th.col-actions {
    width: 130px;
}

td.col-check {
    text-align: center;
    padding-right: 0;
}

td.col-last-check {
    font-size: 12px;
    color: var(--text2);
    white-space: nowrap;
}

.check-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.check-time .ico {
    width: 13px;
    height: 13px;
    color: var(--text3);
}

.form-inline {
    display: inline;
}

.cell-row .val.error {
    color: #f85149;
}

.empty-state-msg {
    margin-top: 8px;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    font-size: 12px;
    color: var(--text2);
}

.pagination-nav {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn-page .ico {
    width: 16px;
    height: 16px;
}

.btn-page:hover {
    background: var(--bg4);
    color: var(--text);
    border-color: var(--border);
}

.btn-page.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: none;
    cursor: default;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    min-width: 24px;
    color: var(--text3);
    font-size: 13px;
}

.log-empty {
    color: var(--text3);
    font-size: 13px;
    padding: 14px 0;
    text-align: center;
}

.log-scroll {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.log-table {
    min-width: 0;
    font-size: 12px;
}

.log-table tr {
    background: transparent;
}

.log-table td.time {
    width: 140px;
    color: var(--text3);
    font-family: ui-monospace, monospace;
    font-size: 11.5px;
    white-space: nowrap;
    padding: 8px 14px;
}

.log-table td.icon {
    width: 30px;
    padding: 8px 0;
}

.log-table td.type {
    width: 120px;
    padding: 8px 10px;
}

.log-table td.msg {
    padding: 8px 14px;
    color: var(--text);
}

.log-type-label {
    font-size: 10.5px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

.log-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

.log-icon-add_urls { background: #4d8bff22; color: #4d8bff; }
.log-icon-sitemap { background: #a371f722; color: #a371f7; }
.log-icon-sitemap_error { background: #f8514922; color: #f85149; }
.log-icon-process_batch { background: #3fb95022; color: #3fb950; }
.log-icon-process_url { background: #3fb95022; color: #3fb950; }
.log-icon-cron { background: #e3a72f22; color: #e3a72f; }
.log-icon-error { background: #f8514922; color: #f85149; }
.log-icon-default { background: #8b949e22; color: #8b949e; }

.empty-state-link {
    color: var(--blue);
}

tr.site-row-clickable {
    cursor: pointer;
}

.site-job-progress-row td {
    padding: 8px 12px 8px !important;
    border-top: none !important;
    background: transparent;
}

.site-job-progress-row[hidden] {
    display: none;
}

.site-job-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg3);
}

.site-job-progress[hidden] {
    display: none;
}

.site-job-progress--page {
    margin: 0 0 16px;
}

.site-job-progress-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.site-job-progress-label {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.site-job-progress-pct {
    flex: 0 0 auto;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
}

.site-job-progress-track {
    flex: 1 1 auto;
    min-width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.site-job-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #388bfd, #58a6ff);
    transition: width .25s ease;
}

.site-job-progress.is-paused .site-job-progress-fill,
.site-job-progress-row.is-paused .site-job-progress-fill {
    background: linear-gradient(90deg, #d29922, #e3b341);
}

.site-job-progress.is-paused .site-job-progress-label,
.site-job-progress-row.is-paused .site-job-progress-label {
    color: #e3b341;
}

.site-job-progress-status {
    font-size: 11px;
    line-height: 1.25;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-domain-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    min-width: 0;
    max-width: 100%;
}

.site-domain-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
}

.site-domain-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.site-domain-favicon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--bg4);
    object-fit: contain;
}

.td-center-bold {
    text-align: center;
    font-weight: 600;
    color: var(--text);
}

.site-stats-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.site-stats-net,
.site-stats-cover {
    display: block;
}

.site-stats-col .muted {
    color: var(--text3);
}

.site-stats-col .green {
    color: var(--green);
}

.site-stats-col .orange {
    color: var(--orange);
}

.today-chip {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    vertical-align: middle;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(63, 185, 80, .15);
    color: var(--green);
    white-space: nowrap;
}

.api-badges {
    display: flex;
    gap: 6px;
    font-size: 11px;
}

.api-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    border-bottom: 1px dotted currentColor;
    cursor: help;
}

.api-badge-ok {
    background: rgba(63, 185, 80, .12);
    color: var(--green);
}

.api-badge-err {
    background: rgba(248, 81, 73, .12);
    color: var(--red);
}

.api-badge-off {
    background: color-mix(in srgb, var(--text2) 14%, transparent);
    color: var(--text2);
    border: 1px solid color-mix(in srgb, var(--text2) 22%, transparent);
}

.cron-cell {
    font-size: 12px;
}

.cron-on {
    color: var(--green);
}

.cron-off {
    color: var(--text3);
}

.cron-last {
    font-size: 10.5px;
    color: var(--text3);
}

.overview-hint {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text3);
}

.overview-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    width: max-content;
}

.overview-actions .btn-sm {
    flex: 0 0 auto;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    gap: 4px;
    white-space: nowrap;
}

.overview-sitemap-form {
    display: contents;
}

.overview-actions .btn-sm .ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.overview-actions .btn-count-badge {
    margin-left: 2px;
    padding: 1px 5px;
    font-size: 10px;
    line-height: 1.2;
}

th.col-actions,
td.col-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

th.col-cron { width: 110px; }
th.col-site-enabled { width: 88px; }

.label-hint {
    color: var(--text3);
    text-transform: none;
}

.textarea-tall {
    min-height: 160px;
}

.test-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.test-actions-tight {
    margin-top: -4px;
}

#googleTestResult,
#yandexTestResult {
    display: none;
}

.oauth-code {
    display: block;
    margin-top: 4px;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
}

.oauth-hint {
    color: var(--text3);
    font-size: 11.5px;
}

.cron-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.cron-toggle-row > div {
    min-width: 0;
}

.cron-once-daily-row {
    padding-top: 0;
    margin-top: -4px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 8px;
}

.cron-once-daily-row.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.cron-resend-row {
    margin-top: 4px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 8px;
}

.cron-resend-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.cron-resend-field {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 160px;
}

.cron-resend-field input {
    width: 72px;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.cron-resend-suffix {
    font-size: 13px;
    color: var(--text2);
}

.cron-resend-hint {
    margin-top: 10px;
    line-height: 1.5;
}

.switch-no-margin {
    margin: 0;
}

.cron-toggle-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.cron-toggle-desc {
    font-size: 11px;
    color: var(--text2);
}

#cronCommandBox {
    display: none;
}

.cron-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

.btn-cron-copy {
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 12px;
    font-size: 11px;
}

.cron-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-cron-run {
    text-transform: none;
    letter-spacing: 0;
}

#cronRunOutput {
    display: none;
    margin-top: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: ui-monospace, monospace;
    font-size: 11.5px;
    color: var(--text2);
    max-height: 160px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    justify-content: flex-end;
}

#dangerZone {
    display: none;
}

#deleteSiteForm {
    display: none;
}

.login-pass-toggle .ico-eye-off {
    display: none;
}

.text-muted3 {
    color: var(--text3);
}


/* Quota fill widths (0-100%) */
.quota-w-0 { width: 0%; }
.quota-w-1 { width: 1%; }
.quota-w-2 { width: 2%; }
.quota-w-3 { width: 3%; }
.quota-w-4 { width: 4%; }
.quota-w-5 { width: 5%; }
.quota-w-6 { width: 6%; }
.quota-w-7 { width: 7%; }
.quota-w-8 { width: 8%; }
.quota-w-9 { width: 9%; }
.quota-w-10 { width: 10%; }
.quota-w-11 { width: 11%; }
.quota-w-12 { width: 12%; }
.quota-w-13 { width: 13%; }
.quota-w-14 { width: 14%; }
.quota-w-15 { width: 15%; }
.quota-w-16 { width: 16%; }
.quota-w-17 { width: 17%; }
.quota-w-18 { width: 18%; }
.quota-w-19 { width: 19%; }
.quota-w-20 { width: 20%; }
.quota-w-21 { width: 21%; }
.quota-w-22 { width: 22%; }
.quota-w-23 { width: 23%; }
.quota-w-24 { width: 24%; }
.quota-w-25 { width: 25%; }
.quota-w-26 { width: 26%; }
.quota-w-27 { width: 27%; }
.quota-w-28 { width: 28%; }
.quota-w-29 { width: 29%; }
.quota-w-30 { width: 30%; }
.quota-w-31 { width: 31%; }
.quota-w-32 { width: 32%; }
.quota-w-33 { width: 33%; }
.quota-w-34 { width: 34%; }
.quota-w-35 { width: 35%; }
.quota-w-36 { width: 36%; }
.quota-w-37 { width: 37%; }
.quota-w-38 { width: 38%; }
.quota-w-39 { width: 39%; }
.quota-w-40 { width: 40%; }
.quota-w-41 { width: 41%; }
.quota-w-42 { width: 42%; }
.quota-w-43 { width: 43%; }
.quota-w-44 { width: 44%; }
.quota-w-45 { width: 45%; }
.quota-w-46 { width: 46%; }
.quota-w-47 { width: 47%; }
.quota-w-48 { width: 48%; }
.quota-w-49 { width: 49%; }
.quota-w-50 { width: 50%; }
.quota-w-51 { width: 51%; }
.quota-w-52 { width: 52%; }
.quota-w-53 { width: 53%; }
.quota-w-54 { width: 54%; }
.quota-w-55 { width: 55%; }
.quota-w-56 { width: 56%; }
.quota-w-57 { width: 57%; }
.quota-w-58 { width: 58%; }
.quota-w-59 { width: 59%; }
.quota-w-60 { width: 60%; }
.quota-w-61 { width: 61%; }
.quota-w-62 { width: 62%; }
.quota-w-63 { width: 63%; }
.quota-w-64 { width: 64%; }
.quota-w-65 { width: 65%; }
.quota-w-66 { width: 66%; }
.quota-w-67 { width: 67%; }
.quota-w-68 { width: 68%; }
.quota-w-69 { width: 69%; }
.quota-w-70 { width: 70%; }
.quota-w-71 { width: 71%; }
.quota-w-72 { width: 72%; }
.quota-w-73 { width: 73%; }
.quota-w-74 { width: 74%; }
.quota-w-75 { width: 75%; }
.quota-w-76 { width: 76%; }
.quota-w-77 { width: 77%; }
.quota-w-78 { width: 78%; }
.quota-w-79 { width: 79%; }
.quota-w-80 { width: 80%; }
.quota-w-81 { width: 81%; }
.quota-w-82 { width: 82%; }
.quota-w-83 { width: 83%; }
.quota-w-84 { width: 84%; }
.quota-w-85 { width: 85%; }
.quota-w-86 { width: 86%; }
.quota-w-87 { width: 87%; }
.quota-w-88 { width: 88%; }
.quota-w-89 { width: 89%; }
.quota-w-90 { width: 90%; }
.quota-w-91 { width: 91%; }
.quota-w-92 { width: 92%; }
.quota-w-93 { width: 93%; }
.quota-w-94 { width: 94%; }
.quota-w-95 { width: 95%; }
.quota-w-96 { width: 96%; }
.quota-w-97 { width: 97%; }
.quota-w-98 { width: 98%; }
.quota-w-99 { width: 99%; }
.quota-w-100 { width: 100%; }

.idx-chip-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    cursor: pointer;
}

.idx-chip-link:hover {
    border-bottom-style: solid;
    opacity: 0.92;
}

.sitemap-review-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--orange);
    border-radius: 10px;
    background: rgba(210, 153, 34, 0.08);
}

.sitemap-review-text {
    flex: 1 1 280px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
}

.sitemap-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sitemap-review-form {
    margin: 0;
}

.bg-batch-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    width: min(400px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.bg-batch-stack.is-hidden {
    display: none;
}

.bg-batch-stack.is-collapsed {
    width: auto;
    max-height: none;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.bg-batch-stack.is-collapsed .bg-batch-stack-toolbar,
.bg-batch-stack.is-collapsed .bg-batch-stack-list {
    display: none;
}

.bg-batch-stack-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.bg-batch-stack-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text2);
}

.bg-batch-stack-count {
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
}

.bg-batch-stack-toggle {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}

.bg-batch-stack-toggle:hover {
    color: var(--text);
}

.bg-batch-stack-fab {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg2);
    color: var(--text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.bg-batch-stack.is-collapsed .bg-batch-stack-fab {
    display: inline-flex;
}

.bg-batch-stack-fab:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.bg-batch-stack-fab-count {
    color: var(--blue);
    font-weight: 700;
}

.bg-batch-stack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.app-jobs-spoiler {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg3);
    overflow: hidden;
}

.app-jobs-spoiler[open] > .app-sites-summary .app-sites-chevron {
    transform: rotate(180deg);
}

.app-jobs-panel {
    padding: 0 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-jobs-empty {
    padding: 10px 8px 4px;
    font-size: 12px;
    color: var(--text3);
    line-height: 1.35;
}

.app-jobs-empty[hidden] {
    display: none;
}

.bg-batch-stack--sidebar {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: 100%;
    max-height: none;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.bg-batch-stack--sidebar[hidden],
.bg-batch-stack--sidebar.is-empty {
    display: none !important;
}

.bg-batch-stack--sidebar .bg-batch-stack-list {
    max-height: min(42vh, 360px);
    gap: 8px;
}

.bg-batch-stack--sidebar .bg-batch-progress {
    padding: 10px 11px;
    background: var(--bg2);
    border-color: color-mix(in srgb, var(--border2) 70%, transparent);
}

.bg-batch-stack--sidebar .bg-batch-title {
    font-size: 12.5px;
}

.bg-batch-stack--sidebar .bg-batch-status {
    font-size: 11px;
}

@keyframes bg-batch-spin {
    to { transform: rotate(360deg); }
}

.bg-batch-progress {
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.bg-batch-head-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.bg-batch-spin {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--blue);
    animation: bg-batch-spin 0.9s linear infinite;
}

.bg-batch-progress.is-done .bg-batch-spin,
.bg-batch-progress.is-paused .bg-batch-spin {
    animation: none;
}

.bg-batch-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bg-batch-pct {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    font-variant-numeric: tabular-nums;
    min-width: 2.8em;
    text-align: right;
}

.bg-batch-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bg-batch-status {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    color: var(--text3);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0;
}

.bg-batch-status a {
    color: var(--blue);
    text-decoration: underline;
}

.bg-batch-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.bg-batch-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg3);
    color: var(--text2);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.bg-batch-ctrl .ico {
    width: 14px;
    height: 14px;
}

.bg-batch-ctrl:hover {
    color: var(--text);
    border-color: var(--border2);
    background: var(--bg4);
}

.bg-batch-toggle .bg-batch-ico-play {
    display: none;
}

.bg-batch-toggle.is-paused {
    color: #e3b341;
    border-color: rgba(227, 179, 65, .45);
    background: rgba(227, 179, 65, .12);
}

.bg-batch-toggle.is-paused .bg-batch-ico-pause {
    display: none;
}

.bg-batch-toggle.is-paused .bg-batch-ico-play {
    display: block;
}

.bg-batch-toggle:not(.is-paused):hover {
    color: var(--blue);
    border-color: rgba(77, 139, 255, .45);
}

.bg-batch-stop:hover {
    color: var(--red);
    border-color: rgba(248, 81, 73, .45);
    background: rgba(248, 81, 73, .1);
}

.bg-batch-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg3);
    color: var(--text3);
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

.bg-batch-close .ico {
    width: 14px;
    height: 14px;
}

.bg-batch-close:hover {
    color: var(--red);
    border-color: rgba(248, 81, 73, .45);
}

.bg-batch-track {
    background: color-mix(in srgb, var(--text3) 18%, transparent);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    width: 100%;
}

.bg-batch-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), #7c9cff);
    transition: width .2s ease;
}

.bg-batch-errors {
    display: none;
    margin-top: 0;
    font-size: 11px;
    color: #f85149;
    background: rgba(248, 81, 73, .08);
    border: 1px solid rgba(248, 81, 73, .25);
    border-radius: 8px;
    padding: 6px 10px;
    max-height: 90px;
    overflow-y: auto;
    font-family: ui-monospace, monospace;
}
@media (max-width: 600px) {
    .bg-batch-stack {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
}

.diagnostics-panel summary {
    cursor: pointer;
    font-weight: 700;
}

.diagnostics-actions,
.ops-settings {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.diagnostics-output {
    margin-top: 14px;
    padding: 14px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text2);
    white-space: pre-wrap;
}

.api-warning {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(210, 153, 29, .35);
    border-radius: 10px;
    background: rgba(210, 153, 29, .08);
    color: var(--text2);
    font-size: 12px;
    line-height: 1.5;
}

.checkbox-inline.google-publish-toggle {
    margin: 0 0 8px;
}

.checkbox-inline.google-publish-toggle + .form-hint {
    margin-top: 0;
    margin-bottom: 14px;
}

.quota-off-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text2);
    background: rgba(139, 148, 158, .2);
    border: 1px solid var(--border);
}

.health-badge {
    display: inline-flex;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text2);
    background: var(--bg3);
}

.health-ok {
    color: var(--green);
    background: rgba(46, 160, 67, .12);
}

.health-bad,
.health-error {
    color: var(--red);
    background: rgba(248, 81, 73, .12);
}

.health-redirect {
    color: var(--orange);
    background: rgba(210, 153, 29, .12);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.chart-panel {
    margin-bottom: 0;
    min-width: 0;
}

.chart-panel[hidden] {
    display: none;
}

.chart-panel-wide {
    grid-column: 1 / -1;
}

.chart-overview-panel {
    margin-bottom: 18px;
}

.overview-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.overview-charts-grid .panel-head {
    align-items: flex-start;
    min-height: 34px;
}

.overview-charts-grid .panel-head-title {
    line-height: 1.25;
}

.overview-charts-grid .panel-head-aside {
    white-space: nowrap;
}

.chart-canvas-wrap {
    position: relative;
    height: 300px;
    min-width: 0;
}

.chart-canvas-wide {
    height: 330px;
}

.chart-canvas-overview {
    height: 250px;
}

.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
    color: var(--red);
    background: rgba(248, 81, 73, 0.06);
    border: 1px solid rgba(248, 81, 73, 0.18);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

@media (max-width: 1100px) {
    .charts-grid,
    .overview-charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .chart-canvas-wrap,
    .chart-canvas-wide {
        height: 270px;
    }
}
  
.modal-content-wide {
    max-width: 860px;
}

.is-hidden {
    display: none !important;
}

.ops-status {
    margin: 0 0 12px;
    padding: 11px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--blue) 8%, var(--bg2));
    border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--border));
    font-size: 13px;
    line-height: 1.45;
    color: var(--text2);
}

.ops-status:empty {
    display: none;
}

.ops-status-ok {
    background: color-mix(in srgb, var(--green) 10%, var(--bg2));
    border-color: color-mix(in srgb, var(--green) 28%, var(--border));
    color: var(--text);
}

.ops-status-warn {
    background: color-mix(in srgb, #d29922 10%, var(--bg2));
    border-color: color-mix(in srgb, #d29922 30%, var(--border));
    color: var(--text);
}

.ops-status-err {
    background: color-mix(in srgb, #f85149 10%, var(--bg2));
    border-color: color-mix(in srgb, #f85149 30%, var(--border));
    color: var(--text);
}

.ops-form {
    display: grid;
    gap: 14px;
    margin: 4px 0 8px;
}

.ops-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text);
}

.ops-field input {
    width: 100%;
    box-sizing: border-box;
}

.ops-field .form-hint {
    margin-top: 6px;
}

.ops-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.ops-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text);
}

.ops-bot-menu {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.ops-sites-status {
    margin: 0;
    padding: 0 14px 16px;
    display: grid;
    gap: 8px;
}

.ops-site-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
    padding: 11px 13px;
    border-radius: 10px;
    background: var(--bg2);
    border: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text2);
}

.ops-site-domain {
    font-weight: 650;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ops-site-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text3);
    white-space: nowrap;
}

.ops-site-badge.is-on {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, var(--bg2));
    border-color: color-mix(in srgb, var(--green) 28%, var(--border));
}

.ops-site-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--text3);
}

.ops-site-meta strong {
    color: var(--text2);
    font-weight: 600;
}

.backup-table-wrap {
    overflow-x: auto;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg2);
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.backup-table th,
.backup-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.backup-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text3);
    background: color-mix(in srgb, var(--bg3) 70%, var(--bg2));
    white-space: nowrap;
}

.backup-table tbody tr:hover td {
    background: color-mix(in srgb, var(--blue) 4%, transparent);
}

.backup-table tr:last-child td {
    border-bottom: none;
}

.backup-table .backup-empty,
.ops-empty {
    text-align: center;
    color: var(--text3);
    padding: 40px 16px;
    font-size: 13.5px;
    line-height: 1.5;
}

.ops-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--blue) 12%, var(--bg3));
    border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border));
    color: var(--blue);
}

.ops-empty-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ops-empty-title {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text);
}

.ops-empty-hint {
    display: block;
    font-size: 13px;
    color: var(--text3);
}

.diagnostics-output:empty {
    display: none;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ops-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    white-space: nowrap;
}

.ops-badge.is-ok {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, var(--bg2));
    border-color: color-mix(in srgb, var(--green) 28%, var(--border));
}

.ops-badge.is-run {
    color: #b45309;
    background: color-mix(in srgb, #d29922 14%, var(--bg2));
    border-color: color-mix(in srgb, #d29922 30%, var(--border));
}

.backup-running-hint {
    font-size: 12px;
    color: var(--text3);
    white-space: nowrap;
}

.backup-progress {
    margin: 8px 0 4px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #d29922 28%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, #d29922 8%, var(--bg2));
}

.backup-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

.backup-progress-meta strong {
    font-variant-numeric: tabular-nums;
}

.backup-progress-track {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 70%, var(--bg3));
    overflow: hidden;
}

.backup-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d29922, #f0c14a);
    transition: width .35s ease;
}

.backup-progress-stage {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text3);
    line-height: 1.4;
    word-break: break-word;
}

.ops-badge.is-log {
    color: #b45309;
    background: color-mix(in srgb, #d29922 12%, var(--bg2));
    border-color: color-mix(in srgb, #d29922 28%, var(--border));
}

.ops-badge.is-core {
    color: var(--blue);
    background: color-mix(in srgb, var(--blue) 12%, var(--bg2));
    border-color: color-mix(in srgb, var(--blue) 28%, var(--border));
}

.ops-badge.is-other {
    color: var(--text3);
}

.ops-table-name {
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.ops-table-num {
    font-variant-numeric: tabular-nums;
    color: var(--text2);
    white-space: nowrap;
}

.ops-form-restore .ops-field input[type="password"] {
    -webkit-text-fill-color: var(--text);
    background: var(--bg3, #161b22);
}

.ops-restore-zone {
    margin-top: 0;
    margin-bottom: 8px;
    padding: 0;
    border: 1px solid color-mix(in srgb, #f85149 28%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, #f85149 4%, var(--bg3));
    display: block;
    overflow: visible;
}

.ops-restore-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid color-mix(in srgb, #f85149 18%, var(--border));
    background: color-mix(in srgb, #f85149 6%, var(--bg2));
    border-radius: 12px 12px 0 0;
}

.ops-restore-head strong {
    display: inline;
    color: var(--text);
    font-size: 13.5px;
    margin-bottom: 0;
}

.ops-restore-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.ops-restore-title strong {
    display: inline;
    margin: 0;
    line-height: 1.3;
}

.ops-restore-title .tip {
    display: inline-flex !important;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    position: static;
    color: var(--text3);
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}

.ops-restore-head > span {
    display: block;
    color: var(--text3);
    font-size: 12.5px;
    line-height: 1.4;
}

.ops-restore-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ops-restore-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ops-restore-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    min-width: 0;
}

.ops-restore-field > span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text2);
}

.ops-restore-field input {
    width: 100%;
    min-height: 40px;
    margin: 0;
    box-sizing: border-box;
    font: inherit;
    color: var(--text);
    background: var(--bg2, #0d1117);
    border: 1px solid var(--border, #30363d);
    border-radius: 8px;
    padding: 8px 12px;
}

.ops-restore-field input:focus {
    outline: none;
    border-color: color-mix(in srgb, #f85149 45%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, #f85149 16%, transparent);
}

.ops-restore-field input[type="password"] {
    -webkit-text-fill-color: var(--text);
    background: var(--bg2, #0d1117);
}

.ops-restore-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.ops-restore-actions .btn {
    min-height: 40px;
}

.ops-restore-body .test-result {
    margin: 0;
}

.ops-restore-body .test-result:empty {
    display: none;
}

#opsPage [data-pane="ops-backups"] {
    padding-bottom: 24px;
}

#opsPage [data-pane="ops-backups"] .ops-card-gap:last-child {
    margin-bottom: 0;
}

.ops-form-restore {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 860px) {
    .ops-restore-grid {
        grid-template-columns: 1fr;
    }

    .ops-restore-actions {
        justify-content: stretch;
    }

    .ops-restore-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

#opsPage.ops-shell {
    box-shadow: 0 10px 40px color-mix(in srgb, #000 6%, transparent);
}

#opsPage .ops-pad {
    padding: 16px 18px 6px;
}

#opsPage .ops-pad-top {
    padding-top: 4px;
    padding-bottom: 14px;
}

#opsPage .ops-pad .ops-status,
#opsPage .ops-pad .test-result,
#opsPage .ops-pad .diagnostics-output {
    margin: 0 0 10px;
}

#opsPage .ops-card-gap {
    margin-top: 14px;
}

#opsPage .ops-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg2) 55%, var(--bg3));
}

#opsPage .ops-toolbar-text {
    min-width: 0;
}

#opsPage .ops-toolbar-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text);
}

#opsPage .ops-toolbar-text span {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--text3);
    line-height: 1.4;
}

#opsPage .ops-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

#opsPage .ops-section-head {
    padding: 14px 16px 6px;
}

#opsPage .ops-section-head .form-hint {
    margin: 4px 0 0;
}

#opsPage .ops-section-divider {
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

#opsPage .ops-cmd-list {
    display: grid;
    gap: 10px;
    padding: 4px 18px 16px;
}

#opsPage .ops-cmd-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

#opsPage .ops-cmd-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
}

#opsPage .ops-cmd-row .cron-code {
    margin: 0;
    padding: 12px 14px;
    min-height: var(--control-h);
    display: flex;
    align-items: center;
    border-radius: var(--control-radius);
    background: var(--bg2);
    border: 1px solid var(--border);
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text);
}

#opsPage .ops-cmd-copy {
    white-space: nowrap;
}

#opsPage .ops-retention-grid {
    border-top: 0;
}

#opsPage .ops-toolbar + .ops-retention-grid {
    border-top: 0;
}

#opsPage .ops-time-sep {
    color: var(--text3);
    font-size: 14px;
    align-self: flex-end;
    margin-bottom: 10px;
}

#opsPage .ss-mini-field input[type="time"] {
    width: 132px;
    min-width: 132px;
}

#opsPage .ss-card > .settings-details,
#opsPage .ss-card > .ops-details {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

#opsPage .ops-details > summary,
#opsPage .settings-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

#opsPage .ops-details > summary::-webkit-details-marker,
#opsPage .settings-details > summary::-webkit-details-marker {
    display: none;
}

#opsPage .ops-details > summary::before,
#opsPage .settings-details > summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    border-left: 5px solid var(--text3);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateY(-1px);
    transition: transform .15s ease;
}

#opsPage .ops-details[open] > summary::before,
#opsPage .settings-details[open] > summary::before {
    transform: rotate(90deg) translateX(1px);
}

#opsPage .ops-details ol,
#opsPage .settings-details ol {
    margin: 0;
    padding: 0 18px 16px 36px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text2);
}

#opsPage .ops-details li + li,
#opsPage .settings-details li + li {
    margin-top: 6px;
}

#opsPage .ss-row {
    padding: 16px 18px;
}

#opsPage .diagnostics-output {
    margin-top: 0;
    border-radius: 10px;
    background: var(--bg2);
    max-height: 240px;
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.45;
}

#opsPage .ss-inline-fields {
    align-items: flex-end;
}

@media (max-width: 860px) {
    #opsPage .ops-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    #opsPage .ops-toolbar-actions {
        width: 100%;
    }

    #opsPage .ops-toolbar-actions .btn {
        flex: 1;
        justify-content: center;
    }

    #opsPage .ops-cmd-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    #opsPage .ops-cmd-copy {
        width: 100%;
        justify-content: center;
    }

    .ops-site-row {
        grid-template-columns: 1fr auto;
    }

    .ops-site-meta {
        grid-column: 1 / -1;
    }
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.page-lead {
    margin: 0;
    color: var(--text2);
    font-size: 13px;
    max-width: 720px;
    line-height: 1.45;
}

.page-panel {
    padding: 0;
}

.page-panel .tabs {
    margin-bottom: 16px;
}

.page-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.page-inline-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.page-inline-link:hover {
    text-decoration: underline;
}

.log-scroll-page {
    max-height: none;
}

#opsPage .test-result:empty {
    display: none;
}

@media (max-width: 800px) {
    .ops-form-restore {
        grid-template-columns: 1fr;
    }
}

.legacy-cron-box {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.legacy-cron-box summary {
    cursor: pointer;
    margin-bottom: 8px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .modal-content-wide {
        max-width: 100%;
    }
}

.ui-section {
    margin-bottom: var(--space-section);
}

.ui-section-head {
    margin: 4px 0 12px;
}

.ui-section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text3);
}

.ui-section-lead {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text2);
    line-height: 1.4;
}

.dash-command-bar,
.site-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    flex-wrap: wrap;
    margin: 0 0 var(--space-section);
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.dash-command-bar {
    align-items: flex-start;
}

.dash-command-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.dash-command-lead {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text2);
    line-height: 1.4;
}

.dash-command-bar .btn,
.site-command-actions .btn {
    min-height: 42px;
}

.panel,
.ui-panel,
.page-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.panel {
    padding: 18px 20px;
    margin-bottom: var(--space-section);
}

.panel-tight {
    padding: 16px 18px;
}

.panel-head {
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.panel-head-title {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.panel-head-aside {
    font-size: 12px;
    color: var(--text3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.stats-strip {
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 0;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.stats-strip-cell {
    padding: 14px 16px;
    min-width: 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.stats-strip-cell:last-child {
    border-right: 0;
}

.stats-strip-meta-cell {
    padding: 12px 14px;
}

.stats-strip-meta-grid {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.stats-strip-meta-block {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.stats-strip-meta-sep {
    width: 1px;
    align-self: stretch;
    background: var(--border);
    flex-shrink: 0;
}

.stats-strip-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
    line-height: 1.2;
}

.stats-strip-label .ico-cron {
    width: 14px;
    height: 14px;
}

.stats-strip-url {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.stats-strip-url strong {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stats-strip-url-today {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    font-variant-numeric: tabular-nums;
}

.stats-strip-url-today.is-up {
    color: var(--green);
}

.stats-strip-meta {
    font-size: 12px;
    color: var(--text3);
    margin-top: 2px;
}

.stats-strip-meta a {
    color: var(--text);
    font-weight: 650;
    text-decoration: none;
}

.stats-strip-meta a:hover {
    text-decoration: underline;
}

.stats-strip-cron-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.stats-strip-cron-last,
.stats-strip-cron-hint {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    font-variant-numeric: tabular-nums;
}

.stats-strip-cron-hint {
    font-weight: 500;
    color: var(--text3);
    font-size: 12px;
}

.kpi-donut-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.kpi-donut-row-sm {
    gap: 10px;
}

.kpi-donut {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: conic-gradient(
        #22c55e 0deg var(--deg-ok, 0deg),
        color-mix(in srgb, var(--border) 85%, #94a3b8) var(--deg-ok, 0deg) 360deg
    );
    display: grid;
    place-items: center;
    flex-shrink: 0;
    position: relative;
}

.kpi-donut-g {
    background: conic-gradient(
        #3b82f6 0deg var(--deg-ok, 0deg),
        color-mix(in srgb, var(--border) 85%, #94a3b8) var(--deg-ok, 0deg) 360deg
    );
}

.kpi-donut-y {
    background: conic-gradient(
        #f59e0b 0deg var(--deg-ok, 0deg),
        color-mix(in srgb, var(--border) 85%, #94a3b8) var(--deg-ok, 0deg) 360deg
    );
}

.kpi-donut-sm {
    width: 56px;
    height: 56px;
}

.kpi-donut-md {
    width: 78px;
    height: 78px;
}

.kpi-donut-lg {
    width: 112px;
    height: 112px;
}

.kpi-donut-hole {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
}

.kpi-donut-sm .kpi-donut-hole {
    width: 38px;
    height: 38px;
}

.kpi-donut-md .kpi-donut-hole {
    width: 52px;
    height: 52px;
}

.kpi-donut-lg .kpi-donut-hole {
    width: 74px;
    height: 74px;
}

.kpi-donut-hole strong {
    font-size: 20px;
    font-weight: 750;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.kpi-donut-sm .kpi-donut-hole strong {
    font-size: 13px;
}

.kpi-donut-md .kpi-donut-hole strong {
    font-size: 17px;
}

.kpi-donut-lg .kpi-donut-hole strong {
    font-size: 24px;
}

.kpi-donut-hole span {
    font-size: 11px;
    font-weight: 650;
    color: var(--text3);
}

.kpi-donut-sm .kpi-donut-hole span {
    font-size: 8px;
}

.kpi-donut-md .kpi-donut-hole span {
    font-size: 10px;
}

.kpi-donut-lg .kpi-donut-hole span {
    font-size: 12px;
}

.kpi-donut-side {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.kpi-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 13px;
    color: var(--text2);
}

.kpi-leg {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
    width: 100%;
}

.kpi-leg span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kpi-leg em {
    font-style: normal;
    font-weight: 500;
    flex-shrink: 0;
    color: var(--text2);
}

.kpi-leg i {
    flex: 1 1 auto;
    min-width: 16px;
    height: 0;
    margin: 0 2px;
    border-bottom: 1px dotted color-mix(in srgb, var(--border2, var(--border)) 80%, #94a3b8);
    align-self: center;
    transform: translateY(-1px);
}

.kpi-leg-ok span { background: #22c55e; }
.kpi-leg-miss span { background: #ef4444; }
.kpi-donut-g + .kpi-donut-side .kpi-leg-ok span,
.kpi-donut-row:has(.kpi-donut-g) .kpi-leg-ok span { background: #3b82f6; }
.kpi-donut-row:has(.kpi-donut-y) .kpi-leg-ok span { background: #f59e0b; }

.kpi-leg strong {
    margin-left: 0;
    flex-shrink: 0;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.kpi-donut-side > .stat-cover-chip,
.kpi-donut-side > .stats-strip-meta,
.kpi-donut-side > .index-change-today-row,
.kpi-donut-side > .stat-net-alltime,
.kpi-donut-side > .stat-net-alltime-row,
.kpi-donut-side > .kpi-delta-line {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
}

.kpi-delta-line {
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    color: var(--text3);
}

.kpi-delta-line.is-up { color: #16a34a; }
.kpi-delta-line.is-down { color: #dc2626; }
.kpi-delta-line.is-flat { color: var(--text3); font-weight: 550; }

.kpi-engines-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 18px 20px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    box-shadow: var(--shadow-soft);
}

.kpi-engines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    min-width: 0;
    align-items: center;
}

.kpi-engine {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.kpi-engine-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stat-card,
.stat-card-wide {
    display: flex;
    flex-direction: column;
    flex: none;
    max-width: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px 12px;
    box-shadow: var(--shadow-soft);
    min-height: 0;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.stat-card:hover {
    background: var(--surface-hover);
    border-color: var(--border2);
}

.stat-card-wide {
    grid-column: span 1;
}

.stat-label,
.stat-label-row {
    min-height: 20px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text3);
}

.stat-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text3);
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    margin-top: 6px;
}

.stat-split {
    margin-top: 10px;
}

.cron-stats-row,
.cron-hint {
    margin-top: auto;
    padding-top: 12px;
}

.stat-denom {
    font-size: 14px;
    font-weight: 600;
    color: var(--text3);
}

.stat-sub {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.stat-cover-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
}

.stat-cover-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: max-content;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg3);
    font-size: 11px;
    color: var(--text2);
}

.quota-grid {
    gap: 14px;
}

.quota-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.quota-provider-head {
    margin-bottom: 12px;
}

.quota-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--bg4);
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    border-radius: 999px;
}

.charts-grid,
.overview-charts-grid {
    gap: 14px;
    margin-bottom: 0;
}

.chart-panel {
    padding: 16px 18px 18px;
}

.chart-canvas-wrap {
    height: 280px;
}

.chart-canvas-overview {
    height: 240px;
}

.filter-bar {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    gap: 12px;
}

#filterSelect,
#perPageSelect {
    min-height: 40px;
    border-radius: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
}

.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    overflow-y: clip;
    background: var(--bg2);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    max-width: 100%;
}

.urls-table-wrap {
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 100%;
}

.urls-data-table {
    min-width: 960px;
}

.urls-data-table thead th {
    background: var(--bg3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.urls-data-table tbody td {
    padding: 4px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: var(--bg2);
}

.urls-data-table tbody tr:hover td {
    background: color-mix(in srgb, var(--blue) 6%, var(--bg2));
}

.urls-data-table .col-actions .row-actions,
.urls-data-table td:last-child .row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.urls-data-table .g-status,
.urls-data-table .y-status,
.urls-data-table .col-last-check {
    vertical-align: middle;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

tbody tr:last-child td {
    border-bottom: none;
}

.site-row-clickable {
    cursor: pointer;
    transition: background .12s;
}

.site-row-clickable:hover td {
    background: rgba(77, 139, 255, 0.06);
}

.site-domain-link {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.site-domain-link:hover {
    color: var(--blue);
}

.site-stats-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 1.35;
}

.overview-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: max-content;
    max-width: none;
}

.overview-actions .btn-sm {
    flex: 0 0 auto;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    white-space: nowrap;
}

.overview-actions .btn-has-badge {
    padding-right: 6px;
}

.overview-actions .btn-count-badge {
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 10px;
    max-width: 4.5em;
    overflow: hidden;
    text-overflow: ellipsis;
}

th.col-actions,
td.col-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.site-job-progress--page {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.site-job-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--bg4);
    overflow: hidden;
}

.site-job-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4d8bff, #7aa7ff);
}

.empty-state {
    padding: 36px 20px;
    text-align: center;
    color: var(--text2);
    font-size: 14px;
    line-height: 1.5;
}

.alert {
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.page-panel .tabs {
    margin-top: 0;
}

.app-content {
    padding: 20px 22px 32px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .app-content {
        padding: 10px 10px 24px;
    }

    .dash-command-title {
        font-size: 20px;
    }

    .dash-command-bar .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

@media (max-width: 1100px) {
    .stats-strip {
        grid-template-columns: 1fr;
    }

    .stats-strip-cell {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .stats-strip-cell:last-child {
        border-bottom: 0;
    }

    .stats-strip-meta-grid {
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    .stats-strip-meta-grid {
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
    }

    .stats-strip-meta-sep {
        width: 1px;
        height: auto;
        align-self: stretch;
    }

    .stats-strip-meta-block {
        flex: 1 1 0;
        min-width: 0;
    }

    .stats-strip-url {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
    }

    .stats-strip-url strong {
        font-size: 22px;
    }

    .stats-strip-cron-body {
        gap: 2px;
    }

    .stats-strip-cell {
        border-right: 0 !important;
        border-bottom: 1px solid var(--border);
    }

    .stats-strip-cell:last-child {
        border-bottom: 0;
    }

    .kpi-donut-md {
        width: 68px;
        height: 68px;
    }

    .kpi-donut-md .kpi-donut-hole {
        width: 46px;
        height: 46px;
    }

    .kpi-donut-lg {
        width: 92px;
        height: 92px;
    }

    .kpi-donut-lg .kpi-donut-hole {
        width: 60px;
        height: 60px;
    }

    .kpi-donut-lg .kpi-donut-hole strong {
        font-size: 20px;
    }

    .stat-card,
    .stat-card-wide {
        padding: 10px 10px 9px;
        min-height: 0;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label,
    .stat-label-row {
        font-size: 10px;
        min-height: 0;
    }

    .stat-sub {
        font-size: 9.5px;
    }

    .cron-hint {
        font-size: 11px;
        line-height: 1.35;
    }

    .ui-section-head {
        margin-bottom: 10px;
    }
}

.quota-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quota-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.quota-item,
.quota-item:first-child,
.quota-item:last-child {
    padding: 0;
    border: none;
}

.quota-item + .quota-item {
    border: none;
}

.quota-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    min-height: 0;
    transition: border-color .15s, background .15s;
}

.quota-card:hover {
    background: var(--surface-hover);
    border-color: var(--border2);
}

.quota-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}

.quota-card-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.quota-card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text3);
}

.quota-provider-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}

.quota-card-google .quota-provider-mark {
    background: #4285f4;
}

.quota-card-yandex .quota-provider-mark {
    background: #fc3f1d;
}

.quota-console-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text3);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}

.quota-console-link:hover {
    color: var(--text);
    background: var(--bg3);
}

.quota-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quota-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 0;
}

.quota-metric + .quota-metric {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quota-metric-disabled {
    opacity: 0.72;
}

.quota-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quota-metric-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: 0;
}

.quota-tag {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text3);
    font-size: 10px;
    font-weight: 700;
}

.quota-tag-off {
    color: var(--orange);
    border-color: rgba(210, 153, 29, 0.35);
    background: rgba(210, 153, 29, 0.1);
}

.quota-tag-ok {
    color: #16a34a;
    border-color: color-mix(in srgb, #22c55e 30%, transparent);
    background: color-mix(in srgb, #22c55e 12%, transparent);
}

html[data-theme="dark"] .quota-tag-ok,
html:not([data-theme="light"]) .quota-tag-ok {
    color: #4ade80;
}

.quota-metric-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}

.quota-metric-num {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.quota-tone-ok .quota-metric-num {
    color: #7ddea0;
}

.quota-tone-warn .quota-metric-num {
    color: #e6c07b;
}

.quota-tone-danger .quota-metric-num {
    color: #f0a8a4;
}

.quota-metric-unit {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
}

.quota-track {
    height: 5px;
    border-radius: 999px;
    background: var(--bg4);
    overflow: hidden;
    box-shadow: none;
}

.quota-track-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
    transition: width .25s ease;
}

.quota-fill-g {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.quota-fill-y {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.quota-metric-foot {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.3;
}

.quota-metric-over {
    color: var(--orange);
}

@media (max-width: 900px) {
    .quota-grid {
        grid-template-columns: 1fr;
    }
}

.tv-sites-table {
    width: 100%;
    border-collapse: collapse;
}

.tv-sites-table th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    color: var(--text3);
    white-space: nowrap;
    padding: 10px 12px;
}

.tv-sites-table td {
    padding: 14px 12px;
    vertical-align: middle;
    border-top: 1px solid rgba(148, 163, 184, .08);
}

.tv-sites-table tr.site-row-clickable:hover td {
    background: rgba(148, 163, 184, .04);
}

.tv-site-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}

.tv-site-tools a,
.tv-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text3);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    flex-shrink: 0;
}

.tv-site-tools a:hover,
.tv-tool-btn:hover {
    background: rgba(148, 163, 184, .12);
    color: var(--text);
}

.tv-site-tools .ico,
.tv-tool-btn .ico {
    width: 14px;
    height: 14px;
}

.tv-check-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tv-check-btn,
.tv-send-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    padding: 0;
    color: #fff;
    background: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, .35);
}

.tv-check-btn:hover:not(:disabled),
.tv-send-btn.is-active:hover:not(:disabled) {
    filter: brightness(1.08);
}

.tv-check-btn:disabled,
.tv-send-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.tv-send-btn {
    background: rgba(148, 163, 184, .18);
    color: var(--text3);
    box-shadow: none;
}

.tv-send-btn.is-active {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .35), 0 0 12px rgba(34, 197, 94, .25);
}

.tv-check-btn .ico,
.tv-send-btn .ico {
    width: 18px;
    height: 18px;
}

.tv-check-btn .btn-count-badge,
.tv-send-btn .btn-count-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 18px;
    padding: 0 6px;
    margin: 0;
    border-radius: 999px;
    border: 2px solid var(--bg2);
    background: #f8fafc;
    color: #0f172a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.tv-send-btn.is-active .btn-count-badge {
    background: #ecfdf5;
    color: #065f46;
    border-color: color-mix(in srgb, #22c55e 35%, var(--bg2));
}

html[data-theme="light"] .tv-check-btn .btn-count-badge,
html[data-theme="light"] .tv-send-btn .btn-count-badge {
    border-color: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

.tv-check-meta {
    font-size: 11px;
    color: var(--text3);
    text-align: center;
    line-height: 1.25;
    max-width: 110px;
}

.tv-metric {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
    text-align: center;
}

.tv-metric strong,
.tv-metric .green {
    font-weight: 600;
}

.tv-metric-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--text3);
}

.tv-engine-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    text-align: center;
}

.tv-engine-extra {
    color: var(--text3);
    font-size: 11px;
}

.tv-sites-table .col-urls,
.tv-sites-table .col-check,
.tv-sites-table .col-send,
.tv-sites-table .col-google,
.tv-sites-table .col-yandex,
.tv-sites-table .col-cron,
.tv-sites-table .col-domain-watch,
.tv-sites-table .col-site-enabled {
    text-align: center;
}

.tv-toggle-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tv-sites-table tr.site-row-clickable.is-disabled td {
    opacity: 0.55;
}

.tv-sites-table tr.site-row-clickable.is-disabled td.col-site-enabled {
    opacity: 1;
}

.tv-sites-table .col-site-enabled {
    width: 96px;
    min-width: 80px;
}

.tv-sites-table .col-cron {
    width: 120px;
}

.tv-sites-table .col-domain-watch {
    min-width: 160px;
}

.domain-watch {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    text-align: left;
}

.domain-watch-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 180px;
}

.domain-watch-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.domain-watch-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.domain-watch-bar {
    height: 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text3) 22%, transparent);
    overflow: hidden;
}

.domain-watch-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background-image: linear-gradient(90deg, #ef4444 0%, #eab308 48%, #22c55e 100%);
    background-repeat: no-repeat;
    background-position: left center;
    transition: width .25s ease;
}

.domain-watch-bar--unknown > span {
    width: 0 !important;
    background: transparent;
}

.domain-watch-label {
    font-size: 11px;
    color: var(--text2);
    line-height: 1.2;
    white-space: nowrap;
}

.domain-watch-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text3);
    cursor: pointer;
    padding: 0;
}

.domain-watch-refresh:hover {
    background: rgba(148, 163, 184, .12);
    color: var(--text);
}

.domain-watch-refresh .ico {
    width: 14px;
    height: 14px;
}

.domain-watch-refresh.is-busy {
    pointer-events: none;
    opacity: .7;
}

@media (max-width: 1100px) {
    .tv-sites-table .col-domain-watch,
    .tv-sites-table .col-cron {
        min-width: 120px;
    }
}

html[data-theme="light"] .app-header {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .app-content {
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(37, 99, 235, 0.07), transparent 55%),
        radial-gradient(700px 380px at 100% 0%, rgba(79, 70, 229, 0.05), transparent 50%),
        var(--bg);
}

html[data-theme="light"] .app-nav-link.is-active,
html[data-theme="light"] .app-nav-link.is-active:hover {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

html[data-theme="light"] .app-nav-link.is-active .ico {
    color: #fff;
    opacity: 1;
}

html[data-theme="light"] .app-nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--text);
}

html[data-theme="light"] .app-site-item.is-active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--text);
}

html[data-theme="light"] .app-sites-spoiler,
html[data-theme="light"] .app-jobs-spoiler {
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .app-nav-badge,
html[data-theme="light"] .app-nav-badge--end {
    color: var(--text);
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .dash-command-bar,
html[data-theme="light"] .site-command-bar {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-elevated);
}

html[data-theme="light"] .panel,
html[data-theme="light"] .ui-panel,
html[data-theme="light"] .page-panel,
html[data-theme="light"] .chart-panel {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .panel {
    background: #fff;
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .stat-card,
html[data-theme="light"] .stat-card-wide {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .stats-strip,
html[data-theme="light"] .kpi-engines-card {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .stats-strip-cell {
    border-color: var(--border);
}

html[data-theme="light"] .kpi-donut-hole {
    background: #fff;
}

html[data-theme="light"] .stat-card:hover {
    background: #fff;
    border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
    box-shadow: var(--shadow-elevated);
}

html[data-theme="light"] .btn:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

html[data-theme="light"] .btn-primary {
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

html[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

html[data-theme="light"] .app-header-btn {
    background: #fff;
    border-color: var(--border);
    color: var(--text2);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .app-header-btn:hover {
    background: var(--bg3);
    color: var(--text);
    border-color: var(--border2);
}

html[data-theme="light"] .app-header-btn.is-active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--blue);
}

html[data-theme="light"] .tv-sites-table th {
    color: var(--text3);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .tv-sites-table td {
    border-top-color: var(--border);
    background: #fff;
}

html[data-theme="light"] .tv-sites-table tbody tr:nth-child(even) td {
    background: #fafbfd;
}

html[data-theme="light"] .tv-sites-table tr.site-row-clickable:hover td {
    background: #eef4ff;
}

html[data-theme="light"] .tv-metric {
    color: var(--text);
}

html[data-theme="light"] .tv-check-meta,
html[data-theme="light"] .domain-watch-label {
    color: var(--text2);
}

html[data-theme="light"] .domain-watch-bar {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .bg-batch-progress {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .bg-batch-ctrl {
    background: #fff;
}

html[data-theme="light"] .logo-mark {
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

html[data-theme="light"] .ui-section-title {
    color: #475569;
}

html[data-theme="light"] ::selection {
    background: rgba(37, 99, 235, 0.22);
    color: var(--text);
}

html[data-theme="light"] .site-domain-link,
html[data-theme="light"] .site-domain-link:hover,
html[data-theme="light"] .site-row-clickable:hover .site-domain-link {
    color: #0f172a;
}

html[data-theme="light"] .site-domain-link:hover,
html[data-theme="light"] .site-row-clickable:hover .site-domain-link {
    color: #1d4ed8;
}

html[data-theme="light"] .api-badge-off {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

html[data-theme="light"] .api-badge-ok {
    background: #dcfce7;
    color: #166534;
}

html[data-theme="light"] .api-badge-err {
    background: #fee2e2;
    color: #991b1b;
}

html[data-theme="light"] .cell-row .lbl {
    color: #475569;
}

html[data-theme="light"] .cell-row .val {
    color: #0f172a;
}

html[data-theme="light"] .cell-row .val.yes {
    color: #15803d;
}

html[data-theme="light"] .cell-row .val.no {
    color: #334155;
}

html[data-theme="light"] .cell-row .val.unknown,
html[data-theme="light"] .cell-row .val.sent {
    color: #b45309;
}

html[data-theme="light"] .url-link {
    color: #0f172a;
}

html[data-theme="light"] .url-link:hover {
    color: #1d4ed8;
}

html[data-theme="light"] tbody td {
    border-bottom-color: #e2e8f0;
    color: var(--text);
}

html[data-theme="light"] .site-row-clickable:hover td {
    background: #eef4ff;
}

html[data-theme="light"] .site-status-ok {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

html[data-theme="light"] .site-status-warn {
    color: #92400e;
    background: #ffedd5;
    border-color: #fdba74;
}

html[data-theme="light"] .site-status-err {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

html[data-theme="light"] .quota-tone-ok .quota-metric-num {
    color: #15803d;
}

html[data-theme="light"] .quota-tone-warn .quota-metric-num {
    color: #b45309;
}

html[data-theme="light"] .quota-tone-danger .quota-metric-num {
    color: #b91c1c;
}

html[data-theme="light"] .tv-site-tools a,
html[data-theme="light"] .overview-actions .btn {
    color: #334155;
    border-color: #cbd5e1;
    background: #fff;
}

html[data-theme="light"] .app-nav-badge {
    color: #0f172a;
    background: #fff;
    border-color: #cbd5e1;
    font-weight: 700;
}

html[data-theme="light"] .app-nav-link.is-active .app-nav-badge {
    color: #1d4ed8;
    background: #fff;
    border-color: transparent;
}

html[data-theme="light"] .filter-bar {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] #filterSelect,
html[data-theme="light"] #perPageSelect {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="light"] .urls-table-wrap {
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow-elevated);
}

html[data-theme="light"] .urls-data-table thead th {
    background: #f8fafc;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] .urls-data-table tbody td {
    background: #fff;
    border-bottom-color: #eef2f7;
}

html[data-theme="light"] .urls-data-table tbody tr:nth-child(even) td {
    background: #fafbfd;
}

html[data-theme="light"] .urls-data-table tbody tr:hover td {
    background: #eef4ff;
}

html[data-theme="light"] .urls-data-table .row-actions .btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
    box-shadow: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    justify-content: center;
}

html[data-theme="light"] .urls-data-table .row-actions .btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: none;
    box-shadow: none;
}

html[data-theme="light"] .urls-data-table .row-actions .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
}

html[data-theme="light"] .count-label strong {
    font-weight: 600;
    color: #0f172a;
}

html[data-theme="light"] .site-command-bar {
    align-items: center;
}

.seo-summary-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.seo-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.seo-stat {
    font-size: 13px;
    color: var(--text2);
}

.seo-stat strong {
    color: var(--text);
    font-weight: 600;
}

.seo-issue-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seo-empty-scan .empty-state {
    padding: 36px 20px;
    text-align: center;
}

.seo-empty-scan .page-lead {
    max-width: 420px;
    margin: 8px auto 16px;
}

.seo-table-toolbar {
    margin-top: 0;
    margin-bottom: 10px;
}

.seo-audit-table {
    min-width: 860px;
    table-layout: fixed;
}

.seo-audit-table .seo-col-url {
    width: 34%;
}

.seo-audit-table .seo-col-idx {
    width: 52px;
    text-align: center;
    white-space: nowrap;
}

.seo-audit-table .seo-col-idx .val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    font-size: 12px;
    font-weight: 600;
}

.seo-audit-table .seo-col-idx .val.yes {
    color: #3fb950;
}

.seo-audit-table .seo-col-idx .val.no {
    color: var(--text3);
}

.seo-audit-table .seo-col-issues .val.yes {
    color: #3fb950;
    font-size: 12px;
    font-weight: 600;
}

html[data-theme="light"] .seo-audit-table .seo-col-idx .val.yes,
html[data-theme="light"] .seo-audit-table .seo-col-issues .val.yes {
    color: #15803d;
}

.seo-audit-table .seo-col-http {
    width: 64px;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.seo-audit-table .seo-col-title {
    width: 28%;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text2);
    font-size: 13px;
}

.seo-audit-table .seo-col-issues {
    width: 22%;
}

.seo-audit-table .seo-col-date {
    width: 96px;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text3);
    font-variant-numeric: tabular-nums;
}

.seo-audit-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

.seo-audit-row {
    cursor: pointer;
}

.seo-audit-row.is-open td {
    background: color-mix(in srgb, var(--blue) 8%, var(--bg2));
}

.seo-audit-table .url-cell {
    width: 34%;
    max-width: 0;
}

.seo-muted {
    font-size: 12px;
    color: var(--text3);
}

.seo-issue-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.seo-audit-table .reason-chip {
    font-size: 11px;
    padding: 2px 8px;
    white-space: nowrap;
}

.seo-audit-detail td {
    background: var(--bg3) !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--border);
}

.seo-detail-panel {
    padding: 14px 16px 16px;
}

.seo-detail-url {
    margin-bottom: 12px;
    font-size: 12px;
    word-break: break-all;
}

.seo-detail-url a {
    color: var(--blue);
}

.seo-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 14px;
    font-size: 13px;
    color: var(--text);
}

.seo-detail-issues {
    margin-top: 12px;
}

.seo-detail-issues .seo-issue-list {
    margin-top: 6px;
}

.page-header-actions .btn .chip-count {
    margin-left: 6px;
}

html[data-theme="light"] .seo-audit-detail td {
    background: #f8fafc !important;
}

html[data-theme="light"] .seo-audit-row.is-open td {
    background: #eef4ff;
}

.seo-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.seo-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.seo-tab:hover {
    color: var(--text);
}

.seo-tab.is-active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.seo-dash-top {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.seo-history-card {
    padding: 14px 16px 10px !important;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    min-width: 0;
    overflow: hidden;
}

.seo-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.seo-history-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.seo-history-chart-wrap {
    position: relative;
    flex: 1;
    min-height: 140px;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.seo-history-chart-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

.seo-history-hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--text3);
}

.seo-delta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    white-space: nowrap;
}

.seo-delta.is-up { color: #ef4444; }
.seo-delta.is-down { color: #16a34a; }

.seo-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.seo-kpi-card {
    padding: 12px 14px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
}

.seo-kpi-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.seo-kpi-num {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1;
}

.seo-kpi-bar {
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 80%, transparent);
    overflow: hidden;
}

.seo-kpi-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #3b82f6;
}

.seo-kpi-ok .seo-kpi-bar i { background: #22c55e; }
.seo-kpi-warn .seo-kpi-bar i { background: #f59e0b; }
.seo-kpi-err .seo-kpi-bar i { background: #ef4444; }
.seo-kpi-muted .seo-kpi-bar i { background: #94a3b8; }
.seo-kpi-blue .seo-kpi-bar i { background: #3b82f6; }

.seo-kpi-card .seo-kpi-sub {
    margin: 0;
    font-size: 11px;
    color: var(--text3);
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .seo-dash-top {
        grid-template-columns: 1fr;
    }
    .seo-kpi-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .seo-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.seo-donut-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 16px !important;
}

.seo-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        #ef4444 0deg var(--deg-err, 0deg),
        #f59e0b var(--deg-err, 0deg) var(--deg-warn, 0deg),
        #22c55e var(--deg-warn, 0deg) 360deg
    );
    display: grid;
    place-items: center;
    position: relative;
}

.seo-donut-hole {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
}

.seo-donut-hole strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.seo-donut-hole span {
    font-size: 11px;
    color: var(--text3);
}

.seo-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 12px;
    color: var(--text2);
}

.seo-leg {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-leg span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.seo-leg-err span { background: #ef4444; }
.seo-leg-warn span { background: #f59e0b; }
.seo-leg-ok span { background: #22c55e; }

.seo-leg strong {
    margin-left: auto;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.seo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.seo-kpi {
    padding: 14px 14px 12px !important;
    min-width: 0;
}

.seo-kpi-label {
    font-size: 11px;
    color: var(--text3);
    margin-bottom: 6px;
}

.seo-kpi-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.seo-kpi-sub {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text3);
}

.seo-toolbox {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    padding: 0 !important;
    overflow: hidden;
}

.seo-cat-nav {
    position: sticky;
    top: 12px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg3) 55%, var(--surface));
    align-self: stretch;
}

.seo-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text2);
    font-size: 13px;
}

.seo-cat-item:hover {
    background: var(--bg3);
    color: var(--text);
}

.seo-cat-item.is-active {
    background: color-mix(in srgb, var(--blue) 14%, var(--bg2));
    color: var(--text);
    font-weight: 600;
}

.seo-cat-name {
    min-width: 0;
    flex: 1;
}

.seo-cat-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.seo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.seo-badge-err {
    background: #ef4444;
    color: #fff;
}

.seo-badge-warn {
    background: #f59e0b;
    color: #fff;
}

.seo-badge-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.seo-check-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.seo-check-row {
    position: relative;
    z-index: 1;
}

.seo-check-row:hover,
.seo-check-row:focus-within {
    z-index: 5;
}

.seo-cat-block {
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.seo-cat-block + .seo-cat-block {
    border-top: 1px solid var(--border);
}

.seo-cat-block.is-focus {
    box-shadow: none;
}

.seo-cat-block.is-focus .seo-cat-head {
    background: color-mix(in srgb, var(--blue) 14%, var(--bg2));
}

.seo-cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--blue) 8%, var(--bg2));
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.seo-cat-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.seo-cat-url-lbl {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
}

.seo-check-rows {
    display: flex;
    flex-direction: column;
}

.seo-check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px 56px;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.seo-check-row:last-child {
    border-bottom: none;
}

.seo-check-error {
    background: rgba(239, 68, 68, 0.08);
}

.seo-check-warning {
    background: rgba(245, 158, 11, 0.08);
}

.seo-check-ok {
    background: transparent;
}

.seo-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text);
}

.seo-check-status {
    display: flex;
    justify-content: center;
}

.seo-check-count {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.seo-check-count-wrap {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    min-width: 2.5rem;
}

.seo-check-num {
    color: var(--blue);
    text-decoration: none;
    font-weight: 700;
}

.seo-check-num.is-zero { color: var(--text2); }

a.seo-check-num:hover { text-decoration: underline; }

.seo-check-delta {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.seo-check-delta.is-down { color: #16a34a; }
.seo-check-delta.is-up { color: #ef4444; }

.seo-check-count a {
    color: var(--blue);
    text-decoration: none;
}

.seo-check-count a:hover {
    text-decoration: underline;
}

.seo-kpi-card.is-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.seo-kpi-card.is-link:hover {
    border-color: color-mix(in srgb, var(--blue) 40%, var(--border));
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.seo-ico-ok,
.seo-ico-err,
.seo-ico-warn,
.seo-ico-pending {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.seo-ico-ok {
    background: #22c55e;
    color: #fff;
}

.seo-ico-err {
    background: #ef4444;
    color: #fff;
}

.seo-ico-warn {
    background: #f59e0b;
    color: #fff;
}

.seo-ico-pending {
    background: var(--bg3);
    color: var(--text3);
}

@media (max-width: 1100px) {
    .seo-dash-top {
        grid-template-columns: 1fr;
    }
    .seo-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .seo-toolbox {
        grid-template-columns: 1fr;
    }
    .seo-cat-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 720px) {
    .seo-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .seo-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .seo-donut-card {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        padding: 14px !important;
    }
    .seo-donut {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }
    .seo-donut-hole {
        width: 56px;
        height: 56px;
    }
    .seo-donut-hole strong {
        font-size: 16px;
    }
    .seo-donut-legend {
        flex: 1;
        min-width: 0;
    }
    .seo-history-card {
        min-height: 180px;
        padding: 12px !important;
    }
    .seo-history-head {
        flex-wrap: wrap;
    }
    .seo-history-chart-wrap {
        min-height: 120px;
    }
    .seo-check-row {
        grid-template-columns: minmax(0, 1fr) 28px 44px;
        padding: 10px 12px;
        gap: 6px;
    }
    .seo-cat-head {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    .seo-command-sub {
        margin: -4px 0 10px;
        font-size: 12px;
        line-height: 1.35;
    }
}

@media (max-width: 480px) {
    .seo-kpi-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .seo-kpi-card {
        min-height: 84px;
        padding: 10px 12px !important;
    }
    .seo-kpi-num {
        font-size: 20px;
    }
    .seo-tabs {
        gap: 0;
        margin-bottom: 12px;
    }
    .seo-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
    }
}

html[data-theme="light"] .seo-check-error {
    background: #fef2f2;
}

html[data-theme="light"] .seo-check-warning {
    background: #fffbeb;
}

html[data-theme="light"] .seo-cat-head {
    background: #eef4ff;
}

html[data-theme="light"] .seo-donut-hole {
    background: #fff;
}

.seo-command-sub {
    margin: -8px 0 14px;
    font-size: 13px;
    color: var(--text3);
}

a.seo-cmd-index-btn {
    text-decoration: none;
}

.seo-check-title {
    min-width: 0;
}

.tip {
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    line-height: 1;
    vertical-align: middle;
}

.tip:hover,
.tip:focus {
    color: var(--text);
    border-color: var(--blue);
    outline: none;
}

.app-tip-bubble {
    position: fixed;
    z-index: 10050;
    max-width: min(360px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    white-space: pre-line;
    text-align: left;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
}

.app-tip-bubble.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html[data-theme="light"] .app-tip-bubble {
    background: #0f172a;
    color: #f8fafc;
}

.seo-badge-ok {
    min-width: 22px;
    font-size: 12px;
}

.label-with-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.idx-command-bar {
    margin-bottom: 12px;
}

.idx-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg2);
}

.idx-empty-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--blue) 12%, var(--bg3));
    color: var(--blue);
    flex-shrink: 0;
}

.idx-empty-ico .ico {
    width: 22px;
    height: 22px;
}

.idx-empty-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.idx-empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.idx-empty-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text2);
}

.empty-state.empty-state-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 36px 22px 32px;
    text-align: center;
}

.empty-state.empty-state-hero > .ico-xl {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--blue) 12%, var(--bg3));
    color: var(--blue);
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-state.empty-state-hero .empty-state-msg {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.empty-state-lead {
    margin: 0 !important;
    font-size: 13px;
    color: var(--text2);
    max-width: 460px;
    line-height: 1.5;
}

.empty-state-lead strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.empty-state-cta {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.empty-state-cta .ico {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.idx-board {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.idx-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr);
    gap: 12px;
    min-height: 0;
    align-items: stretch;
    border-bottom: none;
}

.idx-metric {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
}

.idx-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.idx-metric-eng {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text3);
}

.idx-metric-eng-g { color: #2563eb; }
.idx-metric-eng-y { color: #d97706; }

.idx-metric-delta {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text3);
}

.idx-metric-delta.is-up { color: #16a34a; }
.idx-metric-delta.is-down { color: #dc2626; }

.idx-metric-pct {
    font-size: 36px;
    font-weight: 750;
    letter-spacing: -0.05em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.idx-metric-pct small {
    font-size: 18px;
    font-weight: 650;
    margin-left: 2px;
    color: var(--text3);
}

.idx-metric-bar {
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 70%, transparent);
    overflow: hidden;
}

.idx-metric-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #3b82f6;
}

.idx-metric-bar-y i { background: #f59e0b; }

.idx-metric-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text2);
    font-variant-numeric: tabular-nums;
}

.idx-metric-foot .is-bad { color: #dc2626; font-weight: 600; }

.idx-hero-chart {
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 240px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    box-shadow: var(--shadow-soft);
}

.idx-hero-chart-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 8px;
}

.idx-history-chart-wrap {
    position: relative;
    flex: 1;
    min-height: 160px;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.idx-history-chart-wrap canvas {
    width: 100% !important;
    max-width: 100%;
    height: 100% !important;
}

.idx-toolbar {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg3) 55%, var(--bg2));
}

.idx-toolbar-title {
    flex: 1 1 180px;
    min-width: 0;
}

.idx-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.idx-lead {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--text3);
}

.idx-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.idx-period-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.idx-period-field input[type="date"],
.idx-period-field .flatpickr-alt-input,
.flatpickr-alt-input {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg3);
    color: var(--text);
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1.3;
    color-scheme: inherit;
    box-sizing: border-box;
    width: 148px;
    max-width: 100%;
    cursor: pointer;
}

.idx-period-field input[type="date"]::-webkit-datetime-edit,
.idx-period-field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.idx-period-field input[type="date"]::-webkit-datetime-edit-text,
.idx-period-field input[type="date"]::-webkit-datetime-edit-month-field,
.idx-period-field input[type="date"]::-webkit-datetime-edit-day-field,
.idx-period-field input[type="date"]::-webkit-datetime-edit-year-field {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    padding: 0;
}

.flatpickr-alt-input:focus,
.flatpickr-alt-input.active {
    outline: none;
    border-color: color-mix(in srgb, var(--blue) 55%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

.flatpickr-calendar {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-elevated, 0 12px 32px rgba(15, 23, 42, 0.18)) !important;
    font-family: inherit !important;
    width: 252px !important;
    padding: 4px 4px 6px !important;
}

.flatpickr-calendar:before,
.flatpickr-calendar:after {
    display: none !important;
}

.flatpickr-months {
    padding: 2px 2px 4px !important;
    align-items: center;
    height: 32px !important;
}

.flatpickr-months .flatpickr-month {
    height: 28px !important;
    color: var(--text) !important;
    fill: var(--text) !important;
}

.flatpickr-current-month {
    font-size: 13px !important;
    font-weight: 650 !important;
    padding-top: 4px !important;
    height: 28px !important;
    color: var(--text) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 650 !important;
    font-size: 13px !important;
    color: var(--text) !important;
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: var(--text2) !important;
    padding: 4px !important;
    height: 28px !important;
    border-radius: 6px;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: var(--bg3);
    fill: var(--text) !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--text) !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 12px !important;
    height: 12px !important;
}

.flatpickr-weekdays {
    height: 22px !important;
}

span.flatpickr-weekday {
    color: var(--text3) !important;
    font-size: 10px !important;
    font-weight: 650 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.flatpickr-days {
    width: 100% !important;
}

.dayContainer {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    min-height: 192px !important;
}

.flatpickr-day {
    color: var(--text) !important;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    font-weight: 550 !important;
    font-size: 12.5px !important;
    max-width: 32px !important;
    height: 32px !important;
    line-height: 30px !important;
    margin: 0 !important;
    opacity: 1 !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: var(--bg3) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
    opacity: 1 !important;
}

.flatpickr-day.today {
    border-color: #3b82f6 !important;
    color: var(--text) !important;
    font-weight: 700 !important;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
    background: var(--bg3) !important;
    color: var(--text) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.flatpickr-day.inRange,
.flatpickr-day.inRange:hover {
    background: color-mix(in srgb, #3b82f6 16%, var(--bg3)) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--text) !important;
    opacity: 1 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: var(--text3) !important;
    background: transparent !important;
    border-color: transparent !important;
    opacity: 0.35 !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--text3) !important;
    opacity: 0.55 !important;
}

.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day.prevMonthDay:focus,
.flatpickr-day.nextMonthDay:focus {
    background: var(--bg3) !important;
    border-color: var(--border) !important;
    color: var(--text2) !important;
    opacity: 1 !important;
}

.numInputWrapper span {
    border: 0 !important;
}

.numInputWrapper:hover {
    background: var(--bg3);
}

.idx-period-presets {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.idx-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text2);
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.idx-sort-btn {
    display: none;
}

.idx-col-sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}

.idx-col-sort:hover {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
    background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.idx-col-sort.is-active {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
    background: color-mix(in srgb, var(--blue) 12%, transparent);
}

.idx-day-sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}

.idx-day-sort:hover {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
    background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.idx-day-sort.is-active {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
    background: color-mix(in srgb, var(--blue) 12%, transparent);
}

.idx-day-sort-ico {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.75;
    line-height: 1;
}

.idx-day-sort.is-active .idx-day-sort-ico {
    opacity: 1;
}

.urls-col-sort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    padding: 2px 4px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.urls-col-sort:hover,
.urls-col-sort.is-active {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
    background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.urls-col-sort-ico {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.7;
}

.ops-retention-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
}

.ops-retention-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    text-transform: none;
    letter-spacing: 0;
    font-size: inherit;
    color: inherit;
    cursor: default;
}

.ops-retention-grid > .ops-retention-field:nth-child(1),
.ops-retention-grid > .ops-retention-field:nth-child(2) {
    border-top: 0;
}

.ops-retention-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    text-transform: none;
    letter-spacing: -0.01em;
}

.ops-retention-field input {
    width: 96px;
    min-width: 96px;
    margin: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

@media (max-width: 860px) {
    .ops-retention-grid {
        grid-template-columns: 1fr;
    }

    .ops-retention-grid > .ops-retention-field:nth-child(2) {
        border-top: 1px solid var(--border);
    }
}

.idx-preset:hover {
    color: var(--text);
    border-color: var(--border2);
}

.idx-preset.is-active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.idx-period-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text2);
}

.idx-matrix {
    min-width: 720px;
}

.idx-matrix.urls-data-table tbody td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.idx-matrix .url-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    box-shadow: 1px 0 0 color-mix(in srgb, var(--border) 80%, transparent);
    max-width: none;
    min-width: 240px;
    width: clamp(240px, 30vw, 380px);
}

.idx-matrix thead th {
    text-align: center;
}

.idx-matrix thead th.url-cell {
    text-align: left;
    z-index: 3;
}

.idx-matrix .idx-daycell {
    min-width: 84px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.idx-matrix .idx-eng-sep {
    border-left: 1px solid var(--border);
}

.idx-cov {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text3);
    text-transform: none;
    letter-spacing: 0;
}

.idx-cov b {
    color: #dc2626;
    font-weight: 700;
}

.idx-matrix .idx-status {
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.idx-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    vertical-align: middle;
}

.idx-mark svg {
    width: 13px;
    height: 13px;
    display: block;
}

.idx-mark-ok {
    color: #16a34a;
    background: color-mix(in srgb, #16a34a 12%, transparent);
}

.idx-mark-no {
    color: #dc2626;
    background: color-mix(in srgb, #dc2626 12%, transparent);
}

.idx-matrix .idx-status .val {
    font-weight: 600;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.idx-matrix .idx-status .val.yes {
    color: #3fb950;
}

.idx-matrix .idx-status .val.no {
    color: var(--text2);
}

.idx-matrix .idx-status .val.unknown {
    color: var(--text3);
}

.idx-matrix tbody tr:hover .url-cell {
    background: color-mix(in srgb, var(--blue) 6%, var(--bg2));
}

html[data-theme="light"] .idx-board {
    background: transparent;
    box-shadow: none;
}

html[data-theme="light"] .idx-period-field input[type="date"],
html[data-theme="light"] .idx-period-field .flatpickr-alt-input,
html[data-theme="light"] .flatpickr-alt-input,
html[data-theme="light"] .idx-preset {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="light"] .flatpickr-calendar {
    background: #fff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14) !important;
}

html[data-theme="light"] .flatpickr-day:hover,
html[data-theme="light"] .flatpickr-day:focus {
    background: #f1f5f9 !important;
}

html[data-theme="light"] .idx-preset.is-active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

html[data-theme="light"] .idx-matrix .url-cell {
    background: #fff;
}

html[data-theme="light"] .idx-matrix tbody tr:nth-child(even) .url-cell {
    background: #fafbfd;
}

html[data-theme="light"] .idx-matrix tbody tr:hover .url-cell {
    background: #eef4ff;
}

html[data-theme="light"] .idx-matrix .idx-status .val.yes {
    color: #15803d;
}

html[data-theme="light"] .idx-matrix .idx-status .val.no {
    color: #64748b;
}

html[data-theme="light"] .idx-mark-ok {
    color: #15803d;
    background: color-mix(in srgb, #16a34a 14%, #fff);
}

html[data-theme="light"] .idx-mark-no {
    color: #dc2626;
    background: color-mix(in srgb, #dc2626 12%, #fff);
}

@media (max-width: 960px) {
    .idx-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .idx-hero-chart {
        grid-column: auto;
        min-height: 200px;
    }

    .kpi-engines-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .kpi-engines-grid {
        grid-template-columns: 1fr;
    }

    .idx-metric {
        padding: 14px;
    }

    .idx-metric-pct {
        font-size: 30px;
    }

    .idx-matrix .url-cell {
        min-width: 200px;
    }
}

.quota-metric-toggle {
    flex-shrink: 0;
}

.idx-filter-bar {
    align-items: flex-end;
    gap: 12px;
}

.idx-filter-period {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.idx-filter-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ops-panel {
    padding: 16px;
}

.ops-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.ops-card:last-child {
    margin-bottom: 0;
}

.ops-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.ops-tabs::-webkit-scrollbar {
    display: none;
}

.ops-tabs .tab {
    flex: 0 0 auto;
    white-space: nowrap;
}

.ops-details {
    margin-bottom: 0;
}

.ops-field input {
    text-align: left;
}

.ops-bot-menu {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 960px) {
    .urls-table-wrap,
    .table-wrap,
    .backup-table-wrap {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        overflow-y: clip;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        max-width: 100%;
    }

    .urls-data-table .url-cell,
    .idx-matrix .url-cell,
    .idx-matrix thead th.url-cell {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        box-shadow: none !important;
        max-width: none;
        width: auto;
        min-width: 220px;
    }

    .idx-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .idx-filter-dates {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .idx-filter-dates .btn {
        grid-column: 1 / -1;
        min-height: 44px;
        justify-content: center;
    }

    .idx-period-field {
        width: 100%;
    }

    .idx-period-field .flatpickr-alt-input,
    .idx-period-field input {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .idx-filter-bar .filter-bar-aside {
        margin-left: 0;
        justify-content: space-between;
        gap: 8px;
    }

    .idx-period-presets {
        flex: 1;
        display: flex;
        gap: 6px;
    }

    .idx-preset {
        flex: 1;
        justify-content: center;
        min-height: 40px;
        text-align: center;
    }

    .ops-panel {
        padding: 12px;
    }

    .ops-tabs {
        margin: 0 -4px 14px;
        padding: 4px;
    }

    .ops-actions .btn {
        flex: 1 1 calc(50% - 4px);
        min-height: 44px;
        justify-content: center;
    }

    .sshell {
        grid-template-columns: 1fr;
        max-width: none;
        min-height: 0;
    }

    .sshell-nav {
        flex-direction: row;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 8px;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sshell-nav::-webkit-scrollbar {
        display: none;
    }

    .sshell-nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sshell .tab-pane {
        padding: 14px 14px 6px;
    }

    .sshell-foot {
        flex-direction: column-reverse;
        padding: 12px 14px;
    }

    .sshell-foot .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .ss-danger {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .ss-row-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .page-form-actions {
        flex-direction: column-reverse;
    }

    .page-form-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}
 

/* —— Обратные ссылки —— */
.bl-stats-section,
.bl-sources-section,
.bl-charts-section,
.bl-table-section {
    margin-bottom: 18px;
}
.bl-sources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.bl-source-card {
    padding: 16px 18px;
    gap: 14px;
}
.bl-source-card .quota-card-body {
    gap: 12px;
}
.bl-source-card .quota-card-title {
    font-size: 12px;
    letter-spacing: 0.04em;
}
.bl-source-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.bl-source-metric-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg3) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
}
.bl-source-metric-label {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.bl-source-metric-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bl-source-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.bl-source-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}
.bl-source-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text3);
    line-height: 1.45;
}
.bl-source-hint-inline {
    flex: 1;
    min-width: 0;
    text-align: right;
}
.bl-source-card .btn .ico {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bl-hint {
    margin: 0 !important;
    font-size: 12px !important;
    color: var(--text3) !important;
    line-height: 1.45;
}
@media (max-width: 900px) {
    .bl-sources-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.bl-howto {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 10px);
    padding: 10px 12px;
    background: color-mix(in srgb, var(--bg3) 70%, transparent);
}
.bl-howto summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    list-style: none;
}
.bl-howto summary::-webkit-details-marker { display: none; }
.bl-howto ol {
    margin: 10px 0 6px;
    padding-left: 1.2rem;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text2);
}
.bl-howto li { margin: 4px 0; }
.bl-upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 12px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg3) 62%, transparent);
}
.bl-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bl-upload-form select {
    width: 100%;
}
.bl-upload-form input[type="file"] {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg3);
    color: var(--text);
    font: inherit;
}
.bl-upload-form .btn {
    margin-top: 2px;
}
.bl-stats-grid {
    margin-bottom: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bl-stats-grid .stat-card {
    border-radius: 12px;
}
.bl-charts-section {
    margin-top: 2px;
}
.bl-charts-section .charts-grid {
    margin-bottom: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.bl-charts-section .chart-panel {
    border-radius: 12px;
}
.bl-table-section .seo-tabs {
    margin-bottom: 10px;
}
.bl-qbadge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.bl-qbadge-good {
    background: color-mix(in srgb, #22c55e 16%, transparent);
    color: #16a34a;
}
.bl-qbadge-ok {
    background: color-mix(in srgb, var(--blue) 14%, transparent);
    color: var(--blue);
}
.bl-qbadge-weak {
    background: color-mix(in srgb, #f59e0b 16%, transparent);
    color: #d97706;
}
.bl-qbadge-spam {
    background: color-mix(in srgb, #ef4444 14%, transparent);
    color: #dc2626;
}
.bl-src-cell { white-space: nowrap; }
.bl-src {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-right: 4px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.bl-src-y {
    background: color-mix(in srgb, #a855f7 16%, transparent);
    color: #7c3aed;
}
.bl-src-g {
    background: color-mix(in srgb, var(--blue) 14%, transparent);
    color: var(--blue);
}
.bl-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.bl-tag-new {
    background: color-mix(in srgb, #22c55e 16%, transparent);
    color: #16a34a;
}
.bl-tag-lost {
    background: color-mix(in srgb, #ef4444 14%, transparent);
    color: #dc2626;
}
.bl-why {
    max-width: 280px;
    font-size: 12px;
    color: var(--text3);
}
.bl-url {
    word-break: break-all;
    max-width: 360px;
}
.bl-domains-table {
    min-width: 920px;
}
.bl-diff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.bl-diff-grid > .panel { margin-bottom: 0; }
.bl-count-up { color: #16a34a; font-weight: 700; }
.bl-count-down { color: #dc2626; font-weight: 700; }
.bl-diff-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text2);
}
html[data-theme="light"] .bl-source-card {
    background: #fff;
}
html[data-theme="dark"] .bl-qbadge-good,
html:not([data-theme="light"]) .bl-qbadge-good { color: #4ade80; }
html[data-theme="dark"] .bl-qbadge-weak,
html:not([data-theme="light"]) .bl-qbadge-weak { color: #fbbf24; }
html[data-theme="dark"] .bl-qbadge-spam,
html:not([data-theme="light"]) .bl-qbadge-spam { color: #f87171; }
html[data-theme="dark"] .bl-tag-new,
html:not([data-theme="light"]) .bl-tag-new { color: #4ade80; }
html[data-theme="dark"] .bl-tag-lost,
html:not([data-theme="light"]) .bl-tag-lost { color: #f87171; }
html[data-theme="dark"] .bl-count-up,
html:not([data-theme="light"]) .bl-count-up { color: #4ade80; }
html[data-theme="dark"] .bl-count-down,
html:not([data-theme="light"]) .bl-count-down { color: #f87171; }
@media (max-width: 1100px) {
    .bl-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-charts-section .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .bl-diff-grid {
        grid-template-columns: 1fr;
    }
    .bl-source-metrics {
        grid-template-columns: 1fr;
    }
}

/* Semantic (v15.76) — унифицированная секция, sidebar групп, URL-like таблица, модалка */
.semantic-command-sub { color: var(--text2); font-size: 13px; margin: 8px 0 14px; }

.sem-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}
.sem-groups {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
    max-height: calc(100vh - 220px);
    min-height: 380px;
    overflow: hidden;
    border-radius: 14px;
}
.sem-main > .panel,
.sem-main > .sem-filter-panel {
    border-radius: 14px;
}
.sem-groups-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sem-groups-search { position: relative; display: block; }
.sem-groups-search-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    z-index: 1;
}
.sem-groups-search input[type="search"] {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 12.5px;
    box-sizing: border-box;
    margin-bottom: 0;
}
.sem-groups-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 0; }
.sem-group-item {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: start;
    gap: 10px;
    padding: 8px 14px;
    min-height: 36px;
    height: auto;
    color: var(--text2);
    text-decoration: none;
    border-left: 2px solid transparent;
    font-size: 13px;
    line-height: 1.3;
    box-sizing: border-box;
}
.sem-groups-list > .sem-group-item:not(a) {
    grid-template-columns: 22px 1fr;
    gap: 6px;
    padding-right: 10px;
}
.sem-group-item:hover { background: color-mix(in srgb, var(--accent, #3b82f6) 6%, transparent); color: var(--text); }
.sem-group-item.is-active { background: color-mix(in srgb, var(--blue) 10%, transparent); border-left-color: var(--blue); color: var(--text); font-weight: 650; }
.sem-group-item.is-hidden { display: none; }
.sem-group-all { font-weight: 650; }
.sem-group-common { font-weight: 650; }
.sem-group-dupes { border-bottom: 1px dashed var(--border); }
.sem-group-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); }
.sem-dot-ready { background: #22c55e; }
.sem-dot-error { background: #ef4444; }
.sem-dot-collecting { background: #f59e0b; }
.sem-dot-draft { background: var(--text3); }
.sem-dot-common { background: #3b82f6; }
.sem-dot-all { background: #8b5cf6; }
.sem-dot-dupes { background: #f59e0b; }
.sem-group-main {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    height: auto;
}
.sem-group-url-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    flex: 0 0 auto;
}
.sem-group-url-btn .ico {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sem-group-url-btn:hover {
    background: color-mix(in srgb, var(--blue) 12%, transparent);
    color: var(--blue);
}
.sem-group-url-btn.has-url {
    color: #3b82f6;
}
.sem-group-title {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}
.sem-group-count {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text3);
    white-space: nowrap;
    padding-top: 1px;
}
.sem-group-item.is-active .sem-group-count { color: var(--text2); }
.sem-groups-empty { padding: 16px 14px; font-size: 12px; color: var(--text3); text-align: center; line-height: 1.5; }
.sem-groups-foot { padding: 12px 14px; border-top: 1px solid var(--border); }
.sem-groups-foot .btn { width: 100%; justify-content: center; }

.sem-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
}
.sem-table-panel {
    overflow: hidden;
}
.sem-table-panel .table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
}
.sem-queries-table thead th,
.sem-queries-table-compact thead th {
    position: static !important;
    top: auto !important;
}
.sem-ctx { padding: 10px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sem-ctx-info { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.sem-ctx-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg3);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text2);
    max-width: 100%;
    min-width: 0;
}
.sem-ctx-chip b { color: var(--text); font-weight: 650; overflow-wrap: anywhere; word-break: break-word; }
.sem-ctx-chip-title b { font-size: 13px; }
.sem-ctx-chip-muted {
    background: transparent;
    border-color: transparent;
    color: var(--text3);
    font-size: 11.5px;
    padding-left: 4px;
    padding-right: 4px;
}
.sem-ctx-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sem-ctx-actions .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
.sem-ctx-actions .btn .ico { width: 15px; height: 15px; stroke-width: 2; }

.sem-table-panel { padding: 0; overflow: hidden; border-radius: 14px; }
.sem-table-panel .pagination-bar { padding: 12px 14px; margin: 0; border-top: 1px solid var(--border); }

.sem-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.sem-banner .ico { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; margin-top: 2px; }
.sem-banner-warn { background: color-mix(in srgb, #f59e0b 12%, transparent); color: color-mix(in srgb, #f59e0b 60%, var(--text)); border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border)); }
.sem-banner-err { background: color-mix(in srgb, #ef4444 10%, var(--bg2)); color: var(--text); border: 1px solid color-mix(in srgb, #ef4444 35%, var(--border)); }
.sem-banner-err .ico { color: #dc2626; }
.sem-banner-rate {
    background: color-mix(in srgb, #f59e0b 10%, var(--bg2));
    border-color: color-mix(in srgb, #f59e0b 40%, var(--border));
}
.sem-banner-rate .ico { color: #d97706; }
.sem-banner-body { min-width: 0; flex: 1; }
.sem-banner-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}
.sem-banner-text {
    margin: 0;
    color: var(--text2);
    font-size: 13px;
}
.sem-banner-hint {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg3) 80%, transparent);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 12.5px;
    line-height: 1.45;
}
.sem-banner-tech {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text3);
}
.sem-banner-tech summary {
    cursor: pointer;
    user-select: none;
    color: var(--text3);
    font-weight: 550;
}
.sem-banner-tech summary:hover { color: var(--text2); }
.sem-banner-tech code {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, #000 8%, var(--bg3));
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 11.5px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.sem-banner-detail {
    display: block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, #000 12%, transparent);
    font-size: 11.5px;
    white-space: pre-wrap;
    color: var(--text2);
}

.sem-queries-table th.col-num,
.sem-queries-table td.sem-td-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text2); }
.sem-queries-table th.col-verdict,
.sem-queries-table th.col-decision,
.sem-queries-table td.sem-td-verdict,
.sem-queries-table td.sem-td-decision { width: 1%; white-space: nowrap; }
.sem-queries-table td.sem-td-why { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text3); font-size: 12px; }
.sem-queries-table td.sem-td-phrase { color: var(--text); font-size: 13px; }
.sem-queries-table thead th {
    text-transform: none;
    letter-spacing: 0;
    position: static;
}
.sem-queries-table th.col-group,
.sem-queries-table td.sem-td-group {
    width: 18%;
    max-width: none;
    white-space: normal;
}
.sem-td-group {
    vertical-align: middle;
}
.sem-group-link {
    color: var(--blue);
    font-size: 12.5px;
    font-weight: 550;
    line-height: 1.35;
    text-decoration: none;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}
a.sem-group-link:hover {
    color: var(--blue);
    text-decoration: underline;
}
.sem-group-link.is-empty {
    color: var(--text3);
    font-weight: 500;
    text-decoration: none;
}

.sem-verdict {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}
.sem-verdict-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
}
.sem-why-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text3);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;
}
.sem-why-tip:hover {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 40%, var(--border));
}
.sem-verdict-take {
    color: #16a34a;
    background: color-mix(in srgb, #22c55e 16%, transparent);
}
.sem-verdict-maybe {
    color: #d97706;
    background: color-mix(in srgb, #f59e0b 16%, transparent);
}
.sem-verdict-skip {
    color: #dc2626;
    background: color-mix(in srgb, #ef4444 14%, transparent);
}
html[data-theme="dark"] .sem-verdict-take { color: #4ade80; background: color-mix(in srgb, #22c55e 18%, transparent); }
html[data-theme="dark"] .sem-verdict-maybe { color: #fbbf24; background: color-mix(in srgb, #f59e0b 18%, transparent); }
html[data-theme="dark"] .sem-verdict-skip { color: #f87171; background: color-mix(in srgb, #ef4444 16%, transparent); }

.sem-dec-form { margin: 0; display: inline-block; }
.sem-dec-sel {
    min-width: 108px;
    height: 28px;
    padding: 0 8px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.sem-dec-sel.sem-dec-include {
    color: #475569;
    border-color: color-mix(in srgb, #94a3b8 45%, var(--border));
    background: color-mix(in srgb, #94a3b8 14%, var(--bg3));
}
.sem-dec-sel.sem-dec-exclude { color: #dc2626; }
.sem-dec-sel.sem-dec-pending { color: var(--text2); }


.sem-form { display: flex; flex-direction: column; gap: 14px; }
.sem-field { display: flex; flex-direction: column; gap: 6px; }
.sem-field > label {
    font-size: 12.5px;
    font-weight: 650;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text3);
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.sem-field > label .sem-hint { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text3); opacity: .8; }
.sem-field input[type="text"],
.sem-field input[type="url"],
.sem-field textarea,
.sem-field select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    box-sizing: border-box;
}
.sem-field textarea { min-height: 100px; resize: none; overflow: hidden; line-height: 1.45; }
.sem-field textarea.sem-textarea-autosize { min-height: 80px; }
.sem-field textarea.sem-textarea-bulk { min-height: 240px; resize: vertical; overflow: auto; font-size: 12.5px; }
.sem-field input:focus,
.sem-field textarea:focus,
.sem-field select:focus {
    outline: 2px solid color-mix(in srgb, #3b82f6 45%, transparent);
    outline-offset: -1px;
    border-color: #3b82f6;
}
.sem-hint-block { font-size: 11.5px; color: var(--text3); line-height: 1.4; margin: 4px 0 0; }

.sem-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.sem-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
}
.sem-filter-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-height: 52px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    box-sizing: border-box;
}
.sem-filter-perpage {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    height: 34px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    box-sizing: border-box;
}
.sem-perpage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    color: var(--text2);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.sem-perpage-btn:hover { color: var(--text); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.sem-perpage-btn.is-active {
    color: #fff;
    background: var(--blue);
}
.sem-phrase-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
    height: 34px;
}
.sem-phrase-search-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
    z-index: 1;
}
.sem-phrase-search input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    height: 34px;
    min-width: 0;
    margin: 0;
    padding: 0 34px 0 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 12.5px;
    line-height: 34px;
    box-sizing: border-box;
}
.sem-phrase-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    line-height: 20px;
    text-align: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text3);
    background: transparent;
    font-size: 16px;
}
.sem-phrase-search-clear.is-hidden { display: none; }
.sem-phrase-search-clear:hover { color: var(--text); background: var(--bg); }
.sem-phrase-search .btn {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    margin: 0;
    font-size: 12.5px;
    box-sizing: border-box;
}
.sem-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 10px 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text2);
    font-size: 12.5px;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}
.sem-filter-tab:hover {
    background: color-mix(in srgb, var(--blue) 8%, transparent);
    color: var(--text);
}
.sem-filter-tab.is-active {
    background: color-mix(in srgb, var(--blue) 14%, var(--bg3));
    border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
    color: var(--text);
    font-weight: 650;
}
.sem-filter-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    line-height: 1;
    color: var(--text2);
    background: var(--bg3);
    border: 1px solid var(--border);
    box-sizing: border-box;
}
.sem-filter-tab.is-active .sem-filter-tab-count {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}
.sem-filter-tab:hover .sem-filter-tab-count {
    border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
}

@media (max-width: 900px) {
    .sem-filter-tools {
        flex-wrap: wrap;
        height: auto;
        min-height: 0;
    }
    .sem-phrase-search {
        flex: 1 1 100%;
        max-width: none;
    }
    .sem-filter-perpage {
        margin-left: auto;
    }
}

.sem-url-pop {
    position: fixed;
    z-index: 1200;
    width: 320px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg2, #fff);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}
.sem-url-pop.hidden { display: none; }
.sem-url-pop-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}
.sem-url-pop-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--blue);
    text-decoration: none;
}
.sem-url-pop-ext.hidden { display: none; }
.sem-url-pop-ext .ico {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sem-url-pop-ext:hover { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.sem-url-pop-input {
    width: 100%;
    height: 34px;
    margin: 0 0 10px;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--blue) 45%, var(--border));
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    box-sizing: border-box;
}
.sem-url-pop-input:focus {
    outline: none;
    border-bottom-color: var(--blue);
}
.sem-url-pop-foot {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.sem-export-modal { max-width: 560px; }
.sem-export-seg {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    height: 34px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg3);
    box-sizing: border-box;
}
.sem-export-seg-item {
    display: inline-flex;
    margin: 0;
    cursor: pointer;
    user-select: none;
}
.sem-export-seg-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.sem-export-seg-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.sem-export-seg-item:hover span {
    color: var(--text);
    background: color-mix(in srgb, #94a3b8 14%, transparent);
}
.sem-export-seg-item input:checked + span {
    background: var(--blue);
    color: #fff;
}
.sem-field > .sem-hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text3);
    line-height: 1.4;
}
.sem-export-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}
.sem-export-col {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text);
    user-select: none;
}
.sem-export-col:hover {
    border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
}
.sem-export-col input { margin: 0; flex: 0 0 auto; }
.sem-export-col.is-locked { opacity: 0.85; cursor: default; }

.bulk-bar {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 10px 14px;
    background: rgba(77, 139, 255, 0.08);
    border: 1px solid rgba(77, 139, 255, 0.3);
    border-radius: 10px;
}
.bulk-bar.is-active { display: flex; }
.bulk-bar #semBulkCount,
.bulk-bar strong { color: var(--blue); }

.sem-bulk-bar .btn.btn-primary { color: #fff; }
.sem-bulk-bar {
    display: none;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--blue) 8%, var(--bg3));
    border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--border));
}
.sem-bulk-bar.is-active {
    display: flex;
    position: sticky;
    top: 8px;
    z-index: 45;
    margin-bottom: 10px;
    background: color-mix(in srgb, var(--blue) 10%, var(--bg2));
    border: 1px solid color-mix(in srgb, var(--blue) 32%, var(--border));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
}
html[data-theme="light"] .sem-bulk-bar.is-active {
    background: color-mix(in srgb, #dbeafe 70%, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}
.sem-bulk-bar .bulk-bar-text {
    font-size: 13px;
    font-weight: 600;
}
.sem-bulk-bar .bulk-bar-meta {
    font-size: 12px;
    color: var(--text3);
    margin-right: auto;
}
.sem-bulk-select-link {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}
.sem-bulk-select-link:hover { color: color-mix(in srgb, var(--blue) 80%, #000); }
.sem-bulk-select-link.is-hidden { display: none; }
.sem-bulk-bar .bulk-bar-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.sem-table-panel { padding: 0; overflow: hidden; border-radius: 14px; }
.sem-table-panel .table-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
}
.sem-table-panel .pagination-bar {
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 0;
}

.sem-queries-table-compact th,
.sem-queries-table-compact td {
    padding: 6px 10px;
    font-size: 12.5px;
    vertical-align: middle;
    line-height: 1.35;
}
.sem-queries-table-compact thead th {
    position: static;
    padding: 8px 10px;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text3);
    font-weight: 700;
    background: color-mix(in srgb, var(--bg3) 60%, transparent);
    border-bottom: 1px solid var(--border);
}
.sem-queries-table-compact tbody tr { transition: background .12s; }
.sem-queries-table-compact tbody tr:hover { background: color-mix(in srgb, var(--blue) 5%, transparent); }
.sem-queries-table-compact .sem-td-phrase { font-size: 12.5px; font-weight: 500; }
.sem-queries-table-compact .sem-td-num { font-size: 12.5px; }
.sem-queries-table-compact .sem-verdict { font-size: 10px; padding: 2px 7px; }
.sem-queries-table-compact .sem-dec-sel { min-width: 96px; height: 26px; font-size: 11.5px; padding: 0 6px; }
.sem-queries-table-compact .sem-td-why { max-width: 240px; font-size: 11.5px; }
.sem-queries-table .col-actions .row-actions .btn,
.sem-queries-table .col-actions .row-actions .btn.btn-icon,
.sem-queries-table .col-actions .row-actions .btn.btn-sm,
html[data-theme="light"] .sem-queries-table .col-actions .row-actions .btn,
html[data-theme="light"] .sem-queries-table .urls-data-table .row-actions .btn,
html[data-theme="light"] .urls-data-table.sem-queries-table .row-actions .btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    padding: 0 !important;
    border-radius: 7px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 26px;
}
.sem-queries-table .col-actions .row-actions .btn .ico,
html[data-theme="light"] .sem-queries-table .col-actions .row-actions .btn .ico,
html[data-theme="light"] .urls-data-table.sem-queries-table .row-actions .btn .ico {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 auto;
}

.sem-hl {
    padding: 0 2px;
    border-radius: 3px;
    background: color-mix(in srgb, #fbbf24 55%, transparent);
    color: inherit;
    font-weight: 650;
}
#semQueriesTableBody.is-loading { opacity: 0.55; pointer-events: none; }

.sem-dec-radios {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    height: 28px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    box-sizing: border-box;
    white-space: nowrap;
}
.sem-dec-radios.is-busy { opacity: 0.55; pointer-events: none; }
.sem-dec-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
}
.sem-dec-radio input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.sem-dec-radio span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: var(--text2);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
    transition: background .12s, color .12s;
}
.sem-dec-radio:hover span {
    color: var(--text);
    background: color-mix(in srgb, #94a3b8 16%, transparent);
}
.sem-dec-radio input:checked + span {
    color: #fff;
}
.sem-dec-include input:checked + span { background: var(--blue); }
.sem-dec-exclude input:checked + span { background: #dc2626; }
.sem-dec-pending input:checked + span { background: #64748b; }

.sem-queries-table .row-actions .btn-danger,
.sem-queries-table .row-actions .btn-danger:hover,
.sem-queries-table tbody tr:hover .row-actions .btn-danger {
    background: linear-gradient(135deg, #d83838, #f85149) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(248, 81, 73, 0.28);
    filter: none;
}

.sem-move-modal { max-width: 440px; }
.sem-move-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 360px;
    overflow: auto;
    margin: 0 0 14px;
}
.sem-move-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg3);
    cursor: pointer;
}
.sem-move-option:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--border)); }
.sem-move-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
    background: color-mix(in srgb, var(--blue) 8%, var(--bg3));
}
.sem-move-option.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}
.sem-move-option input { margin-top: 2px; }
.sem-move-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sem-move-option-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}
.sem-move-option-meta {
    font-size: 11.5px;
    color: var(--text3);
}

.sem-queries-table .urls-col-sort,
.sem-queries-table-compact .urls-col-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.sem-queries-table .urls-col-sort:hover,
.sem-queries-table-compact .urls-col-sort:hover { color: var(--text); }
.sem-queries-table .urls-col-sort.is-active,
.sem-queries-table-compact .urls-col-sort.is-active { color: var(--blue); }
.sem-queries-table .urls-col-sort-ico,
.sem-queries-table-compact .urls-col-sort-ico { font-size: 10px; opacity: 0.55; }
.sem-queries-table .urls-col-sort.is-active .urls-col-sort-ico,
.sem-queries-table-compact .urls-col-sort.is-active .urls-col-sort-ico { opacity: 1; }

.sem-filter-verdict-take { color: #16a34a; }
.sem-filter-verdict-maybe { color: #d97706; }

.sem-filter-tab-take { color: #16a34a; }
.sem-filter-tab-take .sem-filter-tab-count {
    color: #16a34a;
    background: color-mix(in srgb, #22c55e 16%, transparent);
    border-color: color-mix(in srgb, #22c55e 28%, var(--border));
}
.sem-filter-tab-take:hover,
.sem-filter-tab-take.is-active {
    color: #15803d;
    background: color-mix(in srgb, #22c55e 14%, var(--bg3));
    border-color: color-mix(in srgb, #22c55e 40%, var(--border));
}
.sem-filter-tab-take.is-active .sem-filter-tab-count {
    color: #fff;
    background: #16a34a;
    border-color: #16a34a;
}

.sem-filter-tab-maybe { color: #d97706; }
.sem-filter-tab-maybe .sem-filter-tab-count {
    color: #d97706;
    background: color-mix(in srgb, #f59e0b 16%, transparent);
    border-color: color-mix(in srgb, #f59e0b 28%, var(--border));
}
.sem-filter-tab-maybe:hover,
.sem-filter-tab-maybe.is-active {
    color: #b45309;
    background: color-mix(in srgb, #f59e0b 14%, var(--bg3));
    border-color: color-mix(in srgb, #f59e0b 40%, var(--border));
}
.sem-filter-tab-maybe.is-active .sem-filter-tab-count {
    color: #fff;
    background: #d97706;
    border-color: #d97706;
}

.sem-filter-tab-skip { color: #dc2626; }
.sem-filter-tab-skip .sem-filter-tab-count {
    color: #dc2626;
    background: color-mix(in srgb, #ef4444 14%, transparent);
    border-color: color-mix(in srgb, #ef4444 28%, var(--border));
}
.sem-filter-tab-skip:hover,
.sem-filter-tab-skip.is-active {
    color: #b91c1c;
    background: color-mix(in srgb, #ef4444 12%, var(--bg3));
    border-color: color-mix(in srgb, #ef4444 40%, var(--border));
}
.sem-filter-tab-skip.is-active .sem-filter-tab-count {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.sem-filter-tab-include { color: #2563eb; }
.sem-filter-tab-include .sem-filter-tab-count {
    color: #2563eb;
    background: color-mix(in srgb, #3b82f6 14%, transparent);
    border-color: color-mix(in srgb, #3b82f6 28%, var(--border));
}
.sem-filter-tab-include:hover,
.sem-filter-tab-include.is-active {
    color: #1d4ed8;
    background: color-mix(in srgb, #3b82f6 12%, var(--bg3));
    border-color: color-mix(in srgb, #3b82f6 40%, var(--border));
}
.sem-filter-tab-include.is-active .sem-filter-tab-count {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.sem-filter-tab-pending { color: #64748b; }
.sem-filter-tab-pending .sem-filter-tab-count {
    color: #64748b;
    background: color-mix(in srgb, #94a3b8 14%, transparent);
    border-color: color-mix(in srgb, #94a3b8 28%, var(--border));
}
.sem-filter-tab-pending:hover,
.sem-filter-tab-pending.is-active {
    color: #475569;
    background: color-mix(in srgb, #94a3b8 12%, var(--bg3));
    border-color: color-mix(in srgb, #94a3b8 40%, var(--border));
}
.sem-filter-tab-pending.is-active .sem-filter-tab-count {
    color: #fff;
    background: #64748b;
    border-color: #64748b;
}

.sem-filter-tab-exclude { color: #dc2626; }
.sem-filter-tab-exclude .sem-filter-tab-count {
    color: #dc2626;
    background: color-mix(in srgb, #ef4444 14%, transparent);
    border-color: color-mix(in srgb, #ef4444 28%, var(--border));
}
.sem-filter-tab-exclude:hover,
.sem-filter-tab-exclude.is-active {
    color: #b91c1c;
    background: color-mix(in srgb, #ef4444 12%, var(--bg3));
    border-color: color-mix(in srgb, #ef4444 40%, var(--border));
}
.sem-filter-tab-exclude.is-active .sem-filter-tab-count {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.sem-filter-tab-all.is-active {
    color: var(--blue);
}

@media (max-width: 900px) {
    .sem-layout { grid-template-columns: 1fr; }
    .sem-groups { max-height: 320px; }
    .sem-ctx { flex-direction: column; align-items: stretch; }
    .sem-ctx-actions { justify-content: flex-start; }
}

.sem-dot-dupes { background: #f97316; }

.sem-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 6px 4px 16px;
    font-size: 12.5px;
    color: var(--text2);
}
.sem-summary-item { display: inline-flex; align-items: center; gap: 4px; }
.sem-summary-item[hidden],
[data-sem-summary-wrap][hidden] { display: none !important; }
.sem-summary-item b { color: var(--text); font-weight: 650; }
.sem-summary-link { color: var(--text2); text-decoration: none; }
.sem-summary-link:hover { color: var(--blue); text-decoration: underline; }
.sem-summary-link b { color: inherit; }

.sem-badge-new {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .02em;
    vertical-align: middle;
    color: #16a34a;
    background: color-mix(in srgb, #22c55e 16%, transparent);
}
html[data-theme="dark"] .sem-badge-new { color: #4ade80; }

.sem-freq-extra {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--text3);
    line-height: 1.2;
}

.sem-move-select,
.sem-export-mode-select {
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 12px;
}

.sem-dupe-block { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sem-dupe-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sem-dupe-phrase { font-size: 14px; font-weight: 650; color: var(--text); }
.sem-dupe-count { font-size: 12px; color: var(--text3); }
.sem-dupe-table { width: 100%; }
.sem-dupe-table th,
.sem-dupe-table td { padding: 6px 8px; font-size: 12.5px; }
.sem-dec-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg3);
    color: var(--text2);
}
.sem-dec-badge.sem-dec-include {
    color: #475569;
    background: color-mix(in srgb, #94a3b8 18%, transparent);
    border-radius: 999px;
}
.sem-dec-badge.sem-dec-exclude { color: #dc2626; background: color-mix(in srgb, #ef4444 12%, transparent); }
.form-inline.sem-dupe-form,
.sem-dupe-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    width: 100%;
}
.sem-dupe-field-label {
    display: block;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.2;
    color: var(--text3);
}
.sem-dupe-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
}
.sem-dupe-select {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 0 36px 0 12px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--border));
    background-color: var(--bg2);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text2) 50%),
        linear-gradient(135deg, var(--text2) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: var(--text);
    font-size: 13px;
    font-weight: 550;
    line-height: 34px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 8%, transparent);
}
.sem-dupe-select:hover {
    border-color: color-mix(in srgb, var(--blue) 55%, var(--border));
}
.sem-dupe-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}
.sem-dupe-submit {
    box-sizing: border-box;
    flex: 0 0 auto;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
}

#semCollectProgress {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
}
#semCollectProgress.hidden { display: none; }
.sem-progress-box {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    border-radius: 16px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.sem-progress-title { margin-bottom: 12px; font-size: 14px; font-weight: 650; color: var(--text); }
.sem-progress-bar {
    height: 8px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--bg3);
    overflow: hidden;
}
.sem-progress-bar-fill {
    height: 100%;
    width: 0;
    background: var(--blue);
    transition: width .25s ease;
}
.sem-progress-log {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text2);
}

.sem-suggest-box {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg3) 70%, transparent);
}
.sem-suggest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.sem-suggest-title {
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}
.sem-suggest-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sem-suggest-lead {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text2);
}
.sem-suggest-empty {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--text2);
}
.sem-suggest-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}
.sem-suggest-item {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 3px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.sem-suggest-item:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.sem-suggest-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sem-suggest-word { font-size: 13px; color: var(--text); font-weight: 550; text-transform: none; }
.sem-suggest-meta { font-size: 11px; color: var(--text2); line-height: 1.35; text-transform: none; }
.sem-suggest-stat {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text2);
    padding-top: 2px;
}
#semEditGroupModal .modal-content,
#semStopwordsModal .modal-content {
    max-width: 640px;
}
