:root {
    --bg: #f7f8fc;
    --panel: #ffffff;
    --sidebar: #151a21;
    --sidebar-soft: #1b222b;
    --text: #242736;
    --muted: #8b8fa3;
    --line: #edf0f6;
    --primary: #5b6cff;
    --primary-2: #18c8ff;
    --success: #22c979;
    --danger: #ff5b6b;
    --warning: #ffb020;
    --info: #18c8ff;
    --shadow: 0 14px 36px rgba(32, 38, 60, 0.10);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.login-box {
    width: 380px;
    padding: 40px 32px;
    background: rgba(15, 25, 35, 0.86);
    color: #e6edf3;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 900;
    color: #e6edf3;
    background: linear-gradient(90deg, #4ea1ff, #7e5bef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo p {
    color: #8b949e;
    font-size: 14px;
    font-weight: 700;
}

.login-box .form-label {
    color: #d8e1ed;
}

.login-box .form-input {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    color: #e6edf3;
}

.login-box .form-input::placeholder {
    color: #8b949e;
}

.login-box .form-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: #4ea1ff;
    box-shadow: 0 0 0 3px rgba(78,161,255,0.20);
}

.main-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 232px;
    min-width: 232px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--sidebar);
    color: #cfd6e6;
    box-shadow: 12px 0 34px rgba(19, 24, 33, 0.12);
    overflow-y: auto;
}

.sidebar-logo {
    height: 88px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 23px;
    font-weight: 900;
    color: #6d85ff;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #6675ff, #18c8ff);
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(24, 200, 255, .18);
}

.sidebar-nav {
    padding: 18px 10px;
}

.nav-item {
    min-height: 46px;
    margin-bottom: 8px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c9d1df;
    border-radius: 12px;
    font-weight: 750;
    text-decoration: none;
    transition: background .18s, color .18s, transform .18s;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(91,108,255,.22), rgba(24,200,255,.12));
    transform: translateX(2px);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-block;
    position: relative;
    color: #9fb0ce;
}

