/* 巡查巡检平台 - 现代政务风格样式 */

:root {
    /* 莫兰迪色系 - 蓝绿灰主调 (4色方案) */
    /* 主色：雾霾蓝绿 */
    --primary-color: #7A9E9F;
    --primary-dark: #5C7A7B;
    --primary-light: #9AB5B6;
    --primary-bg: #F0F4F4;
    
    /* 辅色：暖米灰 */
    --secondary-color: #B5A99A;
    --secondary-dark: #8E8277;
    --secondary-light: #D4C9BE;
    
    /* 功能色 */
    --success-color: #6B8E7A;  /* 灰绿色 - 成功 */
    --success-bg: #EEF2F0;
    --warning-color: #C4A87C;  /* 暖沙色 - 警告 */
    --warning-bg: #FAF6F0;
    --danger-color: #B57B7B;    /* 灰玫瑰色 - 危险 */
    --danger-bg: #F7F0F0;
    
    /* 中性色 */
    --text-primary: #3D4A4B;
    --text-secondary: #6B7B7C;
    --text-muted: #9AA8A9;
    --border-color: #D8DFE0;
    --bg-color: #F5F7F7;
    --card-bg: #FFFFFF;
    
    /* 阴影 - 更柔和 */
    --shadow-sm: 0 1px 2px 0 rgba(122, 158, 159, 0.08);
    --shadow: 0 2px 6px 0 rgba(122, 158, 159, 0.12);
    --shadow-md: 0 4px 12px 0 rgba(122, 158, 159, 0.15);
    --shadow-lg: 0 8px 24px 0 rgba(122, 158, 159, 0.18);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 侧边栏 */
    --sidebar-width: 264px;
    
    /* 顶部横幅 */
    --banner-gradient-start: #4A6CF7;
    --banner-gradient-end: #8B5CF6;
}

/* 顶部固定横幅样式 */
.top-banner {
    background: linear-gradient(90deg, var(--banner-gradient-start), var(--banner-gradient-end));
    padding: 10px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

.top-banner-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-color);
}

/* 应用容器 */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 80%;
    max-width: 2000px;
    margin: 0 auto;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* 侧边栏 - 蓝绿渐变 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #29323d 0%, #1a3151 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    left: 10%;
    top: 0;
    border-radius: 16px 16px 16px 16px;
}

