/* ========== 全局变量 ========== */
:root {
    --color-primary: #0C447C;
    --color-primary-light: #185FA5;
    --color-primary-dark: #042C53;
    --color-gold: #BA7517;
    --color-gold-light: #EF9F27;
    --color-gold-dark: #8B5A0E;
    --color-bg: #f0f4f8;
    --color-card: #ffffff;
    --color-text: #1a202c;
    --color-text-secondary: #64748b;
    --color-border: #e2e8f0;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --color-purple: #8b5cf6;
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --transition: all 0.25s ease;
}

/* ========== 登录页 ========== */
.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #042C53 0%, #0C447C 50%, #185FA5 100%);
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-overlay.active {
    display: flex;
}
.login-box {
    width: 420px;
    max-width: 90vw;
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px 36px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    position: relative;
}
.login-box::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: linear-gradient(135deg, var(--color-gold-light), transparent, var(--color-gold));
    border-radius: 23px;
    z-index: -1;
    opacity: 0.5;
}
.login-header {
    text-align: center;
    margin-bottom: 36px;
}
.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-gold-light);
    font-size: 22px;
    font-weight: 800;
    border-radius: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(12,68,124,0.3);
}
.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 0 0 6px;
}
.login-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.login-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
.login-field input {
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}
.login-field input:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(24,95,165,0.12);
}
.login-toggle-pwd {
    position: absolute;
    right: 12px; bottom: 10px;
    background: none; border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.login-toggle-pwd:hover { opacity: 1; }
.login-error {
    color: var(--color-danger);
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}
.login-btn {
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(12,68,124,0.3);
}
.login-btn:active {
    transform: translateY(0);
}
.login-hint {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin: 8px 0 0;
}
.login-footer {
    margin-top: 32px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}
.login-footer p {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin: 2px 0;
}
    --color-text: #1a2332;
    --color-text-secondary: #5a6878;
    --color-text-light: #8a98a8;
    --color-border: #e2e8f0;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --color-purple: #8b5cf6;
    --transition: all 0.25s ease;
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* ========== 布局 ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-title {
    display: flex;
    flex-direction: column;
}
.sidebar-company { font-size: 16px; font-weight: 700; }
.sidebar-subtitle { font-size: 12px; color: rgba(255,255,255,0.6); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-group { margin-bottom: 24px; }
.nav-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    padding: 0 12px 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.75);
    transition: all 0.2s;
    margin-bottom: 2px;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.nav-item.active {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(186,117,23,0.4);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-label { flex: 1; font-size: 14px; }
.nav-badge {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.nav-item.active .nav-badge {
    background: rgba(255,255,255,0.25);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.sidebar-version {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
}

/* ========== 主内容 ========== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 顶部栏 ========== */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.menu-toggle {
    font-size: 20px;
    display: none;
    padding: 4px 8px;
}
.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.topbar-search {
    position: relative;
    width: 280px;
}
.topbar-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    transition: all 0.2s;
}
.topbar-search input:focus {
    outline: none;
    border-color: var(--color-primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24,95,165,0.1);
}
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.icon-btn {
    position: relative;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--color-bg); }
.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-danger);
    color: #fff;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.user-detail {
    display: flex;
    flex-direction: column;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--color-text-light); }

