/* B2C 做单 /#toc-order（app/toc_order.py）。颜色只用 tokens.css 已定义变量、不写裸 hex（UI 门禁）。 */
[hidden] { display: none !important; }
body { background: var(--canvas); }
.to-app { max-width: 1400px; margin: 0 auto; padding: 20px 16px 72px; }
.to-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.to-head h1 { margin: 0 0 6px; font-size: 22px; color: var(--ink); }
.to-head p { margin: 0; max-width: 820px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.to-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.to-link { color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.to-banner { margin: 12px 0 0; padding: 8px 12px; border-radius: var(--radius-md); font-size: 13px; line-height: 1.6;
  background: var(--info-bg); color: var(--info-fg); border: 1px solid var(--info-border); }
.to-dim { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.6; }

.to-btn { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); padding: 5px 12px; font-size: 13px; cursor: pointer; }
.to-btn:hover:not(:disabled) { background: var(--surface-hover); }
.to-btn:disabled { opacity: .55; cursor: not-allowed; }
.to-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.to-btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.to-btn.big { padding: 8px 18px; font-size: 14px; }
.to-btn.mini { padding: 1px 8px; font-size: 12px; }

.to-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 10px; }
.to-date { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.to-date input { border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 5px 8px; font-size: 13px; background: var(--surface); color: var(--ink); font-family: inherit; }
.to-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.to-chip { border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.to-chip:hover { background: var(--surface-hover); }
.to-chip.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }

.to-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.to-results { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); font-size: 13px; line-height: 1.7; }
.to-results .ok { color: var(--success-fg); }
.to-results .bad { color: var(--danger-fg); }

.to-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.to-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; }
.to-card.blocked { border-color: var(--danger-border); }
.to-card.part { border-color: var(--warning-border); }
.to-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.to-po { font-size: 16px; font-weight: 700; color: var(--ink); }
.to-meta { color: var(--muted); font-size: 12px; }
.to-money { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.to-steps { margin: 8px 0 2px; }
.to-links { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.to-links a { color: var(--accent); }

.to-msgs { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; }
.to-msgs li { padding-left: 18px; position: relative; }
.to-msgs li::before { position: absolute; left: 0; top: 0; }
.to-msgs.bad li { color: var(--danger-fg); }
.to-msgs.bad li::before { content: "✕"; }
.to-msgs.warn li { color: var(--warning-fg); }
.to-msgs.warn li::before { content: "!"; font-weight: 700; left: 4px; }

.to-tw { overflow-x: auto; margin-top: 8px; }
.to-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.to-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 4px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.to-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.to-table tr:last-child td { border-bottom: 0; }
.to-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.to-table td.bad { color: var(--danger-fg); }
.to-img { width: 44px; height: 44px; object-fit: contain; border-radius: var(--radius-sm); background: var(--neutral-bg); display: block; }
.to-noimg { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--neutral-bg); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.to-it { font-weight: 600; color: var(--ink); }
.to-sub { display: block; color: var(--muted); font-size: 12px; }
.to-was { display: block; color: var(--warning-fg); font-size: 12px; }

.to-cmp { margin-top: 8px; font-size: 13px; }
.to-cmp summary { cursor: pointer; color: var(--ink-2); }
.to-cmp .same { color: var(--success-fg); }
.to-cmp .diff { color: var(--warning-fg); }
.to-cmp table { margin-top: 6px; }
.to-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }

.to-skipped h3 { margin: 0 0 6px; font-size: 13px; color: var(--ink); }
.to-src { margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.to-src summary { cursor: pointer; color: var(--muted); }
.to-src li { line-height: 1.7; }
@media (max-width: 640px) { .to-money { margin-left: 0; } }
.to-btn.danger { border-color: var(--danger-border); color: var(--danger-fg); margin-left: auto; }
.to-btn.danger:hover:not(:disabled) { background: var(--danger-bg); }
.to-made { margin-top: 4px; font-size: 12px; color: var(--success-fg); }
.to-table td.bad { color: var(--danger-fg); }

/* 录单（飞书表搬进中台） */
.to-entry { margin: 12px 0; }
.to-entry-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.to-entry-head h2 { margin: 0 auto 0 0; font-size: 15px; color: var(--ink); }
.to-entry-head h2 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.to-entry-head select { border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 13px; background: var(--surface); color: var(--ink); }
.to-grid th { position: sticky; top: 0; background: var(--surface); }
.to-grid td { padding: 3px 4px; vertical-align: top; }
.to-grid input { width: 100%; box-sizing: border-box; border: 1px solid var(--border-control); border-radius: var(--radius-sm); padding: 4px 6px; font-size: 13px;
  background: var(--surface); color: var(--ink); font-family: inherit; min-width: 0; }
.to-grid input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.to-grid tr.edit td { background: var(--info-bg); }
.to-grid .to-hint { display: block; font-size: 11px; line-height: 1.4; color: var(--muted); margin-top: 2px; max-width: 220px; }
.to-grid .to-hint.bad { color: var(--danger-fg); }
.to-grid .to-hint.warn { color: var(--warning-fg); }
.to-imgs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.to-imgs img { width: 36px; height: 36px; object-fit: contain; border-radius: var(--radius-sm); background: var(--neutral-bg); }
.to-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.to-x:hover { color: var(--danger-fg); }
.to-card.flash { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow .3s; }
