: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%);
}

* {
    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";
}

::selection {
    background: var(--blue-glow);
    color: #fff;
}

/* 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;
}

.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.negative,
.net-alltime-line.negative {
    color: var(--red);
}

.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: 14px;
}

.quota-item {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.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: 11px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.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.sent {
    color: #e3a72f;
}

.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;
    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;
}

/* ============================================================
   Тёмная тема: чекбоксы и скроллбары (унифицировано со всем UI)
   ============================================================ */

/* Все чекбоксы — в стиле сайта */
input[type="checkbox"] {
    accent-color: #4d8bff;
}

input[type="checkbox"].row-check,
input[type="checkbox"].url-check,
input[type="checkbox"]#checkAllUrls {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #30363d;
    border-radius: 4px;
    background: #0d1117;
    cursor: pointer;
    position: relative;
    transition: all .15s ease;
    vertical-align: middle;
    flex-shrink: 0;
}

input[type="checkbox"].row-check:hover,
input[type="checkbox"].url-check:hover,
input[type="checkbox"]#checkAllUrls:hover {
    border-color: #4d8bff;
    background: #161b22;
}

input[type="checkbox"].row-check:checked,
input[type="checkbox"].url-check:checked,
input[type="checkbox"]#checkAllUrls:checked {
    background: #4d8bff;
    border-color: #4d8bff;
}

input[type="checkbox"].row-check:checked::after,
input[type="checkbox"].url-check:checked::after,
input[type="checkbox"]#checkAllUrls:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]#checkAllUrls:indeterminate {
    background: #4d8bff;
    border-color: #4d8bff;
}

input[type="checkbox"]#checkAllUrls:indeterminate::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 6px;
    width: 8px;
    height: 2px;
    background: #fff;
    border: none;
    transform: none;
}

/* Тёмные скроллбары для всего сайта (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: 10px;
    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;
}

.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;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    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;
}

.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: 6px;
    font-size: 11px;
    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-domain-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.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 {
    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);
}

th.col-url-count { width: 90px; text-align: center; }
th.col-api { width: 140px; }
th.col-cron { width: 130px; }
th.col-last-check-overview { 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-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-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-hide {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}

.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-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;
    }
}
  