/* ================================================================
   医疗设备移动端 - 表单样式（报修 / 查询）
   ================================================================ */

/* ---- 顶部栏（报修页专用：X + 标题 + 首页） ---- */
.m-topbar--report { display: flex; align-items: center; justify-content: space-between; }
.m-topbar--report .m-home-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #24536e; border-radius: 50%; }
.m-topbar--report .m-home-link:hover { background: rgba(0, 0, 0, 0.04); }

/* ---- 表单容器 ---- */
.m-form { padding: 4px 12px 0; }
.m-form-row { padding: 10px 0; }
.m-form-label { display: flex; align-items: center; font-size: 15px; color: #333; margin-bottom: 8px; line-height: 1.2; }
.m-form-label .m-star { color: #e05348; margin-left: 4px; font-weight: normal; }
.m-form-row--action .m-form-label { justify-content: space-between; }
.m-form-row--action .m-line-link { color: #1f9b8a; font-size: 13px; }

/* ---- 输入控件 ---- */
.m-input, .m-select, .m-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #d9dce1;
    border-radius: 22px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}
.m-select { border-radius: 22px; padding-right: 30px; }
.m-textarea { border-radius: 8px; min-height: 96px; resize: vertical; line-height: 1.5; }
.m-input:focus, .m-select:focus, .m-textarea:focus { border-color: #1f9b8a; }

/* 带操作按钮的行 */
.m-field-row { display: flex; align-items: center; gap: 8px; }
.m-field-row .m-input, .m-field-row .m-select { flex: 1; min-width: 0; }
.m-scan-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; color: #1f9b8a; background: #f1f3f5; border-radius: 10px; }
.m-scan-btn:active { background: #e6e8eb; }

/* 下拉图标 */
.m-select-wrap { position: relative; }
.m-select-wrap .m-select-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9aa0aa; pointer-events: none; }

/* ---- 单选组 ---- */
.m-radio-group { display: flex; gap: 22px; }
.m-radio { display: flex; align-items: center; font-size: 14px; color: #333; cursor: pointer; }
.m-radio input { display: none; }
.m-radio .m-radio-dot { width: 22px; height: 22px; margin-right: 7px; border: 1px solid #c7ccd4; border-radius: 50%; position: relative; flex-shrink: 0; box-sizing: border-box; }
.m-radio input:checked + .m-radio-dot { border-color: #1f9b8a; }
.m-radio input:checked + .m-radio-dot::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; background: #1f9b8a; }

/* ---- 开关 ---- */
.m-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.m-switch input { display: none; }
.m-switch .m-switch-track { position: absolute; inset: 0; background: #cfd4db; border-radius: 26px; transition: 0.2s; }
.m-switch .m-switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.m-switch input:checked + .m-switch-track { background: #1f9b8a; }
.m-switch input:checked + .m-switch-track::after { left: 23px; }

/* ---- 上传区 ---- */
.m-upload-box { display: flex; justify-content: flex-end; margin: 6px 0 8px; }
.m-upload-trigger { padding: 6px 14px; font-size: 14px; color: #1f9b8a; border: 1px solid #1f9b8a; border-radius: 6px; background: #fff; cursor: pointer; }
.m-upload-preview { display: flex; flex-wrap: wrap; gap: 8px; min-height: 96px; padding: 8px; border: 1px dashed #d9dce1; border-radius: 8px; }
.m-upload-preview.empty { align-items: center; justify-content: center; color: #b8bdc6; font-size: 13px; }
.m-upload-preview .m-thumb { position: relative; width: 78px; height: 78px; border-radius: 6px; overflow: hidden; }
.m-upload-preview .m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-upload-preview .m-thumb .m-thumb-del { position: absolute; right: 0; top: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); color: #fff; font-size: 13px; cursor: pointer; }

/* ---- 底部提交栏 ---- */
.m-submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    height: 50px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #0aa98e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
    cursor: pointer;
}
.m-submit-bar:active { background: #0b9a81; }

/* ---- 查询页 ---- */
.m-query-hero { padding: 14px 12px 16px; background: linear-gradient(135deg, #1f5d7f 0%, #14a7c9 100%); color: #fff; }
.m-query-hero-title { font-size: 19px; font-weight: 600; color: #fff; }
.m-query-hero-sub { font-size: 12px; color: rgba(255, 255, 255, 0.85); margin-top: 2px; }
.m-query-hero .m-search-bar { padding: 14px 0 0; }
.m-query-hero .m-search-btn { background: #fff; color: #1f5d7f; font-weight: 600; }
.m-query-hint { padding: 10px 12px 4px; font-size: 12px; color: #9aa0aa; }

.m-search-bar { display: flex; gap: 8px; }
.m-search-bar .m-input { flex: 1; }
.m-search-btn { padding: 0 18px; background: #1f9b8a; color: #fff; font-size: 14px; border-radius: 22px; flex-shrink: 0; }

/* 结果卡片 */
.m-list-card { margin: 10px 12px; padding: 14px; background: #fff; border: 1px solid #eef0f2; border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); cursor: pointer; transition: transform 0.1s; }
.m-list-card:active { transform: scale(0.99); background: #fafbfc; }
.m-list-card .m-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.m-list-card .m-list-no { font-weight: 600; color: #333; font-size: 15px; }
.m-list-card .m-list-status { font-size: 12px; color: #fff; padding: 2px 9px; border-radius: 10px; }
.m-list-card .m-list-device { font-size: 14px; color: #1f5d7f; font-weight: 600; margin-top: 2px; }
.m-list-card .m-list-desc { font-size: 13px; color: #666; margin-top: 5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-list-card .m-list-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.m-list-card .m-list-time { font-size: 12px; color: #9aa0aa; }
.m-list-card .m-list-detail { display: flex; align-items: center; gap: 2px; font-size: 13px; color: #1f9b8a; }
.m-list-card .m-list-detail svg { display: inline; }

/* 空状态 */
.m-empty { text-align: center; padding: 50px 20px; }
.m-empty .m-empty-icon { font-size: 40px; }
.m-empty p { margin-top: 12px; font-size: 15px; color: #666; }
.m-empty span { font-size: 12px; color: #b8bdc6; }

/* ---- 明细页 ---- */
.m-detail-hero { padding: 20px 16px; background: linear-gradient(135deg, #1f5d7f 0%, #24536e 100%); color: #fff; }
.m-detail-hero-status { font-size: 26px; font-weight: 700; }
.m-detail-hero-no { font-size: 14px; margin-top: 4px; opacity: 0.9; }
.m-detail-hero-sub { font-size: 12px; margin-top: 6px; opacity: 0.7; }

.m-card { margin: 12px; padding: 14px; background: #fff; border: 1px solid #eef0f2; border-radius: 10px; }
.m-card-title { display: flex; align-items: center; font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; }
.m-card-title::before { content: ""; width: 3px; height: 14px; margin-right: 8px; border-radius: 2px; background: #1f9b8a; }

.m-info-grid { display: flex; flex-wrap: wrap; }
.m-info-item { width: 50%; display: flex; margin-bottom: 10px; font-size: 13px; line-height: 1.4; }
.m-info-item .m-info-label { flex-shrink: 0; color: #9aa0aa; margin-right: 6px; }
.m-info-item .m-info-val { color: #333; font-weight: 500; word-break: break-all; }

.m-detail-para { margin-bottom: 10px; }
.m-detail-para b { font-size: 13px; color: #9aa0aa; font-weight: 500; }
.m-detail-para p { font-size: 14px; color: #333; margin-top: 4px; line-height: 1.6; word-break: break-all; }
.m-detail-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.m-detail-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }

/* 维修时间线 */
.m-timeline { position: relative; padding-left: 18px; }
.m-tl-item { position: relative; padding: 0 0 20px; }
.m-tl-item:last-child { padding-bottom: 0; }
.m-tl-line { position: absolute; left: 5px; top: 14px; bottom: -6px; width: 2px; background: #e4e7eb; }
.m-tl-line.last { display: none; }
.m-tl-dot { position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.m-tl-body { margin-left: 20px; }
.m-tl-title { font-size: 15px; font-weight: 600; color: #333; line-height: 1.3; }
.m-tl-time { font-size: 12px; color: #9aa0aa; font-weight: 400; margin-left: 8px; }
.m-tl-desc { font-size: 13px; color: #666; margin-top: 4px; }

/* ---- 全局轻提示 / 加载 ---- */
.m-toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9); z-index: 9999; max-width: 70%; padding: 12px 18px; background: rgba(0, 0, 0, 0.76); color: #fff; font-size: 14px; border-radius: 8px; text-align: center; opacity: 0; transition: all 0.25s; pointer-events: none; }
.m-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.m-loading { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(0, 0, 0, 0.28); color: #fff; font-size: 14px; }
.m-loading-spinner { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: mSpin 0.8s linear infinite; }
@keyframes mSpin { to { transform: rotate(360deg); } }

/* Layui 日期控件在移动端下拉，宽度撑满 */
.layui-laydate { max-width: 100% !important; }
