/* Shared visual values: KL Imports src/workspace.css and KL Traffic dashboard_static/styles.css. */
:root {
  color-scheme: light;
  --font-ui: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --canvas: #f5f5f4;
  --surface: #fff;
  --surface-subtle: #f8f8f7;
  --surface-strong: #eeedeb;
  --text: #252523;
  --text-secondary: #575752;
  --text-tertiary: #696963;
  --border: #deded9;
  --border-strong: #b5b5ae;
  --brand: #a83b00;
  --brand-hover: #803000;
  --brand-soft: #fcf0e8;
  --brand-border: #f7dfcd;
  --sidebar-bg: #242523;
  --sidebar-text: #f7f7f4;
  --info: #215d8d;
  --info-bg: #eef4f8;
  --info-border: #c8d9e6;
  --danger: #a42924;
  --danger-bg: #fff1ef;
  --danger-border: #ebc5bf;
  --success: #256346;
  --success-bg: #ecf5ef;
  --success-border: #c8dfd0;
  --radius: 8px;
  --sidebar: 216px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--text); font-size: 1rem; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, label { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.012em; line-height: 1.4; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
p { line-height: 1.5; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 40; background: var(--text); color: #fff; padding: 12px 20px; }
.skip-link:focus { top: 10px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 0 12px 20px; background: var(--sidebar-bg); color: var(--sidebar-text); overflow-y: auto; z-index: 20; }
.brand { display: block; padding: 28px 12px; text-decoration: none; }
.brand > span { font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.brand small { display: block; font-size: 8px; letter-spacing: .07em; color: #c1c3b8; }
.brand-logo { padding: 27px 18px 29px; }
.brand-logo img { display: block; width: 146px; max-width: 100%; height: auto; }
.login-brand { display: inline-block; padding: 18px 24px; background: var(--sidebar-bg); border-radius: 6px; margin-bottom: 24px; }
.login-brand img { display: block; width: 146px; height: auto; }
.workspace-label { margin: 4px 12px 12px; font-size: 12px; color: #c1c3b8; letter-spacing: .08em; }
.site-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; border: 0; border-radius: 6px; padding: 10px 12px; text-align: left; background: transparent; color: #dcddd7; font-size: 15px; font-weight: 500; }
.nav-item:hover { background: #353632; color: #fff; }
.nav-item.active { background: #f8e7da; color: #843300; }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #45463f; padding: 18px 12px 0; font-size: 14px; }
.sidebar-bottom strong { font-weight: 500; }
.sidebar-bottom p { margin-top: 8px; font-size: 13px; color: #c1c3b8; }
.site-header { min-height: 58px; padding: 12px 28px; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-left: var(--sidebar); }
.breadcrumb { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.breadcrumb span { margin: 0 10px; color: var(--border-strong); }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.account { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--text-secondary); }
.text-button { min-height: 32px; border: 0; border-left: 1px solid var(--border); background: none; padding: 4px 0 4px 16px; white-space: nowrap; }
.text-button:hover { color: var(--brand); }
.app-shell > main { margin-left: var(--sidebar); padding: 24px 28px 48px; min-height: calc(100vh - 130px); }
.reference-state { display: flex; align-items: center; gap: 8px; color: var(--text-tertiary); font-size: 13px; margin-bottom: 18px; }
.reference-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.reference-state.live::before { background: var(--success); }
.preview-notice { margin-left: var(--sidebar); padding: 10px 28px; background: var(--info-bg); color: var(--info); border-bottom: 1px solid var(--info-border); font-size: 13px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .06em; margin-bottom: 8px; }
.intro { margin-top: 8px; font-size: 15px; color: var(--text-secondary); }
.step-label { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; color: var(--text-secondary); }
.step-dot { display: grid; place-items: center; border-radius: 50%; width: 24px; height: 24px; background: var(--brand); color: white; }
.step-dot.quiet { background: var(--surface-strong); color: var(--text-tertiary); }
.step-line { width: 18px; height: 1px; background: var(--border); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; border: 1px solid var(--border); border-radius: 6px; padding: 9px 16px; background: var(--surface); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 160ms ease, border-color 160ms ease; }
.button:hover:not(:disabled) { background: var(--surface-subtle); border-color: var(--border-strong); }
.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.button:disabled { background: var(--surface-strong); color: var(--text-tertiary); border-color: var(--border); opacity: .65; }
.full-width { width: 100%; }
.upload-panel { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.upload-panel.drag-over { background: var(--brand-soft); border-color: var(--brand); }
.upload-copy { display: flex; align-items: center; gap: 20px; }
.upload-copy p { color: var(--text-secondary); margin-top: 6px; font-size: 15px; }
.upload-copy .file-types { font-size: 13px; color: var(--text-tertiary); margin-top: 12px; }
.file-icon { width: 48px; height: 56px; display: grid; place-items: center; font-size: 28px; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-border); border-radius: 6px; flex-shrink: 0; }
.upload-button { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.upload-button:has(+input:focus-visible) { outline: 3px solid var(--info); outline-offset: 3px; }
.empty-guide { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 24px; }
.empty-guide > div { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.guide-number { color: var(--brand); font-size: 14px; font-weight: 600; }
.empty-guide h3 { margin: 12px 0 8px; }
.empty-guide p { color: var(--text-secondary); font-size: 14px; }
.connection-note { font-size: 13px; color: var(--text-tertiary); margin-top: 24px; }
.review-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 20px; }
.review-heading h2, .history-row h3 { overflow-wrap: anywhere; }
.muted { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 20px; align-items: start; }
.line-workspace, .summary-panel, .history-surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.line-workspace { overflow: hidden; min-width: 0; }
.table-tools { padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.segmented { display: flex; gap: 4px; flex-wrap: wrap; }
.segmented button { padding: 7px 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text-secondary); font-size: 13px; white-space: nowrap; }
.segmented button.selected { background: var(--brand-soft); color: var(--brand-hover); border-color: var(--brand-border); font-weight: 600; }
.segmented span { margin-left: 6px; }
input, textarea, select { border: 1px solid var(--border-strong); border-radius: 6px; padding: 9px 11px; background: var(--surface); color: var(--text); width: 100%; min-height: 38px; font-size: 14px; }
input:disabled { background: var(--surface-subtle); color: var(--text-tertiary); border-color: var(--border); }
input::placeholder, textarea::placeholder { color: var(--text-tertiary); }
#line-search { width: 220px; flex: 1 1 180px; }
.table-scroll { overflow-x: auto; }
.review-table { width: 100%; min-width: 690px; border-collapse: collapse; text-align: left; }
.review-table th { background: var(--surface-subtle); border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; font-weight: 600; padding: 12px 14px; white-space: nowrap; }
.review-table th:first-child { width: 34%; }
.review-table td { padding: 16px 14px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
.review-table tbody tr:last-child td { border-bottom: 0; }
.review-table tr:hover td { background: var(--surface-subtle); }
.item-heading { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.line-number { color: var(--text-tertiary); font-size: 12px; min-width: 18px; }
.item-code, .sku-code { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.item-description { margin-top: 5px; font-size: 14px; color: var(--text-secondary); }
.item-detail, .selection-note { margin-top: 7px; font-size: 12px; color: var(--text-tertiary); overflow-wrap: anywhere; }
.modification { margin-top: 8px; padding: 6px 8px; border-left: 2px solid var(--brand); background: var(--brand-soft); color: var(--brand-hover); font-size: 13px; overflow-wrap: anywhere; }
.attachment-badge { padding: 2px 5px; border-radius: 4px; background: var(--surface-strong); color: var(--text-secondary); font-size: 10px; letter-spacing: .03em; }
.quantity { white-space: nowrap; }
.product-empty, .excluded-code { font-size: 14px; color: var(--text-tertiary); }
.review-row-button { background: var(--surface); color: var(--brand); border: 1px solid var(--border); border-radius: 5px; padding: 6px 10px; font-size: 13px; min-height: 34px; white-space: nowrap; }
.review-row-button:hover { background: var(--brand-soft); border-color: var(--brand-border); }
.product-change { display: block; margin-top: 10px; }
.review-action-cell { min-width: 190px; }
.row-action { font-size: 14px; background: var(--surface-subtle); border-color: var(--border); }
.row-reason { margin-top: 8px; font-size: 13px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 6px; }
.pending .status-dot { background: var(--brand); }
.table-footnote { border-top: 1px solid var(--border); padding: 12px 16px; font-size: 12px; color: var(--text-tertiary); }
.review-sidebar { position: sticky; top: 20px; }
.summary-panel { padding: 20px; }
.summary-panel .eyebrow { margin-bottom: 16px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-heading span { font-size: 13px; color: var(--text-tertiary); }
.progress-track { height: 5px; border-radius: 4px; background: var(--surface-strong); margin: 14px 0 20px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--brand); transition: width 160ms ease; }
.summary-counts { margin: 0; }
.summary-counts > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 10px 0; color: var(--text-secondary); }
.summary-counts dd { margin: 0; font-weight: 600; color: var(--text); }
.save-section { padding: 16px 0 20px; border-bottom: 1px solid var(--border); }
.save-state { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.save-state.dirty { color: var(--brand); }
.destination { margin: 18px 0; }
.destination label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin: 12px 0 6px; }
.destination p, .import-note { margin-top: 10px; font-size: 12px; color: var(--text-tertiary); }
.import-note { text-align: center; }
.import-blocker { border-top: 1px solid var(--border); padding-top: 15px; margin-bottom: 16px; color: var(--text-secondary); font-size: 13px; }
.import-blocker p + p { margin-top: 8px; }
.warnings { padding: 12px 16px; margin-bottom: 18px; border: 1px solid var(--info-border); border-radius: 6px; background: var(--info-bg); color: var(--info); }
.warnings summary { cursor: pointer; font-size: 13px; font-weight: 500; }
.warnings[open] summary { margin-bottom: 10px; }
.warnings p { font-size: 13px; }
.warnings p + p { margin-top: 6px; }
.message { padding: 12px 16px; margin-bottom: 20px; background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); font-size: 14px; border-radius: 6px; }
.message.error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.empty-table { padding: 40px 20px; text-align: center; color: var(--text-tertiary); font-size: 14px; }
.history-row { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.history-row:last-child { border-bottom: 0; }
.history-row p { margin-top: 6px; color: var(--text-tertiary); font-size: 13px; }
.history-actions { display: flex; align-items: center; gap: 16px; }
.history-status { font-size: 12px; color: var(--text-secondary); border-radius: 4px; padding: 3px 8px; background: var(--surface-strong); text-transform: capitalize; }
footer { margin-left: var(--sidebar); padding: 20px 28px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); color: var(--text-tertiary); font-size: 12px; }
dialog { width: min(650px,calc(100vw - 32px)); max-height: 90vh; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px #25252326; }
dialog::backdrop { background: #24252380; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.dialog-heading h2 { font-size: 22px; }
.icon-button { border: 1px solid var(--border); border-radius: 6px; width: 32px; height: 32px; background: var(--surface-subtle); color: var(--text-secondary); font-size: 22px; }
.source-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 18px 0; padding: 16px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 6px; color: var(--text-tertiary); font-size: 13px; }
.source-details strong { display: block; font-weight: 500; color: var(--text); margin-top: 3px; overflow-wrap: anywhere; }
.source-wide { grid-column: 1/-1; }
.action-options { border: 0; margin: 20px 0; padding: 0; }
.action-options legend, label[for=product-search], label[for=line-reason] { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.action-options label { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--text-secondary); font-size: 14px; }
.action-options input { width: 16px; min-height: 16px; accent-color: var(--brand); }
#product-picker > label, #reason-field > label { display: block; }
.field-note { color: var(--text-tertiary); font-size: 12px; margin: 8px 0; }
.selected-product { background: var(--brand-soft); color: var(--brand-hover); border: 1px solid var(--brand-border); border-radius: 6px; margin: 10px 0; padding: 10px 12px; font-size: 14px; }
.product-results { max-height: 230px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; margin: 10px 0 18px; }
.product-results:empty { display: none; }
.product-option { display: block; width: 100%; padding: 12px; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.product-option:last-child { border: 0; }
.product-option:hover:not(:disabled) { background: var(--brand-soft); }
.product-option:disabled { opacity: .55; }
.product-option strong { font-size: 14px; font-weight: 600; }
.product-option p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.product-option span { font-size: 12px; color: var(--brand); }
.results-note { padding: 12px; font-size: 13px; color: var(--text-tertiary); }
.dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.dialog-footer > span { font-size: 12px; color: var(--text-tertiary); }
.field-error { color: var(--danger); font-size: 14px; margin-top: 10px; }
#reason-required { color: var(--text-tertiary); font-size: 12px; font-weight: 400; }
textarea { resize: vertical; min-height: 80px; }
.login-shell { width: min(580px,calc(100% - 40px)); margin: 12vh auto; padding: 40px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: var(--radius); }
.login-shell > p:first-child { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--brand); margin-bottom: 28px; }
.login-shell h1 { margin-bottom: 16px; }
.login-shell p { color: var(--text-secondary); font-size: 15px; margin-top: 14px; }
.login-shell a { display: inline-flex; padding: 10px 18px; margin: 24px 0 4px; border-radius: 6px; background: var(--brand); color: white; font-size: 15px; text-decoration: none; }
@media (min-width: 1500px) { .workspace-grid { grid-template-columns: minmax(0,1fr) 300px; } }
@media (max-width: 1200px) { .step-label { display: none; } .workspace-grid { grid-template-columns: minmax(0,1fr) 250px; gap: 16px; } .summary-panel { padding: 16px; } .upload-panel { align-items: flex-start; flex-direction: column; } .empty-guide { gap: 12px; } .empty-guide > div { padding: 16px; } }
@media (max-width: 1000px) { :root { --sidebar: 180px; } .sidebar { padding-left: 8px; padding-right: 8px; } .brand { padding-left: 8px; padding-right: 8px; } .brand > span { font-size: 20px; } .workspace-label { font-size: 11px; } .app-shell > main { padding: 24px 20px 40px; } .site-header { padding-left: 20px; padding-right: 20px; } .breadcrumb { display: none; } .account { width: 100%; justify-content: space-between; } .workspace-grid { grid-template-columns: minmax(0,1fr); } .review-sidebar { position: static; grid-row: 1; } .summary-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; } .summary-panel > .eyebrow, .progress-heading, .progress-track, .summary-counts, .save-section { grid-column: 1; } .destination { grid-column: 2; grid-row: 1 / span 4; margin: 0; } .import-blocker { grid-column: 2; grid-row: 5; font-size: 12px; } #submit-review { grid-column: 2; } .import-note { grid-column: 1/-1; } .summary-panel .eyebrow { margin-bottom: 10px; } }
@media (max-width: 700px) { :root { --sidebar: 0px; } .sidebar { position: static; width: 100%; padding: 12px 16px; overflow: visible; } .brand { padding: 0 0 12px; } .brand small, .workspace-label, .sidebar-bottom { display: none; } .site-nav { flex-direction: row; } .nav-item { width: auto; min-width: 120px; } .site-header { min-height: 52px; } .preview-notice { padding: 10px 20px; } .account #user-name { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .empty-guide { grid-template-columns: 1fr; } .upload-panel { padding: 24px; } .upload-button { width: 100%; } .review-heading { align-items: flex-start; } .review-heading .button { padding: 8px 12px; font-size: 13px; } .history-row { align-items: flex-start; flex-direction: column; } .history-actions { width: 100%; justify-content: space-between; } footer { padding: 18px 20px; } }
@media (max-width: 460px) { .summary-panel { display: block; } .destination { margin: 18px 0; } .file-icon { display: none; } h1 { font-size: 26px; } dialog { padding: 20px; } .dialog-footer { align-items: flex-start; } .login-shell { padding: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
