/* 清道夫保洁考核 - 管理员样式补充 */

/* 二维码弹窗样式 */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

.qr-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.qr-item canvas {
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}

.qr-info {
    font-size: 12px;
    color: #666;
}

.qr-location {
    margin-bottom: 5px;
    line-height: 1.4;
}

.qr-code-text {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 11px;
}

.qr-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    gap: 10px;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-btns {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btns button {
    min-width: 40px;
}

/* 批量生成规则配置样式 */
.rule-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.rule-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.location-type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.location-type-item:last-child {
    border-bottom: none;
}

.location-type-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.location-type-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
}

.location-type-item input[type="number"] {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格增强 */
.data-table td {
    vertical-align: middle;
}

.data-table code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 12px;
}

/* 工具栏增强 */
.toolbar .search-input {
    max-width: 250px;
}

/* 统计卡片增强 */
.stats-grid .stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats-grid .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 面板增强 */
.panel .panel-header {
    background: #fafafa;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 列表项增强 */
.list-item:hover .item-title {
    color: #4CAF50;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 5px;
}

/* 表单增强 */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
}

/* 弹窗增强 */
.modal-content {
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* 分区详情弹窗样式 */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    line-height: 1.5;
}

.detail-label {
    width: 90px;
    color: #666;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #333;
}

.detail-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.detail-photo-item {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.detail-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.detail-photo-item:hover img {
    transform: scale(1.05);
}

/* 图片预览遮罩层 */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.photo-overlay-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.photo-overlay-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.photo-overlay .close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 36px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式 */
@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
    
    .main-content {
        margin-left: 180px;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .nav-item {
        padding: 10px 15px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar .search-input,
    .toolbar select,
    .toolbar input {
        width: 100%;
    }
}

/* 加载动画 */
.loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态图标 */
.empty::before {
    content: '📭';
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
}

/* 提示信息 */
.tip-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 表格操作列 */
.data-table .action-cell {
    white-space: nowrap;
}

/* 状态指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-indicator.green { color: #4CAF50; }
.status-indicator.yellow { color: #FF9800; }
.status-indicator.red { color: #F44336; }

/* 卡片统计 */
.card-stat {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.card-stat .value {
    font-size: 36px;
    font-weight: 600;
}

.card-stat .label {
    font-size: 14px;
    opacity: 0.9;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
}

/* 标签页 */
.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    font-size: 14px;
}

.tab-item:hover {
    color: #333;
}

.tab-item.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

/* 时间线 */
.timeline {
    padding-left: 20px;
    border-left: 2px solid #eee;
}

.timeline-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
}

.timeline-item .time {
    font-size: 12px;
    color: #999;
}

.timeline-item .content {
    margin-top: 5px;
}

/* 头像 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* 徽章计数 */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: #F44336;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    padding: 0 6px;
    margin-left: 5px;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}
