/* ============================================================
   UI-3 · 工作台、运营后台、状态页、原型总览
   ============================================================ */

/* ---------- 待办 ---------- */
.todo-list { display: grid; gap: 2px; }
.todo { display: flex; align-items: flex-start; gap: 10px; padding: 11px 4px; border-bottom: 1px dashed var(--line); }
.todo:last-child { border-bottom: 0; }
.todo.is-done .todo__txt b { color: var(--text-3); text-decoration: line-through; }
.todo__txt { min-width: 0; }
.todo__txt b { display: block; font-size: var(--fs-13); font-weight: 600; }
.todo__txt span { font-size: var(--fs-12); color: var(--text-3); }
.todo__right { margin-left: auto; text-align: right; white-space: nowrap; }
.todo__right b { display: block; font-family: var(--font-num); font-size: var(--fs-13); color: var(--deal-600); }
.todo__right span { font-size: var(--fs-11); color: var(--text-3); }

/* ---------- 工作台网格 ---------- */
.ws-grid { display: grid; gap: var(--sp-4); }
.ws-grid--2 { grid-template-columns: 1.55fr 1fr; }
.ws-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ws-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }

/* ---------- 进度与漏斗 ---------- */
.funnel { display: grid; gap: 10px; }
.funnel__row { display: grid; grid-template-columns: 76px 1fr 58px; gap: 10px; align-items: center; font-size: var(--fs-12); }
.funnel__track { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.funnel__fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--brand-600), var(--brand-500)); }
.funnel__fill--deal { background: linear-gradient(90deg, var(--deal-600), var(--deal-500)); }
.funnel__row b { text-align: right; font-family: var(--font-num); }

/* ---------- 迷你图表 ---------- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 132px; padding-top: 8px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart__bar { width: 100%; border-radius: 3px 3px 0 0; background: var(--brand-100); position: relative; min-height: 4px; }
.chart__bar--on { background: var(--brand-700); }
.chart__bar--deal { background: var(--deal-500); }
.chart__lbl { font-size: 10px; color: var(--text-3); font-family: var(--font-num); }
.legend { display: flex; gap: var(--sp-4); font-size: var(--fs-11); color: var(--text-3); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--brand-700); }
.legend i.deal { background: var(--deal-500); }
.legend i.light { background: var(--brand-100); }

/* ---------- 审核队列 ---------- */
.audit { display: grid; grid-template-columns: 380px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; background: #fff; }
.audit__list { border-right: 1px solid var(--line); max-height: 620px; overflow: auto; }
.audit__toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.audit__toolbar h3 { font-size: var(--fs-14); }
.audit-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.audit-row:hover { background: var(--brand-050); }
.audit-row.is-on { background: var(--brand-050); box-shadow: inset 3px 0 0 var(--brand-700); }
.audit-row b { font-size: var(--fs-13); font-weight: 600; }
.audit-row small { font-size: var(--fs-11); color: var(--text-3); }
.audit-row .tag { align-self: start; }
.audit__detail { padding: var(--sp-5); }
.audit__detail h2 { font-size: var(--fs-18); margin-bottom: 4px; }
.audit__block { margin-top: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.audit__block h4 { font-size: var(--fs-12); color: var(--text-3); margin-bottom: 8px; letter-spacing: .5px; }
.file-list { display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-2); font-size: var(--fs-13); }
.file-item .icon { color: var(--brand-700); }
.file-item span { color: var(--text-3); font-size: var(--fs-11); margin-left: auto; }

/* 自动校验结果：状态行（替代满格进度条，异常项整行高亮） */
.vlist { display: grid; gap: 6px; }
.vlist__row {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-2); font-size: var(--fs-13);
}
.vlist__row > span { display: inline-flex; align-items: center; }
.vlist__row > span:first-child { flex: none; }
.vlist__row > span:nth-child(2) { flex: 1; min-width: 0; }
.vlist__row .icon { width: 15px; height: 15px; }
.vlist__row em { margin-left: auto; font-style: normal; font-size: var(--fs-12); font-weight: 600; }
.vlist__row.is-ok .icon, .vlist__row.is-ok em { color: var(--ok-700); }
.vlist__row.is-warn { border-color: var(--deal-100); background: var(--deal-050); }
.vlist__row.is-warn .icon, .vlist__row.is-warn em { color: var(--deal-700); }

