@font-face {
  font-family: "Inter";
  src: url("/static/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-blue: #f2f6ff;
  --text: #172033;
  --text-soft: #4f5d73;
  --muted: #7a879a;
  --border: #e1e6ee;
  --border-strong: #cfd7e3;
  --primary: #2f6fed;
  --primary-hover: #245ed1;
  --primary-soft: #eaf1ff;
  --navy: #172a4a;
  --success: #16845b;
  --success-soft: #e9f7f1;
  --warning: #a66208;
  --warning-soft: #fff7e6;
  --danger: #c13e4a;
  --danger-soft: #fff0f1;
  --violet: #7457d6;
  --violet-soft: #f0edff;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .04);
  --shadow-md: 0 8px 24px rgba(23, 42, 74, .07);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.5 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg, .button svg { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid rgba(47, 111, 237, .22); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Application shell */
.app-frame { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 5px 8px; color: var(--text); text-decoration: none; }
.brand-mark {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #397bf2, #285ecb);
  box-shadow: 0 5px 13px rgba(47, 111, 237, .22);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 15px; font-weight: 750; letter-spacing: -.015em; }
.brand-copy small { margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 600; }

.side-nav { display: grid; gap: 26px; margin-top: 30px; }
.nav-caption { display: block; margin: 0 10px 7px; color: #9aa5b5; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.side-nav-links { display: grid; gap: 3px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.side-nav a svg { width: 19px; height: 19px; color: #718095; }
.side-nav a:hover { color: var(--text); background: #f5f7fa; }
.side-nav a.active { color: #1f5ecf; background: var(--primary-soft); }
.side-nav a.active svg { color: var(--primary); }

.sidebar-bottom { display: grid; gap: 10px; margin-top: auto; }
.system-badge { display: flex; align-items: center; gap: 9px; margin: 0 5px; padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); }
.system-badge > span { width: 8px; height: 8px; border-radius: 50%; background: #25a36f; box-shadow: 0 0 0 3px rgba(37,163,111,.12); }
.system-badge strong, .system-badge small { display: block; }
.system-badge strong { font-size: 11px; }
.system-badge small { color: var(--muted); font-size: 10px; }

.user-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 10px 7px 2px; border-top: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #255fc6; background: var(--primary-soft); font-size: 12px; font-weight: 800; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.user-panel form { margin: 0; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--text); background: #f0f3f7; }
.icon-button svg { width: 18px; height: 18px; }

.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 34px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); color: var(--muted); font-size: 11px; }
.workspace-context { font-weight: 650; }
.workspace-assurance { display: flex; align-items: center; gap: 7px; }
.workspace-assurance svg { width: 16px; height: 16px; color: var(--success); }

.shell { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 34px 0 56px; }
footer { margin-top: auto; padding: 19px 28px; border-top: 1px solid var(--border); color: #98a3b2; text-align: center; font-size: 10px; }

/* Typography and shared content */
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 5px 0 8px; font-size: clamp(27px, 3vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
p { margin: 5px 0; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-title > div:first-child { max-width: 760px; }
.page-title p { color: var(--text-soft); font-size: 14px; }
.page-kicker, .card-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.breadcrumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.breadcrumb:hover { color: var(--primary); }
.breadcrumb svg { width: 15px; height: 15px; }
.help-chip, .admin-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-soft); background: var(--surface); font-size: 11px; font-weight: 650; white-space: nowrap; }
.help-chip svg, .admin-chip svg { width: 16px; height: 16px; color: var(--primary); }

/* Buttons and fields */
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  text-decoration: none;
  font-weight: 680;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.primary { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 2px 5px rgba(47,111,237,.16); }
.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.secondary { color: #304159; border-color: var(--border-strong); background: var(--surface); }
.secondary:hover { border-color: #aeb9c8; background: #f8fafc; }
.wide { width: 100%; }
button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.text-button { min-height: auto; padding: 0; border: 0; border-radius: 0; color: var(--primary); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--primary-hover); text-decoration: underline; }

.field { margin-bottom: 15px; }
.field label, label, legend { color: #344157; font-weight: 650; }
.field > label { display: block; margin-bottom: 6px; font-size: 12px; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
input, textarea, select {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #9aa5b5; }
input:hover, textarea:hover, select:hover { border-color: #adb8c7; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.11); }
textarea { min-height: 82px; resize: vertical; }

/* Panels and tables */
.panel { margin-bottom: 20px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.heading-with-icon { display: flex; align-items: center; gap: 12px; }
.section-icon { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.section-icon svg { width: 21px; height: 21px; }
.section-icon.blue { color: var(--primary); background: var(--primary-soft); }
.section-icon.slate { color: #5c6d83; background: #eff2f6; }
.section-icon.large { width: 46px; height: 46px; flex-basis: 46px; }
.panel-description { margin: -6px 0 20px; color: var(--text-soft); font-size: 12px; }
.count-badge { display: grid; place-items: center; min-width: 32px; height: 28px; padding: 0 9px; border-radius: 7px; color: #285fc2; background: var(--primary-soft); font-size: 11px; font-weight: 750; }

.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; contain: inline-size paint; }
#lookup-results-form { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { color: #8390a3; background: #fafbfc; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th:first-child { border-radius: 7px 0 0 7px; }
thead th:last-child { border-radius: 0 7px 7px 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
code { color: #4e5d71; font: 10px ui-monospace, "DejaVu Sans Mono", monospace; }
.filename { display: inline-flex; align-items: center; gap: 8px; }
.filename svg { width: 17px; height: 17px; color: var(--muted); }

/* Status and feedback */
.status { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 9px; border-radius: 999px; color: #546175; background: #eef1f5; font-size: 10px; font-weight: 720; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.output_ready, .status.print_confirmed, .status.accepted { color: #137150; background: var(--success-soft); }
.status.confirmed, .status.validating, .status.uploaded { color: #2861c6; background: var(--primary-soft); }
.status.failed, .status.cancelled, .status.rejected { color: #aa3440; background: var(--danger-soft); }
.status.awaiting_mapping_confirmation { color: #92600e; background: var(--warning-soft); }
.status.large { padding: 7px 11px; font-size: 11px; }

.alert { margin: 16px 0; padding: 13px 15px; border: 1px solid var(--border); border-radius: 9px; }
.alert strong { display: block; font-size: 12px; }
.alert p { margin: 3px 0 7px; font-size: 11px; }
.alert.danger { color: #952f3a; border-color: #f0c6ca; background: var(--danger-soft); }
.alert.warning { color: #7c510b; border-color: #f1d79e; background: var(--warning-soft); }
.alert.info { color: #2c5cae; border-color: #cfdcff; background: var(--primary-soft); }
.alert.success { color: #146e4e; border-color: #bfe2d3; background: var(--success-soft); }
.check { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 11px; font-weight: 600; }
.check input { flex: 0 0 auto; width: 16px; height: 16px; min-height: 0; margin: 1px 0 0; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 20px; margin-bottom: 20px; }
.primary-work-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  min-height: 255px;
  padding: 28px;
  border: 1px solid #d8e2f7;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 95% 0%, rgba(76,132,242,.13), transparent 34%),
    linear-gradient(145deg, #fff 0%, #f5f8ff 100%);
  box-shadow: var(--shadow-md);
}
.work-card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgba(47,111,237,.22); }
.work-card-icon svg { width: 27px; height: 27px; }
.work-card-copy { align-self: center; }
.work-card-copy h2 { margin-top: 2px; font-size: 23px; }
.work-card-copy > p { max-width: 570px; color: var(--text-soft); font-size: 13px; }
.inline-steps { display: flex; gap: 20px; margin: 21px 0 22px; padding: 0; list-style: none; color: var(--text-soft); font-size: 11px; font-weight: 600; }
.inline-steps li { display: flex; align-items: center; gap: 7px; }
.inline-steps span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #cdd9ef; border-radius: 50%; color: var(--primary); background: #fff; font-size: 9px; font-weight: 800; }

.overview-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-heading { margin-bottom: 13px; }
.overview-list { margin: 0; }
.overview-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.overview-list dt { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 11px; }
.overview-list dd { margin: 0; font-size: 18px; font-weight: 740; }
.overview-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; }
.overview-icon svg { width: 16px; height: 16px; }
.overview-icon.blue { color: var(--primary); background: var(--primary-soft); }
.overview-icon.violet { color: var(--violet); background: var(--violet-soft); }
.overview-icon.amber { color: var(--warning); background: var(--warning-soft); }
.quiet-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; color: var(--primary); text-decoration: none; font-size: 11px; font-weight: 650; }
.panel-heading .quiet-link { margin-top: 0; }

.activity-list, .history-list { display: grid; }
.activity-row, .history-row { display: grid; align-items: center; gap: 12px; min-height: 62px; padding: 9px 7px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.activity-row { grid-template-columns: auto 1fr auto auto; }
.activity-row:first-child, .history-row:first-child { border-top: 0; }
.activity-row:hover, .history-row:hover { background: #fafbfe; }
.activity-copy strong, .activity-copy small, .history-main strong, .history-main small { display: block; }
.activity-copy strong, .history-main strong { font-size: 12px; }
.activity-copy small, .history-main small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.activity-labels { display: -webkit-box !important; overflow: hidden; color: #405878 !important; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.activity-labels span { color: var(--text-soft); font-weight: 700; }
.file-icon { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--border); border-radius: 8px; color: var(--primary); background: #f8faff; }
.file-icon svg { width: 18px; height: 18px; }
.row-arrow { width: 16px; height: 16px; color: #a1acbb; }

/* Reprint search */
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 20px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); list-style: none; box-shadow: var(--shadow-sm); }
.process-steps li { display: flex; align-items: center; position: relative; gap: 10px; padding: 13px 16px; color: var(--muted); }
.process-steps li:not(:last-child)::after { content: ""; position: absolute; top: 15px; right: -1px; bottom: 15px; width: 1px; background: var(--border); }
.process-steps li > span { display: grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); font-size: 10px; font-weight: 750; }
.process-steps strong, .process-steps small { display: block; }
.process-steps strong { color: var(--text-soft); font-size: 11px; }
.process-steps small { margin-top: 1px; font-size: 9px; }
.process-steps .active { background: #f8faff; }
.process-steps .active > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.process-steps .active strong { color: var(--text); }

.method-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 20px; align-items: start; }
.method-grid > .panel { min-height: 312px; }
.recommended-badge { padding: 5px 8px; border-radius: 999px; color: #2862c8; background: var(--primary-soft); font-size: 9px; font-weight: 750; }
.scan-input-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); transition: border .15s ease, box-shadow .15s ease; }
.scan-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.11); }
.scan-input-wrap > svg { width: 19px; height: 19px; margin-left: 12px; color: var(--primary); }
.scan-input-wrap input { min-width: 0; border: 0; box-shadow: none; }
.scan-input-wrap input:focus { box-shadow: none; }
.scan-ready { display: flex; align-items: center; gap: 5px; margin-right: 12px; color: var(--success); font-size: 9px; font-weight: 720; }
.scan-ready i { width: 6px; height: 6px; border-radius: 50%; background: #22a26f; box-shadow: 0 0 0 3px rgba(34,162,111,.11); }
.inline-message { margin: 12px 0; padding: 10px 12px; border-radius: 8px; color: #2b5eb8; background: var(--primary-soft); font-size: 11px; font-weight: 600; }
.inline-message.success { color: #146e4e; background: var(--success-soft); }
.inline-message.warning { color: #83550d; background: var(--warning-soft); }
.inline-message.danger { color: #9a303b; background: var(--danger-soft); }

.segmented-control { margin: 0 0 15px; padding: 0; border: 0; }
.segmented-control legend { margin-bottom: 6px; font-size: 12px; }
.segmented-control > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: #f3f5f8; }
.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.segmented-control span { display: block; padding: 7px 6px; border-radius: 6px; color: var(--muted); text-align: center; font-size: 10px; font-weight: 650; }
.segmented-control input:checked + span { color: #275fc5; background: #fff; box-shadow: 0 1px 3px rgba(23,32,51,.1); }
.segmented-control input:focus-visible + span { outline: 3px solid rgba(47,111,237,.2); }

.result-list { display: grid; gap: 7px; margin-top: 12px; }
.result-item { display: grid; grid-template-columns: 24px minmax(0,1fr) auto auto; align-items: center; gap: 10px; margin: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfe; }
.result-item.not-found, .result-item.ambiguous { border-color: #efcbd0; background: #fffafa; }
.result-item.duplicate { border-color: #ead29b; background: #fffcf4; }
.result-item.pending { border-color: #b9cae7; border-style: dashed; background: #f7faff; }
.result-item.pending .result-copy { grid-column: 1 / -1; }
.result-item.not-found .result-copy, .result-item.ambiguous .result-copy, .result-item.duplicate .result-copy { grid-column: 1 / 4; }
.result-item.pending .result-check { color: var(--primary); }
.result-check { display: grid; place-items: center; color: var(--danger); font-size: 16px; font-weight: 800; }
.result-check input, .select-table input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--primary); }
.result-copy { min-width: 0; }
.result-copy strong, .result-copy small { display: block; }
.result-copy strong { font-size: 11px; }
.result-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.scan-code-hint { display: block; width: max-content; max-width: 100%; overflow: hidden; margin-top: 4px; padding: 3px 7px; border-radius: 6px; color: #38506f; background: #eaf0f8; font: 650 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.result-dismiss { grid-column: 4; width: 30px; min-height: 30px; padding: 0; border-color: transparent; border-radius: 7px; color: #8c98a9; background: transparent; font-size: 20px; font-weight: 450; line-height: 1; }
.result-dismiss:hover { color: var(--danger); border-color: #efcbd0; background: var(--danger-soft); }

.prepare-panel { position: sticky; z-index: 4; top: 12px; margin-top: 15px; padding: 16px; border: 1px solid #bdd0f3; border-radius: 9px; background: rgba(248,250,252,.97); box-shadow: 0 8px 22px rgba(23,42,74,.10); backdrop-filter: blur(8px); }
.selection-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; color: var(--text-soft); font-size: 11px; }
.selection-summary strong { color: var(--text); font-size: 15px; }
.results-panel { margin-top: 20px; }
.result-query { max-width: 260px; overflow: hidden; padding: 6px 9px; border-radius: 6px; color: var(--text-soft); background: #f1f3f6; font: 10px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.selection-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-bottom: 10px; padding: 9px 11px; border-radius: 8px; color: var(--text-soft); background: var(--surface-muted); font-size: 11px; }
.toolbar-separator { width: 1px; height: 15px; background: var(--border-strong); }
.selection-toolbar .danger-text { margin-left: auto; color: var(--danger); }
.result-action { width: 40px; text-align: right; }
.result-remove { width: 30px; min-height: 30px; padding: 0; border-color: transparent; border-radius: 7px; color: #8c98a9; background: transparent; font-size: 20px; font-weight: 450; line-height: 1; }
.result-remove:hover { color: var(--danger); border-color: #efcbd0; background: var(--danger-soft); }
.repeat-badge { display: inline-flex; width: max-content; margin-left: 6px; padding: 3px 7px; border-radius: 999px; color: #8b5807; background: var(--warning-soft); font-size: 8px; font-weight: 750; white-space: nowrap; }
.no-history { color: var(--muted); font-size: 10px; }
.continuation-notice { display: grid; gap: 3px; margin-bottom: 13px; padding: 11px 13px; border: 1px solid #bed4fa; border-radius: 9px; color: #285aab; background: #f4f8ff; }
.continuation-notice strong { font-size: 11px; }
.continuation-notice span { color: #57749e; font-size: 10px; }
.request-footer { position: sticky; z-index: 4; top: 12px; margin: 0 0 14px; padding: 16px 18px; border: 1px solid #bdd0f3; border-radius: 9px; background: rgba(248,250,252,.97); box-shadow: 0 8px 22px rgba(23,42,74,.10); backdrop-filter: blur(8px); }
.reason-field { max-width: 720px; }
.request-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; }
.request-actions p { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.request-actions p svg { width: 16px; height: 16px; color: var(--success); }

/* Request progress */
.request-title { align-items: center; }
.progress-panel { padding: 22px; }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.progress-steps li { display: flex; align-items: flex-start; position: relative; gap: 10px; color: var(--muted); }
.progress-steps li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 15px; left: 34px; right: 12px; height: 2px; background: var(--border); }
.progress-steps li > span { display: grid; z-index: 1; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); font-size: 10px; font-weight: 750; }
.progress-steps strong, .progress-steps small { display: block; }
.progress-steps strong { color: var(--text-soft); font-size: 11px; }
.progress-steps small { margin-top: 2px; font-size: 9px; }
.progress-steps .active > span { color: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.progress-steps .complete > span { color: #fff; border-color: var(--success); background: var(--success); }
.progress-steps .complete::after { background: #83cbb0; }
.progress-message { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 11px 13px; border-radius: 8px; color: #2d5baa; background: var(--primary-soft); font-size: 11px; font-weight: 650; }
.progress-message svg { width: 17px; height: 17px; }
.progress-message.danger { color: var(--danger); background: var(--danger-soft); }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(47,111,237,.22); border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ready-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; margin-bottom: 20px; padding: 20px 22px; border: 1px solid #bfe0d3; border-radius: var(--radius); background: linear-gradient(105deg, #f6fcf9, #fff); box-shadow: var(--shadow-sm); }
.ready-panel-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--success); background: var(--success-soft); }
.ready-panel-icon svg { width: 24px; height: 24px; }
.ready-panel h2 { font-size: 18px; }
.ready-panel p { color: var(--text-soft); font-size: 11px; }
.ready-panel-actions { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.ready-panel-actions .button { justify-content: center; }
.continuation-panel { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 17px; margin-bottom: 20px; padding: 18px 22px; border: 1px solid #bfd2f4; border-radius: var(--radius); background: linear-gradient(105deg,#f4f8ff,#fff); box-shadow: var(--shadow-sm); }
.continuation-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.continuation-icon svg { width: 23px; height: 23px; }
.continuation-panel h2 { margin: 2px 0 3px; font-size: 17px; }
.continuation-panel p { color: var(--text-soft); font-size: 10px; }
.continuation-panel .button { min-width: 190px; justify-content: center; }
.print-verification-panel { margin-bottom: 20px; border-color: #c8d9f5; background: linear-gradient(145deg, #fff, #f8fbff); }
.print-verification-panel.complete { border-color: #b8dfcf; background: linear-gradient(145deg, #fff, #f4fbf7); }
.print-verification-heading { align-items: center; }
.verification-count-badge { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 11px; border-radius: 999px; color: #315d9e; background: var(--primary-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.verification-count-badge strong { color: var(--primary); font-size: 16px; }
.print-verification-panel.complete .verification-count-badge { color: #146e4e; background: var(--success-soft); }
.print-verification-panel.complete .verification-count-badge strong { color: var(--success); }
.print-verification-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 15px 0; }
.print-verification-guide span { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-soft); background: #fff; font-size: 10px; }
.print-verification-guide b { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 10px; }
.verification-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.verification-progress progress { display: block; overflow: hidden; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #dce5f3; appearance: none; }
.verification-progress progress::-webkit-progress-bar { border-radius: inherit; background: #dce5f3; }
.verification-progress progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, #2f6fed, #6c9af4); transition: width .2s ease; }
.verification-progress progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, #2f6fed, #6c9af4); }
.verification-progress span { color: var(--text-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.print-scanner-station.complete { border-color: #b8dfcf; background: var(--success-soft); }
.print-scanner-station.complete .scanner-online { color: var(--success); }
.verification-state { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 750; white-space: nowrap; }
.verification-state.pending { color: #66758a; background: #edf1f6; }
.verification-state.verified { color: #146e4e; background: var(--success-soft); }
.print-verified-row { background: #f8fcfa; }
.download-filename { display: block; max-width: 680px; margin-top: 7px; overflow-wrap: anywhere; color: #315d9e; font-size: 9px; }
.chz-help { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; background: linear-gradient(105deg, #f6f9ff, #fff); }
.chz-help-icon { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.chz-help-icon svg { width: 23px; height: 23px; }
.chz-help h2 { margin-top: 2px; font-size: 17px; }
.chz-help p { margin-top: 5px; color: var(--text-soft); font-size: 11px; }
.code-export-panel { margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: 10px; font-weight: 700; }
.chz-codes { width: 100%; min-height: 120px; resize: vertical; white-space: pre; color: #10233f; background: #f8fafc; font: 600 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.copy-status { color: var(--success); font-size: 10px; font-weight: 650; }
.copy-status.error { color: var(--danger); }
.info-strip { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid #cfddf8; border-radius: 9px; color: #315d9e; background: #f6f9ff; }
.info-strip > svg { width: 19px; height: 19px; }
.info-strip strong, .info-strip span { display: block; }
.info-strip strong { font-size: 11px; }
.info-strip span { margin-top: 2px; color: #6680a7; font-size: 9px; }
.reason-note { display: flex; align-items: baseline; gap: 14px; margin-top: 15px; padding: 12px 14px; border-radius: 8px; background: var(--surface-muted); }
.reason-note span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.reason-note strong { font-size: 11px; }
.application-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; border-color: #bfe2d3; background: linear-gradient(135deg,#fbfffd,#f1faf6); }
.application-panel-copy { max-width: 760px; }
.application-panel h2 { margin: 3px 0 5px; font-size: 18px; }
.application-panel p { margin: 0; color: var(--text-soft); font-size: 10px; line-height: 1.55; }
.application-progress { display: inline-flex; margin-top: 10px; padding: 6px 9px; border-radius: 7px; color: #315c4c; background: #e3f5ed; font-size: 9px; }
.application-progress strong { margin-right: 3px; font-size: 11px; }
.application-panel form { flex: 0 0 auto; }
.manual-confirmation-form { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.manual-confirmation-form .checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; cursor: pointer; }
.activity-statuses { display: grid; justify-items: end; gap: 5px; }

.audit-details { padding: 0; }
.audit-details summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 680; }
.audit-details summary::-webkit-details-marker { display: none; }
.audit-details summary > span { display: flex; align-items: center; gap: 8px; }
.audit-details summary svg { width: 17px; height: 17px; color: var(--muted); }
.audit-details .summary-arrow { transition: transform .15s ease; }
.audit-details[open] .summary-arrow { transform: rotate(90deg); }
.timeline { margin: 0 19px 18px; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 2px 0 15px 18px; border-left: 1px solid #ccd5e2; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.timeline span, .timeline small { display: block; }
.timeline span { font-size: 10px; font-weight: 650; }
.timeline small { color: var(--muted); font-size: 9px; }

/* History and imports */
.history-row { grid-template-columns: auto minmax(140px,.75fr) minmax(200px,1.2fr) auto auto auto; }
.history-reason { min-width: 0; overflow: hidden; color: var(--text-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-reason small { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.upload-panel { padding: 24px; }
.upload-intro { display: flex; align-items: center; gap: 14px; margin-bottom: 19px; }
.upload-intro p { color: var(--text-soft); font-size: 11px; }
.upload-form { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; }
.file-drop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; position: relative; gap: 12px; min-height: 82px; padding: 13px 15px; border: 1px dashed #b9c6d8; border-radius: 9px; background: #fafcff; cursor: pointer; }
.file-drop:hover { border-color: var(--primary); background: #f6f9ff; }
.file-drop strong, .file-drop small { display: block; }
.file-drop strong { color: var(--text); font-size: 11px; }
.file-drop small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.drop-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); }
.drop-icon svg { width: 19px; height: 19px; }
.file-name { max-width: 210px; overflow: hidden; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-soft); background: #fff; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.file-drop input:focus-visible { opacity: 0; box-shadow: inset 0 0 0 3px rgba(47,111,237,.2); }
.file-drop:has(input:focus-visible) { outline: 3px solid rgba(47,111,237,.22); outline-offset: 2px; }
.technical-note { margin-top: 14px; color: var(--muted); font-size: 10px; }
.technical-note summary { cursor: pointer; font-weight: 650; }
.error-code { display: block; margin-top: 3px; color: var(--danger); font-size: 8px; }

/* Operational parties, live imports and the guided catalog */
.refined-methods .scanner-panel { border-color: #cfdcf4; box-shadow: 0 8px 28px rgba(35,74,139,.08); }
.scanner-station { padding: 17px; border: 1px solid #cdd9ec; border-radius: 12px; background: linear-gradient(145deg, #f8fbff, #f3f7fd); }
.scanner-station-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.scanner-station-head label { font-size: 11px; font-weight: 750; }
.scanner-online { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 9px; font-weight: 750; }
.scanner-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(22,132,91,.1); }
.scanner-control { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; min-height: 66px; border: 2px solid #aebfda; border-radius: 10px; background: #fff; box-shadow: inset 0 1px 1px rgba(23,32,51,.03); transition: border-color .15s ease, box-shadow .15s ease; }
.scanner-control:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.scanner-control-icon { display: grid; place-items: center; width: 58px; height: 100%; color: var(--primary); border-right: 1px solid var(--border); }
.scanner-control-icon svg { width: 27px; height: 27px; }
.scanner-control input { min-width: 0; min-height: 62px; border: 0; border-radius: 0 9px 9px 0; padding: 15px 18px; box-shadow: none; background: transparent; font-size: 15px; font-weight: 650; }
.scanner-control input:focus { box-shadow: none; }
.scanner-control input::placeholder { color: #75849a; }
.scanner-help { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.scanner-help span::before { content: "\2022"; margin-right: 6px; color: var(--primary); }

.catalog-form { display: grid; gap: 8px; }
.refined-methods { grid-template-columns: 1fr; }
.lookup-panel .catalog-form { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.catalog-step { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); transition: border-color .15s ease, background .15s ease; }
.catalog-step:focus-within { border-color: #bbcae5; background: #f7faff; }
.catalog-step-number { display: grid; place-items: center; width: 27px; height: 27px; margin-top: 22px; border-radius: 8px; color: #fff; background: #5d6d84; font-size: 10px; font-weight: 800; }
.catalog-step-number.optional { color: #58677c; background: #e4e9f0; }
.catalog-step .field { min-width: 0; margin: 0; }
.catalog-step select { min-width: 0; max-width: 100%; }
.catalog-step select:disabled { color: #8b96a6; background: #f1f3f6; cursor: not-allowed; }
.catalog-label-step { grid-column: 1 / -1; padding: 16px; }
.catalog-label-step .catalog-step-number { margin-top: 0; }
.label-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.label-picker > legend { margin-bottom: 10px; padding: 0; font-size: 12px; }
.label-picker:disabled { opacity: .58; }
.label-picker-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; margin-bottom: 11px; padding: 9px 11px; border-radius: 8px; color: var(--text-soft); background: #eef2f7; font-size: 10px; }
.label-picker-toolbar > span { margin-right: auto; }
.label-picker-toolbar strong { color: var(--text); font-size: 14px; }
.label-range { display: grid; grid-template-columns: 110px 110px auto; align-items: end; gap: 9px; margin-bottom: 12px; }
.label-range label { color: var(--muted); font-size: 9px; }
.label-range input { min-height: 36px; margin-top: 4px; padding: 7px 9px; }
.label-range button { min-height: 36px; justify-self: start; padding-block: 7px; font-size: 10px; }
.label-options { display: grid; grid-template-columns: repeat(6,minmax(110px,1fr)); gap: 7px; max-height: 300px; overflow-y: auto; padding: 2px 5px 2px 2px; scrollbar-gutter: stable; }
.label-choice { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.label-choice:hover { border-color: #b8c7dd; background: #f8faff; }
.label-choice.printed { border-color: #c6e6d3; background: #f0f9f3; }
.label-choice.printed:hover { border-color: #a9d8bc; background: #e7f5ec; }
.label-choice.applied { border-color: #97d2b0; background: #d9f1e3; }
.label-choice.applied:hover { border-color: #7cc49b; background: #cfeddc; }
.label-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 8px; color: var(--muted); font-size: 9px; font-weight: 600; }
.label-legend span { display: inline-flex; align-items: center; gap: 5px; }
.label-legend .swatch { width: 12px; height: 12px; border: 1px solid var(--border); border-radius: 3px; background: #fff; }
.label-legend .swatch.printed { border-color: #c6e6d3; background: #f0f9f3; }
.label-legend .swatch.applied { border-color: #97d2b0; background: #d9f1e3; }
.label-choice:has(input:checked) { border-color: #9eb9ed; background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(47,111,237,.08); }
.label-choice input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--primary); }
.label-choice strong, .label-choice small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-choice strong { color: var(--text); font-size: 10px; }
.label-choice small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.label-choice .label-accounting { margin-top: 4px; color: #6a7688; font-weight: 700; }
.label-choice .label-accounting.applied { color: var(--success); }
.application-badge { display: inline-flex; width: max-content; padding: 3px 7px; border-radius: 999px; color: #667386; background: #edf0f4; font-size: 8px; font-weight: 750; white-space: nowrap; }
.application-badge.applied { color: #146e4e; background: var(--success-soft); }
.scan-accounting { color: #53647b !important; font-weight: 700; }
.scan-accounting.applied { color: var(--success) !important; }
.label-picker-empty { margin: 0; padding: 18px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); text-align: center; font-size: 10px; }
.catalog-summary { margin: 3px 0; padding: 10px 12px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; color: var(--text-soft); background: var(--primary-soft); font-size: 10px; }
.lookup-panel .catalog-summary { grid-column: 1 / 3; margin: 0; }
.lookup-panel #catalog-search { grid-column: 3; min-height: 100%; }

.party-onboarding-grid { display: grid; grid-template-columns: minmax(300px,.72fr) minmax(460px,1.28fr); gap: 20px; align-items: stretch; }
.party-onboarding-grid > .panel { min-height: 100%; }
.create-party-panel { background: linear-gradient(145deg, #fff, #fbfcfe); }
.create-party-form { display: grid; gap: 1px; }
.live-upload-form { grid-template-columns: minmax(180px,.6fr) minmax(300px,1.4fr) auto; align-items: end; }
.party-upload-select { margin: 0; }
.compat-sku-field { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px solid #c9daf8; border-radius: 9px; background: #f7faff; }
.compat-sku-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.upload-target-note { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #c9daf8; border-radius: 9px; color: #244b91; background: var(--primary-soft); font-size: 10px; font-weight: 650; line-height: 1.45; }
.live-upload-form .file-drop { min-height: 66px; }
.upload-live { margin-top: 16px; padding: 14px; border: 1px solid #cedcf6; border-radius: 10px; background: #f7faff; }
.upload-live.success { color: #146e4e; border-color: #bfe2d3; background: var(--success-soft); }
.upload-live.danger { color: #952f3a; border-color: #f0c6ca; background: var(--danger-soft); }
.upload-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: 11px; }
.upload-live-head span { font-variant-numeric: tabular-nums; font-weight: 800; }
.upload-live p { margin: 8px 0 0; color: var(--text-soft); font-size: 10px; }
.progress-track, .mini-progress { display: block; overflow: hidden; width: 100%; height: 7px; border: 0; border-radius: 999px; background: #dce5f3; appearance: none; }
.progress-track::-webkit-progress-bar, .mini-progress::-webkit-progress-bar { border-radius: inherit; background: #dce5f3; }
.progress-track::-webkit-progress-value, .mini-progress::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, #2f6fed, #6c9af4); transition: width .25s ease; }
.progress-track::-moz-progress-bar, .mini-progress::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, #2f6fed, #6c9af4); }
.upload-live.success .progress-track::-webkit-progress-value { background: var(--success); }
.upload-live.success .progress-track::-moz-progress-bar { background: var(--success); }
.upload-live.danger .progress-track::-webkit-progress-value { background: var(--danger); }
.upload-live.danger .progress-track::-moz-progress-bar { background: var(--danger); }
.mini-progress { width: min(180px,100%); height: 4px; margin-top: 7px; }
.import-message, .table-sub { display: block; max-width: 280px; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.source-id { display: block; max-width: 210px; overflow: hidden; color: var(--text-soft); font: 9px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.compatibility-chip { display: inline-flex; width: max-content; margin-top: 5px; padding: 3px 6px; border-radius: 5px; color: #7156b6; background: var(--violet-soft); font-size: 8px; font-weight: 700; }
.retry-form { display: grid; min-width: 190px; gap: 6px; }
.retry-form select, .retry-form button { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.success-note, .muted-note { display: block; font-size: 9px; font-weight: 650; }
.success-note { color: var(--success); }
.archive-row-actions { display: grid; justify-items: start; gap: 7px; min-width: 126px; }
.archive-row-actions .danger-outline { min-height: 30px; padding: 6px 9px; font-size: 9px; white-space: nowrap; }
.pdf-purge-dialog { width: min(620px,calc(100% - 28px)); }
.pdf-purge-source, .pdf-purge-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--slate-soft); }
.pdf-purge-source span, .pdf-purge-total span { color: var(--muted); font-size: 9px; }
.pdf-purge-source strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pdf-purge-total { margin: 10px 0 14px; color: var(--danger); background: var(--danger-soft); }
.pdf-purge-total strong { font-size: 13px; }
.pdf-purge-list { display: grid; gap: 7px; max-height: 300px; margin-top: 10px; overflow-y: auto; }
.pdf-purge-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.pdf-purge-option:has(input:checked) { border-color: #ef9aa4; background: var(--danger-soft); }
.pdf-purge-option input { width: 16px; height: 16px; accent-color: var(--danger); }
.pdf-purge-option strong, .pdf-purge-option small { display: block; }
.pdf-purge-option strong { font-size: 10px; }
.pdf-purge-option small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.pdf-purge-option b { min-width: 28px; color: var(--danger); font-size: 12px; text-align: right; }
.muted-note { color: var(--muted); }

.party-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.party-card { padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(150deg,#fff,#fbfcfe); }
.party-card[data-status="DELETING"] { opacity: .72; }
.party-card-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.party-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.party-symbol svg { width: 19px; height: 19px; }
.party-card-head strong, .party-card-head small { display: block; }
.party-card-head strong { font-size: 12px; }
.party-card-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.party-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 14px 0; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.party-stats > div { padding: 0 10px; border-left: 1px solid var(--border); }
.party-stats > div:first-child { padding-left: 0; border-left: 0; }
.party-stats dt { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.party-stats dd { margin: 2px 0 0; font-size: 17px; font-weight: 750; }
.party-kind-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 4px 0 13px; padding: 0; border: 0; }
.party-kind-picker legend { grid-column: 1 / -1; margin-bottom: 2px; color: var(--text-soft); font-size: 10px; font-weight: 700; }
.party-kind-picker label { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; }
.party-kind-picker label:has(input:checked) { border-color: #9eb9ed; background: var(--primary-soft); }
.party-kind-picker label.disabled-choice { cursor: default; background: #f6f7f9; }
.party-kind-picker label.disabled-choice a { color: var(--primary); font-weight: 700; }
.party-kind-picker input { width: 15px; height: 15px; min-height: 0; margin: 1px 0 0; accent-color: var(--primary); }
.party-kind-picker strong, .party-kind-picker small { display: block; }
.party-kind-picker strong { font-size: 10px; }
.party-kind-picker small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.party-import-dates { display: grid; gap: 3px; margin-bottom: 10px; padding: 9px 10px; border-radius: 8px; background: var(--slate-soft); }
.party-import-dates span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.party-import-dates strong { color: var(--text-soft); font-size: 10px; }
.party-kind-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 7px; margin-top: 11px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); }
.party-kind-form label { grid-column: 1 / -1; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.party-kind-form select, .party-kind-form button { min-height: 34px; padding: 6px 8px; font-size: 9px; }
.party-kind-save-status { grid-column: 1 / -1; font-size: 9px; line-height: 1.4; }
.party-kind-save-status.success { color: var(--success); }
.party-kind-save-status.danger { color: var(--danger); }
.party-kind-badge { display: inline-flex; margin-top: 10px; padding: 4px 8px; border-radius: 999px; color: #315d9d; background: var(--primary-soft); font-size: 8px; font-weight: 750; }
.party-products span, .party-products strong { display: block; }
.party-products span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.party-products strong { margin-top: 3px; color: var(--text-soft); font-size: 10px; }
.party-sku-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.party-sku-list li { display: grid; gap: 2px; }
.party-sku-list small { color: var(--muted); font-size: 9px; }
.party-sku-rename summary { color: var(--primary); font-size: 9px; cursor: pointer; }
.party-sku-rename form { display: grid; gap: 5px; margin-top: 6px; }
.party-sku-rename label { font-size: 9px; font-weight: 700; }
.field-warning { color: #9a5b00; font-weight: 600; }
.party-card-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.party-card-actions .party-add-archive { grid-column: 1 / -1; width: 100%; }
.party-card-actions .button, .party-card-actions button { width: 100%; }
.danger-outline, .danger-button { color: var(--danger); border-color: #e9b8bd; background: #fff; }
.danger-outline:hover { border-color: var(--danger); background: var(--danger-soft); }
.danger-button { color: #fff; border-color: var(--danger); background: var(--danger); }
.danger-button:hover { background: #a93440; }
.status.deleting { color: #8a5a0b; background: var(--warning-soft); }
.status.delete_failed, .status.purged { color: var(--danger); background: var(--danger-soft); }

.confirm-dialog { width: min(510px,calc(100% - 28px)); padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 24px 80px rgba(14,28,51,.25); }
.confirm-dialog::backdrop { background: rgba(16,27,45,.56); backdrop-filter: blur(2px); }
.confirm-dialog form { padding: 27px; }
.confirm-dialog h2 { margin: 12px 0 7px; font-size: 21px; }
.confirm-dialog > form > p { color: var(--text-soft); font-size: 11px; }
.dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; }
.dialog-icon svg { width: 24px; height: 24px; }
.dialog-icon.danger { color: var(--danger); background: var(--danger-soft); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.print-history-list { display: grid; gap: 8px; }
.print-history-card { display: grid; grid-template-columns: auto minmax(150px,.8fr) repeat(3,minmax(120px,.65fr)) minmax(150px,1fr) auto auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #fff; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.print-history-card:hover { border-color: #c4d2e7; box-shadow: 0 6px 17px rgba(23,42,74,.07); transform: translateY(-1px); }
.print-history-summary strong, .print-history-summary small, .history-fact small, .history-fact strong { display: block; }
.print-history-summary strong { font-size: 11px; }
.print-history-summary small, .history-fact small { color: var(--muted); font-size: 8px; }
.history-fact { min-width: 0; }
.history-fact strong { overflow: hidden; margin-top: 2px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-fact .history-locations { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; }
.history-source { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.history-state { display: grid; justify-items: end; gap: 4px; }
.history-reason-full strong { color: var(--text-soft); }

/* Empty states */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 38px 20px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 11px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.empty-icon svg { width: 23px; height: 23px; }
.empty-state strong { color: var(--text); font-size: 13px; }
.empty-state p { font-size: 11px; }
.empty-state .button { margin-top: 12px; }

/* Authentication */
.auth-body { background: #eef2f7; }
.auth-shell { min-height: 100vh; }
.auth-layout { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(460px, .9fr); min-height: 100vh; }
.auth-showcase {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 44px clamp(40px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(79,133,236,.32), transparent 30%),
    radial-gradient(circle at 10% 92%, rgba(54,105,205,.22), transparent 35%),
    linear-gradient(145deg, #172a4a 0%, #10203a 100%);
}
.auth-showcase::after { content: ""; position: absolute; right: -90px; bottom: -130px; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.auth-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #fff; background: var(--primary); }
.auth-brand-mark svg { width: 23px; height: 23px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 15px; }
.auth-brand small { color: #aebcd0; font-size: 10px; }
.auth-message { position: relative; z-index: 1; max-width: 620px; margin: auto 0; padding: 70px 0; }
.product-tag { display: inline-block; padding: 5px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #bdcbe0; background: rgba(255,255,255,.05); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-message h1 { max-width: 560px; margin: 18px 0 13px; font-size: clamp(34px, 4vw, 50px); line-height: 1.12; }
.auth-message > p { max-width: 590px; color: #b7c3d6; font-size: 15px; line-height: 1.65; }
.auth-benefits { display: grid; gap: 17px; max-width: 560px; margin: 34px 0 0; padding: 0; list-style: none; }
.auth-benefits li { display: flex; align-items: flex-start; gap: 11px; }
.auth-benefits li > span { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #9fc0ff; background: rgba(255,255,255,.05); font-size: 10px; font-weight: 750; }
.auth-benefits strong, .auth-benefits small { display: block; }
.auth-benefits strong { font-size: 12px; }
.auth-benefits small { margin-top: 2px; color: #9eabc0; font-size: 10px; }
.auth-footnote { position: relative; z-index: 1; color: #7f91ab; font-size: 9px; }

.auth-form-pane { display: grid; place-items: center; padding: 40px; background: #f5f7fa; }
.auth-card { width: min(400px, 100%); padding: 34px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 55px rgba(23,42,74,.11); }
.auth-card-head { margin-bottom: 25px; }
.auth-kicker { color: var(--primary); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.auth-card h2 { margin: 6px 0; font-size: 25px; }
.auth-card-head p { color: var(--muted); font-size: 11px; }
.auth-card .primary { margin-top: 5px; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 17px; color: var(--muted); font-size: 9px; }
.auth-security span { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.auth-address { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.auth-address strong { color: var(--ink-soft); font-weight: 600; }

/* Responsive */
@media (max-width: 1080px) {
  .dashboard-grid, .method-grid { grid-template-columns: 1fr; }
  .method-grid > .panel { min-height: auto; }
  .overview-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .overview-list > div { display: block; padding: 12px; border: 1px solid var(--border); border-radius: 9px; }
  .overview-list dd { margin-top: 10px; }
  .history-row { grid-template-columns: auto minmax(140px, .8fr) minmax(160px,1fr) auto auto; }
  .history-row .repeat-badge { display: none; }
  .party-onboarding-grid { grid-template-columns: 1fr; }
  .live-upload-form { grid-template-columns: minmax(180px,.55fr) minmax(280px,1.45fr) auto; }
  .print-history-card { grid-template-columns: auto minmax(150px,1fr) repeat(2,minmax(110px,.65fr)) auto auto; }
  .print-history-card .history-reason-full { display: none; }
  .print-history-card .history-fact:nth-of-type(4) { display: none; }
}

@media (max-width: 900px) {
  .app-frame { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr auto; position: static; height: auto; padding: 10px 16px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-mark svg { width: 19px; height: 19px; }
  .side-nav { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 5px; margin: 8px -4px 0; overflow-x: auto; }
  .side-nav-group { display: contents; }
  .nav-caption { display: none; }
  .side-nav-links { display: flex; gap: 3px; }
  .side-nav a { min-height: 40px; padding: 8px 10px; white-space: nowrap; }
  .side-nav a svg { width: 17px; height: 17px; }
  .sidebar-bottom { grid-column: 2; grid-row: 1; margin: 0; }
  .system-badge { display: none; }
  .user-panel { padding: 0; border: 0; }
  .user-copy { display: none; }
  .workspace-bar { display: none; }
  .shell { width: min(100% - 30px, 1180px); padding-top: 26px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-showcase { min-height: 390px; padding: 30px; }
  .auth-message { padding: 50px 0 35px; }
  .auth-benefits { display: none; }
  .auth-footnote { display: none; }
  .auth-form-pane { padding: 32px 20px 50px; }
  .side-nav a { gap: 4px; padding: 8px 7px; font-size: 11px; }
  .side-nav a svg { display: none; }
  .live-upload-form { grid-template-columns: 1fr; align-items: stretch; }
  .live-upload-form .primary { width: 100%; }
  .party-card-grid { grid-template-columns: 1fr; }
  .print-history-card { grid-template-columns: auto minmax(150px,1fr) minmax(120px,.7fr) auto auto; }
  .print-history-card .history-fact:nth-of-type(2) { display: none; }
  .lookup-panel .catalog-form { grid-template-columns: 1fr; }
  .catalog-label-step, .lookup-panel .catalog-summary, .lookup-panel #catalog-search { grid-column: 1; }
  .label-options { grid-template-columns: repeat(4,minmax(100px,1fr)); }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1180px); padding: 21px 0 40px; }
  .brand-copy small { display: none; }
  .avatar { display: none; }
  .page-title { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .page-title .button { width: 100%; }
  h1 { font-size: 26px; }
  .panel { padding: 17px; border-radius: 10px; }
  .primary-work-card { grid-template-columns: 1fr; min-height: 0; padding: 21px; }
  .work-card-copy h2 { font-size: 20px; }
  .inline-steps { flex-direction: column; gap: 8px; margin: 17px 0; }
  .overview-list { grid-template-columns: 1fr; }
  .process-steps li { padding: 10px 8px; gap: 6px; }
  .process-steps li > span { width: 24px; height: 24px; flex-basis: 24px; }
  .process-steps small { display: none; }
  .process-steps strong { font-size: 9px; }
  .heading-with-icon { align-items: flex-start; }
  .recommended-badge { display: none; }
  .segmented-control > div { grid-template-columns: 1fr; }
  .request-actions { align-items: stretch; flex-direction: column; }
  .request-actions .primary { width: 100%; }
  .progress-steps { grid-template-columns: 1fr; gap: 13px; }
  .progress-steps li:not(:last-child)::after { top: 29px; bottom: -14px; left: 14px; right: auto; width: 2px; height: auto; }
  .ready-panel { grid-template-columns: auto 1fr; }
  .ready-panel-actions { grid-column: 1 / -1; width: 100%; }
  .ready-panel .button { grid-column: 1 / -1; width: 100%; }
  .code-export-actions .button { width: 100%; }
  .print-verification-guide { grid-template-columns: 1fr; }
  .verification-progress { grid-template-columns: 1fr; }
  .reason-note { align-items: flex-start; flex-direction: column; gap: 3px; }
  .activity-row { grid-template-columns: auto 1fr auto; }
  .activity-row .status { grid-column: 2; grid-row: 2; }
  .activity-row .row-arrow { grid-column: 3; grid-row: 1 / 3; }
  .history-row { grid-template-columns: auto 1fr auto; }
  .history-reason, .history-row > span:empty { display: none; }
  .history-row .status { grid-column: 2; grid-row: 2; }
  .history-row .row-arrow { grid-column: 3; grid-row: 1 / 3; }
  .upload-form { grid-template-columns: 1fr; }
  .upload-form .primary { width: 100%; }
  .file-drop { grid-template-columns: auto 1fr; }
  .file-name { grid-column: 2; max-width: 100%; }
  .auth-showcase { min-height: 330px; padding: 24px; }
  .auth-message { padding: 40px 0 15px; }
  .auth-message h1 { font-size: 32px; }
  .auth-message > p { font-size: 13px; }
  .auth-form-pane { padding: 24px 14px 40px; }
  .auth-card { padding: 24px; }
  .prepare-panel, .request-footer { top: 6px; }
  .scanner-station { padding: 12px; }
  .scanner-control { min-height: 58px; }
  .scanner-control-icon { width: 47px; }
  .scanner-control input { min-height: 54px; padding: 12px; font-size: 13px; }
  .scanner-help { display: grid; gap: 3px; }
  .catalog-step { padding: 9px; }
  .label-range { grid-template-columns: 1fr 1fr; }
  .label-range button { grid-column: 1 / -1; width: 100%; }
  .label-options { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 360px; }
  .party-card-head { grid-template-columns: auto minmax(0,1fr); }
  .party-card-head .status { grid-column: 2; }
  .party-kind-picker { grid-template-columns: 1fr; }
  .party-kind-form { grid-template-columns: 1fr; }
  .party-kind-form label { grid-column: auto; }
  .application-panel { align-items: stretch; flex-direction: column; }
  .application-panel form, .application-panel button { width: 100%; }
  .party-card-actions { grid-template-columns: 1fr; }
  .party-card-actions .party-add-archive { grid-column: auto; }
  .parties-panel { padding: 15px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .print-history-card { grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; }
  .print-history-card .history-fact { grid-column: 2; }
  .print-history-card .history-fact:nth-of-type(3), .print-history-card .history-reason-full { display: none; }
  .print-history-card .history-state { grid-column: 2; justify-items: start; }
  .print-history-card .row-arrow { grid-column: 3; grid-row: 1 / 4; }
  .imports-table { min-width: 850px; }
}

/* Warehouse packing boxes */
.packing-scope-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto; gap: 12px; align-items: end; }
.packing-stats small { display: block; color: var(--muted); font-size: 9px; }
.packing-summary progress { width: 100%; margin-top: 12px; }
.packing-action { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.packing-action p { margin: 4px 0 0; color: var(--text-soft); font-size: 11px; max-width: 640px; }
.packing-new-form { display: grid; gap: 8px; min-width: 260px; }
.packing-new-form .checkbox-line { display: flex; gap: 8px; align-items: center; font-size: 11px; }
.packing-box-banner a { font-weight: 600; }

/* Print page and one-click continuation */
.print-body { display: flex; flex-direction: column; height: 100vh; margin: 0; background: var(--bg, #f4f6fa); }
.print-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.print-bar strong { display: block; font-size: 14px; }
.print-bar span { color: var(--text-soft); font-size: 11px; }
.print-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.print-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.continuation-actions { display: grid; justify-items: end; gap: 6px; }
.continuation-review-link { color: var(--text-soft); font-size: 10px; }

