/* ============================================================
   实操台 — 防火墙前台
   参考：浅蓝灰底 + 白卡片 + 实心蓝按钮 + 橙/蓝标签 + 绿提示条
   字体：系统中文无衬线（更自然，不依赖花哨网字）
   ============================================================ */
:root {
    --unified-primary: #2f54eb;
    --unified-primary-dark: #1d39c4;
    --unified-primary-light: #597ef7;
    --unified-secondary: #1890ff;
    --unified-accent: #2f54eb;
    --unified-pink: #eb2f96;
    --unified-success: #52c41a;
    --unified-warning: #fa8c16;
    --unified-danger: #ff4d4f;
    --unified-info: #1890ff;
    --unified-dark: #262626;
    --unified-gray: #8c8c8c;
    --unified-light-gray: #e8e8e8;
    --unified-white: #ffffff;
    --unified-black: #000000;
    --unified-bg: #f0f2f5;
    --unified-surface: #ffffff;
    --unified-surface-2: #fafafa;
    --unified-border: #f0f0f0;
    --unified-border-strong: #d9d9d9;
    --unified-sidebar: #ffffff;
    --unified-sidebar-width: 220px;
    --unified-topbar-h: 56px;
    --unified-tag-orange-bg: #fff7e6;
    --unified-tag-orange-text: #d46b08;
    --unified-tag-orange-border: #ffd591;
    --unified-tag-blue-bg: #e6f7ff;
    --unified-tag-blue-text: #096dd9;
    --unified-tag-blue-border: #91d5ff;
    --unified-tag-green-bg: #f6ffed;
    --unified-tag-green-text: #389e0d;
    --unified-tag-green-border: #b7eb8f;
    --unified-gradient-primary: #2f54eb;
    --unified-gradient-accent: #2f54eb;
    --unified-gradient-success: #52c41a;
    --unified-gradient-warning: #fa8c16;
    --unified-gradient-danger: #ff4d4f;
    --unified-gradient-info: #1890ff;
    --unified-gradient-dark: #262626;
    --unified-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --unified-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --unified-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --unified-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    --unified-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);
    --unified-shadow-2xl: 0 12px 32px rgba(0, 0, 0, 0.14);
    --unified-shadow-glow: none;
    --unified-radius-sm: 4px;
    --unified-radius: 6px;
    --unified-radius-md: 8px;
    --unified-radius-lg: 8px;
    --unified-radius-xl: 8px;
    --unified-radius-2xl: 10px;
    --unified-radius-full: 9999px;
    --unified-transition: all .2s ease;
    --unified-transition-fast: all .12s ease;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--unified-dark);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    background: var(--unified-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--unified-primary); text-decoration: none; }
a:hover { color: var(--unified-primary-dark); }
h1, h2, h3, h4, h5, h6 {
    color: rgba(0, 0, 0, 0.85);
    font-weight: 600;
    line-height: 1.35;
}
.text-muted { color: var(--unified-gray) !important; }
code, pre {
    background: #f5f5f5;
    color: #c41d7f;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
}

/* ========== 壳层：白侧栏 ========== */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--unified-sidebar-width);
    background: #fff;
    border-right: 1px solid #f0f0f0;
    z-index: 1040;
    display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.app-sidebar::before { display: none; }
