/* 投递页样式（移动优先） */
.apply-wrap { max-width: 720px; margin: 0 auto; padding: 24px 20px 120px; }

.step-bar { display: flex; align-items: center; gap: 8px; margin: 24px 0 28px; }
.step {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); flex: none;
}
.step .n {
  width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.step.on { color: var(--primary); font-weight: 600; }
.step.on .n { background: var(--grad); }
.step.done .n { background: var(--success); }
.step-line { flex: 1; height: 2px; background: var(--line); }
.step-line.done { background: var(--success); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .hint { font-size: 13px; color: var(--ink-3); margin: 0 0 18px; }

/* 拖拽区 */
.drop {
  border: 2px dashed #C7D2E0; border-radius: var(--radius); background: #FBFCFE;
  padding: 44px 20px; text-align: center; cursor: pointer; transition: .18s; position: relative;
}
.drop:hover { border-color: var(--accent); background: #F5FAFF; }
.drop.over { border-color: var(--accent); background: #EAF6FF; transform: scale(1.01); }
.drop .ico { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.drop .t1 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.drop .t2 { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.file-box {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid #BBE3FF; background: #F2FAFF; border-radius: var(--radius-sm);
}
.file-box .fic { font-size: 26px; }
.file-box .fn { flex: 1; min-width: 0; }
.file-box .fn b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-box .fn span { font-size: 12px; color: var(--ink-3); }
.file-box .del { color: var(--ink-3); cursor: pointer; padding: 4px 8px; font-size: 13px; }
.file-box .del:hover { color: var(--danger); }

.parse-tip {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6;
}
.parse-tip.ok { background: #ECFDF3; color: #027A48; border: 1px solid #ABEFC6; }
.parse-tip.warn { background: #FFFAEB; color: #B54708; border: 1px solid #FEDF89; }
.spinner {
  width: 14px; height: 14px; border: 2px solid rgba(15, 76, 129, .2); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; flex: none; margin-top: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field label .opt { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: 4px; }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; background: #fff; font-size: 15px; width: 100%; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 182, 255, .14);
}
.field input.filled { background: #F2FAFF; border-color: #BBE3FF; }
.field .err { font-size: 12px; color: var(--danger); display: none; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid .err { display: block; }

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-opt {
  flex: 1 1 auto; min-width: 96px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-align: center; cursor: pointer; font-size: 14px; transition: .15s; user-select: none;
}
.radio-opt:hover { border-color: var(--accent); }
.radio-opt.on { border-color: var(--primary); background: var(--grad-soft); color: var(--primary); font-weight: 600; }
/* 单选组的「+ 新增」按钮：虚线描边，和已选项区分开 */
.radio-opt.radio-add {
  flex: none; min-width: 76px; border-style: dashed; color: var(--ink-3);
  background: transparent; font-size: 13.5px;
}
.radio-opt.radio-add:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 多维表格式下拉：可点选 + 可输入 + 可新增 ============ */
.combo { position: relative; }
.combo .combo-input {
  width: 100%; padding: 11px 38px 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: none; background: #fff; font-size: 15px; transition: .15s;
}
.combo .combo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 182, 255, .14); }
.combo .combo-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: transparent; color: var(--ink-3);
  font-size: 13px; border-radius: 8px; transition: .18s; cursor: pointer;
}
.combo .combo-toggle:hover { background: var(--bg-soft); color: var(--ink); }
.combo.open .combo-toggle { transform: translateY(-50%) rotate(180deg); color: var(--primary); }

.combo .combo-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 5px); z-index: 30;
  max-height: 232px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(11, 18, 32, .14);
  padding: 5px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.combo.open .combo-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.combo .combo-opt {
  padding: 9px 12px; border-radius: 8px; font-size: 14.5px; cursor: pointer;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .12s;
}
.combo .combo-opt:hover { background: var(--grad-soft); color: var(--primary); }
.combo .combo-empty { padding: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* 「+ 新增选项」提示条 */
.combo-new {
  margin-top: 6px; font-size: 12.5px; color: var(--primary);
  display: flex; align-items: center; gap: 5px; line-height: 1.5;
}
.combo-new .cn-plus {
  width: 15px; height: 15px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none;
}
.combo-new b { font-weight: 700; }

/* 字段无效态同样要能把下拉框标红 */
.field.invalid .combo .combo-input { border-color: var(--danger); }

/* 底部操作条 */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.action-bar .inner { max-width: 720px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.action-bar .btn { flex: 1; }
.action-bar .btn-secondary { flex: none; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }

/* 成功页 */
.done-box { text-align: center; padding: 40px 20px; }
.done-box .ico {
  width: 72px; height: 72px; border-radius: 50%; background: #ECFDF3; color: var(--success);
  display: grid; place-items: center; font-size: 36px; margin: 0 auto 20px;
}
.done-box h2 { margin: 0 0 10px; font-size: 22px; }
.done-box p { color: var(--ink-2); font-size: 14px; line-height: 1.8; margin: 0 0 24px; }
.done-meta {
  background: var(--bg); border-radius: var(--radius-sm); padding: 14px 18px; text-align: left;
  font-size: 13px; color: var(--ink-2); line-height: 2; margin-bottom: 22px;
}
.done-meta span { float: right; color: var(--ink); font-weight: 600; }

.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: #fff;
  background: linear-gradient(135deg, #030913 0%, #071A3C 58%, #123A8A 100%);
  position: sticky; top: 0; z-index: 60;
}
.topbar .back { color: rgba(255, 255, 255, .78); font-size: 14px; cursor: pointer; }
.topbar .back:hover { color: #fff; }
.topbar .ttl { font-weight: 600; font-size: 16px; letter-spacing: .3px; }

/* 拖拽区（与门户同调） */
.drop { border: 2px dashed #C3D6EE; background: linear-gradient(180deg, #FBFCFE 0%, #F4F8FE 100%); }
.drop:hover { border-color: var(--accent); background: linear-gradient(180deg, #F5FAFF 0%, #EAF4FF 100%); }
.drop.over { border-color: var(--accent); background: #E8F6FF; box-shadow: 0 0 0 4px rgba(0, 212, 255, .12); }
.drop .ico { font-size: 44px; filter: drop-shadow(0 6px 14px rgba(27, 79, 216, .18)); }

/* ---------- 识别结果卡片 ---------- */
.hit-box {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: #F2FAFF; border: 1px solid #BBE3FF;
}
.hit-box.warn { background: #FFFAEB; border-color: #FEDF89; }
.hit-box .hit-t { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.hit-box .hit-tip { font-size: 13px; color: #B54708; line-height: 1.75; }
.hit-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hit-list .hit {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  background: #fff; border: 1px solid #BBE3FF; color: var(--ink-2);
}
.btn-s { padding: 9px 18px; font-size: 13.5px; }

.field .fld-hint { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.field.invalid textarea, .field.invalid .radio-row { border-color: var(--danger); }
.field.invalid textarea { border-color: var(--danger); }

/* 自定义字段里的单选组 */
.field .radio-row[data-key] { display: flex; flex-wrap: wrap; }
.field .radio-row[data-key] .radio-opt { flex: 0 0 auto; min-width: 96px; }

@media (max-width: 640px) {
  .apply-wrap { padding: 16px 14px 120px; }
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .drop { padding: 34px 14px; }
  .hit-list .hit { font-size: 12px; }
}

/* ============ 内推通道 ============ */
.ref-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; margin: 4px 0 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(27,79,216,.08), rgba(0,212,255,.13));
  border: 1px solid rgba(27,79,216,.22);
}
.ref-banner .rb-ico { font-size: 20px; line-height: 1.25; flex: none; }
.ref-banner .rb-tx { display: flex; flex-direction: column; gap: 4px; }
.ref-banner .rb-tx b { font-size: 14.5px; color: #1B4FD8; }
.ref-banner .rb-tx span { font-size: 13px; color: #475467; line-height: 1.6; }
.referral-mode .card:first-of-type { border-color: rgba(27,79,216,.2); }

@media (max-width: 768px) {
  .ref-banner { padding: 12px 14px; }
  .ref-banner .rb-tx b { font-size: 14px; }
}
