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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f5f7fa;
}

/* 主容器布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header .subtitle {
    font-size: 13px;
    opacity: 0.8;
}

/* 导航菜单 */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

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

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
}

.nav-item .icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-item .text {
    font-size: 14px;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.user-info .avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.user-info .info {
    flex: 1;
}

.user-info .name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.user-info .role {
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

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

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.top-bar {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.breadcrumb {
    font-size: 13px;
    color: #999;
}

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

.action-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e8e8e8;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    font-size: 18px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #f5f7fa;
    transform: translateY(-2px);
}

.action-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f5576c;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 页面内容 */
.page-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-page {
    display: none;
}

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

/* 统计卡片网格 */
/* 数据大屏刷新控制栏 */
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dashboard-controls .refresh-info {
    display: flex;
    align-items: center;
}

.dashboard-controls .action-btn {
    transition: all 0.3s ease;
}

.dashboard-controls .action-btn:hover {
    background: #5568d3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dashboard-controls .action-btn:active {
    transform: translateY(0);
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 16px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
    color: #999;
}

.stat-trend.up {
    color: #52c41a;
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.more-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.more-link:hover {
    color: #764ba2;
}

/* 任务列表 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f5f7fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: #eef2f7;
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 12px;
    color: #999;
}

.task-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.status-progress {
    background: #e6f7ff;
    color: #1890ff;
}

.status-pending {
    background: #fff7e6;
    color: #fa8c16;
}

.status-completed {
    background: #f6ffed;
    color: #52c41a;
}

/* 巡检员列表 */
.inspector-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inspector-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f5f7fa;
    border-radius: 8px;
}

.inspector-avatar {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.inspector-info {
    flex: 1;
}

.inspector-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.inspector-status {
    font-size: 12px;
    color: #999;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.busy {
    background: #fff1f0;
    color: #ff4d4f;
}

.status-badge.free {
    background: #f6ffed;
    color: #52c41a;
}

.status-badge.status-pending {
    background: #f0f0f0;
    color: #999;
}

.status-badge.status-warning {
    background: #fff7e6;
    color: #fa8c16;
}

.status-badge.status-success {
    background: #f6ffed;
    color: #52c41a;
}

/* 页面卡片 */
.page-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* 表单样式 */
.task-form {
    max-width: 900px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.required {
    color: #ff4d4f;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 文件上传样式 */
.form-group input[type="file"] {
    padding: 8px;
    border: 1px dashed #d9d9d9;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

/* 自定义城市行样式 */
#custom-city-row {
    background: #f5f7ff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e6e9ff;
}

#custom-city-row .form-group {
    margin-bottom: 0;
}

/* 区域选择器禁用状态 */
.form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

/* 按钮样式 */
.btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #764ba2;
}

/* 进度列表 */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-item {
    padding: 20px;
    background: #f5f7fa;
    border-radius: 8px;
}

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

.task-title h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.progress-bar {
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-details {
    margin: 12px 0;
}

.progress-details p {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.progress-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* 占位文本 */
.placeholder-text {
    text-align: center;
    color: #999;
    padding: 60px 0;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-header h1,
    .sidebar-header .subtitle,
    .nav-item .text,
    .user-info .info,
    .logout-btn {
        display: none;
    }
    
    .sidebar-nav {
        padding: 10px 0;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px 10px;
    }
    
    .nav-item .icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 浠诲姟琛ㄦ牸鏍峰紡 */
.task-table-wrapper {
    overflow-x: auto;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.task-table thead {
    background: #f5f7fa;
}

.task-table th,
.task-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8ecef;
}

.task-table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.task-table tbody tr:hover {
    background: #f9fafb;
}

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

/* 宸℃鍛樺窘绔?*/
.inspector-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inspector-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 鍥炬爣鎸夐挳 */
.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* 妯℃€佸脊绐楁牱寮?*/
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f7fa;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 浠诲姟淇℃伅鍖哄潡 */
.task-info-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.task-info-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    display: flex;
    gap: 8px;
}

.info-item label {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.info-item span {
    color: #333;
}

/* 宸℃鍛橀€夋嫨鍖哄潡 */
.inspector-selection-section {
    margin-bottom: 24px;
}

.inspector-selection-section h4 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #333;
}

.section-note {
    color: #667eea;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

/* 巡检员选择列表容器 - 添加滚动条 */
#inspector-checkbox-list {
    max-height: 280px; /* 最大高度，约显示3个巡检员，超过后显示滚动条 */
    overflow-y: auto; /* 垂直滚动 */
    overflow-x: hidden; /* 隐藏水平滚动 */
    padding-right: 12px; /* 增加右边距，为滚动条留出充足空间 */
    box-sizing: border-box; /* 包含padding在计算宽度内 */
}

/* 自定义滚动条样式（适用于 Chrome/Safari/Edge） */
#inspector-checkbox-list::-webkit-scrollbar {
    width: 8px;
}

#inspector-checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#inspector-checkbox-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#inspector-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.inspector-checkbox-item {
    display: block;
    padding: 10px 2px 10px 10px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    margin-right: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: auto; /* 移除固定最小高度，让内容自动撑开 */
    height: auto; /* 高度自动适应内容 */
    overflow: visible;
    box-sizing: border-box;
    width: 100%;
}

.inspector-checkbox-item:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.inspector-checkbox-item input[type="checkbox"] {
    position: absolute;
    left: 8px;
    top: 14px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.inspector-checkbox-item input[type="checkbox"]:checked + .inspector-item-content {
    background: #f0f4ff;
}

.inspector-item-content {
    display: block;
    padding-left: 32px; /* 为checkbox留出空间 */
    padding-right: 0; /* 完全移除右padding */
    transition: all 0.2s ease;
    width: auto;
    max-width: calc(100% - 32px); /* 减去左padding */
    box-sizing: border-box;
    overflow: visible; /* 改为visible，允许内容显示 */
}

.inspector-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.inspector-details {
    width: 100%;
    max-width: 100%;
    overflow: visible; /* 改为visible，允许内容正常显示 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.inspector-details .name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.inspector-details .meta {
    font-size: 12px;
    color: #999;
}

.inspector-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.inspector-info {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
    display: block;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 宸插垎閰嶅贰妫€鍛樺尯鍧?*/
.assigned-inspectors-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
}

.assigned-list {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    min-height: 50px;
}

.assigned-list .text-muted {
    color: #999;
    text-align: center;
}

.assigned-list .inspector-badges {
    justify-content: flex-start;
}

.text-muted {
    color: #999;
}

/* ======================
   历史记录页面样式
   ====================== */

/* 筛选器样式 */
.history-filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

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

.filter-item label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 160px;
    background: white;
    transition: all 0.3s;
}

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

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-actions .btn-primary,
.filter-actions .btn-secondary {
    padding: 8px 20px;
    font-size: 14px;
    white-space: nowrap;
}

/* 表格样式 */
.history-table-wrapper {
    overflow-x: auto;
    margin: -1px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.history-table thead {
    background: linear-gradient(to bottom, #f8f9fa, #f0f2f5);
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    font-size: 13px;
    white-space: nowrap;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
}

.history-table tbody tr {
    transition: background 0.2s;
}

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

/* 加载状态 */
.loading-row {
    text-align: center !important;
    padding: 0 !important;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    margin: 0;
    font-size: 14px;
}

/* 区域标签 */
.area-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 巡检员信息 */
.inspector-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inspector-info .name {
    font-weight: 500;
    color: #333;
}

.inspector-info .area {
    font-size: 11px;
    color: #999;
}

/* 照片徽章 */
.photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 耗时徽章 */
.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-info strong {
    color: #667eea;
    font-weight: 600;
}

.pagination-buttons {
    display: flex;
    gap: 12px;
}

.pagination-btn {
    padding: 8px 20px;
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #667eea;
    color: white;
}

.pagination-btn:disabled {
    background: #f5f5f5;
    color: #ccc;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .text {
    font-size: 16px;
    color: #666;
}

.empty-state .hint {
    font-size: 14px;
    color: #999;
    margin-top: 8px;
}

/* ======================
   人员管理Tab切换样式
   ====================== */

.user-tabs {
    display: flex;
    gap: 2px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
    margin-top: 20px;
}

.form-info {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 4px;
    margin-top: 16px;
}

.form-info p {
    margin: 0;
    color: #1976d2;
    font-size: 13px;
}

/* ======================
   Toast提示框样�?   ====================== */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* ==================== 系统配置管理样式 ==================== */

.config-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-group {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}

.config-item:last-child {
    border-bottom: none;
}

.config-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-right: 16px;
}

.config-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-label strong {
    font-size: 15px;
    color: #333;
}

.config-key-text {
    font-size: 12px;
    color: #999;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.config-value-container {
    flex: 1;
}

.config-value-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

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

.config-actions {
    display: flex;
    gap: 8px;
}

.btn-save {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

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

.btn-save:active {
    transform: translateY(0);
}

/* 加载和错误状态 */
.loading-state, .error-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state p {
    font-size: 16px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
}
