
:root{color-scheme:dark;--bg:#081222;--panel:#101f34;--line:#263c56;--text:#e5edf8;--muted:#a2b6cd;--cyan:#55d9ff;--blue:#176bd6}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 system-ui,sans-serif}header{background:linear-gradient(110deg,#101e34,#102b48);border-bottom:1px solid #28577a;padding:22px max(20px,5%);display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}main{max-width:1280px;margin:auto;padding:24px}.brand{color:var(--cyan);font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:13px;display:block}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:15px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:16px;overflow:auto;box-shadow:0 4px 14px #0002}.grid .panel:has(.metric){border-top:2px solid #248be6}.metric{font-size:32px;font-weight:750;color:var(--cyan);font-variant-numeric:tabular-nums}h1{font-size:22px;margin:0;line-height:1.3}h2{font-size:17px;margin:0 0 16px;color:#f0f6ff}button,select,input{padding:10px;border:1px solid #38516e;border-radius:7px;font:inherit;background:#0a1729;color:var(--text);max-width:100%}button{background:var(--blue);border-color:#3888e9;color:white;cursor:pointer;font-weight:600}button:hover{background:#125bb8}a{color:var(--cyan)}a:hover{color:#a5edff}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.barrow{display:grid;grid-template-columns:minmax(65px,130px) minmax(20px,1fr) 65px;gap:10px;align-items:center;margin:9px 0}.barrow span{overflow-wrap:anywhere}.track{background:#24364e;height:12px;border-radius:5px;overflow:hidden}.track div{background:linear-gradient(90deg,#2379e6,#43d4f5);height:100%}.barrow b{text-align:right;font-variant-numeric:tabular-nums}table{border-collapse:collapse;width:100%}td,th{text-align:left;padding:10px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}th{color:#b9d7ef;background:#0b192b;font-size:13px}tr:hover td{background:#172b43}small{color:var(--muted)}.toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:20px}.toolbar h2{margin:0}nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;padding:10px;background:#0c1a2c;border:1px solid var(--line);border-radius:10px}nav a,.pagination a{padding:9px 13px;border-radius:6px;background:#13243a;text-decoration:none;border:1px solid var(--line);color:#c5d8ed}nav a:hover,.pagination a:hover{background:#203b58;color:white}nav a.active{background:#176bd6;border-color:#479cf5;color:white}.pagination{display:flex;gap:12px;align-items:center;flex-wrap:wrap}pre{background:#081222;padding:14px;border-radius:8px;overflow-wrap:anywhere;color:#c6d9ec}form{max-width:100%}@media(max-width:600px){main{padding:12px}header{padding:16px}h1{font-size:19px}.panel{padding:14px}nav{gap:5px;padding:7px}nav a{padding:7px 9px;font-size:13px}td,th{padding:7px}.barrow{grid-template-columns:minmax(65px,90px) minmax(20px,1fr) 48px;gap:6px}.metric{font-size:28px}}
.ip-link{font-weight:650;white-space:nowrap}.ip-status{font-size:12px;padding:4px 9px;border:1px solid var(--line);border-radius:6px;color:var(--muted)}.ip-blocked{color:#ffb0a8;border-color:#a54c4c}.grid .panel{margin-bottom:0}td form button,td form select{padding:6px 8px;font-size:13px}
/* Muted navigation groups and overview-only spacing. */
nav a.nav-traffic{background:#193653;border-color:#305476;color:#b9dcff}
nav a.nav-tools{background:#193b3c;border-color:#305858;color:#b0ded8}
nav a.nav-security{background:#493039;border-color:#69434e;color:#efbdc4}
nav a.nav-traffic:hover{background:#25496c;color:white}
nav a.nav-tools:hover{background:#265052;color:white}
nav a.nav-security:hover{background:#603e49;color:white}
nav a[href*='view=help']{background:#34304a;border-color:#555075;color:#ded3ff}
#reports dt,#tools dt,#security dt{margin-top:12px}#reports dd,#tools dd,#security dd{margin:4px 0 10px;color:var(--muted)}
nav a.active,nav a.active:hover{background:#176bd6;border-color:#79baff;color:white;box-shadow:0 0 0 1px #79baff}
.overview-metrics{gap:20px;margin-bottom:20px}
.overview-secondary{margin-bottom:24px}
.overview-metrics .panel:has(.metric){background:var(--tile-bg);border-top-color:var(--tile-accent)}
.overview-metrics .metric{color:var(--tile-accent)}
.overview-primary .panel:nth-child(1){--tile-bg:#142b43;--tile-accent:#83c9ff}
.overview-primary .panel:nth-child(2){--tile-bg:#153038;--tile-accent:#81d8d0}
.overview-primary .panel:nth-child(3){--tile-bg:#1d293f;--tile-accent:#a9baff}
.overview-primary .panel:nth-child(4){--tile-bg:#25283e;--tile-accent:#c4b5f5}
.overview-secondary .panel:nth-child(1){--tile-bg:#19332f;--tile-accent:#98d7b6}
.overview-secondary .panel:nth-child(2){--tile-bg:#153044;--tile-accent:#86d5ed}
.overview-secondary .panel:nth-child(3){--tile-bg:#333025;--tile-accent:#e4c68b}
.overview-secondary .panel:nth-child(4){--tile-bg:#352833;--tile-accent:#e1a8c1}
@media(max-width:600px){.overview-metrics{gap:14px;margin-bottom:14px}.overview-secondary{margin-bottom:20px}}

/* Compact security management lists; scoped to whitelist and custom paths. */
.security-list{margin-top:20px;max-width:760px}
.security-list h3{font-size:15px;margin:0 0 4px;color:#e5edf8}
.security-list p{margin:0 0 12px;color:var(--muted);font-size:13px}
.security-list-head,.security-list-row{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px;align-items:center}
.security-list-head{padding:8px 0;color:#a2b6cd;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.security-list-head span:last-child{text-align:center}
.security-list-row{border-top:1px solid var(--line);padding:9px 0;margin:0}
.security-list-label{display:flex;align-items:center;gap:9px;min-width:0;font-size:14px}
.security-list-label span{overflow-wrap:anywhere}
.security-list svg{width:16px;height:16px;flex:none}
.security-allow svg{color:#72b99b}.security-path svg{color:#c7aa74}
button.security-remove{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:6px 9px;font-size:13px;background:#382831;border-color:#69404a;color:#efb1b8}
button.security-remove:hover{background:#50323c;border-color:#a3616e;color:#fff}
.security-add-path{display:flex;gap:8px;align-items:center;flex-wrap:wrap;max-width:760px}
.security-add-path input{flex:1;min-width:0}.security-add-path button{padding:8px 12px;font-size:14px;white-space:nowrap}
@media(max-width:600px){.security-list-head,.security-list-row{grid-template-columns:minmax(0,1fr) 88px;gap:8px}.security-list-label{font-size:13px;gap:6px}button.security-remove{padding:6px;font-size:12px}}

/* Shared application forms */
.app-form{max-width:900px}.app-form.compact{max-width:480px}.app-form label{display:block;margin:10px 0;color:var(--text)}.app-form input,.app-form select{display:block;width:100%;margin-top:6px}.app-form .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:0 20px}.app-form button{margin:12px 8px 0 0}.app-form h2{margin-top:20px}.app-form .msg:empty{display:none}.app-form .msg{padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}.app-form .panel{overflow:visible}.app-form h1{margin-bottom:18px}.app-form .back{display:inline-block;margin-bottom:12px}
/* Light palette: same layout and branding */
:root[data-theme="light"]{color-scheme:light;--bg:#eef3f9;--panel:#fff;--line:#ccd9e7;--text:#172b46;--muted:#526982;--cyan:#075e9c;--blue:#176bd6}
[data-theme="light"] header{background:linear-gradient(110deg,#e4edf8,#d6e7f7);border-color:var(--line)}
[data-theme="light"] h2,[data-theme="light"] .security-list h3{color:var(--text)}
[data-theme="light"] input,[data-theme="light"] select{background:#fff;border-color:#aabed3;color:var(--text)}
[data-theme="light"] nav{background:#e4edf7}[data-theme="light"] nav a,[data-theme="light"] .pagination a{background:#f5f8fc;color:#23496d;border-color:#b8cce0}
[data-theme="light"] nav a.nav-traffic{background:#e1efff;color:#174b80}[data-theme="light"] nav a.nav-tools{background:#e0f2ef;color:#245c56}[data-theme="light"] nav a.nav-security{background:#f8e7eb;color:#823d4b}[data-theme="light"] nav a[href*='view=help']{background:#eee8fa;color:#554080}
[data-theme="light"] nav a:hover,[data-theme="light"] .pagination a:hover{background:#d3e5f8;color:#173b60}[data-theme="light"] nav a.active,[data-theme="light"] nav a.active:hover{background:#176bd6;color:#fff;border-color:#176bd6}
[data-theme="light"] th{background:#e7eff8;color:#294d70}[data-theme="light"] tr:hover td{background:#f0f5fb}[data-theme="light"] pre{background:#e8eff7;color:#203b56}[data-theme="light"] .track{background:#d7e3ef}[data-theme="light"] a:hover{color:#003d70}
[data-theme="light"] .ip-blocked{color:#9b2930;border-color:#bd7377}[data-theme="light"] .security-list-head{color:var(--muted)}[data-theme="light"] button.security-remove{background:#f9e7eb;color:#842e3b;border-color:#d5a0a9}[data-theme="light"] button.security-remove:hover{background:#efd0d7;color:#742432}

[data-theme="light"] .overview-primary .panel:nth-child(1){--tile-bg:#e5f2ff;--tile-accent:#1762a0}
[data-theme="light"] .overview-primary .panel:nth-child(2){--tile-bg:#e0f4f1;--tile-accent:#176b64}
[data-theme="light"] .overview-primary .panel:nth-child(3){--tile-bg:#e9edff;--tile-accent:#455ba3}
[data-theme="light"] .overview-primary .panel:nth-child(4){--tile-bg:#f0eafa;--tile-accent:#66509d}
[data-theme="light"] .overview-secondary .panel:nth-child(1){--tile-bg:#e5f3e9;--tile-accent:#286b47}
[data-theme="light"] .overview-secondary .panel:nth-child(2){--tile-bg:#e1f3fa;--tile-accent:#216b86}
[data-theme="light"] .overview-secondary .panel:nth-child(3){--tile-bg:#faf1dd;--tile-accent:#85601d}
[data-theme="light"] .overview-secondary .panel:nth-child(4){--tile-bg:#f9e9f1;--tile-accent:#94476b}
/* Shared Kytech application footer */
body{min-height:100vh;display:flex;flex-direction:column}
main{width:100%;margin:0 auto;flex:1 0 auto}
.kytech-footer{margin-top:auto;padding:16px 20px;text-align:center;border-top:1px solid var(--line);color:var(--muted);font-size:13px;background:var(--panel)}
.kytech-footer a{color:var(--cyan);text-decoration:none}
.kytech-footer a:hover{text-decoration:underline}
.manager-form label{display:block;margin:10px 0}.manager-form input:not([type=checkbox]),.manager-form select,.manager-form textarea{display:block;width:100%;margin-top:6px}.manager-form textarea{background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:10px;font:inherit}.inline{display:inline-block;margin-left:8px}.manager-form .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}

textarea{display:block;width:100%;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--text);font:inherit}pre{white-space:pre-wrap;overflow-wrap:anywhere}form{margin:16px 0}nav{margin:15px 0}
