:root {
    --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;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(77, 139, 255, 0.08), transparent 50%),
        radial-gradient(900px 500px at 110% 10%, rgba(163, 113, 247, 0.07), 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 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(77, 139, 255, 0.08), transparent 50%),
        radial-gradient(900px 500px at 110% 10%, rgba(163, 113, 247, 0.07), 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;
}

::selection {
    background: var(--blue-glow);
    color: #fff;
}

.app-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

.app-sidebar {
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    z-index: 40;
}

.app-sidebar-brand {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.app-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    cursor: pointer;
}

.app-sidebar-close:hover {
    background: var(--bg4);
}

.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-shrink: 0;
}

.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: auto;
    min-width: 0;
    max-width: 52%;
    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: rgba(255, 255, 255, 0.03);
    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: #c9dcff;
}

.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;
    font-size: 10px;
    font-weight: 700;
    color: var(--text3);
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
}

.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: flex-start;
    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;
    word-break: break-word;
}

.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: #9fd4a5;
    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: #e6c07b;
    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: #f0a8a4;
    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: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.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: 12px;
}

.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;
}

.app-nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.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: #c9dcff;
}

.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-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) {
    .app-icon-btn {
        display: inline-flex;
    }

    .app-sidebar-close {
        display: inline-flex;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
        z-index: 40;
    }

    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 {
        padding: 14px;
        margin-bottom: 14px;
    }

    .site-command-domain {
        font-size: 18px;
    }

    .site-command-actions {
        width: 100%;
    }

    .site-command-actions .btn:not(.site-command-settings) {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 44px;
    }

    .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: 12px 12px 28px;
    }

    .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 !important;
    }

    .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: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    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: 1;
}

.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);
}

.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: 320px;
    max-width: 480px;
}

.url-link {
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
    font-size: 13.5px;
    font-weight: 500;
    display: block;
    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] {
    width: 100%;
    padding: 13px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color .15s, box-shadow .15s;
}

textarea:focus,
input[type=text]:focus,
input[type=password]:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

textarea {
    font-family: ui-monospace, monospace;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    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);
}

.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 20px;
    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);
}

.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(--text3);
    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(--text3);
}

.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);
}

.cron-code {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    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;
    }

    .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;
}

/* Тёмные скроллбары для всего сайта (WebKit / Chromium / Edge / Safari) */
* {
    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,
body {
    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);
}

.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;
}

.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;
}

.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: 11px;
    color: var(--text3);
    margin-top: 10px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 14px 0 10px;
}

.filter-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-bar-aside {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.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: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-page {
    padding: 8px 12px;
    min-width: 36px;
    text-align: center;
}

.btn-page.active {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px var(--blue-glow);
}

.pagination-ellipsis {
    padding: 8px 6px;
    color: var(--text3);
    font-size: 12px;
}

.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;
}

.site-domain-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.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: rgba(139, 148, 158, .12);
    color: var(--text3);
}

.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: 150px; }

.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);
}

.bg-batch-progress {
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.bg-batch-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bg-batch-spin {
    width: 16px;
    height: 16px;
    color: var(--blue);
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.bg-batch-title {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    min-width: 0;
}

.bg-batch-pct {
    font-size: 12px;
    color: var(--text2);
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.bg-batch-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bg-batch-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg2);
    color: var(--text2);
    cursor: pointer;
}

.bg-batch-ctrl .ico {
    width: 14px;
    height: 14px;
}

.bg-batch-ctrl:hover {
    color: var(--text);
    border-color: var(--text3);
}

.bg-batch-stop:hover {
    color: #f85149;
    border-color: #f85149;
}

.bg-batch-play:hover {
    color: #3fb950;
    border-color: #3fb950;
}

.bg-batch-close {
    display: none;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    line-height: 0;
}

.bg-batch-track {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.bg-batch-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4d8bff, #a371f7);
    transition: width .3s ease;
}

.bg-batch-status {
    font-size: 12px;
    color: var(--text2);
    margin-top: 8px;
    line-height: 1.45;
}

.bg-batch-status a {
    color: var(--blue);
    text-decoration: underline;
}

.bg-batch-errors {
    display: none;
    margin-top: 8px;
    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: 10px 12px;
    border-radius: 8px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.18);
    font-size: 13px;
    color: var(--text-secondary, #9da7b3);
}

.ops-status:empty {
    display: none;
}

.ops-status-ok {
    background: rgba(46, 160, 67, 0.1);
    border-color: rgba(46, 160, 67, 0.28);
    color: #7ee787;
}

.ops-status-warn {
    background: rgba(210, 153, 29, 0.1);
    border-color: rgba(210, 153, 29, 0.28);
    color: #e3b341;
}

.ops-status-err {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.28);
    color: #ff7b72;
}

.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: 18px 0 8px;
    font-size: 15px;
}

.ops-bot-menu {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-sites-status {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.ops-site-row {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.backup-table-wrap {
    overflow-x: auto;
    margin: 12px 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.backup-table th,
.backup-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: middle;
}

.backup-table tr:last-child td {
    border-bottom: none;
}

.backup-table .backup-empty,
.ops-empty {
    text-align: center;
    color: var(--text2);
    padding: 22px 12px;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ops-form-restore .ops-field input[type="password"] {
    -webkit-text-fill-color: var(--text);
    background: var(--bg3, #161b22);
}

.ops-restore-zone {
    margin-top: 8px;
    padding: 16px;
    border: 1px dashed rgba(248, 81, 73, 0.35);
    border-radius: 12px;
    background: rgba(248, 81, 73, 0.04);
    display: block;
}

.ops-restore-head {
    margin-bottom: 12px;
}

.ops-restore-head strong {
    display: block;
    color: var(--red);
    font-size: 14px;
    margin-bottom: 4px;
}

.ops-restore-head span {
    display: block;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
}

.ops-form-restore {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.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: 18px;
}

.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: flex-start;
    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-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;
}

.stat-card,
.stat-card-wide {
    flex: none;
    max-width: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    box-shadow: none;
    min-height: 118px;
    transition: border-color .15s, background .15s;
}

.stat-card:hover {
    background: var(--surface-hover);
    border-color: var(--border2);
}

.stat-card-wide {
    grid-column: span 1;
}

.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;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    margin-top: 6px;
}

.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: 10px;
}

.stat-cover-chip {
    display: inline-flex;
    align-items: center;
    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: auto;
    background: rgba(0, 0, 0, 0.12);
}

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: 650;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.site-domain-link:hover {
    color: #c9dcff;
}

.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: 12px 12px 28px;
    }

    .dash-command-title {
        font-size: 20px;
    }

    .dash-command-bar,
    .site-command-bar,
    .page-header-row {
        padding: 14px;
    }

    .dash-command-bar .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 22px;
    }

    .ui-section-head {
        margin-bottom: 10px;
    }
}

.quota-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.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-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;
    }
}
 