.nav-icon::before,
.nav-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.icon-dashboard::before { inset: 3px; border: 2px solid currentColor; border-radius: 50%; border-bottom-color: transparent; }
.icon-dashboard::after { width: 7px; height: 2px; left: 10px; top: 10px; background: currentColor; border-radius: 999px; transform: rotate(-35deg); transform-origin: left center; }
.icon-server::before { left: 3px; right: 3px; top: 4px; height: 12px; border: 2px solid currentColor; border-radius: 4px; }
.icon-server::after { width: 10px; height: 2px; left: 5px; bottom: 2px; background: currentColor; box-shadow: 3px -5px 0 -1px currentColor, 7px -5px 0 -1px currentColor; }
.icon-link::before { width: 11px; height: 8px; left: 1px; top: 6px; border: 2px solid currentColor; border-radius: 999px; transform: rotate(-35deg); }
.icon-link::after { width: 11px; height: 8px; right: 1px; top: 6px; border: 2px solid currentColor; border-radius: 999px; transform: rotate(-35deg); }
.icon-inbound::before { left: 4px; top: 3px; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 4px; }
.icon-inbound::after { left: 8px; top: 0; width: 4px; height: 13px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.icon-customers::before { width: 7px; height: 7px; left: 3px; top: 3px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 8px 0 0 -2px currentColor; }
.icon-customers::after { left: 1px; bottom: 3px; width: 18px; height: 8px; border: 2px solid currentColor; border-radius: 999px 999px 3px 3px; }
.icon-user::before { width: 8px; height: 8px; left: 6px; top: 2px; border: 2px solid currentColor; border-radius: 50%; }
.icon-user::after { left: 3px; bottom: 2px; width: 14px; height: 8px; border: 2px solid currentColor; border-radius: 999px 999px 3px 3px; }
.icon-logs::before { left: 4px; top: 2px; width: 12px; height: 16px; border: 2px solid currentColor; border-radius: 3px; }
.icon-logs::after { left: 7px; top: 7px; width: 7px; height: 2px; background: currentColor; box-shadow: 0 4px 0 currentColor; }
.icon-settings::before { left: 4px; top: 4px; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.icon-settings::after { left: 9px; top: 0; width: 2px; height: 20px; background: currentColor; transform: rotate(45deg); }

.nav-divider {
    height: 1px;
    margin: 14px 8px;
    background: rgba(255,255,255,0.06);
}

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 96px;
    padding: 30px 38px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.topbar-left h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 900;
    color: #222433;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.user-avatar {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6675ff, #5b45e8);
    color: white;
    font-weight: 900;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    display: none;
    z-index: 1000;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.user-info:hover .user-dropdown {
    display: block;
}

.user-dropdown-item {
    padding: 12px 16px;
    color: #303348;
    font-weight: 800;
}

.user-dropdown-item:hover {
    background: #f8faff;
}

.content {
    padding: 0 38px 36px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card,
.card {
    background: var(--panel);
    border: 1px solid rgba(229, 234, 246, .9);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 122px;
    padding: 24px 26px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.stat-card-header {
    margin-bottom: 10px;
}

.stat-card-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6d85ff;
}

.stat-card-value {
    color: #1e2433;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 950;
}

.stat-card-label {
    color: #8f96aa;
    font-size: 13px;
    font-weight: 750;
    margin-top: 8px;
}

.card {
    margin-bottom: 24px;
}

.card-header {
    min-height: 70px;
    padding: 18px 22px;
    border-bottom: 1px solid #eef1f7;
    background: linear-gradient(90deg, #f6fbff, #fff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.card-title {
    color: #303348;
    font-size: 17px;
    font-weight: 900;
}

.card-subtitle {
    color: #8b8fa3;
    font-size: 12px;
    font-weight: 750;
    margin-top: 4px;
}

.card-body {
    padding: 22px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #555b6f;
}

th {
    background: #eef7ff;
    color: #6f7c95;
    height: 48px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

td {
    height: 58px;
    padding: 10px 12px;
    border-top: 1px solid #eef1f7;
    vertical-align: middle;
    font-weight: 650;
}

tbody tr:nth-child(odd) {
    background: #fcfffb;
}

tbody tr:hover {
    background: #f2fbff;
}

code {
    background: #e9fbff;
    color: #00bce8;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 850;
}

.btn {
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition: filter .16s, transform .16s, background .16s;
}

.btn:hover {
    filter: brightness(.98);
}

.btn-primary {
    background: linear-gradient(135deg, #6675ff, #5b45e8);
    color: #fff;
    box-shadow: 0 10px 24px rgba(91, 108, 255, .24);
}

.btn-success {
    background: #dff9ec;
    color: #20c473;
    border-color: #bdf0d6;
}

.btn-warning {
    background: #fff3d6;
    color: #9a6a00;
    border-color: #f4d58a;
}

.btn-danger {
    background: #fff0f2;
    color: #ff5266;
    border-color: #ffd2d8;
}

.btn-default {
    background: #f4f7ff;
    color: #5364d8;
    border-color: #dfe7ff;
    box-shadow: 0 9px 20px rgba(32, 38, 60, .06);
}

.btn-sm {
    min-height: 32px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #25293a;
    font-weight: 900;
    font-size: 14px;
}

.form-label.required::after {
    content: " *";
    color: var(--danger);
}

.form-input,
.form-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    background: #fbfcff;
    border: 1px solid #eef1f7;
    border-radius: 14px;
    color: #293044;
    font-size: 14px;
    font-weight: 650;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    background: #fff;
    border-color: #8ab9ff;
    box-shadow: 0 0 0 4px rgba(91,108,255,.14);
}

textarea.form-input {
    min-height: 90px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-hint {
    margin-top: 6px;
    color: #9aa1b3;
    font-size: 12px;
    font-weight: 750;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge-success { background: #dff9ec; color: #20c473; }
.badge-warning { background: #fff3d6; color: #b97800; }
.badge-danger { background: #ffe7eb; color: #f34f63; }
.badge-info { background: #e9fbff; color: #00bce8; }
.badge-default { background: #f0f1f7; color: #8b8fa3; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, .48);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: 560px;
    max-width: 92vw;
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    color: #25293a;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(36, 39, 54, .20);
}

.modal-header,
.modal-footer {
    padding: 18px 22px;
    border-color: #eef1f7;
}

.modal-header {
    border-bottom: 1px solid #eef1f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 950;
}

.modal-body {
    padding: 22px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #eef1f7;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: #f8faff;
    color: #8b8fa3;
    cursor: pointer;
    font-size: 20px;
}

.toolbar,
.toolbar-left,
.toolbar-right,
.action-buttons,
.status-line,
.copy-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar {
    justify-content: space-between;
    margin-bottom: 16px;
}

.table-check {
    width: 42px;
    text-align: center;
}

.muted {
    color: #8b8fa3;
    font-size: 12px;
    font-weight: 750;
}

.mono-block,
.log-box {
    background: #f8faff;
    color: #555b6f;
    border: 1px solid #eef1f7;
    border-radius: 14px;
    padding: 14px;
    overflow: auto;
    max-height: 460px;
    white-space: pre;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
}

.copy-field input {
    flex: 1;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9aa1b3;
}

.empty-state-icon {
    display: flex;
    justify-content: center;
    color: #8b8fa3;
    margin-bottom: 12px;
}

.empty-state-icon .nav-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

.empty-state-title {
    color: #555b6f;
    font-size: 16px;
    font-weight: 900;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 240px;
    margin-bottom: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    color: #fff;
    box-shadow: var(--shadow);
    animation: slideIn .2s ease-out;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: #2f2500; }
.toast-info { background: var(--info); }

.loading {
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 3px solid #edf0f6;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.confirm-dialog {
    text-align: center;
}

.confirm-dialog-icon {
    width: 58px;
    height: 58px;
    margin: 4px auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #7a72ff;
    background: #f1f0ff;
    font-size: 34px;
    font-weight: 950;
}

.confirm-dialog-message {
    color: #555b6f;
    font-weight: 800;
    line-height: 1.7;
}

.confirm-danger .confirm-dialog-icon {
    color: #ff5266;
    background: #fff0f2;
}

.confirm-count {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #6f778b;
    font-weight: 900;
}

.confirm-count strong {
    color: #202638;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
}

.confirm-detail {
    margin-top: 16px;
    text-align: left;
}

.confirm-rule-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #eef1f7;
    border-radius: 8px;
    overflow: hidden;
}

.confirm-rule-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid #eef1f7;
    background: #fbfdff;
}

.confirm-rule-list li:first-child {
    border-top: none;
}

.confirm-rule-list span {
    color: #202638;
    font-weight: 950;
}

.confirm-rule-list em {
    color: #8b8fa3;
    font-style: normal;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.confirm-more {
    margin-top: 8px;
    color: #8b8fa3;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.form-group-wide {
    flex: 1 1 100%;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.pagination-bar .page-info {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    margin: 0 6px;
}

.pagination-bar-left {
    margin-right: auto;
    color: #596276;
    font-size: 13px;
    font-weight: 900;
}

.pagination-bar .btn[disabled] {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}

.compact-select {
    width: auto;
    min-width: 92px;
    height: 34px;
    padding: 0 28px 0 10px;
    font-size: 13px;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    color: #3f4658;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.proxy-row td {
    height: 58px;
    font-size: 15px;
}

.proxy-id,
.proxy-host,
.mono-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #06152e;
}

.proxy-host {
    font-size: 16px;
}

.status-dot {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    background: #ff5b6b;
    box-shadow: 0 0 0 6px rgba(255, 91, 107, .14);
}

.status-dot.ok {
    background: #22c979;
    box-shadow: 0 0 0 6px rgba(34, 201, 121, .14);
}

.status-dot.bad {
    background: #ff5b6b;
}

.latency {
    color: #ff9900;
    font-size: 18px;
    font-weight: 900;
}

.export-modal {
    background: #f6fbff;
    color: #253044;
    padding: 16px;
    border: 1px solid #e1edf9;
    border-radius: 8px;
}

.created-summary {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid #c8f1dc;
    border-radius: 8px;
    background: #ecfff5;
}

.created-summary strong {
    display: block;
    color: #15945d;
    font-size: 18px;
    font-weight: 950;
}

.created-summary span {
    display: block;
    margin-top: 6px;
    color: #5f7b6d;
    font-size: 13px;
    font-weight: 850;
}

.delimiter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.delimiter-row .active {
    background: #27b87a;
    color: #fff;
}

.export-textarea {
    width: 100%;
    min-height: 360px;
    padding: 18px 22px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #fff;
    color: #203047;
    font: 16px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    resize: vertical;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.modal-actions-right {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.relay-probe-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 12px;
}

.server-probe-section {
    padding: 24px 28px 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.section-title {
    margin: 0 0 18px;
    color: #242736;
    font-size: 18px;
    font-weight: 950;
}

.server-probe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.server-probe-card {
    min-width: 0;
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eef2f8;
    box-shadow: 0 16px 36px rgba(34, 43, 72, .08);
}

.probe-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.probe-server-name {
    color: #1f2535;
    font-size: 18px;
    font-weight: 950;
}

.probe-server-ip {
    margin-top: 4px;
    color: #8b8fa3;
    font-size: 13px;
    font-weight: 800;
}

.probe-status-pill {
    padding: 6px 12px;
    border-radius: 8px;
    color: #8b8fa3;
    background: #f1f3f8;
    font-weight: 950;
}

.probe-status-pill.online {
    color: #17b96f;
    background: #dff9ec;
}

.probe-status-pill.offline {
    color: #ff5b6b;
    background: #ffe8eb;
}

.probe-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.probe-metric {
    min-height: 72px;
    padding: 14px;
    border-radius: 8px;
    background: #f8faff;
}

.probe-metric span,
.probe-disk-box span {
    display: block;
    margin-bottom: 8px;
    color: #8f96aa;
    font-size: 13px;
    font-weight: 900;
}

.probe-metric strong,
.probe-disk-box strong {
    color: #202638;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.35;
}

.probe-disk-box {
    margin-top: 12px;
    padding: 14px;
    border-radius: 8px;
    background: #fff8ef;
}

.probe-card-foot {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    color: #8b8fa3;
    font-weight: 900;
    font-size: 13px;
}

.probe-card {
    min-width: 260px;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.probe-head,
.probe-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.probe-ip {
    margin-top: 8px;
    font-weight: 900;
    color: #1f6fff;
}

.probe-meta {
    margin-top: 10px;
    color: #555b6f;
    font-size: 12px;
    font-weight: 800;
}

.probe-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
}

.probe-dot.ok {
    background: var(--success);
}

.node-picker-box {
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #e8ecf5;
    border-radius: 8px;
    background: #f8faff;
}

.node-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #697186;
    font-size: 13px;
    font-weight: 900;
}

.node-picker-head label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #202638;
    cursor: pointer;
}

.node-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow: auto;
}

.node-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 62px;
    padding: 10px;
    border: 1px solid #dde5f4;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.node-choice input {
    margin-top: 4px;
}

.node-choice span,
.node-choice strong,
.node-choice em {
    display: block;
    min-width: 0;
}

.node-choice strong {
    color: #202638;
    font-size: 13px;
    font-weight: 950;
    word-break: break-all;
}

.node-choice em {
    margin-top: 4px;
    color: #7e879b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    word-break: break-all;
}

.node-picker-empty {
    padding: 14px;
    border: 1px dashed #cad3e5;
    border-radius: 8px;
    color: #8a93a8;
    background: #fff;
    font-weight: 900;
}

.inbound-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.inbound-stat-card {
    position: relative;
    min-height: 104px;
    padding: 18px;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(31, 45, 78, .05);
    text-align: left;
    cursor: pointer;
}

.inbound-stat-card[data-filter="all"] {
    background: linear-gradient(135deg, #f1f4ff, #ffffff);
    border-color: #dce3ff;
}

.inbound-stat-card[data-filter="enabled"] {
    background: linear-gradient(135deg, #ecfff5, #ffffff);
    border-color: #c9f0dd;
}

.inbound-stat-card[data-filter="expiring"] {
    background: linear-gradient(135deg, #fff7df, #ffffff);
    border-color: #f2df9e;
}

.inbound-stat-card[data-filter="expired"] {
    background: linear-gradient(135deg, #fff0f3, #ffffff);
    border-color: #ffcfd7;
}

.inbound-stat-card.active {
    border-color: #6c63ff;
    box-shadow: 0 14px 30px rgba(108, 99, 255, .12);
}

.inbound-stat-card span {
    display: block;
    color: #8992a8;
    font-size: 14px;
    font-weight: 950;
}

.inbound-stat-card strong {
    display: block;
    margin-top: 8px;
    color: #232a3d;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
}

.inbound-stat-card em {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    color: #7068ff;
    background: #f2f1ff;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.inbound-stat-card[data-filter="enabled"] em {
    color: #15945d;
    background: #dff9ec;
}

.inbound-stat-card[data-filter="expiring"] em {
    color: #9a6a00;
    background: #fff0c7;
}

.inbound-stat-card[data-filter="expired"] em {
    color: #e04458;
    background: #ffe3e8;
}

.inbound-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 20px 16px;
    padding: 14px;
    border: 1px solid #e5edf8;
    border-radius: 8px;
    background: #f7fbff;
}

.inbound-search {
    flex: 1 1 280px;
    min-width: 220px;
}

.inbound-page-size {
    width: 92px;
}

.status-pill,
.limit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.status-pill.enabled {
    color: #14a66a;
    background: #e3f8ef;
}

.status-pill.disabled {
    color: #d94a55;
    background: #ffe9eb;
}

.limit-pill {
    color: #596276;
    background: #eef2f8;
}

.traffic-text {
    margin-bottom: 7px;
    color: #596276;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.traffic-bar {
    width: 112px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f8;
}

.traffic-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #6c63ff;
}

.batch-action-box {
    display: grid;
    gap: 14px;
}

.batch-hint {
    padding: 11px 14px;
    border: 1px solid #b8d7ff;
    border-radius: 8px;
    color: #14549d;
    background: linear-gradient(135deg, #eff7ff 0%, #f7fbff 100%);
    font-size: 13px;
    font-weight: 900;
}

.batch-textarea {
    min-height: 132px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.55;
}

.mgmt-section {
    margin-top: 16px;
}

.section-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #27548a;
    background: #eaf3ff;
    font-size: 12px;
    font-weight: 900;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 760px) {
    .main-layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        position: sticky;
        z-index: 100;
    }

    .sidebar-logo {
        height: 54px;
    }

    .sidebar-logo h1 {
        font-size: 18px;
    }

    .sidebar-nav {
        height: 58px;
        padding: 8px 10px;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .nav-item {
        flex: 0 0 104px;
        min-height: 40px;
        margin-bottom: 0;
        justify-content: center;
        font-size: 12px;
        transform: none !important;
    }

    .nav-divider {
        display: none;
    }

    .topbar {
        min-height: auto;
        padding: 18px 14px;
    }

    .topbar-left h2 {
        font-size: 22px;
    }

    .content {
        padding: 0 12px 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .stat-card {
        border-radius: 16px;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal {
        width: 100%;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
}
