/* 清道夫保洁考核 - 移动端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    padding: 0;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 18px;
    font-weight: 500;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 24px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

/* 区域信息 */
.zone-info {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
}

.zone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #999;
}

.zone-header.green .status-dot { background: #4CAF50; }
.zone-header.yellow .status-dot { background: #FF9800; }
.zone-header.red .status-dot { background: #F44336; }

.status-text {
    font-size: 14px;
    font-weight: 500;
}

.zone-details {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-row .label {
    color: #666;
    width: 70px;
}

.detail-row .value {
    color: #333;
    flex: 1;
}

.detail-row .code {
    font-family: monospace;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.zone-info-bar {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.zone-info-bar.yellow {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.zone-info-bar.red {
    background: linear-gradient(135deg, #F44336, #D32F2F);
}

.zone-location {
    font-size: 16px;
    font-weight: 500;
}

.zone-status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.zone-qr {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
}

.zone-code {
    font-size: 12px;
    color: #999;
    text-align: center;
    font-family: monospace;
}

.inspector-info {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 10px;
}

/* 操作卡片 */
.action-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:active {
    transform: scale(0.98);
}

.card-icon {
    font-size: 40px;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.card-desc {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* 表单容器 */
.form-container {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-group textarea {
    resize: none;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-item {
    flex: 1;
    cursor: pointer;
}

.radio-item input {
    display: none;
}

.radio-label {
    display: block;
    padding: 15px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.radio-item input:checked + .radio-label {
    border-color: currentColor;
    background: currentColor;
    color: white;
}

.radio-label.green {
    color: #4CAF50;
}

.radio-label.red {
    color: #F44336;
}

.radio-item input:checked + .radio-label.green {
    background: #4CAF50;
}

.radio-item input:checked + .radio-label.red {
    background: #F44336;
}

/* 照片上传 */
.photo-upload {
    position: relative;
}

.photo-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    min-height: 100px;
}

.upload-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #999;
    font-size: 14px;
}

.camera-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #F44336;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

.tips {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-top: 15px;
}

/* 提示框 */
.tips-box {
    background: #E8F5E9;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.tips-box p {
    font-size: 13px;
    color: #2E7D32;
    margin-bottom: 5px;
}

.tips-box p:last-child {
    margin-bottom: 0;
}

/* 历史记录列表 */
.list-container {
    padding: 15px;
}

.history-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
}

.result-badge.good {
    background: #4CAF50;
}

.result-badge.problem {
    background: #F44336;
}

.history-time {
    font-size: 12px;
    color: #999;
}

.history-body {
    font-size: 14px;
}

.inspector {
    color: #666;
    margin-bottom: 5px;
}

.remark {
    color: #333;
    margin-bottom: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.photo-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* 图片预览遮罩层 */
.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: 1000;
    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;
}

/* 加载和空状态 */
.loading, .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.error-box {
    text-align: center;
    padding: 40px 20px;
}

.error-box p {
    color: #F44336;
    margin-bottom: 20px;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 12px;
}

/* 照片预览模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}
