/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

:root {
    --primary-color: #1890ff;
    --secondary-color: #52c41a;
    --danger-color: #f5222d;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e8e8e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    --radius: 4px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

header h1 {
    margin-bottom: 10px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #40a9ff;
}

.btn.secondary {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn.danger {
    background-color: var(--danger-color);
    color: white;
}

.btn.danger:hover {
    background-color: #ff4d4f;
}

/* 搜索和筛选区域 */
.search-filter {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    display: flex;
}

.search-container input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    width: 250px;
}

.search-container button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* 异常卡片列表 */
#exceptionsList {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exception-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.exception-info {
    flex: 1;
}

.exception-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.exception-header h3 {
    margin: 0;
    font-size: 16px;
}

.exception-id {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.unsolved {
    background-color: var(--danger-color);
}

.status-indicator.solved {
    background-color: var(--secondary-color);
}

.exception-details {
    margin-top: 5px;
    font-size: 14px;
}

.detail-item {
    margin-bottom: 5px;
    display: flex;
    gap: 8px;
}

.detail-label {
    font-weight: bold;
    min-width: 70px;
}

.exception-description {
    margin: 10px 0;
    line-height: 1.5;
}

.exception-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    padding: 4px;
}

.action-btn:hover {
    background-color: #f0f0f0;
    border-radius: var(--radius);
}

/* 图片区域 */
.images-container {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    min-width: 100px;
    max-width: 200px;
}

.exception-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.image-counter {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

.exception-images-wrapper {
    position: relative;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    box-shadow: var(--shadow);
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: black;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.status-options {
    display: flex;
    gap: 20px;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.status-circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.status-circle.unsolved {
    background-color: var(--danger-color);
}

.status-circle.solved {
    background-color: var(--secondary-color);
}

/* 图片预览区域 */
.preview-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-image-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
}

/* 图片模态框 */
.image-modal-content {
    max-width: 80%;
    padding: 20px;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.image-navigation {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 15px;
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* 复制选项模态框 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .exception-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .images-container {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        max-width: 100%;
    }
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state p {
    margin: 10px 0 20px;
    color: #888;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: var(--radius);
    background-color: #f0f0f0;
    box-shadow: var(--shadow);
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background-color: #f6ffed;
    border-left: 4px solid var(--secondary-color);
}

.message.error {
    background-color: #fff2f0;
    border-left: 4px solid var(--danger-color);
}

.message.info {
    background-color: #e6f7ff;
    border-left: 4px solid var(--primary-color);
} 