* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 登录页面背景 */
body:has(#loginSection:not(.hidden)) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #f0f2f5;
}

.header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #1890ff;
    font-size: 24px;
}

.header span {
    margin-right: 20px;
    color: #666;
}

.login-section {
    background: #fff;
    padding: 50px 40px;
    border-radius: 16px;
    max-width: 420px;
    margin: 100px auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-section h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #667eea;
    font-size: 28px;
    font-weight: 600;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab {
    padding: 10px 20px;
    background: #f0f2f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab.active {
    background: #1890ff;
    color: #fff;
}

.tab:hover {
    opacity: 0.8;
}

.content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.btn-success {
    background: #52c41a;
}

.btn-success:hover {
    background: #73d13d;
}

.btn-danger {
    background: #ff4d4f;
}

.btn-danger:hover {
    background: #ff7875;
}

.btn-small {
    padding: 5px 15px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: all 0.3s;
}

tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar input, .search-bar select {
    flex: 1;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: linear-gradient(135deg, #ffd89b 0%, #fa8c16 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(250, 140, 22, 0.3);
}

.status-approved {
    background: linear-gradient(135deg, #a8e063 0%, #52c41a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.status-rejected {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4d4f 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    color: #333;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.info-row {
    display: flex;
    margin-bottom: 15px;
}

.info-label {
    width: 120px;
    color: #666;
    font-weight: 500;
}

.info-value {
    flex: 1;
    color: #333;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.error {
    color: #ff4d4f;
    padding: 10px;
    background: #fff1f0;
    border-radius: 4px;
    margin-bottom: 10px;
}

.success {
    color: #52c41a;
    padding: 10px;
    background: #f6ffed;
    border-radius: 4px;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

.image-preview {
    max-width: 100%;
    max-height: 350px;
    margin: 10px 0;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

/* 资金明细金额样式 */
.amount-positive, .amount-income {
    color: #52c41a;
    font-weight: 600;
}

.amount-negative, .amount-expense {
    color: #ff4d4f;
    font-weight: 600;
}

/* 加载状态样式 */
.loading {
    color: #1890ff;
    font-size: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 状态样式统一 */
.status-success {
    color: #52c41a;
    font-weight: 600;
}

.status-pending {
    color: #fa8c16;
    font-weight: 600;
}

.status-warning {
    color: #faad14;
    font-weight: 600;
}

.status-danger {
    color: #ff4d4f;
    font-weight: 600;
}

/* 表格中的错误状态 */
td .error {
    color: #ff4d4f;
    font-size: 12px;
    background: none;
    padding: 0;
    margin: 0;
}