/* Console visual system. Self-hosted assets; existing behavior stays in the templates. */
:root { --bg:#f5f7fa; --surface:#fff; --surface-muted:#f8fafc; --surface-strong:#111c2c; --line:#e3e8ef; --line-soft:#edf0f5; --text:#1b283b; --text-muted:#68768a; --text-soft:#7c899c; --accent:#087f72; --accent-strong:#06685e; --accent-soft:#e5f5ef; --radius:14px; --sidebar-width:236px; --shadow-soft:0 2px 4px #12243903; --shadow:0 12px 40px #182a4510; }
html[data-theme="dark"] { color-scheme:dark; --bg:#101722; --surface:#182230; --surface-muted:#1e2b3b; --surface-strong:#0d1420; --line:#2b3a4c; --line-soft:#253243; --text:#e4ecf5; --text-muted:#a0aec1; --text-soft:#8d9bb0; --accent:#59cbb5; --accent-strong:#81dfcc; --accent-soft:#1a3b37; --success:#70d5a2; --success-soft:#183b2d; --danger:#ff9994; --danger-soft:#462b30; --warning:#eebc67; --warning-soft:#463c27; --info:#8fb7ff; --info-soft:#243b60; }
body { background:var(--bg); font-size:14px; -webkit-font-smoothing:antialiased; }
.ui-icon { flex-shrink:0; vertical-align:middle; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
a,button { transition:background .16s,color .16s,border-color .16s,box-shadow .16s; }
:focus-visible { outline:3px solid #3bbba9; outline-offset:3px; }
.skip-link { position:fixed; top:-70px; left:16px; z-index:2000; background:var(--surface); padding:14px; border-radius:8px; }
.skip-link:focus { top:10px; }
.navbar { background:var(--surface-strong); border:0; }
.navbar .container { padding:30px 16px 18px; gap:0; overflow-y:auto; }
.nav-brand { display:flex; align-items:center; gap:12px; color:#f5f8ff; padding:0 10px 27px; font-size:19px; font-weight:720; letter-spacing:-.6px; }
.nav-brand:hover { color:#fff; }
.brand-mark { width:36px; height:39px; display:grid; place-items:center; border-radius:11px; background:#203c42; color:#79dfc1; }
.brand-mark .ui-icon { width:24px; height:24px; }
.nav-brand small { display:block; margin-top:2px; font-size:8px; letter-spacing:1.3px; white-space:nowrap; color:#8497ad; font-weight:650; }
.nav-caption { font-size:10px; font-weight:700; letter-spacing:1.7px; color:#8090a6; padding:0 14px; margin-bottom:12px; }
.nav-menu { gap:5px; }
.nav-menu a { min-height:39px; padding:0 13px; gap:12px; font-size:13px; font-weight:550; border-radius:8px; color:#a9b6c9; }
.nav-menu a .ui-icon { width:18px; height:18px; opacity:.85; }
.nav-menu a.is-active { background:#203a3d; color:#8de0c7; }
.nav-indicator { width:5px; height:5px; margin-left:auto; background:#82d9bf; border-radius:50%; }
.nav-account { display:flex; gap:10px; align-items:center; margin-top:auto; padding:24px 6px 0; border-top:1px solid #ffffff12; color:#e5edf7; }
.nav-menu { margin-bottom:30px; }
.nav-account strong { display:block; font-size:12px; font-weight:600; max-width:108px; overflow:hidden; text-overflow:ellipsis; }
.nav-account small { display:block; color:#8a9bb1; font-size:10px; margin-top:3px; }
.nav-account form { margin-left:auto; }
.avatar { display:grid; place-items:center; width:33px; height:33px; flex-shrink:0; background:#354256; border:1px solid #48566c; border-radius:10px; font-size:12px; font-weight:700; }
.icon-control { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--text-muted); cursor:pointer; }
.icon-control:hover { background:var(--surface-muted); color:var(--text); }
.nav-account .icon-control { border:0; color:#a9b6c9; }
.nav-account .icon-control:hover { background:#ffffff12; }
.workspace-header { height:76px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 36px; border-bottom:1px solid var(--line); background:var(--surface); }
.workspace-location,.header-actions { display:flex; align-items:center; gap:14px; font-size:12px; color:var(--text-muted); }
.workspace-location strong { font-weight:600; color:var(--text); }
.breadcrumb-separator { opacity:.45; }
.workspace-tag { padding:5px 10px; background:var(--surface-muted); border:1px solid var(--line); border-radius:6px; font-size:10px; font-weight:600; }
main.container { padding:34px 36px 48px; max-width:1480px; }
.page-header h2,.dashboard h2 { font-size:27px; letter-spacing:-.8px; font-weight:680; margin-bottom:0; }
.page-header { margin-bottom:24px; align-items:center; }
.eyebrow { font-size:10px; font-weight:750; letter-spacing:1.8px; color:var(--accent); margin-bottom:9px; }
.page-description { color:var(--text-muted); font-size:13px; margin-top:8px; }
.dashboard .overview-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:28px; }
.overview-heading .btn { gap:9px; }
.stats-grid { gap:16px; margin-bottom:26px; }
.stat-card { padding:22px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-soft); position:relative; text-align:left; }
.stat-card h3 { font-size:34px; font-weight:650; line-height:1.3; letter-spacing:-1.2px; margin:19px 0 4px; }
.stat-card p { color:var(--text-muted); font-size:12px; font-weight:500; }
.stat-icon { width:32px; height:32px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); border-radius:9px; }
.stat-card:nth-child(3) .stat-icon { background:var(--info-soft); color:var(--info); }
.stat-card:nth-child(4) .stat-icon { background:var(--surface-muted); color:var(--text-muted); }
.stat-card .stat-caption { position:absolute; top:28px; right:20px; color:var(--text-soft); font-size:10px; }
.service-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:28px; }
.service-link { display:flex; gap:14px; align-items:center; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:12px; color:var(--text); }
.service-link:hover { border-color:var(--accent); background:var(--surface); box-shadow:var(--shadow-soft); }
.service-link > .ui-icon:first-child { color:var(--accent); width:23px; height:23px; }
.service-link > .ui-icon:last-child { margin-left:auto; width:16px; color:var(--text-soft); }
.service-link strong { display:block; font-size:13px; font-weight:650; }
.service-link small { display:block; font-size:11px; color:var(--text-muted); margin-top:4px; }
.recent-servers,.card,.server-card,.traffic-panel,.traffic-chart-card,.monitoring-panel { border-radius:var(--radius); box-shadow:var(--shadow-soft); }
.recent-servers { padding:0; overflow:hidden; background:var(--surface); border:1px solid var(--line); }
.section-heading { display:flex; align-items:center; justify-content:space-between; padding:22px 24px; gap:12px; }
.section-heading h3 { margin:0; font-size:15px; font-weight:650; }
.section-heading p { font-size:11px; color:var(--text-muted); margin-top:4px; }
.section-heading a { font-size:12px; font-weight:600; }
.recent-servers .table-shell { border:0; border-radius:0; }
.data-table th { background:var(--surface-muted); color:var(--text-muted); padding:13px 20px; font-size:10px; letter-spacing:.65px; font-weight:650; }
.data-table td { padding:17px 20px; font-size:12px; border-color:var(--line-soft); }
.data-table tbody tr:hover { background:var(--surface-muted); }
.status-badge { font-size:10px; font-weight:650; padding:4px 9px; border-radius:6px; gap:6px; }
.status-badge::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; display:inline-block; margin-right:5px; vertical-align:middle; }
.btn { min-height:38px; border-radius:8px; font-size:12px; font-weight:600; box-shadow:none; padding:0 14px; }
.btn-sm { min-height:31px; font-size:11px; padding:0 11px; }
.btn-secondary { background:var(--surface); color:var(--text); border-color:var(--line); }
.btn-secondary:hover { background:var(--surface-muted); }
.btn-primary { color:#fff; background:#087f72; border-color:#087f72; }
.btn-primary:hover { color:#fff; background:#06685e; border-color:#06685e; }
.btn-danger { background:var(--danger-soft); border-color:transparent; color:var(--danger); }
.btn-danger:hover { background:var(--danger); color:var(--surface); }
.form-group label { text-transform:none; font-size:12px; font-weight:600; letter-spacing:0; color:var(--text); }
.form-group input,.form-group select,.form-group textarea,select { background:var(--surface); border-color:var(--line); border-radius:8px; color:var(--text); font-size:13px; }
.form-group input,.form-group select { min-height:43px; padding:10px 12px; }
input::placeholder,textarea::placeholder { color:var(--text-soft); }
input[type=checkbox] { accent-color:#087f72; }
.modal { backdrop-filter:blur(5px); background:#08152399; }
.modal-content { margin:4vh auto; border:1px solid var(--line); border-radius:16px; }
.modal-header { padding:22px; }
.modal-content form { padding:22px; }
.traffic-summary-grid { gap:16px; margin-bottom:28px; }
.traffic-panel { padding:20px; background:var(--surface); border:1px solid var(--line); }
.traffic-panel strong { font-size:20px; letter-spacing:-.5px; font-weight:600; }
.metric-label { color:var(--text-muted); font-size:11px; }
.card > h2 { font-size:22px; margin-bottom:12px; letter-spacing:-.5px; }
.card > p { color:var(--text-muted); margin-bottom:20px; max-width:720px; }
.card > form { max-width:520px; }
.card > pre { background:var(--surface-muted); border:1px solid var(--line); border-radius:10px; padding:20px; margin:18px 0; overflow-x:auto; }
.card > img { border-radius:12px; margin-bottom:16px; }
.guest .navbar { width:38%; }
.guest .page-shell { margin-left:38%; }
.guest .navbar .container { padding:40px; }
.login-brand-copy { margin:auto 0; padding:0 12px 90px; }
.login-brand-copy .nav-caption { padding:0; line-height:1.8; color:#7fcbb9; }
.login-brand-copy h2 { color:#f1f5fa; font-size:clamp(32px,4vw,60px); font-weight:600; letter-spacing:-2px; line-height:1.12; margin:22px 0; }
.login-brand-copy p { color:#8f9fb4; max-width:280px; font-size:14px; line-height:1.9; }
.guest .workspace-header { background:transparent; border:0; }
.guest .workspace-location { visibility:hidden; }
.login-container { min-height:calc(100vh - 200px); padding:10px 0; }
.login-box { max-width:420px; padding:32px; border:0; background:transparent; box-shadow:none; }
.login-box h2 { text-align:left; font-size:27px; letter-spacing:-.8px; margin-bottom:26px; }
.login-box > p { margin-bottom:24px; color:var(--text-muted); font-size:13px; }
.mobile-menu,.nav-scrim { display:none; }
html[data-theme="dark"] .peer-transfer,html[data-theme="dark"] .peer-rate,html[data-theme="dark"] .peer-endpoint { color:var(--text-muted); }
html[data-theme="dark"] .alert-error { color:var(--danger); border-color:var(--danger-soft); }
html[data-theme="dark"] .btn-warning { color:var(--warning); }
@media (max-width:1100px) { .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .service-grid { gap:10px; } .service-link { padding:16px; } }
@media (max-width:860px) {
 .navbar { position:fixed; width:236px; height:100dvh; visibility:hidden; transform:translateX(-100%); transition:transform .2s; z-index:60; }
 .navbar .container { height:100%; padding:28px 16px 18px; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0; }
 .nav-menu { flex-direction:column; flex-wrap:nowrap; gap:5px; }
 .nav-menu a { min-height:43px; padding:0 13px; font-size:13px; }
 .nav-open .navbar { visibility:visible; transform:translateX(0); }
 .nav-open { overflow:hidden; }
 .nav-scrim:not([hidden]) { display:block; position:fixed; inset:0; background:#08152388; border:0; z-index:50; backdrop-filter:blur(2px); }
 .page-shell,.guest .page-shell { margin-left:0; }
 .workspace-header { padding:0 20px; height:65px; }
 .mobile-menu { display:inline-flex; }
 main.container { padding:25px 20px 40px; }
 .guest .navbar { display:none; }
 .guest .workspace-location { visibility:visible; }
 .guest .mobile-menu { display:none; }
 .guest .workspace-location > span { display:none; }
 .service-grid { grid-template-columns:1fr; }
 .service-link small { margin-top:2px; }
}
@media (max-width:620px) {
 .overview-heading { align-items:flex-start!important; flex-direction:column; }
 .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .stat-card { padding:17px; } .stat-card h3 { font-size:29px; } .stat-caption { display:none; }
 .stat-card h3.monospace { font-size:13px!important; overflow-wrap:anywhere; letter-spacing:-.3px; margin-top:28px; }
 .workspace-tag { display:none; } .workspace-location { gap:9px; } .workspace-header { padding:0 16px; }
 main.container { padding:24px 16px 36px; } .page-header h2,.dashboard h2 { font-size:24px; }
 .login-box { padding:22px 4px; } .section-heading { padding:18px; } .data-table td,.data-table th { padding:13px 16px; }
 .traffic-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .traffic-panel { padding:15px; } .traffic-panel strong { font-size:15px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }
