/* ==========================================================================
   资料录入页的样式 —— 沿用 style.css 里的颜色变量
   ========================================================================== */

.up-main {
  max-width: 860px;
  padding-bottom: 20px;
}

.up-title {
  margin: 52px 0 8px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--navy);
}

.up-sub {
  margin: 0 0 34px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 560px;
}

/* ---------- 提示条 ---------- */

.up-warn {
  margin-bottom: 30px;
  padding: 14px 16px;
  border: 1px solid #f1ddc4;
  border-left-width: 3px;
  border-radius: 8px;
  background: #fdf7ef;
  font-size: 13px;
  color: #7a5320;
}

.up-warn p { margin: 0 0 6px; }
.up-warn p:last-child { margin-bottom: 0; }

.up-warn.is-info {
  border-color: #cfe0f0;
  border-left-color: var(--blue);
  background: #f2f7fc;
  color: #24537d;
}

/* ---------- 分步 ---------- */

.up-step {
  margin-bottom: 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.up-step:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.up-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.up-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
}

.up-step-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.up-step-note {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- 拖放区 ---------- */

.up-drop {
  padding: 34px 24px;
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: center;
  transition: border-color 0.16s, background 0.16s;
}

.up-drop.is-over {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.up-drop-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 8px;
}

.up-drop p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.up-drop b { color: var(--ink); font-weight: 600; }

.up-hint {
  margin-top: 9px !important;
  font-size: 12px !important;
  color: var(--ink-3) !important;
}

.up-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue);
  border-bottom: 1px solid var(--sky);
  font-size: inherit;
}

.up-link:hover { color: var(--navy); }

/* ---------- 表单 ---------- */

.up-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 16px;
}

.up-fields-item {
  grid-template-columns: 1fr 1fr;
  padding: 0 16px 16px;
}

.up-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.up-field > span {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.up-span2 { grid-column: span 2; }

.up-field input,
.up-field select,
.up-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.14s, box-shadow 0.14s;
}

.up-field textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 54px;
}

.up-field input:focus,
.up-field select:focus,
.up-field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(168, 200, 232, 0.32);
}

.up-field input::placeholder,
.up-field textarea::placeholder { color: #b6c1cf; }

/* ---------- 文件列表 ---------- */

.up-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.up-empty {
  margin: 0;
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.up-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.up-item.is-done {
  border-color: #cfe3d6;
  background: #fbfdfb;
}

.up-item-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px 0;
}

.up-kind {
  flex-shrink: 0;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: #eef1f6;
  color: #56677d;
}

.up-kind.k-pdf { background: #fbeeeb; color: #a8452e; }
.up-kind.k-html { background: #e8f0fa; color: #2a5f96; }
.up-kind.k-zip { background: #f0eef7; color: #5a4c82; }

.up-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up-item-size {
  font-size: 11.5px;
  color: var(--ink-3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.up-del {
  margin-left: auto;
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--ink-3);
  transition: color 0.15s;
}

.up-del:hover { color: #a8452e; }

.up-done {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #2f7a4f;
}

.up-path {
  margin: 4px 16px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 操作区 ---------- */

.up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* .btn 是 inline-flex，会盖掉 hidden 属性，这里补回来 */
.btn[hidden] { display: none; }

.up-ghost { color: var(--ink-3); }

.up-tip {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--ink-3);
  max-width: 620px;
  line-height: 1.7;
}

.up-preview {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-height: 260px;
  overflow: auto;
  white-space: pre;
}

.up-log:empty { display: none; }

.up-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  max-height: 200px;
  overflow: auto;
}

.up-log-line {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
  word-break: break-all;
}

.up-log-line.is-ok { color: #2f7a4f; }
.up-log-line.is-err { color: #a8452e; }
.up-log-line.is-warn { color: #8a6420; }

/* 写完之后的出口 */

.up-gohome {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.up-gohome span {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* 顶栏返回按钮 */
.header-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
  color: var(--blue);
}

.header-back svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 线上投稿视图 ---------- */

.up-alt {
  margin-bottom: 30px;
  padding: 16px 18px;
  border: 1px solid #cfe0f0;
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: #f2f7fc;
}

.up-alt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.up-alt-head b {
  font-size: 13.5px;
  font-weight: 600;
  color: #1c4b73;
}

.up-alt p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.75;
  color: #24537d;
}

.up-alt p b { color: #16324f; }

.up-alt .up-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.up-alt .up-empty {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.7;
  color: #24537d;
}

/* 投稿表单字段少、句子长，两列比自动铺四列好读 */

#remoteForm .up-fields {
  grid-template-columns: 1fr 1fr;
}

.up-fields-one,
#remoteForm .up-fields.up-fields-one {
  grid-template-columns: 1fr;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 640px) {
  .up-title { margin-top: 34px; font-size: 26px; }
  .up-fields { grid-template-columns: 1fr; }
  #remoteForm .up-fields { grid-template-columns: 1fr; }
  .up-fields-item { grid-template-columns: 1fr; }
  .up-span2 { grid-column: span 1; }
  .up-step-note { display: none; }
  .up-actions .btn { flex: 1 1 auto; }
}