/* ========== 内容容器 ========== */
.content-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ========== 通用组件 ========== */
.card {
    background: var(--color-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
}
.card-body { padding: 20px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1200px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .topbar-search { display: none; }
}

/* 统计卡片 */
.stat-card {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
}
.stat-card.gold::before { background: var(--color-gold); }
.stat-card.success::before { background: var(--color-success); }
.stat-card.warning::before { background: var(--color-warning); }
.stat-card.danger::before { background: var(--color-danger); }

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
}
.stat-change {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change.up { color: var(--color-success); }
.stat-change.down { color: var(--color-danger); }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover { background: var(--color-primary-light); }
.btn-gold {
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    color: #fff;
}
.btn-gold:hover { box-shadow: 0 4px 12px rgba(186,117,23,0.3); }
.btn-outline {
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }

/* 表格 */
.table-wrap {
    overflow-x: auto;
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}
.data-table tr:hover td { background: rgba(24,95,165,0.03); }
.data-table .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}
.rank-1 { background: #fef3c7; color: #92400e; }
.rank-2 { background: #e0e7ff; color: #3730a3; }
.rank-3 { background: #fce7f3; color: #9d174d; }
.rank-other { background: var(--color-bg); color: var(--color-text-light); }

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #d1fae5; color: #065f46; }
.tag-gold { background: #fef3c7; color: #92400e; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-gray { background: #f3f4f6; color: #6b7280; }
.tag-purple { background: #ede9fe; color: #5b21b6; }

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    font-size: 24px;
    color: var(--color-text-light);
    cursor: pointer;
}
.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text-secondary);
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(24,95,165,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* 页面标题区 */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header-info h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.page-header-info p {
    font-size: 13px;
    color: var(--color-text-secondary);
}
.page-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 流程步骤 */
.steps {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}
.step {
    flex: 1;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    position: relative;
    text-align: center;
}
.step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--color-text-light);
    z-index: 1;
}
.step.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
}
.step.done {
    background: linear-gradient(135deg, var(--color-success), #16a34a);
    color: #fff;
}
.step-num {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}
.step-label { font-size: 12px; }

/* 图表容器 */
.chart-container {
    position: relative;
    width: 100%;
}
.chart-container canvas {
    max-height: 320px;
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}
.list-item:hover { background: var(--color-bg); }
.list-item:last-child { border-bottom: none; }
.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item-desc {
    font-size: 12px;
    color: var(--color-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item-meta {
    font-size: 12px;
    color: var(--color-text-light);
    text-align: right;
    flex-shrink: 0;
}

/* 选项卡 */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 20px;
}
.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab:hover { color: var(--color-primary); }
.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-danger { background: #fee2e2; color: #991b1b; }

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}
.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.info { border-left: 4px solid var(--color-info); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 文章类型卡片 */
.article-type-card {
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.article-type-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.article-type-card.selected {
    border-color: var(--color-gold);
    background: #fffbeb;
}
.article-type-icon { font-size: 32px; margin-bottom: 8px; }
.article-type-name { font-size: 13px; font-weight: 600; }
.article-type-desc { font-size: 11px; color: var(--color-text-light); margin-top: 4px; }

/* 雷达图容器 */
.radar-container {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.radar-chart { flex: 0 0 320px; }
.radar-legend { flex: 1; min-width: 200px; }

/* 分数环 */
.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.score-ring-value { font-size: 32px; font-weight: 800; }
.score-ring-label { font-size: 11px; color: var(--color-text-light); }

/* 内容编辑器 */
.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    flex-wrap: wrap;
}
.editor-toolbar button {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: background 0.2s;
}
.editor-toolbar button:hover { background: var(--color-bg); }
.editor-area {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    resize: vertical;
    font-size: 14px;
    line-height: 1.8;
}

/* 渠道选择 */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.channel-card {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.channel-card:hover { border-color: var(--color-primary-light); }
.channel-card.selected {
    border-color: var(--color-success);
    background: #f0fdf4;
}
.channel-icon { font-size: 24px; margin-bottom: 4px; }
.channel-name { font-size: 12px; font-weight: 600; }
.channel-status {
    font-size: 10px;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}
.timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid #fff;
}
.timeline-item.success::before { background: var(--color-success); }
.timeline-item.warning::before { background: var(--color-warning); }
.timeline-time { font-size: 12px; color: var(--color-text-light); }
.timeline-title { font-size: 14px; font-weight: 600; margin: 4px 0; }
.timeline-desc { font-size: 12px; color: var(--color-text-secondary); }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-text-light);
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 热力图 */
.heatmap-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    font-size: 11px;
}
.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 10px;
}
.heatmap-label {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--color-text-secondary);
}

/* ========== 后台管理新增样式 ========== */

/* 页面头部 */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-title-main {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}
.page-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    max-width: 700px;
}