/* 侧边栏图标样式 */
.sidebar .nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: white;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-logo {
    max-width: 80%;
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.version {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    gap: 4px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, #C850C0 0%, #4158D0 100%);
    color: white;
    border-left-color: #C850C0;
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
    margin-right: 12px;
}

.nav-text {
    font-size: 15px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.version {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.user-info {
    margin: 12px 0 8px;
    text-align: center;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.user-role {
    display: inline-block;
    font-size: 11px;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 用户管理表格 */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.user-table th,
.user-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.user-table td {
    font-size: 14px;
}

.user-add-form {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.user-add-form h4,
.user-list-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* 顶部栏 */
.top-bar {
    background: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* 内容区域 */
.content-area {
    padding: 24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--bg-color);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-actions {
    display: flex;
    gap: 12px;
}

/* 内容区域 */
.content-area {
    padding: 24px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--bg-color);
}

/* 页面区块 */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: #8b5cf6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 所有按钮悬停统一样式 - 蓝紫渐变 */
.btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* 拖拽上传区 */
.drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary-bg);
}

.drop-zone:hover {
    border-color: var(--primary-dark);
    background: #dbeafe;
}

.drop-zone.dragover {
    background: #dbeafe;
    border-color: var(--primary-dark);
    transform: scale(1.01);
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drop-zone-text {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 8px;
}

.drop-zone-hint {
    color: var(--text-muted);
    font-size: 13px;
}

/* 文件列表 */
.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-progress {
    width: 150px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 16px;
}

.file-progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.file-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.file-status.uploading {
    background: var(--primary-bg);
    color: var(--primary-color);
}

.file-status.complete {
    background: var(--success-bg);
    color: var(--success-color);
}

.file-status.error {
    background: var(--danger-bg);
    color: var(--danger-color);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* 文件夹信息 */
.folder-info {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.folder-info h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.folder-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.folder-item {
    background: var(--bg-color);
    padding: 12px;
    border-radius: var(--radius);
}

.folder-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.folder-path {
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

/* 巡查处理区域 - 紧凑布局 */
.patrol-upload-area {
    max-width: 600px;
}

/* 巡检处理页面紧凑样式 */
#page-patrol .card {
    margin-bottom: 16px;
}

#page-patrol .card-body {
    padding: 16px;
}

#page-patrol .form-group {
    margin-bottom: 12px;
}

#page-patrol .form-group:last-child {
    margin-bottom: 0;
}

#page-patrol .form-group label {
    font-size: 13px;
    margin-bottom: 4px;
}

#page-patrol .folder-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

#page-patrol .folder-selector select {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

#page-patrol .folder-selector .btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

#page-patrol .folder-details {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

/* 文件夹批次区域 - 一行布局 */
.folder-batch-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.folder-batch-section .form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.folder-batch-section .form-group label {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.folder-batch-section .folder-selector {
    display: flex;
    flex: 1;
    gap: 8px;
    align-items: center;
    min-width: 200px;
}

.folder-batch-section .folder-selector select {
    flex: 1;
}

.folder-batch-section .folder-selector .btn {
    flex-shrink: 0;
}

/* 巡检处理页面文件夹行布局 - 标签、下拉框、按钮在一行 */
.folder-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.folder-label {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.folder-row select {
    flex: 1;
    min-width: 200px;
}

.folder-row .btn {
    flex-shrink: 0;
}

/* 文件夹详情卡片样式 */
.folder-detail-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 120px;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.detail-value {
    flex: 1;
    color: #212529;
    font-size: 13px;
}

.detail-row.stats .detail-value {
    display: flex;
    gap: 12px;
}

.stat-item {
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.stat-item.highlight {
    background: linear-gradient(135deg, #4b077c, #7A9E9F);
    color: white;
}

/* 紧凑版文件夹详情卡片 - 横向排版 */
.folder-detail-card-compact {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f4f8 100%);
    border: 1px solid #d0e0e8;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.detail-item.full-width {
    flex-basis: 100%;
    margin-top: 4px;
}

.detail-item.highlight {
    background: linear-gradient(135deg, #4b077c, #7A9E9F);
    color: white;
}

.detail-item.highlight .detail-icon {
    filter: brightness(2);
}

.detail-icon {
    font-size: 14px;
    line-height: 1;
}

.detail-val {
    color: #3D4A4B;
    font-weight: 500;
}

.detail-item.highlight .detail-val {
    color: white;
}

/* 文件夹选择器信息区 */
.folder-selector-info {
    margin-bottom: 10px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e8f0f8 0%, #d8e8f0 100%);
    border-radius: 6px;
    border: 1px solid #c0d8e8;
}

.info-text {
    font-weight: 600;
    color: #3D4A4B;
    font-size: 14px;
}

.info-count {
    background: linear-gradient(135deg, #4b077c, #7A9E9F);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== 横向紧凑版详情摘要样式 ========== */
.folder-detail-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.compact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 13px;
    line-height: 1.6;
}

.compact-icon {
    font-size: 14px;
    opacity: 0.8;
}

.compact-label {
    color: #495057;
    font-weight: 500;
}

.compact-row:first-child {
    font-weight: 600;
    color: #212529;
    padding-bottom: 6px;
    border-bottom: 1px dashed #dee2e6;
}

.compact-row:first-child .compact-icon {
    opacity: 1;
}

/* 高亮图标和标签（用于有效图片数量） */
.highlight-icon {
    color: #28a745;
}

.highlight-label {
    color: #28a745;
    font-weight: 700;
    background: #d4edda;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 处理进度条 */
.folder-progress-section {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #495057;
}

.progress-bar {
    height: 8px;
    background: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b077c, #7A9E9F);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.completed {
    background: linear-gradient(90deg, #28a745, #20c997);
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.processing {
    background: #cce5ff;
    color: #004085;
}

/* 图片预览区域 */
.folder-images-section {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.images-title {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.images-processed {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 12px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

.images-grid::-webkit-scrollbar {
    width: 6px;
}

.images-grid::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.images-grid::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.image-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #4b077c;
}

.image-card.processed {
    border-left: 3px solid #28a745;
}

.image-card.unprocessed {
    border-left: 3px solid #ffc107;
}

.image-thumbnail {
    position: relative;
    height: 120px;
    background: #f8f9fa;
    overflow: hidden;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.processed-badge,
.pending-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.processed-badge {
    background: #28a745;
    color: white;
}

.pending-badge {
    background: #ffc107;
    color: #212529;
}

.image-info {
    padding: 10px;
}

.image-name {
    font-size: 12px;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.meta-date,
.meta-time {
    font-size: 10px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.image-gps {
    margin-top: 4px;
}

.meta-gps {
    font-size: 10px;
    color: #4b077c;
    background: #f3e8ff;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

.meta-no-gps {
    font-size: 10px;
    color: #adb5bd;
}

.images-more {
    text-align: center;
    padding: 12px;
    color: #6c757d;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 12px;
}

.folder-no-images {
    text-align: center;
    padding: 40px;
    color: #adb5bd;
    font-size: 14px;
}

.folder-no-images::before {
    content: '📷';
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

#page-patrol .btn-lg {
    padding: 10px 20px;
    font-size: 14px;
}

#page-patrol .form-group small {
    font-size: 11px;
    margin-top: 4px;
}

.image-selector {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.image-selector select {
    flex: 1;
}

.coords-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 巡查结果 */
.patrol-result {
    min-height: 300px;
    background: var(--bg-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.patrol-result img {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}

/* 记录统计 - 美化版 */
.record-stats {
    display: flex;
    gap: 12px;
}

.record-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg-color);
}

.record-stats .stat-item strong {
    font-weight: 700;
    font-size: 16px;
}

.record-stats .has-issue {
    background: #fef2f2;
    color: #dc2626;
}

.record-stats .has-issue strong {
    color: #dc2626;
}

.record-stats .no-issue {
    background: #ecfdf5;
    color: #059669;
}

.record-stats .no-issue strong {
    color: #059669;
}

/* 结果页面美化为仪表盘风格 - 紧凑版 */
#page-result {
    display: none;
}

#page-result.active {
    display: block;
}

#page-result .card {
    margin-bottom: 12px;
}

.result-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

/* 炫酷环形统计卡片 - 紧凑版 */
.result-stat-card {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 16px 12px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

/* 背景光效 */
.stat-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0.05;
    transition: all 0.4s ease;
    pointer-events: none;
}

.result-stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.result-stat-card:hover .stat-glow {
    opacity: 0.1;
    transform: rotate(45deg);
}

/* 环形进度条 - 紧凑版 */
.stat-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    pointer-events: none;
}

.stat-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.stat-ring .ring-bg {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    opacity: 0.1;
}

.stat-ring .ring-progress {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-out;
}

/* 内容区域 */
.stat-content {
    position: relative;
    z-index: 2;
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.result-stat-card:hover .stat-icon {
    transform: scale(1.15);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: currentColor;
    text-shadow: 0 2px 8px currentColor;
    transition: all 0.3s ease;
}

.result-stat-card:hover .stat-value {
    transform: scale(1.08);
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
}

.stat-sublabel {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 动态数字动画 */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-value.animate {
    animation: countUp 0.5s ease forwards;
}

/* 各卡片颜色 */
.result-stat-card.total {
    color: var(--primary-color);
    border-top: 3px solid var(--primary-color);
}

.result-stat-card.issues {
    color: var(--danger-color);
    border-top: 3px solid var(--danger-color);
}

.result-stat-card.ok {
    color: var(--success-color);
    border-top: 3px solid var(--success-color);
}

.result-stat-card.deduction {
    color: var(--warning-color);
    border-top: 3px solid var(--warning-color);
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.result-stat-card::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: currentColor;
    border-radius: 2px;
    opacity: 0.3;
}

/* 悬停时的数字滚动效果 */
@keyframes numberRoll {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* 动态数字动画 */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-value.animate {
    animation: countUp 0.5s ease forwards;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.result-stat-card.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========== 高频高发问题分析区样式 - 紧凑版 ========== */
.analysis-charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.chart-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chart-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.chart-card .card-header h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-card .card-header h2 i {
    color: var(--primary-color);
}

.chart-card .card-body {
    padding: 10px;
    min-height: 180px;
}

/* 图表卡片可折叠样式 */
.collapsible-chart .card-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.collapsible-chart .card-header:hover {
    background: linear-gradient(135deg, #eef2f5 0%, #f8fafc 100%);
}

.chart-toggle-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: var(--text-muted);
    font-size: 16px !important;
}

.collapsible-chart.collapsed .chart-toggle-icon {
    transform: translateY(-50%) rotate(-90deg);
}

.chart-body-collapsible {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

/* 图表总数显示样式 */
.chart-total-count {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.chart-total-count strong {
    color: var(--primary-color);
    font-weight: 700;
}

.collapsible-chart.collapsed .chart-body-collapsible {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* 图表容器 - 紧凑版 */
.chart-container {
    width: 100%;
    min-height: 160px;
    height: auto;
    position: relative;
    padding: 6px;
}

/* 横向柱状图样式 - 紧凑版 */
.horizontal-bar-chart {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-height: 120px;
    padding: 4px 0;
}

.bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.bar-label {
    flex: 0 0 80px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    min-width: 30px;
}

/* Top1-5 颜色样式：红、浅红、黄、绿、渐变 */
.bar-fill.bar-red {
    background: linear-gradient(90deg, #e08891 0%, #c82333 100%);
}

.bar-fill.bar-light-red {
    background: linear-gradient(90deg, #ecbc9c 0%, #ec921b 100%);
    border: 1px solid #f1b0b7;
}

.bar-fill.bar-yellow {
    background: linear-gradient(90deg, #e9daaf 0%, #c7bb1a 100%);
}

.bar-fill.bar-green {
    background: linear-gradient(90deg, #90dac7 0%, #0faa90 100%);
}

.bar-fill.bar-gradient {
    background: linear-gradient(90deg, #a1dae4 0%, #1c7da3 100%);
}

.bar-fill.primary {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.bar-fill.danger {
    background: linear-gradient(90deg, var(--danger-color) 0%, #9b5555 100%);
}

.bar-fill.warning {
    background: linear-gradient(90deg, var(--warning-color) 0%, #a88950 100%);
}

.bar-fill.success {
    background: linear-gradient(90deg, var(--success-color) 0%, #558060 100%);
}

.bar-value {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 无数据状态 */
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.chart-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.chart-empty p {
    font-size: 13px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .analysis-charts-section {
        grid-template-columns: 1fr;
    }
}

/* 紧凑查询卡片 - 巡检结果页面专用 */
#page-result .compact-card {
    margin-bottom: 12px;
}

#page-result .compact-card .card-body {
    padding: 12px 16px;
}

#page-result .compact-card .card-header {
    padding: 10px 16px;
}

#page-result .compact-card .card-header h2 {
    font-size: 13px;
}

#page-result .compact-card .filter-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

#page-result .compact-card .filter-section {
    display: flex;
    flex-direction: column;
    min-width: 120px;
    flex: 1;
}

#page-result .compact-card .filter-section label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-weight: 500;
}

#page-result .compact-card .filter-section select,
#page-result .compact-card .filter-section input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 12px;
    background: white;
    height: 32px;
}

#page-result .compact-card .date-range-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

#page-result .compact-card .date-range-picker input {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 12px;
    min-width: 100px;
    height: 32px;
}

#page-result .compact-card .range-sep {
    color: var(--text-muted);
    font-size: 11px;
}

/* 日历按钮样式 - 拉宽 */
#page-result .compact-card .calendar-btn {
    padding: 6px 20px !important;
    font-size: 13px !important;
    height: 32px;
    min-width: 80px;
    white-space: nowrap;
}

#page-result .compact-card .filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

#page-result .compact-card .filter-actions .btn {
    padding: 6px 14px;
    font-size: 12px;
    height: 32px;
}

/* 日历弹窗 */
.calendar-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    width: 320px;
}

.calendar-popup.show {
    display: block;
}

.calendar-popup.show {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.calendar-header span {
    font-weight: 600;
    font-size: 14px;
}

.calendar-header .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-days .day {
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.calendar-days .day:hover:not(.empty):not(.disabled) {
    background: var(--bg-color);
}

.calendar-days .day.empty {
    cursor: default;
}

.calendar-days .day.disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-days .day.selected {
    background: var(--primary-color);
    color: white;
}

.calendar-days .day.has-data {
    background: #22c55e;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.calendar-days .day.has-data:hover {
    background: linear-gradient(135deg, #8b5cf6, #d946ef) !important;
    color: white;
}

.calendar-days .day.has-data.selected {
    background: var(--primary-color);
    color: white;
}

.calendar-days .day.in-range {
    background: var(--primary-bg);
}

.calendar-days .day.today {
    border: 2px solid var(--primary-color);
}

.filter-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.filter-section {
    display: flex;
    flex-direction: column;
    min-width: 112px;
    flex: 1 1 112px;
}

.filter-section label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.filter-section select,
.filter-section input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    background: white;
}

.filter-section select:focus,
.filter-section input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.1);
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.date-range-picker input {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 120px;
    max-width: 150px;
    flex: 1;
    height: 36px;
}

.date-range-picker .range-sep {
    font-size: 11px;
    flex-shrink: 0;
    padding: 0 2px;
}

.date-range-picker .calendar-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    height: 32px;
    min-width: 50px;
    max-width: 60px;
    white-space: nowrap;
    flex-shrink: 0;
}

.range-sep {
    color: var(--text-muted);
    font-size: 12px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* 记录表格 - 美化版 */
.records-table-wrapper {
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.records-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 10px 6px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    font-size: 11px;
}

.records-table th:first-child {
    border-radius: 0;
}

/* 各列宽度优化 - 紧凑版 */
.records-table .col-id { width:55px; text-align: center; }
.records-table .col-date { width: 50px; text-align: center; }
.records-table .col-time { width: 30px; text-align: center; }
.records-table .col-address { width: 140px; text-align: center; }
.records-table .col-district { width: 40px; text-align: center; }
.records-table .col-case-type { width: 40px; text-align: center; }
.records-table .col-project { width: 65px; text-align: center; }
.records-table .col-problem { width: 65px; text-align: center; }
.records-table .col-location { width: 40px; text-align: center; }
.records-table .col-score { width: 20px; text-align: center; }
.records-table .col-reason { width: 70px; text-align: center; }
.records-table .col-status { width: 40px; text-align: center; }
.records-table .col-image { width: 120px; text-align: center; }
.records-table .col-action { width: 30px; text-align: center; }

/* 可点击元素通用样式 */
.clickable {
    cursor: pointer;
}

.clickable:hover {
    opacity: 0.9;
}

/* 表格缩略图 - 高度100px等比缩放，可点击查看大图 */
.records-table .table-thumb {
    height: 100px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.records-table .table-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.records-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.records-table td.col-address {
    white-space: nowrap;
}

.records-table tbody tr {
    transition: all 0.15s ease;
}

.records-table tbody tr:hover {
    background: #f8faff;
}

.records-table tbody tr:nth-child(even) {
    background: #e8f4f8; /* 浅蓝色 */
}

.records-table tbody tr:nth-child(even):hover {
    background: #d0e8f0; /* 稍深蓝色 */
}

.records-table .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.has-issue {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-badge.no-issue {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-badge.pending {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border: 1px solid #fde68a;
}

/* 已销号状态徽章样式 */
.status-badge.closed-case {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: 1px solid #495057;
    font-weight: 500;
}

.records-table .btn-secondary {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    transition: all 0.15s ease;
}

.records-table .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px !important;
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pagination button:hover {
    background: var(--bg-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 报告预览 */
/* 历史报告区域样式 */
.report-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-history-list .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.report-history-list .history-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.report-history-list .history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-history-list .history-name {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.report-history-list .history-time {
    font-size: 12px;
    color: #6c757d;
}

/* 报告成功/失败状态样式 */
.report-success {
    text-align: center;
    padding: 40px 20px;
}

.report-success .success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 16px;
}

.report-success .success-message {
    font-size: 20px;
    font-weight: 500;
    color: #212529;
    margin-bottom: 20px;
}

.report-success .success-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.report-error {
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 16px;
}

.report-error .error-message {
    color: #856404;
    font-weight: 500;
}

.report-warning {
    padding: 12px;
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
    margin-top: 16px;
    color: #004085;
    font-size: 14px;
}

.report-preview {
    background: #fffef5;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 400px;
    white-space: pre-wrap;
    font-family: 'Times New Roman', serif;
    line-height: 1.8;
}

.report-preview h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.report-preview h2 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.report-preview h3 {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
}

/* 报告生成页面 - 按钮组 */
.report-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.report-buttons .btn {
    min-width: 120px;
}

/* 基本情况卡片 */
#basicInfoCard {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#basicInfoContent {
    line-height: 1.8;
}

.basic-info-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.basic-info-summary p {
    margin: 8px 0;
    font-size: 15px;
    color: var(--text-primary);
}

.basic-info-summary .highlight {
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 18px;
}

.basic-daily-list {
    margin-top: 15px;
}

.basic-daily-list h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.basic-daily-list ul {
    list-style: none;
    padding: 0;
}

.basic-daily-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-light);
}

.basic-daily-list li strong {
    color: var(--primary-dark);
}

/* 设置页面 */
.settings-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.setting-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.setting-item span {
    color: var(--text-primary);
}

/* 系统描述 */
.system-description {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.desc-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 16px 0;
}

.desc-logo {
    max-height: 100px;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.desc-text {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
}

.desc-text p {
    margin: 8px 0;
}

.desc-text strong {
    color: var(--text-primary);
    font-size: 16px;
}

/* ========== 弹窗导航按钮样式 ========== */
.modal-nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.nav-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

/* ========== 输入框样式 ========== */
.detail-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.detail-input:focus {
    border-color: #1890ff;
    outline: none;
}

.score-input {
    width: 80px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* 弹窗 - 美化版 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    max-height: calc(95vh - 70px);
    overflow-y: auto;
}

/* 弹窗内容布局 */
.detail-modal-container {
    display: flex;
    gap: 20px;
}

.detail-modal-left {
    flex: 0 0 400px;
    max-width: 400px;
}

.detail-modal-right {
    flex: 1;
    min-width: 0;
}

/* 弹窗图片自适应 */
.detail-modal-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: #f8fafc;
}

/* 区位图样式 */
.location-map-section {
    margin-top: 16px;
}

.location-map-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.detail-location-map {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: #f8fafc;
}

/* 基本信息区 */
.detail-base-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.detail-base-info h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.detail-base-info .info-row {
    display: flex;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.detail-base-info .info-row:last-child {
    border-bottom: none;
}

.detail-base-info .info-row span {
    flex: 0 0 70px;
    color: var(--text-secondary);
}

/* 问题详情横向表格 */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.detail-table td {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    vertical-align: middle;
}

.detail-table .label-cell {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 500;
    width: 100px;
}

.detail-table .score-cell {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 16px;
}

.dify-result {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* ========== 数据库管理样式 ========== */
.db-status-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.db-status-section h4,
.db-backup-section h4,
.db-clear-section h4,
.db-restore-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.db-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.db-stat-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.db-stat-item label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.db-stat-item span {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 备份列表 */
.backup-list {
    margin-top: 16px;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.backup-table th,
.backup-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.backup-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
}

.backup-table td {
    font-size: 13px;
}

/* 备份摘要列样式 - 支持多行显示 */
.backup-table .summary-cell {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 350px;
    white-space: pre-wrap;
    word-break: break-all;
    background: #fafbfc;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: help;
}

.backup-table td[title] {
    cursor: help;
}

.backup-table td:first-child {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 清除数据 */
.clear-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.clear-option {
    display: flex;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.clear-date-range,
.clear-before-date {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.clear-warning,
.restore-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--warning-bg);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--warning-color);
    margin-bottom: 12px;
}

.restore-warning {
    background: var(--danger-bg);
    color: var(--danger-color);
}

/* 按钮变体 */
.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #a05555;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #b39668;
}

/* ========== 系统设置页面美化样式 ========== */

/* 选项卡容器 */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.settings-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-tab:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.settings-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.settings-tab i {
    font-size: 16px;
}

/* 选项卡内容 */
.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 设置卡片 */
.settings-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.settings-card-header:hover {
    background: #f0f4f8;
}

.settings-card-header i {
    font-size: 20px;
    margin-right: 12px;
    color: var(--primary-color);
}

.settings-card-header h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.settings-card-header .btn-refresh {
    padding: 8px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-card-header .btn-refresh:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.settings-card-body {
    padding: 24px;
}

/* 危险/警告头部样式 */
.settings-card-header.danger-header i,
.settings-card-header.danger-header h3 {
    color: var(--danger-color);
}

.settings-card-header.warning-header i,
.settings-card-header.warning-header h3 {
    color: var(--warning-color);
}

/* 信息网格 */
.settings-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.settings-info-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.settings-info-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.settings-info-item .info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius);
    font-size: 20px;
    margin-right: 16px;
}

.settings-info-item .info-content {
    flex: 1;
}

.settings-info-item .info-content label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.settings-info-item .info-content span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 数据库状态卡片 */
.db-status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.db-status-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.db-status-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.db-status-card .db-status-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 24px;
    margin-right: 16px;
}

.db-status-card .db-status-info label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.db-status-card .db-status-info span {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 可折叠内容 */
.collapsible .settings-card-header .toggle-icon {
    transition: transform 0.3s;
}

.collapsible.expanded .settings-card-header .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    display: none;
}

.collapsible.expanded .collapsible-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

/* 备份创建区域 */
.backup-create {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.backup-create .form-group {
    flex: 1;
    margin-bottom: 0;
}

.backup-create .btn {
    height: 42px;
    white-space: nowrap;
}

/* 清除选项 - 卡片样式 */
.clear-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.clear-option-item {
    cursor: pointer;
}

.clear-option-item input {
    display: none;
}

.clear-option-item .option-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.clear-option-item .option-box i {
    font-size: 20px;
}

.clear-option-item input:checked + .option-box {
    border-color: var(--primary-color);
    background: var(--primary-bg);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(122, 158, 159, 0.2);
}

.clear-option-item:hover .option-box {
    border-color: var(--primary-light);
}

/* 警告框样式 */
.clear-warning,
.restore-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.clear-warning {
    background: var(--warning-bg);
    color: #b8960c;
    border: 1px solid #fde68a;
}

.restore-warning {
    background: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.clear-warning i,
.restore-warning i {
    font-size: 18px;
}

/* 用户表单行内 */
.user-add-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.user-add-form-inline .form-group {
    flex: 1;
    min-width: 150px;
}

.user-add-form-inline .btn-add {
    height: 42px;
    min-width: 100px;
}

/* 用户表格容器 */
.user-table-wrapper {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.user-table th i {
    margin-right: 8px;
    color: var(--primary-color);
}

.user-table tbody tr {
    transition: all 0.2s;
}

.user-table tbody tr:hover {
    background: #f8faff;
}

.user-table td {
    font-size: 14px;
}

/* 用户状态样式 */
.user-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-status.enabled {
    background: var(--success-bg);
    color: var(--success-color);
}

.user-status.disabled {
    background: var(--danger-bg);
    color: var(--danger-color);
}

/* 管理员徽章 */
.badge-admin {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* 观察级徽章 */
.badge-viewer {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* 查看模式提示 */
.no-edit-tip {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
    padding: 4px 10px;
    background: var(--bg-color);
    border-radius: 4px;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 6px;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 12px;
}

.btn-danger-outline {
    background: white;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-danger-outline:hover {
    background: var(--danger-color);
    color: white;
}

/* ========== 手机端提示样式 ========== */
.mobile-tip {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #bae6fd;
}

.mobile-tip p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.mobile-tip p i {
    color: var(--primary-color);
    margin-right: 8px;
}

.mobile-tip .hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 20px;
}

/* 表单选择器 */
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(122, 158, 159, 0.1);
}

/* 大按钮 */
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius);
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .logo-text,
    .nav-text,
    .version {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .db-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .clear-options {
        flex-direction: column;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .settings-tab {
        min-width: calc(50% - 4px);
    }
    
    .settings-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ 图片标注弹窗样式 ============ */
.annotation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.annotation-modal.active {
    display: flex;
}

.annotation-modal-content {
    background: #1a1a2e;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.annotation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.annotation-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.annotation-tools {
    display: flex;
    gap: 8px;
}

.annotation-container {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    position: relative;
}

#annotationCanvas {
    max-width: 100%;
    max-height: calc(95vh - 140px);
    cursor: crosshair;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.annotation-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #16213e;
    border-top: 1px solid #0f3460;
}

.annotation-tip {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    pointer-events: none;
}

/* ========== 巡检结果页面标签切换样式 ========== */
.result-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.result-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.result-tab:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.result-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.result-tab i {
    font-size: 16px;
}

/* 标签内容区 */
.result-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.result-tab-content.active {
    display: block;
}

/* ========== 所有页面手机竖屏适配 ========== */

/* 安全区域适配 - iPhone刘海屏/灵动岛 */
@supports (padding: max(0px)) {
    .sidebar-header {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .top-bar {
        padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    }
    
    .content-area {
        padding: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    }
}

/* 横屏布局优化 - 允许横屏显示 */
@media (orientation: landscape) {
    .app-container {
        width: 95%;
        max-width: none;
        height: 100vh;
        border-radius: 12px;
    }
    
    .sidebar {
        width: 220px;
        left: 2.5%;
        height: 100vh;
        border-radius: 12px 0 0 12px;
    }
    
    .sidebar-header {
        padding: 14px 12px;
    }
    
    .logo {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo-img {
        max-height: 45px;
    }
    
    .logo-text {
        font-size: 12px;
        line-height: 1.2;
        display: block;
    }
    
    .logo-subtitle {
        display: none;
    }
    
    .nav-item {
        padding: 10px 14px;
        justify-content: flex-start;
    }
    
    .nav-icon {
        margin-right: 10px;
    }
    
    .nav-text {
        font-size: 13px;
        display: inline;
    }
    
    .sidebar-footer {
        padding: 12px;
    }
    
    .footer-logo {
        max-width: 70%;
    }
    
    .user-info {
        margin: 8px 0;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-role {
        font-size: 10px;
    }
    
    .btn-logout {
        padding: 6px;
        font-size: 11px;
    }
    
    .btn-logout i {
        margin-right: 4px;
    }
    
    .version {
        font-size: 9px;
        display: block;
    }
    
    .main-content {
        margin-left: 220px;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .top-bar {
        padding: 10px 16px;
        flex-shrink: 0;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .content-area {
        flex: 1;
        padding: 12px 16px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* 横屏时卡片布局优化 - 更紧凑 */
    .card {
        margin-bottom: 0;
    }
    
    .card-header {
        padding: 10px 14px;
    }
    
    .card-header h2 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 14px;
    }
    
    /* 横屏时导航图标和文字居中 */
    .nav-item {
        justify-content: center;
    }
    
    /* 横屏时表格横向展开 */
    .records-table-wrapper {
        flex: 1;
        overflow: auto;
    }
    
    /* 横屏时统计卡片横向排列 */
    .result-stats-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    /* 横屏时图表横向排列 */
    .analysis-charts-section {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    /* 横屏时筛选区横向排列 */
    .filter-compact {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-section {
        flex: 1 1 calc(20% - 8px);
        min-width: auto;
    }
    
    /* 横屏时详情弹窗更大 */
    .detail-modal-container {
        flex-direction: row;
    }
    
    .detail-modal-left {
        flex: 0 0 450px;
        max-width: 450px;
    }
    
    .detail-modal-image {
        max-height: 400px;
    }
}

/* 横屏小屏适配 */
@media (orientation: landscape) and (max-height: 450px) {
    .sidebar {
        width: 180px;
    }
    
    .main-content {
        margin-left: 180px;
    }
    
    .sidebar-header {
        padding: 8px 10px;
    }
    
    .logo-img {
        max-height: 35px;
    }
    
    .nav-item {
        padding: 8px 12px;
    }
    
    .nav-icon {
        margin-right: 8px;
        font-size: 16px;
    }
    
    .nav-text {
        font-size: 12px;
    }
    
    .sidebar-footer {
        padding: 8px;
    }
    
    .footer-logo {
        max-width: 60%;
    }
    
    .version {
        font-size: 8px;
    }
    
    .top-bar {
        padding: 8px 12px;
    }
    
    .page-title {
        font-size: 14px;
    }
    
    .content-area {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .result-stats-cards {
        gap: 8px;
    }
    
    .result-stat-card {
        padding: 16px 10px 12px;
    }
    
    .result-stat-card .stat-value {
        font-size: 28px;
    }
}

/* 竖屏全屏适配 */
@media (orientation: portrait) {
    .app-container {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

/* 小屏幕手机适配 (320px - 480px) */
@media (max-width: 480px) {
    /* 侧边栏改为悬浮式，不完全靠左 */
    .sidebar {
        width: 60px;
        left: 8px;
        top: 8px;
        height: calc(100vh - 16px);
        border-radius: 12px;
    }
    
    .sidebar-header {
        padding: 12px 6px;
    }
    
    .logo-img {
        max-height: 32px;
    }
    
    .logo-text,
    .nav-text,
    .version,
    .user-info,
    .btn-logout span {
        display: none;
    }
    
    .nav-item {
        padding: 14px 6px;
        justify-content: center;
    }
    
    .nav-icon {
        margin-right: 0;
        font-size: 20px;
    }
    
    .sidebar-footer {
        padding: 12px 6px;
    }
    
    .footer-logo {
        max-width: 90%;
    }
    
    /* 主内容区 */
    .main-content {
        margin-left: 68px;
    }
    
    .top-bar {
        padding: 12px 12px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .content-area {
        padding: 12px;
        overflow-x: hidden;
    }
    
    /* 防止横向溢出 - 通用 */
    .main-content,
    .content-area {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* 巡检结果页面 - 确保横向显示完整 */
    #page-result .result-stats-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-x: visible;
    }
    
    #page-result .result-stat-card {
        width: 100%;
        max-width: none;
    }
    
    #page-result .analysis-charts-section {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-x: visible;
    }
    
    #page-result .chart-card {
        width: 100%;
        max-width: none;
        overflow-x: hidden;
    }
    
    #page-result .chart-container {
        overflow-x: auto;
    }
    
    #page-result .horizontal-bar-chart {
        min-width: 100%;
    }
    
    #page-result .wind-rose-chart {
        flex-direction: column;
    }
    
    #page-result .wind-rose-container {
        margin: 0 auto;
    }
    
    /* 确保所有子元素不横向溢出 */
    * {
        max-width: 100vw;
    }
    
    /* 卡片 */
    .card {
        margin-bottom: 12px;
        border-radius: 10px;
    }
    
    .card-header {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h2 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    /* 表单 */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    /* 按钮 */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .top-bar-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px 10px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* 统计卡片美化版 */
    .result-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .result-stat-card {
        padding: 20px 12px 16px;
    }
    
    .result-stat-card .stat-value {
        font-size: 32px;
    }
    
    .result-stat-card .stat-icon {
        font-size: 22px;
    }
    
    .result-stat-card .stat-label {
        font-size: 13px;
    }
    
    .result-stat-card .stat-sublabel {
        font-size: 10px;
    }
    
    .result-stat-card .stat-ring {
        width: 80px;
        height: 80px;
    }
    
    /* 图表区域 */
    .analysis-charts-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .chart-card .card-body {
        padding: 12px;
        min-height: 200px;
    }
    
    .chart-container {
        min-height: 180px;
    }
    
    /* 横向柱状图 */
    .bar-label {
        flex: 0 0 70px;
        font-size: 11px;
    }
    
    .bar-track {
        height: 24px;
    }
    
    /* 风玫瑰图 */
    .wind-rose-container {
        width: 150px;
        height: 150px;
    }
    
    .wind-rose-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .wind-rose-item {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* 筛选区 */
    .filter-compact {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-section {
        width: 100%;
        min-width: unset;
    }
    
    .filter-section select,
    .filter-section input[type="date"] {
        width: 100%;
    }
    
    .filter-actions {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }
    
    .filter-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }
    
    .date-range-picker {
        flex-wrap: wrap;
    }
    
    .date-range-picker input {
        min-width: calc(50% - 20px);
    }
    
    /* 记录表格 */
    .records-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .records-table {
        font-size: 11px;
    }
    
    .records-table th,
    .records-table td {
        padding: 8px 4px;
    }
    
    .records-table .col-id { width: 40px; }
    .records-table .col-date { width: 70px; }
    .records-table .col-time { width: 55px; }
    .records-table .col-address { width: 100px; }
    .records-table .col-district { width: 60px; }
    .records-table .col-project { width: 60px; }
    .records-table .col-problem { width: 55px; }
    .records-table .col-location { width: 55px; }
    .records-table .col-score { width: 35px; }
    .records-table .col-reason { width: 80px; }
    .records-table .col-status { width: 60px; }
    .records-table .col-image { width: 60px; }
    .records-table .col-action { width: 40px; }
    
    .records-table .table-thumb {
        height: 60px;
    }
    
    .status-badge {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* 弹窗 */
    .modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    .modal-body {
        padding: 12px;
        max-height: calc(98vh - 60px);
    }
    
    /* 详情弹窗 */
    .detail-modal-container {
        flex-direction: column;
    }
    
    .detail-modal-left {
        flex: none;
        max-width: 100%;
    }
    
    .detail-modal-image {
        max-height: 250px;
    }
    
    .detail-modal-right {
        flex: 1;
    }
    
    .detail-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .detail-table .label-cell {
        width: 80px;
    }
    
    /* 设置页面 */
    .settings-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .settings-tab {
        flex: 1 1 calc(50% - 3px);
        min-width: calc(50% - 3px);
        padding: 12px 10px;
        font-size: 12px;
    }
    
    .settings-card {
        margin-bottom: 12px;
    }
    
    .settings-card-header {
        padding: 14px 12px;
    }
    
    .settings-card-header h3 {
        font-size: 14px;
    }
    
    .settings-card-body {
        padding: 14px 12px;
    }
    
    .settings-info-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-info-item {
        padding: 12px;
    }
    
    .settings-info-item .info-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .db-status-cards {
        grid-template-columns: 1fr;
    }
    
    /* 备份/清除选项 */
    .backup-create {
        flex-direction: column;
        gap: 12px;
    }
    
    .backup-create .btn {
        width: 100%;
    }
    
    .clear-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .clear-option-item .option-box {
        padding: 16px 12px;
        font-size: 13px;
    }
    
    /* 用户管理 */
    .user-add-form-inline {
        flex-direction: column;
        gap: 12px;
    }
    
    .user-add-form-inline .form-group {
        width: 100%;
    }
    
    .user-add-form-inline .btn-add {
        width: 100%;
    }
    
    .user-table th,
    .user-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .action-buttons .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* 拖拽上传区 */
    .drop-zone {
        padding: 24px 16px;
    }
    
    .drop-zone-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .drop-zone-text {
        font-size: 14px;
    }
    
    /* 报告预览 */
    .report-preview {
        padding: 16px;
        font-size: 12px;
    }
    
    /* 巡检处理页面 */
    .folder-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .folder-selector select {
        width: 100%;
    }
    
    .folder-selector .btn {
        width: 100%;
    }
    
    .folder-details {
        padding: 10px;
    }
    
    /* 标注弹窗 */
    .annotation-modal-content {
        width: 98%;
        max-width: 98vw;
    }
    
    .annotation-header {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .annotation-header h3 {
        font-size: 15px;
    }
    
    .annotation-container {
        padding: 10px;
    }
    
    #annotationCanvas {
        max-height: calc(98vh - 200px);
    }
    
    .annotation-footer {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .annotation-footer .btn {
        flex: 1;
        min-width: calc(50% - 5px);
    }
}

/* 超小屏幕手机 (320px - 374px) */
@media (max-width: 374px) {
    .page-title {
        font-size: 14px;
    }
    
    .top-bar {
        padding: 10px;
    }
    
    .content-area {
        padding: 10px;
    }
    
    .card-header h2 {
        font-size: 13px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .result-stat-card .stat-value {
        font-size: 26px;
    }
    
    .result-stat-card .stat-ring {
        width: 60px;
        height: 60px;
    }
    
    .filter-section label {
        font-size: 11px;
    }
    
    .filter-section select,
    .filter-section input {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* 中等屏幕手机 (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header {
        padding: 14px 10px;
    }
    
    .logo-img {
        max-height: 35px;
    }
    
    .logo-text,
    .nav-text,
    .version,
    .user-info .user-name,
    .btn-logout span {
        display: none;
    }
    
    .nav-item {
        padding: 12px 10px;
        justify-content: center;
    }
    
    .nav-icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-compact {
        flex-wrap: wrap;
    }
    
    .filter-section {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }
    
    .settings-tab {
        flex: 1 1 calc(50% - 4px);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .form-group input,
    .form-group select,
    .settings-tab,
    .nav-item,
    .clear-option-item,
    .user-table tbody tr {
        -webkit-tap-highlight-color: rgba(122, 158, 159, 0.2);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .records-table tbody tr:hover {
        background: inherit;
    }
    
    .records-table tbody tr:active {
        background: #f0f4f8;
    }
}

/* 防止页面缩放 */
@viewport {
    width: device-width;
    user-zoom: fixed;
    initial-scale: 1;
    maximum-scale: 1;
    minimum-scale: 1;
}

/* ============ 案件管理样式 ============ */
.case-stats-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.case-stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 140px;
}
.case-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.case-stat-card .stat-icon { font-size: 24px; }
.case-stat-card .stat-value { font-size: 28px; font-weight: 700; color: #333; }
.case-stat-card .stat-label { font-size: 12px; color: #666; }
.case-stat-card.total { border-left: 4px solid #dc3545; }
.case-stat-card.total .stat-icon { color: #dc3545; }
.case-stat-card.pending { border-left: 4px solid #dc3545; }
.case-stat-card.pending .stat-icon { color: #dc3545; }
.case-stat-card.pending .stat-value { color: #dc3545; }
.case-stat-card.verified { border-left: 4px solid #28a745; }
.case-stat-card.verified .stat-icon { color: #28a745; }
.case-stat-card.verified .stat-value { color: #28a745; }
.case-stat-card.concern { border-left: 4px solid #fd7e14; }
.case-stat-card.concern .stat-icon { color: #fd7e14; }
.case-stat-card.concern .stat-value { color: #fd7e14; }

/* 有问题 - 红色 */
.case-stat-card.issues { border-left: 4px solid #dc3545; }
.case-stat-card.issues .stat-icon { color: #dc3545; }
.case-stat-card.issues .stat-value { color: #dc3545; }

/* 无问题 - 绿色 */
.case-stat-card.ok { border-left: 4px solid #28a745; }
.case-stat-card.ok .stat-icon { color: #28a745; }
.case-stat-card.ok .stat-value { color: #28a745; }

/* 总扣分 - 橘色 */
.case-stat-card.deduction { border-left: 4px solid #fd7e14; }
.case-stat-card.deduction .stat-icon { color: #fd7e14; }
.case-stat-card.deduction .stat-value { color: #fd7e14; }

.cases-table-wrapper { max-height: 500px; overflow-y: auto; }
.cases-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cases-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}
.cases-table td { padding: 10px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
.cases-table tbody tr:hover { background-color: #f8f9fa; }

.reminder-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}
.reminder-badge.normal { background-color: #28a745; }
.reminder-badge.warning_7 { background-color: #ffc107; color: #333; }
.reminder-badge.warning_10 { background-color: #fd7e14; }
.reminder-badge.warning_15 { background-color: #dc3545; }
.reminder-badge.overdue { background-color: #8b0000; }

.case-status { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.case-status.pending { background: #fff3cd; color: #856404; }
.case-status.verified { background: #d4edda; color: #155724; }
.case-status.resolved { background: #cce5ff; color: #004085; }
.case-status.closed { background: #28a745; color: white; }

.verification-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.verification-status.verified { background: #d4edda; color: #155724; }
.verification-status.key-concern { background: #f8d7da; color: #721c24; }
.verification-status.no-check { background: #fff3cd; color: #856404; }

.case-legend { display: flex; gap: 15px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color { width: 16px; height: 16px; border-radius: 3px; }
.legend-color.normal { background-color: #28a745; }
.legend-color.warning7 { background-color: #ffc107; }
.legend-color.warning10 { background-color: #fd7e14; }
.legend-color.warning15 { background-color: #dc3545; }
.legend-color.overdue { background-color: #8b0000; }
.legend-color.verified { background-color: #28a745; border: 2px solid #155724; }

.messages-tabs { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; }
.msg-tab { padding: 8px 16px; border: none; background: #e9ecef; border-radius: 20px; cursor: pointer; transition: all 0.2s; }
.msg-tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.msg-tab:hover:not(.active) { background: #dee2e6; }
.unread-badge { background: #dc3545; color: white; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin-left: 5px; }
.messages-list { max-height: 400px; overflow-y: auto; }
.message-item { padding: 15px; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.message-item:hover { background: #f8f9fa; border-color: #667eea; }
.message-item.unread { border-left: 3px solid #667eea; background: #f0f4ff; }
.message-item.urgent { border-left: 3px solid #dc3545; }
.message-item .msg-title { font-weight: 600; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; }
.message-item .msg-meta { font-size: 12px; color: #666; display: flex; gap: 15px; }
.message-item .msg-preview { font-size: 13px; color: #666; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.message-priority { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.message-priority.normal { background: #e9ecef; color: #666; }
.message-priority.important { background: #ffc107; color: #333; }
.message-priority.urgent { background: #dc3545; color: white; }

/* ========== 案件筛选区 - 网格布局 ========== */
.case-filter-body {
    padding: 12px;
}

.case-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px 16px;
    width: 100%;
}

.case-filter-grid .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-filter-grid .filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.case-filter-grid .filter-group label i {
    font-size: 13px;
}

.case-filter-grid .filter-group input[type="date"],
.case-filter-grid .filter-group select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.case-filter-grid .filter-group input[type="date"]:focus,
.case-filter-grid .filter-group select:focus {
    border-color: #4b077c;
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 7, 124, 0.1);
}

.case-filter-grid .date-range-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-filter-grid .date-range-inline input[type="date"] {
    width: 130px;
}

.case-filter-grid .range-sep {
    color: #999;
    font-size: 12px;
}

.case-filter-grid .filter-group-btn {
    justify-content: flex-end;
}

.case-filter-grid .filter-group-btn label {
    height: 18px;
}

.case-filter-grid .filter-group-btn button {
    width: 100%;
    max-width: 120px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .case-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .case-filter-grid {
        grid-template-columns: 1fr;
    }
    
    .case-filter-grid .filter-group-btn {
        justify-content: flex-start;
    }
    
    .case-filter-grid .filter-group-btn button {
        max-width: none;
    }
}

/* 案件筛选区折叠样式 */
#tab-case-management .collapsible {
    overflow: hidden;
}

#tab-case-management .collapsible-header {
    cursor: pointer;
}

#tab-case-management .collapsible-header .bi-chevron-down {
    transition: transform 0.3s ease;
    margin-right: 8px;
    display: inline-block;
}

#tab-case-management .collapsible-body {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    border: none !important;
    transition: max-height 0.3s ease-out, opacity 0.3s ease, padding 0.3s ease !important;
}

#tab-case-management .collapsible.expanded .collapsible-body {
    max-height: 500px !important;
    opacity: 1 !important;
    padding: 12px 16px !important;
}

#tab-case-management .collapsible-header .bi-chevron-down {
    transform: rotate(-90deg);
}

#tab-case-management .collapsible.expanded .collapsible-header .bi-chevron-down {
    transform: rotate(0deg);
}

/* ========== 案件地图模态框样式 ========== */
.case-map-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.case-map-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}

.case-map-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.case-map-modal .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-map-modal .close-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.case-map-modal .modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.case-map-modal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.map-instructions {
    background: var(--primary-bg);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.map-instructions p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.map-instructions i {
    color: var(--primary-color);
    margin-right: 6px;
}

.case-map-container {
    width: 100%;
    min-height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#tiandituMapDiv {
    width: 100%;
    height: 400px;
}

.map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: var(--danger-bg);
    border-radius: var(--radius);
    color: var(--danger-color);
    text-align: center;
    padding: 20px;
}

.map-error small {
    color: var(--text-muted);
    display: block;
    margin-top: 8px;
}

.case-list-section {
    margin-top: 16px;
}

.case-list-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.case-marker-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.case-marker-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.15s;
    gap: 10px;
}

.case-marker-item:last-child {
    border-bottom: none;
}

.case-marker-item:hover {
    background: var(--bg-color);
}

.case-marker-item.in-range {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.case-marker-item .marker-icon {
    font-size: 16px;
}

.case-marker-item .marker-icon.normal {
    color: #dc3545;
}

.case-marker-item .marker-icon.verified {
    color: #28a745;
}

.case-marker-item .marker-icon.pending {
    color: #ffc107;
}

.case-marker-item .marker-info {
    flex: 1;
    min-width: 0;
}

.case-marker-item .marker-address {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-marker-item .marker-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.case-marker-item .marker-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.case-marker-item .marker-status.normal {
    background: #fff3cd;
    color: #856404;
}

.case-marker-item .marker-status.verified {
    background: #d4edda;
    color: #155724;
}

.case-marker-item .marker-status.pending {
    background: #fff3cd;
    color: #856404;
}

.more-cases {
    padding: 10px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-color);
}

.map-selection-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.map-selection-info .selection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.map-selection-info .selection-item:last-child {
    margin-bottom: 0;
}

.map-selection-info .selection-item label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
}

.map-selection-info .selection-item span {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.map-selection-info input[type="range"] {
    flex: 1;
    max-width: 200px;
}

/* 销号弹窗样式 */
.verification-modal-content {
    padding: 20px;
}

.verification-modal-content .verification-header {
    text-align: center;
    margin-bottom: 20px;
}

.verification-modal-content .verification-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.verification-case-info {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.verification-case-info .info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.verification-case-info .info-row:last-child {
    border-bottom: none;
}

.verification-case-info .info-row .label {
    width: 100px;
    color: var(--text-secondary);
}

.verification-case-info .info-row .value {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.verification-form-section h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verification-form-section h4 i {
    color: var(--primary-color);
}

.verification-form-section .form-group {
    margin-bottom: 12px;
}

.verification-form-section .form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
}

.verification-form-section .form-group label i {
    color: var(--primary-color);
}

.verification-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

/* Leaflet自定义标记样式 */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* 图片操作提示 */
.image-action-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.detail-image-wrapper:hover .image-action-hint {
    opacity: 1;
}

.clickable {
    cursor: pointer;
}

/* 案件详情弹窗中的销号详情样式 */
.verification-info {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    padding: 16px;
    border-radius: var(--radius);
}

.verification-info h4 {
    color: #155724 !important;
    border-bottom-color: #28a745 !important;
}

/* 案件详情弹窗中的销号表单样式 */
.verification-form {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px dashed var(--border-color);
}

.verification-form h4 {
    color: var(--text-primary) !important;
}

/* Leaflet地图容器的样式调整 */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
    margin: 10px 14px;
    font-size: 13px;
}
