@import url("https://cdn.jsdelivr.net/npm/cn-fontsource-alimama-dong-fang-da-kai-regular/font.css");

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

/* 配置级耗材分析状态与按钮 */
.record-actions .record-analysis-status {
    border: 1px solid rgba(120, 170, 230, 0.3);
}
.record-actions .analysis-status-idle {
    color: #a8b6c9;
    background: rgba(100, 120, 150, 0.12);
}
.record-actions .analysis-status-running {
    color: #8bc5ff;
    background: rgba(45, 125, 225, 0.18);
}
.record-actions .analysis-status-success {
    color: #91e1ad;
    background: rgba(50, 170, 105, 0.18);
}
.record-actions .analysis-status-partial,
.record-actions .analysis-status-failed {
    color: #ffd18c;
    background: rgba(220, 140, 45, 0.18);
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --bg-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-danger: #da3633;
    --accent-warning: #fb8500;
    --border-color: #30363d;
    --shadow-light: rgba(240, 246, 252, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.6);
    --hover-overlay: rgba(240, 246, 252, 0.06);
    --theme-title-font: "Alimama DongFangDaKai", "AlimamaDongFangDaKai", "阿里妈妈东方大楷", "STKaiti", "KaiTi", serif;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 80% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
}

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

header {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: rgba(24, 24, 24, 0.92);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    padding: 14px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #a0aec0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #1db954;
    background: rgba(29, 185, 84, 0.12);
}

.tab-btn.active {
    color: #1db954;
    background: rgba(29, 185, 84, 0.14);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.section {
    background: rgba(24, 24, 24, 0.92);
    color: #e5e7eb;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    transition: box-shadow 0.3s ease;
}

.section:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}

.section h2 {
    margin-bottom: 25px;
    color: #f9fafb;
    font-size: 1.6em;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.authors-list-header {
    grid-template-columns: minmax(220px, max-content) minmax(720px, 1fr);
    align-items: start;
}

.authors-list-header .header-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    width: 100%;
    justify-self: end;
}

.authors-list-header .crawl-duration-indicator {
    grid-column: span 2;
}

.authors-list-header .btn,
.authors-list-header .crawl-duration-indicator {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    margin: 0;
}

.authors-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto auto;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}

.authors-toolbar .input,
.authors-toolbar .select {
    max-width: none;
    width: 100%;
    margin: 0;
}

.authors-toolbar .btn {
    margin: 0;
    padding: 10px 14px;
}

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

.authors-pagination-info {
    color: rgba(229, 231, 235, 0.8);
    font-size: 13px;
}

.authors-pagination-actions {
    display: flex;
    gap: 8px;
}

.authors-pagination-actions .btn {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
}

.crawl-duration-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(124, 169, 255, 0.35);
    background: rgba(48, 73, 128, 0.28);
    color: #d9e7ff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: var(--text-primary);
    padding: 8px 16px;
    font-size: 13px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(229,231,235,0.82);
    font-size: 14px;
}

.author-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) auto;
    gap: 14px;
    align-items: end;
    max-width: 980px;
}

.author-add-field {
    min-width: 0;
}

.author-add-field label {
    display: block;
    margin-bottom: 8px;
    color: rgba(229, 231, 235, 0.82);
    font-size: 14px;
    font-weight: 500;
}

.author-add-form .input {
    width: 100%;
    max-width: none;
}

.author-add-form .input:focus-visible {
    outline: 2px solid var(--pixel-primary, #8cbcff);
    outline-offset: 2px;
}

.author-add-form .btn {
    margin: 0;
    white-space: nowrap;
}

.author-add-feedback {
    grid-column: 1 / -1;
    min-height: 20px;
    margin: -2px 0 0;
    color: rgba(229, 231, 235, 0.72);
    font-size: 13px;
    line-height: 1.5;
}

.author-add-feedback[data-status="error"] {
    color: #ff9ca8;
}

.author-add-feedback[data-status="success"] {
    color: #7ee7b5;
}

.author-add-feedback[data-status="info"],
.author-add-feedback[data-status="pending"] {
    color: #9fd3ff;
}

@media (max-width: 720px) {
    .author-add-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .author-add-form .btn {
        width: 100%;
        justify-content: center;
    }

    .author-add-feedback {
        grid-column: 1;
    }
}

.input, .select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(17, 24, 39, 0.6);
    color: #f9fafb;
}

.input:disabled, .select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.input:focus, .select:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(17, 24, 39, 0.85);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input {
    max-width: 500px;
    display: inline-block;
}

.cookie-editor-card {
    max-width: 860px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.28);
    margin-bottom: 14px;
}

.cookie-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
}

.cookie-editor-card .form-group {
    margin-bottom: 12px;
}

.cookie-editor-textarea {
    width: 100%;
    max-width: none;
    min-height: 100px;
    display: block;
}

.cookie-editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-editor-actions .btn {
    margin: 0;
    padding: 8px 14px;
    border-radius: 8px;
}

.cookie-editor-target {
    font-size: 12px;
    color: rgba(229, 231, 235, 0.72);
}

.cookie-groups {
    max-width: 860px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-groups-badges {
    gap: 10px;
}

.config-layout {
    position: relative;
}

.config-subtabs-shell {
    position: sticky;
    top: 12px;
    z-index: 80;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(173, 192, 255, 0.24);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(17, 25, 55, 0.82), rgba(20, 27, 53, 0.72));
    box-shadow: 0 16px 34px rgba(4, 8, 26, 0.32);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.config-subtab-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.config-subtab-actions .btn {
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
}

.config-subtabs {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    margin-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
}

.config-subtabs::-webkit-scrollbar {
    display: none;
}

.config-subtab {
    flex: 0 0 auto;
    min-height: 44px;
    min-width: max-content;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #d7ddf8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-subtab:hover {
    color: #f9fbff;
    background: rgba(110, 154, 255, 0.16);
    border-color: rgba(173, 192, 255, 0.34);
}

.config-subtab.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(78, 118, 255, 0.58), rgba(255, 147, 114, 0.34));
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 24px rgba(40, 72, 190, 0.32);
}

.config-panel {
    display: none;
}

.config-panel.active {
    display: block;
}

.config-panel[hidden] {
    display: none !important;
}

.advanced-cooling-groups {
    display: grid;
    gap: 18px;
}

.advanced-cooling-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.advanced-cooling-header h2 {
    margin: 0;
}

.advanced-cooling-section {
    padding-top: 4px;
}

.advanced-cooling-section h3 {
    margin: 0 0 10px;
    color: #f3f6ff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.advanced-cooling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.advanced-cooling-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.advanced-cooling-field span {
    color: #bfc8ea;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
}

.records-layout {
    width: 100%;
}

.records-panel {
    display: none;
}

.records-panel.active {
    display: block;
}

.records-panel[hidden] {
    display: none !important;
}

.config-download-mode-block {
    max-width: 760px;
    padding: 14px;
    margin-bottom: 22px;
    border: 1px solid rgba(173, 192, 255, 0.18);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.3);
}

.browser-backend-status-card,
.dependency-update-card {
    max-width: 760px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: -8px 0 22px;
    border: 1px solid rgba(173, 192, 255, 0.2);
    border-radius: 12px;
    background: rgba(8, 16, 38, 0.34);
}

.browser-backend-status-card.is-ok {
    border-color: rgba(125, 211, 168, 0.34);
}

.browser-backend-status-card.is-fallback {
    border-color: rgba(240, 142, 160, 0.42);
}

.dependency-update-card {
    margin-top: -8px;
}

.dependency-update-card.is-update-available {
    border-color: rgba(242, 184, 75, 0.42);
}

.dependency-update-card.is-error {
    border-color: rgba(240, 142, 160, 0.42);
}

.browser-backend-status-main,
.dependency-update-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.dependency-update-main small {
    color: #9fb4e7;
    line-height: 1.5;
}

.dependency-update-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.browser-backend-status-label {
    font-size: 12px;
    color: #9fb4e7;
}

.browser-backend-status-text {
    font-size: 13px;
    line-height: 1.5;
    color: #e7efff;
    overflow-wrap: anywhere;
}

.config-download-mode-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.config-inline-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.config-inline-inputs .input {
    min-width: 0;
}

.config-inline-inputs:has(.input:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.config-field-label {
    color: rgba(229, 231, 235, 0.86);
    font-size: 14px;
    font-weight: 600;
}

.download-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(173, 192, 255, 0.24);
    border-radius: 12px;
    background: rgba(6, 12, 30, 0.46);
}

.download-mode-btn {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #cfd8fb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.download-mode-btn:hover {
    color: #ffffff;
    background: rgba(110, 154, 255, 0.14);
}

.download-mode-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(61, 125, 255, 0.72), rgba(39, 198, 203, 0.45));
    border-color: rgba(190, 224, 255, 0.42);
    box-shadow: 0 10px 22px rgba(43, 103, 218, 0.3);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cookie-group-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.35);
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
}

.cookie-group-badge-item.is-selected {
    box-shadow: none;
    background: rgba(25, 35, 56, 0.52);
}

.cookie-group-name-badge {
    margin: 0;
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: rgba(241, 245, 249, 0.95);
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    max-width: 180px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cookie-group-name-badge.is-clickable {
    cursor: pointer;
}

.cookie-group-name-badge.is-clickable:hover {
    transform: translateY(-1px);
}

.cookie-group-name-badge.cookie-group-status-normal {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.48);
}

.cookie-group-name-badge.cookie-group-status-pending {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.17);
    border-color: rgba(245, 158, 11, 0.45);
}

.cookie-group-name-badge.cookie-group-status-limit {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.46);
}

.cookie-group-name-badge.cookie-group-status-login-invalid {
    color: #f9fafb;
    background: #050505;
    border-color: rgba(249, 250, 251, 0.28);
}

.cookie-group-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cookie-group-action-btn {
    margin: 0;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(8, 11, 17, 0.92);
    color: rgba(203, 213, 225, 0.82);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cookie-group-action-btn.is-icon {
    font-size: 0;
}

.cookie-group-action-btn:hover {
    background: rgba(20, 27, 40, 0.96);
    color: rgba(226, 232, 240, 0.96);
    transform: translateY(-1px);
}

.cookie-group-action-btn.is-danger {
    color: rgba(203, 213, 225, 0.82);
    background: rgba(8, 11, 17, 0.92);
}

.cookie-group-action-btn.is-danger:hover {
    background: rgba(20, 27, 40, 0.96);
    color: rgba(226, 232, 240, 0.96);
}

.cookie-group-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cookie-recovery-status {
    margin-top: 10px;
    max-width: 860px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.34);
    color: rgba(226, 232, 240, 0.9);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.cookie-recovery-status-success {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.42);
    background: rgba(22, 101, 52, 0.18);
}

.cookie-recovery-status-warning {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(120, 53, 15, 0.2);
}

.cookie-recovery-status-error {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(127, 29, 29, 0.2);
}

.cookie-group-empty {
    border: 1px dashed rgba(148, 163, 184, 0.36);
    border-radius: 10px;
    padding: 8px 12px;
    color: rgba(148, 163, 184, 0.92);
    font-size: 12px;
    width: fit-content;
}

@media (max-width: 768px) {
    .cookie-editor-grid {
        grid-template-columns: 1fr;
    }
    .cookie-group-badge-item {
        max-width: 100%;
        width: auto;
        flex-wrap: wrap;
        border-radius: 12px;
    }
    .cookie-group-name-badge {
        max-width: 100%;
    }
}

small {
    display: block;
    margin-top: 6px;
    color: rgba(229,231,235,0.6);
    font-size: 12px;
    line-height: 1.5;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

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

.authors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.author-card {
    background: rgba(24, 24, 24, 0.92);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.author-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 44px rgba(0,0,0,0.65);
    border-color: rgba(29, 185, 84, 0.45);
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(29,185,84,0.9) 0%, rgba(29,185,84,0.2) 100%);
    border-radius: 16px 16px 0 0;
}

.author-card::after {
    content: '🔗';
    position: absolute;
    top: 42px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
}

.author-card:hover::after {
    opacity: 0.5;
}

.author-site-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    max-width: 138px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.84);
    color: rgba(226, 232, 240, 0.92);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 8px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.author-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-gradient);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 26px;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.author-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.author-name {
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
}

.author-name-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(153, 201, 255, 0.42);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.author-name-link:hover {
    color: #9fd3ff;
    border-bottom-color: rgba(159, 211, 255, 0.92);
}

.author-name-link.is-disabled {
    border-bottom: none;
    cursor: default;
}

.author-id {
    font-size: 14px;
    color: #a0aec0;
    margin: 0;
}