/* Tabs */
.tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    background: transparent;
}
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 单选卡片 */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 200px;
}
.radio-card:hover { border-color: var(--color-primary-light); }
.radio-card.selected {
    border-color: var(--color-primary);
    background: #eff6ff;
}
.radio-card input { display: none; }
.radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.radio-card.selected .radio-mark {
    border-color: var(--color-primary);
    background: var(--color-primary);
}
.radio-card.selected .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}
.radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.radio-content strong { font-size: 15px; }

/* 配置网格 */
.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 24px 0;
}
@media (max-width: 992px) {
    .config-grid { grid-template-columns: 1fr; }
}
.config-block {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    background: #fafbfc;
}
.config-block-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.config-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.config-dot.deepseek { background: #4f46e5; }
.config-dot.doubao { background: #f59e0b; }

/* 表单增强 */
.form-section { margin-bottom: 24px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}
.form-group { margin-bottom: 16px; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: all 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(24,95,165,0.1);
}
.form-hint {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 6px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.required { color: var(--color-danger); }

.input-with-action {
    display: flex;
    gap: 8px;
}
.input-with-action input { flex: 1; }
.icon-btn-sm {
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: all 0.2s;
}
.icon-btn-sm:hover { background: var(--color-bg); }

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-input,
.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    min-width: 160px;
}
.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--color-primary-light);
}

/* 表格增强 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table tr:hover { background: #f8fafc; }
.table-responsive { overflow-x: auto; }

/* 标签 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
.badge-default { background: #f1f5f9; color: #475569; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.tag {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-purple { background: #f3e8ff; color: #7e22ce; }

/* 链接按钮 */
.link-btn {
    padding: 4px 8px;
    color: var(--color-primary-light);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
    background: transparent;
}
.link-btn:hover { color: var(--color-primary); text-decoration: underline; }
.link-btn.danger { color: var(--color-danger); }

/* 代码文本 */
.code-text {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
}

/* 分数条 */
.score-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
}
.score-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.score-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
    border-radius: 3px;
}
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

/* 空状态 */
.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--color-text-secondary);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-dialog {
    background: #fff;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-dialog.modal-md { max-width: 480px; }
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
    font-size: 24px;
    color: var(--color-text-light);
    transition: color 0.2s;
}
.modal-close:hover { color: var(--color-text); }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 统计网格 */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1200px) {
    .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .stats-grid-4 { grid-template-columns: 1fr; }
}
.stat-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}
.stat-trend {
    font-size: 12px;
    margin-top: 4px;
}
.stat-trend.up { color: var(--color-success); }
.stat-trend.down { color: var(--color-danger); }
.stat-trend.warning { color: var(--color-warning); }

/* 工具类 */
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }

/* 卡片副标题 */
.card-subtitle {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* ============ Toggle Switch ============ */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}
.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background-color: var(--color-primary, #0C447C);
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ============ 统计卡片可点击 ============ */
.stat-card[style*="cursor:pointer"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============ 渠道卡片按钮 ============ */
.channel-card .btn-sm {
    font-size: 12px;
    padding: 4px 10px;
}

/* ============ 文章选择项 ============ */
.article-pick-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.article-pick-item:hover {
    border-color: var(--color-gold, #BA7517);
    background: #fff8e1;
    transform: translateX(4px);
}
.article-pick-item.selected {
    border-color: var(--color-gold, #BA7517);
    background: #fff8e1;
    box-shadow: 0 2px 8px rgba(186, 117, 23, 0.15);
}

/* ============ 发布引导弹窗按钮 ============ */
.btn-success {
    background: #4caf50 !important;
    color: #fff !important;
    border: none !important;
}
.btn-success:hover {
    background: #43a047 !important;
}
