
        /* ===== 全局重置 ===== */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', 'Microsoft YaHei', -apple-system, sans-serif; background: #f0f2f5; min-height: 100vh; display: flex; flex-direction: column; }
        a { text-decoration: none; color: inherit; }
        
        /* ===== 滚动条 ===== */
        ::-webkit-scrollbar { width: 4px; height: 4px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
        
        /* ===== 顶栏 ===== */
        .topbar {
            background: #ffffff;
            padding: 0 28px;
            height: 64px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #e5e7eb;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }
        .topbar .brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 18px;
            font-weight: 700;
            color: #0f172a;
        }
        .topbar .brand .icon { font-size: 28px; }
        .topbar .brand .sub { font-size: 11px; color: #94a3b8; font-weight: 400; }
        .topbar .right {
            display: flex;
            align-items: center;
            gap: 14px;
            color: #64748b;
        }
        .topbar .right .badge-warning { background: #fef3c7; color: #d97706; padding: 3px 12px; border-radius: 12px; font-size: 11px; font-weight: 500; }
        .topbar .right .badge-danger { background: #fee2e2; color: #dc2626; padding: 3px 12px; border-radius: 12px; font-size: 11px; font-weight: 500; }
        .topbar .right .name { color: #0f172a; font-weight: 500; font-size: 14px; }
        .topbar .right .logout { color: #94a3b8; padding: 6px 16px; border-radius: 8px; transition: 0.3s; font-size: 13px; }
        .topbar .right .logout:hover { background: #f1f5f9; color: #ef4444; }
        
        /* ===== 侧边栏 - 现代化 ===== */
        .sidebar {
            width: 220px;
            background: #ffffff;
            border-right: 1px solid #e5e7eb;
            min-height: calc(100vh - 64px);
            padding: 16px 12px;
            position: sticky;
            top: 64px;
            height: calc(100vh - 64px);
            overflow-y: auto;
            flex-shrink: 0;
        }
        .sidebar .nav-label {
            font-size: 10px;
            text-transform: uppercase;
            color: #94a3b8;
            padding: 12px 12px 6px;
            letter-spacing: 0.6px;
            font-weight: 600;
        }
        .sidebar a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            color: #475569;
            border-radius: 10px;
            transition: all 0.2s;
            font-size: 14px;
            margin-bottom: 2px;
            font-weight: 500;
        }
        .sidebar a:hover {
            background: #f1f5f9;
            color: #0f172a;
        }
        .sidebar a.active {
            background: #eef2ff;
            color: #6366f1;
        }
        .sidebar a .icon { font-size: 18px; width: 24px; text-align: center; }
        .sidebar a .badge {
            margin-left: auto;
            background: #6366f1;
            color: #fff;
            font-size: 10px;
            padding: 1px 10px;
            border-radius: 12px;
            font-weight: 500;
        }
        .sidebar .divider {
            height: 1px;
            background: #e5e7eb;
            margin: 8px 12px;
        }
        
        /* ===== 主内容 ===== */
        .main-wrapper { display: flex; flex: 1; }
        .main-content {
            flex: 1;
            padding: 24px 32px;
            min-height: calc(100vh - 64px);
            max-width: calc(100vw - 220px);
        }
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            flex-wrap: wrap;
            gap: 12px;
        }
        .page-header h1 {
            font-size: 24px;
            font-weight: 700;
            color: #0f172a;
            letter-spacing: -0.5px;
        }
        .page-header .sub {
            font-size: 13px;
            color: #94a3b8;
            font-weight: 400;
        }
        .page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
        
        /* ===== 统计卡片 ===== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }
        .stat-card {
            background: #ffffff;
            padding: 18px 20px;
            border-radius: 12px;
            border: 1px solid #e5e7eb;
            transition: all 0.3s;
        }
        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.06);
        }
        .stat-card .num { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
        .stat-card .label { font-size: 13px; color: #64748b; margin-top: 2px; }
        .stat-card .sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
        .stat-card .icon { float: right; font-size: 28px; opacity: 0.2; }
        .num-green { color: #22c55e; }
        .num-red { color: #ef4444; }
        .num-blue { color: #3b82f6; }
        .num-orange { color: #f59e0b; }
        .num-purple { color: #6366f1; }
        
        /* ===== 卡片 ===== */
        .card {
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid #e5e7eb;
            overflow: hidden;
            margin-bottom: 20px;
            transition: box-shadow 0.2s;
        }
        .card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
        .card-header {
            padding: 14px 20px;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .card-header h3 { font-size: 15px; font-weight: 600; color: #0f172a; }
        .card-header a { color: #6366f1; font-size: 13px; font-weight: 500; }
        .card-header a:hover { text-decoration: underline; }
        .card-body { padding: 16px 20px; }
        .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        
        /* ===== 列表 ===== */
        .list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #f3f4f6;
        }
        .list-item:last-child { border-bottom: none; }
        .list-item .left { display: flex; align-items: center; gap: 12px; }
        .list-item .left .icon { font-size: 18px; }
        .list-item .left .name { font-weight: 500; font-size: 14px; }
        .list-item .left .desc { font-size: 12px; color: #94a3b8; }
        
        /* ===== 按钮 ===== */
        .btn {
            padding: 8px 18px;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .btn-primary { background: #6366f1; color: #fff; }
        .btn-primary:hover { background: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
        .btn-success { background: #22c55e; color: #fff; }
        .btn-success:hover { background: #16a34a; }
        .btn-danger { background: #ef4444; color: #fff; }
        .btn-danger:hover { background: #dc2626; }
        .btn-warning { background: #f59e0b; color: #fff; }
        .btn-warning:hover { background: #d97706; }
        .btn-outline { background: #f1f5f9; color: #475569; }
        .btn-outline:hover { background: #e5e7eb; }
        .btn-info { background: #0ea5e9; color: #fff; }
        .btn-info:hover { background: #0284c7; box-shadow: 0 4px 12px rgba(14,165,233,0.3); }
        .btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 6px; }
        
        /* ===== 表格 ===== */
        .table-wrap { overflow-x: auto; }
        .table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
        .table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f3f4f6; }
        .table-wrap th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
        .table-wrap tr:hover td { background: #fafafa; }
        .table-wrap .actions { display: flex; gap: 4px; flex-wrap: wrap; }
        
        /* ===== 徽章 ===== */
        .badge {
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 500;
            display: inline-block;
        }
        .badge-success { background: #dcfce7; color: #16a34a; }
        .badge-danger { background: #fee2e2; color: #dc2626; }
        .badge-warning { background: #fef3c7; color: #d97706; }
        .badge-info { background: #dbeafe; color: #2563eb; }
        .badge-gray { background: #f1f5f9; color: #64748b; }
        
        /* ===== 表单 ===== */
        .form-group { margin-bottom: 14px; }
        .form-group label { display: block; font-weight: 500; font-size: 13px; color: #374151; margin-bottom: 4px; }
        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 13px;
            transition: 0.3s;
            outline: none;
            background: #fff;
        }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
        }
        .form-group textarea { min-height: 60px; resize: vertical; }
        .form-row { display: flex; gap: 14px; flex-wrap: wrap; }
        .form-row .form-group { flex: 1; min-width: 150px; }
        .form-hint { font-size: 11px; color: #94a3b8; margin-top: 3px; }
        
        /* ===== 弹窗 ===== */
        .modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(15, 23, 42, 0.6);
            justify-content: center;
            align-items: center;
            z-index: 2000;
            backdrop-filter: blur(4px);
            animation: modalFade 0.2s ease;
        }
        .modal.active { display: flex; }
        @keyframes modalFade {
            from { opacity: 0; transform: scale(0.96); }
            to { opacity: 1; transform: scale(1); }
        }
        .modal-content {
            background: #fff;
            border-radius: 16px;
            padding: 28px;
            width: 580px;
            max-width: 95%;
            max-height: 90vh;
            overflow-y: auto;
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e5e7eb;
        }
        .modal-header h2 { font-size: 18px; font-weight: 700; color: #0f172a; }
        .modal-close {
            background: none;
            border: none;
            font-size: 22px;
            cursor: pointer;
            color: #94a3b8;
            transition: 0.2s;
        }
        .modal-close:hover { color: #0f172a; }
        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
            padding-top: 14px;
            border-top: 1px solid #e5e7eb;
        }
        
        /* ===== 进度条 ===== */
        .quota-bar { background: #f1f5f9; border-radius: 6px; height: 6px; overflow: hidden; margin: 6px 0; }
        .quota-bar .fill { height: 100%; border-radius: 6px; transition: width 0.8s ease; }
        
        /* ===== 消息 ===== */
        .msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
        .msg-success { background: #dcfce7; color: #16a34a; border-left: 4px solid #22c55e; }
        .msg-error { background: #fee2e2; color: #dc2626; border-left: 4px solid #ef4444; }
        .msg-info { background: #dbeafe; color: #2563eb; border-left: 4px solid #3b82f6; }
        
        /* ===== 响应式 ===== */
        @media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 992px) { .two-col { grid-template-columns: 1fr; } }
        @media (max-width: 768px) {
            .sidebar { display: none; }
            .stats-grid { grid-template-columns: 1fr; }
            .main-content { padding: 16px; max-width: 100vw; }
            .topbar { padding: 0 16px; }
            .topbar .right .name { display: none; }
            .modal-content { padding: 20px; width: 98%; }
            .form-row { flex-direction: column; }
            .form-row .form-group { min-width: auto; }
            .page-header h1 { font-size: 20px; }
        }
    
/* ==== console private ==== */

/* 到期时间卡片样式 */
.expire-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.expire-card .left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.expire-card .left .icon {
    font-size: 32px;
}
.expire-card .left .info .label {
    font-size: 12px;
    color: #94a3b8;
}
.expire-card .left .info .value {
    font-size: 18px;
    font-weight: 700;
}
.expire-card .right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.expire-card .right .days {
    font-size: 28px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 8px;
}
.expire-card .right .status-text {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 20px;
}
.status-healthy .status-text { background: #dcfce7; color: #16a34a; }
.status-warning .status-text { background: #fef3c7; color: #d97706; }
.status-danger .status-text { background: #ffedd5; color: #ea580c; }
.status-critical .status-text { background: #fee2e2; color: #dc2626; }
.status-expired .status-text { background: #fee2e2; color: #ef4444; }

.quota-bar .fill-healthy { background: #22c55e; }
.quota-bar .fill-warning { background: #f59e0b; }
.quota-bar .fill-danger { background: #f97316; }
.quota-bar .fill-critical { background: #dc2626; }

/* ===== 软件下载模块样式（新增） ===== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.download-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.2s;
}
.download-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
}
.download-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    color: #fff;
}
/* 各软件图标配色 */
.icon-movie    { background: linear-gradient(145deg, #f472b6, #ec4899); }
.icon-game     { background: linear-gradient(145deg, #818cf8, #6366f1); }
.icon-accel    { background: linear-gradient(145deg, #34d399, #10b981); }
.icon-tool     { background: linear-gradient(145deg, #fbbf24, #f59e0b); }
.icon-browser  { background: linear-gradient(145deg, #60a5fa, #3b82f6); }
.icon-guard    { background: linear-gradient(145deg, #a78bfa, #8b5cf6); }

.download-info {
    flex: 1;
    min-width: 0;
}
.download-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.download-meta {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, #4f46e5, #6366f1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.download-btn:hover {
    background: linear-gradient(145deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* ==== cafes private ==== */

.acc-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}
.acc-row .acc-name { flex: 0 0 110px; }
.acc-row .acc-path { flex: 1; }
.acc-row .acc-status { flex: 0 0 80px; }
.acc-row .acc-priority { flex: 0 0 60px; }
.acc-row select, .acc-row input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
}
.acc-section, .node-section {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}
.acc-section .acc-label, .node-section .node-label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: #0f172a;
}
.acc-section .acc-hint, .node-section .node-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 8px;
    font-weight: 400;
}
.node-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    background: #eef2ff;
    color: #6366f1;
    border: 1px solid #c7d2fe;
}
.node-tag-empty { color: #94a3b8; font-size: 11px; }

/* 续期下拉 */
.renew-wrap { display:inline-flex; align-items:center; }
.renew-select {
    padding: 4px 6px;
    border: 1px solid #22c55e;
    border-radius: 6px;
    font-size: 12px;
    color: #16a34a;
    background: #f0fdf4;
    cursor: pointer;
}
.renew-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(34,197,94,.25); }

/* ==== nodes private ==== */

.msg-info {
    background: #dbeafe;
    color: #2563eb;
    border-left: 4px solid #3b82f6;
}
.msg-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ==== logs private ==== */

.msg-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ==== 仿写补充：操作列按钮不换行 ==== */
.actions { white-space: nowrap; }
.actions .btn-sm { margin: 1px 2px; }
.renew-select { padding: 4px 6px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 12px; max-width: 80px; }

/* ==== 修复：login.css 的 body 居中污染后台。后台态强制覆盖回正常布局 ==== */
body:not(.login-mode) {
    display: block !important;
    justify-content: initial !important;
    align-items: initial !important;
    padding: 0 !important;
    background: #f0f2f5 !important;
}

/* ==== 账号层级：总账号 / 维护商 标识 ==== */
.topbar .right .badge-total {
    background: linear-gradient(135deg,#eef2ff,#ede9fe);
    color: #6d28d9;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #ddd6fe;
}
.role-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.role-admin { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.role-provider { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.topbar .brand .sub { font-size: 11px; color: #94a3b8; font-weight: 400; }
.page-header .sub { font-size: 13px; color: #94a3b8; font-weight: 400; margin-left: 8px; }
/* 维护商管理表格：状态列不换行 */
#provTableBody .badge { white-space: nowrap; }
/* 弹窗表单提示文字 */
.form-hint { font-size: 11px; color: #94a3b8; margin-top: 4px; }
