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

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

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

.user-info span {
    font-size: 14px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* 模块卡片网格 */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* 模块卡片样式 */
.module-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

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

.module-card.car {
    border-left-color: #3498db;
}

.module-card.refuel {
    border-left-color: #e74c3c;
}

.module-card.repair {
    border-left-color: #f39c12;
}

.module-card.insurance {
    border-left-color: #9b59b6;
}

.module-card.maintenance {
    border-left-color: #27ae60;
}

.module-card.inspection {
    border-left-color: #1abc9c;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
 
/* 新增：模块内容左右布局 */
.module-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-right {
    text-align: right;
}

.total-count {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.total-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.module-card.car .module-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.module-card.refuel .module-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.module-card.repair .module-icon {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

.module-card.insurance .module-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.module-card.maintenance .module-icon {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.module-card.inspection .module-icon {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
}

.module-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 详情页面样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.back-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f5f7fa;
    border-color: #667eea;
    color: #667eea;
}


/* 表格样式 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.table-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid #eee;
}

.table-row {
    display: flex;
    padding: 16px 12px; /* 增加上下内边距，拉开行间距 */
    gap: 12px; /* 增加列之间的间距 */
    border-bottom: 1px solid #f0f0f0; /* 加行分割线 */
    align-items: center; /* 单元格内容垂直居中 */
}

.table-row.header {
    font-weight: 600;
    color: #fff; /* 表头文字改为白色 */
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.table-row:not(.header):hover {
    background: #f9fafb;
}

.table-cell {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px; /* 单元格内左右边距 */
}

.col-seq {
    flex: 0.8; /* 序号列收窄一点 */
}

.col-no {
    flex: 3; /* 单号列加宽 */
}

.col-other {
    flex: 1.5; /* 其他列统一宽度 */
}

.table-cell.center {
    text-align: center;
}

.table-cell.right {
    text-align: right;
}

.table-cell.status {
    color: #27ae60;
    font-weight: 500;
}

.table-cell.status.pending {
    color: #f39c12;
}

/* 新增：已驳回/审核失败的状态颜色 */
.table-cell.status.rejected {
    color: #e67e22;
}

/* 空数据提示 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-text {
    color: #999;
    font-size: 14px;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.message {
    text-align: center;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-item {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .table-row {
        flex-wrap: wrap;
    }

    .table-cell {
        flex: 0 0 50%;
        padding: 4px 0;
    }
}