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

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

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

.logo i {
    font-size: 28px;
    color: #4dabf7;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

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

.nav-menu li {
    margin: 5px 15px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-menu li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu li.active {
    background-color: rgba(77, 171, 247, 0.2);
    border-left: 4px solid #4dabf7;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: white;
}

.nav-menu i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-details p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 顶部导航 */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e5eb;
}

.header-left h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.header-left h2 i {
    color: #4dabf7;
}

.subtitle {
    color: #7f8c8d;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #5d6d7e;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #5d6d7e;
    font-weight: 500;
}

/* 查询面板 */
.query-panel {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h3 i {
    color: #4dabf7;
}

.btn-reset {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-reset:hover {
    background-color: #e9ecef;
    color: #495057;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label i {
    color: #4dabf7;
}

.filter-group input,
.filter-group select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

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

.amount-range input,
.date-range input {
    flex: 1;
}

.amount-range span,
.date-range span {
    color: #6c757d;
    font-size: 14px;
}

/* 快捷筛选按钮样式 */
.quick-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.quick-filter-label i {
    color: #4dabf7;
}

.btn-quick-filter {
    background-color: white;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-quick-filter:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.btn-quick-filter i {
    font-size: 14px;
}

.btn-quick-filter.active {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    border-color: #4dabf7;
    color: white;
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.3);
}

.btn-quick-filter.active:hover {
    background: linear-gradient(135deg, #339af0 0%, #228be6 100%);
    border-color: #339af0;
}

.btn-search {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 247, 0.3);
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.card-icon.total {
    background-color: rgba(77, 171, 247, 0.1);
    color: #4dabf7;
}

.card-icon.approved {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.card-icon.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.card-icon.amount {
    background-color: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.card-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.card-content p {
    font-size: 14px;
    color: #7f8c8d;
}

/* 数据表格区域 */
.data-table-section {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.table-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.record-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h3 i {
    color: #4dabf7;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-export,
.btn-refresh {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-export {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.btn-export:hover {
    background-color: #e9ecef;
    color: #495057;
}

.btn-refresh {
    background-color: #4dabf7;
    border: 1px solid #4dabf7;
    color: white;
}

.btn-refresh:hover {
    background-color: #339af0;
    border-color: #339af0;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

#invoice-table {
    width: 100%;
    border-collapse: collapse;
}

#invoice-table thead {
    background-color: #f8f9fa;
}

#invoice-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

#invoice-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

#invoice-table tbody tr {
    transition: background-color 0.2s;
}

#invoice-table tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-approved {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-rejected {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-canceled {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.btn-view {
    background-color: #4dabf7;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-view:hover {
    background-color: #339af0;
}

.btn-download-excel {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.btn-download-excel:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 65, 0.3);
}

.btn-download-excel i {
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-prev,
.btn-next {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s;
}

.btn-prev:hover:not(:disabled),
.btn-next:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.page-size {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size label {
    font-size: 14px;
    color: #495057;
}

.page-size select {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

/* 模态框样式 */
.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: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #4dabf7;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.btn-close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 25px;
}

/* 详情页面样式 */
.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: #4dabf7;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.detail-item span {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.detail-content {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    line-height: 1.8;
}

.expense-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.expense-table th,
.expense-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.expense-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.expense-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 金额信息样式 */
.amount-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.amount-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: white;
    border-radius: 6px;
    border-left: 4px solid #4dabf7;
    transition: all 0.2s;
}

.amount-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.amount-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #f5d642;
    margin-top: 5px;
}

.amount-item.subsidy {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-left-color: #ff6b6b;
    margin-top: 5px;
}

.amount-item label {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.amount-item.total label {
    color: white;
}

.amount-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.amount-value.total {
    color: white;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.amount-value.subsidy {
    color: white;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 审批流程相关样式 */
.btn-view-tasks {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    width: fit-content;
}

.btn-view-tasks:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.tasks-timeline {
    position: relative;
    padding: 20px 0 20px 20px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
    padding-left: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    z-index: 1;
}

.timeline-marker.task-approved {
    background-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.timeline-marker.task-rejected {
    background-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.timeline-marker.task-pending {
    background-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.timeline-marker.last {
    box-shadow: 0 0 0 3px rgba(233, 236, 239, 0.5);
}

.timeline-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.timeline-content:hover {
    background-color: #f1f3f5;
    transform: translateX(5px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.task-status.status-badge {
    font-size: 12px;
    padding: 4px 10px;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.timeline-time-start,
.timeline-time-end,
.timeline-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
}

.timeline-time-start i,
.timeline-time-end i,
.timeline-user i {
    font-size: 12px;
}

.timeline-time-start {
    color: #4dabf7;
    font-weight: 500;
}

.timeline-time-end {
    color: #28a745;
    font-weight: 500;
}

.timeline-comment {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.timeline-comment i {
    color: #4dabf7;
    margin-top: 2px;
}

.tasks-empty {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.tasks-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 10px;
}

.tasks-empty p {
    font-size: 14px;
}

.tasks-error {
    text-align: center;
    padding: 30px;
    color: #dc3545;
}

.tasks-error i {
    font-size: 48px;
    margin-bottom: 10px;
}

.tasks-error p {
    font-size: 14px;
    font-weight: 500;
}

/* 附件相关样式 */
.btn-view-attachments {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    width: fit-content;
}

.btn-view-attachments:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.attachments-list {
    margin-top: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

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

.attachment-item:hover {
    background-color: #f1f3f5;
    transform: translateX(5px);
}

.attachment-item i {
    color: #4dabf7;
    font-size: 18px;
}

.attachment-item a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.attachment-item a:hover {
    color: #4dabf7;
}

.attachment-empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.attachment-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 10px;
}

.attachment-empty p {
    font-size: 14px;
}

.attachment-error {
    text-align: center;
    padding: 30px;
    color: #dc3545;
}

.attachment-error i {
    font-size: 48px;
    margin-bottom: 10px;
}

.attachment-error p {
    font-size: 14px;
    font-weight: 500;
}

/* 表单数据样式 */
.form-data-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.form-data-content pre {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.form-data-content code {
    font-family: 'Courier New', monospace;
    color: #495057;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    
    .filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .nav-menu ul {
        display: flex;
        justify-content: space-around;
    }
    
    .nav-menu li {
        margin: 5px;
        flex: 1;
    }
    
    .user-info {
        display: none;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .page-size {
        align-self: flex-end;
    }
}

/* 预览模态框样式 */
.preview-modal {
    z-index: 1100;
}

.preview-content {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
}

.preview-body {
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
}

.preview-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

/* 图片预览样式 */
.preview-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    min-height: 400px;
}

.preview-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    transition: transform 0.2s;
}

.preview-image:hover {
    transform: scale(1.02);
}

/* PDF预览样式 */
.preview-pdf-container {
    width: 100%;
    height: 85vh;
    background-color: #f8f9fa;
}

.preview-pdf {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 预览按钮样式 */
.btn-preview-attachment {
    background-color: #4dabf7;
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.btn-preview-attachment:hover {
    background-color: #339af0;
    transform: scale(1.05);
}

.btn-preview-attachment i {
    font-size: 12px;
}

/* 下载按钮样式 */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #4dabf7;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-download:hover {
    background-color: #339af0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(77, 171, 247, 0.3);
}

/* 预览错误样式 */
.preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 400px;
    background-color: #f8f9fa;
}

.preview-error i {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
}

.preview-error p {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 文本样式 */
.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* 查看发票按钮样式 */
.btn-view-invoice {
    background-color: #6f42c1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.btn-view-invoice:hover {
    background-color: #5a32a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

.btn-view-invoice i {
    font-size: 14px;
}

/* 发票信息模态框样式 */
.invoice-modal {
    z-index: 1150;
}

.invoice-content {
    max-width: 900px;
    max-height: 90vh;
}

.invoice-body {
    max-height: 85vh;
    overflow-y: auto;
}

/* 发票摘要样式 */
.invoice-summary {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
}

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

.summary-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
}

.summary-value.amount-highlight {
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 发票列表样式 */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.invoice-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.invoice-item:hover {
    border-color: #4dabf7;
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.1);
    transform: translateY(-2px);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    color: white;
}

.invoice-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.invoice-header .btn-download {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    font-size: 13px;
}

.invoice-header .btn-download:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 20px;
}

.invoice-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background-color: white;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
    transition: all 0.2s;
}

.invoice-field:hover {
    border-left-color: #4dabf7;
    transform: translateX(3px);
}

.invoice-field.full-width {
    grid-column: 1 / -1;
}

.invoice-field label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
    margin: 0;
}

.invoice-field span {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    word-break: break-all;
}

.invoice-field .amount-highlight {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
}

/* 发票表格包装器 */
.invoice-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 发票详情表格 */
.invoice-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.invoice-detail-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.invoice-detail-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: white;
    border: none;
    white-space: nowrap;
    font-size: 13px;
}

.invoice-detail-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    vertical-align: middle;
}

.invoice-detail-table tbody tr {
    transition: background-color 0.2s;
}

.invoice-detail-table tbody tr:hover {
    background-color: #f8f9fa;
}

.invoice-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.invoice-detail-table .amount-highlight {
    font-weight: 700;
    color: #28a745;
    font-size: 14px;
}

.invoice-detail-table .status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* 发票空状态样式 */
.invoice-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.invoice-empty i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.invoice-empty p {
    font-size: 16px;
    font-weight: 500;
}

/* 响应式调整 - 发票信息 */
@media (max-width: 768px) {
    .invoice-content {
        max-width: 95vw;
        margin: 20px;
    }
    
    .invoice-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .invoice-grid {
        grid-template-columns: 1fr;
    }
    
    .invoice-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
