﻿/* ==========================================================================
   formmanage.css - FormManage 移动版专属样式
   版本: v=20260822b
   设计参考: ConferenceShow 主色 #2A7AE5, 玻璃卡 + 圆角 14-18px, Ant Design 风格
   v=20260821a: 上传组件 UI 打磨 (按钮渐变+图标, 字段级 loading spinner, 图片预览阴影,
                文件卡片, 进度条渐变) 对齐大厂移动标准
   v=20260822a: 模板库功能 - 视图切换分段 Tab (我的表单|模板库), 紫色"模板"徽标,
                模板操作按钮配色 (设为/取消模板紫, 从模板创建主题蓝)
   v=20260822b/c: fill.aspx 21 字段类型对齐 (section/rating/signature/richeditor/address/
                location/time/datetime/unknown, 必填/唯一/只读徽标, 省市区级联, 签名板)
   v=20260823a: 移动版表单设计器 designer.aspx - 工具栏(模式Tab+保存三态)/画布卡片(角标+拖拽把手)/
                类型底板(六组网格)/属性底板(表单行+开关+选项编辑器)/预览(填表人视角简化渲染)
   ========================================================================== */

/* ----------------------------- 基础页面 ----------------------------- */
.fm-page { padding-bottom: 80px; min-height: 100vh; background: #f5f8fc; }

/* ----------------------------- 按钮 ----------------------------- */
.fm-btn-primary, .fm-btn-default, .fm-btn-danger, .fm-btn-text-danger {
    border: none; cursor: pointer; font-size: 14px; font-weight: 500;
    padding: 10px 20px; border-radius: 10px; transition: all 0.15s;
    -webkit-appearance: none; appearance: none;
}
.fm-btn-primary { background: linear-gradient(135deg, #2A7AE5, #145fc1); color: #fff; box-shadow: 0 4px 10px rgba(42,122,229,0.25); }
.fm-btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(42,122,229,0.3); }
.fm-btn-primary:disabled { background: #b8cce8; box-shadow: none; cursor: not-allowed; }
.fm-btn-default { background: #fff; color: #36516d; border: 1px solid rgba(42,122,229,0.2); }
.fm-btn-default:active { background: #f0f5fb; transform: scale(0.97); }
.fm-btn-danger { background: linear-gradient(135deg, #e53e3e, #c11d1d); color: #fff; box-shadow: 0 4px 10px rgba(229,62,62,0.25); }
.fm-btn-danger:active { transform: scale(0.97); }
.fm-btn-text-danger { background: transparent; color: #e53e3e; padding: 6px 12px; }
.fm-btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.fm-btn-block { display: block; width: 100%; padding: 14px; font-size: 15px; }

/* ----------------------------- 列表页工具栏 ----------------------------- */
.fm-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #fff;
    position: sticky; top: 48px; z-index: 40;
    border-bottom: 1px solid rgba(42,122,229,0.08);
}
.fm-search-wrap {
    flex: 1; position: relative; display: flex; align-items: center;
    background: #f5f8fc; border-radius: 22px; padding: 0 14px;
}
.fm-search-icon { width: 16px; height: 16px; color: #9aa8b8; flex-shrink: 0; }
.fm-search-input {
    flex: 1; border: none; background: transparent; padding: 8px 8px;
    font-size: 14px; color: #102033; outline: none;
}
.fm-search-input::placeholder { color: #9aa8b8; }
.fm-status-filter {
    border: 1px solid rgba(42,122,229,0.2); background: #fff; color: #36516d;
    padding: 8px 10px; border-radius: 8px; font-size: 13px; outline: none;
    max-width: 100px;
}

/* ----------------------------- 表单卡片 ----------------------------- */
.fm-list { padding: 10px 12px; }
.fm-card {
    background: #fff; border-radius: 16px; margin-bottom: 12px;
    overflow: hidden; box-shadow: 0 4px 16px rgba(24,70,128,0.06);
    transition: transform 0.15s;
}
.fm-card:active { transform: scale(0.99); }
.fm-card-body { display: flex; gap: 12px; padding: 14px; cursor: pointer; }
.fm-card-cover {
    width: 80px; height: 80px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
    background: #f0f5fb;
}
.fm-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fm-card-title-row { display: flex; align-items: center; gap: 8px; }
.fm-card-title {
    flex: 1; font-size: 15px; font-weight: 600; color: #102033;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-card-desc {
    font-size: 12px; color: #6b7f97; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fm-card-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    font-size: 12px; color: #6b7f97; margin-top: 4px;
}
.fm-card-meta-item { white-space: nowrap; }
.fm-card-meta-dot { color: #cfd9e5; }
.fm-card-time { font-size: 11px; color: #9aa8b8; margin-top: 2px; }

/* 状态徽标 */
.fm-status-badge {
    font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500;
    white-space: nowrap; flex-shrink: 0;
}
.fm-status-active { background: rgba(41,179,95,0.12); color: #29b35f; }
.fm-status-notstarted { background: rgba(245,166,35,0.14); color: #d68310; }
.fm-status-ended { background: rgba(154,168,184,0.18); color: #6b7f97; }
.fm-status-disabled { background: rgba(207,19,34,0.12); color: #cf1322; }
/* 模板徽标 (对齐 FLogin status-template 紫色) */
.fm-status-template { background: rgba(114,46,209,0.12); color: #722ed1; }

/* ----------------------------- 视图切换分段 Tab (我的表单 | 模板库) ----------------------------- */
.fm-view-tabs {
    display: flex; background: #fff; padding: 10px 12px 0;
    border-bottom: 1px solid rgba(42,122,229,0.08);
}
.fm-view-tabs-inner {
    display: flex; flex: 1; background: #f0f5fb; border-radius: 10px; padding: 3px;
}
.fm-view-tab {
    flex: 1; border: none; background: transparent; padding: 7px 0;
    border-radius: 8px; font-size: 14px; color: #6b7f97; cursor: pointer;
    transition: all 0.15s; -webkit-appearance: none; appearance: none;
}
.fm-view-tab.active {
    background: #fff; color: #2A7AE5; font-weight: 600;
    box-shadow: 0 2px 6px rgba(24,70,128,0.1);
}

/* 卡片操作行 */
.fm-card-actions {
    display: flex; border-top: 1px solid rgba(42,122,229,0.06);
    background: #fafcff;
}
.fm-card-actions-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; background: transparent; border: none; cursor: pointer;
    color: #36516d; font-size: 11px; transition: background 0.15s;
}
.fm-card-actions-btn:active { background: rgba(42,122,229,0.06); }
.fm-card-actions-btn svg { width: 18px; height: 18px; }
.fm-card-actions-btn span { white-space: nowrap; }
.fm-card-actions-btn.danger { color: #e53e3e; }
.fm-card-actions-btn.copy { color: #29b35f; }
/* 模板操作: 设为/取消模板用紫色 (对齐 FLogin #722ed1), 从模板创建用主题蓝 (正向主操作) */
.fm-card-actions-btn.tpl { color: #722ed1; }
.fm-card-actions-btn.fromtpl { color: #2A7AE5; font-weight: 600; }

/* ----------------------------- FAB ----------------------------- */
.fm-fab {
    position: fixed; right: 18px; bottom: 30px; z-index: 60;
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #2A7AE5, #145fc1); color: #fff;
    border: none; padding: 14px 22px; border-radius: 28px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 8px 20px rgba(42,122,229,0.4);
    transition: transform 0.15s;
}
.fm-fab:active { transform: scale(0.95); }
.fm-fab svg { width: 18px; height: 18px; }

/* ----------------------------- 分享 Modal ----------------------------- */
.fm-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; }
.fm-modal-mask {
    position: absolute; inset: 0; background: rgba(15,32,51,0.5);
    opacity: 0; transition: opacity 0.25s;
}
.fm-modal.show .fm-modal-mask { opacity: 1; }
.fm-modal-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #fff; border-radius: 18px 18px 0 0; padding: 16px 20px 24px;
    transform: translateY(100%); transition: transform 0.3s;
    max-height: 90vh; overflow-y: auto;
}
.fm-modal.show .fm-modal-sheet { transform: translateY(0); }
.fm-modal-handle {
    width: 36px; height: 4px; background: #d8e0ea; border-radius: 2px;
    margin: 0 auto 14px;
}
.fm-modal-title { font-size: 17px; font-weight: 600; color: #102033; text-align: center; margin-bottom: 4px; }
.fm-modal-subtitle { font-size: 13px; color: #6b7f97; text-align: center; margin-bottom: 16px; }
.fm-qr-wrap {
    width: 220px; height: 220px; margin: 0 auto 14px;
    background: #fff; border: 1px solid rgba(42,122,229,0.1);
    border-radius: 12px; padding: 10px;
    display: flex; align-items: center; justify-content: center;
}
.fm-qr-canvas { max-width: 100%; max-height: 100%; display: block; }
.fm-qr-img { max-width: 100%; max-height: 100%; display: block; -webkit-user-select: none; user-select: none; }
.fm-qr-error { font-size: 13px; color: #cf1322; text-align: center; padding: 60px 10px; }
.fm-qr-tip { font-size: 12px; color: #9aa8b8; text-align: center; margin-bottom: 12px; }
.fm-share-link-wrap { display: flex; gap: 8px; margin-bottom: 14px; }
.fm-share-link {
    flex: 1; border: 1px solid rgba(42,122,229,0.15); background: #f5f8fc;
    padding: 8px 10px; border-radius: 8px; font-size: 12px; color: #36516d;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-modal-actions { display: flex; gap: 8px; }
.fm-modal-actions .fm-btn-default,
.fm-modal-actions .fm-btn-primary { flex: 1; }

/* ----------------------------- 编辑页 ----------------------------- */
.fm-edit-page { padding-bottom: 80px; }
.fm-edit-body { padding: 12px; }
.fm-edit-section {
    background: #fff; border-radius: 14px; padding: 14px;
    margin-bottom: 10px; box-shadow: 0 2px 8px rgba(24,70,128,0.04);
}
.fm-edit-label {
    font-size: 14px; font-weight: 600; color: #36516d; margin-bottom: 10px;
}
.fm-required { color: #e53e3e; margin-left: 2px; }
.fm-edit-hint { font-size: 12px; color: #9aa8b8; margin-top: 6px; line-height: 1.5; }
.fm-form-input, .fm-form-textarea, .fm-form-select {
    width: 100%; border: 1px solid rgba(42,122,229,0.18);
    background: #fff; color: #102033; font-size: 14px;
    padding: 11px 12px; border-radius: 10px; outline: none;
    box-sizing: border-box; transition: border-color 0.15s;
    font-family: inherit;
}
.fm-form-input:focus, .fm-form-textarea:focus, .fm-form-select:focus {
    border-color: #2A7AE5; box-shadow: 0 0 0 3px rgba(42,122,229,0.1);
}
.fm-form-textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.fm-char-count { text-align: right; font-size: 11px; color: #9aa8b8; margin-top: 4px; }

/* 封面上传 */
.fm-cover-upload {
    width: 100%; height: 160px; background: #f5f8fc;
    border: 2px dashed rgba(42,122,229,0.25); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; transition: border-color 0.15s;
}
.fm-cover-upload:active { border-color: #2A7AE5; }
.fm-cover-upload img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-cover-placeholder { font-size: 13px; color: #9aa8b8; }
.fm-cover-actions { display: flex; gap: 8px; margin-top: 8px; }

/* 上传进度条 */
.upload-progress {
    width: 100%; height: 4px; background: #e6edf5;
    border-radius: 2px; overflow: hidden; margin-top: 6px;
}
.upload-progress-bar {
    height: 100%; background: linear-gradient(90deg, #2A7AE5, #145fc1);
    transition: width 0.2s; width: 0;
}

/* 状态切换 */
.fm-status-toggle {
    display: flex; background: #f0f5fb; border-radius: 10px; padding: 4px;
}
.fm-status-option {
    flex: 1; padding: 9px 12px; border: none; background: transparent;
    color: #6b7f97; font-size: 14px; font-weight: 500; cursor: pointer;
    border-radius: 8px; transition: all 0.15s;
}
.fm-status-option.active {
    background: #fff; color: #2A7AE5;
    box-shadow: 0 2px 6px rgba(42,122,229,0.18);
}

/* 编辑页底部操作栏 */
.fm-edit-footer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; gap: 10px; padding: 12px;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(42,122,229,0.1);
}
.fm-edit-footer button { flex: 1; padding: 13px; }

/* ----------------------------- 字段列表页 ----------------------------- */
.fm-fields-tip {
    padding: 10px 14px; font-size: 12px; color: #9aa8b8;
    background: #fff; border-bottom: 1px solid rgba(42,122,229,0.06);
}
.fm-field-list { padding: 12px; }
.fm-field-card {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border-radius: 14px; padding: 12px;
    margin-bottom: 8px; box-shadow: 0 2px 8px rgba(24,70,128,0.05);
    transition: box-shadow 0.2s, transform 0.15s;
}
.fm-field-card.dragging {
    box-shadow: 0 12px 28px rgba(24,70,128,0.25);
    transform: scale(1.02); opacity: 0.92;
}
.fm-field-drag-handle {
    width: 24px; height: 24px; color: #cfd9e5; cursor: grab;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fm-field-drag-handle svg { width: 18px; height: 18px; }
.fm-field-main { flex: 1; min-width: 0; }
.fm-field-name-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.fm-field-name {
    font-size: 14px; font-weight: 600; color: #102033;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-required-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: rgba(229,62,62,0.1); color: #e53e3e; flex-shrink: 0;
}
.fm-field-meta {
    display: flex; align-items: center; gap: 8px; font-size: 11px; color: #9aa8b8;
}
.fm-field-type-badge {
    font-size: 10px; padding: 2px 7px; border-radius: 9px;
    font-weight: 500; white-space: nowrap;
}
.fm-field-sort { font-size: 11px; color: #cfd9e5; }

/* 11 种字段类型颜色 */
.fm-type-text { background: rgba(42,122,229,0.12); color: #2A7AE5; }
.fm-type-textarea { background: rgba(19,163,184,0.12); color: #13a3b8; }
.fm-type-phone { background: rgba(41,179,95,0.12); color: #29b35f; }
.fm-type-idcard { background: rgba(123,97,255,0.12); color: #7b61ff; }
.fm-type-date { background: rgba(245,166,35,0.14); color: #d68310; }
.fm-type-choice { background: rgba(184,134,11,0.12); color: #b8860b; }
.fm-type-number { background: rgba(0,150,136,0.12); color: #009688; }
.fm-type-image { background: rgba(233,30,99,0.12); color: #e91e63; }
.fm-type-file { background: rgba(96,125,139,0.14); color: #607d8b; }

/* 字段卡片右侧操作 */
.fm-field-arrows { display: flex; flex-direction: column; gap: 2px; }
.fm-arrow-btn {
    width: 24px; height: 20px; padding: 0; border: none; background: transparent;
    color: #9aa8b8; cursor: pointer; display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
}
.fm-arrow-btn:active { background: rgba(42,122,229,0.08); }
.fm-arrow-btn:disabled { color: #d8e0ea; cursor: not-allowed; }
.fm-arrow-btn svg { width: 14px; height: 14px; }
.fm-field-ops { display: flex; gap: 4px; }
.fm-field-btn {
    width: 32px; height: 32px; padding: 0; border: none; background: transparent;
    color: #36516d; cursor: pointer; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: background 0.15s;
}
.fm-field-btn:active { background: rgba(42,122,229,0.08); }
.fm-field-btn.danger { color: #e53e3e; }
.fm-field-btn svg { width: 18px; height: 18px; }

/* 拖拽占位符 */
.fm-field-placeholder {
    background: rgba(42,122,229,0.08); border: 2px dashed rgba(42,122,229,0.3);
    border-radius: 14px; margin-bottom: 8px;
}

/* 添加字段按钮 */
.fm-add-field-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    background: #fff; color: #2A7AE5;
    border: 2px dashed rgba(42,122,229,0.3); border-radius: 14px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background 0.15s;
}
.fm-add-field-btn:active { background: #f5f8fc; }
.fm-add-field-btn svg { width: 18px; height: 18px; }

/* ----------------------------- 字段编辑页 ----------------------------- */
.fm-options-list { margin-bottom: 10px; }
.fm-option-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.fm-option-idx {
    width: 22px; height: 22px; flex-shrink: 0;
    background: rgba(42,122,229,0.1); color: #2A7AE5;
    border-radius: 50%; font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.fm-option-input {
    flex: 1; border: 1px solid rgba(42,122,229,0.18); background: #fff;
    padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #102033;
    outline: none; transition: border-color 0.15s;
}
.fm-option-input:focus { border-color: #2A7AE5; box-shadow: 0 0 0 3px rgba(42,122,229,0.1); }
.fm-option-del {
    width: 30px; height: 30px; flex-shrink: 0;
    border: none; background: rgba(229,62,62,0.08); color: #e53e3e;
    border-radius: 50%; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.fm-option-del:active { background: rgba(229,62,62,0.18); }
.fm-add-option-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: rgba(42,122,229,0.08); color: #2A7AE5;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 500;
    cursor: pointer;
}
.fm-add-option-btn svg { width: 14px; height: 14px; }

/* ----------------------------- 公共填表页 ----------------------------- */
.fm-fill-page { padding-bottom: 80px; }
.fm-fill-header {
    position: relative; overflow: hidden;
    padding: 18px 16px;
    background: linear-gradient(165deg, #eef5ff 0%, #f9fbff 52%, #eef4fb 100%);
    color: #102033;
}
/* 右上角极淡装饰光晕, 增加透气感 (非色块) */
.fm-fill-header::before {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(42,122,229,0.12), rgba(42,122,229,0) 70%);
    pointer-events: none;
}
.fm-fill-cover {
    position: relative;
    width: 100%; height: auto; aspect-ratio: 535 / 315; margin-bottom: 14px;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 4px 14px rgba(24,70,128,0.10);
}
/* v20261007a: 封面按 535:315 原始比例显示, 不支持 aspect-ratio 的旧浏览器回退 177px 高 */
.fm-fill-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
@supports not (aspect-ratio: 535 / 315) { .fm-fill-cover { height: 177px; } }
.fm-fill-title { position: relative; font-size: 19px; font-weight: 700; margin-bottom: 6px; line-height: 1.35; color: #102033; }
.fm-fill-desc { position: relative; font-size: 13px; color: #5b6b7f; line-height: 1.6; margin-bottom: 6px; }
.fm-fill-daterange { position: relative; font-size: 12px; color: #8a94a6; }

.fm-fill-body { padding: 12px; }
.fm-fill-field {
    background: #fff; border-radius: 14px; padding: 14px;
    margin-bottom: 10px; box-shadow: 0 2px 8px rgba(24,70,128,0.04);
}
.fm-fill-label {
    font-size: 14px; font-weight: 600; color: #36516d; margin-bottom: 10px;
    display: flex; align-items: center; gap: 2px;
}
.fm-fill-label-text { flex: 1; }
.fm-fill-required-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: rgba(229,62,62,0.1); color: #e53e3e;
    margin-left: 4px; font-weight: 500; flex-shrink: 0;
}
/* 必填字段整张卡片左侧加红色边框,视觉强化 */
.fm-fill-field.is-required { border-left: 3px solid #e53e3e; padding-left: 12px; }
/* 只读字段: 浅灰背景 + 灰色边框, 视觉提示用户不可编辑 */
.fm-fill-field.is-readonly { background: #f5f8fc; }
/* 唯一字段徽标 (与必填徽标同尺寸, 紫色对齐 type-badge 颜色族) */
.fm-fill-unique-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: rgba(114, 46, 209, 0.12); color: #722ed1;
    margin-left: 4px; font-weight: 500; flex-shrink: 0;
}
/* 只读徽标 (中性灰) */
.fm-fill-readonly-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: rgba(154, 168, 184, 0.18); color: #6b7f97;
    margin-left: 4px; font-weight: 500; flex-shrink: 0;
}
/* 字段下方提示 (灰色小字) */
.fm-fill-hint {
    font-size: 12px; color: #9aa8b8; line-height: 1.5; margin-top: 8px;
}
.fm-fill-input, .fm-fill-textarea, .fm-fill-select {
    width: 100%; border: 1px solid rgba(42,122,229,0.18);
    background: #fff; color: #102033; font-size: 14px;
    padding: 11px 12px; border-radius: 10px; outline: none;
    box-sizing: border-box; font-family: inherit;
}
.fm-fill-input:focus, .fm-fill-textarea:focus, .fm-fill-select:focus {
    border-color: #2A7AE5; box-shadow: 0 0 0 3px rgba(42,122,229,0.1);
}
.fm-fill-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* 单选/多选 */
.fm-fill-radio-group, .fm-fill-checkbox-group { display: flex; flex-direction: column; gap: 4px; }
.fm-fill-radio, .fm-fill-checkbox {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; background: #f5f8fc;
    border-radius: 10px; cursor: pointer; font-size: 14px; color: #102033;
    transition: background 0.15s;
}
.fm-fill-radio:active, .fm-fill-checkbox:active { background: #eaf1fb; }
.fm-fill-radio input, .fm-fill-checkbox input {
    width: 18px; height: 18px; accent-color: #2A7AE5; cursor: pointer;
}

/* 上传组件 (v=20260821a 打磨: 渐变按钮 + 图标, loading spinner, 阴影预览, 卡片文件) */
.fm-fill-upload { display: flex; flex-direction: column; gap: 10px; }
.fm-fill-upload-preview { min-height: 44px; }
.fm-fill-upload-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #2A7AE5, #145fc1);
    color: #fff;
    border: none; border-radius: 10px;
    font-size: 13px; font-weight: 500; line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42,122,229,0.28);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.fm-fill-upload-btn::before {
    content: ""; width: 16px; height: 16px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='17 8 12 3 7 8'/><line x1='12' y1='3' x2='12' y2='15'/></svg>") no-repeat center / contain;
    flex-shrink: 0;
}
.fm-fill-upload-btn:active { transform: scale(0.96); opacity: 0.92; }

/* 字段级上传中 loading (方案B pickUploadInMP) */
.fm-upload-picking {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: #f0f6ff; border-radius: 10px;
    color: #145fc1; font-size: 13px;
}
.fm-upload-picking-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(42,122,229,0.22);
    border-top-color: #2A7AE5;
    border-radius: 50%;
    animation: fmUploadSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes fmUploadSpin { to { transform: rotate(360deg); } }
.fm-upload-picking-text { color: #36516d; }

/* 进度条 (H5 XHR 上传) */
.fm-upload-progress { padding: 6px 0; }
.fm-upload-name { font-size: 12px; color: #6b7f97; display: block; margin-bottom: 6px; word-break: break-all; }
.upload-progress {
    height: 6px; background: #e6eef7; border-radius: 3px; overflow: hidden;
}
.upload-progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #2A7AE5, #4a9bff);
    border-radius: 3px;
    transition: width .2s ease;
}

/* 图片预览 (阴影 + 圆形 × 浮层) */
.fm-upload-image { position: relative; display: inline-block; border-radius: 10px; overflow: visible; }
.fm-upload-image img {
    width: 104px; height: 104px; object-fit: cover; border-radius: 10px; display: block;
    box-shadow: 0 4px 12px rgba(15,32,51,0.14);
    cursor: pointer;
}
.fm-upload-image .fm-upload-remove {
    position: absolute; top: -6px; right: -6px;
    width: 22px; height: 22px;
    background: rgba(15,32,51,0.72); color: #fff;
    border: 2px solid #fff;
}

/* 文件预览卡片 */
.fm-upload-file {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f5f8fc, #eef5ff);
    border: 1px solid rgba(42,122,229,0.12);
    border-radius: 10px;
    font-size: 13px; color: #36516d;
    box-shadow: 0 2px 6px rgba(15,32,51,0.05);
    cursor: pointer;
}
.fm-upload-file svg { width: 20px; height: 20px; color: #2A7AE5; flex-shrink: 0; }
.fm-upload-filename { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 通用删除按钮 (图片浮层用覆盖样式, 文件卡片用默认) */
.fm-upload-remove {
    width: 24px; height: 24px; padding: 0; border: none;
    background: rgba(229,62,62,0.10); color: #e53e3e;
    border-radius: 50%; font-size: 15px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .12s ease;
}
.fm-upload-remove:active { background: rgba(229,62,62,0.22); }
.fm-upload-error { font-size: 12px; color: #e53e3e; padding: 8px 12px; background: #fff2f0; border-radius: 8px; }

/* ===== 评分 (5 星, 触摸区域 ≥44px, 大厂标准) ===== */
.fm-fill-rating {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 0;
}
.fm-fill-rating-star {
    font-size: 32px; color: #d8e0ea;
    cursor: pointer; line-height: 1; padding: 6px 4px;
    transition: color 0.12s, transform 0.12s;
    -webkit-user-select: none; user-select: none;
    min-width: 44px; text-align: center; box-sizing: border-box;
}
.fm-fill-rating-star.active { color: #f5a623; }
.fm-fill-rating-star:active { transform: scale(0.95); }

/* ===== 手写签名 (canvas 高 150px, 清除按钮) ===== */
.fm-fill-signature { display: flex; flex-direction: column; gap: 10px; }
.fm-fill-signature-canvas {
    width: 100%; height: 150px;
    border: 1px solid rgba(42, 122, 229, 0.2);
    border-radius: 10px; background: #fff; display: block;
    touch-action: none;
}
.fm-fill-signature-actions { display: flex; gap: 8px; }
.fm-fill-signature-clear {
    padding: 7px 14px; background: rgba(229, 62, 62, 0.08);
    color: #e53e3e; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background 0.12s;
}
.fm-fill-signature-clear:active { background: rgba(229, 62, 62, 0.18); }

/* ===== 富文本 (KindEditor 容器, 高 200px) =====
   KindEditor 工具栏自带样式, 此处仅做容器边框对齐 */
.fm-fill-richeditor {
    width: 100%; min-height: 200px;
    border: 1px solid rgba(42, 122, 229, 0.18);
    border-radius: 10px; padding: 10px;
    font-size: 14px; color: #102033; outline: none;
    box-sizing: border-box; line-height: 1.6; resize: vertical;
    background: #fff;
}
.fm-fill-richeditor:focus { border-color: #2A7AE5; box-shadow: 0 0 0 3px rgba(42, 122, 229, 0.1); }

/* ===== 地址 (省/市/区 3 输入, 移动端纵向堆叠) ===== */
.fm-fill-address { display: flex; flex-direction: column; gap: 8px; }

/* ===== 地图选点 (按钮 + 文字回显 + 清除) ===== */
.fm-fill-location { display: flex; flex-direction: column; gap: 10px; }
.fm-fill-location-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #2A7AE5, #145fc1);
    color: #fff;
    border: none; border-radius: 10px;
    font-size: 13px; font-weight: 500; line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42, 122, 229, 0.28);
    transition: transform 0.12s;
}
.fm-fill-location-btn::before {
    content: ""; width: 16px; height: 16px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>") no-repeat center / contain;
    flex-shrink: 0;
}
.fm-fill-location-btn:active { transform: scale(0.96); }
.fm-fill-location-display {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 12px;
    background: #f5f8fc; border: 1px solid rgba(42, 122, 229, 0.12);
    border-radius: 10px;
    font-size: 13px; color: #36516d; line-height: 1.5;
    word-break: break-all;
}
.fm-fill-location-text { flex: 1; }
.fm-fill-location-remove {
    width: 24px; height: 24px; flex-shrink: 0;
    background: rgba(229, 62, 62, 0.1); color: #e53e3e;
    border-radius: 50%; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.12s;
}
.fm-fill-location-remove:active { background: rgba(229, 62, 62, 0.22); }

/* ===== 章节标题 (不嵌 .fm-fill-field wrapper, 灰色分隔) ===== */
.fm-fill-section { padding: 16px 4px 8px; }
.fm-fill-section-title {
    font-size: 14px; font-weight: 600; color: #36516d;
    margin: 0 0 4px; line-height: 1.4;
    display: flex; align-items: center; gap: 6px;
}
.fm-fill-section-title::before {
    content: ""; width: 3px; height: 14px;
    background: linear-gradient(135deg, #2A7AE5, #145fc1);
    border-radius: 2px; flex-shrink: 0;
}
.fm-fill-section-hint {
    font-size: 12px; color: #9aa8b8; line-height: 1.5; margin: 0;
}

/* ===== 未知字段类型 (前向兼容, 灰色提示) ===== */
.fm-fill-unknown {
    padding: 12px; background: #fff5f0;
    border: 1px dashed rgba(229, 62, 62, 0.3);
    border-radius: 10px; font-size: 13px; color: #cf1322;
}

/* ===== 提交按钮 loading 态 (防双击 + 处理中文案) ===== */
.fm-btn-primary.fm-btn-block[disabled],
#btnSubmit[disabled] {
    background: #b8cce8; box-shadow: none; cursor: not-allowed;
    color: #fff;
}

.fm-fill-footer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px; background: rgba(255,255,255,0.96);
    border-top: 1px solid rgba(42,122,229,0.1);
}

/* 错误页 */
.fm-fill-error {
    padding: 80px 30px; text-align: center; color: #6b7f97;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.fm-fill-error-icon { color: #9aa8b8; }
.fm-fill-error-icon svg { width: 64px; height: 64px; }
.fm-fill-error-text { font-size: 15px; line-height: 1.5; }

/* 成功遮罩 */
.fm-success-mask {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(15,32,51,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 30px;
}
.fm-success-card {
    background: #fff; border-radius: 18px; padding: 30px 20px;
    text-align: center; max-width: 320px; width: 100%;
    animation: fmSuccessIn 0.3s ease-out;
}
@keyframes fmSuccessIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.fm-success-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: rgba(41,179,95,0.12); color: #29b35f;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.fm-success-icon svg { width: 36px; height: 36px; }
.fm-success-title { font-size: 17px; font-weight: 600; color: #102033; margin-bottom: 6px; }
.fm-success-desc { font-size: 13px; color: #6b7f97; margin-bottom: 22px; }
.fm-success-card .fm-btn-primary { width: 100%; }

/* ----------------------------- 记录列表页 ----------------------------- */
.fm-records-page { padding-bottom: 30px; }
.fm-record-list { padding: 12px; }
.fm-record-card {
    background: #fff; border-radius: 14px; padding: 14px;
    margin-bottom: 10px; box-shadow: 0 2px 8px rgba(24,70,128,0.05);
    cursor: pointer; transition: transform 0.15s;
}
.fm-record-card:active { transform: scale(0.99); }
.fm-record-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.fm-record-idx {
    font-size: 12px; font-weight: 600; color: #2A7AE5;
    background: rgba(42,122,229,0.1); padding: 2px 8px; border-radius: 8px;
}
.fm-record-time { flex: 1; font-size: 13px; color: #6b7f97; }
.fm-record-arrow { font-size: 20px; color: #cfd9e5; }
.fm-record-preview {
    padding: 8px 10px; background: #f5f8fc; border-radius: 8px;
    display: flex; flex-direction: column; gap: 4px;
}
.fm-record-preview-row {
    display: flex; gap: 8px; font-size: 13px; line-height: 1.4;
}
.fm-record-preview-name {
    color: #6b7f97; flex-shrink: 0; min-width: 60px; max-width: 100px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-record-preview-value {
    flex: 1; color: #102033; word-break: break-all;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fm-record-empty { color: #cfd9e5; font-style: italic; }
/* 图片/文件预览样式 */
.fm-record-preview-images {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0;
}
.fm-record-preview-image {
    width: 60px; height: 60px; object-fit: cover;
    border-radius: 6px; cursor: pointer; background: #f0f5fb;
    border: 1px solid rgba(42,122,229,0.1);
    transition: transform 0.15s;
}
.fm-record-preview-image:active { transform: scale(0.95); }
.fm-record-preview-file {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; background: rgba(42,122,229,0.08); color: #2A7AE5;
    border-radius: 8px; text-decoration: none; font-size: 12px;
    max-width: 100%; cursor: pointer; transition: background 0.15s;
}
.fm-record-preview-file:active { background: rgba(42,122,229,0.16); }
.fm-record-preview-file svg { width: 14px; height: 14px; flex-shrink: 0; }
.fm-record-preview-filename {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 180px;
}

/* ----------------------------- 详情页 ----------------------------- */
.fm-detail-page { padding-bottom: 80px; }
.fm-detail-body { padding: 12px; }
.fm-detail-time {
    font-size: 13px; color: #6b7f97; padding: 8px 4px;
    border-bottom: 1px solid rgba(42,122,229,0.08); margin-bottom: 10px;
}
.fm-detail-fields { display: flex; flex-direction: column; gap: 10px; }
.fm-detail-field {
    background: #fff; border-radius: 12px; padding: 14px;
    box-shadow: 0 2px 8px rgba(24,70,128,0.04);
}
.fm-detail-field-label {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.fm-detail-field-idx {
    width: 22px; height: 22px; flex-shrink: 0;
    background: rgba(42,122,229,0.1); color: #2A7AE5;
    border-radius: 50%; font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.fm-detail-field-name { flex: 1; font-size: 14px; font-weight: 600; color: #102033; }
.fm-detail-field-type {
    font-size: 11px; padding: 2px 8px; border-radius: 9px;
    background: rgba(154,168,184,0.18); color: #6b7f97;
}
.fm-detail-field-value {
    font-size: 14px; color: #36516d; line-height: 1.6;
    padding-left: 30px; word-break: break-all;
}
.fm-detail-text { white-space: pre-wrap; }
.fm-detail-empty { color: #cfd9e5; font-style: italic; }
.fm-detail-images {
    display: flex; flex-wrap: wrap; gap: 8px; padding-left: 30px;
}
.fm-detail-image {
    width: 100px; height: 100px; object-fit: cover;
    border-radius: 8px; cursor: pointer; background: #f0f5fb;
    border: 1px solid rgba(42,122,229,0.1);
    transition: transform 0.15s;
}
.fm-detail-image:active { transform: scale(0.95); }
.fm-detail-image-single { max-width: 200px; }
.fm-detail-image-single img { width: 100%; border-radius: 8px; display: block; }
.fm-detail-file {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: rgba(42,122,229,0.08); color: #2A7AE5;
    border-radius: 8px; text-decoration: none; font-size: 13px;
}
.fm-detail-file svg { width: 16px; height: 16px; }
.fm-detail-phone {
    color: #2A7AE5; text-decoration: none; font-weight: 500;
}
.fm-detail-footer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px; background: rgba(255,255,255,0.96);
    border-top: 1px solid rgba(42,122,229,0.1);
}
.fm-detail-footer .fm-btn-danger { width: 100%; padding: 13px; }

/* ----------------------------- 加载更多 ----------------------------- */
.load-more {
    display: block; width: 100%; padding: 12px; text-align: center;
    font-size: 13px; color: #6b7f97; background: transparent; border: none;
    cursor: pointer;
}
.load-more:active { color: #2A7AE5; }
.load-more:disabled { color: #cfd9e5; cursor: default; }

/* ----------------------------- action sheet (备用) ----------------------------- */
.fm-action-sheet { position: fixed; inset: 0; z-index: 1100; }
.fm-action-mask { position: absolute; inset: 0; background: rgba(15,32,51,0.5); }
.fm-action-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #fff; border-radius: 16px 16px 0 0; padding: 14px;
    transform: translateY(100%); transition: transform 0.3s;
}
.fm-action-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px; border-bottom: 1px solid rgba(42,122,229,0.08);
    margin-bottom: 10px; font-size: 15px; font-weight: 600; color: #102033;
}
.fm-action-close {
    background: transparent; border: none; font-size: 22px; color: #9aa8b8;
    cursor: pointer; line-height: 1;
}
.fm-action-list { display: flex; flex-direction: column; gap: 4px; }
.fm-action-cancel {
    width: 100%; margin-top: 10px; padding: 12px;
    background: #f5f8fc; border: none; border-radius: 10px;
    font-size: 14px; color: #6b7f97; cursor: pointer;
}

/* ==========================================================================
   v=20260822c 新增样式 (fill.aspx 四缺陷修复)
   - 省市县三级级联下拉 (.fm-region-select) - 与 .fm-fill-select 同规格, 纵向排列
   - 签名板 (.fm-fill-signature-board) - 板面容器 (无 padding, 供 JS 实测宽度),
     底部基准线 + 居中占位水印 (.has-sign 时隐藏), 画布 display:block 防基线缝隙
   ========================================================================== */
.fm-fill-address .fm-region-select {
    width: 100%;
    height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(42,122,229,0.18);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #102033;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'><path d='M1 1l5 5 5-5' fill='none' stroke='%239aa8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.fm-fill-address .fm-region-select:focus {
    border-color: #2A7AE5;
    box-shadow: 0 0 0 3px rgba(42,122,229,0.1);
}
.fm-fill-address .fm-region-select:disabled {
    background-color: #f5f8fc;
    color: #9aa8b8;
}
.fm-fill-address .fm-region-select + .fm-region-select { margin-top: 8px; }

/* 签名板: 板面容器负责边框与宽度基准, canvas 逻辑宽由 JS 按 board 实测宽设定 */
.fm-fill-signature-board {
    position: relative;
    border: 1px solid rgba(42,122,229,0.18);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    line-height: 0;
}
.fm-fill-signature-board::after {
    content: '请在此区域内签名';
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 13px;
    color: #c3cedd;
    line-height: 1.4;
    pointer-events: none;
    letter-spacing: 2px;
}
.fm-fill-signature.has-sign .fm-fill-signature-board::after { display: none; }
.fm-fill-signature-board .fm-fill-signature-canvas {
    display: block;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: crosshair;
}

/* ==========================================================================
   v=20260823a 新增样式 (移动版表单设计器 designer.aspx)
   - 工具栏 (模式Tab + 字段计数 + 保存按钮三态)
   - 画布卡片 .fm-dcard (拖拽把手/角标/复制删除/新增高亮/分组标题样式)
   - 类型底板 .fm-type-sheet (六组网格)
   - 属性底板 .fm-prop-sheet (表单行/开关/选项编辑器, 复用 fm-status-toggle)
   - 预览 .fm-dpv-* (填表人视角简化渲染)
   ========================================================================== */
.fm-designer-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #fff;
    border-bottom: 1px solid rgba(42,122,229,0.08);
    position: sticky; top: 48px; z-index: 40;
}
.fm-designer-toolbar .fm-view-tabs-inner { display: flex; background: #f0f5fb; border-radius: 10px; padding: 3px; flex: 0 0 auto; }
.fm-field-count { flex: 1; font-size: 12px; color: #9aa8b8; text-align: center; }
.fm-designer-save {
    border: none; border-radius: 10px; padding: 8px 16px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    background: #d9dde3; color: #5f7080; flex: 0 0 auto;
    transition: all 0.15s;
}
.fm-designer-save.dirty { background: #fa8c16; color: #fff; box-shadow: 0 3px 8px rgba(250,140,22,0.3); }
.fm-designer-save.saving { background: #8a99a8; color: #fff; cursor: wait; }

/* 画布 */
.fm-designer-canvas { padding: 12px; }
.fm-designer-list { min-height: 120px; }
.fm-empty-state { text-align: center; padding: 50px 20px; color: #9aa8b8; }
.fm-empty-icon { font-size: 36px; color: #d8e0ea; margin-bottom: 10px; line-height: 1; }
.fm-empty-text { font-size: 13px; line-height: 1.7; }
.fm-dcard {
    background: #fff; border-radius: 14px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px; padding: 12px;
    box-shadow: 0 2px 8px rgba(24,70,128,0.05);
    border: 1px solid rgba(42,122,229,0.06);
}
.fm-dcard.is-new { border-left: 3px solid #29b35f; }
.fm-dcard.is-section { background: #fafbfc; border-left: 4px solid #2A7AE5; }
.fm-dcard-drag { color: #cfd9e5; cursor: grab; flex-shrink: 0; padding: 4px; }
.fm-dcard-drag svg { width: 18px; height: 18px; }
.fm-dcard-main { flex: 1; min-width: 0; }
.fm-dcard-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-dcard-name {
    font-size: 14px; font-weight: 600; color: #102033;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}
.fm-dcard-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 500; flex-shrink: 0;
}
.fm-dcard-badge.req { background: rgba(229,62,62,0.1); color: #e53e3e; }
.fm-dcard-badge.hid { background: rgba(154,168,184,0.18); color: #6b7f97; }
.fm-dcard-badge.ro { background: rgba(207,19,34,0.08); color: #cf1322; }
.fm-dcard-badge.uniq { background: rgba(114,46,209,0.1); color: #722ed1; }
.fm-dcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.fm-dcard-sort { font-size: 11px; color: #cfd9e5; }
.fm-dcard-ops { display: flex; gap: 4px; flex-shrink: 0; }
.fm-dcard-btn {
    width: 32px; height: 32px; padding: 0; border: none; background: transparent;
    color: #36516d; cursor: pointer; display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.fm-dcard-btn:active { background: rgba(42,122,229,0.08); }
.fm-dcard-btn.danger { color: #e53e3e; }
.fm-dcard-btn svg { width: 17px; height: 17px; }
.fm-designer-add {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; margin-top: 4px;
    background: #fff; color: #2A7AE5;
    border: 2px dashed rgba(42,122,229,0.3); border-radius: 14px;
    font-size: 14px; font-weight: 500; cursor: pointer;
}
.fm-designer-add:active { background: #f5f8fc; }
.fm-designer-add svg { width: 18px; height: 18px; }
.fm-designer-tip { text-align: center; font-size: 11px; color: #b8c4d2; padding: 10px 0 20px; }

/* 类型底板 (复用 fm-modal, 加高允许滚动) */
.fm-type-sheet { max-height: 78vh; }
.fm-type-groups { max-height: 56vh; overflow-y: auto; }
.fm-type-group { margin-bottom: 14px; }
.fm-type-group-title { font-size: 11px; color: #9aa8b8; font-weight: 600; margin-bottom: 8px; letter-spacing: 1px; }
.fm-type-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-type-cell {
    width: calc((100% - 16px) / 3);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 4px; background: #f5f8fc; border: 1px solid rgba(42,122,229,0.08);
    border-radius: 12px; cursor: pointer; transition: all 0.15s;
}
.fm-type-cell:active { background: #e6f0fc; border-color: #2A7AE5; transform: scale(0.97); }
.fm-type-cell-icon {
    width: 32px; height: 32px; border-radius: 8px; background: #e6f7ff; color: #2A7AE5;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.fm-type-cell-name { font-size: 12px; color: #36516d; }

/* 属性底板 */
.fm-prop-sheet { max-height: 88vh; }
.fm-prop-body { max-height: 66vh; overflow-y: auto; padding: 0 2px; }
.fm-prop-group { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #eef2f7; }
.fm-prop-group:last-child { border-bottom: none; }
.fm-prop-group-title { font-size: 11px; color: #9aa8b8; font-weight: 600; margin-bottom: 8px; letter-spacing: 1px; }
.fm-prop-row { margin-bottom: 10px; }
.fm-prop-label { display: block; font-size: 12px; color: #5a6772; margin-bottom: 5px; font-weight: 500; }
.fm-prop-input, .fm-prop-select, .fm-prop-textarea {
    width: 100%; border: 1px solid rgba(42,122,229,0.18);
    background: #fff; color: #102033; font-size: 14px;
    padding: 10px 12px; border-radius: 10px; outline: none;
    box-sizing: border-box; font-family: inherit;
}
.fm-prop-input:focus, .fm-prop-select:focus, .fm-prop-textarea:focus {
    border-color: #2A7AE5; box-shadow: 0 0 0 3px rgba(42,122,229,0.1);
}
.fm-prop-textarea { resize: vertical; min-height: 56px; line-height: 1.5; }
.fm-prop-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.fm-prop-toggle-row .fm-prop-label { margin-bottom: 0; }
.fm-prop-toggle-row .fm-status-toggle { flex: 0 0 auto; }
.fm-prop-option-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.fm-prop-option-row input {
    flex: 1; border: 1px solid rgba(42,122,229,0.18); background: #fff;
    padding: 9px 12px; border-radius: 8px; font-size: 13px; color: #102033; outline: none;
}
.fm-prop-option-row input:focus { border-color: #2A7AE5; }
.fm-prop-option-del {
    width: 28px; height: 28px; flex-shrink: 0;
    background: rgba(229,62,62,0.08); color: #e53e3e;
    border: none; border-radius: 50%; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.fm-prop-option-del:active { background: rgba(229,62,62,0.2); }
.fm-prop-add-option {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: rgba(42,122,229,0.08); color: #2A7AE5;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
}

/* 预览模式 */
.fm-designer-preview { padding: 12px; }
.fm-dpv-header { text-align: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eef2f7; }
.fm-dpv-title { font-size: 17px; font-weight: 600; color: #102033; }
.fm-dpv-tip { font-size: 11px; color: #b8c4d2; margin-top: 4px; }
.fm-dpv-body { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 8px rgba(24,70,128,0.05); }
.fm-dpv-field { margin-bottom: 14px; }
.fm-dpv-label { font-size: 14px; font-weight: 600; color: #102033; margin-bottom: 6px; }
.fm-dpv-label .req { color: #e53e3e; margin-right: 2px; }
.fm-dpv-input {
    width: 100%; border: 1px solid rgba(42,122,229,0.18); background: #fff;
    padding: 10px 12px; border-radius: 10px; font-size: 14px; color: #102033;
    box-sizing: border-box; font-family: inherit;
}
.fm-dpv-hint { font-size: 12px; color: #9aa8b8; margin-top: 4px; }
.fm-dpv-option { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; color: #102033; }
.fm-dpv-option input { width: 18px; height: 18px; accent-color: #2A7AE5; }
.fm-dpv-rating { font-size: 26px; color: #d9dde3; }
.fm-dpv-rating .star { margin-right: 6px; cursor: pointer; }
.fm-dpv-rating .star.active { color: #fa8c16; }
.fm-dpv-section { font-size: 15px; font-weight: 600; color: #102033; padding: 10px 0 6px; border-bottom: 1px solid #eef2f7; margin-bottom: 8px; }
.fm-dpv-placeholder-box {
    border: 1px dashed #d9dde3; border-radius: 10px; padding: 26px 12px;
    text-align: center; color: #9aa8b8; font-size: 13px; background: #fafbfc;
}
.fm-dpv-placeholder-inline {
    border: 1px solid rgba(42,122,229,0.18); border-radius: 10px; padding: 10px 12px;
    color: #9aa8b8; font-size: 13px; text-align: center;
}
.fm-dpv-submit {
    display: block; width: 100%; padding: 13px; margin-top: 10px;
    background: #d9dde3; color: #5f7080; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: not-allowed;
}
/* ===== v=20260823b: 表单附件/地点/位置坐标 (formEditor/edit/fill 三端) ===== */
/* 说明按录入格式显示: pre-wrap 保留换行与缩进 (配合服务端 HtmlEncode 防注入) */
.fm-fill-desc { white-space: pre-wrap; word-break: break-word; }

/* ===== v=20260825c: 表单元信息 白色信息卡 (地点/联系主办方/附件, 浅色大气) ===== */
.fm-fill-meta { margin-top: 14px; position: relative; }
.fm-fill-meta-card {
    margin-bottom: 12px; padding: 14px 16px;
    background: #fff;
    border: 1px solid #e9eff6;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(24,70,128,0.06);
}
.fm-fill-meta-card-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    color: #5b6b7f; margin-bottom: 6px;
}
.fm-fill-meta-card-title::before {
    content: ""; width: 3px; height: 12px; border-radius: 2px;
    background: #2A7AE5;
}
.fm-fill-meta-row {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; font-size: 14px; color: #102033;
    line-height: 1.5;
}
.fm-fill-meta-row + .fm-fill-meta-row { border-top: 1px solid #eef2f7; }
.fm-fill-meta-ic {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    background: #eef4ff; color: #2A7AE5;
    display: flex; align-items: center; justify-content: center;
}
.fm-fill-meta-ic svg { width: 17px; height: 17px; }
.fm-fill-meta-ic.file { background: #fff7e6; color: #d48806; }
.fm-fill-meta-txt { flex: 1; min-width: 0; word-break: break-all; }
.fm-fill-meta-act {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border: none; border-radius: 10px;
    background: #2A7AE5; color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; flex-shrink: 0; text-decoration: none;
    box-shadow: 0 4px 12px rgba(42,122,229,0.25);
    transition: transform 0.1s, opacity 0.1s;
}
.fm-fill-meta-act:active { transform: translateY(1px); opacity: 0.92; }
.fm-fill-meta-act svg { width: 15px; height: 15px; }
.fm-fill-meta-act.sm {
    padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: #eef4ff; color: #2A7AE5; box-shadow: none;
}
.fm-fill-meta-act.sm:active { background: #e3eeff; }
.fm-fill-meta-card-actions { padding-top: 10px; }
.fm-fill-meta-card-actions .fm-fill-meta-act { width: 100%; justify-content: center; }
/* 二维码 */
.fm-fill-meta-qr {
    display: flex; align-items: center; gap: 14px;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid #eef2f7;
}
.fm-fill-meta-qr img {
    width: 104px; height: 104px; border-radius: 10px; flex-shrink: 0;
    background: #fff; padding: 4px; box-sizing: border-box;
    border: 1px solid #e9eff6;
    box-shadow: 0 2px 8px rgba(24,70,128,0.08); cursor: pointer;
}
.fm-fill-meta-qr-info { flex: 1; min-width: 0; }
.fm-fill-meta-qr-title { font-size: 14px; font-weight: 600; color: #102033; }
.fm-fill-meta-qr-hint { font-size: 12px; color: #8a94a6; margin-top: 3px; }
.fm-fill-meta-qr-zoom {
    font-size: 12px; color: #5b6b7f; padding: 4px 10px;
    border: 1px solid #dbe5f0; border-radius: 999px; flex-shrink: 0;
}

/* edit 页附件卡与位置显示 */
.fm-meta-attach {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; padding: 10px 12px;
    background: #fff; border: 1px solid rgba(42,122,229,0.15);
    border-radius: 10px;
}
.fm-meta-attach-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: #e6f7ff; color: #2A7AE5;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.fm-meta-attach-main { flex: 1; min-width: 0; }
.fm-meta-attach-name {
    font-size: 13px; color: #102033;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-meta-attach-hint { font-size: 11px; color: #9aa8b8; margin-top: 2px; }
.fm-meta-attach .fm-upload-remove { margin: 0; flex-shrink: 0; }
.fm-edit-loc {
    display: flex; align-items: center;
    margin-bottom: 10px; padding: 10px 12px;
    background: #f5f9ff; border: 1px solid #d3adf7;
    border-radius: 10px; font-size: 13px; color: #102033;
}
.fm-edit-loc span { flex: 1; min-width: 0; word-break: break-all; }

/* ===== v=20260825b: 联系方式/附件名称 (edit/fill) ===== */
/* edit 页分组标题 (联系方式) */
.fm-edit-group-label {
    font-size: 12px; font-weight: 600; color: #9aa8b8;
    letter-spacing: 1px; margin: 14px 4px 6px;
}

/* ---- 20261003 语言切换 [中 | EN]: 藏蓝×金权威 pill, 仅 EnableEn 表单渲染 ---- */
.fm-lang-switch{
  display:inline-flex;align-items:center;
  border:1px solid rgba(23,49,94,.22);border-radius:999px;background:#fff;
  padding:2px;margin:0 0 10px;overflow:hidden;
  box-shadow:0 1px 4px rgba(23,49,94,.10);
}
.fm-lang-switch a{
  padding:3px 14px;border-radius:999px;font-size:13px;font-weight:700;line-height:1.5;
  color:#334155;text-decoration:none;letter-spacing:.02em;transition:background .16s,color .16s;
}
.fm-lang-switch a:hover{color:#17315E;background:#E8EFFC}
.fm-lang-switch a.is-active{background:#17315E;color:#fff}
.fm-lang-sep{color:#CBD5E1;font-size:12px;user-select:none}
@media (max-width:480px){ .fm-lang-switch a{padding:2px 12px;font-size:12.5px} }
