:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #0b0e14;
    color: #e8edf5;
    font-synthesis: none;
    --muted: #8b97ac;
    --border: #232b3b;
    --accent: #a78bfa;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; background: #10141e; border-right: 1px solid var(--border); padding: 32px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 7px; font-size: 21px; font-weight: 750; letter-spacing: -.7px; }
.brand > span:last-child { color: var(--muted); font-weight: 450; margin-left: -5px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 11px; color: #fff; background: #7c3aed; margin-right: 5px; }
.nav-caption { color: #637089; font-size: 10px; letter-spacing: 2px; margin: 48px 12px 16px; font-weight: 700; }
nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 14px; padding: 13px 15px; color: var(--muted); border: 1px solid transparent; border-radius: 9px; font-size: 14px; }
.nav-link > span { width: 18px; font-size: 20px; text-align: center; }
.nav-link:hover { color: #eee; background: #191f2c; }
.nav-link[aria-current="page"] { color: #c4b5fd; background: #241d3d; border-color: #3b2d60; }
.nav-submenu { margin-left: 20px; font-size: 13px; }
.table-sort { display: inline-flex; align-items: center; gap: 12px; border: 0; padding: 0; background: transparent; color: var(--accent); font: inherit; text-transform: inherit; letter-spacing: inherit; }
.table-sort:hover { color: #eee; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--border); padding: 22px 8px 0; color: #b5c0d3; font-size: 12px; }
.sidebar-footer small { display: block; color: #637089; margin-top: 10px; font-size: 10px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; margin-right: 7px; }
.status-dot.online { background: #34d399; box-shadow: 0 0 9px #34d39955; }
.status-dot.offline { background: #fb7185; }
main { margin-left: 244px; padding: 38px 42px 22px; max-width: 1840px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.eyebrow { color: #66738b; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; margin: 0 0 14px; }
.eyebrow span { color: #a0abc0; }
h1 { font-size: 30px; letter-spacing: -.9px; margin: 0 0 8px; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; gap: 9px; align-items: center; justify-content: center; color: #dfe6f4; background: #1b2232; border: 1px solid #344057; border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 600; }
.button:hover { background: #293149; }
.button > span { font-size: 20px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.metric, .panel { background: #121722; border: 1px solid var(--border); border-radius: 12px; }
.metric { padding: 20px; }
.metric p { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: #a3afc2; margin: 0 0 15px; }
.metric-icon { color: #34d399; background: #142c29; border-radius: 7px; padding: 5px 9px; font-size: 16px; }
.metric-icon.purple { color: #b79cfa; background: #29213f; }
.metric-icon.blue { color: #60a5fa; background: #192a42; }
.metric strong { display: block; font-size: 30px; font-weight: 650; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.metric .time-value { font-size: 25px; line-height: 36px; }
.metric small { display: block; color: #738099; font-size: 11px; margin-top: 10px; line-height: 1.6; }
.panel { margin-bottom: 24px; overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; }
h2 { font-size: 15px; margin: 0 0 7px; font-weight: 600; }
.panel-header p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.5; }
.badge { font-size: 9px; font-weight: 700; letter-spacing: 1.1px; color: #6ee7b7; border: 1px solid #22513f; background: #122c24; padding: 6px 9px; border-radius: 5px; white-space: nowrap; }
.chart-container { height: 280px; position: relative; padding: 0 22px; }
.chart-message { position: absolute; inset: 35% 20px auto; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.chart-note { color: #738099; font-size: 11px; padding: 0 24px 18px; margin: 12px 0 0; }
.count-badge { background: #1c2433; color: #aebbd0; font-size: 11px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { background: #151c28; color: #78869f; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 13px 24px; }
td { padding: 18px 24px; border-top: 1px solid var(--border); font-size: 12px; color: #bdc8da; }
td strong { display: block; font-size: 13px; color: #e2e8f0; font-weight: 550; }
td small { display: block; color: #77869f; margin-top: 6px; }
.state { display: inline-flex; align-items: center; gap: 6px; color: #fda4af; background: #351e2b; border-radius: 5px; padding: 5px 9px; font-size: 11px; }
.state.running { color: #6ee7b7; background: #153129; }
.state::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.log-button { background: transparent; border: 1px solid #344057; color: #c4b5fd; border-radius: 6px; padding: 7px 11px; font-size: 11px; }
.log-button:hover { background: #27223d; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); white-space: normal; line-height: 1.7; }
.error-banner { border: 1px solid #713043; color: #fecdd3; background: #321b26; padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: 13px; }
.select-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
select { min-width: 180px; max-width: 100%; padding: 9px; background: #1b2232; color: #e2e8f0; border: 1px solid #344057; border-radius: 6px; }
pre { background: #0a1019; color: #b6c7db; margin: 0; padding: 24px; height: 460px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; border-top: 1px solid var(--border); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding: 0 24px 24px; }
.project-card { background: #191f2c; border: 1px solid var(--border); padding: 20px; border-radius: 8px; overflow-wrap: anywhere; }
.project-card h3 { font-size: 14px; margin: 0 0 12px; }
.project-card p { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0; }
.project-card .log-button { margin-top: 16px; }
.settings-content { padding: 0 24px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; border-top: 1px solid var(--border); }
.setting-row strong { font-size: 13px; font-weight: 550; }
.setting-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.6; }
.database-toolbar, .database-query-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 24px 12px; }
.database-toolbar .select-label { color: #a3afc2; }
.database-toolbar select { min-width: 160px; }
.database-status { min-height: 18px; color: #6ee7b7; font-size: 11px; margin: 0; padding: 0 24px 8px; }
.database-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 14px 24px; color: var(--muted); font-size: 11px; }
.database-warning { color: #fbbf24; background: #2b2416; border: 1px solid #5a4520; border-radius: 7px; padding: 12px 14px; margin: 0 24px 16px; font-size: 12px; line-height: 1.6; }
.database-query-label { display: block; color: #a3afc2; font-size: 12px; margin: 0 24px 8px; }
textarea { display: block; width: calc(100% - 48px); resize: vertical; margin: 0 24px; padding: 14px; color: #b6c7db; background: #0a1019; border: 1px solid #344057; border-radius: 6px; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
textarea:disabled { opacity: .55; cursor: not-allowed; }
.database-query-actions { padding-top: 12px; color: var(--muted); font-size: 11px; }
.database-data-table { min-width: 100%; }
.database-data-table td { max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
.database-row-actions { display: flex; gap: 6px; }
.database-row-actions .log-button { white-space: nowrap; }
.danger-button { color: #fda4af; border-color: #713043; }
.danger-button:hover { background: #351e2b; }
dialog { width: min(620px, calc(100% - 32px)); max-height: 85vh; overflow: auto; color: #e8edf5; background: #121722; border: 1px solid #344057; border-radius: 12px; padding: 24px; }
dialog::backdrop { background: #05070bcc; }
dialog h2 { margin-bottom: 20px; }
.database-row-fields { display: grid; gap: 14px; }
.database-field { display: grid; gap: 7px; color: #a3afc2; font-size: 12px; }
.database-field > input { width: 100%; padding: 10px; color: #e2e8f0; background: #0a1019; border: 1px solid #344057; border-radius: 6px; }
.database-null-label { display: flex; align-items: center; gap: 7px; color: #77869f; font-size: 11px; }
.database-null-label input { accent-color: #8b5cf6; }
.database-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
input[type="checkbox"] { width: 19px; height: 19px; accent-color: #8b5cf6; cursor: pointer; flex-shrink: 0; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; color: #5f6c83; font-size: 10px; padding: 6px 0; }
@media (min-width: 1840px) { main { margin-right: auto; } }
@media (max-width: 1200px) {
    main { padding: 28px 24px; }
    .sidebar { width: 218px; padding: 28px 16px; }
    main { margin-left: 218px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .sidebar { position: static; width: 100%; padding: 18px 16px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
    .brand { font-size: 19px; margin-bottom: 18px; }
    .nav-caption, .sidebar-footer { display: none; }
    nav { display: flex; overflow-x: auto; gap: 5px; }
    .nav-link { padding: 9px 10px; font-size: 12px; gap: 6px; white-space: nowrap; }
    .nav-link > span { font-size: 16px; }
    main { margin-left: 0; padding: 24px 16px; }
    h1 { font-size: 25px; }
    .subtitle { font-size: 12px; }
    .page-header { gap: 10px; }
    .button { padding: 8px 12px; }
    .metrics { gap: 10px; }
    .metric { padding: 15px; }
    .metric strong { font-size: 26px; }
    .metric .time-value { font-size: 21px; }
    .metric p { font-size: 11px; }
    .panel-header { padding: 18px 16px; flex-wrap: wrap; }
    .chart-container { height: 250px; padding: 0 12px; }
    th, td { padding: 14px 16px; }
    .badge { font-size: 8px; }
    .page-footer { font-size: 9px; }
    .project-grid { padding: 0 16px 16px; }
    .select-label { flex-wrap: wrap; }
    .database-toolbar { padding-inline: 16px; }
    .database-pagination { padding-inline: 16px; }
    .database-warning { margin-inline: 16px; }
    .database-query-label { margin-inline: 16px; }
    textarea { width: calc(100% - 32px); margin-inline: 16px; }
    .database-query-actions { padding-inline: 16px; }
}
 .mirror-delivery { min-width: 180px; max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
 .mirror-error-text { color: #fca5a5; white-space: normal; }
 #mirrors-search { background: #111827; border: 1px solid #334155; border-radius: 6px; color: inherit; padding: 8px; max-width: 100%; }
.operations-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0 18px; }
.operations-heading .eyebrow { color: #a78bfa; margin-bottom: 8px; }
.operations-heading h2 { font-size: 19px; letter-spacing: -.4px; }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.overview-card { display: flex; flex-direction: column; min-width: 0; gap: 9px; border: 1px solid #30304a; border-radius: 12px; padding: 22px; background: linear-gradient(135deg, #201d35, #131a27); transition: border-color .2s, transform .2s; }
.overview-card:nth-child(2) { background: linear-gradient(135deg, #192e31, #131a27); }
.overview-card:nth-child(3) { background: linear-gradient(135deg, #1d2841, #131a27); }
.overview-card:nth-child(4) { background: linear-gradient(135deg, #2c2236, #131a27); }
.overview-card:hover { border-color: #a78bfa; transform: translateY(-3px); }
.overview-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; }
.overview-label > span { color: #a78bfa; }
.overview-card strong { font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.overview-card > span:not(.overview-label) { color: #b6c1d5; font-size: 11px; }
.overview-card small { margin-top: auto; padding-top: 12px; border-top: 1px solid #ffffff0d; color: #8d9cb5; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.overview-card.needs-attention small, .overview-card.unavailable small { color: #fbbf24; }
.alerts-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; margin-bottom: 24px; border: 1px solid #2a3d3c; border-radius: 12px; background: linear-gradient(100deg, #142725, #131923); }
.alerts-strip h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.alerts-strip p, .alerts-strip small { color: #a8b8c5; font-size: 12px; line-height: 1.8; margin: 8px 0 0; }
.alerts-strip small { color: #7f95a8; font-size: 11px; }
.alerts-strip .button { flex-shrink: 0; }
.badge.warning { color: #fbbf24; border-color: #5a4520; background: #2b2416; }
@media (max-width: 1200px) { .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .operations-heading, .alerts-strip { align-items: flex-start; flex-direction: column; }
    .operations-heading h2 { font-size: 17px; }
    .overview-grid { gap: 10px; }
    .overview-card { padding: 15px; }
    .overview-label { font-size: 12px; }
    .alerts-strip { padding: 18px 16px; }
}