.author-id-editable {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0;
    border: none;
    background: transparent;
    border-bottom: 1px dashed rgba(199, 210, 242, 0.55);
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.author-id-editable:hover {
    color: #9fd3ff;
    border-bottom-color: rgba(159, 211, 255, 0.92);
}

.author-id-editable:focus-visible {
    outline: 1px solid rgba(159, 211, 255, 0.75);
    outline-offset: 2px;
    border-radius: 4px;
}

.author-model-count {
    font-size: 13px;
    color: #68d391;
    font-weight: 500;
    background: rgba(29, 185, 84, 0.12);
    border: 1px solid rgba(29, 185, 84, 0.28);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    margin-top: 4px;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.author-model-count:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.author-model-count.is-disabled {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.44);
}

.author-model-count.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.author-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.author-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.author-stats-row-top .author-stat {
    flex: 1;
    justify-content: flex-start;
}

.author-stats-row-bottom {
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.author-stats-divider {
    height: 1px;
    background: rgba(255,255,255,0.10);
    width: 100%;
}

.author-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.author-stat-label {
    color: rgba(229,231,235,0.65);
    font-size: 12px;
    margin-left: 6px;
}

.author-stat-icon {
    width: 1.35em;
    flex: 0 0 1.35em;
    font-size: 17px;
    line-height: 1;
    text-align: center;
}

.author-stat-text {
    color: #a0aec0;
}

.author-stat-value {
    color: #e2e8f0;
    font-weight: 600;
}

.author-stat-icon,
.author-stat-value {
    line-height: 1;
}

.author-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.author-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.select {
    max-width: 250px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.search-form .form-group {
    margin-bottom: 0;
}

.search-form .form-group:last-child {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.search-form .form-group:last-child .btn {
    margin: 0;
}

.log-search-form {
    display: grid;
    grid-template-columns: minmax(320px, 1.35fr) minmax(180px, 0.8fr) repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.log-search-form .form-group {
    margin-bottom: 0;
}

.log-search-form .input,
.log-search-form .select {
    width: 100%;
    max-width: none;
}

.log-time-range-group {
    min-width: 0;
}

.log-search-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.log-search-actions .btn {
    margin: 0;
}

.log-auto-refresh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(229, 231, 235, 0.86);
    font-weight: 600;
    margin-left: 4px;
}

.log-auto-refresh-toggle input {
    margin: 0;
}

.single-model-url-group {
    grid-column: 1 / -1;
}

.single-model-url-input {
    max-width: none;
    min-height: 108px;
    resize: vertical;
    line-height: 1.5;
}

.single-model-crawl-hint {
    margin-top: -6px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-range input {
    flex: 1;
    min-width: 150px;
}

.date-range span {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.records-themes-section .section-header {
    align-items: flex-end;
}

.records-themes-meta {
    color: rgba(209, 218, 245, 0.72);
    font-size: 13px;
    font-weight: 600;
}

.records-themes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.records-theme-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(178, 199, 255, 0.22);
    border-radius: 16px;
    background: rgba(12, 18, 34, 0.92);
    color: #f8fbff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.records-theme-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 211, 159, 0.58);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.46);
}

.records-theme-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.records-theme-card-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 9, 18, 0.7) 0%, rgba(9, 14, 27, 0.5) 30%, rgba(9, 14, 27, 0.06) 68%, rgba(9, 14, 27, 0) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
}

.records-theme-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(58%, 420px);
    height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: clamp(22px, 4vw, 42px);
}

.records-theme-name {
    display: block;
    color: #ffffff;
    font-family: var(--theme-title-font);
    font-size: clamp(28px, 4.8vw, 54px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: 0;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.records-theme-subtitle,
.records-theme-meta,
.records-theme-note {
    display: block;
    color: rgba(236, 243, 255, 0.86);
    font-size: 13px;
    line-height: 1.42;
}

.records-theme-subtitle {
    font-size: 15px;
    font-weight: 700;
}

.records-theme-meta {
    color: rgba(87, 241, 188, 0.9);
    font-weight: 760;
}

.records-theme-note {
    max-width: 32em;
    color: rgba(219, 228, 248, 0.68);
}

.theme-rules-help {
    display: block;
    margin: 8px 0 16px;
    color: var(--text-secondary);
}

.theme-rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.theme-rule-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 16px;
}

.theme-rule-card h3 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 17px;
}

.theme-rule-field {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.theme-rule-textarea {
    min-height: 74px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.45;
}

/* 中等屏幕适配（平板横屏） */
@media (max-width: 1200px) and (min-width: 769px) {
    .records-grid {
        gap: 20px;
    }
}

/* 平板适配 */
@media (max-width: 1024px) and (min-width: 769px) {
    .records-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .records-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }

    .records-themes-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .records-theme-card-body {
        width: 64%;
        padding: 22px;
    }

    .records-theme-note {
        display: none;
    }

    .theme-rules-grid {
        grid-template-columns: 1fr;
    }
}

.records-list > .result-count {
    margin-bottom: 0;
}

.records-footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.records-sentinel {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(207, 216, 245, 0.92);
    border: 1px dashed rgba(170, 188, 255, 0.32);
    background: rgba(30, 40, 72, 0.45);
}

.records-sentinel.is-end {
    opacity: 0.8;
}

.records-bulk-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(170, 188, 255, 0.26);
    background: rgba(16, 25, 54, 0.42);
}

.records-select-visible {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(241, 245, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
}

.records-selected-count {
    color: rgba(204, 213, 246, 0.92);
    font-size: 13px;
    font-weight: 600;
    margin-right: auto;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

.author-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hover-overlay);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.author-card:hover::before {
    opacity: 1;
}

.author-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.record-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: block;
}

.record-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.record-info h3 {
    margin-bottom: 12px;
    color: #f9fafb;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.record-meta {
    font-size: 13px;
    color: rgba(229,231,235,0.70);
    margin-bottom: 8px;
    line-height: 1.6;
}

.record-meta strong {
    color: rgba(243,244,246,0.88);
    font-weight: 600;
}

.record-meta a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.record-meta a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.record-performance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.record-performance-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    color: #e9f2ff;
    border: 1px solid rgba(186, 207, 255, 0.24);
    background: rgba(14, 24, 52, 0.42);
}

.record-performance-icon {
    font-size: 12px;
}

.record-performance-value {
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.01em;
}

.record-performance-delta {
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
}

.record-performance-delta.is-up {
    color: #86e7b7;
}

.record-performance-delta.is-down {
    color: #ff9da9;
}

.record-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.record-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
    align-self: flex-start;
}

.badge-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5b7bd 100%);
    color: #842029;
    border: 1px solid #f1aeb5;
}

/* Toast 通知样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width 0.3s ease;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(450px);
    opacity: 0;
}

.toast-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.toast-message {
    flex: 1;
    color: #f0f6fc;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: rgba(240, 246, 252, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f6fc;
}

/* Toast 类型样式 */
.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success::before {
    background: #28a745;
}

.toast-success .toast-icon {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error::before {
    background: #dc3545;
}

.toast-error .toast-icon {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info::before {
    background: #17a2b8;
}

.toast-info .toast-icon {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning::before {
    background: #ffc107;
}

.toast-warning .toast-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        transform: translateY(-100px);
    }
    
    .toast-show {
        transform: translateY(0);
    }
    
    .toast-hide {
        transform: translateY(-100px);
    }
}

/* Dialog 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.dialog-overlay.dialog-show {
    opacity: 1;
    visibility: visible;
}

.dialog-container {
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-overlay.dialog-show .dialog-container {
    transform: scale(1) translateY(0);
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
}

.dialog-close {
    background: transparent;
    border: none;
    color: rgba(240, 246, 252, 0.6);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.dialog-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f6fc;
}

.dialog-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.dialog-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(240, 246, 252, 0.9);
    word-wrap: break-word;
}

.dialog-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-footer .btn {
    margin: 0;
    min-width: 100px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .dialog-container {
        max-width: 100%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .dialog-header {
        padding: 16px 20px;
    }
    
    .dialog-title {
        font-size: 18px;
    }
    
    .dialog-body {
        padding: 20px;
    }
    
    .dialog-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }
    
    .dialog-footer .btn {
        width: 100%;
    }
}

.loading {
    text-align: center;
    padding: 60px;
    color: #718096;
    font-size: 16px;
}

.empty {
    text-align: center;
    padding: 60px;
    color: #718096;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 700px;
    overflow-y: auto;
    padding-right: 8px;
}

.logs-list::-webkit-scrollbar {
    width: 8px;
}

.logs-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}

.logs-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.logs-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.log-item {
    background: rgba(24, 24, 24, 0.92);
    border-left: 4px solid #ddd;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.45);
    transition: all 0.3s ease;
}

.log-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.log-item.log-start {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.12);
}

.log-item.log-success {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.12);
}

.log-item.log-error {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.12);
}

.log-item.log-info {
    border-left-color: #17a2b8;
    background: rgba(23, 162, 184, 0.12);
}

.log-item.log-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}

.log-item.log-default {
    border-left-color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.log-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.log-time {
    color: rgba(229,231,235,0.65);
    font-size: 12px;
    font-weight: 500;
}

.log-action {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.log-start .log-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.log-success .log-action {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.log-error .log-action {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.log-info .log-action {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.log-warning .log-action {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.log-default .log-action {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.log-author {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
}

.log-message {
    color: rgba(243,244,246,0.92);
    margin-top: 8px;
    line-height: 1.6;
}

.log-model {
    color: rgba(229,231,235,0.6);
    font-size: 12px;
    margin-top: 6px;
    font-style: italic;
}

.result-count {
    padding: 16px 24px;
    background: rgba(24, 24, 24, 0.92);
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .records-list {
        grid-template-columns: 1fr;
    }
    
    .authors-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Glass Aurora Theme (final override)
   Ref: ui-ux-pro-max website screenshot
   ========================================================== */
:root {
    --glass-bg: rgba(24, 33, 63, 0.52);
    --glass-bg-strong: rgba(18, 27, 55, 0.72);
    --glass-border: rgba(255, 255, 255, 0.22);
    --glass-border-soft: rgba(255, 255, 255, 0.12);
    --aurora-blue: #4e76ff;
    --aurora-cyan: #6ecbff;
    --aurora-violet: #7a7dff;
    --aurora-peach: #ff9b72;
    --aurora-pink: #ff76b7;
    --surface-text: #f4f7ff;
    --surface-text-muted: #c6d0ef;
    --surface-shadow: rgba(5, 10, 30, 0.42);
}

html {
    background: #0b122f;
}

html,
body {
    background-color: #0b122f;
    overscroll-behavior-y: none;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--surface-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background:
        radial-gradient(1100px 720px at -14% -18%, rgba(126, 180, 255, 0.3), transparent 62%),
        radial-gradient(960px 650px at 112% -4%, rgba(255, 137, 178, 0.24), transparent 63%),
        radial-gradient(760px 520px at 88% 22%, rgba(255, 160, 110, 0.22), transparent 56%),
        radial-gradient(980px 520px at 52% 120%, rgba(102, 148, 255, 0.22), transparent 68%),
        linear-gradient(180deg, #0b122f 0%, #101432 48%, #121732 100%);
}

@supports (-webkit-touch-callout: none) {
    html,
    body {
        background: #0b122f;
    }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, black 34%, transparent 92%);
    -webkit-mask-image: radial-gradient(circle at center, black 34%, transparent 92%);
}

.tech-grid {
    display: none;
}

.tech-glow {
    position: fixed;
    top: -150px;
    left: -140px;
    z-index: 0;
    pointer-events: none;
    width: 460px;
    height: 460px;
    filter: blur(75px);
    opacity: 0.3;
    background: radial-gradient(circle at center, rgba(124, 186, 255, 0.76) 0%, rgba(124, 186, 255, 0) 70%);
}

.tech-glow-left {
    top: -150px;
    left: -140px;
}

.tech-glow-right {
    top: 36px;
    left: auto;
    right: -150px;
    background: radial-gradient(circle at center, rgba(255, 146, 163, 0.72) 0%, rgba(255, 146, 163, 0) 72%);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    padding: 24px;
}

.hero-shell {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(89, 131, 255, 0.22), rgba(255, 148, 135, 0.1)),
        linear-gradient(145deg, rgba(24, 33, 63, 0.65), rgba(18, 27, 55, 0.78));
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    padding: 24px 26px 22px;
    box-shadow:
        0 28px 54px var(--surface-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -16px 28px rgba(22, 25, 75, 0.24);
    backdrop-filter: blur(24px) saturate(136%);
    -webkit-backdrop-filter: blur(24px) saturate(136%);
    overflow: hidden;
}

.hero-shell::before {
    content: '';
    position: absolute;
    inset: -35% 40% auto -22%;
    height: 220px;
    background: radial-gradient(circle at center, rgba(124, 179, 255, 0.45), transparent 68%);
    pointer-events: none;
}

.hero-shell::after {
    content: '';
    position: absolute;
    inset: auto -14% -40% 56%;
    height: 240px;
    background: radial-gradient(circle at center, rgba(255, 156, 120, 0.33), transparent 72%);
    pointer-events: none;
}

.hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #eef3ff;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: linear-gradient(130deg, rgba(108, 145, 255, 0.28), rgba(255, 155, 132, 0.2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(145deg, #72d4ff, #5f76ff);
    box-shadow: 0 0 0 6px rgba(116, 144, 255, 0.2), 0 0 20px rgba(110, 203, 255, 0.7);
}

