/* 财务票据审核系统 - 主样式文件 */

:root {
    /* 主色调 */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    
    /* 中性色调 */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-light: #e9ecef;
    --gray-medium: #6c757d;
    --gray-dark: #495057;
    
    /* 阴影和边框 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --border-color: #dee2e6;
    
    /* 字体 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-xxl: 1.5rem;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
    color: white;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.logo h1 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar i {
    font-size: 2rem;
    color: var(--light-color);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex: 1;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.nav-menu {
    padding: 1.5rem 0;
    flex: 1;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--gray-dark);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-menu a:hover {
    background-color: var(--gray-light);
    color: var(--primary-color);
}

.nav-menu a.active {
    background-color: var(--primary-color);
    color: white;
    border-left: 4px solid var(--accent-color);
}

.nav-menu i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.badge {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
}

.system-status {
    padding: 1.5rem;
    background-color: var(--light-color);
    border-top: 1px solid var(--border-color);
}

.system-status h3 {
    font-size: var(--font-size-sm);
    color: var(--gray-medium);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: var(--font-size-sm);
}

.status-value {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.status-value.warning {
    color: var(--warning-color);
}

.status-value.success {
    color: var(--success-color);
}

/* 主内容区 */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: var(--gray-dark);
    transform: translateY(-1px);
}

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

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

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

/* 状态徽章 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-size: var(--font-size-sm);
    color: var(--gray-medium);
    font-weight: 500;
}

.info-value {
    font-size: var(--font-size-base);
    color: var(--dark-color);
    font-weight: 500;
}

.info-value.amount {
    font-size: var(--font-size-lg);
    color: var(--secondary-color);
    font-weight: 600;
}

/* 表格样式 */
.amount-table {
    width: 100%;
    border-collapse: collapse;
}

.amount-table th,
.amount-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.amount-table th {
    background-color: var(--light-color);
    color: var(--gray-dark);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.amount-table tbody tr:hover {
    background-color: var(--light-color);
}

.amount-table tfoot {
    background-color: var(--light-color);
}

.total-amount {
    color: var(--secondary-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* 规则检查列表 */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    border-left: 4px solid transparent;
}

.rule-item i {
    font-size: 1.25rem;
}

.rule-passed {
    border-left-color: var(--success-color);
}

.rule-passed i {
    color: var(--success-color);
}

.rule-warning {
    border-left-color: var(--warning-color);
}

.rule-warning i {
    color: var(--warning-color);
}

.rule-failed {
    border-left-color: var(--danger-color);
}

.rule-failed i {
    color: var(--danger-color);
}

.rule-content {
    flex: 1;
}

.rule-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.rule-desc {
    font-size: var(--font-size-sm);
    color: var(--gray-medium);
}

.rules-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.summary-item span:first-child {
    font-size: var(--font-size-sm);
    color: var(--gray-medium);
}

.summary-value {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.summary-value.success {
    color: var(--success-color);
}

.summary-value.warning {
    color: var(--warning-color);
}

.summary-value.danger {
    color: var(--danger-color);
}

/* 附件样式 */
.attachments {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.attachment-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.attachment-meta {
    font-size: 0.75rem;
    color: var(--gray-medium);
}

.attachment-action {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.attachment-action:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.attachment-upload {
    margin-top: 1rem;
}

/* 评论样式 */
.comments-history {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment-item {
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--secondary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    color: var(--gray-medium);
}

.comment-content {
    color: var(--dark-color);
    line-height: 1.5;
}

.comment-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-input textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    resize: vertical;
    min-height: 80px;
}

.comment-input textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 图表容器 */
.chart-container {
    height: 300px;
    position: relative;
}

/* 网格系统 */
.row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.col-6 {
    flex: 1;
}

/* 页脚 */
.footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--gray-medium);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.divider {
    opacity: 0.5;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.success {
    background-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-medium);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.result-icon i {
    color: var(--success-color);
}

.modal-body h4 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-body p {
    color: var(--gray-medium);
    margin-bottom: 2rem;
}

.result-details {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: left;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: var(--font-size-sm);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item span:first-child {
    color: var(--gray-medium);
    font-weight: 500;
}

.result-item span:last-child {
    color: var(--dark-color);
    font-weight: 600;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .row {
        flex-direction: column;
    }
    
    .col-6 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu {
        padding: 1rem 0;
    }
    
    .system-status {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* 打印样式 */
@media print {
    .header,
    .sidebar,
    .action-buttons,
    .footer,
    .modal {
        display: none;
    }
    
    .content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .amount-table {
        border: 1px solid #000;
    }
}

/* ==================== 新增样式：增强功能 ==================== */

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.stat-icon.primary {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.stat-icon.secondary {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--gray-medium);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-medium);
}

/* 工作流时间线 */
.workflow-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.workflow-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--gray-medium);
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.timeline-step.completed .step-icon {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.timeline-step.active .step-icon {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    animation: pulse 2s infinite;
}

.timeline-step.pending .step-icon {
    background-color: var(--light-color);
    border-color: var(--border-color);
    color: var(--gray-medium);
}

.step-content {
    text-align: center;
}

.step-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.step-time {
    font-size: 0.75rem;
    color: var(--gray-medium);
}

/* 搜索筛选面板 */
.search-panel {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-dark);
}

.date-range,
.amount-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range input,
.amount-range input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
}

.date-separator,
.range-separator {
    color: var(--gray-medium);
    font-size: 0.875rem;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox,
.radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.checkbox input,
.radio input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 搜索结果表格 */
.search-results {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.results-count {
    font-weight: 600;
    color: var(--dark-color);
}

.results-summary {
    font-size: 0.875rem;
    color: var(--gray-medium);
}

.results-actions select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--gray-dark);
    background-color: white;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.results-table th,
.results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: var(--light-color);
    color: var(--gray-dark);
    font-weight: 600;
    font-size: 0.875rem;
}

.results-table tbody tr:hover {
    background-color: var(--light-color);
}

.results-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--gray-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--light-color);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

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

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--gray-medium);
    padding: 0 0.5rem;
}

/* 通知中心样式 */
.notifications-panel {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 400px;
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: none;
}

.notifications-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--light-color);
}

