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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e4e7ed;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-count {
    color: #909399;
    font-size: 14px;
}

.btn-refresh {
    padding: 8px 16px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-refresh:hover {
    background: #66b1ff;
}

/* 筛选区 */
.filter-section {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-row select,
.filter-row input {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.filter-row select:focus,
.filter-row input:focus {
    border-color: #409eff;
}

.filter-row input[type="date"] {
    width: 140px;
}

.filter-row input[type="text"] {
    width: 180px;
}

.date-sep {
    color: #909399;
    font-size: 14px;
}

.date-hint {
    color: #909399;
    font-size: 12px;
    margin-left: 4px;
}

.btn-search, .btn-reset {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-search {
    background: #409eff;
    color: #fff;
}

.btn-search:hover {
    background: #66b1ff;
}

.btn-reset {
    background: #f4f4f5;
    color: #606266;
}

.btn-reset:hover {
    background: #e9e9eb;
}

/* 卡片列表 */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #909399;
}

/* 问题卡片 */
.issue-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s;
}

.issue-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.issue-id {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #909399;
    background: #f5f7fa;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.room-name {
    font-size: 14px;
    color: #606266;
    max-width: 800px;
    word-break: break-all;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

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

.tag-priority {
    font-weight: 500;
    color: #fff;
}

.tag-priority.p0 {
    background: #ff4d4f;
    color: #fff;
}

.tag-priority.p1 {
    background: #fa8c16;
    color: #fff;
}

.tag-priority.p2 {
    background: #1890ff;
    color: #fff;
}

.tag-type {
    background: #f0f0f0;
    color: #595959;
}

/* 问题类型颜色 */
.tag-type.智能镜 {
    background: #e6f7ff;
    color: #1890ff;
}

.tag-type.指导仪 {
    background: #fcffe6;
    color: #aeb527;
}

.tag-type.产品 {
    background: #f6ffed;
    color: #52c41a;
}

.tag-type.培训 {
    background: #f9f0ff;
    color: #722ed1;
}

.tag-type.账号 {
    background: #fff0f6;
    color: #eb2f96;
}

.tag-type.小鹅通 {
    background: #e6fffb;
    color: #13c2c2;
}

.tag-type.发票 {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-type.物流 {
    background: #e6f7ff;
    color: #1890ff;
}

.tag-type.其他 {
    background: #f5f5f5;
    color: #8c8c8c;
}

.tag-status {
    background: #f0f0f0;
    color: #595959;
}

.tag-status.已解决 {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag-status.处理中 {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.tag-status.待确认 {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.tag-status.推进解决 {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag-status.待响应 {
    background: #fff0f6;
    color: #eb2f96;
    border: 1px solid #ffadd2;
}

.btn-edit {
    padding: 6px 16px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-edit:hover {
    background: #66b1ff;
}

/* 卡片内容区 */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    gap: 12px;
}

.info-label {
    flex-shrink: 0;
    width: 80px;
    font-size: 13px;
    color: #909399;
    font-weight: 500;
}

.info-content {
    flex: 1;
    font-size: 14px;
    color: #303133;
    line-height: 1.7;
}

.info-content.highlight {
    font-weight: 500;
    color: #1a1a1a;
}

/* 备注区域 */
.remark-section {
    background: #fafafa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 4px;
}

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

.remark-content {
    font-size: 14px;
    color: #606266;
}

/* 卡片底部 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.footer-info {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #909399;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-label {
    color: #c0c4cc;
}

.footer-value {
    color: #606266;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

#page-info {
    color: #606266;
    font-size: 14px;
}

.btn-page {
    padding: 8px 20px;
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-page:hover:not(:disabled) {
    color: #409eff;
    border-color: #409eff;
}

.btn-page:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-close {
    font-size: 24px;
    color: #909399;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #409eff;
}

.modal-body {
    padding: 20px 24px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #909399;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: #409eff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.detail-value {
    font-size: 14px;
    color: #303133;
}

.detail-content {
    font-size: 14px;
    color: #303133;
    line-height: 1.7;
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
}

hr {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 20px 0;
}

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

.btn-cancel {
    padding: 10px 24px;
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-cancel:hover {
    color: #409eff;
    border-color: #409eff;
}

.btn-save {
    padding: 10px 24px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-save:hover {
    background: #66b1ff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #909399;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state .text {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    #app {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .filter-row {
        gap: 8px;
    }
    
    .filter-row select,
    .filter-row input {
        width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .card-tags {
        order: -1;
    }
    
    .info-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .info-label {
        width: auto;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
