/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录容器 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #1abc9c;
    color: #fff;
}

.btn-info:hover {
    background-color: #16a085;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background-color: #d68910;
}

/* 用户状态样式 */
.status-approved {
    color: #27ae60;
    font-weight: 600;
}

.status-pending {
    color: #f39c12;
    font-weight: 600;
}

.status-rejected {
    color: #e74c3c;
    font-weight: 600;
}

/* 待审核用户列表样式 */
.pending-users {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.pending-users h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #856404;
}

.pending-users table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.pending-users th,
.pending-users td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pending-users th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.pending-users tr:hover {
    background-color: #f8f9fa;
}

.mb-3 {
    margin-bottom: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 导航样式 */
.nav {
    margin-bottom: 30px;
}

.nav ul {
    display: flex;
    list-style: none;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav li {
    flex: 1;
}

.nav a {
    display: block;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav a:hover {
    background-color: #f8f9fa;
}

.nav a.active {
    background-color: #3498db;
    color: #fff;
}

/* 主内容样式 */
.main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.page-header h2 {
    margin: 0;
    color: #2c3e50;
}

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

/* 仪表板样式 */
.dashboard-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 列表头部样式 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.list-header h3 {
    margin: 0;
    color: #34495e;
}

/* 凭证列表样式 */
.voucher-list {
    margin-bottom: 30px;
}

.voucher-list table {
    width: 100%;
    border-collapse: collapse;
}

.voucher-list th,
.voucher-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.voucher-list th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.voucher-list tr:hover {
    background-color: #f8f9fa;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 操作按钮 */
.action-buttons {
    margin-top: 20px;
}

/* 凭证表单样式 */
.voucher-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.voucher-items {
    margin: 30px 0;
}

.voucher-items h3 {
    margin-bottom: 15px;
    color: #34495e;
}

#items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

#items-table th,
#items-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#items-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.amount-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.totals {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.balance-status {
    display: flex;
    align-items: center;
}

#balance-status {
    font-weight: 600;
    margin-left: 10px;
}

#balance-status.balanced {
    color: #27ae60;
}

#balance-status.unbalanced {
    color: #e74c3c;
}

/* 凭证查看样式 */
.voucher-view h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.voucher-header {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.voucher-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item label {
    font-weight: 600;
    color: #555;
}

/* 报表样式 */
.report-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.report-filter {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.report-summary {
    margin-bottom: 30px;
}

.report-summary h3 {
    margin-bottom: 15px;
    color: #34495e;
}

.summary-cards {
    display: flex;
    gap: 20px;
}

.card {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h4 {
    margin-bottom: 10px;
    color: #555;
}

.card .amount {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.report-details h3 {
    margin-bottom: 15px;
    color: #34495e;
}

/* 消息样式 */
.success-message {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 链接样式 */
.register-link,
.login-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a,
.login-link a {
    color: #3498db;
    text-decoration: none;
}

.register-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    margin-top: 30px;
    padding: 30px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.friendship-links {
    margin-bottom: 20px;
}

.friendship-links h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    text-align: center;
}

.friendship-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.friendship-links li {
    margin: 0;
}

.friendship-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.friendship-links a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.copyright p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.current-time {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin-top: 10px;
}

/* 财务分析样式 */
.analysis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analysis-cards .card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.analysis-cards .card h3 {
    margin-top: 0;
    color: #2c3e50;
}

.analysis-cards .card p {
    margin-bottom: 20px;
    color: #666;
}

/* 报表样式 */
.date-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.date-form .form-row {
    display: flex;
    gap: 20px;
    margin-right: 10px;
}

.report-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.report-content th,
.report-content td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.report-content th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.total-row {
    font-weight: bold;
    background-color: #f8f9fa;
}

.grand-total-row {
    font-weight: bold;
    background-color: #e3f2fd;
}

.profit-summary,
.cash-flow-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.profit-summary table,
.cash-flow-summary table {
    width: 100%;
    border-collapse: collapse;
}

.profit-summary td,
.cash-flow-summary td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* 财务比率样式 */
.ratios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ratio-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.ratio-card h4 {
    margin-top: 0;
    color: #2c3e50;
}

.ratio-value {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    color: #3498db;
}

.ratio-desc {
    font-size: 14px;
    color: #666;
}

.ratio-explanation {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.ratio-explanation ul {
    margin: 0;
    padding-left: 20px;
}

.ratio-explanation li {
    margin-bottom: 10px;
}

/* 备份样式 */
.backup-list {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.backup-list h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.backup-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.backup-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.backup-info ul {
    margin: 0;
    padding-left: 20px;
}

.backup-info li {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .summary-cards {
        flex-direction: column;
    }
    
    .voucher-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav a {
        border-radius: 0;
    }
    
    .footer {
        margin-top: 20px;
        padding: 10px;
    }
}