:root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --border: #dfe5ee;
    --border-strong: #cfd8e3;
    --text: #172033;
    --muted: #687386;
    --muted-light: #98a3b5;
    --primary: #16865d;
    --primary-dark: #0f6b4c;
    --primary-soft: #e5f6ef;
    --blue: #2563eb;
    --amber: #d97706;
    --red: #dc2626;
    --green: #16a34a;
    --sidebar: #ffffff;
    --sidebar-soft: #f5f8fb;
    --shadow: 0 12px 30px rgba(21, 32, 52, 0.08);
    --radius: 6px;
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
}

body.forwarding-layout-active {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.hidden-autofill-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
    background: #eef3f7;
}

.login-visual {
    position: relative;
    padding: 56px 64px;
    background:
        linear-gradient(135deg, rgba(18, 34, 53, 0.94), rgba(13, 74, 64, 0.9)),
        radial-gradient(circle at 20% 20%, rgba(35, 148, 105, 0.22), transparent 34%);
    color: #f8fafc;
    overflow: hidden;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.32;
}

.login-visual > * {
    position: relative;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.login-title {
    margin: 70px 0 12px;
    max-width: 620px;
    font-size: 34px;
    line-height: 1.28;
    font-weight: 600;
}

.login-copy {
    max-width: 620px;
    color: #d5dee8;
    line-height: 1.8;
}

.network-board {
    margin-top: 42px;
    max-width: 690px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.network-card {
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.network-card span {
    display: block;
    color: #b8c8d9;
    font-size:13px;
}

.network-card strong {
    display: block;
    margin-top: 10px;
    font-size: 26px;
    line-height: 1;
}

.recommended-sites-panel {
    margin-top: 42px;
    max-width: 690px;
}

.recommended-sites-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #d5dee8;
}

.recommended-sites-head span {
    font-size: 14px;
}

.recommended-sites-head strong {
    font-size: 18px;
    color: #fff;
}

.recommended-sites-board {
    margin-top: 0;
}

.recommended-site-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.recommended-site-card:hover {
    border-color: rgba(80, 210, 165, 0.72);
    background: rgba(16, 144, 95, 0.18);
    transform: translateY(-1px);
}

.recommended-site-card span {
    color: #b8c8d9;
    font-size:13px;
    word-break: break-all;
}

.recommended-site-card strong,
.recommended-site-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.recommended-site-empty {
    grid-column: 1 / -1;
    min-height: 96px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    color: #b8c8d9;
    background: rgba(255, 255, 255, 0.06);
}

.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px;
}

.login-card {
    width: min(430px, 100%);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.login-card p {
    margin: 10px 0 28px;
    color: var(--muted);
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.form-field textarea {
    height: 78px;
    padding-top: 9px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(22, 134, 93, 0.12);
}

.form-field select.placeholder-select {
    color: var(--muted);
}

.form-field select option {
    color: var(--text);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.login-feedback {
    min-height: 20px;
    margin: 12px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 20px;
}

.login-feedback[data-type="error"] { color: #dc2626; }
.login-feedback[data-type="success"] { color: #047857; }
.login-feedback[data-type="loading"] { color: #2563eb; }

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.checkbox-line input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--green);
}

.keep-login-line {
    gap: 8px;
}

.keep-login-line span {
    color: #64748b;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
    border: 1px solid transparent;
    border-radius: 4px;
    height: 34px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.primary-btn {
    color: #fff;
    background: var(--primary);
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.secondary-btn {
    color: #1f2937;
    border-color: var(--border-strong);
    background: #fff;
}

.ghost-btn {
    color: var(--primary);
    background: var(--primary-soft);
}

.danger-btn {
    color: #fff;
    background: var(--red);
}

.icon-btn {
    width: 34px;
    padding: 0;
    color: var(--muted);
    border-color: var(--border);
    background: #fff;
}

.login-submit {
    width: 100%;
    height: 40px;
}

.login-hint {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 4px;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
}

.app {
    /* 页面内容不足一屏时不创建多余的文档高度；实际超出时才由应用容器滚动。 */
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 224px 1fr;
    background: var(--bg);
    overflow-x: hidden;
    overflow-y: auto;
    transition: grid-template-columns .24s ease;
}

.app.sidebar-collapsed {
    grid-template-columns: 64px 1fr;
}

.sidebar {
    min-height: 100vh;
    background: var(--sidebar);
    color: #334155;
    border-right: 1px solid var(--border);
    overflow: hidden;
}

.sidebar-brand {
    height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.sidebar-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.sidebar-brand span {
    color: var(--primary-dark);
    font-weight: 700;
    transition: opacity .18s ease;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    margin-left: auto;
    border: 0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    background: transparent;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.sidebar-toggle:hover {
    color: var(--primary-dark);
    background: #eef3f7;
}

.sidebar-toggle i {
    position: relative;
    width: 16px;
    height: 14px;
    border-left: 2px solid currentColor;
}

.sidebar-toggle i::before,
.sidebar-toggle i::after {
    content: "";
    position: absolute;
    left: 4px;
    width: 10px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor;
}

.sidebar-toggle i::before {
    top: 1px;
}

.sidebar-toggle i::after {
    bottom: 1px;
    box-shadow: none;
}

.nav {
    padding: 12px 10px;
}

.nav-item {
    width: 100%;
    height: 40px;
    margin-bottom: 4px;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    background: transparent;
    text-align: left;
    transition: background .18s ease, color .18s ease, padding .22s ease, justify-content .22s ease;
}

.nav-item:hover {
    color: var(--primary-dark);
    background: #f2f7f5;
}

.nav-item.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item b {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-grid;
    place-items: center;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
}

.nav-item b svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity .18s ease;
}

.nav-item.active b,
.nav-item:hover b {
    color: var(--primary);
}

.main-shell {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}

.app.sidebar-collapsed .sidebar-brand .brand-mark,
.app.sidebar-collapsed .sidebar-brand span {
    display: none;
}

.app.sidebar-collapsed .sidebar-toggle {
    margin-left: 0;
}

.app.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.app.sidebar-collapsed .nav {
    padding: 12px 8px;
}

.app.sidebar-collapsed .nav-item {
    justify-content: center;
    gap: 0;
    padding: 0;
}

.app.sidebar-collapsed .nav-item span,
.app.sidebar-collapsed .nav-group-arrow,
.app.sidebar-collapsed .nav-submenu {
    display: none;
}

.app.sidebar-collapsed .nav-item.active {
    box-shadow: none;
}

.topbar {
    height: 62px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.topbar-title span {
    color: var(--muted);
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-welcome {
    margin-right: 4px;
    color: #5f7185;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

.system-switch-shell {
    position: relative;
}

.system-switch-trigger {
    width: 44px;
    height: 44px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #cbdfee;
    border-radius: 15px;
    background: radial-gradient(circle at 28% 22%, #ffffff 0 22%, transparent 23%), linear-gradient(145deg, #fafdff, #eaf4fb);
    box-shadow: 0 7px 18px rgba(25, 83, 127, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.system-switch-trigger:hover,
.system-switch-trigger:focus-visible {
    transform: translateY(-1px);
    border-color: #7cb9df;
    background: radial-gradient(circle at 28% 22%, #ffffff 0 22%, transparent 23%), linear-gradient(145deg, #f7fdff, #e1f1fb);
    box-shadow: 0 11px 24px rgba(25, 83, 127, 0.16), 0 0 0 3px rgba(73, 154, 204, 0.1);
    outline: 0;
}

.system-switch-icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    color: #586572;
    transition: color .16s ease, transform .16s ease;
}

.system-switch-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.05;
    stroke-linejoin: round;
}

.system-switch-trigger:hover .system-switch-icon,
.system-switch-trigger:focus-visible .system-switch-icon {
    color: #197c60;
    transform: scale(1.05);
}

.topbar-refresh-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-color: #b9d8ed;
    border-radius: 15px;
    color: #1d608a;
    background: linear-gradient(145deg, #ffffff, #edf7ff);
    box-shadow: 0 5px 14px rgba(31, 104, 150, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    font-weight: 650;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.topbar-refresh-btn:hover:not(:disabled),
.topbar-refresh-btn:focus-visible {
    transform: translateY(-1px);
    border-color: #78b5dc;
    color: #14577f;
    background: linear-gradient(145deg, #ffffff, #e2f3ff);
    box-shadow: 0 9px 19px rgba(31, 104, 150, 0.15), 0 0 0 3px rgba(60, 151, 207, 0.1);
    outline: 0;
}

.topbar-refresh-icon {
    width: 26px;
    height: 26px;
    display: inline-grid;
    flex: 0 0 26px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #34364b, #202132);
    box-shadow: 0 4px 9px rgba(27, 29, 45, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.topbar-refresh-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topbar-refresh-btn.is-refreshing .topbar-refresh-icon {
    animation: topbar-refresh-spin .8s linear infinite;
}

@keyframes topbar-refresh-spin {
    to { transform: rotate(360deg); }
}

.system-switch-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px);
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(20, 26, 36, 0.92);
    color: #fff;
    font-size:13px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.system-switch-tooltip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(20, 26, 36, 0.92);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
}

.system-switch-trigger:hover .system-switch-tooltip,
.system-switch-trigger:focus-visible .system-switch-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.system-switch-mask {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(5px) saturate(110%);
}

.system-switch-drawer {
    position: relative;
    width: min(390px, 94vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-left: 1px solid #dbe6ef;
    box-shadow: -24px 0 58px rgba(15, 23, 42, 0.23);
}

.system-switch-drawer::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #13a67b, #38bdf8 55%, #8b5cf6);
}

.system-switch-drawer-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 28px 24px 20px;
    border-bottom: 1px solid #e7eef5;
    background: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.13), transparent 42%), #fff;
}

.system-switch-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #d9e5ef;
    border-radius: 13px;
    color: #64748b;
    background: #f8fbfe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.system-switch-close:hover,
.system-switch-close:focus-visible {
    border-color: #9dc8db;
    color: #176b8e;
    background: #eef9ff;
    box-shadow: 0 5px 12px rgba(34, 111, 146, 0.12);
    outline: 0;
}

.system-switch-drawer-head h3 {
    margin: 1px 0 4px;
    color: #172b44;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: .02em;
}

.system-switch-drawer-head small {
    display: block;
    max-width: 270px;
    color: #71839a;
    font-size: 13px;
    line-height: 1.55;
}

.system-switch-search {
    position: relative;
    padding: 18px 24px 14px;
    background: #fff;
}

.system-switch-search input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 16px;
    border: 1px solid #d4e2ed;
    border-radius: 14px;
    background: #f8fbfe;
    font-size: 14px;
    color: #203247;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.system-switch-search input:focus {
    border-color: #65b8d6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
    outline: 0;
}

.system-switch-search span {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-42%);
    color: #5b94b4;
    font-size: 18px;
    pointer-events: none;
}

.system-switch-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px 28px;
    overflow: auto;
}

.system-switch-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dce7f0;
    border-radius: 17px;
    background: linear-gradient(145deg, #ffffff, #f7faff);
    text-align: left;
    box-shadow: 0 4px 13px rgba(33, 62, 91, 0.035);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.system-switch-item:hover {
    transform: translateX(-3px);
    border-color: #a9c8dc;
    background: #fff;
    box-shadow: 0 13px 26px rgba(15, 55, 82, 0.11);
}

.system-switch-item.active {
    border-color: #79c9ac;
    background: linear-gradient(135deg, #edfbf5, #e6f8f1);
    box-shadow: 0 10px 24px rgba(20, 139, 100, 0.12);
}

.system-switch-item-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.system-switch-item-copy strong {
    color: #1d3248;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
}

.system-switch-item-copy small {
    color: #70849a;
    font-size: 13px;
    line-height: 1.45;
}

.system-switch-item-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #e1e9f1;
    background: #eef3f8;
    color: #96a6b8;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.system-switch-item.active .system-switch-item-mark {
    border-color: transparent;
    background: linear-gradient(145deg, #36b9f5, #237eea);
    color: #fff;
    box-shadow: 0 6px 13px rgba(35, 126, 234, 0.28);
}

.system-switch-empty {
    margin: 8px 18px 24px;
    padding: 16px;
    border: 1px dashed #d7e2ec;
    border-radius: 14px;
    background: #f8fbfd;
    color: #7b8ca2;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 720px) {
    .topbar-actions {
        gap: 8px;
    }

    .topbar-welcome {
        display: none;
    }

    .system-switch-drawer {
        width: 100vw;
    }

    .system-switch-drawer-head,
    .system-switch-search,
    .system-switch-list {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: #334155;
}

.user-menu-shell {
    position: relative;
}

.user-menu-shell::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 14px;
}

.user-menu-trigger {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #334155;
    transition: transform .16s ease;
}

.user-menu-trigger:hover,
.user-menu-shell:hover .user-menu-trigger,
.user-menu-shell:focus-within .user-menu-trigger {
    transform: translateY(-1px);
}

.user-avatar-frame {
    width: 42px;
    height: 42px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #d6e2ee;
    background: linear-gradient(135deg, #f5fbf7, #f4f8ff);
    box-shadow: 0 10px 22px rgba(20, 33, 51, 0.08);
}

.user-avatar-frame.large {
    width: 52px;
    height: 52px;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.user-menu-arrow {
    position: absolute;
    right: -2px;
    bottom: -1px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border: 1px solid #d6e2ee;
    border-radius: 50%;
    background: #fff;
    color: #8a96a8;
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    transition: transform .16s ease;
}

.user-menu-shell:hover .user-menu-arrow,
.user-menu-shell:focus-within .user-menu-arrow {
    transform: rotate(180deg);
}

.user-menu-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 10px);
    right: 0;
    width: 224px;
    display: none;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(20, 33, 51, 0.14);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.user-menu-shell:hover .user-menu-panel,
.user-menu-shell:focus-within .user-menu-panel {
    display: grid;
    gap: 4px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 12px;
    border-bottom: 1px solid #edf2f7;
}

.user-menu-head div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-menu-head strong {
    color: #1f2f43;
    font-size: 14px;
}

.user-menu-head small {
    color: var(--muted);
    font-size: 12px;
}

.user-menu-item {
    width: 100%;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #35465a;
    text-align: left;
    transition: background .16s ease, color .16s ease;
}

.user-menu-item:hover {
    background: #edf7f2;
    color: #0f6b4c;
}

.user-menu-item-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f3f6fa;
    color: #506273;
    font-size:13px;
    font-weight: 700;
}

.user-menu-item.danger {
    color: #b42318;
}

.user-menu-item.danger:hover {
    background: #fff1f2;
    color: #b42318;
}

.user-menu-item.danger .user-menu-item-icon {
    background: #fff1f2;
    color: #b42318;
}

.user-menu-divider {
    display: block;
    height: 1px;
    margin: 4px 0;
    background: #edf2f7;
}

.content {
    /* 统一业务栏目与左侧导航、浏览器右侧的留白，减少无效空白并保持视觉呼吸感。 */
    padding: 10px 10px 16px;
    min-width: 0;
    transition: margin-left .24s ease, padding .24s ease;
}

.module {
    display: none;
}

.module.active {
    display: block;
}

.app.forwarding-layout-active .topbar,
.app.forwarding-layout-active .content {
    margin-left: 224px;
}

.app.forwarding-layout-active {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.app.forwarding-layout-active .sidebar,
.app.forwarding-layout-active .main-shell {
    height: 100vh;
    overflow: hidden;
}

.app.forwarding-layout-active .content {
    padding: 0;
    height: calc(100vh - 62px);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.app.forwarding-layout-active .forward-server-pane {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 224px;
    width: 224px;
    border-right: 1px solid var(--border);
    background: #fff;
    box-shadow: 8px 0 18px rgba(15, 23, 42, 0.02);
    transition: left .24s ease;
}

.app.sidebar-collapsed.forwarding-layout-active .forward-server-pane {
    left: 64px;
}

.app.forwarding-layout-active .forward-pane-head {
    height: 62px;
    padding: 0 14px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    color: #0f172a;
}

.app.forwarding-layout-active .forward-pane-head > div:first-child {
    min-width: 0;
}

.app.forwarding-layout-active .forward-pane-head h3 {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.app.forwarding-layout-active .forward-pane-head span {
    white-space: nowrap;
}

.forward-pane-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
}

.forward-pane-toolbar {
    display: none;
}

.forward-server-add {
    width: 100%;
    height: 38px;
    padding: 0;
    border-color: #ccd8e8;
    border-radius: 5px;
    background: #fff;
    color: #6b7280;
    font-size: 21px;
    font-weight: 500;
    line-height: 1;
}

.forward-server-title-add {
    width: 40px;
    height: 34px;
    color: #6b7280;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
}

.forward-pane-actions .icon-btn {
    width: 40px;
    height: 34px;
}

.app.forwarding-layout-active .forwarding-layout {
    display: block;
    min-height: 100%;
}

.app.forwarding-layout-active .forward-server-pane {
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: 8px 0 18px rgba(15, 23, 42, 0.02);
}

.app.forwarding-layout-active .forward-server-list {
    height: calc(100vh - 62px);
    align-content: start;
    grid-auto-rows: max-content;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
}

.app.forwarding-layout-active .forward-server-item {
    min-height: 66px;
    padding: 0 20px;
    border: 0;
    border-radius: 0;
}

.app.forwarding-layout-active .forward-server-item.active {
    background: #f1fbf5;
    box-shadow: none;
}

.app.forwarding-layout-active .forward-server-icon {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    font-size:13px;
}

.app.forwarding-layout-active .forward-rules-pane {
    min-height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.summary-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.summary-card span {
    color: var(--muted);
    font-size:13px;
}

.summary-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1;
}

.summary-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted-light);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 14px;
}

#dashboardModule {
    --dashboard-ink: #102a43;
    --dashboard-soft: #f4f8f6;
    color: var(--dashboard-ink);
}

.dashboard-hero {
    min-height: 92px;
    margin-bottom: 12px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid #dbe9e2;
    border-radius: 14px;
    background:
        radial-gradient(circle at 88% 12%, rgba(23, 151, 105, .17), transparent 28%),
        linear-gradient(135deg, #f4fbf7 0%, #ffffff 58%, #f3f8ff 100%);
    box-shadow: 0 8px 26px rgba(15, 58, 43, .055);
}

.dashboard-hero::after {
    width: 170px;
    height: 170px;
    position: absolute;
    right: 8%;
    bottom: -132px;
    border: 28px solid rgba(31, 143, 103, .06);
    border-radius: 50%;
    content: "";
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #16865d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
}

.dashboard-hero h2 {
    margin: 0;
    color: #0f2e24;
    font-size: clamp(21px, 1.8vw, 28px);
    line-height: 1.18;
    letter-spacing: -.035em;
}

.dashboard-hero p {
    max-width: 670px;
    margin: 10px 0 0;
    color: #60756d;
    font-size: 16px;
    line-height: 1.75;
}

.dashboard-hero-actions {
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.dashboard-updated {
    width: 100%;
    margin-bottom: 8px;
    color: #71837d;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.dashboard-refresh-btn:disabled {
    cursor: progress;
    opacity: .65;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-summary-card {
    min-height: 94px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 14px;
    border: 1px solid #e1e9e5;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 42, 33, .04);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-summary-card:hover {
    border-color: #a9d6c4;
    box-shadow: 0 12px 24px rgba(16, 80, 57, .09);
    transform: translateY(-2px);
}

.dashboard-summary-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eaf7f1;
    color: #137b56;
    font-size: 17px;
    font-weight: 800;
}

.tone-blue .dashboard-summary-icon { color: #2968bd; background: #edf5ff; }
.tone-cyan .dashboard-summary-icon { color: #147e8b; background: #eaf9fb; }
.tone-violet .dashboard-summary-icon { color: #7651b6; background: #f3effb; }
.tone-amber .dashboard-summary-icon { color: #a56513; background: #fff6e8; }

.dashboard-summary-copy {
    min-width: 0;
}

.dashboard-summary-copy small,
.dashboard-summary-copy em {
    display: block;
    overflow: hidden;
    color: #71817b;
    font-size:13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-summary-copy strong {
    display: block;
    margin: 5px 0 7px;
    color: #14352a;
    font-size: 29px;
    line-height: 1;
}

.dashboard-summary-card > i {
    color: #9aa9a3;
    font-style: normal;
}

.dashboard-main-grid,
.dashboard-bottom-grid {
    display: grid;
    gap: 16px;
}

.dashboard-main-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(360px, .8fr);
    margin-bottom: 0;
}

.dashboard-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1e9e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(18, 49, 38, .04);
}

.dashboard-card-head {
    min-height: 66px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2ef;
}

.dashboard-card-head span,
.dashboard-card-head small {
    color: #83918c;
    font-size:13px;
}

.dashboard-card-head span {
    display: block;
    margin-bottom: 3px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-card-head h3 {
    margin: 0;
    color: #19382e;
    font-size: 20px;
}

.dashboard-text-btn {
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #16865d;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-service-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-service-item {
    min-height: 76px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 13px;
    border: 1px solid #e2ece7;
    border-radius: 14px;
    background: #f8faf9;
    color: inherit;
    text-align: left;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dashboard-service-item:hover {
    border-color: #cfe3da;
    background: #f0f8f4;
    box-shadow: 0 8px 18px rgba(16, 80, 57, .08);
    transform: translateY(-1px);
}

.dashboard-service-item > span {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: #167d59;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 60, 43, .08);
}

.dashboard-service-item strong,
.dashboard-service-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-service-item strong {
    color: #263f36;
    font-size: 15px;
}

.dashboard-service-item small {
    margin-top: 4px;
    color: #83918c;
    font-size:13px;
}

.dashboard-service-item b {
    color: #1c5c46;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-service-item i {
    color: #a3afab;
    font-size: 20px;
    font-style: normal;
}

#dashboardHealthBoard {
    padding: 16px;
}

.dashboard-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-health-metric {
    min-width: 0;
    min-height: 132px;
    padding: 15px 14px 12px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-content: start;
    gap: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e5ece8;
    border-radius: 14px;
    background: linear-gradient(145deg, #fbfdfc, #f6f9f7);
}

.dashboard-health-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e8f6ef;
    color: #137b56;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-health-metric small,
.dashboard-health-metric strong,
.dashboard-health-metric em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-health-metric small {
    color: #60736b;
    font-size:13px;
    font-weight: 700;
}

.dashboard-health-metric strong {
    margin: 6px 0 4px;
    color: #163b2e;
    font-size: 24px;
    line-height: 1.1;
}

.dashboard-health-metric em {
    color: #8a9993;
    font-size: 12px;
    font-style: normal;
}

.dashboard-health-meter {
    height: 5px;
    grid-column: 1 / -1;
    align-self: end;
    overflow: hidden;
    border-radius: 999px;
    background: #e8efeb;
}

.dashboard-health-meter b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1b8b63, #57b889);
}

.dashboard-health-metric.tone-warning .dashboard-health-icon {
    color: #a66516;
    background: #fff3dc;
}

.dashboard-health-metric.tone-warning .dashboard-health-meter b {
    background: linear-gradient(90deg, #e59b2f, #f2bd62);
}

.dashboard-health-metric.tone-danger .dashboard-health-icon {
    color: #c44747;
    background: #fdecec;
}

.dashboard-health-metric.tone-danger .dashboard-health-meter b {
    background: linear-gradient(90deg, #df5656, #ef8585);
}

.dashboard-health-metric.tone-neutral .dashboard-health-icon {
    color: #667a72;
    background: #edf1ef;
}

.dashboard-risk-list,
.dashboard-activity-list {
    padding: 8px 16px 12px;
}

.dashboard-risk-item {
    width: 100%;
    min-height: 62px;
    padding: 10px 4px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid #f0f3f1;
    background: transparent;
    color: inherit;
    text-align: left;
}

.dashboard-risk-item:last-child {
    border-bottom: 0;
}

.dashboard-risk-item > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px #fff5db;
}

.dashboard-risk-item.tone-red > span { background: #e15353; box-shadow: 0 0 0 4px #fdecec; }
.dashboard-risk-item.tone-blue > span { background: #4b83d1; box-shadow: 0 0 0 4px #eaf2fd; }
.dashboard-risk-item.tone-green > span { background: #24966b; box-shadow: 0 0 0 4px #e6f5ee; }

.dashboard-risk-item strong,
.dashboard-risk-item small {
    display: block;
}

.dashboard-risk-item strong {
    color: #334c43;
    font-size: 14px;
}

.dashboard-risk-item small {
    margin-top: 4px;
    color: #85928d;
    font-size:13px;
}

.dashboard-risk-item i {
    color: #a3afab;
    font-size: 19px;
    font-style: normal;
}

.dashboard-activity-item {
    min-height: 58px;
    padding: 9px 4px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f3f1;
}

.dashboard-activity-item:last-child {
    border-bottom: 0;
}

.dashboard-activity-item > span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf6f2;
    color: #167d59;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-activity-item strong,
.dashboard-activity-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-activity-item strong {
    color: #344c44;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-activity-item small {
    margin-top: 4px;
    color: #8b9893;
    font-size: 12px;
}

.dashboard-empty-state {
    padding: 40px 12px;
    color: #8b9893;
    font-size: 14px;
    text-align: center;
}

.dashboard-overview-side {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-side-section + .dashboard-side-section {
    border-top: 1px solid #e7eeea;
}

.dashboard-risk-section .dashboard-card-head {
    border-bottom-color: #f1f4f2;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.panel-head {
    min-height: 50px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.panel-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.panel-body {
    padding: 16px;
}

.toolbar {
    min-height: 50px;
    margin-bottom: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.search-input,
.filter-select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
    outline: none;
}

.search-input {
    width: 260px;
}

.filter-select {
    width: 150px;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.vpn-console {
    display: grid;
    gap: 14px;
}

.vpn-toolbar,
.vpn-summary,
.vpn-list-panel,
.backup-panel {
    border: 1px solid #dce7f3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.vpn-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.vpn-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.vpn-title-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 8px;
    color: #0f8f6b;
    background: #e8f7f1;
}

.vpn-title-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vpn-title-block h3,
.vpn-backup-head h4 {
    margin: 0;
    color: #172033;
    font-size: 17px;
}

.vpn-title-block span,
.vpn-backup-head span,
.vpn-sync-note span {
    color: #667085;
    font-size:13px;
}

.vpn-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.vpn-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 180px)) minmax(260px, 1fr);
    gap: 12px;
    padding: 14px 18px;
}

.vpn-group-strip {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #dce7f3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.vpn-group-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vpn-group-strip-head strong {
    color: #172033;
}

.vpn-group-strip-head span {
    color: #667085;
    font-size:13px;
}

.vpn-group-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vpn-group-chip {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    color: #344054;
    background: #f8fbfe;
    cursor: pointer;
}

.vpn-group-chip:hover,
.vpn-group-chip.active {
    border-color: #18a071;
    color: #087456;
    background: #eaf8f2;
}

.vpn-group-chip span {
    min-width: 22px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    color: #475467;
    background: #fff;
    font-size:13px;
}

.vpn-stat {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #e3edf7;
    border-radius: 8px;
    background: #f8fbfe;
}

.vpn-stat small {
    display: block;
    color: #667085;
    font-size:13px;
}

.vpn-stat strong {
    display: block;
    margin-top: 6px;
    color: #111827;
    font-size: 20px;
}

.vpn-sync-note {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #d8eee6;
    border-radius: 8px;
    background: #f3fbf7;
}

.vpn-sync-note b {
    display: block;
    margin-bottom: 5px;
    color: #0f766e;
}

.vpn-list-panel {
    padding: 12px;
}

.vpn-filterbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vpn-filterbar .search-input {
    width: min(360px, 36vw);
}

.vpn-count {
    margin-left: auto;
    color: #667085;
    font-size:13px;
}

.vpn-batch-delete {
    height: 34px;
    padding: 0 12px;
}

.vpn-batch-delete:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.vpn-table-wrap {
    border-radius: 8px;
}

.select-cell {
    width: 44px;
    text-align: center;
}

.select-cell input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--green);
}

.vpn-account-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.vpn-account-badge {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    border-radius: 7px;
    color: #0f8f6b;
    background: #e8f7f1;
    font-weight: 700;
}

.vpn-service-pill,
.vpn-group-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size:13px;
}

.vpn-service-pill {
    color: #155e75;
    background: #ecfeff;
}

.vpn-group-pill {
    color: #374151;
    background: #f3f4f6;
}

.vpn-pagination {
    justify-content: space-between;
    padding: 12px;
    gap: 14px;
    color: #334155;
    font-size: 14px;
}

.vpn-pagination-left,
.vpn-pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size-select,
.page-jump input {
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
}

.page-size-select {
    min-width: 110px;
    padding: 0 10px;
}

.page-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.page-jump input {
    width: 58px;
    padding: 0 8px;
    text-align: center;
}

.vpn-pagination .page-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
    color: #334155;
}

.vpn-pagination .page-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
}

.vpn-pagination .page-btn:disabled {
    border-color: #edf1f7;
    background: #f3f6fa;
    color: #cbd5e1;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #94a3b8;
}

.backup-panel {
    padding: 14px;
}

.modal.vpn-backup-modal {
    width: min(880px, calc(100vw - 48px));
}

.vpn-backup-modal-panel {
    display: grid;
    gap: 12px;
}

.vpn-backup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vpn-backup-actions .danger-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.vpn-backup-modal-table {
    max-height: min(520px, calc(100vh - 230px));
    overflow-y: auto;
    overflow-x: hidden;
}

.vpn-backup-modal-table table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.vpn-backup-modal-table th:nth-child(1),
.vpn-backup-modal-table td:nth-child(1) {
    width: 58px;
}

.vpn-backup-modal-table th:nth-child(2),
.vpn-backup-modal-table td:nth-child(2) {
    width: 64px;
}

.vpn-backup-modal-table th:nth-child(4),
.vpn-backup-modal-table td:nth-child(4) {
    width: 170px;
}

.vpn-backup-modal-table th:nth-child(5),
.vpn-backup-modal-table td:nth-child(5) {
    width: 116px;
}

.vpn-backup-name {
    max-width: none;
    word-break: break-all;
}

.modal.vpn-entry-modal {
    width: min(920px, calc(100vw - 44px));
}

.vpn-modal-card {
    display: grid;
    gap: 16px;
}

.vpn-modal-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d8eee6;
    border-radius: 8px;
    background: #f3fbf7;
}

.vpn-modal-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 8px;
    color: #0f8f6b;
    background: #e1f5ee;
}

.vpn-modal-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vpn-modal-intro strong {
    display: block;
    color: #172033;
    font-size: 15px;
}

.vpn-modal-intro span {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size:13px;
}

.vpn-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.vpn-modal-section {
    padding: 14px;
    border: 1px solid #e2eaf3;
    border-radius: 8px;
    background: #fbfdff;
}

.vpn-modal-section h4 {
    margin: 0 0 12px;
    color: #172033;
    font-size: 14px;
}

.vpn-modal-fields {
    display: grid;
    gap: 12px;
}

.vpn-modal-fields .form-field input,
.vpn-modal-fields .form-field select,
.vpn-modal-fields .password-input-wrap {
    width: 100%;
    max-width: none;
}

.vpn-modal-fields .password-input-wrap input {
    max-width: none;
}

@media (max-width: 760px) {
    .vpn-modal-grid {
        grid-template-columns: 1fr;
    }
}

.vpn-backup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .vpn-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .vpn-actions {
        justify-content: flex-start;
    }

    .vpn-summary {
        grid-template-columns: 1fr 1fr;
    }

    .vpn-sync-note {
        grid-column: 1 / -1;
    }

    .vpn-filterbar {
        align-items: stretch;
        flex-direction: column;
    }

    .vpn-filterbar .search-input {
        width: 100%;
    }

    .vpn-count {
        margin-left: 0;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1220px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    vertical-align: middle;
}

.check-cell {
    width: 44px;
    text-align: center;
}

.seq-cell {
    width: 68px;
    text-align: center;
    color: var(--muted);
}

.check-cell input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.secret-cell,
.detail-item b .secret-text {
    white-space: nowrap;
}

.secret-text {
    letter-spacing: 1px;
}

.secret-action,
.secret-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    border: 0;
    border-radius: 4px;
    color: #657892;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

.secret-action:hover,
.secret-toggle:hover {
    color: #1f5f9f;
    background: #eef6ff;
}

.eye-icon {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 10px;
    border: 1.5px solid currentColor;
    border-radius: 14px / 10px;
}

.eye-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.eye-icon.hidden-eye::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 1.5px;
    height: 18px;
    border-radius: 2px;
    background: currentColor;
    transform: translateX(-50%) rotate(-45deg);
}

.copy-icon {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 16px;
}

.copy-icon::before,
.copy-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 11px;
    border: 1.5px solid currentColor;
    border-radius: 1px;
    background: #fff;
}

.copy-icon::before {
    left: 2px;
    top: 1px;
    opacity: 0.75;
}

.copy-icon::after {
    left: 5px;
    top: 4px;
}

th {
    color: #475569;
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
}

td {
    color: #1f2937;
}

tr:hover td {
    background: #fbfdff;
}

.muted {
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size:13px;
    color: #475569;
    background: #eef2f7;
}

.tag.green {
    color: #0f7a4c;
    background: #e5f6ef;
}

.tag.blue {
    color: #1d4ed8;
    background: #e8efff;
}

.tag.amber {
    color: #a25a00;
    background: #fff4dd;
}

.tag.red {
    color: #b91c1c;
    background: #fee2e2;
}

.tag.gray {
    color: #64748b;
    background: #eef2f7;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.link-btn {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 0;
}

.link-btn.danger {
    color: var(--red);
}

.site-url {
    color: #1668c7;
    text-decoration: none;
}

.site-url:hover {
    text-decoration: underline;
}

.pagination {
    margin-top: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.pagination-info {
    color: var(--muted);
    font-size: 13px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    min-width: 34px;
    padding: 0 10px;
}

.page-btn.active {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.status-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.field-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.field-card-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.field-card-head > div > span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size:13px;
}

.field-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.field-tags span {
    padding: 4px 8px;
    border: 1px solid #d9eee6;
    border-radius: 999px;
    color: #0f6b4c;
    background: #f2fbf6;
    font-size:13px;
}

.dict-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.75fr) minmax(560px, 1.25fr);
    gap: 12px;
}

.dict-table-wrap {
    overflow: auto;
}

.compact-table {
    min-width: 0;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
}

.dict-type-row {
    cursor: pointer;
}

.dict-type-row.active td {
    background: #eefaf4;
}

.dict-type-row.active td:first-child {
    color: var(--primary-dark);
    font-weight: 600;
}

code {
    padding: 2px 5px;
    border-radius: 4px;
    color: #334155;
    background: #f1f5f9;
    font-family: Consolas, "Courier New", monospace;
    font-size:13px;
}

.status-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.status-name {
    font-size: 16px;
    font-weight: 600;
}

.status-ip {
    margin-top: 4px;
    color: var(--muted);
    font-size:13px;
}

.metric {
    margin: 11px 0;
}

.metric-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #475569;
    font-size: 13px;
}

.bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf4;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.bar.blue span {
    background: var(--blue);
}

.bar.amber span {
    background: var(--amber);
}

.topology {
    min-height: 320px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        #f8fbff;
    background-size: 34px 34px;
}

.node {
    position: absolute;
    width: 150px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.node strong {
    display: block;
    font-size: 13px;
}

.node span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size:13px;
}

.node.gateway {
    border-color: rgba(22, 134, 93, 0.45);
}

.node.public {
    border-color: rgba(37, 99, 235, 0.45);
}

.permission-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.permission-secondary-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #cfe4dc;
    border-radius: 10px;
    background: linear-gradient(105deg, #f3fbf8, #fff 48%);
    box-shadow: 0 4px 12px rgba(29, 93, 70, .06);
}

.permission-secondary-nav-head {
    display: flex;
    flex: 0 0 176px;
    align-items: center;
    gap: 9px;
    padding-right: 15px;
    border-right: 1px solid #d6e9e1;
}

.permission-secondary-nav-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #118665, #35ad86);
    box-shadow: 0 4px 9px rgba(17, 134, 101, .2);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.permission-secondary-nav-head strong,
.permission-secondary-nav-head small {
    display: block;
}

.permission-secondary-nav-head strong {
    color: #214d41;
    font-size: 14px;
}

.permission-secondary-nav-head small {
    margin-top: 2px;
    color: #6d8b80;
    font-size: 12px;
}

.role-list {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    min-width: 0;
}

.role-item {
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid #d9e6e1;
    border-radius: 8px;
    color: #345249;
    background: rgba(255, 255, 255, .82);
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

.role-item:hover {
    transform: translateY(-1px);
    border-color: #92ceb9;
    background: #fff;
    box-shadow: 0 5px 12px rgba(22, 134, 93, .1);
}

.role-item.active {
    border-color: #16865d;
    color: #135e45;
    background: #e5f6ef;
    box-shadow: inset 3px 0 0 #16865d, 0 4px 10px rgba(22, 134, 93, .1);
}

.role-item b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.role-item .muted {
    margin-top: 4px;
    overflow: hidden;
    color: #71877f;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-systems {
    display: grid;
    gap: 16px;
}

.permission-system {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfa;
}

.permission-system[data-permission-system="operations"] {
    background: #f2faf7;
    border-color: #cfe9df;
}

.permission-system[data-permission-system="system-management"] {
    background: #f3f7fd;
    border-color: #d6e2f3;
}

.permission-system[data-permission-system="hr-finance"] {
    background: #fff8ed;
    border-color: #f0dfbf;
}

.permission-system-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.permission-system-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.permission-system-head h4,
.permission-system-head p {
    margin: 0;
}

.permission-system-head h4 {
    font-size: 16px;
}

.permission-system-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size:13px;
}

.permission-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.permission-card h4 {
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.permission-list {
    padding: 10px 12px 12px;
    display: grid;
    gap: 8px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #334155;
}

.switch {
    width: 38px;
    height: 20px;
    position: relative;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
}

.switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.switch.active {
    background: var(--primary);
}

.switch.active::after {
    transform: translateX(18px);
}

.log-line {
    display: grid;
    grid-template-columns: 120px 110px 1fr 150px;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
    align-items: center;
}

.log-line:last-child {
    border-bottom: 0;
}

.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
}

.modal-mask.show {
    display: flex;
}

.modal {
    width: min(920px, 100%);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.modal.small-modal {
    width: 420px;
    max-width: 420px;
}

.modal.dragging {
    user-select: none;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.modal-head {
    height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    cursor: move;
}

.modal-head .icon-btn {
    cursor: pointer;
}

.modal-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.modal-body {
    padding: 18px;
    overflow: auto;
}

.modal-footer {
    padding: 12px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.deleted-server-modal {
    width: min(1040px, calc(100vw - 48px));
}

.deleted-server-panel {
    display: grid;
    gap: 12px;
}

.deleted-server-tip {
    padding: 10px 12px;
    border: 1px solid #d9eee6;
    border-radius: 6px;
    color: #0f6b4c;
    background: #f2fbf6;
    font-size: 13px;
}

.deleted-server-table table {
    min-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.dict-entry-modal {
    width: min(560px, calc(100vw - 48px));
    border-radius: 6px;
}

.dict-entry-modal .modal-head {
    height: 58px;
    padding: 0 24px;
    background: #fff;
}

.dict-entry-modal .modal-head h3 {
    font-size: 18px;
    font-weight: 500;
    color: #111827;
}

.dict-entry-modal .modal-body {
    padding: 20px 24px 10px;
    background: #fff;
}

.dict-entry-modal .modal-footer {
    padding: 16px 24px 22px;
    border-top: 0;
    background: #fff;
}

.dict-entry-modal .modal-footer .secondary-btn,
.dict-entry-modal .modal-footer .primary-btn {
    min-width: 58px;
    height: 34px;
    border-radius: 4px;
}

.dict-modal-card {
    display: grid;
    gap: 18px;
}

.dict-modal-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #d7f1e3;
    border-radius: 6px;
    background: #f6fbf8;
}

.dict-modal-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 50%;
    color: var(--primary);
    background: #e7f7ee;
    font-weight: 600;
}

.dict-modal-intro strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.dict-modal-intro span {
    display: block;
    color: #64748b;
    font-size:13px;
    line-height: 1.5;
}

.dict-form-grid {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    row-gap: 14px;
    column-gap: 12px;
}

.dict-form-grid .form-field {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0;
}

.dict-form-grid .form-field label {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 400;
    text-align: right;
}

.dict-form-grid .form-field input,
.dict-form-grid .form-field select {
    width: min(320px, 100%);
    height: 36px;
    border-color: #d5dbe5;
    color: #111827;
}

.dict-form-grid .form-field.span-2 input {
    width: 100%;
}

.dict-form-grid .form-field input:focus,
.dict-form-grid .form-field select:focus {
    border-color: #16a35d;
    box-shadow: 0 0 0 2px rgba(22, 163, 93, 0.14);
}

.site-entry-modal {
    width: min(960px, calc(100vw - 48px));
}

.server-entry-modal {
    width: min(720px, calc(100vw - 48px));
}

.site-entry-modal .modal-head {
    height: 54px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.server-entry-modal .modal-head {
    height: 54px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.site-entry-modal .modal-body {
    padding: 16px 18px 14px;
    background: #fbfcfe;
}

.server-entry-modal .modal-body {
    padding: 18px 22px 16px;
    background: #fbfcfe;
}

.site-entry-modal .modal-footer {
    background: #fbfcfe;
}

.server-entry-modal .modal-footer {
    background: #fbfcfe;
}

.server-entry-modal .modal-footer .secondary-btn,
.server-entry-modal .modal-footer .primary-btn {
    min-width: 64px;
    height: 34px;
    border-radius: 5px;
}

.site-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
}

.server-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 16px;
}

.site-form-grid .span-2,
.site-form-grid .span-3 {
    grid-column: 1 / -1;
}

.site-recommend-line {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d8e3ef;
    border-radius: 6px;
    background: #f8fbfd;
    color: #13233a;
    font-weight: 600;
}

.server-form-grid .span-2 {
    grid-column: 1 / -1;
}

.server-optional-list {
    display: grid;
    gap: 10px;
}

.server-optional-block {
    border: 1px solid #d8e3ef;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.server-optional-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    color: #13233a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.server-optional-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #10905f;
}

.server-optional-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 12px 14px 14px;
    border-top: 1px dashed #d8e3ef;
    background: #f8fbfd;
}

.server-optional-panel.hidden {
    display: none;
}

.server-optional-panel .form-field {
    grid-template-columns: 82px minmax(0, 1fr);
}

.server-optional-panel .form-field.span-2 {
    grid-column: 1 / -1;
    grid-template-columns: 82px minmax(0, 1fr);
}

.server-optional-panel .password-input-wrap {
    max-width: none;
}

.server-capability-panel {
    padding: 14px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #f4fbf8 100%);
}

.server-capability-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #d8e3ef;
}

.server-capability-heading > div {
    display: grid;
    gap: 4px;
}

.server-capability-heading strong {
    color: #13233a;
    font-size: 14px;
}

.server-capability-heading span {
    color: #63748a;
    font-size:13px;
}

.server-capability-heading > small {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e7f4ef;
    color: #187255;
    font-size: 12px;
}

.server-capability-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
}

.server-capability-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid #d8e3ef;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.server-capability-option:hover {
    border-color: #9fcdbc;
    box-shadow: 0 5px 14px rgba(15, 118, 84, .08);
}

.server-capability-option:has(input:checked) {
    border-color: #74c4a7;
    background: #f1fbf6;
}

.server-capability-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.server-capability-check {
    width: 18px;
    height: 18px;
    border: 1px solid #aebccc;
    border-radius: 5px;
    background: #fff;
    box-shadow: inset 0 0 0 3px #fff;
}

.server-capability-option:has(input:checked) .server-capability-check {
    position: relative;
    border-color: #10905f;
    background: #10905f;
}

.server-capability-option:has(input:checked) .server-capability-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.server-capability-copy {
    display: grid;
    gap: 2px;
}

.server-capability-copy strong {
    color: #18283f;
    font-size: 13px;
}

.server-capability-copy small {
    color: #718096;
    font-size: 12px;
}

.server-capability-option em {
    color: #8794a5;
    font-size: 12px;
    font-style: normal;
}

.server-capability-enabled,
.server-capability-option:has(input:checked) .server-capability-disabled {
    display: none;
}

.server-capability-option:has(input:checked) .server-capability-enabled {
    display: inline;
    color: #08764e;
    font-weight: 600;
}

@media (max-width: 680px) {
    .server-capability-options {
        grid-template-columns: 1fr;
    }

    .server-capability-heading {
        align-items: center;
    }
}

.site-entry-modal .form-field {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
}

.server-entry-modal .form-field {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 104px minmax(0, 220px);
    align-items: center;
    column-gap: 9px;
}

.server-entry-modal .form-field.span-2 {
    grid-template-columns: 104px minmax(0, 1fr);
}

.site-entry-modal .form-field label {
    margin-bottom: 0;
    color: #4b5565;
    font-size:13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: right;
}

.server-entry-modal .form-field label {
    margin-bottom: 0;
    color: #4b5565;
    font-size:13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: right;
}

.site-entry-modal .form-field input,
.site-entry-modal .form-field select {
    height: 34px;
    padding: 0 10px;
    border-color: #d5dde8;
    border-radius: 5px;
    background: #fff;
}

.server-entry-modal .form-field input,
.server-entry-modal .form-field select {
    height: 34px;
    padding: 0 10px;
    border-color: #d5dde8;
    border-radius: 5px;
    background: #fff;
}

.server-entry-modal .form-field.span-2 input {
    max-width: 494px;
}

.site-entry-modal .form-field input:hover,
.site-entry-modal .form-field select:hover {
    border-color: #b8c5d5;
}

.server-entry-modal .form-field input:hover,
.server-entry-modal .form-field select:hover {
    border-color: #b8c5d5;
}

.password-input-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 220px;
}

.password-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.modal-secret-toggle {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: -1px;
    border: 1px solid #d5dde8;
    border-radius: 0 5px 5px 0;
    background: #fff;
}

.modal-secret-toggle .eye-icon {
    width: 14px;
    height: 9px;
}

.modal.password-entry-modal {
    width: min(620px, calc(100vw - 32px));
}

.modal.password-detail-modal {
    width: min(760px, calc(100vw - 32px));
}

.modal.password-entry-modal .modal-body {
    padding: 16px;
    background: #f8fafc;
}

.modal.password-detail-modal .modal-body {
    padding: 18px 20px;
    background: #f8fafc;
}

.password-modal-card {
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.password-modal-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    background: #f9fcfb;
}

.password-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #0f8f5f;
    color: #fff;
    font-weight: 700;
}

.password-modal-intro strong,
.password-modal-intro span {
    display: block;
}

.password-modal-intro strong {
    color: #0f172a;
    font-size: 15px;
}

.password-modal-intro span {
    margin-top: 4px;
    color: #64748b;
    font-size:13px;
}

.password-form-grid {
    padding: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 12px;
}

.password-form-grid .span-2 {
    grid-column: 1 / -1;
}

.password-form-grid .password-input-wrap {
    max-width: none;
}

.password-form-grid .form-field input,
.password-form-grid .form-field select {
    max-width: 230px;
}

.password-form-grid .span-2 input {
    max-width: none;
}

/* 密码修改表单样式 */
.password-form-fields {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.password-form-row label {
    width: 70px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text);
}

.password-form-row input {
    flex: 1;
    max-width: 220px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.password-form-row input:focus,
.password-form-row select:focus {
    border-color: var(--primary);
}

.password-form-row select {
    flex: 1;
    max-width: 220px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.password-type-panel.hidden {
    display: none;
}

.password-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.password-server-meta {
    margin-bottom: 12px;
}

.password-check-line {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #d5dde8;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
}

.password-bt-check {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
}

.password-check-line input {
    width: 16px;
    height: 16px;
}

.password-server-bt-panel {
    margin-top: 12px;
}

.password-server-bt-panel.hidden {
    display: none;
}

.password-target-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.password-target-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(90px, 120px) 40px;
    align-items: center;
    gap: 10px;
}

.password-target-row input {
    height: 34px;
    border: 1px solid #d5dde8;
    border-radius: 5px;
    padding: 0 10px;
}

.password-target-row .icon-btn {
    width: 34px;
    height: 34px;
    justify-self: end;
}

.password-account-editor {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfdff;
}

.password-account-head,
.password-account-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.2fr) 64px;
    align-items: center;
    gap: 10px;
}

.password-account-head {
    padding: 10px 12px;
    background: #f1f5f9;
    color: #475569;
    font-size:13px;
    font-weight: 600;
}

.password-account-head .tiny-add-btn {
    width: 64px;
    height: 28px;
    padding: 0;
    justify-self: end;
    white-space: nowrap;
}

.password-account-row {
    padding: 10px 12px;
    border-top: 1px solid #e2e8f0;
}

.password-account-row input {
    height: 34px;
    border: 1px solid #d5dde8;
    border-radius: 5px;
    padding: 0 10px;
}

.password-account-row .icon-btn {
    width: 34px;
    height: 34px;
    justify-self: end;
}

.password-detail-card {
    display: grid;
    gap: 14px;
}

.password-detail-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fffb, #ffffff);
}

.password-detail-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #0f8f5f;
    font-weight: 700;
}

.password-detail-hero strong,
.password-detail-hero span {
    display: block;
}

.password-detail-hero strong {
    color: #0f172a;
    font-size: 16px;
}

.password-detail-hero span {
    margin-top: 4px;
    color: #64748b;
    font-size:13px;
}

.password-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.password-detail-meta div {
    min-height: 62px;
    padding: 12px 14px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fff;
}

.password-detail-meta span,
.password-detail-meta b {
    display: block;
}

.password-detail-meta span {
    color: #64748b;
    font-size:13px;
}

.password-detail-meta b {
    margin-top: 8px;
    color: #0f172a;
    font-weight: 500;
    word-break: break-all;
}

.password-detail-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.password-detail-section {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fbfdff;
}

.password-detail-section-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.password-detail-row-list {
    display: grid;
    gap: 10px;
}

.password-detail-row-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(120px, 220px);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.password-detail-row-card:hover {
    border-color: #b7d3ff;
    background: #fbfdff;
}

.password-detail-row-index {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf3ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
}

.password-detail-row-main,
.password-detail-row-side {
    min-width: 0;
}

.password-detail-row-main small,
.password-detail-row-side small {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size:13px;
}

.password-detail-row-main strong,
.password-detail-row-side strong {
    display: block;
    color: #0f172a;
    font-weight: 500;
    word-break: break-all;
}

.password-detail-account-card {
    grid-template-columns: 38px minmax(0, 1fr) minmax(240px, 340px);
}

.password-detail-empty {
    padding: 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: #fff;
    text-align: center;
}

.password-detail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.password-detail-table th,
.password-detail-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
}

.password-detail-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.password-account-detail-table th:first-child,
.password-account-detail-table td:first-child {
    width: 70px;
}

.password-account-detail-table th:nth-child(2),
.password-account-detail-table td:nth-child(2) {
    width: 38%;
}

.password-account-detail-table td {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.password-detail-table .secret-cell {
    display: table-cell;
    white-space: normal;
}

.password-detail-table .secret-cell .secret-text {
    display: inline-block;
    max-width: calc(100% - 76px);
    vertical-align: middle;
    word-break: break-all;
}

.password-detail-row-side.secret-cell .secret-text {
    display: inline-block;
    max-width: calc(100% - 76px);
    vertical-align: middle;
    word-break: break-all;
}

.password-detail-meta b .secret-text {
    display: inline-block;
    max-width: calc(100% - 76px);
    vertical-align: middle;
}

.form-section-title {
    padding: 4px 0 2px;
    color: var(--primary);
    font-weight: 600;
    border-bottom: 1px dashed var(--border);
}

.site-entry-modal .form-section-title {
    margin-top: 2px;
    padding: 8px 10px;
    border: 1px solid #d9eee6;
    border-left: 3px solid var(--primary);
    border-radius: 5px;
    color: #0f6b4c;
    background: linear-gradient(90deg, #effaf5, #ffffff);
    font-size: 13px;
}

.section-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tiny-add-btn {
    height: 26px;
    padding: 0 10px;
    border: 1px solid #b7e4d1;
    border-radius: 4px;
    color: var(--primary);
    background: #fff;
    font-size:13px;
}

.tiny-add-btn:hover {
    border-color: var(--primary);
    background: #f2fbf6;
}

.site-account-list,
.server-ip-list,
.server-account-list {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.site-account-header,
.site-account-row,
.server-account-header,
.server-account-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 32px;
    gap: 8px;
    align-items: center;
}

.server-account-header,
.server-account-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px;
}

.server-ip-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 8px;
    align-items: center;
}

.site-account-header,
.server-account-header {
    margin-bottom: 6px;
    color: var(--muted);
    font-size:13px;
}

.site-account-row + .site-account-row,
.server-ip-row + .server-ip-row,
.server-account-row + .server-account-row {
    margin-top: 8px;
}

.site-account-row input,
.site-account-row select,
.server-ip-row input,
.server-account-row input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d5dde8;
    border-radius: 5px;
    outline: none;
}

.site-account-row input:focus,
.site-account-row select:focus,
.server-ip-row input:focus,
.server-account-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(22, 134, 93, 0.12);
}

