* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 25px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logout-btn {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.login-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    max-width: 500px;
    margin: 20px auto;
}

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

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    outline: none;
}

button {
    padding: 14px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.main-content {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #7f8c8d;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    box-shadow: none;
}

.tab-btn:hover {
    transform: none;
    box-shadow: none;
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom: 3px solid #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    color: #7f8c8d;
    margin-bottom: 5px;
    font-size: 14px;
}

.stat-info .number {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.trend {
    font-size: 12px;
    font-weight: bold;
}

.trend.up {
    color: #27ae60;
}

.trend.down {
    color: #e74c3c;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.urgent-items {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.urgent-items h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.urgent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.urgent-item {
    padding: 15px;
    border-left: 4px solid #e74c3c;
    background: #fff4f4;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.urgent-item .item-info {
    flex: 1;
}

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

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.stats-card.large {
    grid-column: span 2;
}

.stats-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.inspections-summary, .rectifications-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.stat-item {
    padding: 8px 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
}

.inspections-list, .rectifications-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inspection-item, .rectification-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.item-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

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

.item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

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

.detail-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-value {
    font-weight: bold;
    color: #2c3e50;
}

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

.status-pending {
    background-color: #ffeaa7;
    color: #d35400;
}

.status-inprogress {
    background-color: #81ecec;
    color: #00a6a6;
}

.status-completed {
    background-color: #55efc4;
    color: #00b894;
}

.status-overdue {
    background-color: #fab1a0;
    color: #d63031;
}

.report-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.report-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.report-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin: 0 auto 15px;
}

.report-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

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

.custom-report-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.custom-report-panel h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.report-history {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.report-history h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.history-info {
    flex: 1;
}

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

/* 人员管理 - 用户表格样式 */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.users-table thead {
    background: #f4f6f8;
}

.users-table th,
.users-table td {
    padding: 10px 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

.users-table th {
    font-weight: bold;
    color: #555;
}

.users-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.users-table tbody tr:hover {
    background-color: #eef5ff;
}

.users-table tbody tr.inactive {
    color: #999;
    background-color: #f7f7f7;
}

.users-table tbody tr.inactive td {
    text-decoration: none;
}

.users-table td:last-child {
    min-width: 220px;
}

.users-table td button {
    padding: 6px 10px;
    font-size: 12px;
    margin-right: 6px;
    box-shadow: none;
}

.users-table td button:last-child {
    margin-right: 0;
}

/* 通用模态框样式（用于添加/编辑用户和重置密码） */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.modal .modal-content {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 24px 28px 20px;
    width: 100%;
    max-width: 480px;
}

.modal .modal-content h2 {
    margin-bottom: 18px;
    font-size: 20px;
    color: #2c3e50;
}

.modal .form-group {
    margin-bottom: 14px;
}

.modal .form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal .form-actions button {
    padding: 8px 14px;
    font-size: 14px;
    box-shadow: none;
}

/* 检查记录详情模态框内容区域增加滚动和图片样式 */
#inspectionDetailContent {
    max-height: 420px;
    overflow-y: auto;
    margin-top: 10px;
}

.inspection-detail-meta p {
    margin-bottom: 4px;
}

.inspection-detail-item {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.inspection-detail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0;
}

.inspection-detail-image-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspection-detail-image-label {
    font-size: 12px;
    color: #7f8c8d;
}

.inspection-detail-image {
    max-width: 180px;
    max-height: 140px;
    border-radius: 4px;
    border: 1px solid #eee;
    object-fit: cover;
}

.admin-image-zoom-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #7f8c8d;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.hidden {
    display: none;
}

@media (max-width: 1024px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .filters, .report-filters {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .report-types {
        grid-template-columns: 1fr;
    }
}