.hero-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #f7f0ff;
    background: linear-gradient(130deg, rgba(91, 116, 255, 0.4), rgba(255, 128, 169, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.34);
}

.header-content {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.header-kicker {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    margin-bottom: 8px;
    color: #ccdbff;
    text-transform: uppercase;
}

header h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.55rem, 2.45vw, 2.38rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 16px 34px rgba(58, 98, 255, 0.34);
}

.header-subtitle {
    margin-top: 10px;
    max-width: 760px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--surface-text-muted);
}

.header-sites {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-chip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: linear-gradient(135deg, rgba(86, 121, 255, 0.28), rgba(255, 150, 113, 0.18));
    font-size: 12px;
    font-weight: 600;
    color: #f7f4ff;
}

.tabs,
.section,
.author-card,
.record-card,
.result-count,
.log-item,
.dialog-container,
.toast {
    background: linear-gradient(150deg, var(--glass-bg), var(--glass-bg-strong)) !important;
    border: 1px solid var(--glass-border-soft) !important;
    box-shadow:
        0 18px 36px rgba(6, 10, 30, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.tabs {
    padding: 9px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.tab-btn {
    border-radius: 11px;
    border: 1px solid transparent;
    color: #d7ddf8;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tab-btn:hover {
    color: #f9fbff;
    background: rgba(110, 154, 255, 0.16);
    border-color: rgba(173, 192, 255, 0.34);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(78, 118, 255, 0.58), rgba(255, 147, 114, 0.34));
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 24px rgba(40, 72, 190, 0.4);
}

.section {
    border-radius: 18px;
}

.section h2 {
    color: #f7f8ff;
    border-bottom-color: rgba(255, 255, 255, 0.17);
}

.input,
.select,
textarea.input {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 18, 42, 0.52);
    color: #f8f9ff;
}

.input::placeholder,
textarea.input::placeholder {
    color: #9ba8d7;
}

.input:focus,
.select:focus,
textarea.input:focus {
    border-color: rgba(140, 190, 255, 0.82);
    box-shadow: 0 0 0 3px rgba(127, 171, 255, 0.2), 0 12px 28px rgba(47, 85, 190, 0.24);
}

.btn {
    border-radius: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.btn::before {
    display: none;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--aurora-blue), var(--aurora-cyan));
    border-color: rgba(190, 224, 255, 0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(70, 119, 255, 0.38);
}

.btn-secondary {
    color: #eef2ff;
    background: linear-gradient(130deg, rgba(67, 81, 138, 0.6), rgba(45, 56, 106, 0.62));
    border-color: rgba(173, 189, 255, 0.22);
}

.btn-secondary:hover {
    box-shadow: 0 10px 20px rgba(72, 90, 160, 0.24);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff5f7b, #ff8b5e);
    border-color: rgba(255, 214, 214, 0.35);
}

.author-card,
.record-card {
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.record-card.is-clickable {
    cursor: pointer;
}

.record-card.is-selected {
    border-color: rgba(128, 209, 255, 0.72) !important;
    box-shadow: 0 18px 38px rgba(4, 8, 26, 0.42), 0 0 0 2px rgba(128, 209, 255, 0.18);
}

.record-card.is-skip-download {
    opacity: 0.78;
}

.record-card.is-software-print-only {
    opacity: 0.82;
}

.record-card.is-link-error {
    opacity: 0.86;
}

.record-select-control {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(211, 224, 255, 0.42);
    background: rgba(10, 17, 38, 0.78);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.record-select-checkbox,
#records-select-visible {
    width: 16px;
    height: 16px;
    accent-color: #76d0ff;
    cursor: pointer;
}

.author-card:hover,
.record-card:hover {
    transform: translateY(-4px);
    border-color: rgba(188, 209, 255, 0.34) !important;
    box-shadow: 0 22px 44px rgba(4, 8, 26, 0.42), 0 8px 26px rgba(54, 104, 255, 0.2);
}

.author-name,
.record-info h3 {
    color: #f6f8ff !important;
}

.author-id,
small,
.record-meta,
.date-range span,
.log-time,
.log-model {
    color: #c7d2f2 !important;
}

.author-model-count {
    color: #fff;
    background: linear-gradient(130deg, rgba(90, 118, 255, 0.56), rgba(255, 155, 112, 0.38));
    border: 1px solid rgba(193, 210, 255, 0.34);
}

.author-model-count.is-disabled {
    color: #d1d5db;
    background: linear-gradient(130deg, rgba(120, 130, 148, 0.5), rgba(96, 104, 121, 0.5));
    border-color: rgba(184, 194, 211, 0.4);
}

.author-stats {
    background: rgba(7, 13, 33, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.record-meta a {
    color: #91c7ff;
}

.record-meta a:hover {
    color: #ffd1bc;
}

.badge-success {
    background: rgba(106, 200, 255, 0.2);
    border-color: rgba(159, 224, 255, 0.42);
    color: #eaffff;
}

.badge-warning {
    background: rgba(255, 169, 117, 0.24);
    border-color: rgba(255, 204, 162, 0.46);
    color: #fff0df;
}

.badge-danger {
    background: rgba(255, 99, 132, 0.22);
    border-color: rgba(255, 153, 177, 0.44);
    color: #ffeef3;
}

.badge-info {
    background: rgba(45, 212, 191, 0.18);
    border-color: rgba(125, 249, 232, 0.42);
    color: #e4fffb;
}

.badge-muted {
    background: rgba(148, 163, 184, 0.24);
    border-color: rgba(203, 213, 225, 0.4);
    color: #edf2f7;
}

.result-count {
    color: #eff2ff;
}

.log-item.log-start,
.log-start .log-action {
    background: rgba(109, 131, 255, 0.2);
    border-left-color: #8da5ff;
}

.log-item.log-success,
.log-success .log-action {
    background: rgba(95, 188, 255, 0.2);
    border-left-color: #8ad6ff;
}

.log-item.log-error,
.log-error .log-action {
    background: rgba(255, 111, 143, 0.22);
    border-left-color: #ff8eaf;
}

.log-item.log-info,
.log-info .log-action {
    background: rgba(255, 159, 123, 0.2);
    border-left-color: #ffb389;
}

.log-item.log-warning,
.log-warning .log-action {
    background: rgba(255, 207, 115, 0.2);
    border-left-color: #ffd37f;
}

.log-item.log-default,
.log-default .log-action {
    background: rgba(164, 183, 255, 0.14);
    border-left-color: #aebdff;
}

.log-action {
    color: #ffffff !important;
}

.log-author {
    color: #afcbff;
}

.loading,
.empty {
    color: #ccd5f6;
    background: rgba(20, 29, 56, 0.5);
    border: 1px dashed rgba(170, 188, 255, 0.36);
}

.records-sentinel {
    color: #e6ecff;
    border-color: rgba(173, 189, 255, 0.36);
    background: rgba(36, 47, 87, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dialog-overlay {
    background: rgba(8, 10, 28, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.dialog-header,
.dialog-footer {
    border-color: rgba(255, 255, 255, 0.16);
}

.dialog-title,
.dialog-message,
.toast-message {
    color: #f5f8ff;
}

.dialog-close {
    color: #dbe3ff;
}

.dialog-close {
    width: 44px;
    height: 44px;
}

.toast-success::before {
    background: #77cdff;
}

.toast-error::before {
    background: #ff8dab;
}

.toast-info::before {
    background: #ffa57b;
}

.toast-warning::before {
    background: #ffc36b;
}

.logs-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7399ff 0%, #5878ea 100%);
}

.logs-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 960px) {
    .hero-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    .tech-glow {
        width: 300px;
        height: 300px;
        filter: blur(56px);
        opacity: 0.24;
    }

    .tech-glow-left {
        top: -120px;
        left: -120px;
    }

    .tech-glow-right {
        top: auto;
        right: -120px;
        bottom: 14%;
    }

    .hero-shell {
        border-radius: 16px;
        padding: 16px 14px;
    }

    .header-kicker {
        letter-spacing: 0.14em;
    }

    .header-subtitle {
        font-size: 13px;
    }

    .site-chip {
        font-size: 11px;
        padding: 6px 10px;
    }

    .tabs {
        padding: 8px;
        margin-bottom: 14px;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        scrollbar-width: none;
    }

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

    .tab-btn {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 10px 14px;
        font-size: 13px;
    }

    .config-subtabs-shell {
        top: 8px;
        flex-direction: column;
        justify-content: stretch;
        padding: 8px;
    }

    .config-subtab-actions {
        width: 100%;
    }

    .config-subtab-actions .btn {
        width: 100%;
    }

    .config-subtabs {
        width: 100%;
    }

    .config-subtab {
        padding: 9px 13px;
        font-size: 13px;
    }

    .config-download-mode-row {
        align-items: stretch;
    }

    .download-mode-toggle {
        width: 100%;
    }

    .download-mode-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 12px;
    }

    .section {
        padding: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .crawl-duration-indicator {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .header-actions .btn {
        width: 100%;
        margin: 0;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .log-search-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .log-search-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .log-auto-refresh-toggle {
        justify-content: center;
        margin-left: 0;
    }

    .search-form .form-group:last-child {
        margin-top: 4px;
    }

    .date-range {
        gap: 8px;
    }

    .date-range input {
        min-width: 0;
    }

    .form-group .btn {
        width: 100%;
        margin-right: 0;
    }

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

    .filter-bar .btn {
        width: 100%;
        margin-right: 0;
    }

    .authors-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .authors-toolbar {
        grid-template-columns: 1fr;
    }

    .authors-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .authors-pagination-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .author-card {
        padding: 14px;
    }

    .author-info {
        gap: 12px;
    }

    .author-avatar,
    .author-avatar-placeholder {
        width: 58px;
        height: 58px;
    }

    .author-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .record-image {
        height: 180px;
    }

    .record-info {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .header-sites {
        gap: 6px;
    }

    .site-chip {
        font-size: 10px;
        padding: 5px 8px;
    }

    .hero-status {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* ===== Statistics Tab ===== */
.stats-filter-bar {
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.stats-filter-item {
    min-width: 150px;
    display: grid;
    gap: 6px;
}

.stats-filter-item label {
    font-size: 12px;
    color: #b8c8f0;
}

.stats-filter-item .input {
    min-height: 36px;
}

.stats-filter-actions {
    display: flex;
    align-items: flex-end;
}

.stats-filter-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #9fb4e7;
}

.stats-grid-two {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: stretch;
}

.stats-grid-secondary {
    margin-top: 18px;
}

.stats-kpi-card,
.stats-chart-card {
    border-radius: 16px;
    border: 1px solid rgba(196, 213, 255, 0.22);
    background: linear-gradient(160deg, rgba(17, 28, 60, 0.62), rgba(16, 24, 53, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stats-kpi-card {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.stats-kpi-label {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #b5c4ef;
}

.stats-kpi-value {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 2.4vw, 2.5rem);
    font-weight: 700;
    color: #f4f8ff;
    line-height: 1.15;
}

.stats-kpi-sub {
    margin: 0;
    font-size: 13px;
    color: #c8d4f6;
    line-height: 1.5;
}

.stats-chart-card {
    padding: 12px;
}

.stats-chart {
    width: 100%;
    border-radius: 14px;
    background: rgba(8, 16, 38, 0.38);
    border: 1px solid rgba(171, 193, 255, 0.14);
}

.stats-chart-lg {
    height: 420px;
}

.stats-chart-md {
    height: 340px;
}

.stats-chart-xl {
    height: 520px;
}

.stats-chart-sm {
    height: 320px;
}

.stats-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #dce6ff;
    margin-bottom: 10px;
    padding-left: 2px;
}

.stats-chart-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.stats-chart-panel-spaced {
    margin-top: 18px;
}

.stats-grid-bars {
    grid-template-columns: 1fr 1fr;
}

.web-stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.web-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.web-stats-panel {
    min-width: 0;
    border: 1px solid rgba(175, 196, 255, 0.2);
    border-radius: 14px;
    background: rgba(9, 19, 43, 0.42);
    padding: 14px;
}

.web-stats-table {
    width: 100%;
    overflow-x: auto;
}

.web-stats-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}

.web-stats-table th,
.web-stats-table td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(166, 186, 245, 0.16);
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
    color: #dce6ff;
    line-height: 1.35;
}

.web-stats-table th {
    color: #9fb4e7;
    font-weight: 700;
    white-space: nowrap;
}

.web-stats-table td {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-stats-empty {
    min-height: 80px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(164, 186, 244, 0.28);
    border-radius: 10px;
    color: #a9bde9;
    font-size: 12px;
    background: rgba(18, 30, 63, 0.28);
}

.stats-heatmaps {
    width: 100%;
}

.stats-heatmap-window-list {
    display: grid;
    gap: 14px;
}

.stats-heatmap-window {
    border-radius: 14px;
    border: 1px solid rgba(175, 196, 255, 0.2);
    background: linear-gradient(165deg, rgba(13, 25, 56, 0.64), rgba(9, 17, 42, 0.74));
    padding: 14px 14px 12px;
}

.stats-heatmap-window-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.stats-heatmap-window-title {
    font-size: 15px;
    font-weight: 700;
    color: #ebf2ff;
}

.stats-heatmap-window-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #adc0ef;
}

.stats-heatmap-window-time {
    font-size: 11px;
    color: #9db2e6;
    white-space: nowrap;
}

.stats-heatmap-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stats-heatmap-metric {
    border-radius: 12px;
    border: 1px solid rgba(166, 186, 245, 0.2);
    background: rgba(9, 19, 43, 0.55);
    padding: 10px;
}

.stats-heatmap-metric-title {
    font-size: 13px;
    font-weight: 700;
    color: #e7efff;
    margin-bottom: 8px;
}

.stats-heatmap-list {
    display: grid;
    gap: 8px;
}

.stats-heatmap-item {
    display: grid;
    grid-template-columns: 32px 46px minmax(0, 1fr) minmax(54px, max-content);
    gap: 8px;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    padding: 6px 8px;
    border: 1px solid rgba(160, 185, 250, 0.18);
    background: rgba(18, 30, 63, 0.56);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.stats-heatmap-item:hover {
    border-color: rgba(193, 214, 255, 0.38);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(8, 16, 40, 0.28);
}

.stats-heatmap-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    font-size: 12px;
    color: #d4e2ff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    justify-self: start;
}

.stats-heatmap-thumb-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(192, 210, 255, 0.22);
    background: rgba(30, 44, 82, 0.66);
    display: grid;
    place-items: center;
}

.stats-heatmap-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stats-heatmap-thumb-placeholder {
    font-size: 13px;
    color: #d5e4ff;
}

.stats-heatmap-main {
    min-width: 0;
}

.stats-heatmap-model-name {
    font-size: 12px;
    color: #edf3ff;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-heatmap-author {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.stats-heatmap-author-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(189, 208, 255, 0.32);
    display: block;
}

.stats-heatmap-author-avatar.is-placeholder {
    display: grid;
    place-items: center;
    font-size: 10px;
    color: #e6f0ff;
    background: rgba(46, 66, 116, 0.7);
}

.stats-heatmap-author-name {
    min-width: 0;
    font-size: 11px;
    color: #b9caef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-heatmap-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-width: 48px;
    max-width: 74px;
    height: 24px;
    padding: 0 8px;
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #8fd2ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: none;
}

.stats-heatmap-empty {
    min-height: 68px;
    border-radius: 10px;
    border: 1px dashed rgba(164, 186, 244, 0.32);
    display: grid;
    place-items: center;
    font-size: 12px;
    color: #a9bde9;
    background: rgba(18, 30, 63, 0.35);
}

#stats-tab .loading {
    height: 100%;
    min-height: 220px;
    display: grid;
    place-items: center;
    padding: 24px;
}

@media (max-width: 1024px) {
    .stats-grid-two {
        grid-template-columns: 1fr;
    }

    .stats-grid-bars {
        grid-template-columns: 1fr;
    }

    .web-stats-kpi-grid,
    .web-stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-heatmap-metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .browser-backend-status-card,
    .dependency-update-card {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-kpi-card {
        padding: 16px 14px;
    }

    .stats-kpi-value {
        font-size: 1.9rem;
    }

    .stats-chart-lg {
        height: 340px;
    }

    .stats-chart-md {
        height: 300px;
    }

    .stats-chart-xl {
        height: 430px;
    }

    .stats-chart-sm {
        height: 300px;
    }

    .stats-chart-card {
        padding: 10px;
    }

    .stats-card-title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .stats-heatmap-window {
        padding: 12px 10px;
    }

    .stats-heatmap-window-header {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }

    .stats-heatmap-window-title {
        font-size: 14px;
    }

    .stats-heatmap-window-time {
        white-space: normal;
    }

    .stats-heatmap-item {
        grid-template-columns: 28px 40px minmax(0, 1fr) minmax(48px, max-content);
        gap: 6px;
        padding: 6px;
    }

    .stats-heatmap-thumb-wrap {
        width: 40px;
        height: 40px;
    }

    .stats-heatmap-value {
        font-size: 12px;
        min-width: 44px;
        max-width: 62px;
        height: 22px;
        padding: 0 6px;
    }
}

@media (max-width: 480px) {
    .stats-chart-lg {
        height: 320px;
    }

    .stats-chart-md {
        height: 280px;
    }

    .stats-chart-xl {
        height: 360px;
    }

    .stats-chart-sm {
        height: 280px;
    }
}

/* ==========================================================
   Pixel Theme System
   ========================================================== */
html[data-theme="traditional"],
html:not([data-theme]) {
    --pixel-bg-solid: #0b122f;
    --pixel-bg: linear-gradient(180deg, #0b122f 0%, #101432 48%, #121732 100%);
    --theme-bg-image: none;
    --theme-character-image: none;
    --theme-glass-start: rgba(24, 36, 74, 0.62);
    --theme-glass-end: rgba(13, 22, 52, 0.78);
    --theme-chip-glass: rgba(34, 49, 93, 0.62);
    --pixel-grid-line: rgba(180, 205, 255, 0.1);
    --pixel-scanline: rgba(255, 255, 255, 0.035);
    --pixel-panel: rgba(24, 33, 63, 0.72);
    --pixel-panel-strong: rgba(18, 27, 55, 0.9);
    --pixel-panel-soft: rgba(28, 41, 78, 0.58);
    --pixel-border: rgba(184, 208, 255, 0.26);
    --pixel-border-strong: rgba(196, 220, 255, 0.5);
    --pixel-text: #f4f7ff;
    --pixel-muted: #c6d0ef;
    --pixel-dim: #8fa0cf;
    --pixel-primary: #7eb5ff;
    --pixel-secondary: #73d2ff;
    --pixel-tertiary: #ff9b72;
    --pixel-danger: #ff6f8f;
    --pixel-warning: #ffc36b;
    --pixel-shadow: rgba(5, 10, 30, 0.58);
    --pixel-shadow-hard: rgba(1, 4, 15, 0.72);
    --panel-radius: 18px;
    --control-radius: 13px;
    --button-radius: 14px;
    --chip-radius: 999px;
}

html[data-theme="pokemon"] {
    --pixel-bg-solid: #071b44;
    --pixel-bg: linear-gradient(180deg, #071b44 0%, #0b2c66 54%, #10295c 100%);
    --theme-bg-image: url("/static/img/themes/pokemon-wallpaper-713986.webp");
    --theme-character-image: url("/static/img/themes/characters/pikachu-stickpng-580b57fc.webp");
    --theme-glass-start: rgba(20, 72, 142, 0.58);
    --theme-glass-end: rgba(86, 64, 15, 0.54);
    --theme-chip-glass: rgba(255, 222, 71, 0.22);
    --pixel-grid-line: rgba(255, 222, 71, 0.16);
    --pixel-scanline: rgba(255, 222, 71, 0.045);
    --pixel-panel: rgba(17, 42, 91, 0.76);
    --pixel-panel-strong: rgba(15, 32, 75, 0.92);
    --pixel-panel-soft: rgba(37, 79, 150, 0.5);
    --pixel-border: rgba(255, 222, 71, 0.42);
    --pixel-border-strong: rgba(255, 241, 130, 0.72);
    --pixel-text: #fffbea;
    --pixel-muted: #ffe78a;
    --pixel-dim: #9dc6ff;
    --pixel-primary: #ffde47;
    --pixel-secondary: #3b82f6;
    --pixel-tertiary: #ef4444;
    --pixel-danger: #ff5b5b;
    --pixel-warning: #ffd166;
    --pixel-shadow: rgba(3, 12, 36, 0.62);
    --pixel-shadow-hard: rgba(0, 5, 24, 0.76);
}

html[data-theme="digimon"] {
    --pixel-bg-solid: #041222;
    --pixel-bg: linear-gradient(180deg, #041222 0%, #06243a 54%, #0b182f 100%);
    --theme-bg-image: url("/static/img/themes/digimon-wallpaper-781242.webp");
    --theme-character-image: url("/static/img/themes/characters/agumon-stickpng-5c97c1ba.webp");
    --theme-glass-start: rgba(7, 75, 93, 0.58);
    --theme-glass-end: rgba(7, 21, 53, 0.78);
    --theme-chip-glass: rgba(39, 232, 215, 0.18);
    --pixel-grid-line: rgba(39, 232, 215, 0.15);
    --pixel-scanline: rgba(39, 232, 215, 0.042);
    --pixel-panel: rgba(5, 35, 55, 0.78);
    --pixel-panel-strong: rgba(8, 22, 47, 0.94);
    --pixel-panel-soft: rgba(13, 67, 90, 0.52);
    --pixel-border: rgba(39, 232, 215, 0.42);
    --pixel-border-strong: rgba(128, 255, 246, 0.68);
    --pixel-text: #f0fbff;
    --pixel-muted: #a8fff3;
    --pixel-dim: #8db8ff;
    --pixel-primary: #27e8d7;
    --pixel-secondary: #ff9f1c;
    --pixel-tertiary: #4f8cff;
    --pixel-danger: #ff5f87;
    --pixel-warning: #ffbf69;
    --pixel-shadow: rgba(0, 10, 22, 0.66);
    --pixel-shadow-hard: rgba(0, 5, 14, 0.8);
}

html[data-theme="onepiece"] {
    --pixel-bg-solid: #12233d;
    --pixel-bg: linear-gradient(180deg, #12233d 0%, #24395f 42%, #3a1f15 100%);
    --theme-bg-image: url("/static/img/themes/onepiece-wallpaper-1329624.webp");
    --theme-character-image: url("/static/img/themes/characters/luffy-pikpng-878575.webp");
    --theme-glass-start: rgba(22, 79, 99, 0.52);
    --theme-glass-end: rgba(86, 42, 22, 0.7);
    --theme-chip-glass: rgba(255, 206, 115, 0.2);
    --pixel-grid-line: rgba(255, 206, 115, 0.14);
    --pixel-scanline: rgba(255, 255, 255, 0.04);
    --pixel-panel: rgba(58, 31, 21, 0.76);
    --pixel-panel-strong: rgba(37, 24, 21, 0.92);
    --pixel-panel-soft: rgba(28, 68, 88, 0.5);
    --pixel-border: rgba(255, 206, 115, 0.42);
    --pixel-border-strong: rgba(255, 230, 156, 0.68);
    --pixel-text: #fff8e8;
    --pixel-muted: #ffdca4;
    --pixel-dim: #9fe8df;
    --pixel-primary: #ffce73;
    --pixel-secondary: #2dd4bf;
    --pixel-tertiary: #ef4444;
    --pixel-danger: #ff6b6b;
    --pixel-warning: #ffd166;
    --pixel-shadow: rgba(18, 8, 4, 0.62);
    --pixel-shadow-hard: rgba(9, 3, 1, 0.8);
}

html[data-theme] {
    --panel-radius: 18px;
    --control-radius: 13px;
    --button-radius: 14px;
    --chip-radius: 999px;
    --bg-primary: var(--pixel-bg-solid);
    --bg-secondary: var(--pixel-panel);
    --bg-tertiary: var(--pixel-panel-soft);
    --bg-card: var(--pixel-panel);
    --text-primary: var(--pixel-text);
    --text-secondary: var(--pixel-muted);
    --text-muted: var(--pixel-dim);
    --accent-primary: var(--pixel-primary);
    --accent-secondary: var(--pixel-secondary);
    --accent-danger: var(--pixel-danger);
    --accent-warning: var(--pixel-warning);
    --border-color: var(--pixel-border);
    --glass-bg: var(--pixel-panel);
    --glass-bg-strong: var(--pixel-panel-strong);
    --glass-border: var(--pixel-border-strong);
    --glass-border-soft: var(--pixel-border);
    --aurora-blue: var(--pixel-primary);
    --aurora-cyan: var(--pixel-secondary);
    --aurora-peach: var(--pixel-tertiary);
    --surface-text: var(--pixel-text);
    --surface-text-muted: var(--pixel-muted);
    --surface-shadow: var(--pixel-shadow);
}

html.theme-refreshing body {
    cursor: progress;
}

body {
    background:
        linear-gradient(180deg, rgba(4, 8, 19, 0.62), rgba(4, 8, 19, 0.78)),
        var(--theme-bg-image),
        var(--pixel-bg) !important;
    background-attachment: fixed, fixed, fixed;
    background-position: center, center, center;
    background-size: cover, cover, cover;
    color: var(--pixel-text);
}

body::before {
    opacity: 0.22;
    background-image:
        linear-gradient(var(--pixel-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--pixel-grid-line) 1px, transparent 1px),
        repeating-linear-gradient(0deg, transparent 0 7px, var(--pixel-scanline) 7px 8px);
    background-size: 18px 18px, 18px 18px, 100% 8px;
    mask-image: none;
    -webkit-mask-image: none;
}

.tech-glow {
    display: none;
}

.hero-shell,
.tabs,
.section,
.author-card,
.record-card,
.stats-kpi-card,
.stats-chart-panel,
.stats-heatmap-window,
.stats-heatmap-metric,
    .config-subtabs-shell,
    .config-subtabs,
.config-download-mode-block,
.cookie-editor-card,
.toast,
.dialog-container,
.logs-list,
.log-item,
.loading,
.empty,
.records-sentinel {
    border-radius: 0 !important;
    border-color: var(--pixel-border) !important;
    border-radius: var(--panel-radius) !important;
    background: linear-gradient(180deg, var(--theme-glass-start), var(--theme-glass-end)) !important;
    box-shadow: 0 18px 44px var(--pixel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.hero-shell {
    border-width: 2px !important;
    padding: 22px 24px;
}

.hero-shell::before,
.hero-shell::after {
    content: '';
    position: absolute;
    z-index: 0;
    right: clamp(10px, 3vw, 36px);
    bottom: -22px;
    width: clamp(130px, 18vw, 235px);
    height: min(92%, 250px);
    display: block;
    pointer-events: none;
    background-image: var(--theme-character-image);
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.78;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.42));
    mix-blend-mode: normal;
}

.hero-shell::marker {
    display: none;
}

.hero-top {
    align-items: flex-start;
}

.hero-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-brand,
.hero-status,
.site-chip,
.theme-switcher,
.crawl-duration-indicator,
.cookie-group-name-badge,
.badge-success,
.badge-warning,
.badge-danger,
.badge-info,
.badge-muted,
.stats-card-title,
.config-item-tag {
    border-radius: var(--chip-radius) !important;
    border-color: var(--pixel-border) !important;
    background: var(--theme-chip-glass) !important;
    color: var(--pixel-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 20px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.hero-dot {
    border-radius: 999px;
    background: var(--pixel-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pixel-primary) 18%, transparent);
    image-rendering: pixelated;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.theme-switcher-label {
    color: var(--pixel-muted);
    flex: 0 0 auto;
    white-space: nowrap;
}

.theme-select {
    min-height: 28px;
    max-width: 142px;
    border: 1px solid var(--pixel-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--pixel-panel-strong) 78%, transparent);
    color: var(--pixel-text);
    font: inherit;
    font-size: 12px;
    padding: 0 26px 0 8px;
    cursor: pointer;
}

.theme-select:focus {
    outline: 2px solid var(--pixel-primary);
    outline-offset: 2px;
}

header h1,
.section h2,
.stats-kpi-value,
.author-stat-value,
.record-info h3 {
    color: var(--pixel-text) !important;
    text-shadow: 2px 2px 0 var(--pixel-shadow-hard);
}

.header-subtitle,
small,
.author-id,
.author-stat-label,
.record-meta,
.log-time,
.log-model,
.stats-kpi-label,
.stats-kpi-sub,
.stats-heatmap-window-desc,
.stats-heatmap-author-name,
.authors-pagination-info {
    color: var(--pixel-muted) !important;
}

.tabs,
.config-subtabs {
    gap: 8px;
}

.tab-btn,
.config-subtab,
.records-subtab,
.download-mode-btn,
.btn,
.input,
.select,
textarea.input,
.author-search-input,
.cookie-group-action-btn,
.record-select-control,
.config-item,
.stats-heatmap-item,
.stats-heatmap-thumb-wrap,
.stats-heatmap-empty {
    border-radius: var(--control-radius) !important;
}

.tab-btn,
.config-subtab,
.records-subtab,
.download-mode-btn {
    color: var(--pixel-muted);
    border: 1px solid transparent;
}

.tab-btn:hover,
.config-subtab:hover,
.records-subtab:hover,
.download-mode-btn:hover {
    color: var(--pixel-text);
    background: color-mix(in srgb, var(--pixel-primary) 15%, transparent) !important;
    border-color: var(--pixel-border) !important;
}

.tab-btn.active,
.config-subtab.active,
.records-subtab.active,
.download-mode-btn.active {
    color: #07101c !important;
    background: linear-gradient(135deg, var(--pixel-primary), var(--pixel-secondary)) !important;
    border-color: var(--pixel-border-strong) !important;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--pixel-primary) 28%, transparent) !important;
}

.input,
.select,
textarea.input,
.author-search-input {
    background: color-mix(in srgb, var(--pixel-bg-solid) 62%, transparent) !important;
    border-color: var(--pixel-border) !important;
    color: var(--pixel-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.input:focus,
.select:focus,
textarea.input:focus,
.author-search-input:focus {
    border-color: var(--pixel-primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--pixel-primary) 36%, transparent), inset 3px 3px 0 rgba(0, 0, 0, 0.18) !important;
}

.btn {
    color: #08111d;
    border-radius: var(--button-radius) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--pixel-primary) 90%, white 4%), color-mix(in srgb, var(--pixel-secondary) 78%, transparent)) !important;
    border: 1px solid var(--pixel-border-strong) !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--pixel-primary) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--pixel-primary) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.btn-secondary {
    color: var(--pixel-text) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--pixel-panel-soft) 76%, transparent), color-mix(in srgb, var(--pixel-panel) 66%, transparent)) !important;
}

.btn-danger {
    color: #fff !important;
    background: linear-gradient(135deg, var(--pixel-danger), var(--pixel-tertiary)) !important;
}

.author-card::before,
.record-card::before,
.section::before,
.stats-kpi-card::before,
.stats-chart-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-top: 3px solid var(--pixel-primary);
    opacity: 0.85;
}

.section,
.stats-kpi-card,
.stats-chart-panel {
    position: relative;
    overflow: hidden;
}

.author-card:hover,
.record-card:hover,
.card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--pixel-border-strong) !important;
    box-shadow: 8px 8px 0 var(--pixel-shadow-hard) !important;
}

.author-model-count,
.record-status-badge,
.records-selected-count,
.stats-heatmap-rank,
.stats-heatmap-value,
.author-model-badge {
    color: #07101c !important;
    background: var(--pixel-primary) !important;
    border-radius: 999px !important;
}

.author-stats,
.perf-cell,
.stats-chart,
.stats-heatmap-metric,
.stats-heatmap-item,
.cookie-group-badge-item {
    background: color-mix(in srgb, var(--pixel-panel-soft) 74%, transparent) !important;
    border-color: var(--pixel-border) !important;
    border-radius: var(--control-radius) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.cookie-group-name-badge.cookie-group-status-normal {
    color: #04150d !important;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.94), rgba(22, 163, 74, 0.82)) !important;
    border-color: rgba(134, 239, 172, 0.82) !important;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.cookie-group-name-badge.cookie-group-status-pending {
    color: #241400 !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.96), rgba(245, 158, 11, 0.84)) !important;
    border-color: rgba(253, 230, 138, 0.84) !important;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.cookie-group-name-badge.cookie-group-status-limit {
    color: #fff7f7 !important;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.96), rgba(220, 38, 38, 0.86)) !important;
    border-color: rgba(254, 202, 202, 0.78) !important;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.cookie-group-name-badge.cookie-group-status-login-invalid {
    color: #f9fafb !important;
    background: linear-gradient(135deg, #111827, #020617) !important;
    border-color: rgba(249, 250, 251, 0.32) !important;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.record-meta a,
.author-name-link,
.author-entry,
.link-hint {
    color: var(--pixel-secondary) !important;
}

.badge-success,
.toast-success::before {
    color: #07101c !important;
    background: var(--pixel-secondary) !important;
}

.badge-warning,
.toast-warning::before {
    color: #201100 !important;
    background: var(--pixel-warning) !important;
}

.badge-danger,
.toast-error::before {
    color: #fff !important;
    background: var(--pixel-danger) !important;
}

.badge-info,
.toast-info::before {
    color: #07101c !important;
    background: var(--pixel-primary) !important;
}

.logs-list::-webkit-scrollbar-thumb {
    background: var(--pixel-primary);
}

.logs-list::-webkit-scrollbar-track {
    background: var(--pixel-panel-strong);
}

@media (max-width: 768px) {
    .hero-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .theme-switcher,
    .theme-select {
        width: 100%;
        max-width: none;
    }

    .theme-switcher {
        justify-content: space-between;
    }

    .hero-shell,
    .section,
    .author-card,
    .record-card {
        box-shadow: 0 14px 32px var(--pixel-shadow) !important;
    }

    .hero-shell::after {
        width: 112px;
        height: 150px;
        right: 10px;
        bottom: -20px;
        opacity: 0.46;
    }
}

/* ==========================================================
   Impeccable + Taste UI polish
   Product register: dense control-room UI, restrained atmosphere.
   ========================================================== */
html[data-theme="traditional"],
html:not([data-theme]) {
    --pixel-bg-solid: #08111f;
    --pixel-bg: linear-gradient(180deg, #08111f 0%, #0b1424 48%, #0d1728 100%);
    --theme-glass-start: rgba(17, 28, 48, 0.94);
    --theme-glass-end: rgba(10, 18, 32, 0.96);
    --theme-chip-glass: rgba(31, 48, 76, 0.78);
    --pixel-grid-line: rgba(136, 161, 196, 0.045);
    --pixel-scanline: transparent;
    --pixel-panel: rgba(17, 28, 48, 0.88);
    --pixel-panel-strong: rgba(9, 17, 31, 0.94);
    --pixel-panel-soft: rgba(24, 39, 64, 0.7);
    --pixel-border: rgba(132, 158, 197, 0.22);
    --pixel-border-strong: rgba(131, 183, 255, 0.42);
    --pixel-text: #f3f7ff;
    --pixel-muted: #b8c6de;
    --pixel-dim: #8797b0;
    --pixel-primary: #7bb7ff;
    --pixel-secondary: #5fd6c8;
    --pixel-tertiary: #d79a6a;
    --pixel-danger: #ef6f81;
    --pixel-warning: #e5b85a;
    --pixel-shadow: rgba(0, 5, 14, 0.48);
    --pixel-shadow-hard: rgba(0, 4, 12, 0.58);
    --panel-radius: 14px;
    --control-radius: 10px;
    --button-radius: 10px;
}

html[data-theme="traditional"] body,
html:not([data-theme]) body {
    background:
        radial-gradient(circle at 16% -8%, rgba(95, 214, 200, 0.12), transparent 30%),
        radial-gradient(circle at 88% 4%, rgba(123, 183, 255, 0.12), transparent 32%),
        var(--pixel-bg) !important;
}

html[data-theme="traditional"] body::before,
html:not([data-theme]) body::before {
    opacity: 0.12;
    background-image: linear-gradient(var(--pixel-grid-line) 1px, transparent 1px);
    background-size: 28px 28px;
}

html[data-theme="traditional"] .hero-shell::before,
html[data-theme="traditional"] .hero-shell::after,
html:not([data-theme]) .hero-shell::before,
html:not([data-theme]) .hero-shell::after {
    display: none;
}

body {
    font-family: Manrope, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.container {
    max-width: 1320px;
    padding: 24px;
}

.hero-shell,
.tabs,
.section,
.author-card,
.record-card,
.stats-kpi-card,
.stats-chart-panel,
.stats-heatmap-window,
.stats-heatmap-metric,
    .config-subtabs-shell,
    .config-subtabs,
.config-download-mode-block,
.cookie-editor-card,
.toast,
.dialog-container,
.logs-list,
.log-item,
.loading,
.empty,
.records-sentinel {
    box-shadow: 0 16px 34px var(--pixel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) saturate(118%);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
}

.hero-shell {
    display: grid;
    gap: 18px;
    padding: 24px 28px;
    border-width: 1px !important;
}

.hero-top,
.header-content {
    margin-bottom: 0;
}

.hero-brand,
.hero-status,
.site-chip,
.theme-switcher,
.crawl-duration-indicator,
.badge-success,
.badge-warning,
.badge-danger,
.badge-info,
.badge-muted {
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero-brand {
    font-family: Manrope, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.hero-dot {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pixel-primary) 18%, transparent);
}

header h1 {
    font-family: "Space Grotesk", Manrope, sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: 0;
    text-shadow: none;
    text-wrap: balance;
}

.header-subtitle {
    max-width: 720px;
    color: var(--pixel-muted) !important;
}

.header-sites {
    gap: 8px;
}

.site-chip {
    color: #dce7fb !important;
    background: rgba(30, 45, 72, 0.72) !important;
}

.tabs,
.config-subtabs {
    padding: 7px;
    gap: 6px;
}

.tab-btn,
.config-subtab,
.records-subtab,
.download-mode-btn {
    min-height: 44px;
    color: #c9d5e9;
    letter-spacing: 0;
}

.tab-btn.active,
.config-subtab.active,
.records-subtab.active,
.download-mode-btn.active {
    color: #06111f !important;
    background: linear-gradient(135deg, #89c6ff, #62d8c9) !important;
    box-shadow: 0 8px 18px rgba(95, 214, 200, 0.2) !important;
}

.section {
    padding: 24px;
}

.section::before,
.author-card::before,
.record-card::before,
.stats-kpi-card::before,
.stats-chart-panel::before {
    border-top-width: 2px;
    opacity: 0.62;
}

.section-header {
    display: grid;
    grid-template-columns: minmax(220px, max-content) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.section-header h2,
.section h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    letter-spacing: 0;
    text-shadow: none;
    text-wrap: balance;
}

.section-header h2 {
    max-width: 9em;
}

.header-actions {
    gap: 8px;
}

.input,
.select,
textarea.input,
.author-search-input {
    min-height: 44px;
    border-color: rgba(142, 168, 206, 0.3) !important;
    background: rgba(6, 13, 24, 0.64) !important;
}

.input::placeholder,
textarea.input::placeholder {
    color: #8fa0b8;
}

.input:focus,
.select:focus,
textarea.input:focus,
.author-search-input:focus,
.btn:focus-visible,
.tab-btn:focus-visible,
.config-subtab:focus-visible,
.records-subtab:focus-visible,
.dialog-close:focus-visible {
    outline: 2px solid var(--pixel-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pixel-primary) 18%, transparent) !important;
}

.btn {
    min-height: 44px;
    padding: 10px 16px;
    letter-spacing: 0;
    color: #06111f !important;
    background: linear-gradient(135deg, #8bc7ff, #62d8c9) !important;
    box-shadow: none !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(95, 214, 200, 0.18) !important;
}

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

.btn-secondary {
    color: #dce7fb !important;
    background: rgba(27, 42, 66, 0.78) !important;
    border-color: rgba(142, 168, 206, 0.26) !important;
}

.btn-danger {
    color: #fff !important;
    background: linear-gradient(135deg, #dd596b, #b94155) !important;
}

.btn:disabled {
    opacity: 0.48;
}

.author-card,
.record-card,
.stats-kpi-card,
.stats-chart-panel {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.author-card:hover,
.record-card:hover,
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0, 5, 14, 0.54) !important;
}

.author-card::after {
    content: '';
}

.author-name,
.record-info h3,
.stats-kpi-value,
.author-stat-value {
    text-shadow: none !important;
}

.author-stats {
    gap: 8px;
}

.records-bulk-toolbar {
    border-radius: var(--control-radius);
    border: 1px solid rgba(142, 168, 206, 0.22);
    background: rgba(7, 14, 26, 0.44);
}

.record-performance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid rgba(142, 168, 206, 0.24);
    background: rgba(123, 183, 255, 0.12);
    color: #a9d4ff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.author-stat-icon {
    border: 0;
    background: none;
    color: inherit;
    box-shadow: none;
}

.author-stat-label {
    margin-left: 2px;
}

@media (max-width: 960px) {
    .section-header {
        grid-template-columns: 1fr;
    }

    .authors-list-header {
        grid-template-columns: 1fr;
    }

    .authors-list-header .header-actions {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .section-header h2 {
        max-width: none;
    }
}

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

    .hero-shell {
        gap: 14px;
        padding: 18px 14px;
    }

    .hero-top {
        gap: 10px;
    }

    .hero-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .section {
        padding: 16px 14px;
    }

    .header-actions {
        grid-template-columns: 1fr;
    }

    .authors-list-header .header-actions {
        grid-template-columns: 1fr;
    }

    .authors-list-header .crawl-duration-indicator {
        grid-column: span 1;
    }

    .tab-btn {
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================
   Archive Control Room refresh
   ========================================================== */
:root {
    --control-bg: #070b12;
    --control-bg-soft: #0c121d;
    --control-panel: #101824;
    --control-panel-strong: #141e2c;
    --control-panel-muted: #0c141f;
    --control-line: #263447;
    --control-line-strong: #3a4c63;
    --control-text: #edf4ff;
    --control-text-soft: #b9c7d8;
    --control-text-muted: #8190a3;
    --control-accent: #32d6b0;
    --control-accent-strong: #24b898;
    --control-accent-ink: #03120f;
    --control-info: #7eb5ff;
    --control-warning: #f2b84b;
    --control-danger: #f06f7d;
    --control-success: #5cdf9a;
    --control-radius: 10px;
    --control-radius-sm: 8px;
    --control-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    --control-focus: 0 0 0 3px rgba(50, 214, 176, 0.22);
}

html {
    background: var(--control-bg);
}

body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #080d15 0%, #0a1019 46%, #070b12 100%) !important;
    color: var(--control-text);
    font-family: Inter, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.5;
}

.tech-grid,
.tech-glow,
body::before,
body::after {
    display: none !important;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 100000;
    transform: translateY(-140%);
    border: 1px solid var(--control-accent);
    border-radius: var(--control-radius-sm);
    padding: 10px 14px;
    background: var(--control-panel-strong);
    color: var(--control-text);
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
    outline: none;
    box-shadow: var(--control-focus);
}

.container {
    width: min(100%, 1500px);
    max-width: 1500px;
    padding: 24px;
}

.hero-shell {
    position: relative !important;
    top: auto;
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px 22px !important;
    overflow: hidden;
    border: 1px solid var(--control-line) !important;
    border-radius: 14px !important;
    background:
        linear-gradient(180deg, rgba(18, 28, 42, 0.96), rgba(13, 20, 31, 0.98)) !important;
    box-shadow: var(--control-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.hero-shell::before,
.hero-shell::after,
header::before {
    display: none !important;
}

.hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    color: var(--control-text-soft);
    font-size: 13px;
    font-weight: 800;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--control-success);
    box-shadow: 0 0 0 5px rgba(92, 223, 154, 0.1);
}

.header-content {
    position: relative;
    z-index: 1;
    display: grid;
    max-width: 920px;
    gap: 8px;
}

.hero-kicker {
    margin: 0;
    color: var(--control-accent);
    font-size: 12px;
    font-weight: 800;
}

.header-content h1 {
    margin: 0;
    color: var(--control-text);
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: 0;
    text-shadow: none !important;
}

.hero-subtitle {
    max-width: 68ch;
    margin: 0;
    color: var(--control-text-soft);
    font-size: 15px;
}

.hero-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hero-status span,
.crawl-duration-indicator,
.records-sentinel,
.records-themes-meta,
.record-performance-item,
.record-badge,
.cookie-group-name-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(126, 181, 255, 0.26);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(126, 181, 255, 0.08);
    color: #d8e6f7;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switcher,
.showcase-theme-switcher {
    min-height: 38px;
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius) !important;
    padding: 4px 6px 4px 10px !important;
    background: var(--control-panel-muted) !important;
    color: var(--control-text-soft) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.theme-switcher-label,
.showcase-theme-switcher span {
    font-size: 12px;
    font-weight: 800;
}

.theme-select,
.showcase-theme-switcher select {
    min-height: 30px;
    border: 0 !important;
    border-radius: 7px !important;
    background: #172232 !important;
    color: var(--control-text) !important;
    font: inherit;
    font-size: 13px;
}

.tabs {
    position: sticky;
    top: 10px;
    z-index: 70;
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
    overflow-x: auto;
    border: 1px solid var(--control-line) !important;
    border-radius: 12px !important;
    padding: 6px !important;
    background: rgba(9, 14, 23, 0.94) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    scrollbar-width: none;
}

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

.tab-btn,
.config-subtab,
.records-subtab,
.download-mode-btn {
    min-height: 38px;
    border: 1px solid transparent !important;
    border-radius: var(--control-radius-sm) !important;
    padding: 9px 14px !important;
    background: transparent !important;
    color: var(--control-text-soft) !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tab-btn:hover,
.config-subtab:hover,
.records-subtab:hover,
.download-mode-btn:hover {
    border-color: rgba(126, 181, 255, 0.28) !important;
    background: rgba(126, 181, 255, 0.1) !important;
    color: var(--control-text) !important;
}

.tab-btn.active,
.config-subtab.active,
.records-subtab.active,
.download-mode-btn.active {
    border-color: rgba(50, 214, 176, 0.42) !important;
    background: rgba(50, 214, 176, 0.16) !important;
    color: #dffff6 !important;
}

.tab-content {
    animation: none !important;
}

.section,
.author-card,
.record-card,
.stats-kpi-card,
.stats-chart-panel,
.config-download-mode-block,
.browser-backend-status-card,
.cookie-editor-card,
.theme-rule-card,
.dialog-container,
.toast,
.loading,
.empty {
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius) !important;
    background: var(--control-panel) !important;
    color: var(--control-text);
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.section {
    margin-bottom: 16px;
    padding: 18px !important;
}

.section:hover,
.author-card:hover,
.record-card:hover,
.stats-kpi-card:hover {
    box-shadow: none !important;
}

.section h2,
.section-header h2,
.advanced-cooling-section h3,
.stats-card-title {
    margin: 0 0 14px;
    border: 0 !important;
    padding: 0 !important;
    color: var(--control-text) !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    text-shadow: none !important;
}

.section-header,
.advanced-cooling-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.header-actions,
.log-search-actions,
.stats-filter-actions,
.cookie-editor-actions,
.record-actions,
.authors-pagination-actions,
.config-subtab-actions {
    gap: 8px;
}

.authors-list-header .header-actions {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

.authors-list-header h2 {
    min-width: 128px;
}

.authors-toolbar,
.filter-bar,
.stats-filter-bar {
    border: 1px solid var(--control-line);
    border-radius: var(--control-radius);
    padding: 12px;
    background: var(--control-panel-muted);
}

.authors-toolbar {
    grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(130px, 1fr)) auto auto;
}

.form-group label,
.config-field-label,
.advanced-cooling-field span,
.stats-filter-item label,
.author-stat-label {
    color: var(--control-text-soft) !important;
    font-size: 13px;
    font-weight: 740;
}

.input,
.select,
textarea.input,
.author-search-input {
    min-height: 40px;
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius-sm) !important;
    background: #0a111b !important;
    color: var(--control-text) !important;
    font: inherit;
    font-size: 14px;
    box-shadow: none !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input::placeholder,
.author-search-input::placeholder {
    color: #91a0b3;
}

.input:focus,
.select:focus,
.theme-select:focus,
.author-search-input:focus,
.showcase-theme-switcher select:focus {
    outline: none !important;
    border-color: var(--control-accent) !important;
    box-shadow: var(--control-focus) !important;
}

.input:disabled,
.select:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.download-main-btn,
.author-model-link,
.theme-load-more-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent !important;
    border-radius: var(--control-radius-sm) !important;
    padding: 9px 14px !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 780 !important;
    letter-spacing: 0;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn::before {
    display: none !important;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.download-main-btn:hover,
.author-model-link:hover,
.theme-load-more-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: none !important;
}

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

.btn-primary,
.download-main-btn,
.author-model-link,
.theme-load-more-btn {
    border-color: rgba(50, 214, 176, 0.52) !important;
    background: var(--control-accent) !important;
    color: var(--control-accent-ink) !important;
}

.btn-primary:hover,
.download-main-btn:hover,
.author-model-link:hover,
.theme-load-more-btn:hover:not(:disabled) {
    background: var(--control-accent-strong) !important;
}

.btn-secondary {
    border-color: var(--control-line-strong) !important;
    background: #172232 !important;
    color: var(--control-text) !important;
}

.btn-secondary:hover {
    border-color: rgba(126, 181, 255, 0.46) !important;
    background: #1c2a3d !important;
}

.btn-danger {
    border-color: rgba(240, 111, 125, 0.55) !important;
    background: rgba(240, 111, 125, 0.16) !important;
    color: #ffdbe0 !important;
}

.btn-danger:hover {
    background: rgba(240, 111, 125, 0.24) !important;
}

.btn:focus-visible,
.tab-btn:focus-visible,
.config-subtab:focus-visible,
.records-subtab:focus-visible,
.record-card:focus-visible,
.records-theme-card:focus-visible {
    outline: none;
    box-shadow: var(--control-focus) !important;
}

small,
.single-model-crawl-hint,
.stats-filter-hint,
.theme-rules-help,
.authors-pagination-info,
.record-meta,
.stats-kpi-sub,
.web-stats-table,
.date-range span {
    color: var(--control-text-muted) !important;
}

.authors-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.author-card {
    gap: 14px;
    padding: 16px !important;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.author-card::before,
.author-card::after {
    display: none !important;
}

.author-card:hover {
    border-color: rgba(50, 214, 176, 0.42) !important;
    background: var(--control-panel-strong) !important;
}

.author-avatar,
.author-avatar-placeholder {
    width: 64px;
    height: 64px;
    border: 1px solid var(--control-line-strong) !important;
    border-radius: 12px !important;
    background: #162333 !important;
    box-shadow: none !important;
}

.author-name,
.author-name-link,
.record-info h3,
.stats-kpi-value,
.author-stat-value {
    color: var(--control-text) !important;
    text-shadow: none !important;
}

.author-text {
    padding-right: 64px;
}

.author-name,
.author-id,
.author-name-link {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-name-link {
    display: inline-block;
    vertical-align: bottom;
}

.author-id,
.author-stat-text {
    color: var(--control-text-soft) !important;
}

.author-model-count,
.badge-success,
.toast-success .toast-icon {
    border-color: rgba(92, 223, 154, 0.42) !important;
    background: rgba(92, 223, 154, 0.14) !important;
    color: #bff6d5 !important;
}

.author-stats {
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius-sm) !important;
    padding: 12px !important;
    background: var(--control-panel-muted) !important;
}

.author-site-badge {
    border: 1px solid var(--control-line-strong);
    border-radius: 999px;
    background: #0a111b;
    color: var(--control-text-soft);
}

.records-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.record-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    min-height: 210px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.record-card::before {
    display: none !important;
}

.record-card:hover {
    border-color: rgba(50, 214, 176, 0.42) !important;
    background: var(--control-panel-strong) !important;
}

.record-card.is-selected {
    border-color: rgba(50, 214, 176, 0.68) !important;
    box-shadow: inset 0 0 0 1px rgba(50, 214, 176, 0.2) !important;
}

.record-card.is-skip-download,
.record-card.is-software-print-only,
.record-card.is-link-error {
    background: #111823 !important;
}

.record-select-control {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--control-line-strong);
    border-radius: 8px;
    background: rgba(7, 11, 18, 0.86);
}

.record-image {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    background: #0a111b !important;
}

.record-info {
    min-width: 0;
    padding: 14px !important;
}

.record-info h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.35;
}

.record-meta {
    margin-bottom: 5px;
    font-size: 12.5px;
}

.record-meta strong {
    color: var(--control-text-soft) !important;
}

.record-meta a,
.author-name-link,
.origin-link,
.author-entry {
    color: #9fd5ff !important;
    text-decoration: none !important;
}

.record-meta a:hover,
.author-name-link:hover,
.origin-link:hover,
.author-entry:hover {
    color: #c9e8ff !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.record-performance {
    gap: 6px;
}

.record-performance-item {
    min-height: 28px;
    padding: 4px 8px;
    border-color: rgba(126, 181, 255, 0.22);
}

.record-performance-icon {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--control-info);
}

.record-performance-delta.is-up {
    color: var(--control-success);
}

.record-performance-delta.is-down {
    color: var(--control-danger);
}

.record-actions {
    flex-wrap: wrap;
    margin-top: auto;
}

.badge-warning {
    border-color: rgba(242, 184, 75, 0.42) !important;
    background: rgba(242, 184, 75, 0.13) !important;
    color: #ffe3a5 !important;
}

.badge-danger,
.toast-error .toast-icon {
    border-color: rgba(240, 111, 125, 0.44) !important;
    background: rgba(240, 111, 125, 0.14) !important;
    color: #ffd1d7 !important;
}

.badge-info {
    border-color: rgba(126, 181, 255, 0.42) !important;
    background: rgba(126, 181, 255, 0.14) !important;
    color: #d6e9ff !important;
}

.badge-muted {
    border-color: var(--control-line-strong) !important;
    background: rgba(129, 144, 163, 0.12) !important;
    color: var(--control-text-soft) !important;
}

.records-themes-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
}

.records-theme-card {
    min-height: 220px;
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius) !important;
    background: var(--control-panel) !important;
    box-shadow: none !important;
}

.records-theme-card:hover {
    border-color: rgba(50, 214, 176, 0.42) !important;
    box-shadow: none !important;
}

.records-theme-card-shade {
    background: linear-gradient(90deg, rgba(7, 11, 18, 0.92), rgba(7, 11, 18, 0.52), rgba(7, 11, 18, 0.12));
}

.records-theme-card-body {
    width: min(64%, 430px);
}

.records-theme-name {
    font-size: clamp(28px, 4vw, 48px);
    text-shadow: none !important;
}

.stats-grid-two,
.web-stats-grid,
.stats-grid-bars {
    gap: 14px;
}

.stats-kpi-card,
.stats-chart-panel {
    padding: 16px !important;
    background: var(--control-panel-muted) !important;
}

.stats-kpi-card::before,
.stats-chart-panel::before {
    display: none !important;
}

.stats-kpi-label {
    color: var(--control-text-soft) !important;
    font-size: 12px !important;
    font-weight: 800;
}

.stats-kpi-value {
    font-size: 2rem !important;
    letter-spacing: 0;
}

.stats-chart {
    min-height: 260px;
}

.stats-chart-sm {
    min-height: 220px;
}

.config-subtabs-shell {
    top: 10px;
    border: 1px solid var(--control-line) !important;
    border-radius: 12px !important;
    background: rgba(9, 14, 23, 0.94) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26) !important;
}

.config-download-mode-block,
.browser-backend-status-card,
.dependency-update-card,
.cookie-editor-card,
.theme-rule-card {
    background: var(--control-panel-muted) !important;
}

.browser-backend-status-card.is-ok {
    border-color: rgba(92, 223, 154, 0.38) !important;
}

.browser-backend-status-card.is-fallback,
.dependency-update-card.is-update-available {
    border-color: rgba(242, 184, 75, 0.42) !important;
}

.dependency-update-card.is-error {
    border-color: rgba(240, 142, 160, 0.42) !important;
}

.cookie-group-action-btn {
    border: 1px solid var(--control-line) !important;
    background: #0a111b !important;
    color: var(--control-text-soft) !important;
}

.cookie-recovery-status,
.web-stats-table,
.stats-heatmap-metric {
    border: 1px solid var(--control-line) !important;
    border-radius: var(--control-radius-sm) !important;
    background: var(--control-panel-muted) !important;
}

.toast-container {
    top: 18px;
    right: 18px;
}

.toast {
    border-color: var(--control-line) !important;
    background: var(--control-panel-strong) !important;
}

.toast::before {
    width: 3px;
}

.toast-message,
.dialog-title,
.dialog-message {
    color: var(--control-text) !important;
}

.dialog-overlay {
    background: rgba(3, 6, 10, 0.72) !important;
}

.dialog-header,
.dialog-footer {
    border-color: var(--control-line) !important;
}

.dialog-close {
    color: var(--control-text-soft) !important;
}

.loading,
.empty {
    padding: 34px 20px !important;
    color: var(--control-text-soft) !important;
    text-align: center;
}

@media (max-width: 1100px) {
    .authors-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .log-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .container {
        padding: 12px;
    }

    .hero-shell {
        padding: 16px !important;
    }

    .hero-top,
    .section-header,
    .advanced-cooling-header {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-controls,
    .theme-switcher,
    .theme-select {
        width: 100%;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .tabs {
        top: 6px;
    }

    .authors-toolbar,
    .log-search-form,
    .stats-filter-bar,
    .cookie-editor-grid {
        grid-template-columns: 1fr;
    }

    .record-card {
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 180px;
    }

    .record-image {
        min-height: 180px;
    }

    .records-theme-card-body {
        width: 76%;
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .record-card {
        display: block;
    }

    .record-image {
        height: 190px;
        min-height: 190px;
    }

    .records-grid,
    .records-themes-grid,
    .authors-list {
        grid-template-columns: 1fr;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        margin-right: 0;
    }
}

/* ==========================================================
   Theme media restoration and records grid correction
   ========================================================== */
html[data-theme="pokemon"] body,
html[data-theme="digimon"] body,
html[data-theme="onepiece"] body {
    background:
        linear-gradient(180deg, rgba(4, 8, 19, 0.5), rgba(4, 8, 19, 0.78)),
        var(--theme-bg-image),
        var(--pixel-bg) !important;
    background-attachment: fixed, fixed, fixed;
    background-position: center, center, center;
    background-size: cover, cover, cover;
}

html[data-theme="pokemon"] body::before,
html[data-theme="digimon"] body::before,
html[data-theme="onepiece"] body::before {
    content: '';
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image:
        linear-gradient(var(--pixel-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--pixel-grid-line) 1px, transparent 1px),
        repeating-linear-gradient(0deg, transparent 0 7px, var(--pixel-scanline) 7px 8px);
    background-size: 22px 22px, 22px 22px, 100% 8px;
    mask-image: none;
    -webkit-mask-image: none;
}

html[data-theme="pokemon"] .hero-shell,
html[data-theme="digimon"] .hero-shell,
html[data-theme="onepiece"] .hero-shell {
    border-color: var(--pixel-border) !important;
    background:
        linear-gradient(180deg, var(--theme-glass-start), var(--theme-glass-end)) !important;
    box-shadow: 0 18px 44px var(--pixel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="pokemon"] .hero-shell::after,
html[data-theme="digimon"] .hero-shell::after,
html[data-theme="onepiece"] .hero-shell::after {
    content: '';
    display: block !important;
    position: absolute;
    z-index: 0;
    right: clamp(10px, 3.5vw, 46px);
    bottom: -30px;
    width: clamp(150px, 18vw, 270px);
    height: min(104%, 285px);
    pointer-events: none;
    background-image: var(--theme-character-image);
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.84;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.46));
}

html[data-theme="pokemon"] .hero-shell::before,
html[data-theme="digimon"] .hero-shell::before,
html[data-theme="onepiece"] .hero-shell::before {
    display: none !important;
}

html[data-theme="pokemon"] .hero-top,
html[data-theme="pokemon"] .header-content,
html[data-theme="digimon"] .hero-top,
html[data-theme="digimon"] .header-content,
html[data-theme="onepiece"] .hero-top,
html[data-theme="onepiece"] .header-content {
    position: relative;
    z-index: 1;
}

html[data-theme="pokemon"] .header-content,
html[data-theme="digimon"] .header-content,
html[data-theme="onepiece"] .header-content {
    max-width: min(920px, calc(100% - clamp(160px, 20vw, 300px)));
}

.records-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px;
    margin-top: 18px;
}

.record-card {
    display: flex !important;
    min-height: 0 !important;
    height: 100%;
    flex-direction: column;
}

.record-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--control-line);
    background:
        linear-gradient(135deg, rgba(126, 181, 255, 0.16), rgba(50, 214, 176, 0.08)),
        #0a111b;
}

.record-image {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    flex: 0 0 auto;
}

.record-cover .record-image {
    position: absolute;
    inset: 0;
    height: 100% !important;
    aspect-ratio: auto;
}

.record-cover-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--control-text-muted);
    font-size: 13px;
    font-weight: 780;
    letter-spacing: 0;
}

.record-cover.is-loaded .record-cover-fallback {
    display: none;
}

.record-info {
    min-width: 0;
    flex: 1 1 auto;
}

.record-actions {
    margin-top: auto;
}

@media (max-width: 1180px) {
    .records-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    html[data-theme="pokemon"] .hero-shell,
    html[data-theme="digimon"] .hero-shell,
    html[data-theme="onepiece"] .hero-shell {
        padding-bottom: clamp(118px, 30vw, 160px) !important;
    }

    html[data-theme="pokemon"] .hero-shell::after,
    html[data-theme="digimon"] .hero-shell::after,
    html[data-theme="onepiece"] .hero-shell::after {
        right: 18px;
        bottom: -20px;
        width: clamp(118px, 34vw, 170px);
        height: 168px;
        opacity: 0.76;
    }

    html[data-theme="pokemon"] .header-content,
    html[data-theme="digimon"] .header-content,
    html[data-theme="onepiece"] .header-content {
        max-width: none;
    }

    .records-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================
   Mobile drawer tabs and collapsible query panels
   ========================================================== */
.mobile-disclosure-toggle {
    display: none;
}

.mobile-disclosure-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.mobile-disclosure-title,
.mobile-disclosure-summary,
.mobile-disclosure-state {
    letter-spacing: 0;
}

.mobile-disclosure-title {
    color: var(--control-text);
    font-size: 14px;
    font-weight: 820;
    line-height: 1.25;
}

.mobile-disclosure-summary {
    max-width: 100%;
    overflow: hidden;
    color: var(--control-text-soft);
    font-size: 12px;
    font-weight: 680;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-disclosure-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 28px;
    border: 1px solid rgba(50, 214, 176, 0.34);
    border-radius: 999px;
    background: rgba(50, 214, 176, 0.12);
    color: #dffff6;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 780px) {
    .mobile-disclosure-toggle {
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 0 8px;
        padding: 10px 12px;
        border: 1px solid var(--control-line);
        border-radius: var(--control-radius);
        background: var(--control-panel-muted);
        color: var(--control-text);
        font: inherit;
        cursor: pointer;
        text-align: left;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-disclosure-toggle:focus-visible {
        outline: 2px solid rgba(50, 214, 176, 0.72);
        outline-offset: 2px;
    }

    .mobile-disclosure-toggle.is-open .mobile-disclosure-state {
        border-color: rgba(126, 181, 255, 0.42);
        background: rgba(126, 181, 255, 0.13);
        color: var(--control-text);
    }

    .mobile-nav-toggle {
        position: sticky;
        top: 6px;
        z-index: 91;
        background: rgba(9, 14, 23, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-nav-drawer {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
        max-height: 380px;
        margin: 0 0 14px !important;
        overflow: hidden !important;
        border: 1px solid var(--control-line) !important;
        border-radius: var(--control-radius) !important;
        padding: 8px !important;
        background: rgba(9, 14, 23, 0.96) !important;
        box-shadow: none !important;
        transition: max-height 180ms ease, opacity 160ms ease, padding 180ms ease, border-width 180ms ease, margin 180ms ease;
    }

    .mobile-nav-drawer.is-mobile-collapsed {
        max-height: 0;
        margin-bottom: 8px !important;
        opacity: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-width: 0 !important;
        pointer-events: none;
    }

    .mobile-nav-drawer .tab-btn,
    .mobile-nav-drawer .config-subtab,
    .mobile-nav-drawer .records-subtab {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        text-align: left;
    }

    .config-subtabs-shell {
        position: relative !important;
        top: auto !important;
        z-index: 1;
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .config-subtab-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }

    .config-subtab-actions .btn {
        width: 100%;
    }

    .mobile-collapsible-content {
        max-height: 1500px;
        overflow: hidden;
        transition: max-height 180ms ease, opacity 160ms ease, padding 180ms ease, margin 180ms ease, border-width 180ms ease;
    }

    .mobile-collapsible-content.is-mobile-collapsed {
        max-height: 0;
        margin-top: 0 !important;
        margin-bottom: 10px !important;
        opacity: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-width: 0 !important;
        pointer-events: none;
    }

    .mobile-query-toggle {
        margin-top: 4px;
    }

    .section > .mobile-query-toggle:first-child {
        margin-top: 0;
    }

    .search-form,
    .log-search-form,
    .authors-toolbar,
    .stats-filter-bar {
        gap: 10px !important;
    }

    .search-form .form-group:last-child,
    .log-search-actions,
    .stats-filter-actions {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .authors-list-header .header-actions {
        grid-template-columns: 1fr !important;
    }

    .authors-list-header .crawl-duration-indicator {
        grid-column: auto !important;
        white-space: normal;
        text-align: center;
    }
}

/* Mobile drawer v2: side sheet like native app navigation */
.mobile-drawer-backdrop {
    display: none;
}

@media (max-width: 780px) {
    body.has-mobile-drawer-open {
        overflow: hidden;
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: block;
        border: 0;
        background: rgba(2, 4, 8, 0.62);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .mobile-drawer-backdrop.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-toggle {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 0px) + 14px);
        left: 14px;
        z-index: 82;
        width: 48px !important;
        min-width: 48px;
        max-width: 48px;
        height: 48px;
        min-height: 48px !important;
        justify-content: center;
        margin: 0 0 10px !important;
        padding: 0 !important;
        border-radius: 999px !important;
        background: rgba(15, 20, 29, 0.9) !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-nav-toggle-secondary {
        top: calc(env(safe-area-inset-top, 0px) + 14px);
        left: 70px;
    }

    .mobile-nav-toggle .mobile-disclosure-copy {
        display: none;
    }

    .mobile-nav-toggle.is-open {
        position: fixed !important;
        top: 18px;
        left: calc(min(82vw, 350px) - 64px);
        z-index: 92;
        margin: 0 !important;
        background: rgba(31, 34, 41, 0.94) !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
    }

    .mobile-disclosure-state {
        position: relative;
        min-width: 34px;
        width: 34px;
        height: 34px;
        min-height: 34px;
        border-radius: 999px;
        font-size: 0 !important;
    }

    .mobile-nav-toggle .mobile-disclosure-state {
        min-width: 22px;
        width: 22px;
        height: 22px;
        min-height: 22px;
        border: 0;
        background: transparent;
        color: #f4f7fb;
    }

    .mobile-nav-toggle .mobile-disclosure-state::before {
        content: '';
        width: 18px;
        height: 2px;
        display: block;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
    }

    .mobile-nav-toggle.is-open .mobile-disclosure-state::before {
        content: '×';
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        font-size: 28px;
        font-weight: 500;
        line-height: 20px;
    }

    .mobile-query-toggle .mobile-disclosure-state::before {
        content: '+';
        color: inherit;
        font-size: 24px;
        font-weight: 680;
        line-height: 1;
    }

    .mobile-query-toggle.is-open .mobile-disclosure-state::before {
        content: '−';
    }

    .mobile-nav-drawer {
        position: fixed !important;
        inset: 0 auto 0 0;
        z-index: 90;
        width: min(82vw, 350px);
        height: 100dvh;
        max-height: none !important;
        display: flex !important;
        flex-direction: column;
        grid-template-columns: none;
        align-items: stretch;
        gap: 10px !important;
        margin: 0 !important;
        padding: 74px 14px 20px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border: 0 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 0 30px 30px 0 !important;
        background: rgba(3, 5, 8, 0.98) !important;
        box-shadow: 18px 0 42px rgba(0, 0, 0, 0.42) !important;
        opacity: 1;
        transform: translateX(0);
        transition: transform 220ms ease, opacity 180ms ease !important;
    }

    .mobile-nav-drawer.is-mobile-collapsed {
        max-height: none !important;
        margin: 0 !important;
        padding: 74px 14px 20px !important;
        border-right-width: 1px !important;
        opacity: 0;
        transform: translateX(-104%);
        pointer-events: none;
    }

    .mobile-nav-drawer::before {
        content: attr(data-mobile-drawer-title);
        display: block;
        margin: 0 0 14px;
        padding: 0 18px;
        color: rgba(244, 247, 251, 0.92);
        font-size: 18px;
        font-weight: 820;
        line-height: 1.25;
    }

    .mobile-nav-drawer .tab-btn,
    .mobile-nav-drawer .config-subtab,
    .mobile-nav-drawer .records-subtab {
        min-height: 54px;
        display: flex;
        align-items: center;
        gap: 14px;
        border-radius: 12px !important;
        padding: 0 18px !important;
        color: rgba(235, 241, 252, 0.78) !important;
        font-size: 16px !important;
        font-weight: 760 !important;
    }

    .mobile-nav-drawer .tab-btn::before,
    .mobile-nav-drawer .config-subtab::before,
    .mobile-nav-drawer .records-subtab::before {
        width: 24px;
        flex: 0 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: rgba(244, 247, 251, 0.92);
        font-size: 20px;
        line-height: 1;
    }

    .mobile-nav-drawer .tab-btn:nth-of-type(1)::before,
    .mobile-nav-drawer .config-subtab:nth-of-type(1)::before,
    .mobile-nav-drawer .records-subtab:nth-of-type(1)::before {
        content: '▥';
    }

    .mobile-nav-drawer .tab-btn:nth-of-type(2)::before,
    .mobile-nav-drawer .config-subtab:nth-of-type(2)::before,
    .mobile-nav-drawer .records-subtab:nth-of-type(2)::before {
        content: '▣';
    }

    .mobile-nav-drawer .tab-btn:nth-of-type(3)::before,
    .mobile-nav-drawer .config-subtab:nth-of-type(3)::before,
    .mobile-nav-drawer .records-subtab:nth-of-type(3)::before {
        content: '◷';
    }

    .mobile-nav-drawer .tab-btn:nth-of-type(4)::before,
    .mobile-nav-drawer .config-subtab:nth-of-type(4)::before,
    .mobile-nav-drawer .records-subtab:nth-of-type(4)::before {
        content: '◎';
    }

    .mobile-nav-drawer .tab-btn:nth-of-type(n+5)::before,
    .mobile-nav-drawer .config-subtab:nth-of-type(n+5)::before,
    .mobile-nav-drawer .records-subtab:nth-of-type(n+5)::before {
        content: '•••';
        font-size: 15px;
    }

    .mobile-nav-drawer .tab-btn.active,
    .mobile-nav-drawer .config-subtab.active,
    .mobile-nav-drawer .records-subtab.active {
        background: rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important;
    }

    .mobile-query-toggle {
        min-height: 58px;
    }

    .container {
        padding-top: calc(env(safe-area-inset-top, 0px) + 76px) !important;
    }
}

/* Mobile drawer v3: one hierarchy menu + one page-level UI fold control */
.mobile-menu-drawer,
.mobile-ui-fold-toggle {
    display: none;
}

@media (max-width: 780px) {
    .tabs,
    .records-subtabs,
    .config-subtabs {
        display: none !important;
    }

    .mobile-menu-drawer {
        display: flex !important;
    }

    .mobile-nav-toggle-primary {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 0px) + 14px) !important;
        left: 14px !important;
        z-index: 82;
    }

    .mobile-ui-fold-toggle {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 14px);
        left: 70px;
        z-index: 82;
        width: 48px;
        height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(126, 181, 255, 0.28);
        border-radius: 999px;
        background: rgba(15, 20, 29, 0.9);
        color: #f4f7fb;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-ui-fold-toggle[hidden] {
        display: none !important;
    }

    .mobile-ui-fold-toggle span::before {
        content: '+';
        display: block;
        color: inherit;
        font-size: 28px;
        font-weight: 620;
        line-height: 1;
    }

    .mobile-ui-fold-toggle.is-expanded span::before {
        content: '\2212';
    }

    body.has-mobile-drawer-open .mobile-ui-fold-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-ui-fold-target {
        transition: max-height 180ms ease, opacity 160ms ease, margin 180ms ease, padding 180ms ease, border-width 180ms ease;
    }

    .mobile-ui-fold-target.is-ui-fold-collapsed {
        display: none !important;
        max-height: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-width: 0 !important;
        opacity: 0;
        overflow: hidden !important;
        pointer-events: none;
    }

    .mobile-menu-group,
    .mobile-menu-children {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-menu-group {
        margin: 0;
    }

    .mobile-menu-children {
        margin: 2px 0 8px;
        padding-left: 0;
    }

    .mobile-menu-children.is-collapsed {
        display: none !important;
    }

    .mobile-nav-drawer.mobile-menu-drawer {
        width: min(82vw, 350px);
        padding-top: 74px !important;
    }

    .mobile-menu-item {
        width: 100%;
        min-height: 52px;
        display: flex;
        align-items: center;
        gap: 14px;
        border: 1px solid transparent;
        border-radius: 12px;
        padding: 0 18px;
        background: transparent;
        color: rgba(235, 241, 252, 0.78);
        font: inherit;
        font-size: 16px;
        font-weight: 760;
        text-align: left;
        cursor: pointer;
    }

    .mobile-menu-parent {
        position: relative;
        padding-right: 46px;
    }

    .mobile-menu-item::before {
        width: 24px;
        flex: 0 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: rgba(244, 247, 251, 0.92);
        font-size: 19px;
        line-height: 1;
    }

    .mobile-menu-parent::after {
        content: '›';
        position: absolute;
        right: 18px;
        top: 50%;
        color: rgba(244, 247, 251, 0.68);
        font-size: 24px;
        line-height: 1;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 160ms ease, color 160ms ease;
    }

    .mobile-menu-parent.is-expanded::after {
        color: #ffffff;
        transform: translateY(-50%) rotate(90deg);
    }

    .mobile-menu-depth-0::before {
        content: '▥';
    }

    .mobile-menu-depth-1 {
        min-height: 44px;
        margin-left: 18px;
        width: calc(100% - 18px);
        color: rgba(219, 228, 244, 0.74);
        font-size: 14px;
    }

    .mobile-menu-depth-1::before {
        content: '›';
        font-size: 22px;
    }

    .mobile-menu-item.active {
        border-color: rgba(50, 214, 176, 0.42);
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
    }

    .mobile-menu-parent.is-current-parent {
        border-color: rgba(126, 181, 255, 0.24);
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.94);
    }
}

/* Mobile drawer v4: controls live inside the hero frame */
.mobile-top-controls {
    display: none;
}

@media (max-width: 780px) {
    .container {
        padding-top: 12px !important;
    }

    .hero-shell {
        position: relative;
        padding-top: 18px !important;
    }

    .mobile-top-controls {
        position: relative;
        z-index: 93;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 22px;
    }

    .mobile-top-controls .mobile-nav-toggle,
    .mobile-top-controls .mobile-ui-fold-toggle {
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        top: auto !important;
        z-index: 93;
        flex: 0 0 auto;
        margin: 0 !important;
    }

    .mobile-top-controls .mobile-nav-toggle.is-open {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        z-index: 94;
        border-color: rgba(126, 181, 255, 0.38) !important;
        background: rgba(22, 29, 42, 0.98) !important;
        color: #ffffff !important;
    }

    .mobile-top-controls .mobile-nav-toggle.is-open .mobile-disclosure-state {
        color: #ffffff !important;
    }

    .mobile-top-controls .mobile-ui-fold-toggle {
        display: inline-flex;
    }

    .mobile-top-controls .mobile-ui-fold-toggle[hidden] {
        display: none !important;
    }

    .desktop-hero-controls,
    .desktop-theme-switcher {
        display: none !important;
    }
}
