:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --lime: #a3e635;
    --lime-dark: #3f6212;
    --green: #16a34a;
    --red: #dc2626;
    --amber: #d97706;
    --gray: #64748b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; }
.topbar { min-height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #0f172a; color: #fff; border-bottom: 4px solid var(--lime); }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand span { font-size: 22px; font-weight: 900; letter-spacing: .08em; }
.brand small { color: #cbd5e1; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: #dbe3ef; text-decoration: none; font-size: 14px; }
.topbar nav a:hover { color: #fff; }
.topbar .nav-primary { padding: 9px 13px; border-radius: 8px; background: var(--lime); color: #17220a; font-weight: 800; }
.container { width: min(1280px, calc(100% - 40px)); margin: 30px auto 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }
.subtitle { margin: 7px 0 0; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button, button { appearance: none; border: 0; border-radius: 9px; padding: 10px 14px; background: #0f172a; color: #fff; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { opacity: .9; }
.button-secondary { background: #fff; color: #0f172a; border: 1px solid var(--line); }
.button-danger { background: #fff; color: var(--red); border: 1px solid #fecaca; }
.button-small { padding: 7px 10px; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.stat strong { display: block; font-size: 30px; margin-top: 4px; }
.stat span { color: var(--muted); font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, .035); }
.panel-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
.site-name { font-weight: 800; text-decoration: none; }
.site-url { display: block; max-width: 300px; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-up { color: var(--green); background: #dcfce7; }
.badge-down { color: var(--red); background: #fee2e2; }
.badge-degraded { color: var(--amber); background: #fef3c7; }
.badge-paused, .badge-unknown { color: var(--gray); background: #e2e8f0; }
.code { display: inline-block; min-width: 48px; padding: 5px 8px; border-radius: 7px; text-align: center; background: #eef2f7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.notice { border-radius: 11px; padding: 13px 15px; margin-bottom: 18px; border: 1px solid; }
.notice-ok { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.notice-warn { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.notice-error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.flash { padding: 13px 15px; border-radius: 10px; margin-bottom: 16px; }
.flash-success { color: #166534; background: #dcfce7; }
.flash-error { color: #991b1b; background: #fee2e2; }
.flash-info { color: #1e40af; background: #dbeafe; }
.form-card { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 25px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.field input { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 12px 13px; font: inherit; outline: none; }
.field input:focus { border-color: #65a30d; box-shadow: 0 0 0 3px rgba(163, 230, 53, .25); }
.help { color: var(--muted); font-size: 12px; margin-top: 6px; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #23314b 0, #0f172a 55%, #080d17 100%); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 24px 80px rgba(0,0,0,.32); }
.login-logo { font-size: 28px; font-weight: 950; letter-spacing: .1em; }
.login-logo::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 9px; background: var(--lime); }
.login-card h1 { font-size: 24px; margin-top: 25px; }
.login-card button { width: 100%; padding: 13px; background: #0f172a; }
.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-bottom: 20px; }
.detail-list { margin: 0; }
.detail-list div { display: grid; grid-template-columns: 180px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 700; word-break: break-word; }
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; padding-block: 16px; }
    .topbar nav { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 22px, 1280px); margin-top: 18px; }
    .topbar { display: block; }
    .topbar nav { margin-top: 15px; justify-content: flex-start; gap: 12px; }
    .page-head { display: block; }
    .page-head .actions { margin-top: 15px; }
    .stats { grid-template-columns: 1fr 1fr; }
    th, td { padding: 12px 10px; }
}
.field select { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 12px 13px; font: inherit; background: #fff; outline: none; }
.field select:focus { border-color: #65a30d; box-shadow: 0 0 0 3px rgba(163, 230, 53, .25); }
.infra-badge { display:inline-flex; padding:5px 8px; border-radius:7px; font-size:11px; font-weight:800; background:#eef2ff; color:#3730a3; white-space:nowrap; }
.infra-loading { background:#e0f2fe; color:#075985; }
.infra-vps { background:#f3e8ff; color:#6b21a8; }
.button-disabled { opacity:.55; cursor:not-allowed; }
.node-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.node-card { border:1px solid var(--line); border-radius:11px; background:#fff; padding:13px 15px; }
.node-card strong { display:block; margin-bottom:4px; }
@media (max-width:620px) { .node-grid { grid-template-columns:1fr; } }
.performance-panel {
    margin-bottom: 20px;
}

.performance-ranges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.performance-range.is-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.performance-chart-wrap {
    position: relative;
    height: 360px;
    padding: 20px 20px 5px;
}

.performance-summary {
    padding: 12px 20px 18px;
    text-align: center;
}

@media (max-width: 620px) {
    .performance-chart-wrap {
        height: 300px;
        padding-inline: 10px;
    }

    .performance-ranges {
        margin-top: 10px;
    }
}