.app-sidebar-brand {
    height: 56px; padding: 0 16px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none; color: rgba(0,0,0,.85); flex-shrink: 0;
}
.app-sidebar-brand .brand-mark {
    width: 32px; height: 32px; border-radius: 6px;
    background: #2f54eb; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.app-sidebar-brand .brand-text { display: flex; flex-direction: column; min-width: 0; }
.app-sidebar-brand .brand-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.app-sidebar-brand .brand-sub { display: none; }

.app-sidebar-nav {
    flex: 1; overflow-y: auto; padding: 8px 8px 16px;
    display: flex; flex-direction: column; gap: 2px;
}
.app-nav-label {
    font-size: 12px; color: rgba(0,0,0,.35);
    padding: 12px 12px 4px; font-weight: 500;
}
.app-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; color: rgba(0,0,0,.65);
    border-radius: 6px; font-weight: 400; font-size: 14px;
    transition: background .15s, color .15s;
    border: none; background: transparent; width: 100%; text-align: left;
    text-decoration: none; cursor: pointer;
}
.app-nav-link i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.app-nav-link:hover { color: #2f54eb; background: #f5f5f5; }
.app-nav-link.active {
    color: #2f54eb; background: #f0f5ff; font-weight: 500;
}
.app-nav-link .badge { margin-left: auto; font-size: 11px; }
.app-nav-group { margin-bottom: 0; }
.app-nav-sub {
    display: none; flex-direction: column; gap: 1px;
    padding: 0 0 4px 12px; margin-left: 16px;
    border-left: 1px solid #f0f0f0;
}
.app-nav-group.open .app-nav-sub,
.app-nav-group.has-active .app-nav-sub { display: flex; }
.app-nav-sub .app-nav-link { padding: 7px 12px; font-size: 13px; }
.app-nav-toggle .chevron { margin-left: auto; font-size: 12px; color: rgba(0,0,0,.35); transition: transform .2s; }
.app-nav-group.open .app-nav-toggle .chevron { transform: rotate(90deg); }

.app-sidebar-foot {
    padding: 12px; border-top: 1px solid #f0f0f0; flex-shrink: 0;
}
.app-user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: 6px; background: #fafafa;
}
.app-user-avatar {
    width: 32px; height: 32px; border-radius: 6px;
    background: #2f54eb; color: #fff; font-weight: 600; font-size: 13px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.app-user-meta { min-width: 0; flex: 1; }
.app-user-meta .name {
    color: rgba(0,0,0,.85); font-weight: 500; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-user-meta .role { color: rgba(0,0,0,.45); font-size: 12px; }
.app-user-actions { display: flex; gap: 6px; margin-top: 8px; }
.app-user-actions a, .app-user-actions button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 5px 8px; border-radius: 4px; font-size: 12px; font-weight: 400;
    color: rgba(0,0,0,.65); background: #fff; border: 1px solid #d9d9d9;
    text-decoration: none; cursor: pointer;
}
.app-user-actions a:hover, .app-user-actions button:hover {
    color: #2f54eb; border-color: #2f54eb;
}

.app-main {
    flex: 1; margin-left: var(--unified-sidebar-width);
    min-width: 0; display: flex; flex-direction: column; min-height: 100vh;
}
.app-topbar {
    height: var(--unified-topbar-h);
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; gap: 12px;
    position: sticky; top: 0; z-index: 1030;
}
.app-topbar-left { display: flex; align-items: center; gap: 12px; }
.app-menu-btn {
    display: none; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px;
    border: 1px solid #d9d9d9; background: #fff;
    color: rgba(0,0,0,.65); cursor: pointer; font-size: 16px;
}
.app-topbar-crumb { font-size: 14px; color: rgba(0,0,0,.45); }
.app-topbar-crumb strong { color: rgba(0,0,0,.85); font-weight: 500; }
.app-topbar-right { display: flex; align-items: center; gap: 10px; }
.app-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 4px;
    background: #f6ffed; color: #389e0d;
    border: 1px solid #b7eb8f;
    font-size: 12px; font-weight: 400;
}
.app-status-pill .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #52c41a;
    animation: none;
}

.app-content { padding: 20px 24px 32px; flex: 1; }

.app-sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1035;
}
.app-sidebar-overlay.show { display: block; }

@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .app-menu-btn { display: flex; }
}

body:has(.app-shell) > .unified-navbar { display: none !important; }

