/* 沿用模板版式的品牌配色：深红标题栏 #C00000、亮蓝 #4573E9、黄色输入区。
   手机优先：店长多在门店用手机提交。 */

:root {
  --red: #c00000;
  --blue: #4573e9;
  --yellow: #ffd34d;
  --ink: #1d2129;
  --muted: #6b7280;
  --line: #e3e6eb;
  --bg: #f5f6f8;
  --ok: #157f3d;
  --warn: #b45309;
  --bad: #c0261a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* ---------- 顶栏 ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--red);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; gap: 3px; }
.brand span {
  width: 15px; height: 15px;
  border-radius: 50% 50% 3px 3px;
  background: var(--yellow);
}
.brand span:last-child { background: #fff; }

.bar-title { font-weight: 700; letter-spacing: .4px; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }

/* ---------- 卡片与表单 ---------- */

main { max-width: 860px; margin: 0 auto; padding: 16px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.login { max-width: 400px; margin: 48px auto; }

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.intro { color: var(--muted); margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
label.checkbox { font-weight: 400; display: flex; align-items: center; gap: 7px; }

input, select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf2;
}
input[type="checkbox"] { width: auto; }
input:focus, select:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
  background: #fff;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.field label { margin-top: 12px; }

.advanced { margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.advanced summary { cursor: pointer; font-size: 14px; font-weight: 600; }

.actions { display: flex; gap: 10px; margin-top: 22px; }

button {
  font: inherit;
  padding: 10px 18px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
}
button.primary { background: var(--blue); color: #fff; font-weight: 600; }
button.primary:disabled { background: #a9b6d8; cursor: progress; }
button.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.bar button.ghost { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }

/* ---------- 步骤条 ---------- */

.steps { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.step {
  flex: 1 0 auto;
  display: flex; align-items: center; gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.step b {
  display: grid; place-items: center;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--line);
  color: #fff;
  font-size: 12px;
}
.step.current { border-color: var(--blue); color: var(--blue); font-weight: 600; }
.step.current b { background: var(--blue); }
.step.done b { background: var(--ok); }

/* ---------- 资料卡片 ---------- */

.slots { display: grid; gap: 10px; }
.slot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.slot.required { border-color: #d9dce5; }
.slot.filled { border-left-color: var(--ok); background: #f6fbf7; }
.slot-text { flex: 1; min-width: 0; }
.slot-name { font-weight: 600; font-size: 14px; }
.slot-note { color: var(--muted); font-size: 12.5px; }
.slot-file { color: var(--ok); font-size: 12.5px; overflow-wrap: anywhere; }
.slot input[type="file"] { display: none; }
.slot .pick {
  background: #fff; border: 1px solid var(--line);
  padding: 7px 13px; font-size: 13px; border-radius: 6px; flex: none;
}

/* ---------- 提示与结果 ---------- */

.alert {
  padding: 11px 13px;
  border-radius: 7px;
  background: #fdeceb;
  color: var(--bad);
  border: 1px solid #f3c6c2;
  font-size: 14px;
  margin-bottom: 14px;
}

.precheck ul { margin: 0; padding-left: 20px; }
.precheck li { margin: 5px 0; }
.precheck .ok { color: var(--ok); }
.precheck .miss { color: var(--warn); }

.job { font-size: 15px; }
.job-stage { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.job-row { color: var(--muted); font-size: 14px; margin-top: 6px; }
.job .pass { color: var(--ok); font-weight: 600; }
.job .fail { color: var(--bad); font-weight: 600; }

.spinner {
  width: 15px; height: 15px; flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.files { display: grid; gap: 8px; margin-top: 16px; }
.files a {
  display: block;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.files a:hover { background: #f3f6ff; }

/* ---------- 历史 ---------- */

.history { font-size: 14px; }
.history table { width: 100%; border-collapse: collapse; }
.history th {
  text-align: left; font-size: 12.5px; color: #fff;
  background: var(--blue); padding: 8px 10px; white-space: nowrap;
}
.history td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.history .tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tag.delivered { background: #e7f6ec; color: var(--ok); }
.tag.needs_review { background: #fdf3e3; color: var(--warn); }
.tag.draft { background: #eef0f3; color: var(--muted); }
.history .wrap { overflow-x: auto; }

@media (max-width: 560px) {
  main { padding: 12px; }
  .card { padding: 16px; }
  .step b { margin: 0; }
  .step { font-size: 13px; padding: 9px 11px; }
}

/* 紧凑工作区：延续品牌蓝、红和黄，按任务组织信息。 */
:root { --blue: #123da2; --red: #ba292c; --ink: #172a45; --muted: #5d6d82; --line: #dbe3ee; --bg: #f2f5fa; --radius: 14px; }
body { line-height: 1.5; }
[hidden] { display: none !important; }
.bar { background: #bd090d; color: #fff; border-bottom: 3px solid #ffcf14; padding: 9px max(20px, calc((100vw - 1120px) / 2)); }
.brand { width: 64px; height: 34px; align-items: center; justify-content: center; }
.brand img { width: 64px; height: 32px; object-fit: contain; }
.bar-title { font-size: 16px; white-space: nowrap; }
.bar-title small { display: block; font-size: 9px; color: #fff1ba; letter-spacing: .12em; }
.bar button.ghost { color: #fff; background: #97070b; border-color: #f0aaaa; padding: 7px 11px; }
main { max-width: 1100px; padding: 24px; }
.login { max-width: 440px; margin: 8vh auto; }
.card { border: 0; box-shadow: 0 3px 18px rgba(29, 48, 81, .07); padding: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-head h1 { font-size: 23px; margin-bottom: 3px; }
.page-head .intro { margin-bottom: 0; }
.page-status { color: #28416f; background: #ffdf5b; border-radius: 20px; padding: 4px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.panel-note { margin: -8px 0 10px; font-size: 13px; color: var(--muted); }
.guide-wrap { display: flex; justify-content: flex-end; margin: 10px 0; }
.guide { width: 120px; max-width: min(100%, 380px); overflow: hidden; background: #e7eefb; color: #214581; border-radius: 22px; transition: width 260ms cubic-bezier(.16,1,.3,1), border-radius 230ms ease, background-color 230ms ease; }
.guide[open] { width: min(100%, 380px); border-radius: 14px; background: #e7eefb; }
.guide summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 38px; padding: 6px 13px; font-size: 13px; font-weight: 650; animation: capsule-open 350ms cubic-bezier(.16,1,.3,1) both; }
.guide summary::-webkit-details-marker { display: none; }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; background: #1a4abb; flex: none; }
.guide-label { animation: guide-label-in 180ms 140ms ease both; }
.guide-arrow { margin-left: auto; transition: transform 200ms ease; }
.guide[open] .guide-arrow { transform: rotate(180deg); }
.guide.completed:not([open]) { width: 38px; }
.guide.completed:not([open]) summary { justify-content: center; padding: 6px; }
.guide.completed:not([open]) .guide-label, .guide.completed:not([open]) .guide-arrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.guide.completed:not([open]) .guide-dot { width: 23px; height: 23px; display: grid; place-items: center; }
.guide.completed:not([open]) .guide-dot::after { content: '✓'; color: white; font-size: 14px; }
.guide-body { padding: 0 14px 12px; font-size: 13px; animation: guide-reveal 220ms ease both; }
.guide-body p { margin: 5px 0 0; }
@keyframes guide-label-in { from { opacity: 0; transform: translateX(-3px); } }
@keyframes capsule-open { from { clip-path: circle(4px at center); } to { clip-path: inset(0 round 22px); } }
@keyframes guide-reveal { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }
.steps { padding: 5px; border-radius: 12px; background: #e5ebf4; gap: 4px; }
.step { border: 0; background: transparent; justify-content: center; padding: 10px 14px; border-radius: 9px; }
.step.current { color: #123da2; background: white; box-shadow: 0 2px 8px rgba(24, 47, 81, .11); }
.step { transition: flex-grow 240ms cubic-bezier(.16,1,.3,1), background-color 150ms ease; }
.step.current { flex-grow: 1.2; }
.step b { color: #61718a; background: #d9e1ed; }
.step.current b { color: white; background: var(--blue); }
.step.done b { color: white; }
.panel { min-height: 250px; animation: panel-in 240ms cubic-bezier(.16,1,.3,1); }
@keyframes panel-in { from { opacity: .5; transform: translateY(5px); } }
label { color: #33445c; }
input, select { background: #fff; border-color: #cad5e3; border-radius: 9px; min-height: 44px; }
button { min-height: 42px; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #6b96f4; outline-offset: 2px; }
button.primary { background: #b50910; }
.step.current b { background: #002fa7; }
.slot { border-radius: 10px; padding: 10px 12px; }
.slot.required { border-left: 1px solid var(--line); }
.slot.filled { border-color: #acd8bb; }
.slot-name { color: var(--ink); }
.slot-note, .slot-file { font-size: 13px; }
.advanced summary { padding: 6px 0; }
.history th { background: #edf2f9; color: #4a607b; }
.history td, .history th { font-variant-numeric: tabular-nums; }
.account-details > summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-row .hint { margin-top: 3px; }
.account-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 16px; padding: 24px; color: var(--ink); box-shadow: 0 16px 60px rgba(0, 0, 0, .24); }
.account-dialog::backdrop { background: rgba(14, 29, 52, .42); }
.account-dialog select[multiple] { min-height: 100px; }
.account-dialog .actions { margin-bottom: 12px; }
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #e8eef8; font-size: 13px; }
.draft-bar strong { display: inline-block; margin-right: 10px; }
.draft-bar span { color: var(--muted); }
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-actions button { min-height: 36px; padding: 6px 11px; }
.draft-toggle { min-height: 36px; padding: 6px 11px; }
.bar button.sound-toggle { width: 44px; min-width: 44px; height: 44px; padding: 0; white-space: nowrap; border-radius: 50%; font-size: 12px; transition: border-radius 200ms ease, background-color 200ms ease; }
.bar .sound-toggle[aria-pressed="true"] { border-radius: 12px; background: #002fa7; }
::selection { background: #c8d9ff; color: #14294b; }
@media (max-width: 560px) {
  .bar { padding: 8px 12px; gap: 7px; }
  .brand { width: 48px; }
  .brand img { width: 48px; }
  .bar-title { font-size: 14px; }
  .bar-title small { display: none; }
  .bar-right { gap: 5px; }
  #who-name { display: none; }
  main { padding: 16px 12px; }
  .card { padding: 17px; }
  .page-head h1 { font-size: 20px; }
  .page-head .intro { font-size: 13px; }
  .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { font-size: 12px; padding: 9px 3px; gap: 4px; }
  .step b { width: 19px; height: 19px; }
  .slot-note { display: none; }
  .actions { flex-wrap: wrap; }
  .draft-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .draft-bar > div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