.site-account-remove {
    width: 28px;
    height: 28px;
    border: 1px solid #f0c6c6;
    border-radius: 4px;
    color: var(--red);
    background: #fff8f8;
}

.site-account-remove:hover {
    border-color: var(--red);
    background: #fff1f1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.detail-item {
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fbfdff;
}

.detail-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size:13px;
}

.detail-item b {
    display: block;
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

.detail-item-wide {
    grid-column: 1 / -1;
}

.server-account-detail-list {
    display: grid;
    gap: 8px;
}

.server-account-detail-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e5edf7;
    border-radius: 4px;
    background: #fff;
}

.server-account-detail-user,
.server-account-detail-secret {
    min-width: 0;
    color: var(--text);
    font-weight: 500;
}

.server-account-detail-secret {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.confirm-mask {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.confirm-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.confirm-dialog {
    width: min(420px, 100%);
    overflow: hidden;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.16s ease;
}

.confirm-mask.show .confirm-dialog {
    transform: translateY(0) scale(1);
}

.confirm-head {
    height: 48px;
    padding: 0 16px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    user-select: none;
}

.confirm-dialog.dragging .confirm-head {
    cursor: grabbing;
}

.confirm-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ef4444;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    font-weight: 700;
}

.confirm-close {
    width: 28px;
    height: 28px;
    color: #64748b;
}

.confirm-body {
    padding: 0 24px 22px;
}

.confirm-body h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
}