.notification-item.unread {
    background-color: rgba(52, 152, 219, 0.05);
}

.notification-icon {
    font-size: 1.25rem;
    margin-top: 2px;
}

.notification-icon.success {
    color: var(--success-color);
}

.notification-icon.warning {
    color: var(--warning-color);
}

.notification-icon.info {
    color: var(--secondary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-color);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray-medium);
    font-weight: normal;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--gray-medium);
    line-height: 1.4;
}

.notification-action {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.notification-action:hover {
    color: var(--danger-color);
}

.notifications-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.view-all-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .workflow-timeline::before {
        display: none;
    }
    
    .timeline-step {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    
    .step-icon {
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .step-content {
        text-align: left;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .notifications-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: none;
        border-radius: 0;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-color) transparent transparent transparent;
}

/* ==================== 新增样式：风险管理模块 ==================== */

/* 风险级别徽章 */
.risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.risk-critical {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.risk-high {
    background-color: #fff3e0;
    color: #ff9800;
    border: 1px solid #ffe0b2;
}

.risk-medium {
    background-color: #fff8e1;
    color: #ffb300;
    border: 1px solid #ffecb3;
}

.risk-low {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

/* 风险统计面板 */
.risk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.risk-stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid transparent;
}

.risk-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.risk-stat-card.critical {
    border-top-color: #d32f2f;
}

.risk-stat-card.high {
    border-top-color: #ff9800;
}

.risk-stat-card.medium {
    border-top-color: #ffb300;
}

.risk-stat-card.low {
    border-top-color: #388e3c;
}

.risk-stat-count {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1;
}

.risk-stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.risk-stat-desc {
    font-size: 12px;
    color: #999;
}

/* 风险筛选器 */
.risk-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.risk-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.risk-filter-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.risk-filter-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

/* 催款高亮 */
.collection-needed {
    position: relative;
}

.collection-needed::before {
    content: "需催款";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4081;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(255, 64, 129, 0.2);
}

/* 借款表格 */
.loan-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.loan-table th {
    background: #f5f5f5;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
    white-space: nowrap;
}

.loan-table td {
    padding: 16px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.loan-table tr:hover {
    background: #f9f9f9;
}

.loan-table tr.collection-needed {
    background: #fff8e1;
}

.loan-table tr.collection-needed:hover {
    background: #fff3e0;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.action-btn.view {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.view:hover {
    background: #bbdefb;
}

.action-btn.collect {
    background: #ffebee;
    color: #d32f2f;
}

.action-btn.collect:hover {
    background: #ffcdd2;
}

.action-btn.remind {
    background: #fff3e0;
    color: #ff9800;
}

.action-btn.remind:hover {
    background: #ffe0b2;
}

/* 逾期状态 */
.overdue-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

/* 催款记录 */
.collection-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.collection-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1976d2;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.collection-loan {
    font-weight: 600;
    color: #333;
}

.collection-applicant {
    color: #555;
}

.collection-type {
    padding: 2px 8px;
    background: #e9ecef;
    border-radius: 10px;
    font-size: 11px;
}

.collection-time {
    color: #999;
}

.collection-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    padding-left: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background-color: white;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-medium);
    font-size: 1rem;
}

/* 表单控件 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:read-only {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 36px;
}

/* 图表图例 */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-label {
    color: var(--gray-dark);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .risk-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .loan-table {
        display: block;
        overflow-x: auto;
    }
    
    .risk-filters {
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }
    
    .search-box {
        width: 100%;
        margin-top: 10px;
    }
    
    .collection-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .collection-loan,
    .collection-applicant,
    .collection-type,
    .collection-time {
        font-size: 11px;
    }
    
    .action-buttons {
        justify-content: flex-start;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .risk-stats {
        grid-template-columns: 1fr;
    }
    
    .risk-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .risk-filter-btn {
        justify-content: center;
    }
}
/* OA报销单查询面板样式 */
#oaQueryPanel {
    margin-bottom: 20px;
    border: 2px solid var(--secondary-color);
    background: linear-gradient(to bottom, #f8f9fa, #fff);
}

#oaQueryPanel .card-header {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

#oaQueryPanel .card-header h3 {
    color: white;
    margin: 0;
}

.oa-query-form {
    padding: 0;
}

.query-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: var(--gray-light);
    color: var(--gray-dark);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--gray-medium);
    color: white;
}

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

.tab-content {
    padding: 15px 0;
}

.query-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.query-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.query-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-dark);
}

.query-group input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    transition: all 0.3s;
}

.query-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 查询结果表格 */
#queryResults {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.results-header h4 {
    margin: 0;
    color: var(--primary-color);
}

#resultsCount {
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.results-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table thead {
    position: sticky;
    top: 0;
    background: var(--primary-color);
    color: white;
    z-index: 10;
}

.results-table th,
.results-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    font-weight: 600;
    white-space: nowrap;
}

.results-table tbody tr:hover {
    background: var(--light-color);
    cursor: pointer;
}

.results-table tbody tr.selected {
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--secondary-color);
}

.results-table .amount {
    color: var(--danger-color);
    font-weight: 600;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s;
}

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

.action-btn.view:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .query-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .query-group input {
        min-width: 100%;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 5px;
    }
}