/* 旧顶栏兼容 → 浅色侧栏 */
.unified-navbar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--unified-sidebar-width);
    background: #fff !important; border: none !important;
    border-right: 1px solid #f0f0f0 !important;
    box-shadow: none !important; padding: 0 !important;
    display: flex; flex-direction: column; z-index: 1040; overflow-y: auto;
}
.unified-navbar .container-fluid,
.unified-navbar .unified-container {
    flex-direction: column !important; align-items: stretch !important;
    height: 100%; max-width: none !important; padding: 0 !important; margin: 0 !important;
    display: flex !important;
}
.unified-navbar-brand {
    height: 56px; padding: 0 16px; color: rgba(0,0,0,.85) !important;
    font-weight: 600; border-bottom: 1px solid #f0f0f0;
}
.unified-navbar-brand i {
    background: #2f54eb !important; box-shadow: none !important;
    border-radius: 6px !important; width: 32px; height: 32px;
}
.unified-navbar-title {
    background: none !important; -webkit-text-fill-color: rgba(0,0,0,.85) !important;
    color: rgba(0,0,0,.85) !important; font-weight: 600;
}
.unified-navbar-toggler { display: none !important; }
.unified-navbar-collapse {
    display: flex !important; flex-direction: column !important;
    flex: 1; padding: 8px; height: auto !important;
}
.unified-navbar-nav {
    flex-direction: column !important; width: 100%; gap: 2px !important;
    align-items: stretch !important;
}
.unified-navbar-nav.me-auto { flex: 1; }
.unified-navbar-nav .nav-link {
    color: rgba(0,0,0,.65) !important; padding: 9px 12px !important;
    border-radius: 6px; font-weight: 400;
}
.unified-navbar-nav .nav-link:hover { color: #2f54eb !important; background: #f5f5f5 !important; }
.unified-navbar-nav .nav-link.active {
    color: #2f54eb !important; background: #f0f5ff !important; box-shadow: none !important;
}
.unified-navbar-nav .dropdown-menu {
    position: static !important; transform: none !important;
    background: transparent !important; border: none !important;
    box-shadow: none !important; padding: 0 0 0 12px !important; margin: 0 !important; width: 100%;
}
.unified-navbar-nav .dropdown-item { color: rgba(0,0,0,.65) !important; border-radius: 6px; font-size: 13px; }
.unified-navbar-nav .dropdown-item:hover { background: #f5f5f5 !important; color: #2f54eb !important; transform: none; }
.unified-navbar-nav .dropdown-item.active { background: #f0f5ff !important; color: #2f54eb !important; }
body:not(:has(.app-shell)) .unified-container {
    margin-left: var(--unified-sidebar-width);
    max-width: none; padding: 20px 24px 32px;
}
@media (max-width: 992px) {
    body:not(:has(.app-shell)) .unified-navbar { transform: translateX(-100%); }
    body:not(:has(.app-shell)) .unified-navbar.show { transform: translateX(0); }
    body:not(:has(.app-shell)) .unified-container { margin-left: 0; }
    .unified-navbar-toggler {
        display: flex !important; position: fixed; top: 12px; left: 12px; z-index: 1050;
        background: #fff !important; color: #2f54eb !important; border: 1px solid #d9d9d9 !important;
    }
}

/* ========== 页面头：参考图标题风格 ========== */
.unified-page-header {
    background: transparent;
    color: rgba(0,0,0,.85);
    border-radius: 0;
    margin-bottom: 16px;
    position: relative; overflow: visible;
    box-shadow: none; border: none; border-left: none;
    padding: 0 0 4px;
}
.unified-page-header::before,
.unified-page-header::after { display: none; }
.unified-page-title {
    font-size: 20px; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 8px;
    color: rgba(0,0,0,.85);
}
.unified-page-title i { color: rgba(0,0,0,.65); font-size: 20px; }
.unified-page-subtitle {
    font-size: 13px; margin: 6px 0 0; font-weight: 400;
    color: rgba(0,0,0,.45);
}

/* ========== 卡片 ========== */
.unified-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: none;
    margin-bottom: 16px;
}
.unified-card:hover { box-shadow: none; transform: none; border-color: #f0f0f0; }
.unified-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}
.unified-card-title {
    font-size: 15px; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 8px;
}
.unified-card-title i {
    width: auto; height: auto; border-radius: 0;
    background: transparent; color: rgba(0,0,0,.65); font-size: 15px;
}
.unified-card-body { padding: 16px; }

/* ========== 统计 ========== */
.unified-stats-card {
    border-radius: 8px; box-shadow: none;
    border: 1px solid #f0f0f0; overflow: hidden;
    transition: border-color .15s; height: 100%;
    background: #fff; position: relative;
}
.unified-stats-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: #2f54eb;
}
.unified-stats-card:hover { transform: none; box-shadow: none; border-color: #d9d9d9; }
.unified-stats-card.primary::before { background: #2f54eb; }
.unified-stats-card.success::before { background: #52c41a; }
.unified-stats-card.warning::before { background: #fa8c16; }
.unified-stats-card.info::before    { background: #1890ff; }
.unified-stats-card.danger::before  { background: #ff4d4f; }
.unified-stats-card.dark::before    { background: #595959; }
.unified-stats-card .card-body { padding: 16px 18px; }
.unified-stats-card h6 {
    font-size: 13px; font-weight: 400; margin-bottom: 8px;
    text-transform: none; letter-spacing: 0; color: rgba(0,0,0,.45);
}
.unified-stats-card h2 {
    font-size: 28px; font-weight: 600; margin: 0; letter-spacing: 0;
    color: rgba(0,0,0,.85); font-variant-numeric: tabular-nums;
}
.unified-stats-card.primary h2,
.unified-stats-card.success h2,
.unified-stats-card.warning h2,
.unified-stats-card.info h2,
.unified-stats-card.danger h2,
.unified-stats-card.dark h2 { color: rgba(0,0,0,.85); }
.unified-stats-card .bi { color: rgba(0,0,0,.15) !important; }

/* ========== 按钮：实心蓝 ========== */
.unified-btn {
    border-radius: 6px; padding: 6px 16px; height: 36px;
    font-weight: 400; transition: all .2s;
    border: 1px solid transparent; font-size: 15px;
    display: inline-flex; align-items: center; gap: 6px; justify-content: center;
    letter-spacing: 0; cursor: pointer; line-height: 1.5;
}
.unified-btn:active { transform: none; }
.unified-btn-primary { background: #2f54eb; color: #fff; box-shadow: none; }
.unified-btn-primary:hover { background: #1d39c4; color: #fff; box-shadow: none; transform: none; }
.unified-btn-success { background: #52c41a; color: #fff; }
.unified-btn-success:hover { background: #389e0d; color: #fff; }
.unified-btn-warning { background: #fa8c16; color: #fff; }
.unified-btn-warning:hover { background: #d46b08; color: #fff; }
.unified-btn-danger { background: #ff4d4f; color: #fff; }
.unified-btn-danger:hover { background: #cf1322; color: #fff; }
.unified-btn-info { background: #1890ff; color: #fff; }
.unified-btn-info:hover { background: #096dd9; color: #fff; }
.unified-btn-light { background: #fff; color: rgba(0,0,0,.85); border: 1px solid #d9d9d9; }
.unified-btn-light:hover { color: #2f54eb; border-color: #2f54eb; }
.unified-btn-outline-primary { background: #fff; color: #2f54eb; border: 1px solid #2f54eb; }
.unified-btn-outline-primary:hover { background: #f0f5ff; color: #1d39c4; border-color: #1d39c4; }
.unified-btn-outline-danger { background: #fff; color: #ff4d4f; border: 1px solid #ff4d4f; }
.unified-btn-outline-danger:hover { background: #fff1f0; color: #cf1322; }
.unified-btn-sm { padding: 0 10px; height: 28px; font-size: 13px; border-radius: 5px; }
.unified-btn-lg { padding: 6.4px 15px; height: 40px; font-size: 16px; border-radius: 6px; }
.unified-btn-block { width: 100%; }
.unified-btn:disabled { opacity: .65; pointer-events: none; }

/* ========== 表单 ========== */
.unified-form-group { margin-bottom: 16px; }
.unified-form-label { font-weight: 400; font-size: 15px; margin-bottom: 6px; color: rgba(0,0,0,.85); display: block; }
.unified-form-control {
    width: 100%; padding: 6px 12px; height: 36px; font-size: 15px;
    border: 1px solid #d9d9d9; border-radius: 6px;
    background: #fff; color: rgba(0,0,0,.85); transition: all .2s;
}
.unified-form-control:focus {
    outline: none; border-color: #2f54eb;
    box-shadow: 0 0 0 2px rgba(47, 84, 235, .15);
}
.unified-form-control::placeholder { color: #bfbfbf; }
.unified-input-group { display: flex; }
.unified-input-group .unified-form-control { border-radius: 6px 0 0 6px; }
.unified-input-group .unified-btn { border-radius: 0 6px 6px 0; height: 32px; }
.unified-select {
    width: 100%; padding: 6px 12px; height: 36px;
    border: 1px solid #d9d9d9; border-radius: 6px;
    background: #fff; color: rgba(0,0,0,.85); font-size: 15px;
}
.unified-select:focus {
    outline: none; border-color: #2f54eb;
    box-shadow: 0 0 0 2px rgba(47, 84, 235, .15);
}
.unified-textarea { min-height: 80px; height: auto; padding: 8px 11px; resize: vertical; }
.unified-form-hint { font-size: 12px; color: rgba(0,0,0,.45); margin-top: 4px; }
.unified-form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 400; }

/* ========== 表格 ========== */
.unified-table {
    width: 100%; margin-bottom: 0; background: #fff;
    border-radius: 0; overflow: hidden;
    border: none; border-collapse: collapse;
}
.unified-table thead th {
    background: #fafafa; color: rgba(0,0,0,.85);
    font-size: 15px; font-weight: 500; text-transform: none; letter-spacing: 0;
    padding: 13px 18px; border-bottom: 1px solid #f0f0f0; white-space: nowrap;
}
.unified-table tbody td {
    padding: 13px 18px; border-bottom: 1px solid #f0f0f0;
    color: rgba(0,0,0,.85); vertical-align: middle; font-size: 15px;
}
.unified-table tbody tr { transition: background .15s; }
.unified-table tbody tr:hover { background: #fafafa; }
.unified-table tbody tr:last-child td { border-bottom: none; }

/* ========== 标签：参考图橙/蓝 ========== */
.unified-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; font-size: 13px; font-weight: 400;
    border-radius: 5px; letter-spacing: 0; border: 1px solid transparent; line-height: 1.6;
}
.unified-badge-primary {
    background: var(--unified-tag-orange-bg);
    color: var(--unified-tag-orange-text);
    border-color: var(--unified-tag-orange-border);
}
.unified-badge-success {
    background: var(--unified-tag-green-bg);
    color: var(--unified-tag-green-text);
    border-color: var(--unified-tag-green-border);
}
.unified-badge-warning {
    background: var(--unified-tag-orange-bg);
    color: var(--unified-tag-orange-text);
    border-color: var(--unified-tag-orange-border);
}
.unified-badge-danger { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }
.unified-badge-info {
    background: var(--unified-tag-blue-bg);
    color: var(--unified-tag-blue-text);
    border-color: var(--unified-tag-blue-border);
}
.unified-badge-dark { background: #f5f5f5; color: rgba(0,0,0,.65); border-color: #d9d9d9; }
.unified-badge-secondary { background: #fafafa; color: rgba(0,0,0,.45); border-color: #d9d9d9; }

/* ========== 提示条：参考图绿框 ========== */
.unified-alert {
    border-radius: 6px; padding: 12px 16px; margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 8px;
    border: 1px solid transparent; font-weight: 400; font-size: 14px;
}
.unified-alert i { font-size: 14px; margin-top: 3px; }
.unified-alert-success {
    background: #f6ffed; border-color: #b7eb8f; color: rgba(0,0,0,.85);
}
.unified-alert-warning {
    background: #fffbe6; border-color: #ffe58f; color: rgba(0,0,0,.85);
}
.unified-alert-danger {
    background: #fff1f0; border-color: #ffa39e; color: rgba(0,0,0,.85);
}
.unified-alert-info {
    background: #e6f7ff; border-color: #91d5ff; color: rgba(0,0,0,.85);
}

/* ========== 分页 ========== */
.unified-pagination { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; list-style: none; padding: 0; flex-wrap: wrap; }
.unified-pagination .page-item a, .unified-pagination .page-item span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px; border-radius: 6px;
    border: 1px solid #d9d9d9; background: #fff; color: rgba(0,0,0,.85);
    font-weight: 400; transition: all .2s;
}
.unified-pagination .page-item a:hover { border-color: #2f54eb; color: #2f54eb; }
.unified-pagination .page-item.active a, .unified-pagination .page-item.active span {
    background: #2f54eb; color: #fff; border-color: #2f54eb; box-shadow: none;
}
.unified-pagination .page-item.disabled a, .unified-pagination .page-item.disabled span { opacity: .45; pointer-events: none; }

.unified-empty-state { text-align: center; padding: 48px 16px; color: rgba(0,0,0,.45); }
.unified-empty-state i { font-size: 48px; color: #d9d9d9; margin-bottom: 12px; display: block; }
.unified-empty-state h4 { color: rgba(0,0,0,.85); margin-bottom: 4px; font-size: 16px; font-weight: 500; }

.unified-timeline { position: relative; padding-left: 20px; }
.unified-timeline::before { content: ''; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: #f0f0f0; }
.unified-timeline-item { position: relative; padding: 0 0 16px 12px; }
.unified-timeline-item::before {
    content: ''; position: absolute; left: -18px; top: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #2f54eb; box-shadow: none;
}
.unified-timeline-item .time { font-size: 12px; color: rgba(0,0,0,.45); font-weight: 400; }
.unified-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }

.unified-text-primary { color: #2f54eb !important; }
.unified-text-secondary { color: #1890ff !important; }
.unified-text-success { color: #52c41a !important; }
.unified-text-warning { color: #fa8c16 !important; }
.unified-text-danger { color: #ff4d4f !important; }
.unified-text-info { color: #1890ff !important; }
.unified-text-dark { color: rgba(0,0,0,.85) !important; }
.unified-text-muted { color: rgba(0,0,0,.45) !important; }
.unified-text-light { color: rgba(0,0,0,.25) !important; }
.unified-text-white { color: #fff !important; }
.unified-mb-0 { margin-bottom: 0 !important; }
.unified-mb-1 { margin-bottom: 8px !important; }
.unified-mb-2 { margin-bottom: 12px !important; }
.unified-mb-3 { margin-bottom: 16px !important; }
.unified-mt-3 { margin-top: 16px !important; }
.unified-text-center { text-align: center !important; }
.unified-text-right { text-align: right !important; }
.unified-d-flex { display: flex !important; }
.unified-justify-between { justify-content: space-between !important; }
.unified-align-center { align-items: center !important; }
.unified-gap-2 { gap: 8px !important; }
.unified-w-100 { width: 100% !important; }
.unified-rounded { border-radius: 8px !important; }
.unified-shadow { box-shadow: var(--unified-shadow) !important; }
.unified-border { border: 1px solid #f0f0f0 !important; }
.unified-container { max-width: 1400px; margin: 0 auto; padding: 20px; }

@keyframes unifiedFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes unifiedPulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@keyframes unifiedSpin { to { transform: rotate(360deg); } }
.unified-animate { animation: unifiedFadeIn .25s ease both; }
@keyframes unifiedFadeInUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes unifiedSlideInLeft { from { opacity: 0; } to { opacity: 1; } }
@keyframes unifiedSlideInRight { from { opacity: 0; } to { opacity: 1; } }
.unified-fade-in-up, .unified-slide-in-left, .unified-slide-in-right, .unified-fade-in { animation: none; }
.unified-pulse { animation: unifiedPulse 2s infinite; }
.unified-spinner {
    display: inline-block; width: 1em; height: 1em;
    border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: unifiedSpin .6s linear infinite;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bfbfbf; }

/* Bootstrap 覆盖 */
.card { border-radius: 8px; border: 1px solid #f0f0f0; box-shadow: none; background: #fff; overflow: hidden; }
.card-header {
    background: #fff; border-bottom: 1px solid #f0f0f0; font-weight: 500;
    color: rgba(0,0,0,.85); padding: 12px 16px;
}
.card-header h5, .card-header .card-title, .card-header h5 i {
    margin: 0; color: rgba(0,0,0,.85) !important; font-weight: 600; font-size: 15px;
}
.card-header h5 i, .card-header .card-title i { margin-right: 6px; color: rgba(0,0,0,.65) !important; }
.card-body { padding: 16px; }
.card-footer { background: #fafafa; border-top: 1px solid #f0f0f0; }
.text-monospace { font-family: Consolas, "Courier New", monospace; font-size: 13px; font-weight: 700; color: #cf1322; }
.btn { border-radius: 6px; font-weight: 400; transition: all .2s; height: 36px; padding: 6px 16px; font-size: 15px; line-height: 1.5; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: #2f54eb; border-color: #2f54eb; color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #1d39c4; border-color: #1d39c4; color: #fff; filter: none; }
.btn-success { background: #52c41a; border-color: #52c41a; color: #fff; }
.btn-success:hover { background: #389e0d; border-color: #389e0d; color: #fff; }
.btn-danger { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #cf1322; border-color: #cf1322; color: #fff; }
.btn-warning { background: #fa8c16; border-color: #fa8c16; color: #fff; }
.btn-warning:hover { background: #d46b08; border-color: #d46b08; color: #fff; }
.btn-info { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn-info:hover { background: #096dd9; border-color: #096dd9; color: #fff; }
.btn-secondary { background: #fff; border: 1px solid #d9d9d9; color: rgba(0,0,0,.85); }
.btn-secondary:hover { color: #2f54eb; border-color: #2f54eb; background: #fff; }
.btn-outline-primary { border: 1px solid #2f54eb; color: #2f54eb; background: #fff; }
.btn-outline-primary:hover { background: #f0f5ff; color: #1d39c4; border-color: #1d39c4; }
.btn-outline-secondary { border: 1px solid #d9d9d9; color: rgba(0,0,0,.85); background: #fff; }
.btn-outline-secondary:hover { color: #2f54eb; border-color: #2f54eb; }
.btn-outline-danger { border: 1px solid #ff4d4f; color: #ff4d4f; background: #fff; }
.btn-outline-danger:hover { background: #fff1f0; color: #cf1322; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-group-sm > .btn,
.btn-group-sm > .unified-btn { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 6px; }
.table { --bs-table-bg: transparent; color: rgba(0,0,0,.85); }
.table thead th { background: #fafafa; color: rgba(0,0,0,.85); font-size: 15px; font-weight: 500; text-transform: none; letter-spacing: 0; border-bottom: 1px solid #f0f0f0; padding: 13px 18px; }
.table tbody td { border-bottom: 1px solid #f0f0f0; color: rgba(0,0,0,.85); vertical-align: middle; font-size: 15px; padding: 13px 18px; }
.table tbody tr:hover { background: #fafafa; }
.table-striped tbody tr:nth-of-type(odd) { background: #fafafa; }
.form-control { border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: rgba(0,0,0,.85); padding: 6px 12px; height: 36px; font-size: 15px; }
.form-control:focus { border-color: #2f54eb; box-shadow: 0 0 0 2px rgba(47, 84, 235, .15); }
.form-control::placeholder { color: #bfbfbf; }
.form-select { border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: rgba(0,0,0,.85); height: 36px; font-size: 15px; }
.form-select:focus { border-color: #2f54eb; box-shadow: 0 0 0 2px rgba(47, 84, 235, .15); }
.form-label { font-weight: 400; color: rgba(0,0,0,.85); }
.input-group-text { background: #fafafa; border: 1px solid #d9d9d9; color: rgba(0,0,0,.45); }
.alert { border-radius: 6px; border: 1px solid transparent; }
.alert-success { background: #f6ffed; border-color: #b7eb8f; color: rgba(0,0,0,.85); }
.alert-warning { background: #fffbe6; border-color: #ffe58f; color: rgba(0,0,0,.85); }
.alert-danger { background: #fff1f0; border-color: #ffa39e; color: rgba(0,0,0,.85); }
.alert-info { background: #e6f7ff; border-color: #91d5ff; color: rgba(0,0,0,.85); }
.badge { font-weight: 400; padding: .35em .75em; border-radius: 5px; font-size: .8em; }
.bg-success { background-color: #52c41a !important; }
.bg-danger { background-color: #ff4d4f !important; }
.bg-warning { background-color: #fa8c16 !important; }
.bg-info { background-color: #1890ff !important; }
.bg-primary { background-color: #2f54eb !important; }
.bg-secondary { background-color: #8c8c8c !important; }
.bg-dark { background-color: #262626 !important; }
.nav-tabs { border-bottom: 1px solid #f0f0f0; }
.nav-tabs .nav-link { color: rgba(0,0,0,.65); border: none; font-weight: 400; padding: 12px 16px; border-radius: 0; }
.nav-tabs .nav-link:hover { color: #2f54eb; }
.nav-tabs .nav-link.active { color: #2f54eb; background: transparent; border-bottom: 2px solid #2f54eb; }
.modal-content { border-radius: 8px; border: none; box-shadow: 0 6px 16px rgba(0,0,0,.12); background: #fff; }
.modal-header { border-bottom: 1px solid #f0f0f0; }
.modal-footer { border-top: 1px solid #f0f0f0; }
.dropdown-menu { border: 1px solid #f0f0f0; border-radius: 8px; box-shadow: 0 6px 16px rgba(0,0,0,.08); background: #fff; padding: 4px; }
.dropdown-item { border-radius: 4px; padding: 5px 12px; color: rgba(0,0,0,.85); font-weight: 400; font-size: 14px; }
.dropdown-item:hover { background: #f5f5f5; color: rgba(0,0,0,.85); }
.progress { background: #f5f5f5; border-radius: 100px; }
.progress-bar { background: #2f54eb; }
.pagination .page-link { color: rgba(0,0,0,.85); border: 1px solid #d9d9d9; background: #fff; }
.pagination .page-link:hover { color: #2f54eb; border-color: #2f54eb; }
.pagination .active .page-link { background: #2f54eb; border-color: #2f54eb; color: #fff; }
.list-group-item { background: #fff; border: 1px solid #f0f0f0; color: rgba(0,0,0,.85); }
.list-group-item.active { background: #2f54eb; border-color: #2f54eb; }
.text-success { color: #52c41a !important; }
.text-danger { color: #ff4d4f !important; }
.text-warning { color: #fa8c16 !important; }
.text-info { color: #1890ff !important; }
.text-primary { color: #2f54eb !important; }
.border { border-color: #f0f0f0 !important; }

/* ========== 登录注册：简洁左右分栏 ========== */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f0f2f5;
}
.auth-visual {
    position: relative;
    background: #2f54eb;
    color: #fff;
    padding: 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.12) 0%, transparent 40%),
        radial-gradient(circle at 10% 80%, rgba(0,0,0,.12) 0%, transparent 45%);
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.auth-visual-brand .mark {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.auth-visual h2 { font-size: 32px; font-weight: 600; line-height: 1.35; margin: 24px 0 12px; letter-spacing: 0; max-width: 12em; }
.auth-visual p { font-size: 15px; opacity: .85; max-width: 28em; line-height: 1.7; }
.auth-visual-foot { font-size: 13px; opacity: .55; }
.auth-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 32px 24px; background: #f0f2f5;
}
.auth-card {
    width: 100%; max-width: 400px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 32px 28px;
    animation: none;
}
.auth-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.auth-card .auth-desc { color: rgba(0,0,0,.45); margin-bottom: 24px; font-size: 14px; }
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

.login-background {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px; background: #f0f2f5;
}
.login-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    max-width: 400px; width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid #f0f0f0;
    animation: none !important;
}
.login-header {
    background: transparent !important;
    color: rgba(0,0,0,.85) !important;
    padding: 28px 28px 0 !important;
    text-align: left !important;
}
.login-header h1, .login-header h3 { color: rgba(0,0,0,.85) !important; font-size: 22px !important; font-weight: 600 !important; }
.login-header p { color: rgba(0,0,0,.45) !important; opacity: 1 !important; }
.login-body { padding: 16px 28px 28px; }
.login-icon {
    font-size: 36px !important;
    background: none !important;
    -webkit-text-fill-color: #2f54eb !important;
    color: #2f54eb !important;
}

/* ========== 移动端适配（保持可读，紧凑布局） ========== */
@media (max-width: 768px) {
    .unified-table thead th,
    .unified-table tbody td,
    .table thead th,
    .table tbody td {
        padding: 10px 12px;
    }
    .unified-card-header { padding: 10px 12px; }
    .unified-card-body { padding: 12px; }
    .btn-group-sm > .btn,
    .btn-group-sm > .unified-btn { height: 28px; padding: 0 8px; font-size: 13px; }
}

/* ========== 移动端表格转竖排卡片（通用） ========== */
@media (max-width: 768px) {
    .mobile-card-table-wrap {
        overflow: visible !important;
    }
    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .mobile-card-table thead {
        display: none;
    }
    .mobile-card-table tbody tr {
        margin-bottom: 14px;
        border: 1px solid #eef0f5;
        border-radius: 12px;
        padding: 4px 14px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    .mobile-card-table tbody td {
        padding: 10px 0;
        border-bottom: 1px dashed #f0f2f5;
        text-align: left;
        white-space: normal;
        word-break: break-word;
    }
    .mobile-card-table tbody td.ps-4,
    .mobile-card-table tbody td.pe-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .mobile-card-table tbody td:last-child {
        border-bottom: none;
    }
    .mobile-card-table tbody td::before {
        content: attr(data-label);
        display: inline-block;
        color: rgba(0, 0, 0, 0.45);
        font-size: 13px;
        font-weight: 500;
        margin-right: 10px;
        min-width: 76px;
        vertical-align: top;
    }
    .mobile-card-table tbody td:not([data-label])::before,
    .mobile-card-table tbody td[data-label=""]::before {
        content: none;
        display: none;
    }
    .mobile-card-table tbody td .btn-group,
    .mobile-card-table tbody td .ip-actions {
        width: 100%;
    }
}
