:root {
    --bg: #061526;
    --bg-soft: #0b2137;
    --panel: rgba(14, 35, 55, .82);
    --panel-strong: rgba(18, 45, 70, .95);
    --line: rgba(112, 160, 214, .22);
    --text: #f7fbff;
    --muted: #b7c7dc;
    --blue: #1684ff;
    --blue-2: #30b7ff;
    --green: #20f28a;
    --mint: #72e3bd;
    --red: #ff3d57;
    --amber: #ffc233;
    --purple: #7b61ff;
    --lavender: #a58bff;
    --shadow: 0 20px 60px rgba(0, 0, 0, .32);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
[data-flash] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
    width: 100%;
    border: 1px solid rgba(123, 163, 214, .28);
    border-radius: var(--radius);
    color: var(--text);
    background: rgba(5, 18, 33, .72);
    outline: none;
}
input, select { height: 40px; padding: 0 12px; }
textarea { padding: 12px 14px; resize: vertical; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font-size: 24px; line-height: 1; letter-spacing: 0; }
.brand em { color: var(--blue); font-style: normal; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.brand-mark {
    width: 48px; height: 48px; display: block; flex: 0 0 auto;
    object-fit: contain;
}

.login-body {
    min-height: 100vh;
    background: #edf5ff;
    color: #10213d;
}
.login-grid { min-height: calc(100vh - 54px); display: grid; grid-template-columns: 1.15fr .85fr; }
.login-hero {
    position: relative;
    min-height: 680px;
    padding: 78px 76px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(3, 14, 28, .98) 0%, rgba(5, 24, 45, .78) 48%, rgba(7, 22, 39, .92) 100%),
        url("../img/network-bg.svg") center / cover no-repeat;
    overflow: hidden;
}
.login-hero::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 0 40%, rgba(27, 135, 255, .08) 40% 42%, transparent 42% 100%);
}
.login-hero > * { position: relative; z-index: 1; }
.brand-large .brand-mark { width: 82px; height: 82px; }
.brand-large b { font-size: 42px; }
.brand-large small { font-size: 16px; }
.hero-copy { margin-top: 112px; max-width: 650px; }
.accent-line { display: block; width: 86px; height: 3px; background: var(--blue-2); margin-bottom: 54px; }
.hero-copy h1 { margin: 0 0 22px; font-size: clamp(38px, 4vw, 58px); line-height: 1.18; }
.hero-copy h1 em { color: #35aaff; font-style: normal; }
.hero-copy p { max-width: 620px; color: #e1efff; font-size: 21px; line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 32px 54px; margin-top: 78px; max-width: 760px; }
.feature-grid div { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; align-items: center; }
.feature-grid small { grid-column: 2; color: #d7e7f8; line-height: 1.55; font-size: 16px; }
.feature-icon {
    grid-row: span 2; width: 64px; height: 64px; display: grid; place-items: center;
    border-radius: 16px; background: linear-gradient(135deg, rgba(0, 132, 255, .42), rgba(0, 43, 77, .82));
    color: var(--blue-2); font-size: 26px;
}
.feature-icon i, .stat-icon i, .side-menu i, .panel-head i, .bottom-nav i { pointer-events: none; }
.hero-quote { margin-top: 160px; padding-top: 34px; border-top: 2px solid rgba(48, 183, 255, .75); max-width: 360px; color: #d9e9ff; font-style: italic; font-size: 18px; }
.login-panel-wrap { display: grid; place-items: center; padding: 48px 68px; }
.login-card {
    width: min(100%, 640px);
    padding: 56px 54px 42px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(214, 228, 244, .9);
    box-shadow: 0 24px 80px rgba(20, 64, 112, .15);
    text-align: center;
}
.login-brand { justify-content: center; margin-bottom: 42px; }
.login-brand b { color: #10213d; font-size: 38px; }
.login-card h2 { margin: 0 0 8px; font-size: 27px; color: #10213d; }
.login-card p { margin: 0 0 34px; color: #637693; font-size: 18px; }
.input-group { position: relative; display: block; margin-bottom: 18px; }
.input-group span {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: #6b7d98; font-size: 22px;
}
.input-group input {
    height: 58px; padding-left: 56px; padding-right: 52px; background: #fff; color: #10213d;
    border-color: #d8e3f0; font-size: 17px;
}
.ghost-icon { position: absolute; right: 12px; top: 9px; width: 40px; height: 40px; border: 0; background: transparent; color: #6b7d98; cursor: pointer; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 28px; color: #10213d; }
.check-line { display: flex; align-items: center; gap: 10px; }
.check-line input { width: 24px; height: 24px; }
.muted-link { color: #087fff; }
.primary-btn {
    border: 0; border-radius: var(--radius); min-height: 56px; padding: 0 24px;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    color: #fff; background: linear-gradient(135deg, #0a79ff, #0874f5); cursor: pointer;
    box-shadow: 0 12px 34px rgba(0, 119, 255, .28); font-weight: 700;
}
.login-card .primary-btn { width: 100%; font-size: 22px; }
.primary-btn.compact { min-height: 42px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 22px; margin: 34px 0; color: #6c7d94; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #dfe9f4; }
.info-box { display: flex; gap: 18px; align-items: center; text-align: left; padding: 22px; border-radius: 8px; background: linear-gradient(135deg, #eaf7ff, #f4fbff); color: #394d6d; }
.info-box span { width: 42px; height: 42px; display: grid; place-items: center; color: #1684ff; background: #dcefff; border-radius: 50%; flex: 0 0 auto; }
.soft-alert { margin: -18px 0 22px; padding: 12px; border-radius: var(--radius); background: #fff0f3; color: #d52443; }
.soft-alert.success { background: #eafbf5; color: #087a58; }
.login-footer { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 76px; color: #445773; border-top: 1px solid #dde8f4; }

.select2-pppoe + .select2-container { width: 100% !important; min-width: 0; }
.select2-container--default .select2-selection--single {
    height: 40px;
    border: 1px solid rgba(123, 163, 214, .28);
    border-radius: var(--radius);
    background: rgba(5, 18, 33, .72);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text);
    line-height: 38px;
    padding-left: 12px;
    padding-right: 34px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; right: 7px; }
.select2-dropdown {
    z-index: 2000;
    border-color: var(--line);
    background: #10243a;
    color: var(--text);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--text);
    background: #081a2c;
    border-color: var(--line);
}
.select2-container--default .select2-results__option { color: #dbe9fa; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--blue); color: #fff; }
.select2-container--default .select2-results__option[aria-selected='true'] { background: rgba(22, 132, 255, .18); }

.app-body {
    display: grid; grid-template-columns: 250px minmax(0, 1fr);
    background:
        radial-gradient(circle at 20% 0%, rgba(30, 142, 255, .18), transparent 30%),
        radial-gradient(circle at 90% 35%, rgba(30, 242, 138, .08), transparent 28%),
        linear-gradient(135deg, #071626 0%, #09192a 45%, #061220 100%);
}
.app-body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
}
.sidebar {
    position: sticky; top: 0; height: 100vh; z-index: 4; padding: 22px 14px;
    display: flex; flex-direction: column; overflow: hidden;
    background: rgba(8, 22, 37, .84); border-right: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.sidebar-scrim { display: none; }
.sidebar .brand { flex: 0 0 auto; margin: 0 6px 30px; }
.side-menu { display: grid; flex: 1 1 auto; gap: 8px; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; scrollbar-gutter: stable; overscroll-behavior: contain; }
.side-menu::-webkit-scrollbar { width: 5px; }
.side-menu::-webkit-scrollbar-thumb { background: rgba(132, 176, 228, .28); border-radius: 8px; }
.side-menu a {
    display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 14px;
    border-radius: var(--radius); color: #ccdaeb;
    font-size: 14px;
}
.side-menu a:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.side-menu a span { width: 22px; text-align: center; font-size: 18px; }
.side-menu a.active, .side-menu a:hover { background: linear-gradient(135deg, #177dff, #0d63df); color: #fff; box-shadow: 0 12px 32px rgba(11, 117, 255, .24); }
.side-submenu { display: grid; gap: 3px; margin: -2px 0 5px 29px; padding-left: 14px; border-left: 1px solid rgba(132, 176, 228, .28); }
.side-submenu a { min-height: 34px; padding: 0 10px; font-size: 12px; }
.side-submenu a.active { background: rgba(22, 132, 255, .22); box-shadow: none; }
.side-footer { flex: 0 0 auto; margin-top: 18px; padding: 16px; border-radius: 8px; background: rgba(7, 22, 38, .72); border: 1px solid rgba(52, 146, 255, .14); }
.side-footer span, .side-footer small { display: block; color: var(--muted); margin-top: 4px; }
.app-main { position: relative; z-index: 1; min-width: 0; max-width: 100%; overflow-x: hidden; }
.topbar {
    position: relative; z-index: 100;
    height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 22px;
    border-bottom: 1px solid var(--line); background: rgba(8, 23, 38, .45); backdrop-filter: blur(16px);
}
.menu-btn, .notif-btn, .soft-btn {
    border: 1px solid rgba(119, 166, 220, .25); border-radius: var(--radius); color: var(--text);
    background: rgba(9, 28, 48, .72); cursor: pointer;
}
.menu-btn { width: 38px; height: 38px; font-size: 20px; }
.search-box { width: min(520px, 38vw); display: flex; border: 1px solid rgba(121, 166, 220, .28); border-radius: var(--radius); overflow: hidden; background: rgba(8, 21, 38, .7); }
.search-box input { border: 0; background: transparent; }
.search-box button { width: 48px; border: 0; background: transparent; color: #cfe1f7; font-size: 16px; cursor: pointer; }
.top-status { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #dce9f8; font-size: 12px; }
.top-status i, .live i, .status i, .online-dot::before { width: 12px; height: 12px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgba(32, 242, 138, .7); content: ""; }
.offline-dot::before { width: 12px; height: 12px; display: inline-block; border-radius: 50%; background: var(--red); box-shadow: 0 0 18px rgba(255, 65, 91, .55); content: ""; }
.notif-btn { position: relative; width: 40px; height: 40px; }
.notif-btn span { position: absolute; right: -3px; top: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 12px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.user-menu { position: relative; z-index: 120; }
.user-chip {
    display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 0 0 12px;
    border: 0; border-left: 1px solid var(--line); color: var(--text); background: transparent;
    cursor: pointer;
}
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #147cff, #5cb6ff); color: #fff; }
.user-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0; z-index: 9999; width: 230px;
    padding: 8px; border: 1px solid rgba(125, 168, 220, .22); border-radius: 10px;
    background: rgba(9, 24, 41, .98); box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
    opacity: 0; transform: translateY(-6px); pointer-events: none; transition: .16s ease;
}
.user-menu.open .user-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.user-dropdown::before {
    content: ""; position: absolute; top: -7px; right: 22px; width: 12px; height: 12px;
    background: rgba(9, 24, 41, .98); border-left: 1px solid rgba(125, 168, 220, .22);
    border-top: 1px solid rgba(125, 168, 220, .22); transform: rotate(45deg);
}
.user-mini {
    display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 6px;
    border-radius: 8px; background: rgba(29, 71, 110, .48);
}
.user-mini b { display: block; font-size: 13px; }
.user-mini small { display: block; margin-top: 2px; color: var(--muted); text-transform: capitalize; }
.user-dropdown a, .user-dropdown button {
    display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
    border-radius: 8px; color: #d7e6f8; font-size: 13px;
}
.user-dropdown button { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(24, 129, 255, .14); color: #fff; }
.user-dropdown .logout-link { color: #ff7384; }
.user-dropdown .logout-link:hover { background: rgba(255, 61, 87, .12); color: #ff8e9c; }
.user-menu-form, .inline-action-form { margin: 0; }
.account-panel { max-width: 760px; }
.account-card {
    display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px;
    border-radius: 8px; background: rgba(24, 129, 255, .12); border: 1px solid rgba(74, 160, 255, .18);
}
.account-icon {
    width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px;
    color: #fff; background: linear-gradient(135deg, #147cff, #30b7ff);
}
.account-card h2 { margin: 0; font-size: 16px; }
.account-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.content-shell { padding: 22px 22px 84px; max-width: 100%; overflow-x: hidden; }
.desktop-welcome { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.mobile-welcome { display: none; }
.desktop-welcome h1, .mobile-welcome h1, .page-head h1 { margin: 0; font-size: 26px; }
.desktop-welcome p, .mobile-welcome p, .page-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.clock-card { text-align: right; color: #d5e4f6; }
.clock-card b { display: block; font-size: 28px; color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
    min-height: 102px; padding: 14px; display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center;
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.stat-card::after { content: ""; position: absolute; right: 12px; bottom: 11px; width: 58px; height: 30px; opacity: .55; background: linear-gradient(90deg, transparent 0 8%, currentColor 8% 14%, transparent 14% 24%, currentColor 24% 31%, transparent 31% 42%, currentColor 42% 50%, transparent 50% 62%, currentColor 62% 72%, transparent 72%); }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; font-size: 19px; color: #fff; }
.stat-card b { font-size: 22px; display: block; }
.stat-card span { color: #e6f1ff; font-size: 13px; }
.stat-card small { grid-column: 1 / -1; font-weight: 800; font-size: 13px; }
.blue { color: var(--blue); background: linear-gradient(135deg, rgba(15, 91, 164, .88), rgba(9, 33, 59, .72)); }
.green { color: var(--green); background: linear-gradient(135deg, rgba(0, 112, 77, .78), rgba(7, 44, 39, .72)); }
.red { color: var(--red); background: linear-gradient(135deg, rgba(124, 37, 62, .7), rgba(47, 18, 34, .72)); }
.purple { color: var(--purple); background: linear-gradient(135deg, rgba(62, 48, 155, .78), rgba(24, 24, 76, .72)); }
.teal { color: #23d6c5; background: linear-gradient(135deg, rgba(0, 116, 112, .72), rgba(10, 50, 57, .7)); }
.amber { color: var(--amber); background: linear-gradient(135deg, rgba(151, 99, 15, .72), rgba(59, 41, 13, .72)); }
.blue .stat-icon { background: #0d70d6; } .green .stat-icon { background: #00aa73; } .red .stat-icon { background: #d4314b; }
.purple .stat-icon { background: #654cf1; } .teal .stat-icon { background: #00a99a; } .amber .stat-icon { background: #d89418; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.dashboard-grid > .panel { height: 100%; }
.panel {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
    box-shadow: var(--shadow); overflow: hidden;
}
.span-2 { grid-column: span 1; }
.panel-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 15px; background: rgba(20, 47, 74, .66); border-bottom: 1px solid rgba(112, 160, 214, .15); }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head a { color: #1a91ff; font-weight: 700; }
.live { display: flex; align-items: center; gap: 8px; color: #dce9f8; }
.ring-grid { display: grid; grid-template-columns: repeat(4, minmax(72px, 1fr)); gap: 12px; padding: 22px 16px; }
.ring { --size: 86px; --ring-color: var(--green); position: relative; display: grid; justify-items: center; gap: 6px; min-height: 138px; }
.ring::before {
    content: ""; width: var(--size); height: var(--size); border-radius: 50%;
    background: conic-gradient(var(--ring-color) calc(var(--value) * 1%), #264158 0);
    mask: radial-gradient(circle, transparent 55%, #000 57%);
}
.ring b {
    position: absolute; top: 32px; left: 0; right: 0; text-align: center;
    font-size: 16px; line-height: 1; margin: 0;
}
.ring span { margin-top: 0; font-size: 13px; }
.ring small { color: var(--ring-color); font-size: 13px; }
.topology { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); align-items: center; gap: 8px 0; padding: 18px; text-align: center; min-height: 220px; }
.topology > i { height: 3px; background: var(--blue); position: relative; }
.topology > i::after { content: ""; position: absolute; right: 0; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--blue); border-right: 2px solid var(--blue); transform: translateY(-50%) rotate(45deg); }
.topology div { display: grid; justify-items: center; align-content: start; gap: 5px; min-width: 0; min-height: 150px; }
.topo-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--blue); color: var(--blue-2); font-size: 27px; }
.router { border-radius: 8px; background: rgba(26, 130, 255, .2); }
.olt { border-radius: 8px; font-size: 24px; border-color: #94b5da; color: #e7f3ff; }
.topo-branch { display: none; }
.topology b, .topology small, .topology em { width: 100%; min-height: 18px; }
.topology small { display: flex; align-items: center; justify-content: center; gap: 7px; }
.topology em { color: #d8e8fa; font-style: normal; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-row { padding: 14px 16px; border-bottom: 1px solid rgba(120, 165, 220, .12); }
.device-row div { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.device-row > small { display: block; color: var(--muted); margin: 4px 0 8px; text-align: right; font-size: 12px; }
.device-row label { display: grid; grid-template-columns: 70px minmax(70px, 1fr) 34px; gap: 8px; align-items: center; margin-top: 7px; color: #dce9f8; font-size: 12px; }
.device-row label span { height: 12px; border-radius: 10px; background: #20384f; overflow: hidden; }
.device-row label i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #18e68e, #30f5ba); }
.device-row label .blue-line { background: linear-gradient(90deg, #4c9fff, #73bcff); }
.device-row label .mint-line { background: linear-gradient(90deg, #38d5b0, #72e3bd); }
.device-row label .purple-line { background: linear-gradient(90deg, #6d5dff, #9b70ff); }
.device-row label .amber-line { background: linear-gradient(90deg, #ffc233, #ff9f24); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.status.good { color: var(--green); } .status.warn { color: var(--amber); } .status.bad { color: var(--red); }
.status.warn i { background: var(--amber); box-shadow: 0 0 14px rgba(255, 194, 51, .7); }
.status.bad i { background: var(--red); box-shadow: 0 0 14px rgba(255, 61, 87, .7); }
.mini-table, .alert-list { padding: 10px 16px 16px; }
.mini-table div, .alert-list div { display: grid; grid-template-columns: 58px 1fr 76px 76px; gap: 8px; align-items: center; min-height: 32px; border-bottom: 1px solid rgba(120, 165, 220, .08); font-size: 12px; }
.alert-list div { grid-template-columns: 64px 1fr 92px; }
.mini-table span, .alert-list span { color: #c7d7ea; }
.critical { color: var(--red); font-style: normal; } .warning { color: var(--amber); font-style: normal; }
.traffic-chart { padding: 18px; }
.traffic-chart svg { width: 100%; min-height: 150px; }
.quality { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; padding: 20px; }
.donut {
    width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--green) 0 78%, #ffe052 78% 88%, var(--red) 88% 100%);
    position: relative;
}
.donut::after { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: #10243a; }
.donut b, .donut span { position: relative; z-index: 1; }
.donut b { align-self: end; font-size: 24px; }
.donut span { align-self: start; color: var(--muted); }
.quality ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; color: #dce9f8; }
.quality li { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.quality i { width: 16px; height: 16px; border-radius: 4px; }
.good-bg { background: var(--green); } .warn-bg { background: var(--amber); } .bad-bg { background: var(--red); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.filter-bar { display: grid; grid-template-columns: 1fr 190px 110px; gap: 12px; margin-bottom: 18px; }
.filter-bar.customer-filter { grid-template-columns: minmax(220px, 1fr) 150px 150px 105px auto auto; }
.filter-reset { justify-content: center; }
.soft-btn { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(123, 163, 214, .28); border-radius: var(--radius); color: #dbe9fa; background: rgba(14, 35, 55, .72); cursor: pointer; }
.soft-btn:hover { border-color: rgba(48, 183, 255, .58); color: #fff; background: rgba(24, 87, 132, .42); }
.back-btn { color: #b9cce2; }
.responsive-table { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { padding: 14px 16px; border-bottom: 1px solid rgba(120, 165, 220, .12); text-align: left; }
th { color: #a9bdd5; font-size: 13px; font-weight: 700; background: rgba(7, 23, 39, .28); }
td small { display: block; color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; }
.actions a, .action-link { color: #2aa3ff; font-weight: 700; }
.actions .danger { color: var(--red); }
.action-link { padding: 0; border: 0; background: transparent; cursor: pointer; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: center; gap: 8px; }
.pagination a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: rgba(14, 35, 55, .72); }
.pagination a:hover, .pagination a.active { color: #fff; border-color: var(--blue); background: rgba(22, 132, 255, .28); }
.pagination button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: rgba(14, 35, 55, .72); cursor: pointer; }
.pagination button:hover, .pagination button.active { color: #fff; border-color: var(--blue); background: rgba(22, 132, 255, .28); }
.empty-cell, .empty-state { color: var(--muted); text-align: center; padding: 28px; }
.form-panel { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: grid; gap: 8px; color: #d8e8f8; }
.readonly-field { color: #9fb5cf; background: rgba(17, 43, 66, .56); border-style: dashed; cursor: not-allowed; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.4; }
.wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.form-errors { margin-bottom: 16px; padding: 14px 18px; border-radius: var(--radius); color: #ffdce2; background: rgba(255, 61, 87, .16); border: 1px solid rgba(255, 61, 87, .28); }
.bottom-nav { display: none; }
.soft-toast { border-radius: 12px !important; box-shadow: 0 20px 60px rgba(15, 46, 80, .18) !important; }
.placeholder-panel { display: flex; align-items: center; gap: 18px; min-height: 150px; padding: 24px; }
.placeholder-panel h2 { margin: 0 0 6px; font-size: 18px; }
.placeholder-panel p { margin: 0; color: var(--muted); line-height: 1.6; }
.about-summary { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; padding: 20px; }
.about-mark { flex: 0 0 64px; width: 64px; height: 64px; display: grid; place-items: center; }
.about-mark img { width: 100%; height: 100%; object-fit: contain; }
.about-summary h2 { margin: 0 0 4px; font-size: 17px; }
.about-summary p { margin: 0; color: var(--muted); line-height: 1.55; }
.version-label { margin-left: auto; padding: 7px 10px; border: 1px solid rgba(85, 172, 255, .3); border-radius: 6px; color: #7fc6ff; background: rgba(20, 125, 255, .1); font-size: 12px; font-weight: 800; white-space: nowrap; }
.changelog-list { display: grid; gap: 12px; }
.release-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.release-meta { padding: 18px; border-right: 1px solid rgba(112, 160, 214, .15); }
.release-meta b, .release-meta span { display: block; }
.release-meta b { color: #7fc6ff; font-size: 14px; }
.release-meta span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.release-notes { margin: 0; padding: 18px 22px 18px 38px; color: #d6e5f6; line-height: 1.65; }
.release-notes li + li { margin-top: 5px; }
.placeholder-icon { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--blue-2); background: rgba(22, 132, 255, .14); font-size: 21px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px 20px; padding: 0 18px 16px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.chart-blue { background: #73bcff; } .chart-mint { background: var(--mint); } .chart-amber { background: #ffd17a; }
.dashboard-device-strip {
    display: grid; grid-template-columns: minmax(240px, 1.6fr) auto repeat(2, minmax(100px, .6fr)) auto;
    align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 14px;
}
.dashboard-device-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dashboard-device-title h2 { margin: 0; font-size: 15px; }
.dashboard-device-title small, .dashboard-device-strip small { display: block; color: var(--muted); font-size: 12px; }
.dashboard-device-strip > div:not(.dashboard-device-title) { display: grid; gap: 4px; }
.dashboard-device-strip > div b { font-size: 14px; }
.monitor-device-icon {
    width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto;
    border-radius: 10px; color: #fff; background: linear-gradient(135deg, #147cff, #30b7ff);
}
.monitor-device-head {
    display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 18px;
    border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 35, 55, .82);
}
.monitor-device-head h2 { margin: 3px 0 4px; font-size: 20px; }
.monitor-device-head p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--blue-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.monitor-device-meta { margin-left: auto; text-align: right; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.monitor-device-meta b { color: var(--text); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 35, 55, .72); }
.metric-card > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-2); background: rgba(22, 132, 255, .16); }
.metric-card small, .traffic-metrics small { display: block; color: var(--muted); font-size: 12px; }
.metric-card b { display: block; margin-top: 3px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-grid { margin-top: 0; }
.device-detail-list { display: grid; gap: 0; padding: 4px 16px 10px; }
.device-detail-list div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(120, 165, 220, .12); }
.device-detail-list div:last-child { border-bottom: 0; }
.device-detail-list span, .panel-note { color: var(--muted); font-size: 13px; }
.device-detail-list b { max-width: 70%; text-align: right; font-size: 13px; }
.traffic-metrics { display: grid; gap: 14px; padding: 18px; }
.traffic-metrics b { display: block; margin-top: 4px; font-size: 20px; color: var(--blue-2); }
.panel-note { margin: 0 18px 18px; line-height: 1.5; }
.history-panel { margin-top: 12px; }
.history-table { min-width: 760px; }
.history-table th, .history-table td { padding-block: 11px; font-size: 12px; }
.history-table td:first-child { white-space: nowrap; color: var(--muted); }
.history-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.panel-head-meta, .muted-text { color: var(--muted); font-size: 12px; }
.pppoe-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid rgba(120, 165, 220, .12); }
.pppoe-summary div { display: grid; gap: 4px; padding: 14px 18px; border-right: 1px solid rgba(120, 165, 220, .12); }
.pppoe-summary div:last-child { border-right: 0; }
.pppoe-summary b { font-size: 20px; }
.pppoe-summary span { color: var(--muted); font-size: 12px; }
.good-text { color: var(--green); }
.bad-text { color: var(--red); }
.pppoe-table { min-width: 880px; }
.pppoe-table td { vertical-align: middle; }
.pppoe-table td small { color: var(--muted); }
.pppoe-table .status { white-space: nowrap; }
.usage-panel { margin-top: 12px; }
.usage-filter { display: grid; grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(120, 165, 220, .12); }
.usage-filter label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.usage-filter button { min-height: 40px; }
.usage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid rgba(120, 165, 220, .12); }
.usage-summary div { display: grid; gap: 6px; padding: 18px; border-right: 1px solid rgba(120, 165, 220, .12); }
.usage-summary div:last-child { border-right: 0; }
.usage-summary small { color: var(--muted); }
.usage-summary b { font-size: 18px; color: var(--blue-2); }
.usage-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; }
.usage-section-head h3 { margin: 0; font-size: 15px; }
.usage-section-head span { color: var(--muted); font-size: 12px; }
.usage-table { min-width: 760px; }
.usage-table td { font-size: 12px; }
.usage-table td a { color: var(--blue-2); font-weight: 700; }
.usage-table td a:hover { text-decoration: underline; }
.usage-table td:nth-child(n+3) { white-space: nowrap; }
.usage-panel .panel-note { margin-top: 18px; color: var(--muted); font-size: 12px; }
.mikrotik-table-pagination { margin: 12px 18px 16px; }
.mikrotik-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.mikrotik-subnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: rgba(14, 35, 55, .72); font-size: 12px; font-weight: 700; }
.mikrotik-subnav a:hover, .mikrotik-subnav a.active { color: #fff; border-color: var(--blue); background: rgba(22, 132, 255, .28); }
.traffic-live-panel { margin-bottom: 16px; }
.traffic-live-status { padding: 15px 18px 0; color: var(--muted); font-size: 12px; }
.traffic-live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 18px; }
.traffic-live-grid article { display: grid; gap: 6px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(16, 47, 75, .45); }
.traffic-live-grid small, .traffic-live-grid span { color: var(--muted); }
.traffic-live-grid b { color: var(--blue-2); font-size: 24px; }
.traffic-live-grid span { font-size: 11px; }
.traffic-live-note { margin: 0 18px 18px; }
.traffic-live-tools { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.traffic-live-tools label { color: var(--muted); font-size: 12px; }
.traffic-live-tools input { width: min(360px, 100%); }
.traffic-live-table { min-width: 650px; }
.traffic-speed { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
#pppoe-list, #usage-monthly, #usage-daily, #status-history { scroll-margin-top: 80px; }

@media (max-width: 760px) {
    .usage-filter { grid-template-columns: 1fr; }
    .usage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .usage-summary div:nth-child(2) { border-right: 0; }
    .usage-summary div:nth-child(-n+2) { border-bottom: 1px solid rgba(120, 165, 220, .12); }
}

@media (min-width: 761px) {
    .app-body { transition: grid-template-columns .22s ease; }
    .app-body.sidebar-collapsed { grid-template-columns: 78px minmax(0, 1fr); }
    .sidebar-collapsed .sidebar { align-items: center; padding-inline: 12px; }
    .sidebar-collapsed .sidebar .brand { margin-inline: 0; }
    .sidebar-collapsed .sidebar .brand > span:last-child,
    .sidebar-collapsed .side-footer { display: none; }
    .sidebar-collapsed .side-menu { width: 100%; padding-right: 0; }
    .sidebar-collapsed .side-menu a { justify-content: center; gap: 0; padding-inline: 0; font-size: 0; }
    .sidebar-collapsed .side-menu a span { width: auto; font-size: 18px; }
    .sidebar-collapsed .side-submenu { display: none; }
    .login-body { overflow: hidden; }
    .login-grid {
        height: calc(100vh - 42px);
        min-height: 620px;
        grid-template-columns: 1.05fr .95fr;
    }
    .login-hero {
        min-height: 0;
        padding: 48px 56px;
    }
    .brand-large .brand-mark { width: 58px; height: 58px; }
    .brand-large b { font-size: 34px; }
    .brand-large small { font-size: 13px; }
    .hero-copy { margin-top: 62px; max-width: 560px; }
    .accent-line { width: 72px; height: 2px; margin-bottom: 32px; }
    .hero-copy h1 {
        margin-bottom: 15px;
        font-size: clamp(32px, 3.1vw, 44px);
        line-height: 1.16;
    }
    .hero-copy p {
        max-width: 540px;
        font-size: 16px;
        line-height: 1.52;
    }
    .feature-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        gap: 22px 34px;
        margin-top: 48px;
        max-width: 620px;
    }
    .feature-grid div { grid-template-columns: 50px 1fr; column-gap: 14px; }
    .feature-grid b { font-size: 14px; }
    .feature-grid small { font-size: 13px; line-height: 1.45; }
    .feature-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        font-size: 20px;
    }
    .hero-quote {
        margin-top: 56px;
        padding-top: 22px;
        max-width: 320px;
        font-size: 14px;
    }
    .login-panel-wrap { padding: 28px 48px; }
    .login-card {
        width: min(100%, 510px);
        padding: 32px 38px 28px;
        border-radius: 14px;
        box-shadow: 0 18px 58px rgba(20, 64, 112, .13);
    }
    .login-brand { margin-bottom: 22px; }
    .login-brand .brand-mark { width: 52px; height: 52px; }
    .login-brand b { font-size: 30px; }
    .login-brand small { font-size: 12px; }
    .login-card h2 { font-size: 22px; }
    .login-card p {
        margin-bottom: 22px;
        font-size: 14px;
    }
    .input-group { margin-bottom: 13px; }
    .input-group span {
        left: 16px;
        font-size: 17px;
    }
    .input-group input {
        height: 46px;
        padding-left: 46px;
        padding-right: 46px;
        font-size: 14px;
    }
    .ghost-icon {
        top: 6px;
        right: 8px;
        width: 34px;
        height: 34px;
    }
    .login-row {
        margin: 8px 0 20px;
        font-size: 14px;
    }
    .check-line input {
        width: 18px;
        height: 18px;
    }
    .primary-btn { min-height: 46px; }
    .login-card .primary-btn { font-size: 17px; }
    .divider {
        gap: 16px;
        margin: 22px 0;
    }
    .info-box {
        gap: 12px;
        padding: 14px 16px;
        font-size: 13px;
        line-height: 1.45;
    }
    .info-box span {
        width: 34px;
        height: 34px;
    }
    .login-footer {
        height: 42px;
        padding: 0 56px;
        font-size: 13px;
    }
}

@media (min-width: 761px) and (max-height: 720px) {
    .login-grid { min-height: 560px; }
    .login-hero { padding-block: 34px; }
    .hero-copy { margin-top: 42px; }
    .feature-grid { margin-top: 34px; gap: 16px 28px; }
    .hero-quote { display: none; }
    .login-card { padding: 26px 34px 24px; }
    .login-brand { margin-bottom: 16px; }
    .login-card p { margin-bottom: 18px; }
    .divider { margin: 16px 0; }
}

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .filter-bar.customer-filter { grid-template-columns: 1fr 1fr; }
    .filter-bar.customer-filter input[type="search"] { grid-column: 1 / -1; }
}

@media (max-width: 1450px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid .panel:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .login-body {
        display: grid;
        place-items: center;
        min-height: 100dvh;
        padding: 18px;
        background:
            linear-gradient(rgba(5, 22, 40, .72), rgba(4, 18, 33, .94)),
            url("../img/network-bg.svg") center / cover no-repeat;
        color: #fff;
    }
    .login-grid { display: block; width: 100%; min-height: 0; padding: 0; }
    .login-hero, .login-footer { display: none; }
    .login-panel-wrap { display: grid; width: 100%; padding: 0; }
    .login-card {
        width: min(100%, 390px);
        margin: 0 auto;
        padding: 28px 22px 24px;
        border-radius: 14px;
        box-shadow: 0 18px 48px rgba(0, 13, 29, .28);
    }
    .login-brand { display: flex; justify-content: center; margin-bottom: 20px; }
    .login-brand .brand-mark { width: 42px; height: 42px; }
    .login-brand b { font-size: 23px; }
    .login-brand small { font-size: 10px; }
    .login-card h2 { margin-bottom: 5px; font-size: 21px; }
    .login-card p { margin-bottom: 20px; font-size: 14px; }
    .input-group { margin-bottom: 12px; }
    .input-group input { min-height: 46px; font-size: 15px; }
    .input-group span { left: 15px; }
    .login-row { margin: 2px 0 18px; font-size: 13px; }
    .login-card .primary-btn { min-height: 46px; font-size: 16px; }
    .divider { margin: 18px 0; font-size: 13px; }
    .info-box { gap: 12px; padding: 14px; font-size: 13px; line-height: 1.45; }
    .info-box span { width: 32px; height: 32px; }
    .app-body {
        display: block; width: 100%; min-width: 0; max-width: 100%;
        padding-bottom: 86px; overflow-x: hidden;
    }
    .app-main { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 310;
        display: flex; width: min(280px, calc(100vw - 52px)); height: 100dvh;
        transform: translateX(-105%); transition: transform .22s ease;
        box-shadow: none;
    }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .sidebar { transform: translateX(0); box-shadow: 18px 0 42px rgba(0, 11, 26, .38); }
    .sidebar-open .sidebar-scrim {
        position: fixed; inset: 0; z-index: 300; display: block;
        width: 100%; height: 100%; padding: 0; border: 0;
        background: rgba(1, 13, 27, .62); cursor: default;
    }
    .topbar {
        position: sticky; top: 0; z-index: 180; height: 72px; padding: 0 14px;
        display: flex; align-items: center; gap: 10px;
    }
    .topbar .brand { display: flex; }
    .menu-btn { flex: 0 0 40px; }
    .notif-btn { flex: 0 0 40px; margin-left: auto; }
    .user-menu { flex: 0 0 auto; }
    .search-box, .top-status { display: none; }
    .user-dropdown { right: -6px; width: 218px; }
    .user-chip b { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content-shell {
        display: block; width: 100%; max-width: 100vw; min-width: 0;
        padding: 18px 14px 94px; overflow-x: hidden;
    }
    .desktop-welcome { display: none; }
    .mobile-welcome {
        display: grid; grid-template-columns: minmax(0, 1fr) auto;
        align-items: end; gap: 10px; margin-bottom: 18px;
    }
    .mobile-welcome h1 { font-size: 26px; }
    .mobile-welcome p { font-size: 16px; }
    .clock-card b { font-size: 26px; }
    .stat-grid, .dashboard-grid { width: 100%; max-width: 100%; min-width: 0; }
    .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .stat-card { width: 100%; max-width: 100%; min-width: 0; min-height: 112px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .panel { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
    .ring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
    .topology { grid-template-columns: 1fr; gap: 0; }
    .topology > i { display: block; width: 3px; height: 24px; justify-self: center; }
    .topology > i::after { right: auto; top: auto; bottom: -5px; left: 50%; border-top: 0; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: translateX(-50%) rotate(45deg); }
    .topo-branch { display: none; }
    .topology div { min-height: 0; }
    .device-row, .mini-table, .alert-list, .quality { width: 100%; max-width: 100%; min-width: 0; }
    .mini-table div { grid-template-columns: 62px minmax(0, 1fr) 72px 78px; font-size: 13px; }
    .alert-list div { grid-template-columns: 52px minmax(0, 1fr) 76px; }
    .quality { grid-template-columns: 1fr; justify-items: center; }
    .page-head { align-items: stretch; flex-direction: column; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar.customer-filter { grid-template-columns: 1fr 1fr; }
    .filter-bar.customer-filter input[type="search"] { grid-column: 1 / -1; }
    .table-pagination { align-items: flex-start; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .about-summary { align-items: flex-start; flex-wrap: wrap; }
    .version-label { margin-left: 0; }
    .release-entry { grid-template-columns: 1fr; }
    .release-meta { padding-bottom: 10px; border-right: 0; border-bottom: 1px solid rgba(112, 160, 214, .15); }
    .release-notes { padding-top: 14px; }
    .dashboard-device-strip { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
    .dashboard-device-strip > div:not(.dashboard-device-title) { grid-column: span 1; }
    .dashboard-device-strip .soft-btn { justify-self: end; }
    .monitor-device-head { align-items: flex-start; flex-wrap: wrap; }
    .monitor-device-meta { width: 100%; margin-left: 56px; text-align: left; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .traffic-live-grid { grid-template-columns: 1fr; }
    .traffic-live-tools { align-items: stretch; flex-direction: column; gap: 7px; }
    .metric-card { padding: 12px; }
    .device-detail-list div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .device-detail-list b { max-width: 100%; text-align: left; }
    .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; height: 76px;
        display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 12px;
        background: rgba(8, 24, 40, .96); border-top: 1px solid var(--line); backdrop-filter: blur(16px);
    }
    .bottom-nav a { display: grid; place-items: center; color: #c2d2e7; font-size: 12px; border-radius: 8px; }
    .bottom-nav span { font-size: 25px; }
    .bottom-nav a.active { color: var(--blue); background: rgba(19, 127, 255, .16); }
}

@media (max-width: 420px) {
    :root { font-size: 13px; }
    .topbar { gap: 8px; padding: 0 10px; }
    .menu-btn, .notif-btn { width: 36px; height: 36px; }
    .avatar { width: 32px; height: 32px; }
    .user-chip { gap: 7px; padding-left: 8px; }
    .user-chip b { display: none; }
    .content-shell { padding-inline: 12px; }
    .mobile-welcome {
        display: grid; grid-template-columns: 1fr; align-items: start; gap: 10px;
    }
    .clock-card { text-align: left; }
    .mobile-welcome h1 { font-size: 24px; }
    .mobile-welcome p { font-size: 13px; max-width: 280px; }
    .clock-card b { font-size: 24px; }
    .stat-card {
        min-height: 96px; grid-template-columns: 42px minmax(0, 1fr);
        padding: 13px; gap: 10px;
    }
    .stat-icon { width: 40px; height: 40px; font-size: 17px; }
    .stat-card b { font-size: 20px; }
    .stat-card span, .stat-card small { font-size: 12px; }
    .ring-grid { grid-template-columns: minmax(0, 1fr); padding: 18px 12px; }
    .ring { --size: 82px; min-height: 130px; }
    .ring b { top: 31px; }
    .panel-head { min-height: 42px; padding-inline: 12px; }
    .panel-head h2 { font-size: 13px; }
    .device-row label { grid-template-columns: 62px minmax(52px, 1fr) 30px; }
    .mini-table div, .alert-list div {
        grid-template-columns: 1fr; gap: 4px; align-items: start;
        padding-block: 8px;
    }
    .quality ul { width: 100%; font-size: 12px; }
}
