/* ================================================
   后台管理系统样式
   ================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #eef0fd;
    --success: #2ec4b6;
    --warning: #ff9f1c;
    --danger: #e63946;
    --info: #4cc9f0;
    --sidebar-bg: #1e2a3a;
    --sidebar-hover: #29394f;
    --sidebar-active: #4361ee;
    --text-primary: #1e2a3a;
    --text-secondary: #6b7a99;
    --text-light: #a0aec0;
    --border: #e8ecf4;
    --bg-page: #f0f2f8;
    --bg-card: #ffffff;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 2px 12px rgba(67,97,238,.08);
    --shadow-md: 0 4px 20px rgba(67,97,238,.13);
    --transition: .22s ease;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ================================================
   整体布局
   ================================================ */
.admin-body {
    overflow: hidden;
    height: 100%;
}

.admin-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ================================================
   侧边栏
   ================================================ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: width var(--transition), min-width var(--transition);
    z-index: 100;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.nav-group {
    margin-bottom: 8px;
}

.nav-group-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.3);
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 10px 12px 6px;
    display: block;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.65);
    font-size: 14px;
    font-weight: 450;
    transition: all var(--transition);
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 2px;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(67,97,238,.4);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.5);
    font-size: 14px;
    transition: all var(--transition);
    cursor: pointer;
}

.logout-btn:hover {
    background: rgba(230,57,70,.15);
    color: #ff6b6b;
}

/* ================================================
   主内容区
   ================================================ */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ================================================
   顶部栏
   ================================================ */
.top-header {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    flex-shrink: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.menu-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.top-header h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--primary-light);
    cursor: pointer;
}

.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.admin-name {
    color: var(--primary);
    font-weight: 500;
    font-size: 13px;
}

/* ================================================
   内容区
   ================================================ */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.content-body::-webkit-scrollbar { width: 6px; }
.content-body::-webkit-scrollbar-track { background: transparent; }
.content-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ================================================
   页面头部
   ================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.page-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ================================================
   统计卡片
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: .06;
    transform: translate(20px, -20px);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon-blue   { background: linear-gradient(135deg,#4361ee,#3a56d4); }
.stat-icon-green  { background: linear-gradient(135deg,#2ec4b6,#20a99d); }
.stat-icon-purple { background: linear-gradient(135deg,#7b5ea7,#6a4d96); }
.stat-icon-orange { background: linear-gradient(135deg,#ff9f1c,#e88c0a); }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ================================================
   面板
   ================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-body {
    padding: 0;
}

/* ================================================
   表格
   ================================================ */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: #f8f9fc;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.table td {
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover td {
    background: #fafbff;
}

.table .text-center {
    text-align: center;
    color: var(--text-light);
    padding: 32px 0;
}

/* ================================================
   状态徽章
   ================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-success { background: #edfaf8; color: #1a9e96; }
.status-error   { background: #fef1f2; color: #c9313d; }
.status-warning { background: #fff8ed; color: #c87d00; }
.status-info    { background: #edf6fe; color: #1478c5; }

/* ================================================
   按钮
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(67,97,238,.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(67,97,238,.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: #f0f2f8;
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background: #e4e7f4;
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #cf2f3b;
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #25a99d;
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: none;
    transition: color var(--transition);
}
.btn-text:hover { color: var(--primary-dark); text-decoration: underline; }
.btn-text.text-danger { color: var(--danger); }
.btn-text.text-danger:hover { color: #c9313d; }

.btn-disabled {
    background: #e4e7f0;
    color: var(--text-light);
    cursor: not-allowed;
    pointer-events: none;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ================================================
   搜索表单
   ================================================ */
.search-form {
    background: var(--bg-card);
    padding: 18px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.search-form form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ================================================
   表单通用
   ================================================ */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.search-form .form-row input,
.search-form .form-row select {
    min-width: 180px;
}

.form-help {
    font-size: 12px;
    color: var(--text-light);
}

.required { color: var(--danger); }

/* ================================================
   分页
   ================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: #fff;
    transition: all var(--transition);
}

.pagination a:hover:not(.disabled):not(.active) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination a.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    background: #f8f9fc;
}

.pagination-info {
    margin-left: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ================================================
   表单容器
   ================================================ */
.form-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 28px;
}

.form-section {
    margin-bottom: 28px;
}

.form-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.form-container .form-row {
    margin-bottom: 18px;
}

.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.form-container textarea { resize: vertical; min-height: 100px; }

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-info {
    background: var(--primary-light);
    border: 1px solid #d4dafc;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.form-info p {
    font-size: 13px;
    color: var(--primary);
}

/* ================================================
   详情页
   ================================================ */
.detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 22px;
}

.detail-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full {
    grid-column: span 2;
}

.detail-item label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.detail-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.8;
}

.text-muted { color: var(--text-secondary); }

/* ================================================
   配置页面
   ================================================ */
.config-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 28px;
}

.config-section {
    margin-bottom: 36px;
}

.config-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.config-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.config-item input,
.config-item textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.config-item input:focus,
.config-item textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.config-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* ================================================
   日志 / 进度条 / 时间线
   ================================================ */
.log-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.log-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 20px;
}

.log-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.log-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: #dc2626;
    font-family: "Consolas", monospace;
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.7;
}

.progress-container { margin: 16px 0; }

.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7b8ff7);
    border-radius: 5px;
    transition: width .4s ease;
}

.progress-info {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 3px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
    background: var(--primary-light);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
}

.timeline-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 热门关键词 */
.hot-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
}

