:root {
    color-scheme: dark;
    --bg: #08111f;
    --bg-deep: #060d18;
    --sidebar: #071321;
    --surface: #0d1a2b;
    --surface-2: #101f32;
    --surface-3: #14263b;
    --border: #24364b;
    --border-soft: rgba(139, 167, 197, 0.16);
    --text: #f4f8fc;
    --text-soft: #b5c3d4;
    --muted: #7f91a7;
    --blue: #2f8cff;
    --blue-bright: #48a4ff;
    --cyan: #2fc4ea;
    --green: #2ddc72;
    --amber: #f6b91f;
    --red: #ff5f68;
    --violet: #9a6bff;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
    --radius: 12px;
    --sidebar-width: 224px;
    --drawer-width: 442px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f6fa;
    --bg-deep: #eaf0f6;
    --sidebar: #fbfdff;
    --surface: #ffffff;
    --surface-2: #f5f8fb;
    --surface-3: #edf3f8;
    --border: #d5dfe9;
    --border-soft: rgba(37, 62, 88, 0.11);
    --text: #172538;
    --text-soft: #4d6278;
    --muted: #718399;
    --blue: #1878dc;
    --blue-bright: #2589ef;
    --cyan: #138eaf;
    --green: #159653;
    --amber: #b87a00;
    --red: #d43f49;
    --violet: #7350d5;
    --shadow: 0 18px 55px rgba(39, 62, 86, 0.14);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid rgba(72, 164, 255, 0.85);
    outline-offset: 2px;
}
[hidden] { display: none !important; }
svg { display: block; width: 1.2em; height: 1.2em; fill: currentColor; }
code { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.overlay-open { overflow: hidden; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 0%, rgba(33, 130, 221, 0.08), transparent 38%),
        var(--sidebar);
    border-right: 1px solid var(--border);
}
.sidebar-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--border-soft); }
.brand, .login-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 21px; font-weight: 760; letter-spacing: -0.03em; }
.brand-mark { width: 32px; height: 36px; display: grid; place-items: center; color: #23b8ed; }
.brand-mark svg { width: 32px; height: 32px; }
.nav-list { padding: 18px 10px; display: grid; gap: 6px; }
.nav-item {
    position: relative;
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
    background: transparent;
    color: #9fb0c4;
    cursor: pointer;
    text-align: left;
    transition: background .18s ease, color .18s ease;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: #e7f3ff; background: rgba(72, 164, 255, 0.07); }
.nav-item.active { color: #62b6ff; background: linear-gradient(90deg, rgba(47, 140, 255, .18), rgba(47, 140, 255, .07)); }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue-bright); box-shadow: 0 0 18px rgba(72, 164, 255, .55); }
.sidebar-spacer { flex: 1; }
.connection-card { margin: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(15, 31, 50, .68); overflow: hidden; }
.connection-title { display: flex; align-items: center; gap: 8px; padding: 13px 13px 3px; color: var(--muted); font-size: 12px; }
.connection-card > strong { display: block; padding: 0 13px 12px; font-size: 14px; font-weight: 650; }
.connection-ip { border-top: 1px solid var(--border-soft); padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; }
.connection-ip > span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.connection-ip code { color: #b8c8da; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot { min-height: 48px; display: flex; align-items: center; justify-content: center; color: #61758e; font-size: 11px; border-top: 1px solid var(--border-soft); }
.separator { margin: 0 6px; }
.sidebar-close, .menu-button { display: none !important; }
.sidebar-scrim { display: none; }

.main-panel { min-width: 0; min-height: 100vh; background: radial-gradient(circle at 92% 0%, rgba(48, 112, 180, 0.08), transparent 32%), linear-gradient(150deg, #0b1625, #08111f 72%); }
.topbar { height: 68px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 clamp(20px, 3vw, 36px); background: rgba(8, 17, 31, .88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.topbar-title { min-width: 0; }
.topbar-title h1 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.server-online { display: flex; align-items: center; gap: 8px; color: #c5d2df; font-size: 13px; }
.user-menu { display: flex; align-items: center; gap: 9px; padding-left: 24px; border-left: 1px solid var(--border); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e6eff8; color: #132136; font-weight: 800; }
.user-name { font-weight: 650; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 5px; font-size: 12px; }
.text-button:hover { color: #fff; }
.account-button { display: inline-flex; align-items: center; gap: 5px; }
.account-button svg { width: 14px; height: 14px; }

.content-wrap { width: min(1380px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3vw, 36px) 44px; }
.view { display: none; animation: view-in .2s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.status-strip { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(240px, 1.35fr); border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(19, 37, 59, .88), rgba(13, 27, 44, .88)); box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.status-stat { min-height: 82px; display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-right: 1px solid var(--border-soft); }
.status-stat .status-dot { width: 9px; height: 9px; }
.status-stat div { display: flex; align-items: baseline; gap: 8px; }
.status-stat strong { font-size: 22px; line-height: 1; }
.status-stat span:last-child { color: var(--text-soft); font-size: 12px; }
.status-context { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 15px 22px; }
.status-context span { color: var(--muted); font-size: 11px; }
.status-context code { color: #83bdff; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #62748a; box-shadow: 0 0 0 3px rgba(98,116,138,.12); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(45,220,114,.11), 0 0 12px rgba(45,220,114,.35); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(255,95,104,.1); }
.status-dot.disabled { background: var(--amber); box-shadow: 0 0 0 3px rgba(246,185,31,.1); }
.status-dot.unknown { background: #7c8da2; }

.section-block { margin-top: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(12, 25, 42, .86); box-shadow: 0 15px 44px rgba(0,0,0,.12); overflow: hidden; }
.section-heading { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; gap: 10px; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; padding: 0 13px; cursor: pointer; font-weight: 650; font-size: 12px; transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .58; cursor: wait; }
.button svg { width: 16px; height: 16px; }
.button.primary { background: linear-gradient(180deg, #3f9bff, #2e7fe7); border-color: #4ca3ff; color: #fff; box-shadow: 0 8px 18px rgba(47,140,255,.23); }
.button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #55a7ff, #3388ef); }
.button.secondary { background: #132238; border-color: #30445b; color: #d7e3ef; }
.button.secondary:hover:not(:disabled) { border-color: #4d6681; background: #172a42; }
.button.danger { background: #c7424c; border-color: #e05b64; color: #fff; }
.button.danger.ghost { color: #ff838a; background: rgba(255,95,104,.08); border-color: rgba(255,95,104,.22); }
.button.loading::before { content: ""; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.34); border-top-color: currentColor; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 0 22px 16px; }
.search-box { width: min(430px, 100%); height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: #0a1728; color: var(--muted); }
.search-box:focus-within { border-color: rgba(72,164,255,.7); box-shadow: 0 0 0 3px rgba(47,140,255,.08); }
.search-box svg { width: 18px; height: 18px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #667a91; }
.select-control, .field select { height: 40px; border: 1px solid var(--border); border-radius: 7px; padding: 0 34px 0 12px; background-color: #0a1728; color: #c6d4e2; cursor: pointer; }

.table-shell { border-top: 1px solid var(--border); }
.app-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.app-table th { height: 45px; padding: 0 16px; color: #91a2b7; background: rgba(20, 38, 60, .6); border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.app-table td { height: 67px; padding: 9px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.app-table tbody tr { transition: background .15s ease; }
.app-table tbody tr:hover { background: rgba(58, 113, 169, .075); }
.app-table th:nth-child(1) { width: 21%; }
.app-table th:nth-child(2) { width: 12%; }
.app-table th:nth-child(3) { width: 31%; }
.app-table th:nth-child(4) { width: 19%; }
.app-table th:nth-child(5) { width: 17%; }
.actions-head { text-align: right !important; }
.app-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.app-avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: #fff; font-size: 15px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.app-avatar.violet { background: linear-gradient(145deg, #af75ff, #714bd3); }
.app-avatar.cyan { background: linear-gradient(145deg, #23cde4, #168ca9); }
.app-avatar.orange { background: linear-gradient(145deg, #ffb12a, #ec721a); }
.app-avatar.emerald { background: linear-gradient(145deg, #32db91, #169966); }
.app-avatar.blue { background: linear-gradient(145deg, #4fa6ff, #2a68da); }
.app-avatar.pink { background: linear-gradient(145deg, #ff7eab, #d34f82); }
.app-identity div { min-width: 0; }
.app-identity strong, .app-identity small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-identity strong { font-size: 13px; font-weight: 680; }
.app-identity small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.status-cell { display: flex; align-items: center; gap: 8px; border: 0; padding: 5px 0; background: transparent; cursor: pointer; font-size: 12px; white-space: nowrap; }
.status-cell small { margin-left: 1px; color: var(--muted); font-size: 9px; }
.status-cell .latency-metrics { line-height: 1.45; white-space: normal; }
.url-control { min-width: 0; height: 36px; display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; background: #091625; overflow: hidden; }
.url-control code { min-width: 0; flex: 1; padding: 0 9px; color: #70b3ff; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.url-control.mini-program-url { height: 30px; margin-top: 5px; }
.url-control.mini-program-url code { color: #4ddf91; }
.mini-icon { flex: 0 0 auto; width: 31px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; border-left: 1px solid var(--border-soft); background: transparent; color: #9dafc2; cursor: pointer; }
.mini-icon:hover { color: #60b2ff; background: rgba(47,140,255,.08); }
.mini-icon svg { width: 14px; height: 14px; }
.connection-ip .mini-icon { width: 24px; height: 24px; border: 0; }
.target-code { display: block; padding: 6px 8px; border: 1px solid rgba(47,63,84,.85); border-radius: 5px; color: #b4c2d2; background: rgba(8, 19, 32, .7); font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.action-cell { text-align: right; white-space: nowrap; }
.row-action { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: #6bb6ff; padding: 7px 5px; cursor: pointer; font-size: 11px; }
.row-action:hover { color: #a2d3ff; }
.row-action svg { width: 14px; height: 14px; }
.table-toggle { position: relative; display: inline-block; width: 35px; height: 20px; margin-left: 4px; vertical-align: middle; }
.table-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.table-toggle span { position: absolute; inset: 0; border-radius: 20px; background: #314056; cursor: pointer; transition: .18s ease; }
.table-toggle span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #dfe9f3; transition: .18s ease; }
.table-toggle input:checked + span { background: var(--green); box-shadow: 0 0 12px rgba(45,220,114,.3); }
.table-toggle input:checked + span::after { transform: translateX(15px); background: #fff; }
.table-toggle input:focus-visible + span { outline: 2px solid rgba(72,164,255,.9); outline-offset: 3px; }
.table-toggle input:disabled + span { opacity: .5; }
.table-foot { height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: var(--muted); font-size: 11px; }
.user-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.user-table th { height: 45px; padding: 0 16px; color: #91a2b7; background: rgba(20,38,60,.6); border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; font-weight: 650; }
.user-table td { min-height: 67px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: 14px; }
.user-table th:nth-child(1) { width: 22%; }
.user-table th:nth-child(2) { width: 42%; }
.user-table th:nth-child(3) { width: 17%; }
.user-table th:nth-child(4) { width: 19%; }
.user-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grant-chips span { max-width: 180px; padding: 4px 8px; border-radius: 999px; color: #8fc7ff; background: rgba(47,140,255,.1); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant-fieldset { margin: 4px 0 20px; padding: 0; border: 0; }
.grant-fieldset legend { margin-bottom: 9px; color: #ced9e5; font-size: 15px; font-weight: 620; }
.grant-list { display: grid; gap: 8px; }
.grant-option { min-width: 0; display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(9,22,38,.72); cursor: pointer; }
.grant-option input { position: absolute; opacity: 0; pointer-events: none; }
.grant-option input:checked + .check-visual { background: var(--blue); color: #fff; border-color: var(--blue-bright); }
.grant-option > span:last-child { min-width: 0; }
.grant-option strong, .grant-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant-option strong { font-size: 14px; }
.grant-option small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.grant-app-icon { width: 28px; text-align: center; font-size: 19px; }
.grant-empty { margin: 0; padding: 16px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); text-align: center; }
.credential-user { display: block; color: var(--muted); font-size: 13px; }
.credential-value { margin-top: 8px; display: flex; align-items: stretch; gap: 8px; }
.credential-value code { min-width: 0; flex: 1; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: #091625; color: #73bdff; overflow-wrap: anywhere; }
.empty-state { min-height: 310px; display: grid; place-items: center; align-content: center; text-align: center; padding: 38px; }
.empty-state .empty-icon { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: #67b5ff; }
.empty-state .empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin: 14px 0 4px; font-size: 16px; }
.empty-state p { max-width: 420px; margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.empty-state.compact { min-height: 170px; }

.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.system-card { min-height: 132px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(18,37,59,.95), rgba(11,24,40,.95)); }
.system-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: rgba(47,140,255,.15); color: #5babff; }
.system-card-icon.cyan { color: var(--cyan); background: rgba(47,196,234,.12); }
.system-card-icon.violet { color: #ab82ff; background: rgba(154,107,255,.13); }
.system-card-icon svg { width: 21px; height: 21px; }
.system-card div:nth-child(2) span, .system-card div:nth-child(2) strong, .system-card div:nth-child(2) small { display: block; }
.system-card div:nth-child(2) span { color: var(--muted); font-size: 11px; }
.system-card div:nth-child(2) strong { margin-top: 4px; font-size: 17px; }
.system-card div:nth-child(2) small { margin-top: 3px; color: var(--text-soft); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.health-badge { align-self: start; padding: 3px 7px; border-radius: 5px; color: #9aabc0; background: rgba(127,145,167,.12); font-size: 10px; }
.health-badge.good { color: #55e58a; background: rgba(45,220,114,.1); }
.health-badge.bad { color: #ff7d85; background: rgba(255,95,104,.1); }
.system-detail { margin-top: 16px; }
.detail-list { margin: 0; padding: 0 22px 22px; }
.detail-list > div { min-height: 58px; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--border-soft); }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.detail-list code { color: #8cc5ff; font-size: 12px; }
.detail-list dd span { color: var(--text-soft); font-size: 11px; }
.inline-setting { display: inline-flex; align-items: center; gap: 7px; }
.inline-setting input { width: 78px; min-height: 34px; padding: 0 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text); font: inherit; }
.inline-setting > span { color: var(--muted) !important; }
.compact-button { min-height: 34px; padding-inline: 10px; }
.system-warning { margin: 0 22px 22px; padding: 13px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid rgba(246,185,31,.25); border-radius: 8px; background: rgba(246,185,31,.075); color: #d9c580; font-size: 11px; }
.system-warning strong { flex: 0 0 auto; color: var(--amber); }

.audit-block { margin-top: 0; }
.audit-list { border-top: 1px solid var(--border); }
.audit-item { min-height: 70px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 12px 22px; border-bottom: 1px solid var(--border-soft); }
.audit-marker { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #55df89; background: rgba(45,220,114,.1); }
.audit-marker.error { color: #ff747c; background: rgba(255,95,104,.1); }
.audit-marker svg { width: 15px; height: 15px; }
.audit-content strong { display: block; font-size: 12px; }
.audit-content p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.audit-meta { text-align: right; }
.audit-meta time, .audit-meta code { display: block; color: var(--muted); font-size: 10px; }
.audit-meta code { margin-top: 2px; color: #6686a6; }

.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: rgba(15,31,50,.72); color: #b7c6d6; cursor: pointer; }
.icon-button:hover { color: #fff; border-color: #4c627b; }
.icon-button svg { width: 17px; height: 17px; }
.theme-toggle { flex: 0 0 auto; }
.theme-icon { display: none; }
.theme-icon-sun { display: block; }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.drawer-layer, .modal-layer { position: fixed; inset: 0; z-index: 100; }
.drawer-scrim, .modal-scrim { position: absolute; inset: 0; background: rgba(2, 8, 15, .62); opacity: 0; transition: opacity .22s ease; backdrop-filter: blur(2px); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--drawer-width), 100vw); display: flex; flex-direction: column; background: #0f1d2f; border-left: 1px solid #30445c; box-shadow: -24px 0 70px rgba(0,0,0,.44); transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.drawer-layer.open .drawer-scrim, .modal-layer.open .modal-scrim { opacity: 1; }
.drawer-layer.open .drawer { transform: translateX(0); }
.drawer-head { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: #122238; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.drawer-form { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.drawer-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 22px 20px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > span { color: #ced9e5; font-size: 12px; font-weight: 620; }
.field > span b { color: #55adff; }
.field > small { color: var(--muted); font-size: 10px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #30445b; border-radius: 7px; background: #0a1728; color: var(--text); transition: border .15s ease, box-shadow .15s ease; }
.field input { height: 42px; padding: 0 12px; }
.field textarea { padding: 10px 12px; resize: vertical; min-height: 72px; }
.field input::placeholder, .field textarea::placeholder { color: #60748c; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: rgba(72,164,255,.78); box-shadow: 0 0 0 3px rgba(47,140,255,.08); }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { min-width: 0; border-radius: 7px 0 0 7px; }
.input-affix > span { max-width: 56%; display: flex; align-items: center; padding: 0 10px; border: 1px solid #30445b; border-left: 0; border-radius: 0 7px 7px 0; background: #122239; color: #758aa1; font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.field-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 90px; gap: 10px; }
.check-row, .toggle-row { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(9,22,38,.72); cursor: pointer; }
.check-row input, .toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-visual { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #40566f; border-radius: 5px; color: transparent; background: #0a1728; transition: .15s ease; }
.check-visual svg { width: 13px; height: 13px; }
.check-row input:checked + .check-visual { background: var(--blue); color: #fff; border-color: var(--blue-bright); }
.check-row > span:last-child, .toggle-row > span:first-child { min-width: 0; flex: 1; }
.check-row strong, .check-row small, .toggle-row strong, .toggle-row small { display: block; }
.check-row strong, .toggle-row strong { font-size: 12px; }
.check-row small, .toggle-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.toggle-visual { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 22px; background: #35465b; transition: .18s ease; }
.toggle-visual::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #d8e3ee; transition: .18s ease; }
.toggle-row input:checked + .toggle-visual { background: var(--green); box-shadow: 0 0 12px rgba(45,220,114,.28); }
.toggle-row input:checked + .toggle-visual::after { transform: translateX(16px); background: #fff; }
.public-warning { margin: -4px 0 18px; padding: 11px 12px; display: grid; gap: 3px; border: 1px solid rgba(246,185,31,.24); border-radius: 8px; background: rgba(246,185,31,.07); }
.public-warning strong { color: #f2c95c; font-size: 11px; }
.public-warning span { color: #a99970; font-size: 10px; line-height: 1.55; }
.route-preview { margin-top: 4px; border: 1px solid var(--border); border-radius: 8px; background: #091625; overflow: hidden; }
.route-preview > div { min-height: 48px; display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 12px; }
.route-preview > div + div { border-top: 1px solid var(--border-soft); }
.route-preview span { color: var(--muted); font-size: 10px; }
.route-preview code { color: #7cbbff; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.form-error { margin: 14px 0 0; padding: 10px 12px; border: 1px solid rgba(255,95,104,.28); border-radius: 7px; background: rgba(255,95,104,.08); color: #ff9ca2; font-size: 11px; }
.drawer-foot { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: #122238; }
.drawer-foot-spacer { flex: 1; }
.confirm-modal { position: absolute; left: 50%; top: 50%; width: min(380px, calc(100vw - 32px)); padding: 26px; border: 1px solid #3b4e64; border-radius: 13px; background: #101f32; box-shadow: var(--shadow); text-align: center; opacity: 0; transform: translate(-50%, -47%) scale(.98); transition: .18s ease; }
.modal-layer.open .confirm-modal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: rgba(255,95,104,.12); color: #ff767f; }
.confirm-icon svg { width: 21px; height: 21px; }
.confirm-modal h2 { margin: 14px 0 6px; font-size: 17px; }
.confirm-modal p { margin: 0; color: var(--muted); font-size: 12px; }
.confirm-actions { margin-top: 22px; display: flex; justify-content: center; gap: 10px; }

.account-modal { position: absolute; left: 50%; top: 50%; width: min(420px, calc(100vw - 32px)); border: 1px solid #3b4e64; border-radius: 13px; background: #101f32; box-shadow: var(--shadow); overflow: hidden; opacity: 0; transform: translate(-50%, -47%) scale(.98); transition: .18s ease; }
.modal-layer.open .account-modal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.account-modal-head { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: #122238; }
.account-modal-head > div:nth-child(2) { min-width: 0; flex: 1; }
.account-modal-head h2 { margin: 0; font-size: 16px; }
.account-modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.account-modal-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #62b6ff; background: rgba(47,140,255,.13); }
.account-modal-icon svg { width: 17px; height: 17px; }
.account-modal-body { padding: 20px 18px 18px; }
.account-modal-body .field { margin-bottom: 15px; }
.account-modal-body .field:last-of-type { margin-bottom: 0; }
.account-modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: #122238; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 240px; max-width: 380px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid rgba(45,220,114,.24); border-radius: 8px; background: #12263a; color: #dff9e9; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,95,104,.28); color: #ffd9dc; }
.toast svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--green); }
.toast.error svg { color: var(--red); }
.toast span { font-size: 12px; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 5%, rgba(47,140,255,.16), transparent 32%), #07111e; }
.login-shell { width: min(440px, 100%); min-height: 560px; display: grid; border: 1px solid #26394f; border-radius: 24px; background: rgba(11,24,40,.94); box-shadow: 0 28px 80px rgba(0,0,0,.38); overflow: hidden; backdrop-filter: blur(18px); }
.login-panel { position: relative; padding: 44px 46px 36px; display: flex; flex-direction: column; }
.login-theme-toggle { position: absolute; top: 34px; right: 34px; }
.login-copy { margin: 66px 0 30px; }
.login-copy h1 { margin: 0; font-size: 32px; letter-spacing: -.045em; }
.login-copy p { margin: 9px 0 0; color: var(--muted); font-size: 15px; }
.login-form .field { margin-bottom: 15px; }
.login-submit { width: 100%; min-height: 44px; margin-top: 8px; }
.login-submit svg { margin-left: auto; }
.login-foot { margin: auto 0 0; padding-top: 30px; color: #52677f; font-size: 11px; text-align: center; }

html[data-theme="light"] .sidebar { background: radial-gradient(circle at 15% 0%, rgba(33,130,221,.08), transparent 38%), var(--sidebar); }
html[data-theme="light"] .nav-item { color: #526a82; }
html[data-theme="light"] .nav-item:hover { color: #174d7e; background: rgba(24,120,220,.07); }
html[data-theme="light"] .nav-item.active { color: #126ac2; background: linear-gradient(90deg, rgba(24,120,220,.14), rgba(24,120,220,.04)); }
html[data-theme="light"] .connection-card { background: rgba(246,249,252,.92); }
html[data-theme="light"] .connection-ip code { color: #40566d; }
html[data-theme="light"] .sidebar-foot { color: #8292a4; }
html[data-theme="light"] .main-panel { background: radial-gradient(circle at 92% 0%, rgba(48,112,180,.08), transparent 32%), linear-gradient(150deg, #f8fafc, #f1f5f9 72%); }
html[data-theme="light"] .topbar { background: rgba(250,252,254,.9); }
html[data-theme="light"] .server-online { color: #40566d; }
html[data-theme="light"] .avatar { background: #1d3857; color: #f6f9fc; }
html[data-theme="light"] .text-button:hover { color: #1269bd; }
html[data-theme="light"] .status-strip { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,252,.96)); box-shadow: 0 8px 24px rgba(45,65,88,.07); }
html[data-theme="light"] .status-context code { color: #176bb9; }
html[data-theme="light"] .section-block { background: rgba(255,255,255,.92); box-shadow: 0 15px 44px rgba(45,65,88,.07); }
html[data-theme="light"] .button.secondary { background: #f4f7fa; border-color: #cbd7e3; color: #354b62; }
html[data-theme="light"] .button.secondary:hover:not(:disabled) { border-color: #9fb2c5; background: #eaf0f6; }
html[data-theme="light"] .button.danger.ghost { color: #c8323d; background: rgba(212,63,73,.06); border-color: rgba(212,63,73,.22); }
html[data-theme="light"] .search-box,
html[data-theme="light"] .select-control,
html[data-theme="light"] .field select { background-color: #f8fafc; color: #354b62; }
html[data-theme="light"] .search-box input::placeholder { color: #8a9aad; }
html[data-theme="light"] .app-table th { color: #61758b; background: rgba(235,241,247,.72); }
html[data-theme="light"] .app-table tbody tr:hover { background: rgba(24,120,220,.045); }
html[data-theme="light"] .user-table th { color: #61758b; background: rgba(235,241,247,.72); }
html[data-theme="light"] .grant-option { background: rgba(246,249,252,.9); }
html[data-theme="light"] .grant-fieldset legend { color: #354a60; }
html[data-theme="light"] .credential-value code { background: #f7fafc; color: #1269bd; }
html[data-theme="light"] .url-control { background: #f7fafc; }
html[data-theme="light"] .url-control code { color: #1269bd; }
html[data-theme="light"] .url-control.mini-program-url code { color: #13834b; }
html[data-theme="light"] .mini-icon { color: #60758b; }
html[data-theme="light"] .target-code { border-color: #d4dee8; color: #465c73; background: #f7f9fc; }
html[data-theme="light"] .table-toggle span { background: #c5d0dc; }
html[data-theme="light"] .table-toggle input:checked + span { background: var(--green); box-shadow: 0 0 0 1px rgba(21,150,83,.12), 0 0 12px rgba(21,150,83,.28); }
html[data-theme="light"] .table-toggle input:checked + span::after { background: #fff; box-shadow: 0 1px 4px rgba(20,52,37,.22); }
html[data-theme="light"] .system-card { background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,248,251,.98)); }
html[data-theme="light"] .detail-list code { color: #176bb9; }
html[data-theme="light"] .system-warning { color: #826416; background: rgba(184,122,0,.06); }
html[data-theme="light"] .audit-meta code { color: #5d7895; }
html[data-theme="light"] .icon-button { background: rgba(247,250,252,.9); color: #526a82; }
html[data-theme="light"] .icon-button:hover { color: #1269bd; border-color: #9fb3c7; }
html[data-theme="light"] .drawer { background: #f9fbfd; border-left-color: #c7d4e1; box-shadow: -24px 0 70px rgba(48,67,87,.18); }
html[data-theme="light"] .drawer-head,
html[data-theme="light"] .drawer-foot,
html[data-theme="light"] .account-modal-head,
html[data-theme="light"] .account-modal-actions { background: #f3f7fa; }
html[data-theme="light"] .field > span { color: #354a60; }
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select { border-color: #cbd7e3; background: #fff; }
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder { color: #93a2b2; }
html[data-theme="light"] .input-affix > span { border-color: #cbd7e3; background: #edf3f8; color: #64798f; }
html[data-theme="light"] .check-row,
html[data-theme="light"] .toggle-row { background: rgba(246,249,252,.9); }
html[data-theme="light"] .check-visual { border-color: #aebdcc; background: #fff; }
html[data-theme="light"] .toggle-visual { background: #c5d0db; }
html[data-theme="light"] .public-warning { background: rgba(184,122,0,.055); }
html[data-theme="light"] .public-warning strong { color: #9b6800; }
html[data-theme="light"] .public-warning span { color: #76664a; }
html[data-theme="light"] .route-preview { background: #f7fafc; }
html[data-theme="light"] .route-preview code { color: #176bb9; }
html[data-theme="light"] .form-error { color: #b92f39; background: rgba(212,63,73,.06); }
html[data-theme="light"] .confirm-modal,
html[data-theme="light"] .account-modal { border-color: #c7d4e1; background: #fff; }
html[data-theme="light"] .toast { background: #fff; color: #17653e; }
html[data-theme="light"] .toast.error { color: #a92c35; }
html[data-theme="light"] .login-body { background: radial-gradient(circle at 72% 28%, rgba(38,120,203,.12), transparent 28%), linear-gradient(135deg, #eef3f8, #f8fafc 55%, #edf3f8); }
html[data-theme="light"] .login-shell { border-color: #ccd8e4; background: #fff; box-shadow: 0 30px 90px rgba(44,64,84,.18); }
html[data-theme="light"] .login-foot { color: #8292a3; }

@media (max-width: 1100px) {
    .app-table th:nth-child(1) { width: 23%; }
    .app-table th:nth-child(2) { width: 13%; }
    .app-table th:nth-child(3) { width: 29%; }
    .app-table th:nth-child(4) { width: 19%; }
    .app-table th:nth-child(5) { width: 16%; }
    .row-action span { display: none; }
    .status-context { display: none; }
    .status-strip { grid-template-columns: repeat(3, 1fr); }
    .system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    :root { --sidebar-width: 224px; }
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 24px 0 60px rgba(0,0,0,.4); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(2,7,13,.64); opacity: 0; visibility: hidden; transition: .2s ease; }
    .sidebar-scrim.open { opacity: 1; visibility: visible; }
    .sidebar-close, .menu-button { display: grid !important; }
    .topbar { padding: 0 16px; }
    .topbar-actions { gap: 12px; }
    .server-online, .user-name { display: none; }
    .user-menu { padding-left: 12px; }
    .account-button span { display: none; }
    .account-button { width: 30px; height: 30px; justify-content: center; padding: 0; }
    .content-wrap { padding: 18px 14px 34px; }
    .status-strip { grid-template-columns: repeat(3, 1fr); }
    .status-stat { min-height: 72px; padding: 12px; justify-content: center; border-right: 1px solid var(--border-soft); }
    .status-stat div { display: block; }
    .status-stat strong { display: block; font-size: 19px; }
    .status-stat span:last-child { font-size: 10px; }
    .section-heading { align-items: flex-start; }
    .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
    .toolbar { padding-inline: 16px; }
    .table-shell { padding: 0 12px 8px; border-top: 1px solid var(--border); }
    .app-table, .app-table tbody { display: block; }
    .app-table thead { display: none; }
    .app-table tr { display: grid; grid-template-columns: 1fr 110px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
    .app-table td { height: auto; min-width: 0; padding: 5px 8px; border: 0; }
    .app-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
    .app-table td:nth-child(2) { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-end; }
    .app-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
    .app-table td:nth-child(4) { grid-column: 1; grid-row: 3; }
    .app-table td:nth-child(5) { grid-column: 2; grid-row: 3; display: flex; justify-content: flex-end; align-items: center; }
    .url-control { width: 100%; }
    .user-table, .user-table tbody { display: block; }
    .user-table thead { display: none; }
    .user-table tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 4px; border-bottom: 1px solid var(--border); }
    .user-table td { min-width: 0; min-height: 0; padding: 5px 8px; border: 0; }
    .user-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
    .user-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .user-table td:nth-child(3) { grid-column: 1; grid-row: 3; color: var(--muted); }
    .user-table td:nth-child(4) { grid-column: 2; grid-row: 1 / 4; display: flex; align-items: center; }
    .row-action span { display: none; }
    .open-action { display: none; }
    .table-foot { padding-inline: 14px; }
    .login-shell { min-height: 540px; }
}

@media (max-width: 560px) {
    .topbar-title p { max-width: 230px; }
    .topbar-actions { margin-left: auto; }
    .topbar-actions { gap: 6px; }
    .user-menu { gap: 4px; padding-left: 6px; }
    .avatar { display: none; }
    .status-stat { gap: 8px; }
    .status-stat .status-dot { display: none; }
    .section-heading { min-height: auto; padding: 16px; flex-direction: column; }
    .heading-actions { width: 100%; }
    .heading-actions .button { flex: 1; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .select-control { width: 100%; }
    .app-table tr { grid-template-columns: 1fr 98px; }
    .field-row { grid-template-columns: 82px 1fr; }
    .port-field { grid-column: 2; }
    .ip-field { grid-column: 2; grid-row: 1; }
    .protocol-field { grid-column: 1; grid-row: 1; }
    .drawer-foot { padding: 12px; }
    .drawer-foot .button { padding-inline: 12px; }
    .detail-list > div { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
    .audit-item { grid-template-columns: auto 1fr; padding: 12px 14px; }
    .audit-meta { grid-column: 2; text-align: left; display: flex; gap: 8px; }
    .login-body { padding: 14px; }
    .login-panel { padding: 30px 24px 26px; }
    .login-theme-toggle { top: 20px; right: 20px; }
    .login-copy { margin: 58px 0 26px; }
    .toast-stack { left: 12px; right: 12px; bottom: 12px; }
    .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Readability and touch-target pass: keep the dense layout, but make every
   form control comfortable to read and operate on desktop and mobile. */
body { font-size: 15px; line-height: 1.55; }
.topbar-title h1 { font-size: 20px; }
.topbar-title p, .server-online { font-size: 14px; }
.text-button { min-height: 40px; padding: 7px 9px; font-size: 14px; }
.button { min-height: 44px; padding-inline: 16px; font-size: 14px; border-radius: 9px; }
.icon-button { width: 42px; height: 42px; }
.icon-button svg { width: 19px; height: 19px; }
.section-heading h2 { font-size: 19px; }
.section-heading p, .status-stat span:last-child, .status-context span { font-size: 14px; }
.status-stat strong { font-size: 25px; }
.status-context code, .detail-list code { font-size: 14px; }
.select-control, .field select {
    min-height: 48px;
    height: 48px;
    padding: 0 42px 0 14px;
    border-radius: 9px;
    font-size: 16px;
    line-height: 1.2;
}
.search-box { min-height: 48px; padding-inline: 14px; }
.search-box input { font-size: 16px; }
.field { gap: 8px; margin-bottom: 20px; }
.field > span { font-size: 15px; }
.field > small { font-size: 13px; line-height: 1.45; }
.field input { height: 48px; padding-inline: 14px; font-size: 16px; }
.field textarea { padding: 12px 14px; font-size: 16px; line-height: 1.5; }
.field-row { grid-template-columns: 104px minmax(0, 1fr) 104px; gap: 12px; }
.check-row, .toggle-row { min-height: 54px; margin-bottom: 20px; padding: 13px 14px; gap: 12px; }
.check-row strong, .toggle-row strong { font-size: 15px; }
.check-row small, .toggle-row small { font-size: 13px; line-height: 1.4; }
.check-visual { width: 24px; height: 24px; }
.toggle-visual { width: 52px; height: 30px; border-radius: 30px; }
.toggle-visual::after { top: 3px; left: 3px; width: 24px; height: 24px; }
.toggle-row input:checked + .toggle-visual::after { transform: translateX(22px); }
.table-toggle { width: 46px; height: 26px; margin-left: 6px; }
.table-toggle span::after { width: 22px; height: 22px; }
.table-toggle input:checked + span::after { transform: translateX(20px); }
.status-cell, .row-action { min-height: 42px; font-size: 14px; }
.status-cell small { font-size: 12px; }
.app-identity strong { font-size: 15px; }
.app-identity small, .target-code, .url-control code { font-size: 13px; }
.app-table th { font-size: 13px; }
.app-table td { font-size: 14px; }
.drawer-head h2 { font-size: 21px; }
.drawer-head p { font-size: 13px; }
.drawer-scroll { padding: 24px 22px; }
.public-warning strong { font-size: 14px; }
.public-warning span, .route-preview span, .route-preview code, .form-error { font-size: 13px; }
.route-preview > div { min-height: 56px; }
.drawer-foot { min-height: 82px; padding: 16px 22px; }
.account-modal-head h2 { font-size: 19px; }
.account-modal-head p, .account-modal-body .field > small { font-size: 13px; }
.login-copy h1 { font-size: 31px; }
.login-copy p { font-size: 15px; }
.login-form .field > span { font-size: 15px; }
.login-submit { min-height: 50px; }

@media (max-width: 560px) {
    .field-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
    .field-row .port-field { grid-column: 2; }
    .field-row .ip-field { grid-column: 2; grid-row: 1; }
    .field-row .protocol-field { grid-column: 1; grid-row: 1; }
    .drawer-scroll { padding: 20px 16px; }
    .drawer-foot { padding: 14px 16px; }
    .drawer-foot .button { min-height: 46px; padding-inline: 14px; }
    .app-table td { font-size: 14px; }
    .row-action { min-width: 44px; justify-content: center; }
}