.confirm-body p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.confirm-password-block {
    margin-top: 14px;
}

.confirm-password-block label {
    display: block;
    margin-bottom: 7px;
    color: #17233d;
    font-size: 13px;
    font-weight: 500;
}

.confirm-password-block input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
    outline: none;
}

.confirm-password-block input:focus {
    border-color: #10a35a;
    box-shadow: 0 0 0 2px rgba(16, 163, 90, 0.12);
}

.confirm-password-block input.invalid {
    border-color: #ef4565;
    box-shadow: 0 0 0 2px rgba(239, 69, 101, 0.12);
}

.confirm-password-error {
    min-height: 20px;
    margin-top: 6px;
    color: #ef4565;
    font-size: 13px;
}

.confirm-footer {
    padding: 14px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}

.confirm-footer .secondary-btn,
.confirm-footer .danger-btn {
    min-width: 72px;
    height: 34px;
    border-radius: 4px;
}

.confirm-ok {
    border-color: #ef4444;
    background: #ef4444;
}

.confirm-ok:hover {
    border-color: #dc2626;
    background: #dc2626;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    min-width: 220px;
    padding: 11px 14px;
    border-radius: 5px;
    color: #fff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
    .summary-grid,
    .status-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .workspace-grid,
    .permission-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 360px;
        padding: 34px;
    }

    .login-panel {
        min-height: auto;
        padding: 28px;
    }

    .app {
        grid-template-columns: 72px 1fr;
    }

    .sidebar-brand span,
    .nav-item span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 0;
    }

    .summary-grid,
    .permission-grid,
    .field-card-grid {
        grid-template-columns: 1fr;
    }

    .permission-secondary-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .permission-secondary-nav-head {
        flex-basis: auto;
        padding: 0 0 10px;
        border-right: 0;
        border-bottom: 1px solid #d6e9e1;
    }

    .dashboard-hero {
        padding: 22px;
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-updated {
        text-align: left;
    }

    .dashboard-summary-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-service-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-health-grid {
        grid-template-columns: 1fr;
    }

    .dict-layout {
        grid-template-columns: 1fr;
    }

    .password-detail-row-card,
    .password-detail-account-card {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .password-detail-row-side {
        grid-column: 2;
    }

    .site-form-grid {
        grid-template-columns: 1fr;
    }

    .server-form-grid {
        grid-template-columns: 1fr;
    }

    .site-entry-modal .form-field {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .server-entry-modal .form-field,
    .server-entry-modal .form-field.span-2 {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .server-entry-modal .form-field.span-2 input,
    .password-input-wrap {
        max-width: none;
    }

    .site-account-header {
        display: none;
    }

    .site-account-row {
        grid-template-columns: 1fr;
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--border);
    }

    .site-account-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }
}


        .forwarding-layout {
            display: grid;
            grid-template-columns: 280px minmax(720px, 1fr);
            gap: 16px;
            align-items: start;
        }

        .department-module { gap: 14px; }
        .department-module.active { display: grid; }
        .department-commandbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid #dce7e4; border-radius: 12px; background: linear-gradient(135deg, #fff 0%, #f4fbf8 100%); box-shadow: 0 8px 24px rgba(27, 92, 72, .06); }
        .department-commandbar-copy { display: flex; min-width: 0; align-items: center; gap: 12px; }
        .department-commandbar-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #12916e, #087456); box-shadow: 0 8px 18px rgba(18, 145, 110, .22); font-size: 16px; font-weight: 800; }
        .department-commandbar-copy div { display: grid; gap: 4px; }
        .department-commandbar-copy strong { color: #173c33; font-size: 16px; }
        .department-commandbar-copy small { color: #71847f; font-size:13px; }
        .department-commandbar-actions { display: flex; align-items: center; gap: 10px; }
        .department-search { display: flex; width: min(280px, 28vw); height: 38px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #d6e1df; border-radius: 8px; color: #84938f; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
        .department-search:focus-within { border-color: #1d9b77; box-shadow: 0 0 0 3px rgba(29, 155, 119, .1); }
        .department-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #29433d; background: transparent; font: inherit; }
        .department-add-btn { height: 38px; border-radius: 8px; box-shadow: 0 6px 14px rgba(12, 132, 96, .16); }
        .department-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
        .department-metrics article { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid #e1e9e7; border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgba(26, 60, 51, .04); }
        .department-metrics article > div { display: grid; gap: 3px; }
        .department-metrics small { color: #7b8c88; font-size:13px; }
        .department-metrics strong { color: #173c33; font-size: 21px; line-height: 1; }
        .department-metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #18765d; background: #eaf8f3; font-size: 13px; font-weight: 800; }
        .department-metric-icon.active { color: #17855f; background: #e6f8ef; }
        .department-metric-icon.company { color: #7655c5; background: #f1edff; }
        .department-metric-icon.users { color: #b66a16; background: #fff3e2; }
        .department-panel { overflow: hidden; border-color: #dfe8e6; border-radius: 12px; box-shadow: 0 8px 24px rgba(24, 62, 52, .05); }
        .department-panel-head { min-height: 52px; }
        .department-panel-head > div { display: flex; align-items: baseline; gap: 12px; }
        .department-level-tip { display: inline-flex; align-items: center; gap: 6px; color: #82908d; font-size:13px; }
        .department-level-tip i { width: 18px; height: 1px; background: #9cc7ba; }
        .department-panel .panel-body { padding: 14px 16px 18px; background: #f8fbfa; }
        .department-tree { display: grid; gap: 9px; }
        .department-node { display: grid; gap: 9px; }
        .department-node-main {
            min-height: 74px;
            margin-left: calc(var(--department-depth) * 34px);
            padding: 12px 14px;
            border: 1px solid #dce6e3;
            border-radius: 10px;
            background: #fff;
            display: grid;
            grid-template-columns: minmax(280px, 1fr) auto minmax(320px, auto);
            align-items: center;
            gap: 18px;
            position: relative;
            box-shadow: 0 4px 13px rgba(27, 72, 60, .035);
            transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
        }
        .department-node-main:hover { z-index: 1; border-color: #8ecfbc; box-shadow: 0 8px 22px rgba(25, 106, 82, .09); transform: translateY(-1px); }
        .department-tree-line { position: absolute; top: 50%; left: -20px; width: 20px; height: 1px; background: #bdd8d0; }
        .department-node[style*="--department-depth:0"] > .department-node-main .department-tree-line { display: none; }
        .department-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
        .department-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #cfe5dd; border-radius: 11px; color: #14775b; background: #eaf7f2; font-size: 14px; font-weight: 800; }
        .department-mark-headquarters { color: #a25a0c; border-color: #f1d7b7; background: #fff3e3; }
        .department-mark-subsidiary { color: #6d4cc0; border-color: #ded4fa; background: #f3efff; }
        .department-mark-branch_company { color: #17765c; border-color: #cce7de; background: #eaf8f3; }
        .department-type { display: inline-flex; padding: 2px 7px; border-radius: 999px; text-align: center; font-size: 12px; font-weight: 700; background: #eff6ff; color: #1d4ed8; }
        .department-type-headquarters { background: #fff1dd; color: #9a4d00; }
        .department-type-branch_company { background: #ecfdf5; color: #047857; }
        .department-type-subsidiary { background: #f5f3ff; color: #6d28d9; }
        .department-summary { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
        .department-summary > div { display: flex; min-width: 0; align-items: center; gap: 8px; }
        .department-summary strong { overflow: hidden; color: #173b32; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
        .department-summary > span { display: flex; min-width: 0; align-items: center; gap: 7px; color: #778985; font-size:13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .department-summary code { color: #536a64; font-family: inherit; }
        .department-summary > span i { width: 3px; height: 3px; flex: 0 0 auto; border-radius: 50%; background: #aec0bb; }
        .department-node-stats { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
        .department-status { display: inline-flex; align-items: center; gap: 6px; color: #60746e; font-size:13px; }
        .department-status i { width: 7px; height: 7px; border-radius: 50%; background: #aab5b2; box-shadow: 0 0 0 3px #f0f3f2; }
        .department-status.active { color: #16785b; }
        .department-status.active i { background: #26a77d; box-shadow: 0 0 0 3px #e5f7f0; }
        .department-user-count { color: #70827d; font-size:13px; }
        .department-user-count b { margin-right: 2px; color: #274a40; font-size: 14px; }
        .department-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
        .department-action { display: inline-flex; height: 30px; align-items: center; gap: 4px; padding: 0 9px; border: 1px solid #dbe5e2; border-radius: 7px; color: #49635c; background: #fff; cursor: pointer; font-size:13px; transition: color .15s ease, border-color .15s ease, background .15s ease; }
        .department-action:hover { color: #087456; border-color: #9bcfbe; background: #f0faf6; }
        .department-action.primary { color: #0c7e5e; border-color: #b9dfd2; background: #eff9f5; }
        .department-action.danger { color: #c24e4e; }
        .department-action.danger:hover { color: #b52929; border-color: #efbaba; background: #fff4f4; }
        .department-empty { padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #64748b; }
        .department-modal-mask { position: fixed; inset: 0; z-index: 1300; background: rgba(15, 23, 42, .42); display: grid; place-items: center; padding: 20px; }
        .department-modal-mask.hidden { display: none; }
        .department-modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 20px 60px rgba(15, 23, 42, .26); }
        .department-form { display: grid; gap: 14px; }
        .department-form textarea { resize: vertical; }
        .department-role-editor { margin-top: 4px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
        .department-role-editor > label { font-weight: 700; }
        .department-role-editor > p { margin: 5px 0 12px; }
        .department-role-list { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; }
        .department-role-list label { display: inline-flex; align-items: center; gap: 5px; }
        @media (max-width: 1100px) {
            .department-node-main { grid-template-columns: minmax(240px, 1fr) auto; }
            .department-actions { grid-column: 1 / -1; justify-content: flex-end; }
        }
        @media (max-width: 760px) {
            .department-commandbar { align-items: stretch; flex-direction: column; }
            .department-commandbar-actions { align-items: stretch; flex-direction: column; }
            .department-search { width: 100%; }
            .department-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .department-panel-head { align-items: flex-start; flex-direction: column; }
            .department-node-main { margin-left: calc(var(--department-depth) * 14px); grid-template-columns: 1fr; gap: 11px; }
            .department-node-stats { justify-content: flex-start; }
            .department-actions { grid-column: auto; justify-content: flex-start; flex-wrap: wrap; }
        }

        .forward-server-pane,
        .forward-rules-pane {
            background: #fff;
            border: 1px solid #e6edf5;
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(15, 35, 55, 0.06);
            overflow: hidden;
        }

        .forward-server-pane {
            min-height: calc(100vh - 190px);
        }

        .forward-pane-head,
        .forward-rule-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 16px 18px;
            border-bottom: 1px solid #edf2f7;
        }

        .forward-pane-head h3,
        .forward-rule-head h3 {
            margin: 0;
            font-size: 16px;
            font-weight: 600;
            color: #17233d;
        }

        .forward-pane-head span,
        .forward-rule-head span {
            display: block;
            margin-top: 4px;
            color: #7a8799;
            font-size:13px;
        }

        .forward-server-list {
            display: grid;
            gap: 8px;
            padding: 10px;
        }

        .forward-server-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 12px;
            border: 1px solid transparent;
            border-radius: 10px;
            background: #fff;
            text-align: left;
            cursor: pointer;
            transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
        }

        .forward-server-item:hover {
            border-color: #ccebdc;
            background: #f7fcfa;
        }

        .forward-server-item.active {
            border-color: #bdebd2;
            background: #effaf5;
            box-shadow: inset 3px 0 0 #10a35a;
        }

        .forward-server-select {
            min-width: 0;
            flex: 1;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }

        .forward-server-icon {
            flex: 0 0 38px;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            color: #fff;
            background: #142033;
            font-weight: 700;
            font-size: 13px;
        }

        .forward-server-item.pending .forward-server-icon {
            background: #8b96a8;
        }

        .forward-server-main {
            min-width: 0;
            flex: 1;
        }

        .forward-server-main strong {
            display: block;
            font-size: 14px;
            font-weight: 400;
            color: #475569;
            line-height: 1.35;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .forward-server-main strong[data-forward-tooltip] {
            position: relative;
        }

        .forward-server-main strong[data-forward-tooltip]::before,
        .forward-server-main strong[data-forward-tooltip]::after {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
        }

        .forward-server-main strong[data-forward-tooltip]::before {
            content: "";
            position: absolute;
            left: 18px;
            top: calc(100% + 4px);
            z-index: 31;
            width: 12px;
            height: 12px;
            border-top: 1px solid #d6e2eb;
            border-left: 1px solid #d6e2eb;
            background: #ffffff;
            transform: translateY(6px) rotate(45deg);
            box-shadow: -3px -3px 8px rgba(15, 23, 42, 0.04);
        }

        .forward-server-main strong[data-forward-tooltip]::after {
            content: attr(data-forward-tooltip);
            position: absolute;
            left: 0;
            top: calc(100% + 10px);
            z-index: 30;
            min-width: max-content;
            max-width: 280px;
            padding: 9px 12px;
            border: 1px solid #d6e2eb;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
            color: #243443;
            font-size: 13px;
            font-weight: 500;
            line-height: 1.5;
            white-space: normal;
            overflow-wrap: anywhere;
            transform: translateY(6px);
            backdrop-filter: blur(8px);
        }

        .forward-server-main strong[data-forward-tooltip]:hover::before,
        .forward-server-main strong[data-forward-tooltip]:hover::after,
        .forward-server-main strong[data-forward-tooltip]:focus-visible::before,
        .forward-server-main strong[data-forward-tooltip]:focus-visible::after {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .forward-server-main small {
            display: block;
            margin-top: 4px;
            color: #6b7890;
            font-size:13px;
        }

        .forward-server-main .forward-server-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            white-space: nowrap;
        }

        .forward-server-main .forward-server-meta span {
            flex: 0 0 auto;
        }

        .forward-server-main small em {
            margin-left: 6px;
            color: #10a35a;
            font-style: normal;
            flex: 0 0 auto;
            white-space: nowrap;
        }

        .forward-server-count {
            color: #10a35a;
            font-size:13px;
            white-space: nowrap;
        }

        .forward-server-actions {
            display: flex;
            flex: 0 0 auto;
            flex-direction: column;
            align-items: flex-end;
            justify-content: center;
            gap: 6px;
            min-width: 34px;
            margin-left: 6px;
            opacity: 0;
            transform: translateX(4px);
            transition: opacity .18s ease, transform .18s ease;
        }

        .forward-server-item:hover .forward-server-actions,
        .forward-server-item.active .forward-server-actions {
            opacity: 1;
            transform: translateX(0);
        }

        .forward-server-edit,
        .forward-server-delete {
            flex: 0 0 auto;
            padding: 0;
            font-size:13px;
            line-height: 1.2;
            white-space: nowrap;
        }

        .forward-server-edit {
            color: #0f8f63;
        }

        .forward-server-edit:hover {
            color: #0c7250;
        }

        .forward-rule-tools {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .forward-server-detail {
            display: grid;
            grid-template-columns: 180px 160px minmax(360px, 1fr);
            gap: 14px;
            padding: 14px 18px;
            background: #f8fbfd;
            border-bottom: 1px solid #edf2f7;
        }

        .forward-server-detail:empty {
            display: none;
        }

        .forward-info-item {
            min-width: 0;
        }

        .forward-info-item span {
            display: block;
            color: #7a8799;
            font-size:13px;
            margin-bottom: 4px;
        }

        .forward-info-item b,
        .forward-info-item a {
            color: #17233d;
            font-size: 13px;
            font-weight: 500;
            word-break: break-all;
        }

        .forward-info-item a {
            text-decoration: none;
        }

        .forward-api-edit {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .forward-api-edit input {
            width: min(420px, 100%);
            height: 32px;
            border: 1px solid #d8e2ee;
            border-radius: 6px;
            padding: 0 10px;
            color: #17233d;
            background: #fff;
            outline: none;
        }

        .forward-api-edit input:focus {
            border-color: #16a563;
            box-shadow: 0 0 0 3px rgba(22, 165, 99, 0.12);
        }

        .forward-search-row {
            padding: 16px 18px 10px;
            border-bottom: 1px solid #edf2f7;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .forward-left-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .forward-add-btn {
            min-width: 104px;
            height: 32px;
            border-radius: 4px;
            padding: 0 14px;
            font-size: 13px;
        }

        .forward-sync-btn {
            height: 32px;
            border-radius: 4px;
            padding: 0 12px;
            font-size: 13px;
            background: #fff;
        }

        .forward-sync-btn[hidden],
        .forward-refresh-btn[hidden] {
            display: none !important;
        }

        .forward-search-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
        }

        .forward-search-actions .forward-search-mode {
            width: 136px;
            height: 32px;
            border-radius: 4px;
            box-shadow: none;
            color: #475569;
            font-size: 13px;
        }

        .forward-search-actions .search-input {
            width: 244px;
            height: 32px;
            border-radius: 4px 0 0 4px;
            border-right: 0;
            box-shadow: none;
        }

        .forward-search-actions .icon-btn {
            width: 40px;
            height: 32px;
            border-radius: 0;
            border-color: #dcdfe6;
            background: #fff;
            color: #303133;
            font-size: 16px;
        }

        .forward-search-actions .forward-refresh-btn {
            margin-left: 10px;
            border-radius: 4px;
        }

        .forward-count-row {
            display: flex;
            justify-content: flex-end;
            padding: 0 18px 8px;
            color: #303133;
            font-size: 13px;
        }

        .forward-table-wrap {
            overflow-x: auto;
        }

        .forward-table-wrap table {
            min-width: 920px;
        }

        .forward-pagination {
            margin-top: 0;
            padding: 12px 18px;
            justify-content: flex-end;
            gap: 12px;
            border-top: 0;
            border-radius: 0 0 6px 6px;
            color: #606266;
            font-size: 14px;
        }

        .forward-page-total,
        .forward-page-jump {
            color: #606266;
            white-space: nowrap;
        }

        .forward-page-size-select {
            width: 112px;
            height: 34px;
            padding: 0 30px 0 12px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            background: #fff;
            color: #606266;
            font-size: 14px;
        }

        .forward-page-numbers {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .forward-page-number,
        .forward-page-arrow {
            min-width: 34px;
            height: 34px;
            padding: 0 10px;
            border: 0;
            border-radius: 2px;
            background: #f4f5f7;
            color: #303133;
            font-size: 14px;
            cursor: pointer;
        }

        .forward-page-number.active {
            background: #409eff;
            color: #fff;
            cursor: default;
        }

        .forward-page-arrow:disabled,
        .forward-page-number:disabled:not(.active) {
            color: #c0c4cc;
            cursor: not-allowed;
            opacity: .75;
        }

        .forward-page-ellipsis {
            min-width: 28px;
            text-align: center;
            color: #303133;
            font-weight: 600;
        }

        .forward-page-jump {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .forward-page-jump input {
            width: 58px;
            height: 34px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            color: #606266;
            text-align: center;
            font-size: 14px;
        }

        .forward-table-wrap thead th {
            background: #f7f8fa;
            color: #606266;
            font-weight: 400;
            height: 44px;
        }

        .forward-table-wrap tbody td {
            height: 44px;
            color: #303b4c;
            border-bottom: 1px solid #ebeef5;
        }

        .forward-entry {
            font-weight: 500;
            color: #17233d;
        }

        .forward-target {
            color: #46566e;
            font-size:13px;
        }

        .forward-api-note {
            margin: 14px 18px 18px;
            padding: 12px 14px;
            border: 1px dashed #b9dfca;
            border-radius: 10px;
            background: #f7fcfa;
            color: #5f6d80;
            font-size:13px;
            line-height: 1.7;
        }

        .forward-api-note b {
            color: #0a9651;
            font-weight: 600;
        }

        .reverse-proxy-table-wrap td {
            vertical-align: middle;
        }

        .reverse-proxy-domain {
            color: #008a4b;
            font-weight: 400;
        }

        .reverse-proxy-target {
            color: #008a4b;
            font-family: Consolas, "Courier New", monospace;
            font-size: 13px;
            font-weight: 400;
        }

        .reverse-proxy-ssl {
            border: 0;
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 0 10px;
            border-radius: 999px;
            background: #fff3e8;
            color: #d46b08;
            font-size:13px;
        }

        button.reverse-proxy-ssl {
            cursor: pointer;
            font-family: inherit;
        }

        button.reverse-proxy-ssl:hover {
            filter: brightness(0.97);
            box-shadow: inset 0 0 0 1px currentColor;
        }

        .reverse-proxy-ssl.valid {
            background: #e8f8ef;
            color: #008a4b;
        }

        .modal.reverse-proxy-server-modal {
            width: 620px;
            max-width: calc(100vw - 24px);
            border-radius: 10px;
            overflow: hidden;
        }

        .reverse-proxy-server-card {
            border: 1px solid #dbe7f3;
            border-radius: 10px;
            overflow: hidden;
            background: #fff;
        }

        .reverse-proxy-server-form {
            grid-template-columns: minmax(220px, 280px) 1fr;
            gap: 16px;
            padding: 18px;
        }

        .reverse-proxy-confirm {
            padding: 14px;
            border: 1px solid #d9e7f5;
            border-radius: 8px;
            background: #f8fbfd;
        }

        .reverse-proxy-confirm-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .reverse-proxy-confirm-grid > div {
            min-width: 0;
            padding: 10px 12px;
            border: 1px solid #e1ebf5;
            border-radius: 8px;
            background: #fff;
        }

        .reverse-proxy-confirm-grid span {
            display: block;
            margin-bottom: 6px;
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-confirm-grid b {
            display: block;
            min-width: 0;
            color: #14213d;
            font-weight: 500;
            word-break: break-all;
        }

        .reverse-proxy-empty {
            padding: 18px;
            border: 1px dashed #d9e7f5;
            border-radius: 8px;
            color: #68778c;
            background: #f8fbfd;
        }

        .modal.reverse-proxy-config-modal {
            width: 930px;
            height: 820px;
            max-width: calc(100vw - 24px);
            max-height: calc(100vh - 24px);
            border-radius: 10px;
            overflow: hidden;
        }

        .modal.reverse-proxy-config-modal .modal-head {
            min-height: 50px;
            padding: 0 18px;
        }

        .modal.reverse-proxy-config-modal #modalTitle {
            font-size: 15px;
            font-weight: 500;
        }

        .modal.reverse-proxy-config-modal .modal-body {
            padding: 0 !important;
            margin: 0 !important;
            overflow: hidden;
            height: calc(820px - 50px);
            max-height: calc(100vh - 74px);
        }

        .modal-body.reverse-proxy-config-body {
            padding: 0 !important;
            margin: 0 !important;
            overflow: hidden !important;
        }

        .modal.reverse-proxy-config-modal .modal-footer {
            display: none;
        }

        .reverse-proxy-config-card {
            margin: 0 !important;
            padding: 0 !important;
            background: #fff;
        }

        .modal-body.reverse-proxy-config-body .reverse-proxy-config-card {
            margin: 0 !important;
            padding: 0 !important;
        }

        .modal.reverse-proxy-add-modal {
            width: 900px;
            max-width: calc(100vw - 24px);
            border-radius: 12px;
            overflow: hidden;
        }

        .modal.reverse-proxy-process-modal {
            width: 520px;
            max-width: calc(100vw - 24px);
            border-radius: 10px;
            overflow: hidden;
        }

        .reverse-proxy-config-title {
            display: grid;
            gap: 4px;
            padding: 0 2px 10px;
            border-bottom: 1px solid #edf2f7;
        }

        .reverse-proxy-config-title strong {
            color: #14213d;
            font-size: 16px;
        }

        .reverse-proxy-config-title span {
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-config-loading,
        .reverse-proxy-config-empty {
            padding: 26px;
            color: #68778c;
            text-align: center;
        }

        .reverse-proxy-config-layout {
            display: grid;
            grid-template-columns: 142px minmax(0, 1fr);
            min-height: 770px;
            height: 100%;
            background: #fff;
            margin: 0 !important;
            padding: 0 !important;
        }

        .modal-body.reverse-proxy-config-body .reverse-proxy-config-layout {
            margin: 0 !important;
            padding: 0 !important;
        }

        .reverse-proxy-config-tabs {
            display: grid;
            align-content: start;
            gap: 0;
            padding: 0 !important;
            margin: 0 !important;
            background: #f2f5f8;
            border-right: 0;
            align-self: stretch;
            height: 100%;
            min-height: 770px;
        }

        .modal-body.reverse-proxy-config-body .reverse-proxy-config-tabs {
            margin: 0 !important;
            padding: 0 !important;
        }

        .reverse-proxy-config-side-head {
            display: grid;
            gap: 5px;
            margin-bottom: 10px;
            padding: 12px 12px;
            border: 1px solid #dce7f3;
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 6px 18px rgba(20, 33, 61, 0.05);
        }

        .reverse-proxy-config-side-head strong {
            color: #10213b;
            font-size: 15px;
            line-height: 1.35;
            word-break: break-all;
        }

        .reverse-proxy-config-side-head span {
            color: #60718a;
            font-size:13px;
            line-height: 1.35;
            word-break: break-all;
        }

        .reverse-proxy-config-tabs button {
            height: 39px;
            border: 0;
            border-radius: 0;
            background: transparent;
            color: #2f3b4f;
            text-align: left;
            padding: 0 31px;
            cursor: pointer;
            font-size: 14px;
            position: relative;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .reverse-proxy-config-tabs button.active {
            background: #fff;
            box-shadow: none;
            color: #11924f;
            font-weight: 500;
        }

        .reverse-proxy-config-tabs button.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            border-radius: 0;
            background: #18a058;
        }

        .reverse-proxy-config-panels {
            min-width: 0;
            padding: 18px 18px 16px;
            background: #fff;
            overflow: auto;
        }

        .reverse-proxy-config-panel {
            display: none;
        }

        .reverse-proxy-config-panel.active {
            display: block;
        }

        .reverse-proxy-config-hero {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 16px;
            align-items: center;
            margin-bottom: 14px;
            padding: 16px 18px;
            border: 1px solid #d9e7f3;
            border-radius: 12px;
            background: linear-gradient(135deg, #f7fcfa 0%, #ffffff 55%, #f3f8fd 100%);
            box-shadow: 0 10px 24px rgba(20, 33, 61, 0.06);
        }

        .reverse-proxy-config-hero span,
        .reverse-proxy-config-hero em {
            display: block;
            color: #68778c;
            font-size:13px;
            font-style: normal;
        }

        .reverse-proxy-config-hero strong {
            display: block;
            margin: 5px 0;
            color: #10213b;
            font-size: 20px;
            font-weight: 700;
            word-break: break-all;
        }

        .reverse-proxy-config-hero-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 96px;
            height: 34px;
            padding: 0 14px;
            border-radius: 999px;
            background: #fff3e8;
            color: #e56b13;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
        }

        .reverse-proxy-config-overview {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 9px;
            margin-bottom: 12px;
        }

        .reverse-proxy-config-overview div,
        .reverse-proxy-readonly-field {
            padding: 10px 12px;
            border: 1px solid #dfeaf4;
            border-radius: 10px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
            box-shadow: 0 6px 18px rgba(20, 33, 61, 0.04);
        }

        .reverse-proxy-config-overview span,
        .reverse-proxy-readonly-field span,
        .reverse-proxy-readonly-field small {
            display: block;
            color: #536176;
            font-size:13px;
        }

        .reverse-proxy-config-overview b,
        .reverse-proxy-readonly-field b {
            display: block;
            margin-top: 5px;
            color: #14213d;
            font-weight: 600;
            word-break: break-all;
        }

        .reverse-proxy-readonly-field small {
            margin-top: 5px;
            color: #7a8798;
        }

        .reverse-proxy-section-title {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 9px;
            padding: 0 2px;
        }

        .reverse-proxy-section-title strong {
            color: #14213d;
            font-size: 15px;
        }

        .reverse-proxy-section-title span {
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-config-list {
            display: grid;
            gap: 10px;
        }

        .reverse-proxy-config-row {
            display: grid;
            grid-template-columns: 34px repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            align-items: center;
            padding: 12px;
            border: 1px solid #e2ebf5;
            border-radius: 8px;
            background: #fff;
        }

        .reverse-proxy-config-index {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #edf4ff;
            color: #2f80ed;
            font-weight: 600;
            font-size:13px;
        }

        .reverse-proxy-config-cell small {
            display: block;
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-config-cell b {
            display: block;
            margin-top: 5px;
            color: #14213d;
            font-weight: 500;
            word-break: break-all;
        }

        .reverse-proxy-domain-board {
            display: grid;
            gap: 0;
        }

        .reverse-proxy-bt-panel {
            display: grid;
            gap: 0;
        }

        .reverse-proxy-bt-toolbar {
            display: grid;
            grid-template-columns: minmax(0, 410px) 1fr auto;
            gap: 10px;
            align-items: center;
            margin-bottom: 10px;
        }

        .reverse-proxy-bt-help {
            min-height: 112px;
            padding: 9px 12px;
            border: 1px solid #d8e2ee;
            border-radius: 7px;
            background: #fff;
            color: #9aa4b2;
            font-size: 13px;
            line-height: 1.5;
        }

        .reverse-proxy-domain-input {
            width: 100%;
            height: 112px;
            resize: vertical;
            border-color: #18a058;
            color: #0b9a4f;
            outline: none;
            font-family: inherit;
        }

        .reverse-proxy-domain-input::placeholder {
            color: #8aa0b8;
        }

        .reverse-proxy-bt-table .link.danger {
            color: #e02424;
            font-weight: 400;
            padding: 4px 9px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            line-height: 1.4;
            cursor: pointer;
            transition: background .15s ease, color .15s ease;
        }

        .reverse-proxy-bt-table .link.danger:hover {
            background: #fff1f1;
            color: #c91616;
        }

        .reverse-proxy-bt-help span {
            display: block;
        }

        .reverse-proxy-bt-add {
            width: 56px;
            height: 34px;
            border: 0;
            border-radius: 8px;
            background: #18a84f;
            color: #fff;
            cursor: pointer;
            font-size: 14px;
            font-weight: 400;
        }

        .reverse-proxy-bt-https {
            margin-bottom: 9px;
            color: #59687c;
            font-size: 13px;
            text-align: right;
        }

        .reverse-proxy-bt-https b {
            color: #2f3b4f;
            font-weight: 500;
        }

        .reverse-proxy-bt-table {
            overflow: hidden;
            border-top: 1px solid #edf1f5;
            border-bottom: 1px solid #edf1f5;
            background: #fff;
        }

        .reverse-proxy-bt-head,
        .reverse-proxy-bt-row {
            display: grid;
            grid-template-columns: 44px minmax(240px, 1fr) 120px 130px;
            align-items: center;
        }

        .reverse-proxy-bt-head {
            min-height: 38px;
            background: #f6f7f9;
            color: #4d5d73;
            font-size: 13px;
        }

        .reverse-proxy-bt-row {
            min-height: 42px;
            border-top: 1px solid #edf1f5;
            color: #17233d;
            font-size: 14px;
        }

        .reverse-proxy-bt-head > span,
        .reverse-proxy-bt-row > span {
            padding: 0 10px;
        }

        .reverse-proxy-bt-domain {
            color: #0b9a4f;
            font-weight: 400;
        }

        .reverse-proxy-bt-muted {
            color: #6a7483;
        }

        .reverse-proxy-bt-empty {
            display: grid;
            place-items: center;
            min-height: 128px;
            border-top: 1px solid #edf1f5;
            color: #8a95a5;
            font-size: 13px;
        }

        .reverse-proxy-bt-batch {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 8px 6px;
        }

        .reverse-proxy-bt-batch select {
            width: 168px;
            height: 34px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            background: #f8fafc;
            color: #a0a8b5;
            padding: 0 12px;
        }

        .reverse-proxy-bt-batch button {
            height: 34px;
            border: 0;
            border-radius: 8px;
            background: #9be1b4;
            color: #fff;
            padding: 0 16px;
            font-weight: 400;
        }

        .reverse-proxy-bt-tips {
            margin: 4px 0 0;
            padding-left: 22px;
            color: #4f5d70;
            font-size: 13px;
            line-height: 1.65;
            text-align: left;
            list-style-position: outside;
        }

        .reverse-proxy-bt-tips li {
            text-align: left;
        }

        .reverse-proxy-url-panel {
            min-height: 680px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .reverse-proxy-url-actions {
            display: flex;
            align-items: center;
            min-height: 40px;
        }

        .reverse-proxy-url-actions .reverse-proxy-bt-add {
            height: 36px;
            min-width: 106px;
            border-radius: 8px;
        }

        .reverse-proxy-url-editor {
            display: none;
        }

        .reverse-proxy-url-table {
            overflow: hidden;
            border: 0;
            background: #fff;
        }

        .reverse-proxy-url-head,
        .reverse-proxy-url-row {
            display: grid;
            grid-template-columns: minmax(150px, 210px) minmax(300px, 1fr) minmax(170px, 220px) 120px;
            align-items: center;
        }

        .reverse-proxy-url-head {
            min-height: 40px;
            background: #f6f7f9;
            color: #4d5d73;
            font-size: 13px;
        }

        .reverse-proxy-url-row {
            min-height: 46px;
            border-top: 1px solid #edf1f5;
            color: #17233d;
            font-size: 14px;
        }

        .reverse-proxy-url-head > span,
        .reverse-proxy-url-row > span {
            padding: 0 12px;
            word-break: break-all;
        }

        .reverse-proxy-url-head > span:last-child,
        .reverse-proxy-url-row > span:last-child {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
        }

        .reverse-proxy-url-row .link {
            min-width: auto;
            height: auto;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            color: #009944;
            font-weight: 400;
            line-height: 1.5;
            box-shadow: none;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }

        .reverse-proxy-url-row .link:hover {
            color: #047a39;
            text-decoration: underline;
        }

        .reverse-proxy-url-row .link.danger {
            color: #e02424;
        }

        .reverse-proxy-url-row .link.danger:hover {
            color: #c91616;
        }

        .reverse-proxy-url-panel .reverse-proxy-bt-tips {
            margin-top: auto;
            padding-bottom: 4px;
        }

        .reverse-proxy-url-dialog-mask {
            position: fixed;
            inset: 0;
            z-index: 70;
            display: grid;
            place-items: center;
            background: rgba(15, 23, 42, 0.42);
        }

        .reverse-proxy-url-settings-mask {
            position: fixed;
            inset: 0;
            z-index: 75;
            display: grid;
            place-items: center;
            background: rgba(15, 23, 42, 0.52);
        }

        .reverse-proxy-url-dialog {
            width: 660px;
            max-width: calc(100vw - 48px);
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
        }

        .reverse-proxy-url-settings-dialog {
            width: 840px;
            max-width: calc(100vw - 48px);
            min-height: 640px;
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 52px rgba(15, 23, 42, 0.24);
        }

        .reverse-proxy-url-dialog.dragging,
        .reverse-proxy-url-settings-dialog.dragging {
            user-select: none;
            box-shadow: 0 22px 60px rgba(15, 23, 42, 0.3);
        }

        .reverse-proxy-url-dialog-head,
        .reverse-proxy-url-settings-head {
            height: 54px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            border-bottom: 1px solid #edf1f5;
            color: #263449;
            font-size: 16px;
            cursor: move;
        }

        .reverse-proxy-url-settings-head {
            padding: 0 22px;
            color: #4b5565;
            font-size: 15px;
            font-weight: 400;
        }

        .reverse-proxy-url-settings-head em {
            font-style: normal;
        }

        .reverse-proxy-url-dialog-head button,
        .reverse-proxy-url-settings-head button {
            width: 32px;
            height: 32px;
            border: 0;
            background: transparent;
            color: #4f5d70;
            font-size: 30px;
            line-height: 1;
            cursor: pointer;
        }

        .reverse-proxy-url-settings-body {
            padding: 24px 20px 26px;
        }

        #reverseProxyContentReplaceEditor {
            z-index: 90;
        }

        .reverse-proxy-url-settings-tabs {
            display: flex;
            width: max-content;
            max-width: 100%;
            border: 1px solid #dfe7f0;
            border-radius: 8px 8px 0 0;
            overflow: hidden;
            background: #fff;
        }

        .reverse-proxy-url-settings-tabs button {
            min-width: 100px;
            height: 42px;
            padding: 0 16px;
            border: 0;
            border-right: 1px solid #dfe7f0;
            background: #fff;
            color: #303b4f;
            cursor: pointer;
        }

        .reverse-proxy-url-settings-tabs button:last-child {
            border-right: 0;
        }

        .reverse-proxy-url-settings-tabs button.active {
            color: #18a058;
            background: #fbfefd;
        }

        .reverse-proxy-url-settings-panel {
            display: none;
            min-height: 520px;
            position: relative;
        }

        .reverse-proxy-url-settings-panel.active {
            display: block;
        }

        .reverse-proxy-url-settings-form {
            display: grid;
            gap: 20px;
            padding: 36px 66px 0;
        }

        .reverse-proxy-url-settings-form label {
            display: grid;
            grid-template-columns: 150px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            color: #5b6472;
            font-size: 14px;
        }

        .reverse-proxy-url-settings-form label > span {
            text-align: right;
        }

        .reverse-proxy-url-settings-form label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-url-settings-form input,
        .reverse-proxy-url-settings-form select {
            height: 34px;
            min-width: 0;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            background: #fff;
            color: #14213d;
            outline: none;
            font-size: 14px;
        }

        .reverse-proxy-url-settings-form input:focus,
        .reverse-proxy-url-settings-form select:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-url-settings-form input[readonly] {
            color: #667085;
            background: #f8fafc;
        }

        .reverse-proxy-url-settings-target {
            grid-template-columns: 150px 176px minmax(0, 1fr) !important;
        }

        .reverse-proxy-url-setting-check input {
            width: 18px;
            height: 18px;
            padding: 0;
        }

        .reverse-proxy-url-setting-unit {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 58px;
        }

        .reverse-proxy-url-setting-unit input {
            border-radius: 8px 0 0 8px;
        }

        .reverse-proxy-url-setting-unit b {
            display: grid;
            place-items: center;
            border: 1px solid #d6e0eb;
            border-left: 0;
            border-radius: 0 8px 8px 0;
            background: #f8fafc;
            color: #697586;
            font-weight: 400;
        }

        .reverse-proxy-url-settings-save {
            padding-left: 162px;
        }

        .reverse-proxy-settings-placeholder {
            min-height: 360px;
            display: none;
            place-items: center;
            color: #98a2b3;
            font-size: 14px;
        }

        .reverse-proxy-settings-placeholder.active {
            display: grid;
        }

        .reverse-proxy-content-panel {
            min-height: 520px;
            padding: 20px 0 0;
            position: relative;
        }

        .reverse-proxy-content-panel .reverse-proxy-bt-add {
            height: 36px;
            min-width: 108px;
            margin-bottom: 15px;
        }

        .reverse-proxy-content-table {
            border-bottom: 1px solid #e7edf4;
        }

        .reverse-proxy-content-head,
        .reverse-proxy-content-row {
            display: grid;
            grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.5fr) 92px 92px;
            align-items: center;
            min-height: 38px;
            color: #4b5565;
            font-size: 14px;
        }

        .reverse-proxy-content-head {
            background: #f5f6f8;
        }

        .reverse-proxy-content-head span,
        .reverse-proxy-content-row span {
            padding: 0 8px;
        }

        .reverse-proxy-content-row {
            border-top: 1px solid #edf1f5;
            color: #14213d;
        }

        .reverse-proxy-content-empty {
            height: 65px;
            display: grid;
            place-items: center;
            border-top: 1px solid #edf1f5;
            color: #8a95a5;
            font-size: 14px;
        }

        .reverse-proxy-content-tips {
            position: absolute;
            left: 4px;
            bottom: 0;
            margin: 0;
            padding-left: 18px;
            color: #4f5d70;
            line-height: 1.7;
            font-size: 14px;
        }

        .reverse-proxy-content-dialog {
            width: 670px;
            max-width: calc(100vw - 48px);
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 52px rgba(15, 23, 42, 0.25);
        }

        .reverse-proxy-content-dialog.dragging {
            user-select: none;
            box-shadow: 0 22px 60px rgba(15, 23, 42, 0.3);
        }

        .reverse-proxy-content-dialog em {
            font-style: normal;
        }

        .reverse-proxy-content-dialog-body {
            display: grid;
            gap: 22px;
            padding: 26px 34px 34px;
        }

        .reverse-proxy-content-dialog-body label {
            display: grid;
            grid-template-columns: 118px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-content-dialog-body label > span {
            text-align: right;
        }

        .reverse-proxy-content-dialog-body label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-content-dialog-body input[type="text"] {
            height: 34px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            color: #14213d;
            outline: none;
            font-size: 14px;
        }

        .reverse-proxy-content-dialog-body input[type="text"]:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-content-options {
            display: grid;
            grid-template-columns: repeat(3, max-content);
            gap: 26px;
            padding-left: 130px;
        }

        .reverse-proxy-content-options label {
            display: flex;
            grid-template-columns: none;
            align-items: center;
            gap: 8px;
            color: #4f5d70;
            white-space: nowrap;
        }

        .reverse-proxy-content-options input {
            width: 18px;
            height: 18px;
        }

        .reverse-proxy-content-dialog-body p {
            margin: 2px 0 0 130px;
            color: #697586;
            font-size: 14px;
        }

        .reverse-proxy-option-form {
            display: grid;
            gap: 22px;
            max-width: 660px;
            padding: 42px 0 0 58px;
        }

        .reverse-proxy-option-form label {
            display: grid;
            grid-template-columns: 96px minmax(0, 1fr);
            align-items: center;
            gap: 14px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-option-form label > span {
            text-align: right;
        }

        .reverse-proxy-option-form label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-option-form input[type="text"],
        .reverse-proxy-option-form select,
        .reverse-proxy-option-form textarea {
            min-width: 0;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            background: #fff;
            color: #14213d;
            outline: none;
            font-size: 14px;
        }

        .reverse-proxy-option-form input[type="text"],
        .reverse-proxy-option-form select {
            height: 34px;
            padding: 0 12px;
        }

        .reverse-proxy-option-form textarea {
            min-height: 130px;
            padding: 10px 12px;
            resize: vertical;
            line-height: 1.5;
        }

        .reverse-proxy-inline-fields {
            display: grid;
            grid-template-columns: minmax(0, 176px) 90px;
            gap: 12px;
        }

        .reverse-proxy-switch {
            appearance: none;
            width: 44px !important;
            height: 22px !important;
            padding: 0 !important;
            border: 0 !important;
            border-radius: 999px !important;
            background: #d9dee7 !important;
            position: relative;
            cursor: pointer;
            transition: background .18s ease;
        }

        .reverse-proxy-switch::after {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            left: 2px;
            top: 2px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
            transition: transform .18s ease;
        }

        .reverse-proxy-switch:checked {
            background: #18a058 !important;
        }

        .reverse-proxy-switch:checked::after {
            transform: translateX(22px);
        }

        .reverse-proxy-settings-bottom-tips {
            position: absolute;
            left: 68px;
            right: 28px;
            bottom: 28px;
            margin: 0;
            padding-left: 18px;
            color: #4f5d70;
            font-size: 14px;
            line-height: 1.65;
        }

        .reverse-proxy-ip-panel {
            min-height: 520px;
            padding: 20px 0 0;
            position: relative;
        }

        .reverse-proxy-ip-panel .reverse-proxy-bt-add {
            height: 36px;
            min-width: 110px;
            margin-bottom: 14px;
        }

        .reverse-proxy-ip-table {
            border-bottom: 1px solid #e7edf4;
        }

        .reverse-proxy-ip-head,
        .reverse-proxy-ip-row {
            display: grid;
            grid-template-columns: 42px minmax(0, 1fr) 90px;
            min-height: 38px;
            align-items: center;
            color: #4b5565;
            font-size: 14px;
        }

        .reverse-proxy-ip-head {
            background: #f5f6f8;
        }

        .reverse-proxy-ip-head span,
        .reverse-proxy-ip-row span {
            padding: 0 8px;
        }

        .reverse-proxy-ip-row {
            border-top: 1px solid #edf1f5;
            color: #14213d;
        }

        .reverse-proxy-ip-empty {
            height: 65px;
            display: grid;
            place-items: center;
            border-top: 1px solid #edf1f5;
            color: #8a95a5;
            font-size: 14px;
        }

        .reverse-proxy-ip-batch {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 14px;
        }

        .reverse-proxy-ip-batch select {
            width: 166px;
            height: 34px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            color: #98a2b3;
            background: #fff;
        }

        .reverse-proxy-soft-btn {
            height: 34px;
            border: 0;
            border-radius: 8px;
            padding: 0 18px;
            background: #8ad8a8;
            color: #fff;
            cursor: pointer;
        }

        .reverse-proxy-ip-tips {
            margin: 24px 0 0;
            padding-left: 18px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-global-panel {
            position: relative;
            min-height: 690px;
        }

        .reverse-proxy-global-tabs {
            margin: 0 0 16px;
        }

        .reverse-proxy-global-settings-panel {
            display: none;
            position: relative;
            min-height: 560px;
        }

        .reverse-proxy-global-settings-panel.active {
            display: block;
        }

        .reverse-proxy-global-compress,
        .reverse-proxy-global-log,
        .reverse-proxy-global-websocket {
            padding-top: 42px;
            padding-left: 70px;
        }

        .reverse-proxy-auth-table {
            border-bottom: 1px solid #e7edf4;
        }

        .reverse-proxy-auth-head,
        .reverse-proxy-auth-row {
            display: grid;
            grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) 90px;
            min-height: 38px;
            align-items: center;
            color: #4b5565;
            font-size: 14px;
        }

        .reverse-proxy-auth-head {
            background: #f5f6f8;
        }

        .reverse-proxy-auth-head span,
        .reverse-proxy-auth-row span {
            padding: 0 8px;
        }

        .reverse-proxy-auth-row {
            border-top: 1px solid #edf1f5;
            color: #14213d;
        }

        .reverse-proxy-auth-dialog {
            width: 530px;
            max-width: calc(100vw - 48px);
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 52px rgba(15, 23, 42, 0.25);
        }

        .reverse-proxy-auth-dialog.dragging {
            user-select: none;
            box-shadow: 0 22px 60px rgba(15, 23, 42, 0.3);
        }

        .reverse-proxy-auth-dialog-body {
            display: grid;
            gap: 22px;
            padding: 26px 34px 26px;
        }

        .reverse-proxy-auth-dialog-body label {
            display: grid;
            grid-template-columns: 82px minmax(0, 1fr);
            align-items: center;
            gap: 14px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-auth-dialog-body label > span {
            text-align: right;
        }

        .reverse-proxy-auth-dialog-body label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-auth-dialog-body input {
            height: 34px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            outline: none;
            color: #14213d;
            font-size: 14px;
        }

        .reverse-proxy-auth-dialog-body input:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-auth-dialog-body ul {
            margin: 6px 0 0 132px;
            padding-left: 18px;
            color: #4f5d70;
            line-height: 1.65;
            font-size: 14px;
        }

        .reverse-proxy-ip-dialog {
            width: 440px;
            max-width: calc(100vw - 48px);
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 52px rgba(15, 23, 42, 0.25);
        }

        .reverse-proxy-ip-dialog em,
        .reverse-proxy-ip-dialog b {
            font-style: normal;
            font-weight: 400;
        }

        .reverse-proxy-ip-dialog-body {
            display: grid;
            gap: 28px;
            padding: 26px 34px 26px;
        }

        .reverse-proxy-ip-dialog-body label {
            display: grid;
            grid-template-columns: 82px minmax(0, 1fr);
            gap: 14px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-ip-dialog-body label > span {
            text-align: right;
            padding-top: 8px;
        }

        .reverse-proxy-ip-dialog-body textarea {
            height: 90px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 10px 12px;
            resize: none;
            outline: none;
            color: #14213d;
            font-size: 14px;
        }

        .reverse-proxy-ip-dialog-body textarea:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-ip-dialog-body ul {
            margin: 0 0 0 136px;
            padding-left: 18px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-hotlink-form textarea {
            min-height: 170px;
        }

        .reverse-proxy-hotlink-checks {
            display: flex;
            align-items: center;
            gap: 28px;
            padding-left: 110px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-hotlink-checks label {
            display: flex;
            grid-template-columns: none;
            gap: 8px;
        }

        .reverse-proxy-url-dialog-body {
            display: grid;
            gap: 14px;
            padding: 26px 32px 22px;
        }

        .reverse-proxy-url-dialog-body label {
            display: grid;
            grid-template-columns: 116px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-url-dialog-body label > span {
            text-align: right;
        }

        .reverse-proxy-url-dialog-body label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-url-dialog-body input,
        .reverse-proxy-url-dialog-body select {
            height: 34px;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            color: #14213d;
            outline: none;
            background: #fff;
            font-size: 14px;
        }

        .reverse-proxy-url-dialog-body input:focus,
        .reverse-proxy-url-dialog-body select:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-url-target-line {
            grid-template-columns: 116px 176px minmax(0, 1fr) !important;
        }

        .reverse-proxy-url-dialog-tips {
            margin: 8px 0 0;
            padding-left: 22px;
            color: #555f6f;
            font-size: 13px;
            line-height: 1.7;
        }

        .reverse-proxy-url-dialog-foot {
            display: flex;
            justify-content: flex-end;
            gap: 14px;
            padding: 14px 22px;
            background: #fafafa;
            border-top: 1px solid #edf1f5;
        }

        .reverse-proxy-domain-tools {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 132px;
            gap: 10px;
            align-items: stretch;
            padding: 10px;
            border: 1px solid #dbe7f3;
            border-radius: 12px;
            background: linear-gradient(135deg, #fbfdff 0%, #f6fbf9 100%);
        }

        .reverse-proxy-domain-help {
            min-height: 70px;
            padding: 11px 14px;
            border: 1px solid #dce7f3;
            border-radius: 10px;
            background: #fff;
        }

        .reverse-proxy-domain-help strong {
            display: block;
            color: #14213d;
            font-size: 15px;
        }

        .reverse-proxy-domain-help span,
        .reverse-proxy-domain-help em {
            display: block;
            margin-top: 5px;
            color: #68778c;
            font-style: normal;
            font-size:13px;
            line-height: 1.5;
        }

        .reverse-proxy-domain-state {
            display: grid;
            align-content: center;
            justify-items: center;
            border: 1px solid #cfe8dc;
            border-radius: 10px;
            background: #f4fbf7;
            color: #0f7f50;
        }

        .reverse-proxy-domain-state span {
            color: #5f766b;
            font-size:13px;
        }

        .reverse-proxy-domain-state b {
            margin-top: 6px;
            font-size: 18px;
            font-weight: 700;
        }

        .reverse-proxy-domain-table {
            overflow: hidden;
            border: 1px solid #dbe7f3;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 8px 22px rgba(20, 33, 61, 0.05);
        }

        .reverse-proxy-domain-head,
        .reverse-proxy-domain-row {
            display: grid;
            grid-template-columns: minmax(280px, 1fr) 130px 120px;
            align-items: center;
        }

        .reverse-proxy-domain-head {
            min-height: 38px;
            padding: 0 16px;
            background: #f4f7fa;
            color: #4d5d73;
            font-size: 13px;
            font-weight: 600;
        }

        .reverse-proxy-domain-row {
            min-height: 42px;
            padding: 0 16px;
            border-top: 1px solid #edf2f7;
            color: #17233d;
            font-size: 14px;
        }

        .reverse-proxy-domain-row:hover {
            background: #fbfdff;
        }

        .reverse-proxy-domain-name {
            color: #00924f;
            font-weight: 600;
        }

        .reverse-proxy-domain-badge {
            display: inline-flex;
            align-items: center;
            height: 24px;
            padding: 0 10px;
            border-radius: 999px;
            background: #e8f8ef;
            color: #0b8a4b;
            font-style: normal;
            font-size:13px;
        }

        .reverse-proxy-domain-note {
            padding: 11px 14px;
            border: 1px dashed #b9dfca;
            border-radius: 10px;
            background: #f8fcfa;
            color: #5f6d80;
            font-size:13px;
            line-height: 1.6;
            text-align: center;
        }

        .reverse-proxy-info-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .reverse-proxy-info-grid div {
            padding: 14px;
            border: 1px solid #dce7f3;
            border-radius: 8px;
            background: #f8fbfd;
        }

        .reverse-proxy-info-grid span {
            display: block;
            margin-bottom: 8px;
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-info-grid b {
            color: #14213d;
            font-weight: 500;
            word-break: break-all;
        }

        .reverse-proxy-file-path {
            margin-bottom: 10px;
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-file-panel,
        .reverse-proxy-ssl-panel,
        .reverse-proxy-redirect-panel,
        .reverse-proxy-log-panel {
            position: relative;
            min-height: 690px;
        }

        .reverse-proxy-file-toolbar {
            margin: 0 0 12px;
            color: #5d697a;
            font-size: 14px;
        }

        .reverse-proxy-code-editor {
            height: 598px;
            overflow: auto;
            border: 1px solid #d9e3ee;
            border-radius: 8px;
            background: #fff;
            box-shadow: inset 0 0 0 1px rgba(20, 33, 61, 0.02);
            font-family: Consolas, "Courier New", monospace;
            font-size:13px;
            line-height: 1.45;
        }

        .reverse-proxy-code-line {
            display: grid;
            grid-template-columns: 50px minmax(0, 1fr);
            min-height: 18px;
        }

        .reverse-proxy-code-line span {
            padding: 0 8px;
            background: #f0f2f5;
            color: #334155;
            text-align: right;
            user-select: none;
            border-right: 1px solid #d9e3ee;
        }

        .reverse-proxy-code-line code {
            padding: 0 10px;
            color: #006b21;
            white-space: pre;
        }

        .reverse-proxy-code-line:nth-child(odd) code {
            background: #fff;
        }

        .reverse-proxy-file-actions {
            display: flex;
            gap: 10px;
            margin-top: 12px;
        }

        .reverse-proxy-file-tips {
            margin: 22px 0 0;
            padding-left: 18px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-ssl-alert {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            align-items: center;
            gap: 16px;
            margin-bottom: 16px;
            padding: 12px 18px;
            border-radius: 8px;
            background: #fde8e8;
            color: #d92d20;
            font-size: 14px;
        }

        .reverse-proxy-ssl-alert.ok {
            background: #ecfdf3;
            color: #087443;
        }

        .reverse-proxy-ssl-alert em {
            color: #18a058;
            font-style: normal;
        }

        .reverse-proxy-ssl-tabs,
        .reverse-proxy-log-tabs {
            margin-bottom: 14px;
        }

        .reverse-proxy-ssl-tools,
        .reverse-proxy-redirect-tools {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }

        .reverse-proxy-ssl-table,
        .reverse-proxy-redirect-table {
            border-bottom: 1px solid #e7edf4;
        }

        .reverse-proxy-ssl-head,
        .reverse-proxy-ssl-row {
            display: grid;
            grid-template-columns: minmax(0, 1.5fr) 120px 110px 120px 170px;
            min-height: 38px;
            align-items: center;
            color: #4b5565;
            font-size: 14px;
        }

        .reverse-proxy-ssl-head,
        .reverse-proxy-redirect-head {
            background: #f5f6f8;
        }

        .reverse-proxy-ssl-head span,
        .reverse-proxy-ssl-row span,
        .reverse-proxy-redirect-head span,
        .reverse-proxy-redirect-row span {
            padding: 0 8px;
        }

        .reverse-proxy-ssl-row,
        .reverse-proxy-redirect-row {
            border-top: 1px solid #edf1f5;
            color: #14213d;
        }

        .reverse-proxy-ssl-row .success,
        .reverse-proxy-ssl-tips .success {
            color: #18a058;
        }

        .reverse-proxy-ssl-row .danger,
        .reverse-proxy-ssl-tips .danger {
            color: #f04438;
        }

        .reverse-proxy-ssl-actions {
            display: inline-flex;
            align-items: center;
            gap: 0;
            white-space: nowrap;
        }

        .reverse-proxy-ssl-actions .link {
            appearance: none;
            border: 0;
            background: transparent;
            position: relative;
            padding: 2px 7px;
            border-radius: 4px;
            color: #008a3d;
            font: inherit;
            line-height: 1.4;
            cursor: pointer;
        }

        .reverse-proxy-ssl-actions .link + .link::before {
            content: "";
            position: absolute;
            left: 0;
            top: 5px;
            bottom: 5px;
            width: 1px;
            background: #d8e1ea;
        }

        .reverse-proxy-ssl-actions .link:hover {
            background: #eefaf2;
            color: #006b32;
            text-decoration: none;
        }

        .reverse-proxy-ssl-actions .link.danger {
            color: #f04438;
        }

        .reverse-proxy-ssl-actions .link.danger:hover {
            background: #fff1f1;
            color: #d92d20;
        }

        .reverse-proxy-ssl-empty,
        .reverse-proxy-redirect-empty {
            height: 270px;
            display: grid;
            place-items: center;
            border-top: 1px solid #edf1f5;
            color: #8a95a5;
            font-size: 14px;
        }

        .reverse-proxy-ssl-tips {
            margin: 22px 0 0;
            padding-left: 18px;
            color: #4f5d70;
            line-height: 1.6;
            font-size: 14px;
        }

        .reverse-proxy-redirect-tools {
            margin-bottom: 16px;
        }

        .reverse-proxy-redirect-head,
        .reverse-proxy-redirect-row {
            display: grid;
            grid-template-columns: 42px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .9fr) 90px;
            min-height: 38px;
            align-items: center;
            color: #4b5565;
            font-size: 14px;
        }

        .reverse-proxy-redirect-empty {
            height: 200px;
        }

        .reverse-proxy-redirect-dialog {
            width: 752px;
            max-width: calc(100vw - 48px);
            overflow: hidden;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 18px 52px rgba(15, 23, 42, 0.25);
        }

        .reverse-proxy-redirect-dialog-body {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 22px 34px;
            padding: 26px 42px 28px;
        }

        .reverse-proxy-redirect-switches {
            grid-column: 1 / -1;
            display: flex;
            gap: 54px;
        }

        .reverse-proxy-redirect-switches label {
            display: flex;
            align-items: center;
            gap: 18px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-redirect-dialog-body label {
            display: grid;
            grid-template-columns: 96px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            color: #4f5d70;
            font-size: 14px;
        }

        .reverse-proxy-redirect-dialog-body label > span {
            text-align: right;
        }

        .reverse-proxy-redirect-dialog-body label.required > span::before {
            content: "*";
            margin-right: 6px;
            color: #f04438;
        }

        .reverse-proxy-redirect-dialog-body input,
        .reverse-proxy-redirect-dialog-body select {
            height: 34px;
            min-width: 0;
            border: 1px solid #d6e0eb;
            border-radius: 8px;
            padding: 0 12px;
            outline: none;
            color: #14213d;
            background: #fff;
            font-size: 14px;
        }

        .reverse-proxy-redirect-dialog-body input:focus,
        .reverse-proxy-redirect-dialog-body select:focus {
            border-color: #18a058;
            box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.08);
        }

        .reverse-proxy-redirect-dialog-body em {
            margin-top: 4px;
            color: #f04438;
            font-style: normal;
            font-size:13px;
        }

        .reverse-proxy-redirect-dialog-body ul {
            grid-column: 1 / -1;
            margin: 0;
            padding-left: 18px;
            color: #4f5d70;
            line-height: 1.6;
            font-size: 14px;
        }

        .reverse-proxy-log-size {
            margin: 0 0 10px;
            color: #5d697a;
            font-size: 14px;
        }

        .reverse-proxy-log-box {
            display: none;
            position: relative;
        }

        .reverse-proxy-log-box.active {
            display: block;
        }

        .reverse-proxy-log-box button {
            position: absolute;
            right: 16px;
            top: 12px;
            z-index: 1;
            height: 36px;
            border: 0;
            border-radius: 8px;
            padding: 0 16px;
            background: #18a058;
            color: #fff;
            cursor: pointer;
        }

        .reverse-proxy-log-box pre {
            height: 620px;
            margin: 0;
            padding: 14px;
            overflow: auto;
            border-radius: 8px;
            background: #111;
            color: #f5f7fa;
            font:13px/1.55 Consolas, "Courier New", monospace;
            white-space: pre;
        }

        .reverse-proxy-code,
        .reverse-proxy-log {
            max-height: 470px;
            margin: 0;
            padding: 14px;
            overflow: auto;
            border-radius: 8px;
            background: #0f1722;
            color: #e5edf8;
            font:13px/1.7 Consolas, "Courier New", monospace;
            white-space: pre;
        }

        .reverse-proxy-log {
            max-height: 220px;
            margin-bottom: 16px;
        }

        .reverse-proxy-add-form {
            display: grid;
            gap: 14px;
            padding: 18px 22px 20px;
            border: 1px solid #dbe7f3;
            border-top: 0;
            border-radius: 0 0 12px 12px;
            background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        }

        .reverse-proxy-add-form textarea {
            min-height: 132px;
            resize: vertical;
        }

        .reverse-proxy-add-card {
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 8px 28px rgba(20, 33, 61, 0.08);
        }

        .reverse-proxy-add-intro {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 20px 22px;
            border: 1px solid #dbe7f3;
            border-bottom: 0;
            border-radius: 12px 12px 0 0;
            background: linear-gradient(135deg, #f5fcf9 0%, #f9fcff 100%);
        }

        .reverse-proxy-add-intro strong {
            display: block;
            color: #14213d;
            font-size: 17px;
        }

        .reverse-proxy-add-intro span {
            display: block;
            margin-top: 4px;
            color: #68778c;
            font-size: 13px;
        }

        .reverse-proxy-form-section {
            padding: 16px 18px 17px;
            border: 1px solid #dbe7f3;
            border-radius: 10px;
            background: #fff;
            box-shadow: inset 3px 0 0 #159365;
        }

        .reverse-proxy-field-grid {
            display: grid;
            grid-template-columns: minmax(300px, 0.78fr) minmax(440px, 1.22fr);
            gap: 14px 24px;
            align-items: start;
        }

        .reverse-proxy-field-grid.two {
            grid-template-columns: minmax(390px, 1fr) minmax(300px, 0.78fr);
            align-items: stretch;
        }

        .reverse-proxy-inline-field {
            display: grid;
            grid-template-columns: 108px minmax(0, 1fr);
            gap: 12px;
            align-items: center;
            min-width: 0;
        }

        .reverse-proxy-inline-field label {
            color: #2f3b4f;
            font-size: 14px;
            text-align: right;
        }

        .reverse-proxy-inline-field.required label::before {
            content: "*";
            margin-right: 4px;
            color: #e54d42;
        }

        .reverse-proxy-inline-field input,
        .reverse-proxy-inline-field select,
        .reverse-proxy-inline-field textarea {
            width: 100%;
            min-width: 0;
            border: 1px solid #cfdbea;
            border-radius: 7px;
            background: #fff;
            color: #17233d;
            font-size: 14px;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
        }

        .reverse-proxy-inline-field input,
        .reverse-proxy-inline-field select {
            height: 38px;
            padding: 0 12px;
        }

        .reverse-proxy-inline-field textarea {
            padding: 10px 12px;
            line-height: 1.45;
        }

        .reverse-proxy-inline-field input:focus,
        .reverse-proxy-inline-field select:focus,
        .reverse-proxy-inline-field textarea:focus {
            border-color: #9ac7ee;
            box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.08);
            outline: none;
        }

        .reverse-proxy-domain-field {
            grid-template-columns: 86px minmax(0, 1fr);
            margin-right: 0;
            min-width: 0;
        }

        .reverse-proxy-target-stack {
            display: grid;
            gap: 14px;
            padding: 18px;
            border: 1px solid #e4edf6;
            border-radius: 10px;
            background: #f8fbfd;
        }

        .reverse-proxy-add-help {
            display: grid;
            gap: 5px;
            padding: 14px 16px 14px 18px;
            border: 1px dashed #b9dfca;
            border-radius: 10px;
            background: #f7fcfa;
            color: #5f6d80;
            font-size:13px;
            line-height: 1.6;
            box-shadow: inset 3px 0 0 #1a9b68;
        }

        .reverse-proxy-add-help b {
            color: #008a4b;
            font-weight: 600;
        }

        .reverse-proxy-readonly-field {
            min-height: 72px;
            align-self: stretch;
        }

        .reverse-proxy-process-card {
            padding: 20px;
            border: 1px solid #dbe7f3;
            border-radius: 10px;
            background: #fff;
        }

        .reverse-proxy-process-head {
            display: flex;
            gap: 14px;
            align-items: center;
            padding-bottom: 16px;
            border-bottom: 1px solid #edf2f7;
        }

        .reverse-proxy-process-spinner {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 3px solid #dcebf9;
            border-top-color: #0a9651;
            color: #0a9651;
            font-weight: 700;
            animation: reverseProxySpin 0.9s linear infinite;
        }

        .reverse-proxy-process-card.success .reverse-proxy-process-spinner,
        .reverse-proxy-process-card.error .reverse-proxy-process-spinner {
            border-color: currentColor;
            animation: none;
        }

        .reverse-proxy-process-card.error .reverse-proxy-process-spinner {
            color: #e54d42;
        }

        .reverse-proxy-process-head strong {
            display: block;
            color: #14213d;
            font-size: 17px;
        }

        .reverse-proxy-process-head span {
            display: block;
            margin-top: 5px;
            color: #68778c;
            font-size:13px;
        }

        .reverse-proxy-process-steps {
            display: grid;
            gap: 10px;
            padding-top: 16px;
        }

        .reverse-proxy-process-step {
            display: grid;
            grid-template-columns: 30px 1fr;
            gap: 10px;
            align-items: center;
            padding: 10px 12px;
            border: 1px solid #e2ebf5;
            border-radius: 8px;
            background: #f8fbfd;
        }

        .reverse-proxy-process-step > span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: #edf4ff;
            color: #2f80ed;
            font-weight: 600;
            font-size:13px;
        }

        .reverse-proxy-process-step b {
            display: block;
            color: #14213d;
            font-weight: 600;
        }

        .reverse-proxy-process-step em {
            display: block;
            margin-top: 3px;
            color: #68778c;
            font-style: normal;
            font-size:13px;
        }

        .reverse-proxy-process-step.running {
            border-color: #9fd0ff;
            background: #f3f9ff;
        }

        .reverse-proxy-process-step.done > span {
            background: #e8f8ef;
            color: #0a9651;
        }

        .reverse-proxy-process-step.error {
            border-color: #ffd0c9;
            background: #fff7f5;
        }

        .reverse-proxy-process-step.error > span {
            background: #ffece8;
            color: #e54d42;
        }

        @keyframes reverseProxySpin {
            to { transform: rotate(360deg); }
        }

        .modal.forward-rule-modal {
            width: 486px;
            max-width: calc(100vw - 24px);
            border-radius: 8px;
            overflow: hidden;
        }

        .modal.forward-rule-modal .modal-head {
            height: 48px;
            padding: 0 22px;
            border-bottom: 0;
            background: #fff;
        }

        .modal.forward-rule-modal .modal-head h3 {
            font-size: 16px;
            font-weight: 500;
            color: #303133;
        }

        .modal.forward-rule-modal .modal-body {
            padding: 22px 30px 28px;
        }

        .modal.forward-rule-modal .modal-footer {
            height: 56px;
            padding: 0 18px;
            align-items: center;
            background: #f5f7f9;
            border-top: 0;
        }

        .modal.forward-rule-modal .secondary-btn,
        .modal.forward-rule-modal .primary-btn {
            min-width: 52px;
            height: 34px;
            padding: 0 14px;
            border-radius: 4px;
        }

        .modal.forward-server-modal {
            width: 560px;
            max-width: calc(100vw - 28px);
            border-radius: 10px;
            overflow: hidden;
        }

        .modal.forward-server-modal .modal-head {
            height: 54px;
            padding: 0 24px;
            background: #fff;
            border-bottom: 1px solid #edf2f7;
        }

        .modal.forward-server-modal .modal-head h3 {
            font-size: 18px;
            font-weight: 600;
            color: #0f172a;
        }

        .modal.forward-server-modal .modal-body {
            padding: 22px 30px 24px;
        }

        .modal.forward-server-modal .modal-footer {
            height: 62px;
            padding: 0 24px;
            background: #f7f9fb;
        }

        .forward-server-form-grid {
            display: grid;
            grid-template-columns: 118px 300px;
            align-items: center;
            column-gap: 18px;
            row-gap: 16px;
        }

        .forward-server-form-grid .form-field {
            display: contents;
        }

        .forward-server-form-grid .form-field label {
            margin: 0;
            text-align: right;
            color: #4b5563;
            font-size: 14px;
        }

        .forward-server-form-grid .form-field input,
        .forward-server-form-grid .form-field select {
            width: 300px;
            height: 36px;
            border-radius: 5px;
            border: 1px solid #d8e2ee;
            background-color: #fff;
        }

        .forward-server-form-grid .password-input-wrap {
            width: 300px;
            max-width: 300px;
        }

        .forward-server-form-grid .form-field input:focus,
        .forward-server-form-grid .form-field select:focus {
            border-color: #16a563;
            box-shadow: 0 0 0 2px rgba(22, 165, 99, 0.12);
        }

        .forward-rule-form {
            display: grid;
            gap: 22px;
        }

        .forward-rule-field {
            display: grid;
            grid-template-columns: 92px 264px;
            align-items: center;
            column-gap: 18px;
        }

        .forward-rule-field label {
            text-align: right;
            color: #606266;
            font-size: 14px;
            line-height: 34px;
        }

        .forward-rule-field.required label::before {
            content: "*";
            color: #f56c6c;
            margin-right: 4px;
        }

        .forward-rule-field input,
        .forward-rule-field select {
            width: 264px;
            height: 34px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            background: #fff;
            color: #303133;
            font-size: 14px;
            outline: none;
            padding: 0 12px;
        }

        .forward-rule-field input:disabled {
            color: #909399;
            cursor: not-allowed;
            background: #f5f7fa;
        }

        .forward-rule-field select {
            appearance: none;
            background-image: linear-gradient(45deg, transparent 50%, #b8c0cc 50%), linear-gradient(135deg, #b8c0cc 50%, transparent 50%);
            background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            padding-right: 34px;
        }

        .forward-rule-field input:focus,
        .forward-rule-field select:focus {
            border-color: #16a563;
            box-shadow: 0 0 0 2px rgba(22, 165, 99, 0.12);
        }

        .forward-rule-field input::placeholder {
            color: #c0c4cc;
        }

        .nav-group {
            margin-bottom: 4px;
        }

        .nav-group-toggle {
            position: relative;
        }

        .nav-group-arrow {
            margin-left: auto;
            width: 8px;
            height: 8px;
            border-right: 2px solid #64748b;
            border-bottom: 2px solid #64748b;
            font-style: normal;
            transform: rotate(45deg);
            transition: transform .22s ease, border-color .18s ease;
        }

        .nav-group.open .nav-group-arrow {
            transform: rotate(225deg);
            border-color: #0a9651;
        }

        .nav-submenu {
            display: grid;
            gap: 2px;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transform: translateY(-4px);
            padding: 0 0 0 28px;
            transition: max-height .24s ease, opacity .18s ease, transform .22s ease, padding .22s ease;
        }

        .nav-group.open .nav-submenu {
            max-height: 260px;
            opacity: 1;
            transform: translateY(0);
            padding: 2px 0 6px 28px;
        }

        .nav-subitem {
            width: 100%;
            height: 34px;
            padding: 0 10px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: #5b6b82;
            text-align: left;
            cursor: pointer;
            font-size: 13px;
        }

        .nav-subitem:hover,
        .nav-subitem.active {
            color: #0a9651;
            background: #eefaf4;
        }

        .status-workbench {
            background: #fff;
            min-height: calc(100vh - 150px);
            padding: clamp(14px, 1.2vw, 20px) clamp(14px, 1.2vw, 20px) 42px;
        }

        .status-toolbar-modern {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 22px;
            flex-wrap: wrap;
        }

        .status-toolbar-right {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .status-filter-select {
            width: 136px;
        }

        .status-count-text {
            color: #5b6b82;
            font-size: 14px;
        }

        .status-filter-btn {
            height: 38px;
            padding: 0 18px;
            border: 1px solid #d8e2ee;
            border-radius: 4px;
            background: #fff;
            color: #17233d;
            cursor: pointer;
        }

        .status-filter-btn.active {
            color: #0a9651;
            border-color: #10a35a;
            font-weight: 600;
        }

        .status-group-title {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 18px;
            color: #17233d;
        }

        .status-group-title h3 {
            margin: 0;
            font-size: 22px;
            font-weight: 700;
        }

        .status-group-title .group-icon {
            font-size: 18px;
        }

        .status-board {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: clamp(14px, 1.2vw, 20px);
            align-items: start;
        }

        .status-card {
            position: relative;
            min-height: 186px;
            padding: 18px 18px 16px;
            border: 1px solid #e6edf5;
            border-radius: 8px;
            background: #fff;
            box-shadow: 0 12px 28px rgba(15, 35, 55, 0.08);
            overflow: visible;
        }

        .status-card.offline {
            color: #9aa6b5;
        }

        .status-card.offline .status-card-content {
            opacity: .38;
        }

        .status-card.unmonitored {
            color: #8a6a22;
        }

        .status-card.unmonitored .status-card-content {
            opacity: .58;
        }

        .status-card-offline-mask {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            padding: 14px 30px;
            background: rgba(255,255,255,.92);
            color: #ef4565;
            font-weight: 700;
            box-shadow: 0 12px 26px rgba(20, 30, 45, 0.12);
            z-index: 2;
        }

        .status-card-offline-mask.warning {
            background: rgba(255, 247, 230, 0.96);
            color: #bb7a14;
        }

        .status-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 18px;
        }

        .status-card-name {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 18px;
            font-weight: 700;
            color: #17233d;
            white-space: nowrap;
        }

        .status-dot-modern {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #10a35a;
            flex: 0 0 8px;
        }

        .status-card.offline .status-dot-modern {
            background: #ef7892;
        }

        .status-card.unmonitored .status-dot-modern {
            background: #f0a63a;
        }

        .status-card-body {
            display: grid;
            grid-template-columns: calc(33.333% + 5px) calc(33.333% + 33px) calc(33.333% - 38px);
            gap: 0;
            align-items: center;
        }

        .status-card-info,
        .status-card-metrics {
            border-right: 1px solid #edf2f7;
            min-height: 114px;
            min-width: 0;
            margin-right: 12px;
            padding-right: 12px;
        }

        .status-card-metrics {
            display: grid;
            align-content: center;
        }

        .status-info-row {
            display: grid;
            grid-template-columns: 24px 1fr;
            gap: 8px;
            align-items: center;
            margin-bottom: 12px;
        }

        .status-info-row i {
            color: #4c596d;
            font-style: normal;
            font-size: 18px;
            text-align: center;
        }

        .status-info-row small {
            display: block;
            color: #8b98aa;
            font-size: 12px;
            line-height: 1.1;
            white-space: nowrap;
        }

        .status-info-row b {
            display: block;
            color: #17233d;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.25;
            white-space: nowrap;
        }

        .status-metric-row {
            display: grid;
            grid-template-columns: 38px 55px 42px;
            align-items: center;
            gap: 6px;
            margin-bottom: 18px;
            color: #17233d;
            white-space: nowrap;
        }

        .status-mini-track {
            height: 8px;
            border-radius: 99px;
            background: #e9e9e9;
            overflow: hidden;
            width: 55px;
        }

        .status-mini-track span {
            display: block;
            height: 100%;
            border-radius: inherit;
            background: #3d9b35;
        }

        .status-net {
            display: grid;
            grid-template-rows: repeat(2, 18px);
            align-items: center;
            grid-column: 2 / 4;
            row-gap: 2px;
            min-width: 0;
            line-height: 1.2;
        }

        .status-net span {
            display: block;
            white-space: nowrap;
        }

        .status-load > span {
            white-space: nowrap;
        }

        .status-up {
            color: #34b233;
        }

        .status-down {
            color: #2f88ff;
        }

        .status-load {
            display: grid;
            justify-items: center;
            gap: 8px;
            min-width: 0;
            color: #17233d;
        }

        .status-load-ring {
            width: 78px;
            height: 78px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            background: conic-gradient(#3d9b35 calc(var(--load) * 1%), #eeeeee 0);
        }

        .status-load-ring::before {
            content: attr(data-value);
            width: 62px;
            height: 62px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            background: #fff;
            color: #17233d;
            font-weight: 700;
        }

        .status-pagination {
            margin-top: 18px;
        }

        @media (max-width: 1500px) {
            .status-board {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 980px) {
            .status-board {
                grid-template-columns: 1fr;
            }

            .status-toolbar-right {
                width: 100%;
            }

            .status-toolbar-right .search-input {
                flex: 1 1 220px;
            }
        }

        @media (max-width: 560px) {
            .status-card {
                padding: 16px 14px;
            }

            .status-card-body {
                grid-template-columns: 1fr;
                row-gap: 14px;
            }

            .status-card-info,
            .status-card-metrics {
                border-right: 0;
                border-bottom: 1px solid #edf2f7;
                margin-right: 0;
                padding-right: 0;
                padding-bottom: 12px;
            }

            .status-load {
                justify-items: start;
                grid-template-columns: auto 78px;
                align-items: center;
            }
        }

        @media (max-width: 1280px) {
            .forwarding-layout {
                grid-template-columns: 240px minmax(620px, 1fr);
            }

            .forward-server-detail {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 920px) {
            .modal.reverse-proxy-add-modal {
                width: calc(100vw - 24px);
            }

            .reverse-proxy-config-layout {
                grid-template-columns: 1fr;
            }

            .reverse-proxy-config-tabs {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                border-right: 0;
                border-bottom: 1px solid #e6edf5;
            }

            .reverse-proxy-config-side-head {
                grid-column: 1 / -1;
            }

            .reverse-proxy-config-overview,
            .reverse-proxy-domain-tools {
                grid-template-columns: 1fr;
            }

            .reverse-proxy-domain-head,
            .reverse-proxy-domain-row {
                grid-template-columns: minmax(180px, 1fr) 86px 92px;
            }

            .reverse-proxy-field-grid,
            .reverse-proxy-field-grid.two {
                grid-template-columns: 1fr;
            }

            .reverse-proxy-inline-field,
            .reverse-proxy-domain-field {
                grid-template-columns: 1fr;
                gap: 7px;
            }

            .reverse-proxy-inline-field label {
                text-align: left;
            }

            .reverse-proxy-target-stack {
                padding: 14px;
            }
        }
    
.external-account-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; padding:20px 24px; border:1px solid #dbe5f1; border-radius:14px; background:linear-gradient(135deg,#f8fbff,#eef5ff); }
.external-account-intro h3 { margin:0 0 7px; color:#203a57; }
.external-account-intro p { margin:0; color:#667b91; }
.external-account-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.external-account-card { min-height:235px; padding:20px; border:1px solid #dfe7f1; border-top:4px solid #9aaabc; border-radius:13px; background:#fff; box-shadow:0 8px 25px rgba(34,56,82,.06); }
.external-account-card.status-active { border-top-color:#23b383; }
.external-account-card.status-not_found { border-top-color:#f59e42; }
.external-account-card.status-credential_required { border-top-color:#ef6b5b; }
.external-account-card.status-planned { border-top-color:#7597c8; }
.external-account-card > header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.external-account-card > header span { color:#34506d; font-weight:700; }
.external-account-card > header b,.external-status { padding:4px 9px; border-radius:12px; background:#edf2f7; color:#60758b; font-size:13px; }
.external-account-card > strong { display:block; margin-bottom:15px; color:#176bd1; font-size:18px; word-break:break-all; }
.external-account-card dl { margin:0 0 12px; }
.external-account-card dl div { display:flex; justify-content:space-between; padding:5px 0; border-bottom:1px dashed #e7ecf2; }
.external-account-card dt { color:#7a8b9e; }
.external-account-card dd { margin:0; color:#334b64; }
.external-account-card p { min-height:38px; color:#738499; font-size:13px; line-height:1.6; }
.external-bind { display:flex; gap:8px; }
.external-bind input { min-width:0; flex:1; padding:8px 10px; border:1px solid #d5dfeb; border-radius:6px; }
.external-account-table-panel td small { display:block; color:#8594a5; }
.external-status.status-active { background:#e6f7f0; color:#14845f; }
.external-status.status-not_found,.external-status.status-credential_required { background:#fff0ea; color:#c85b3f; }
.external-status.status-planned { background:#edf3fb; color:#54749f; }
@media (max-width:1000px) { .external-account-cards { grid-template-columns:1fr; } }
/* Authorization center placeholder */
.authorization-center-panel {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
    padding: 48px 24px;
}

.authorization-coming-soon {
    width: min(620px, 100%);
    text-align: center;
    padding: 56px 40px;
    border: 1px solid #dce8e3;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f3faf7 100%);
    box-shadow: 0 14px 36px rgba(19, 78, 60, 0.08);
}

.authorization-coming-soon__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 22px;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    background: linear-gradient(135deg, #0f8b6d, #24b58d);
    box-shadow: 0 10px 24px rgba(15, 139, 109, 0.24);
}

.authorization-coming-soon h3 {
    margin: 0 0 14px;
    color: #163b32;
    font-size: 26px;
}

.authorization-coming-soon p {
    max-width: 480px;
    margin: 0 auto;
    color: #667b75;
    font-size: 15px;
    line-height: 1.8;
}

.authorization-coming-soon__status {
    display: inline-flex;
    margin-top: 24px;
    padding: 7px 18px;
    border-radius: 999px;
    color: #08765b;
    background: #ddf5ed;
    font-size: 13px;
    font-weight: 600;
}

.position-modal { width: min(620px, 100%); }
.position-form label em { color: #dc2626; font-style: normal; }
.position-category {
    display: inline-flex;
    align-items: center;
    min-width: 58px;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size:13px;
    font-weight: 600;
}
.position-category-management { color: #7c3aed; background: #f3e8ff; }
.position-category-technical { color: #2563eb; background: #dbeafe; }
.position-category-operations { color: #047857; background: #d1fae5; }
.position-category-sales { color: #c2410c; background: #ffedd5; }
.position-category-finance { color: #a16207; background: #fef3c7; }
.position-remark { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; }
#positionsTable code { color: #0f766e; background: #ecfdf5; padding: 3px 7px; border-radius: 4px; }