.keyword-count {
    background: var(--primary);
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
    font-size: 11px;
}

/* ================================================
   警告框
   ================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fef1f2;
    border: 1px solid #fcc;
    color: #c9313d;
}

.alert-success {
    background: #edfaf8;
    border: 1px solid #b2e8e4;
    color: #1a9e96;
}

.alert-warning {
    background: #fff8ed;
    border: 1px solid #fde3a7;
    color: #c87d00;
}

/* ================================================
   登录页
   ================================================ */
.login-page {
    background: linear-gradient(135deg, #1e2a3a 0%, #2d3f57 50%, #1a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #7b8ff7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-box .form-group {
    margin-bottom: 18px;
}

.login-box .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.login-box .form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
    background: #fafbfc;
}

.login-box .form-group input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.login-box .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
    border-radius: var(--radius-sm);
    justify-content: center;
}

/* ================================================
   图标
   ================================================ */
.icon { display: inline-flex; align-items: center; justify-content: center; }

/* SVG 图标替换 emoji，使用 Unicode 符号保证统一渲染 */
.icon-dashboard::before { content: "◈"; font-style: normal; }
.icon-company::before   { content: "▣"; font-style: normal; }
.icon-collect::before   { content: "↓"; font-style: normal; }
.icon-search::before    { content: "⊙"; font-style: normal; }
.icon-user::before      { content: "◉"; font-style: normal; }
.icon-config::before    { content: "✦"; font-style: normal; }
.icon-logout::before    { content: "⤺"; font-style: normal; }
.icon-plus::before      { content: "+"; font-style: normal; }
.icon-building::before  { content: "▦"; font-style: normal; }
.icon-download::before  { content: "↓"; font-style: normal; }

/* ================================================
   VIP 徽章样式
   ================================================ */
.vip-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.vip-badge.badge-normal {
    background: #f3f4f6;
    color: #6b7280;
}

.vip-badge.badge-gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.vip-badge.badge-diamond {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
    border: 1px solid #7dd3fc;
}

.vip-badge.badge-enterprise {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    border: 1px solid #a78bfa;
}

/* ================================================
   任务管理样式
   ================================================ */
/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.category-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8f9fc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.category-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(67,97,238,.1);
}

.category-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.category-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.category-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 任务图标 */
.task-icon {
    font-size: 20px;
    margin-right: 4px;
}

/* Modal 大小 */
.modal-lg {
    max-width: 650px;
}

/* Form 相关 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.form-text {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
}

.modal-lg {
    max-width: 650px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition);
}

.close-btn:hover {
    background: #f5f5f5;
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-info { background: #edf6fe; color: #1478c5; }
.badge-warning { background: #fff8ed; color: #c87d00; }
.badge-success { background: #edfaf8; color: #1a9e96; }
.badge-cancel { background: #f8f9fc; color: var(--text-light); }

.status-success { background: #edfaf8; color: #1a9e96; }
.status-error { background: #fef1f2; color: #c9313d; }
.status-warning { background: #fff8ed; color: #c87d00; }
.status-cancel { background: #f8f9fc; color: var(--text-light); }

/* Empty state */
.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-light);
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

/* ================================================
   响应式
   ================================================ */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .config-list { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    :root { --sidebar-width: 200px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-width));
        top: 0; bottom: 0;
        z-index: 1000;
        box-shadow: 4px 0 20px rgba(0,0,0,.2);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 999;
    }

    .sidebar.active ~ .sidebar-overlay,
    .sidebar-overlay.active {
        display: block;
    }

    .stats-grid { grid-template-columns: 1fr; gap: 12px; }

    .detail-grid { grid-template-columns: 1fr; }
    .detail-item.full { grid-column: span 1; }

    .page-header { flex-direction: column; align-items: flex-start; }

    .search-form form { flex-direction: column; align-items: stretch; }
    .search-form .form-row input,
    .search-form .form-row select { min-width: 100%; }

    .content-body { padding: 16px; }
    .top-header { padding: 0 16px; }

    .config-list { grid-template-columns: 1fr; }
    
    .category-grid { grid-template-columns: 1fr; }
}
