:root{--bg:#060b18;--bg2:#0a1124;--panel:#0a1226;--panel2:#101a33;--panel3:#0f1730;--soft:#0d1630;--soft2:#111d39;--table-head:#0b1328;--line:rgba(71,97,166,.28);--text:#edf3ff;--muted:#8191b7;--subtle:#d6e5f6;--badge-text:#dff5ff;--status-idle-text:#dde4ee;--status-idle-bg:rgba(148,163,184,.12);--status-idle-border:rgba(148,163,184,.2);--shadow:0 24px 60px rgba(1,6,19,.42);--sidebar-glow:rgba(59,130,246,.18);--cyan:#64a8ff;--blue:#3b82f6;--gold:#facc15;--success:#4ade80;--danger:#fb7185;--warning:#f59e0b;--idle:#94a3b8}
    body[data-theme="light"]{--bg:#ecf3ff;--bg2:#d9e8ff;--panel:#ffffff;--panel2:#f6f9ff;--panel3:#eef4ff;--soft:#f7faff;--soft2:#edf3ff;--table-head:#f3f7ff;--line:rgba(111,132,184,.24);--text:#10203f;--muted:#607196;--subtle:#486180;--badge-text:#17345f;--status-idle-text:#5f708d;--status-idle-bg:rgba(148,163,184,.10);--status-idle-border:rgba(148,163,184,.26);--shadow:0 20px 50px rgba(92,118,170,.18);--sidebar-glow:rgba(37,99,235,.08);--cyan:#2563eb;--blue:#2563eb;--gold:#ca8a04;--success:#16a34a;--danger:#dc2626;--warning:#d97706;--idle:#64748b}
    *{box-sizing:border-box}html,body{max-width:100%;overflow-x:hidden}body{margin:0;min-height:100vh;color:var(--text);font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif;background:radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 22%),radial-gradient(circle at top right, rgba(56,189,248,.10), transparent 18%),linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%);transition:background .25s ease,color .25s ease}
    .shell,.login-shell{position:relative;z-index:2;width:min(100%,1480px);margin:0 auto;padding:18px 18px 36px}.login-shell{min-height:100vh;display:grid;place-items:center}
    .login-particles{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.95}
    .login-backdrop-orb{position:fixed;z-index:0;border-radius:999px;filter:blur(18px);pointer-events:none;opacity:.32}
    .login-backdrop-orb.orb-a{width:340px;height:340px;left:8%;top:12%;background:radial-gradient(circle,#38bdf8 0%,rgba(56,189,248,.18) 45%,rgba(56,189,248,0) 75%)}
    .login-backdrop-orb.orb-b{width:420px;height:420px;right:10%;bottom:10%;background:radial-gradient(circle,#1d4ed8 0%,rgba(29,78,216,.16) 45%,rgba(29,78,216,0) 75%)}
    .dashboard-particles{opacity:.58}
    .dashboard-orb-a{opacity:.14}
    .dashboard-orb-b{opacity:.12}
    body[data-theme="light"] .login-particles{opacity:1}
    body[data-theme="light"] .dashboard-particles{opacity:.78}
    body[data-theme="light"] .login-backdrop-orb.orb-a{background:radial-gradient(circle,rgba(56,189,248,.42) 0%,rgba(56,189,248,.16) 42%,rgba(56,189,248,0) 74%)}
    body[data-theme="light"] .login-backdrop-orb.orb-b{background:radial-gradient(circle,rgba(37,99,235,.34) 0%,rgba(37,99,235,.14) 42%,rgba(37,99,235,0) 74%)}
    .toast-stack{position:fixed;top:18px;z-index:9999;display:grid;gap:10px;width:min(360px,calc(100vw - 28px))}
    .toast-stack-left{left:18px;right:auto}
    .toast-stack-right{right:18px;left:auto}
    .toast-stack-actions{display:flex;justify-content:flex-end}
    .toast-stack-close-all{height:34px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;font:800 12px inherit;letter-spacing:.04em;text-transform:uppercase;box-shadow:0 10px 20px rgba(3,8,20,.12)}
    .layout{display:grid;grid-template-columns:286px minmax(0,1fr);gap:20px;align-items:start;width:100%}.main,.stack,.nav-list,.menu-list{display:grid;gap:14px}.main{gap:18px;min-width:0}
    .action-bar{display:flex;flex-wrap:wrap;gap:12px}
    .login-card,.sidebar,.card,.hero{border:1px solid var(--line);border-radius:28px;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.01)),var(--panel);box-shadow:var(--shadow)}
    .login-card{position:relative;overflow:hidden;width:min(100%,440px);padding:28px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02)),var(--panel)}.login-card:before{content:"";position:absolute;inset:-1px auto auto -1px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(56,189,248,.18),rgba(56,189,248,0) 72%);pointer-events:none}.sidebar{position:sticky;top:18px;padding:18px;background:linear-gradient(180deg,var(--panel) 0%, var(--panel3) 100%);box-shadow:inset 0 0 0 1px rgba(110,132,196,.08),0 0 0 1px var(--line),0 30px 80px rgba(1,6,19,.22)}.hero{padding:28px}.card-head{padding:24px 24px 0}.card-body{padding:24px}
    .mobile-shell-bar,.sidebar-overlay{display:none}
    .brand-actions{display:flex;align-items:center;gap:10px}
    .sidebar-panel-toggle,.desktop-sidebar-reveal{width:44px;height:44px;border-radius:14px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
    .sidebar-panel-toggle svg,.desktop-sidebar-reveal svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
    .desktop-sidebar-reveal{position:fixed;left:18px;top:18px;z-index:56;opacity:0;pointer-events:none;transform:translateY(-8px)}
    body.sidebar-hidden .desktop-sidebar-reveal{opacity:1;pointer-events:auto;transform:translateY(0)}
    body.sidebar-hidden .layout{grid-template-columns:minmax(0,1fr)}
    body.sidebar-hidden .sidebar{display:none}
    .eyebrow,.pill,.badge,.status-badge{display:inline-flex;align-items:center;border-radius:999px;font-size:12px;font-weight:700}
    .eyebrow{gap:8px;padding:8px 12px;margin-bottom:14px;border:1px solid rgba(100,168,255,.24);background:var(--soft2);color:var(--text);text-transform:uppercase;letter-spacing:.08em}.eyebrow:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--cyan);box-shadow:0 0 14px rgba(59,130,246,.52)}
    h1,h2,h3,p{margin:0}.title{font-size:clamp(2rem,4vw,3.2rem);line-height:1.04;letter-spacing:-.04em}.sub,.brand p,.card-head p,.hint,.login-note,.hero-side .note,.stat .desc,.empty p,.user-meta,.nav-list{color:var(--muted);line-height:1.7}
    .login-note,.hint,.user-card,.nav-card,.hero-side,.stat,.table-wrap,.logbox,.empty{border:1px solid var(--line);background:var(--soft);border-radius:22px}
    .login-note,.hint,.user-card,.nav-card,.hero-side,.stat,.empty,.menu-card{padding:16px}.brand{position:relative;margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}.brand h1{font-size:26px;line-height:1.08;letter-spacing:-.04em}
    .brand-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
    .brand-mark{width:44px;height:44px;border-radius:14px;background:radial-gradient(circle at 30% 30%, #7dd3fc, #2563eb 65%, #0b1020 100%);box-shadow:0 0 0 1px rgba(255,255,255,.08),0 0 30px var(--sidebar-glow)}
    .theme-toggle{width:44px;height:44px;border-radius:14px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
    .theme-toggle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
    .brand:after{content:"";position:absolute;right:0;bottom:12px;width:92px;height:24px;opacity:.2;background:radial-gradient(circle at 8px 12px,currentColor 0 2px,transparent 3px),radial-gradient(circle at 44px 12px,currentColor 0 2px,transparent 3px),radial-gradient(circle at 80px 12px,currentColor 0 2px,transparent 3px),linear-gradient(currentColor,currentColor) 10px 11px/30px 1px no-repeat,linear-gradient(currentColor,currentColor) 46px 11px/30px 1px no-repeat;color:rgba(125,211,252,.55);pointer-events:none}
    body[data-theme="light"] .brand:after{color:rgba(37,99,235,.3)}
    .menu-card:after{content:"";position:absolute;right:-34px;top:18px;width:108px;height:108px;border-radius:50%;background:radial-gradient(circle,rgba(56,189,248,.14) 0%,rgba(56,189,248,0) 72%);pointer-events:none}
    .card{position:relative;overflow:hidden}
    .card:before{content:"";position:absolute;right:18px;top:16px;width:88px;height:28px;opacity:.22;background:radial-gradient(circle at 8px 14px,currentColor 0 2px,transparent 3px),radial-gradient(circle at 44px 14px,currentColor 0 2px,transparent 3px),radial-gradient(circle at 80px 14px,currentColor 0 2px,transparent 3px),linear-gradient(currentColor,currentColor) 10px 13px/30px 1px no-repeat,linear-gradient(currentColor,currentColor) 46px 13px/30px 1px no-repeat;color:rgba(125,211,252,.55);pointer-events:none}
    body[data-theme="light"] .card:before{color:rgba(37,99,235,.28)}
    .card-head,.card-body{position:relative;z-index:1}
    .menu-card{position:relative;overflow:hidden;border:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft);border-radius:22px}
.user-card .name{font-size:21px;font-weight:800}.pill-row,.toolbar,.hero-top,.stats,.form-grid,.section-grid{display:grid;gap:14px}.pill-row{grid-template-columns:1fr}.hero-top{grid-template-columns:minmax(0,1fr) 280px}.stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.form-grid,.section-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.card-head .tag,.hero-side .label,.stat .label{color:#93dbff;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.overview-top-stats{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-bottom:14px}
.overview-device-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:14px}
.overview-service-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.overview-service-item{display:grid;gap:6px;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:var(--soft)}
.overview-service-item span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.overview-service-item strong{font-size:18px}.overview-service-item small{color:var(--muted);line-height:1.4;word-break:break-word}.service-online{color:var(--success)}.service-offline{color:var(--danger)}
.down-device-trigger{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}.down-device-trigger:focus{outline:2px solid var(--cyan);border-radius:5px}
.down-device-popover{margin:-2px 0 14px;padding:14px;border:1px solid rgba(248,113,113,.24);border-radius:18px;background:var(--panel2);box-shadow:var(--shadow)}
.down-device-popover-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.down-device-popover-head button{border:0;background:transparent;color:var(--text);font-size:22px;cursor:pointer}
.down-device-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid var(--line)}.down-device-row>div{display:grid;gap:3px}.down-device-row>div:last-child{text-align:right}.down-device-row span,.down-device-empty{color:var(--muted);font-size:12px}
.overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.overview-loading{min-height:420px;display:grid;place-items:center;text-align:center;gap:14px;padding:24px;border:1px dashed var(--line);border-radius:22px;background:var(--soft)}
.overview-loading .spinner{margin-inline:auto}
.overview-loading-title{font-size:22px;font-weight:900;letter-spacing:-.03em}
.overview-loading-text{color:var(--muted);max-width:420px;line-height:1.7}
.overview-load-time{margin-top:10px;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.overview-hidden-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding:12px;border:1px solid var(--line);border-radius:18px;background:var(--soft)}
.overview-show-chip{border:1px solid rgba(125,211,252,.22);background:rgba(14,165,233,.08);color:#d9f7ff;border-radius:999px;padding:8px 12px;font:800 12px inherit;cursor:pointer}
.overview-card{padding:20px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft);display:grid;gap:14px;min-height:180px;box-shadow:0 18px 34px rgba(3,8,20,.14)}
.overview-card-hidden{display:none!important}
.overview-stat .value,.overview-ring-value{font-size:34px;font-weight:900;line-height:1.05;letter-spacing:-.04em}
.overview-stat .value-success{color:var(--success)}
.overview-stat .value-danger{color:var(--danger)}
.overview-stat .value-accent{color:#93dbff;font-size:20px;letter-spacing:0}
.overview-stat-updated{padding:16px 18px;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(56,189,248,.04));border-radius:22px}
.overview-stat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.overview-stat-ping{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.28);color:#bbf7d0;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.overview-device-card{position:relative;overflow:hidden;padding:20px 22px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,var(--soft),rgba(10,18,36,.96));display:grid;gap:14px;min-height:184px;isolation:isolate}
.overview-device-card-switch{box-shadow:0 18px 40px rgba(37,99,235,.12)}
.overview-device-card-mikrotik{box-shadow:0 18px 40px rgba(245,158,11,.12)}
.overview-device-card-wifi{box-shadow:0 18px 40px rgba(14,165,233,.12)}
.overview-device-card-cctv{box-shadow:0 18px 40px rgba(168,85,247,.12)}
.overview-device-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.28);color:#c6efff;position:relative;z-index:2}
.overview-device-icon svg,.overview-device-watermark svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.overview-device-watermark{position:absolute;right:10px;bottom:-14px;width:120px;height:120px;color:rgba(147,219,255,.08);z-index:0}
.overview-device-watermark svg{width:100%;height:100%;stroke-width:1.1}
.overview-device-total{font-size:42px;font-weight:900;line-height:1;color:#f8fbff;letter-spacing:-.05em;position:relative;z-index:2}
.overview-device-caption{margin-top:-6px;color:var(--muted);font-size:13px;line-height:1.6;position:relative;z-index:2;max-width:38ch}
.overview-device-split{display:flex;gap:10px;flex-wrap:wrap;position:relative;z-index:2}
.overview-device-pill{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;border:1px solid rgba(148,163,184,.2);background:rgba(15,23,42,.26);font-size:13px;font-weight:700;color:var(--text)}
.overview-device-pill strong{font-size:16px;color:#fff}
.overview-device-pill.up{border-color:rgba(34,197,94,.26);background:rgba(22,101,52,.14)}
.overview-device-pill.down{border-color:rgba(239,68,68,.26);background:rgba(127,29,29,.14)}
.overview-device-pill-icon{width:22px;height:22px;border-radius:999px;display:inline-grid;place-items:center;font-size:0;line-height:1;box-shadow:0 8px 18px rgba(15,23,42,.14);font-weight:900}
.overview-device-pill-icon::before{font-size:13px;line-height:1}
.overview-device-pill.up .overview-device-pill-icon{background:linear-gradient(180deg,#22c55e,#16a34a);color:#f0fdf4}
.overview-device-pill.down .overview-device-pill-icon{background:linear-gradient(180deg,#fb7185,#ef4444);color:#fff1f2}
.overview-device-pill.up .overview-device-pill-icon::before{content:"↑"}
.overview-device-pill.down .overview-device-pill-icon::before{content:"↓"}
body[data-theme="light"] .overview-device-card{background:linear-gradient(180deg,#fdfefe 0%,#edf4ff 100%);border-color:rgba(96,165,250,.24);box-shadow:0 18px 34px rgba(148,163,184,.16)}
body[data-theme="light"] .overview-device-card-switch{background:linear-gradient(180deg,#ffffff 0%,#eaf3ff 100%)}
body[data-theme="light"] .overview-device-card-mikrotik{background:linear-gradient(180deg,#fffdf7 0%,#fff3dd 100%)}
body[data-theme="light"] .overview-device-card-wifi{background:linear-gradient(180deg,#ffffff 0%,#edf8ff 100%)}
body[data-theme="light"] .overview-device-card-cctv{background:linear-gradient(180deg,#ffffff 0%,#f3eeff 100%)}
body[data-theme="light"] .overview-device-icon{background:rgba(255,255,255,.82);border-color:rgba(96,165,250,.22);color:#1d4ed8}
body[data-theme="light"] .overview-device-watermark{color:rgba(37,99,235,.09)}
body[data-theme="light"] .overview-device-total{color:#10203f}
body[data-theme="light"] .overview-device-caption{color:#607196}
body[data-theme="light"] .overview-device-pill{background:rgba(255,255,255,.8);color:#17345f}
body[data-theme="light"] .overview-device-pill strong{color:#10203f}
body[data-theme="light"] .overview-device-pill.up{border-color:rgba(34,197,94,.24);background:rgba(220,252,231,.92)}
body[data-theme="light"] .overview-device-pill.down{border-color:rgba(239,68,68,.22);background:rgba(254,242,242,.94)}
body[data-theme="light"] .overview-card{background:linear-gradient(180deg,#ffffff 0%,#f4f8ff 100%);border-color:rgba(111,132,184,.2);box-shadow:0 18px 30px rgba(148,163,184,.12)}
body[data-theme="light"] .overview-latency-card{background:linear-gradient(180deg,#f7fcff 0%,#ebf6ff 100%);border-color:rgba(96,165,250,.22)}
body[data-theme="light"] .overview-latency-pill{background:rgba(255,255,255,.94);border-color:rgba(96,165,250,.22);color:#0f3a63}
body[data-theme="light"] .overview-stat-updated{background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(14,165,233,.06))}
body[data-theme="light"] .overview-stat-ping{background:rgba(34,197,94,.12);color:#15803d}
body[data-theme="light"] .overview-show-chip{background:rgba(255,255,255,.94);border-color:rgba(96,165,250,.22);color:#174274}
.overview-card-title{font-size:30px;font-weight:900;line-height:1.05;letter-spacing:-.04em}
.overview-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.overview-card-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.overview-hide-btn{width:34px;height:34px;border:1px solid rgba(148,163,184,.18);border-radius:12px;background:rgba(15,23,42,.2);color:#9fb4d2;display:inline-grid;place-items:center;cursor:pointer}
.overview-hide-btn:hover{border-color:rgba(125,211,252,.38);color:#e0f7ff;background:rgba(14,165,233,.1)}
.overview-hide-btn svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body[data-theme="light"] .overview-hide-btn{background:rgba(255,255,255,.82);border-color:rgba(96,165,250,.16);color:#48638f}
.overview-card-subtag{margin-top:6px;color:var(--muted);font-size:12px;font-weight:600;line-height:1.5}
.overview-card-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;flex:0 0 42px;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.2);color:#cddfff}
.overview-card-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.overview-card-icon-memory{color:#a78bfa}
.overview-card-icon-storage{color:#fbbf24}
.overview-card-icon-traffic{color:#7dd3fc}
.overview-resource-card{align-content:start}
.overview-card-icon-latency{color:#67e8f9}
.overview-latency-card{align-content:start;background:linear-gradient(180deg,rgba(59,130,246,.08),rgba(14,165,233,.04)),linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft)}
.overview-latency-caption{margin-top:6px;color:var(--muted);font-size:12px;font-weight:600;line-height:1.5}
.overview-latency-main{display:flex;align-items:center;justify-content:space-between;gap:16px}
.overview-latency-pill{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:8px 14px;border-radius:999px;border:1px solid rgba(125,211,252,.22);background:rgba(15,23,42,.28);color:#d9f7ff;font-size:12px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.overview-info-list{display:grid;gap:10px}
.overview-info-list div,.overview-io-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:10px}
.overview-info-list span,.overview-io-row span,.overview-card-meta{color:var(--muted)}
.overview-info-list strong,.overview-io-row strong{font-size:14px;text-align:right;word-break:break-word}
.overview-progress{height:12px;border-radius:999px;background:rgba(148,163,184,.12);overflow:hidden;border:1px solid var(--line);margin-top:2px}
.overview-progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#8b5cf6,#3b82f6);box-shadow:0 0 20px rgba(59,130,246,.25)}
.overview-progress.warning span{background:linear-gradient(90deg,#f59e0b,#facc15)}
.overview-progress.accent span{background:linear-gradient(90deg,#06b6d4,#38bdf8)}
.overview-card .tag{margin-bottom:-2px}
.overview-card-meta{font-size:13px}
.overview-mini-chart{height:132px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01)),var(--panel2);padding:12px}
.overview-mini-chart svg{width:100%;height:100%;display:block}
.overview-mini-chart .grid-line{stroke:rgba(170,194,232,.12);stroke-width:1}
.overview-mini-chart .down-line{fill:none;stroke:#64c7ff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.overview-mini-chart .up-line{fill:none;stroke:#facc15;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.overview-mini-chart .axis-label{fill:#9eb4d2;font-size:11px}
.overview-traffic-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:4px 0 10px}
.overview-legend-item{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:700}
body[data-theme="light"] .overview-card-icon{background:rgba(255,255,255,.82);border-color:rgba(96,165,250,.16)}
body[data-theme="light"] .overview-mini-chart{background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(243,247,255,.92))}
.legend-line-down{background:#64c7ff!important}
.legend-line-up{background:#facc15!important}
label{display:block;margin-bottom:8px;font-size:13px;font-weight:700;color:#dfebff}
    input,select{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:16px;padding:14px 15px;outline:none;font-size:14px}
    input::placeholder{color:#7c93b7}input:focus,select:focus{border-color:rgba(125,211,252,.86);box-shadow:0 0 0 4px rgba(56,189,248,.12)}
    .btn{border:none;border-radius:16px;padding:13px 16px;cursor:pointer;font:800 14px inherit;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
    .btn{transition:transform .18s ease,background .18s ease,border-color .18s ease,opacity .18s ease}
    .btn:hover{transform:translateY(-1px)}
.btn-primary{color:#eff6ff;background:linear-gradient(135deg,#1d4ed8,#38bdf8);box-shadow:0 14px 30px rgba(37,99,235,.24)}.btn-dark{color:var(--text);background:var(--panel2);border:1px solid var(--line)}.btn-danger{color:#fff;background:linear-gradient(135deg,rgba(248,113,113,.9),rgba(153,27,27,.96))}.btn-secondary{color:var(--text);background:rgba(59,130,246,.08);border:1px solid rgba(96,165,250,.22)}.btn-wide{width:100%;justify-content:flex-start;padding-left:14px}
.availability-filter.active{color:#eff6ff;background:linear-gradient(135deg,#1d4ed8,#38bdf8);border-color:rgba(96,165,250,.34);box-shadow:0 12px 28px rgba(37,99,235,.18)}
.availability-scope-actions .availability-filter.active{background:linear-gradient(135deg,#0f172a,#2563eb);border-color:rgba(96,165,250,.38);box-shadow:0 12px 28px rgba(37,99,235,.22)}
.availability-owner-row{grid-template-columns:minmax(0,1fr)}
.availability-owner-row select{min-width:0}
.availability-scope-note{margin-top:-2px;margin-bottom:8px;color:var(--muted);font-size:13px;font-weight:600}
.availability-scope-note span{color:var(--text)}
.availability-summary-card{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px 18px;border:1px solid rgba(125,211,252,.18);border-radius:20px;background:linear-gradient(135deg,rgba(14,165,233,.12),rgba(59,130,246,.05)),var(--soft)}
.availability-summary-label{font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#93dbff}
.availability-summary-context{margin-top:4px;color:var(--muted);font-size:13px;font-weight:600}
.availability-summary-value{font-size:28px;font-weight:900;letter-spacing:-.03em;color:#e8f7ff}
.availability-summary-count{color:var(--muted);font-size:13px;font-weight:800}
body[data-theme="light"] .availability-summary-card{background:linear-gradient(135deg,rgba(14,165,233,.08),rgba(37,99,235,.04)),rgba(255,255,255,.9);border-color:rgba(96,165,250,.22)}
body[data-theme="light"] .availability-summary-value{color:#17345f}
    .menu-btn{display:flex;align-items:center;gap:12px;min-height:60px;padding:12px 14px;border-radius:18px}
    .menu-btn.active{background:linear-gradient(135deg,#1d4ed8,#38bdf8);border-color:rgba(96,165,250,.34);box-shadow:0 12px 28px rgba(37,99,235,.22);color:#eff6ff}
    .menu-btn.active .menu-icon{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.28);color:#fff}
    .menu-btn .menu-icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:var(--panel2);border:1px solid var(--line);flex:0 0 36px}
    .menu-btn .menu-text{display:inline-flex;align-items:center;min-height:20px;text-decoration:none;font-size:13px;line-height:1.35;font-weight:700}
    .menu-btn .menu-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
    .menu-group{display:grid;gap:10px}
    .menu-group + .menu-group{margin-top:6px;padding-top:14px;border-top:1px solid var(--line)}
    .menu-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0}
    .menu-group-title{display:inline-flex;align-items:center;gap:8px;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
    .menu-group-toggle{border:none;background:none;color:var(--muted);cursor:pointer;padding:4px 6px;font-size:16px;line-height:1}
    .menu-group-title:before{content:"";width:14px;height:14px;opacity:.85;background:radial-gradient(circle at 3px 7px,currentColor 0 1.6px,transparent 2.2px),radial-gradient(circle at 11px 3px,currentColor 0 1.6px,transparent 2.2px),radial-gradient(circle at 11px 11px,currentColor 0 1.6px,transparent 2.2px),linear-gradient(currentColor,currentColor) 4px 6px/6px 1px no-repeat,linear-gradient(currentColor,currentColor) 9px 4px/1px 6px no-repeat;color:currentColor}
    .menu-group-body{display:grid;gap:10px}
    .menu-group.collapsed .menu-group-body{display:none}
    .menu-icon-user{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.24);color:#22c55e}
    .menu-icon-edit{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.24);color:#3b82f6}
    .menu-icon-device{background:rgba(56,189,248,.14);border-color:rgba(56,189,248,.24);color:#0ea5e9}
    .menu-icon-snmp{background:rgba(168,85,247,.12);border-color:rgba(168,85,247,.24);color:#8b5cf6}
    .menu-icon-port{background:rgba(249,115,22,.12);border-color:rgba(249,115,22,.24);color:#f97316}
    .menu-icon-logout{background:rgba(148,163,184,.14);border-color:rgba(148,163,184,.24);color:var(--muted)}
    body[data-theme="light"] .menu-icon-user{background:rgba(34,197,94,.10);color:#15803d}
    body[data-theme="light"] .menu-icon-edit{background:rgba(59,130,246,.10);color:#1d4ed8}
    body[data-theme="light"] .menu-icon-device{background:rgba(14,165,233,.10);color:#0369a1}
    body[data-theme="light"] .menu-icon-snmp{background:rgba(139,92,246,.10);color:#6d28d9}
    body[data-theme="light"] .menu-icon-port{background:rgba(249,115,22,.10);color:#c2410c}
    body[data-theme="light"] .menu-icon-logout{background:rgba(148,163,184,.10);color:#475569}
    .pill,.badge{justify-content:center;padding:8px 12px;border:1px solid rgba(125,211,252,.18);background:rgba(56,189,248,.08);color:var(--badge-text);text-transform:capitalize}
    .hero-side .value,.stat .value{font-size:24px;font-weight:800;letter-spacing:-.03em;word-break:break-word}.stat .value{font-size:28px}
    .toolbar{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px;align-items:stretch}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft);padding:2px}.logbox{padding:12px;max-height:300px;overflow:auto}.table-tools{display:grid;grid-template-columns:minmax(260px,1fr) 170px;gap:12px;margin-bottom:18px;align-items:center}
    .table-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
    .pagination{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
    .pagination-info{color:var(--muted);font-size:13px}
    table{width:100%;min-width:1100px;border-collapse:separate;border-spacing:0}thead th{padding:16px 14px;text-align:left;background:var(--table-head);color:var(--muted);border-bottom:1px solid var(--line);font-size:11px;text-transform:uppercase;letter-spacing:.16em}
    tbody td{padding:18px 14px;border-bottom:1px solid rgba(96,165,250,.08);vertical-align:middle;font-size:14px}tbody tr:last-child td{border-bottom:none}tbody tr:hover{background:rgba(59,130,246,.04)}tbody tr.selected-row{background:rgba(14,165,233,.08)}tbody tr.selected-row td:first-child{box-shadow:inset 3px 0 0 #38bdf8}.device-name{font-weight:800}.ip-text,.result-cell{color:var(--subtle)}.result-cell{word-break:break-word;line-height:1.55}
    .device-link{background:none;border:none;padding:0;color:var(--text);font:inherit;font-weight:800;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:rgba(96,165,250,.35);text-underline-offset:4px}
    .device-link:hover{color:var(--cyan);text-decoration-color:currentColor}
    .cell-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
    .cell-actions .btn{min-width:68px;padding:10px 12px;border-radius:14px;font-size:12px}
    .status-badge{gap:8px;padding:8px 12px;min-width:108px;justify-content:center;border:1px solid transparent;font-weight:800}.status-idle{color:var(--status-idle-text);background:var(--status-idle-bg);border-color:var(--status-idle-border)}.status-loading{color:#ffe0a6;background:rgba(245,158,11,.14);border-color:rgba(245,158,11,.22)}.status-success{color:#adf0c3;background:rgba(34,197,94,.14);border-color:rgba(34,197,94,.22)}.status-warning{color:#ffe4a3;background:rgba(245,158,11,.14);border-color:rgba(245,158,11,.26)}.status-failed{color:#ffd0d0;background:rgba(248,113,113,.14);border-color:rgba(248,113,113,.22)}
    .dot{width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 12px currentColor}.row-processing{opacity:.62}.checkbox{width:18px;height:18px;accent-color:#67e8f9;cursor:pointer}
    .log-item{padding:12px 14px;border-radius:16px;margin-bottom:10px;font-size:13px;line-height:1.6;border:1px solid transparent}.log-success{background:rgba(34,197,94,.10);color:#aef0c3;border-color:rgba(34,197,94,.18)}.log-failed{background:rgba(248,113,113,.10);color:#ffc8c8;border-color:rgba(248,113,113,.18)}
    body[data-theme="light"] .status-loading{color:#9a6700;background:rgba(245,158,11,.12);border-color:rgba(217,119,6,.24)}
    body[data-theme="light"] .status-warning{color:#92400e;background:rgba(245,158,11,.12);border-color:rgba(217,119,6,.24)}
    body[data-theme="light"] .status-success{color:#166534;background:rgba(34,197,94,.14);border-color:rgba(22,163,74,.28)}
    body[data-theme="light"] .status-failed{color:#b91c1c;background:rgba(248,113,113,.12);border-color:rgba(220,38,38,.24)}
    body[data-theme="light"] .log-success{background:rgba(34,197,94,.10);color:#166534;border-color:rgba(22,163,74,.24)}
    body[data-theme="light"] .log-failed{background:rgba(248,113,113,.10);color:#b91c1c;border-color:rgba(220,38,38,.24)}
    .toast{padding:14px 16px;border-radius:18px;border:1px solid rgba(170,194,232,.14);background:var(--panel);box-shadow:var(--shadow);backdrop-filter:blur(12px);animation:toastIn .24s ease;color:var(--text)}
    .toast-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
    .toast-close{width:28px;height:28px;border-radius:10px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:14px;flex:0 0 28px}
    .page-loading{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:10000;background:rgba(2,8,18,.74);backdrop-filter:blur(8px)}
    .page-loading.show{display:flex}
    .loading-card{min-width:260px;padding:22px 24px;border-radius:24px;border:1px solid rgba(170,194,232,.14);background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02)),var(--panel);box-shadow:var(--shadow);text-align:center}
    .spinner{width:44px;height:44px;margin:0 auto 14px;border-radius:50%;border:4px solid rgba(125,211,252,.18);border-top-color:var(--cyan);animation:spin .9s linear infinite}
    .loading-title{font-size:16px;font-weight:800;margin-bottom:6px}
    .loading-text{font-size:13px;line-height:1.5;color:#dbe7f8}
    .btn[disabled],button[disabled],input[disabled],select[disabled]{opacity:.55;cursor:not-allowed;pointer-events:none}
    .modal-backdrop{position:fixed;inset:0;background:rgba(2,8,18,.72);backdrop-filter:blur(8px);display:none;align-items:center;justify-content:center;padding:20px;z-index:9998}
    .modal-backdrop.show{display:flex}
    .modal{width:min(100%,640px);max-height:min(88vh,900px);overflow:auto;border:1px solid rgba(170,194,232,.14);border-radius:28px;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02)),var(--panel);box-shadow:var(--shadow)}
    .modal.large{width:min(100%,980px)}
    .modal-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:22px 22px 0}
    .modal-close{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;font-size:18px}
    .port-summary,.port-grid,.metric-grid{display:grid;gap:12px}
    .port-summary{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}
    .port-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .port-card,.metric-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--soft)}
    .port-card-header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:8px}
    .port-name{font-weight:800}
    .port-meta{color:var(--muted);font-size:13px;line-height:1.5}
    .metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}
    .chart-wrap{padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--soft)}
    .chart-shell{position:relative}
    .chart-svg{width:100%;height:220px;display:block}
    .chart-tooltip{position:absolute;min-width:170px;max-width:240px;padding:10px 12px;border-radius:14px;border:1px solid rgba(125,211,252,.22);background:rgba(8,18,34,.94);backdrop-filter:blur(10px);color:#eff6ff;box-shadow:0 18px 38px rgba(2,8,23,.34);pointer-events:none;opacity:0;transform:translateY(6px);transition:opacity .14s ease,transform .14s ease;z-index:20}
    .chart-tooltip.show{opacity:1;transform:translateY(0)}
    .chart-tooltip-time{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#9edbff;margin-bottom:8px}
    .chart-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;font-weight:700;line-height:1.5}
    .chart-tooltip-row + .chart-tooltip-row{margin-top:4px}
    .chart-tooltip-label{display:inline-flex;align-items:center;gap:8px;color:#dce7f8}
    .chart-tooltip-dot{width:9px;height:9px;border-radius:999px;display:inline-block}
    .chart-tooltip-dot.down{background:#7dd3fc}
    .chart-tooltip-dot.up{background:#facc15}
    body[data-theme="light"] .chart-tooltip{background:rgba(255,255,255,.96);border-color:rgba(96,165,250,.26);color:#172554;box-shadow:0 18px 36px rgba(148,163,184,.28)}
    body[data-theme="light"] .chart-tooltip-time{color:#2563eb}
    body[data-theme="light"] .chart-tooltip-label{color:#1e3a8a}
    .empty-monitor{padding:22px;border:1px dashed rgba(170,194,232,.18);border-radius:18px;color:var(--muted);text-align:center}
    #availabilityLoadingState .spinner{margin-inline:auto}
    #availabilityLoadingState{background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft)}
    #bandwidthHistoryLoading .spinner{margin-inline:auto}
    #bandwidthHistoryLoading{background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01)),var(--soft)}
    #bandwidthView .card-body,#bandwidthTargetsShell,#bandwidthHistorySection{min-width:0}
    .bandwidth-period-actions{gap:10px}
    .bandwidth-period-actions .bandwidth-filter{min-width:96px;white-space:nowrap}
    .bandwidth-command-actions .btn{min-width:150px}
    .bandwidth-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .traffic-pill-pair{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
    .traffic-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:var(--soft);font-size:12px;font-weight:800;white-space:nowrap}
    .traffic-pill svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
    .traffic-pill.down{color:#7dd3fc}
    .traffic-pill.up{color:#facc15}
    .port-map{display:flex;flex-wrap:wrap;gap:8px}
    .port-group{margin-top:14px}
    .port-group-title{margin:0 0 10px;color:#dce7f8;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
    .port-block{position:relative;min-width:54px;padding:10px 8px;border-radius:12px;border:1px solid rgba(170,194,232,.14);background:#1a1f27;color:#fff;font-weight:800;font-size:12px;cursor:pointer}
    .port-block.down{background:#7f1d1d}
    .port-block.disabled{background:#6b7280}
    .port-block.unknown{background:#475569}
    .port-block.speed-100{background:#2563eb}
    .port-block.speed-1000{background:#16a34a}
    .port-block.speed-10{background:#7c3aed}
    .port-tooltip{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%) translateY(4px);min-width:150px;max-width:220px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--panel2);color:var(--text);font-size:12px;font-weight:700;line-height:1.45;white-space:normal;opacity:0;pointer-events:none;box-shadow:var(--shadow);transition:opacity .16s ease,transform .16s ease;z-index:30}
    .port-tooltip:after{content:"";position:absolute;left:50%;top:100%;transform:translateX(-50%);border-width:6px;border-style:solid;border-color:var(--panel2) transparent transparent transparent}
    .port-block:hover .port-tooltip,.port-block:focus-visible .port-tooltip{opacity:1;transform:translateX(-50%) translateY(0)}
    .vlan-ssid-hint{position:relative;cursor:help;text-decoration:underline dotted;text-underline-offset:3px}
    .vlan-ssid-tooltip{position:absolute;left:0;top:calc(100% + 8px);min-width:220px;max-width:300px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--panel2);color:var(--text);font-size:12px;font-weight:600;line-height:1.6;white-space:normal;opacity:0;pointer-events:none;box-shadow:var(--shadow);transition:opacity .16s ease,transform .16s ease;transform:translateY(4px);z-index:30}
    .vlan-ssid-tooltip-head{display:flex;justify-content:space-between;gap:16px;font-weight:800;text-transform:uppercase;font-size:10px;letter-spacing:.06em;color:var(--muted);border-bottom:1px solid var(--line);padding-bottom:4px;margin-bottom:4px}
    .vlan-ssid-tooltip>div{display:flex;justify-content:space-between;gap:16px}
    .vlan-ssid-tooltip>div>span:first-child{font-weight:800;flex:0 0 auto}
    .vlan-ssid-tooltip>div>span:last-child{text-align:right}
    .vlan-ssid-hint:hover .vlan-ssid-tooltip,.vlan-ssid-hint:focus-visible .vlan-ssid-tooltip{opacity:1;transform:translateY(0)}
    .port-legend{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0}
    .port-legend-item{display:flex;align-items:center;gap:8px;color:#dce7f8;font-size:13px}
    .port-legend-color{width:14px;height:14px;border-radius:4px}
    .chart-legend{display:flex;gap:18px;align-items:center;margin-bottom:10px;color:#dce7f8;font-size:13px}
    .legend-item{display:flex;align-items:center;gap:8px}
    .legend-line{width:18px;height:3px;border-radius:999px}
    .toast-title{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:6px}
    .toast-message{font-size:13px;line-height:1.55;color:#dce7f8}
    .toast-success{border-color:rgba(34,197,94,.24);background:linear-gradient(180deg, rgba(34,197,94,.14), rgba(10,20,34,.96))}
    .toast-error{border-color:rgba(248,113,113,.24);background:linear-gradient(180deg, rgba(248,113,113,.14), rgba(10,20,34,.96))}
    .toast-info{border-color:rgba(56,189,248,.24);background:linear-gradient(180deg, rgba(56,189,248,.14), rgba(10,20,34,.96))}
    .availability-filter.active,.bandwidth-filter.active{background:linear-gradient(135deg,#1d4ed8,#38bdf8);border-color:rgba(96,165,250,.34);box-shadow:0 12px 28px rgba(37,99,235,.18);color:#eff6ff}
    .view-panel{display:none}
    .view-panel.active{display:block;animation:viewFade .18s ease}
    .tool-shell{display:grid;gap:18px}
    .cctv-detail-actions{margin-top:18px;justify-content:flex-start}
    .tool-form{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}
    .tool-actions{display:flex;gap:12px;flex-wrap:wrap}
    .tool-result-grid{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}
    .tool-result-card{padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--soft)}
    .tool-result-title{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#93dbff;margin-bottom:8px}
    .tool-result-value{font-size:26px;font-weight:800;letter-spacing:-.03em;word-break:break-word}
    .tool-result-sub{color:var(--muted);line-height:1.6;word-break:break-word}
    .tool-output{padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--soft);white-space:pre-wrap;word-break:break-word;color:var(--subtle);font-size:13px;line-height:1.6}
    .backup-list{display:grid;gap:12px}
    .backup-item{padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--soft);display:grid;gap:12px}
    .availability-alerts{display:grid;gap:12px}
    .availability-alert-list{display:grid;gap:10px}
    .availability-alert-item{padding:14px 16px;border-radius:18px;border:1px solid rgba(248,113,113,.22);background:rgba(248,113,113,.08);color:var(--text)}
    .availability-alert-item strong{color:#ffd2d2}
    body[data-theme="light"] .availability-alert-item{background:rgba(248,113,113,.08);border-color:rgba(220,38,38,.24);color:#7f1d1d}
    body[data-theme="light"] .availability-alert-item strong{color:#991b1b}
    #availabilityView .card-body,
    #availabilityView #availabilityTableShell{min-width:0;width:100%}
    #availabilityView .table-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden}
    .backup-item-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.backup-item-name{font-size:16px;font-weight:800;word-break:break-word}
.backup-item-meta{color:var(--muted);font-size:13px;line-height:1.6}
.backup-item-preview{margin-top:12px}
.backup-item.active-preview{border-color:rgba(96,165,250,.34);box-shadow:0 12px 28px rgba(37,99,235,.12)}
.backup-preview-actions{display:flex;justify-content:flex-end;gap:12px;margin:12px 0}
.backup-item .tool-actions .btn-danger{min-width:84px}
.device-backup-shell{margin-top:18px;display:grid;gap:12px}
    .device-backup-title{font-size:14px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
    .hidden{display:none!important}
    @keyframes viewFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
    @keyframes toastIn{from{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
    @keyframes spin{to{transform:rotate(360deg)}}
    .theme-toggle,.mobile-shell-toggle,.sidebar-panel-toggle,.desktop-sidebar-reveal,.menu-btn,.menu-btn .menu-icon,.btn,.table-wrap,.overview-card,.overview-device-card,.overview-device-pill,.sidebar,.card,.hero{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease,background .22s ease,opacity .22s ease}
.btn{position:relative;overflow:hidden}
.btn:before{content:"";position:absolute;inset:0 auto 0 -140%;width:120%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.14),transparent);transform:skewX(-18deg);transition:left .42s ease;pointer-events:none}
.btn:hover:before{left:140%}
.menu-btn:hover{border-color:rgba(96,165,250,.3);box-shadow:0 14px 28px rgba(15,23,42,.14)}
.menu-btn:hover .menu-icon{transform:translateY(-1px) scale(1.04);box-shadow:0 10px 18px rgba(2,8,18,.14)}
    .theme-toggle:hover,.mobile-shell-toggle:hover,.sidebar-panel-toggle:hover,.desktop-sidebar-reveal:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(3,8,20,.16);border-color:rgba(96,165,250,.28)}
.sidebar:hover,.card:hover,.hero:hover{border-color:rgba(96,165,250,.24)}
.overview-card:hover,.overview-device-card:hover{transform:translateY(-3px);box-shadow:0 22px 40px rgba(3,8,20,.2)}
.overview-device-pill:hover{transform:translateY(-1px);box-shadow:0 10px 20px rgba(3,8,20,.14)}
.overview-device-icon,.overview-card-icon{animation:ambientFloat 5.4s ease-in-out infinite}
.overview-device-card:nth-child(2) .overview-device-icon,.overview-card:nth-child(2n) .overview-card-icon{animation-delay:.4s}
.overview-device-card:nth-child(3) .overview-device-icon,.overview-card:nth-child(3n) .overview-card-icon{animation-delay:.8s}
.view-panel.active{animation:viewFade .28s ease}
@keyframes ambientFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes viewFade{from{opacity:0;transform:translateY(10px) scale(.992)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media (max-width:1180px){
    .shell,.login-shell{width:100%;padding:16px 14px 30px}
    .layout,.hero-top,.stats,.form-grid,.section-grid,.toolbar,.port-summary,.port-grid,.metric-grid,.tool-form,.tool-result-grid,.overview-grid,.overview-top-stats,.overview-device-stats,.overview-service-grid{grid-template-columns:1fr}
    .layout{grid-template-columns:minmax(0,1fr);width:100%;margin:0 auto}
    .desktop-sidebar-reveal,.sidebar-panel-toggle{display:none}
    .mobile-shell-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:14px 16px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015)),var(--panel);box-shadow:0 16px 34px rgba(3,8,20,.16)}
    .mobile-shell-toggle{width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer;flex:0 0 46px}
    .mobile-shell-toggle svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
    .mobile-shell-brand{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
    .mobile-shell-copy{display:grid;gap:3px;min-width:0}
    .mobile-shell-copy strong{font-size:16px;line-height:1.1}
    .mobile-shell-copy span{font-size:12px;color:var(--muted);line-height:1.4}
    .mobile-shell-brand .eyebrow{margin-bottom:0;white-space:nowrap}
    .sidebar-overlay{position:fixed;inset:0;z-index:45;background:rgba(2,8,18,.56);backdrop-filter:blur(6px)}
    body.sidebar-open .sidebar-overlay{display:block}
    .sidebar{position:fixed;top:14px;left:14px;bottom:14px;width:min(320px,calc(100vw - 28px));max-width:min(320px,calc(100vw - 28px));overflow:auto;z-index:60;transform:translateX(calc(-100% - 24px));transition:transform .22s ease,box-shadow .22s ease}
    body.sidebar-open .sidebar{transform:translateX(0)}
    .main{width:100%;max-width:100%;gap:16px}
    .table-tools{grid-template-columns:1fr}
    .table-footer{align-items:flex-start}
}
@media (max-width:760px){
      .layout{width:100%;margin:0 auto}
      .login-card,.sidebar,.card,.hero,.table-wrap,.logbox,.empty,.mobile-shell-bar{border-radius:24px}
      .main,.card,.menu-card,.user-card,.table-wrap{width:100%;max-width:100%;min-width:0;margin-inline:auto}
      .card-head,.card-body{padding-left:18px;padding-right:18px}
      .tool-actions .btn{width:100%}
      #bandwidthView .card-head{padding-left:14px;padding-right:14px}
      #bandwidthView .card-body{padding-left:14px;padding-right:14px;gap:14px}
      #bandwidthView .card-head h2{font-size:22px;line-height:1.15}
      #bandwidthView .card-head p{font-size:13px;line-height:1.55}
      #bandwidthView .bandwidth-period-actions{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;margin:0 -14px;padding:0 14px 4px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
      #bandwidthView .bandwidth-period-actions::-webkit-scrollbar{display:none}
      #bandwidthView .bandwidth-period-actions .bandwidth-filter{width:auto;min-width:max-content;min-height:42px;padding:10px 14px;border-radius:14px;font-size:12px;line-height:1;flex:0 0 auto;scroll-snap-align:start}
      #bandwidthView .bandwidth-command-actions{display:grid;grid-template-columns:1fr;gap:10px}
      #bandwidthView .bandwidth-command-actions .btn{width:100%;min-width:0}
      #bandwidthView #bandwidthCustomRange{gap:10px}
      #bandwidthView #bandwidthCustomRange .btn{width:100%}
      #bandwidthView .table-tools{gap:10px;margin-bottom:12px}
      #bandwidthView .table-tools input,#bandwidthView .table-tools select{min-height:44px;padding:12px 13px;border-radius:14px;font-size:12px}
      #bandwidthView .table-wrap{border-radius:18px;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
      #bandwidthView table{min-width:980px}
      #bandwidthView .table-footer{gap:10px;margin-top:12px}
      #bandwidthView .pagination{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
      #bandwidthView .pagination .btn{width:100%;min-width:0;padding:11px 10px;border-radius:14px;font-size:12px}
      #bandwidthView .bandwidth-summary-grid,#bandwidthView #bandwidthStatsGrid{grid-template-columns:1fr;gap:10px}
      #bandwidthView .metric-card,#bandwidthView .tool-result-card{padding:13px;border-radius:16px}
      #bandwidthView .metric-card .title,#bandwidthView .tool-result-card .title{font-size:18px!important;line-height:1.2;word-break:break-word}
      #bandwidthView .chart-wrap{padding:10px;border-radius:16px;overflow:hidden}
      #bandwidthView .chart-legend{gap:10px;align-items:flex-start;flex-direction:column;font-size:12px}
      #bandwidthView .chart-svg{height:190px;min-width:0}
      #availabilityView .tool-shell{min-width:0}
      #availabilityView #availabilityTableShell{min-width:0;max-width:100%;overflow:hidden}
      #availabilityView .table-wrap{min-width:0;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
      .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
      table{display:table;min-width:920px;width:100%}
      thead{display:table-header-group}
      tbody{display:table-row-group;padding:0}
      tr{display:table-row}
      th,td{display:table-cell}
      tbody tr{margin:0;padding:0;border-radius:0;border:none;background:transparent}
      tbody td{padding:16px 12px}
      .cell-value{text-align:left}
      .cell-actions .btn{width:auto;min-width:62px}
      tbody td:before{content:none}
      .mobile-shell-copy span{display:none}
      .menu-btn{min-height:56px}
      #availabilityView .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
      #availabilityView table{display:table;min-width:920px;width:100%}
      #availabilityView thead{display:table-header-group}
      #availabilityView tbody{display:table-row-group;padding:0}
      #availabilityView tr{display:table-row}
      #availabilityView td{display:table-cell;padding:16px 12px;border-bottom:1px solid rgba(96,165,250,.08)}
      #availabilityView td:before{content:none}
      #availabilityView .table-footer{margin-top:16px}
      .toast-stack-left,.toast-stack-right{left:14px;right:14px;width:auto}
      .toast-stack + .toast-stack{top:auto;bottom:14px}
      .toast-stack-actions{position:fixed;z-index:10020}
      .toast-stack-left .toast-stack-actions{top:14px;left:14px;right:auto}
      .toast-stack-right .toast-stack-actions{bottom:14px;right:14px;left:auto}
    }
