/* == css/app/workspace-form.css · PC 端工作台内的表单页（提交反馈等）==
 *
 * 背景：提交页原本是「营销页」时代的 .page-main / .form-card 布局，
 *       padding 32px、标题 30px、卡片 16px 圆角，与工作台（22px 标题、
 *       12px 圆角、紧凑密度）不统一。本文件用 ws- 前缀重建工作台形态，
 *       不改动 page-submit.css —— 移动端仍依赖它。
 *
 * 约束：submit.js 依赖的 id（ticketForm / typeOptions / title / productSelect /
 *       severitySelect / desc / attachment / fileList / email / submitBtn / formTip）
 *       与 class（type-option / checked / select-trigger / opt-row / msg-tip）
 *       全部保持不变，仅调整容器与视觉。
 * ========================================================================== */

/* ========== 页面骨架 ========== */
.wsf {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 1280px;          /* 表单页比数据页窄，避免行长失控 */
  margin: 0 auto;
  padding: 20px var(--ws-content-pad) 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 页面头：与工作台首页同构 */
.wsf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}
.wsf-head-text { min-width: 0; flex: 1 1 260px; }
.wsf-title {
  font-size: clamp(19px, 1.5vw, 22px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}
.wsf-sub {
  margin-top: 5px;
  font-size: 13px;
  color: var(--gray-3);
  overflow-wrap: anywhere;
}

/* 双栏：主表单 + 侧栏 */
.wsf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
  min-width: 0;
}
.wsf-main { min-width: 0; }

/* ========== 表单卡（与 ws-table-card 同规格） ========== */
.wsf-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* 字段分组标题：带序号，形成可扫描的填写动线 */
.wsf-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.wsf-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}
.wsf-label .wsf-idx {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--fill);
  color: var(--gray-2);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.wsf-label .wsf-req { color: var(--red); font-weight: 500; }
.wsf-hint { font-size: 12px; color: var(--gray-3); line-height: 1.6; }

/* ========== 输入控件：覆盖 page-submit.css 的旧规格 ==========
 * 旧版 .form-input padding 12px/14px、font 14px → 单控件高 45px。
 * 工作台密度要求 32-36px 高、13px 字号，与表格行（60px 两行）匹配。
 * 只在 .wsf 作用域内覆盖，移动端与旧页面不受影响。 */
.wsf .form-input,
.wsf .form-textarea,
.wsf .form-select {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  border-color: var(--border);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wsf .form-textarea {
  min-height: 120px;
  line-height: 1.7;
  padding: 10px 12px;
}
.wsf .form-input:focus,
.wsf .form-textarea:focus,
.wsf .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
/* 自定义下拉触发器同样收敛 */
.wsf .select-trigger {
  padding: 0 12px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
}

/* ========== 反馈类型选择卡 ========== */
/* 网格自适应：容器变窄自动由 3 列降为 1 列，不写死断点 */
.wsf-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.wsf-types .type-option {
  padding: 12px 14px;
  border-radius: 10px;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.12s, background 0.12s;
}
.wsf-types .type-option:hover { border-color: var(--gray-3); }
.wsf-types .type-option.checked {
  border-color: var(--blue);
  border-width: 1.5px;
  background: var(--blue-50);
}

/* ========== 双下拉行 ========== */
.wsf-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

/* ========== 勾选选项区 ========== */
.wsf-options { display: flex; flex-direction: column; gap: 10px; }

/* ========== 提交栏（吸底可见） ========== */
.wsf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.wsf-actions .btn-submit-wide {
  min-width: 132px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.wsf-actions-note { font-size: 12px; color: var(--gray-3); }

/* ========== 侧栏卡 ========== */
.wsf-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wsf-side-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 18px;
  min-width: 0;
}
.wsf-side-card.soft { background: #fafafa; }
.wsf-side-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 10px;
}
/* 提交须知：圆点列表，不用默认 ul 缩进 */
.wsf-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wsf-tips li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray-1);
}
.wsf-tips li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-3);
}
/* 处理时效：键值行 */
.wsf-sla { display: flex; flex-direction: column; gap: 0; }
.wsf-sla-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
  min-width: 0;
}
.wsf-sla-row + .wsf-sla-row { border-top: 1px solid var(--border-light); }
.wsf-sla-row .k { color: var(--gray-2); flex: none; }
.wsf-sla-row .v {
  color: var(--black);
  font-weight: 500;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 邮箱解锁按钮（替换原内联 style） ========== */
.email-unlock {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0;
  font-size: 12px;
  color: var(--blue);
  background: none;
  cursor: pointer;
}
.email-unlock:hover { text-decoration: underline; }

/* ========== 响应式：跟随工作台断点阶梯 ========== */
/* <1200px：侧栏收窄 */
@media (max-width: 1199px) {
  .wsf-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}
/* <1000px：侧栏落到主表单下方 */
@media (max-width: 999px) {
  .wsf-grid { grid-template-columns: minmax(0, 1fr); }
  .wsf-side {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .wsf-side-card { flex: 1 1 260px; }
}
/* <640px：双下拉转单列，内边距收紧 */
@media (max-width: 639px) {
  .wsf { padding: 12px; }
  .wsf-card { padding: 16px 14px; gap: 16px; }
  .wsf-row-2 { grid-template-columns: 1fr; }
  .wsf-side { flex-direction: column; }
  .wsf-side-card { flex: 1 1 auto; }
  .wsf-types { grid-template-columns: 1fr; }
  .wsf-actions .btn-submit-wide { width: 100%; }
}