/* ---------- 状态与组件展示 ---------- */
.state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.state-box { padding: var(--sp-4); background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); }
.state-box h4 { font-size: var(--fs-13); color: var(--text-2); margin-bottom: 10px; }
.state-box .row { flex-wrap: wrap; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.swatch { border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.swatch__c { height: 44px; }
.swatch__t { padding: 5px 8px; font-size: 10px; font-family: var(--font-mono); color: var(--text-2); }

/* ---------- 原型总览 ---------- */
.ov { min-height: 100vh; background: var(--paper); }
.ov__head { background: var(--hero-soft); color: var(--text); padding: var(--sp-7) 0 var(--sp-6); border-bottom: 1px solid var(--line); }
.ov__head h1 { font-size: var(--fs-28); margin: 10px 0 8px; color: var(--brand-900); }
.ov__head p { font-size: var(--fs-13); color: var(--text-2); max-width: 760px; line-height: 1.8; }
.ov__stats { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin-top: var(--sp-5); }
.ov__stats b { display: block; font-family: var(--font-num); font-size: var(--fs-22); color: var(--brand-700); }
.ov__stats span { font-size: var(--fs-11); color: var(--text-3); }
.ov__filters { display: flex; flex-wrap: wrap; gap: 8px; padding: var(--sp-5) 0 var(--sp-3); }
.ov-group { margin-bottom: var(--sp-6); }
.ov-group h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-16); margin-bottom: var(--sp-3); }
.ov-group h2 .cnt { font-family: var(--font-num); font-size: var(--fs-12); color: var(--text-3); font-weight: 400; }
.ov-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
/* 组内只有 2 页时按 2 列铺满；只有 1 页时收窄，避免右侧留空位 */
.ov-grid:has(> .ov-card:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-grid:has(> .ov-card:only-child) { grid-template-columns: minmax(0, 460px); }
.ov-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; box-shadow: var(--shadow-1); color: var(--text); transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease); }
.ov-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--text); }
.ov-card__shot { height: 178px; background: var(--surface-3); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; }
.ov-card__shot img { width: 100%; display: block; position: relative; z-index: 1; }
.ov-card__shot .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: var(--fs-12); z-index: 0; }
.ov-card__meta { padding: 12px 14px; }
.ov-card__meta b { font-size: var(--fs-14); }
.ov-card__meta p { font-size: var(--fs-12); color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.ov-card__meta .paths { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.ov-card__no { font-family: var(--font-num); color: var(--brand-700); font-weight: 700; margin-right: 6px; }

/* ---------- 工作台：角色身份与切换 ---------- */
.ws__role-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .3px; flex: none; }
.ws__role { position: relative; }
.ws__role-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; color: var(--text-2); font-size: var(--fs-12); cursor: pointer; }
.ws__role-btn:hover { border-color: var(--brand-500); color: var(--brand-700); }
.ws__role-btn i { width: 22px; height: 22px; border-radius: 50%; color: #fff; font: 700 11px/22px var(--font); text-align: center; font-style: normal; }
.ws__role-btn em { font-style: normal; font-size: 10px; color: var(--text-3); letter-spacing: .4px; }
.ws__role-caret { color: var(--text-3); font-size: 10px; transition: transform .18s ease; }
.ws__role.is-open .ws__role-caret { transform: rotate(180deg); }
.ws__role-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-pop, 60); width: 262px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-3, var(--shadow-2)); display: none; }
.ws__role.is-open .ws__role-menu { display: block; }
.ws__role-item { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--r-2); color: var(--text); }
.ws__role-item:hover { background: var(--surface-3); }
.ws__role-item.is-on { background: var(--brand-050); }
.ws__role-item > i { width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 700 12px/26px var(--font); text-align: center; font-style: normal; flex: none; }
.ws__role-item > span { display: grid; gap: 1px; min-width: 0; }
.ws__role-item b { font-size: var(--fs-12); }
.ws__role-item small { font-size: 10px; color: var(--text-3); }
.ws__role-cur { margin-left: auto; font-size: 10px; color: var(--brand-700); background: #fff; border: 1px solid var(--brand-200, var(--brand-050)); border-radius: var(--r-pill); padding: 1px 6px; }
.ws__role-sep { height: 1px; margin: 5px 6px; background: var(--line); }

.rolebar { display: flex; align-items: center; gap: 9px; margin: var(--sp-3) var(--sp-6) 0; padding: 9px 12px; border: 1px solid #f3d6a4; border-left: 3px solid var(--brand-600, #d97706); border-radius: var(--r-2); background: #fffaf0; color: #7a4c08; font-size: var(--fs-12); }
.rolebar__ico { display: inline-flex; color: #b45309; }
.rolebar__ico svg { width: 16px; height: 16px; }
.rolebar__txt { line-height: 1.6; }
.rolebar__txt b { color: #92400e; }
.rolebar__go { margin-left: auto; flex: none; }
.rolebar__x { border: 0; background: transparent; color: #a16207; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.rolebar__x:hover { color: #7a4c08; }

/* 角色主色：仅用于身份标记，不改变正文与按钮 */
.ws__side[data-ws-role="buyer"] { --role-accent: #1b5cf0; }
.ws__side[data-ws-role="provider"] { --role-accent: #0e9f8e; }
.ws__side[data-ws-role="creator"] { --role-accent: #7a5af8; }
.ws__side[data-ws-role="school"] { --role-accent: #2f9e5f; }
.ws__side[data-ws-role="ops"] { --role-accent: #41506b; }
.ws__side .ws__brand { box-shadow: inset 0 3px 0 var(--role-accent, var(--brand-700)); }
.ws__side .ws__link.is-on { box-shadow: inset 3px 0 0 var(--role-accent, var(--brand-700)); background: color-mix(in srgb, var(--role-accent, var(--brand-700)) 7%, #fff); color: var(--role-accent, var(--brand-700)); }
.ws__side .ws__link.is-on .icon { color: var(--role-accent, var(--brand-700)); }
