/**
 * 统一主题样式 - 管理后台 & 进件分析系统
 * 创建时间: 2026-05-28
 */

:root {
    /* 主色系 - 银行蓝 */
    --primary: #003B70;
    --primary-light: #1A5FC4;
    --primary-dark: #001F3F;
    --primary-bg: rgba(0, 59, 112, 0.08);
    
    /* 辅助色 - 信托绿 */
    --secondary: #006B3C;
    --secondary-light: #00A65A;
    --secondary-dark: #004D2A;
    --secondary-bg: rgba(0, 107, 60, 0.08);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #003B70 0%, #0056A4 100%);
    --gradient-secondary: linear-gradient(135deg, #006B3C 0%, #00A65A 100%);
    --gradient-sidebar: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    
    /* 功能色 */
    --success: #00A65A;
    --warning: #F5A623;
    --error: #E53935;
    --info: #1890FF;
    
    /* 中性色 */
    --text-primary: #1A1A2E;
    --text-secondary: #5A6072;
    --text-light: #8C9AAD;
    --text-disabled: #C0C4CC;
    
    /* 边框 */
    --border: #E8EDF2;
    --border-light: #F0F4F8;
    
    /* 背景 */
    --bg-page: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-hover: #F8FAFC;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 30, 80, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 30, 80, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 30, 80, 0.16);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== 卡片组件 ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* ==================== 按钮组件 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-bg);
}

/* ==================== 表格组件 ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.table tr:hover {
    background: var(--bg-hover);
}

/* ==================== 标签组件 ==================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag-success {
    background: rgba(0, 166, 90, 0.1);
    color: var(--success);
}

.tag-warning {
    background: rgba(245, 166, 35, 0.1);
    color: var(--warning);
}

.tag-error {
    background: rgba(229, 57, 53, 0.1);
    color: var(--error);
}

.tag-info {
    background: rgba(24, 144, 255, 0.1);
    color: var(--info);
}

/* ==================== 评级徽章 ==================== */
.rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 16px;
}

.rating-A { background: linear-gradient(135deg, #00A65A, #00C77B); color: white; }
.rating-B { background: linear-gradient(135deg, #003B70, #0056A4); color: white; }
.rating-C { background: linear-gradient(135deg, #F5A623, #FFB84D); color: white; }
.rating-D { background: linear-gradient(135deg, #E53935, #FF5252); color: white; }

/* ==================== 侧边栏 ==================== */
.sidebar {
    background: var(--gradient-sidebar);
    color: white;
}

.sidebar-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--secondary-light);
}

/* ==================== 头部 ==================== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: var(--shadow-sm);
}

/* ==================== 统计卡片 ==================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== 输入框 ==================== */
.input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* ==================== 下拉选择 ==================== */
.select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .stat-card .value {
        font-size: 24px;
    }
}
