:root {
    --ink: #172033;
    --muted: #67728a;
    --canvas: #f4f7fb;
    --surface: #ffffff;
    --line: #e2e7ef;
    --navy: #10213d;
    --blue: #246bfd;
    --blue-dark: #1854ce;
    --green: #14a673;
    --green-bg: #e9f8f2;
    --red: #dc4054;
    --red-bg: #feeff1;
    --amber: #b87508;
    --amber-bg: #fff7df;
    --shadow: 0 12px 35px rgba(26, 45, 79, .08);
    --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 20px; color: #dce6f7; background: linear-gradient(165deg, #10213d 0%, #0b172c 100%); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, #5a91ff, #246bfd); color: white; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 7px 20px rgba(36,107,253,.35); }
.brand strong, .brand small { display: block; }
.brand strong { color: white; font-size: 16px; }
.brand small { color: #99a9c3; font-size: 12px; letter-spacing: .04em; }
.sidebar nav { display: grid; gap: 6px; margin-top: 42px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; color: #aebbd0; text-decoration: none; border-radius: 10px; font-weight: 650; }
.nav-link span { width: 21px; text-align: center; font-size: 18px; }
.nav-link:hover, .nav-link:focus-visible { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.is-active { color: #fff; background: rgba(60,123,255,.2); box-shadow: inset 3px 0 0 #5a91ff; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip > span:last-child { min-width: 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: #91a2be; font-size: 11px; }
.avatar { flex: none; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: white; background: #2b4267; font-weight: 800; }
.logout-button { margin-top: 14px; width: 100%; border: 0; border-radius: 8px; padding: 8px; cursor: pointer; color: #adbbd0; background: rgba(255,255,255,.05); }
.logout-button:hover { color: white; background: rgba(255,255,255,.09); }
.main-column { min-width: 0; }
.topbar { height: 92px; display: flex; align-items: center; gap: 18px; padding: 0 34px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar > div { margin-right: auto; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.eyebrow { margin: 0 0 2px; color: #8490a6; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 34px 60px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin-bottom: 20px; }
.stat-card { min-height: 112px; display: flex; align-items: center; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card p { margin: 0; color: var(--muted); font-weight: 650; }
.stat-card strong { display: block; margin-top: 2px; font-size: 29px; letter-spacing: -.04em; }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 20px; font-weight: 900; }
.stat-icon.neutral { color: var(--blue); background: #edf3ff; }.stat-icon.active { color: var(--green); background: var(--green-bg); }.stat-icon.disabled { color: var(--red); background: var(--red-bg); }.stat-icon.warning { color: var(--amber); background: var(--amber-bg); }
.mode-banner, .cache-banner { margin: 0 0 16px; padding: 13px 17px; border-radius: 11px; }
.mode-banner { color: #194f95; background: #eaf2ff; border: 1px solid #ccddfa; }
.cache-banner { color: #72510b; background: var(--amber-bg); border: 1px solid #f1dea4; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 78px; padding: 19px 23px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }.panel-meta { color: var(--muted); font-size: 13px; }
.site-row { position: relative; display: grid; grid-template-columns: minmax(260px,1.4fr) 150px 185px minmax(330px,auto); align-items: center; gap: 20px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.site-row:last-child { border-bottom: 0; }
.site-row:hover { background: #fbfcff; }
.site-identity { min-width: 0; display: flex; align-items: center; gap: 13px; }.site-favicon { flex: none; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #dce4f1; border-radius: 12px; color: #315585; background: #f2f6fc; font-weight: 800; }
.site-identity h3 { margin: 0; font-size: 15px; }.site-identity a { display: block; max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; text-decoration: none; }.site-identity a:hover { color: var(--blue); }
.site-status { display: grid; justify-items: start; gap: 5px; }.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }.status-active { color: #087a53; background: var(--green-bg); }.status-disabled { color: #bf2e42; background: var(--red-bg); }.status-warning { color: #966108; background: var(--amber-bg); }.mismatch { color: var(--amber); font-size: 10px; font-weight: 700; }
.site-changed span, .site-changed small { display: block; color: var(--muted); font-size: 11px; }.site-changed strong { display: block; font-size: 12px; }.site-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.switch-button { position: relative; width: 45px; height: 25px; padding: 0; border: 0; border-radius: 99px; cursor: pointer; background: var(--red); transition: background .2s; }.switch-button span { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.22); transition: transform .2s; }.switch-button[data-current-status="active"] { background: var(--green); }.switch-button[data-current-status="active"] span { transform: translateX(20px); }.switch-button:disabled { opacity: .45; cursor: not-allowed; }.switch-button.is-loading { animation: pulse .7s infinite alternate; }
.site-result { grid-column: 1 / -1; margin: -5px 0 0 56px; padding: 9px 12px; border-radius: 8px; font-size: 12px; }.result-success { color: #086946; background: var(--green-bg); }.result-warning { color: #7b550a; background: var(--amber-bg); }.result-error { color: #a82638; background: var(--red-bg); }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; text-decoration: none; font-weight: 750; transition: .15s ease; }.button:hover { transform: translateY(-1px); }.button:disabled { opacity: .55; cursor: wait; transform: none; }.button.compact { min-height: 34px; padding: 0 11px; font-size: 12px; }.button.full { width: 100%; }.button-primary { color: white; background: var(--blue); box-shadow: 0 6px 15px rgba(36,107,253,.2); }.button-primary:hover { background: var(--blue-dark); }.button-secondary { color: #1c5abe; border-color: #c8d9f7; background: #edf4ff; }.button-ghost { color: #48556b; border-color: var(--line); background: white; }.button-danger { color: white; background: var(--red); }.button-warning { color: #81570a; border-color: #ecd693; background: var(--amber-bg); }
.alert { margin-bottom: 17px; padding: 13px 16px; border-radius: 10px; border: 1px solid; }.alert-success { color: #086946; border-color: #bce8d7; background: var(--green-bg); }.alert-error { color: #a82638; border-color: #f3c6cc; background: var(--red-bg); }.alert-warning { color: #79530a; border-color: #ecd999; background: var(--amber-bg); }
.page-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.7fr); align-items: start; gap: 20px; }.stack { display: grid; gap: 20px; }.form-panel { padding-bottom: 3px; }.form-stack { display: grid; gap: 18px; padding: 24px; }.form-stack label:not(.setting-toggle) { display: grid; gap: 7px; color: #354157; font-weight: 700; }.form-stack input, .form-stack select { width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); background: white; border: 1px solid #cfd7e5; border-radius: 9px; outline: none; }.form-stack input:focus, .form-stack select:focus { border-color: #5b8dff; box-shadow: 0 0 0 3px rgba(36,107,253,.12); }.field-row { display: grid; grid-template-columns: minmax(180px,.65fr) minmax(0,1.35fr); gap: 15px; }.field-help, .muted { margin: -5px 0 0; color: var(--muted); }.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }.info-card { padding: 23px; }.info-card h3 { margin: 0 0 8px; }.info-card p { color: var(--muted); }.info-card form { margin-top: 16px; }.danger-zone { border-color: #f3cbd0; }.text-active { color: var(--green); }.text-disabled { color: var(--red); }.narrow-panel { max-width: 760px; }
.setting-toggle { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto; gap: 0 14px; align-items: center; cursor: pointer; }.setting-toggle input { position: absolute; opacity: 0; pointer-events: none; }.setting-switch { position: relative; grid-row: 1; width: 48px; height: 27px; border-radius: 99px; background: #b9c1ce; }.setting-switch::after { content: ''; position: absolute; width: 21px; height: 21px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s; }.setting-toggle input:checked + .setting-switch { background: var(--blue); }.setting-toggle input:checked + .setting-switch::after { transform: translateX(21px); }.setting-toggle > span:last-child { grid-column: 2; }.setting-toggle strong, .setting-toggle small { display: block; }.setting-toggle small { color: var(--muted); font-weight: 400; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }.detail-list dt { color: var(--muted); }.detail-list dd { margin: 0; font-weight: 650; }
.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; }th { color: #707d93; background: #f8fafe; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }tr:last-child td { border-bottom: 0; }.agent-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }.empty-cell { padding: 40px; color: var(--muted); text-align: center; }.pagination { display: flex; justify-content: flex-end; gap: 8px; padding: 15px; border-top: 1px solid var(--line); }
.empty-state { padding: 60px 25px; text-align: center; }.empty-state h2, .empty-state h3 { margin: 10px 0 5px; }.empty-state p { color: var(--muted); }.empty-icon { width: 52px; height: 52px; margin: 0 auto; display: grid; place-items: center; border-radius: 15px; color: var(--blue); background: #edf3ff; font-size: 25px; font-weight: 800; }
.confirm-dialog { width: min(430px, calc(100% - 30px)); padding: 28px; border: 0; border-radius: 18px; box-shadow: 0 25px 80px rgba(8,21,43,.3); }.confirm-dialog::backdrop { background: rgba(11,23,44,.65); backdrop-filter: blur(2px); }.confirm-dialog h2 { margin: 14px 0 4px; }.confirm-dialog p { color: var(--muted); }.dialog-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: var(--red-bg); font-size: 22px; font-weight: 900; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(430px, calc(100% - 48px)); padding: 13px 17px; color: white; background: var(--navy); border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,.25); }.toast-error { background: #a82638; }.toast-warning { background: #825b10; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; color: var(--ink); background: radial-gradient(circle at 10% 10%, #e3edff, transparent 33%), #eef3f9; }.login-shell { width: min(960px,100%); min-height: 610px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: white; border: 1px solid #dce3ee; border-radius: 24px; box-shadow: 0 30px 80px rgba(19,43,77,.15); }.login-panel { padding: 56px 62px; }.login-brand { margin-bottom: 70px; }.login-brand strong { color: var(--ink); }.login-brand small { color: var(--muted); }.login-panel h1 { margin: 4px 0 4px; font-size: 34px; letter-spacing: -.04em; }.login-panel .form-stack { padding: 20px 0 0; }.login-note { margin-top: 25px; color: #8a94a7; font-size: 11px; text-align: center; }.login-aside { padding: 60px; display: flex; flex-direction: column; justify-content: flex-end; color: white; background: linear-gradient(150deg, #17335e, #0d1c34); }.login-aside h2 { margin: 50px 0 5px; font-size: 30px; }.login-aside p { margin: 0; color: #b8c7de; }.signal-orbit { position: relative; width: 250px; height: 250px; margin: auto; display: grid; place-items: center; border: 1px solid rgba(116,161,255,.2); border-radius: 50%; }.signal-orbit::before, .signal-orbit::after { content: ''; position: absolute; border: 1px solid rgba(116,161,255,.2); border-radius: 50%; }.signal-orbit::before { inset: 32px; }.signal-orbit::after { inset: 66px; }.signal-orbit > span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #62d7ae; box-shadow: 0 0 15px #62d7ae; }.signal-orbit > span:nth-child(1) { top: 28px; left: 55px; }.signal-orbit > span:nth-child(2) { right: 12px; top: 112px; }.signal-orbit > span:nth-child(3) { bottom: 24px; left: 72px; }.shield { z-index: 2; width: 70px; height: 78px; display: grid; place-items: center; border: 2px solid #70a2ff; border-radius: 22px 22px 32px 32px; color: #72e5bb; font-size: 29px; background: #183867; box-shadow: 0 0 40px rgba(60,129,255,.28); }
@keyframes pulse { to { opacity: .45; } }
@media (max-width: 1180px) { .site-row { grid-template-columns: minmax(240px,1fr) 135px minmax(300px,auto); }.site-changed { display: none; }.stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 820px) { .app-shell { display: block; }.sidebar { position: fixed; left: -280px; width: 260px; transition: left .2s; box-shadow: 15px 0 40px rgba(0,0,0,.2); }.sidebar.is-open { left: 0; }.menu-button { display: block; }.topbar { height: 78px; padding: 0 18px; }.topbar .button { display: none; }.content { padding: 20px 15px 45px; }.site-row { grid-template-columns: 1fr auto; gap: 13px; }.site-status { justify-self: end; }.site-actions { grid-column: 1 / -1; justify-content: flex-start; }.site-result { margin-left: 0; }.page-grid { grid-template-columns: 1fr; }.login-shell { grid-template-columns: 1fr; min-height: 0; max-width: 500px; }.login-panel { padding: 42px 34px; }.login-brand { margin-bottom: 45px; }.login-aside { display: none; } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.stat-card { min-height: 92px; padding: 14px; gap: 10px; }.stat-icon { width: 38px; height: 38px; border-radius: 10px; }.stat-card strong { font-size: 24px; }.stat-card p { font-size: 11px; }.field-row { grid-template-columns: 1fr; }.site-row { padding: 17px; }.site-identity a { max-width: 230px; }.dialog-actions { flex-direction: column-reverse; }.dialog-actions .button { width: 100%; } }
