* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #f5f5f5; color: #333; max-width: 480px; margin: 0 auto; min-height: 100vh; }
.page { display: none; }
.page.active { display: block; }
.header { background: linear-gradient(135deg, #4a90d9, #357abd); color: #fff; padding: 20px; position: relative; }
.header h2 { font-size: 20px; }
.subtitle { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.back-btn { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.2); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.form-card { padding: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #333; }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 15px; background: #fff; outline: none; -webkit-appearance: none; }
input:focus, select:focus, textarea:focus { border-color: #4a90d9; }
textarea { resize: vertical; min-height: 80px; }
.btn { display: inline-block; padding: 14px 20px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; transition: all .2s; }
.btn-primary { background: #4a90d9; color: #fff; }
.btn-primary:active { background: #357abd; }
.btn-outline { background: #fff; color: #4a90d9; border: 1px solid #4a90d9; margin-top: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* 分类选择 */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.category-item { padding: 14px 8px; text-align: center; background: #fff; border: 2px solid #e8e8e8; border-radius: 10px; cursor: pointer; transition: all .2s; font-size: 13px; font-weight: 500; }
.category-item.active { border-color: #4a90d9; background: #e6f0fa; color: #4a90d9; }
.category-item .icon { font-size: 24px; margin-bottom: 4px; }

/* 图片上传 */
.image-upload { display: flex; flex-wrap: wrap; gap: 10px; }
.image-preview-list { display: contents; }
.image-preview { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; position: relative; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.upload-btn { width: 80px; height: 80px; border: 2px dashed #d0d0d0; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fafafa; }
.upload-btn span { font-size: 28px; color: #bbb; }

/* 成功页 */
.success-card { text-align: center; padding: 60px 30px 40px; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-card h2 { font-size: 22px; margin-bottom: 8px; }
.ticket-no { font-size: 16px; color: #4a90d9; font-weight: 600; margin-bottom: 8px; }
.hint { font-size: 13px; color: #999; margin-bottom: 30px; }

/* 查询结果 */
.ticket-card { background: #fff; border-radius: 10px; padding: 16px; margin-top: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ticket-card .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f5f5f5; }
.ticket-card .row:last-child { border-bottom: none; }
.ticket-card .label { color: #999; }
.status { padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.status-pending { background: #fff7e6; color: #fa8c16; }
.status-assigned { background: #e6f7ff; color: #1890ff; }
.status-in_progress { background: #f6ffed; color: #52c41a; }
.status-completed { background: #f0f0f0; color: #666; }

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px; z-index: 2000; opacity: 0; transition: opacity .3s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.success { background: rgba(82,196,26,.9); }
.toast.error { background: rgba(255,77,79,.9); }
.toast.info { background: rgba(0,0,0,.7); }

/* Loading */
.loading { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; margin-right: 6px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.page-footer { text-align: center; padding: 16px 20px; margin-top: 20px; }
.page-footer a { color: #999; font-size: 12px; text-decoration: none; }
.page-footer a:hover { color: #666; }
