:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #241f35;
  background: #f6f5f9;
  color-scheme: light;
  --muted: #625e70;
  --border: #e1dde8;
  --strong: #49276e;
  --tint: #f1ebf8;
  --green: #23654e;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
.topbar { background: #242037; color: #f8f4ff; }
.top-inner, .shell { max-width: 1120px; margin: 0 auto; padding-inline: 28px; }
.top-inner { height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .connection { display: flex; align-items: center; gap: 11px; }
.brand { font-size: .94rem; color: #e0d7ee; white-space: nowrap; }
.brand strong { font-size: 1.08rem; color: white; letter-spacing: .01em; }
.brand-divider { height: 18px; width: 1px; background: #766783; }
.brand-icon { display: grid; grid-template-columns: repeat(2, 6px); gap: 3px; padding: 8px; border: 1px solid #8d7ba4; border-radius: 8px; }
.brand-icon i { width: 6px; height: 6px; border-radius: 1px; background: #d4b9f2; }
.connection { color: #eee8f5; font-size: .82rem; white-space: nowrap; }
.connection i { width: 8px; height: 8px; border-radius: 100%; background: #7ed5af; }
.hero {
  margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, .48fr); gap: 28px;
  align-items: end; background: linear-gradient(110deg, #342345, #492d64); border-radius: 16px;
  padding: 28px 31px; color: white;
}
.session-label { color: #e2cdec; font-weight: 650; font-size: .87rem; }
h1 { font-size: clamp(1.85rem, 4vw, 2.82rem); letter-spacing: -.04em; line-height: 1.08; margin-block: 8px 9px; }
.hero p { color: #e9deef; font-size: .94rem; overflow-wrap: anywhere; }
.progress-summary { display: grid; gap: 8px; min-width: 0; color: #eee2f4; font-size: .84rem; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.progress-top strong { color: white; font-size: 1.35rem; }
progress { width: 100%; height: 8px; display: block; appearance: none; border-radius: 100px; background: #68527b; }
progress::-webkit-progress-bar { background: #68527b; border-radius: 100px; }
progress::-webkit-progress-value { background: #cfaef2; border-radius: 100px; }
progress::-moz-progress-bar { background: #cfaef2; border-radius: 100px; }
.tabs { display: flex; gap: 19px; border-bottom: 1px solid var(--border); margin: 15px 0 19px; }
.tabs button { min-height: 45px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); border-radius: 0; }
.tabs button[aria-current] { color: var(--strong); border-color: #7543a4; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.workspace-side { display: grid; gap: 15px; }
.card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 23px; min-width: 0; }
.side-card { padding: 19px; }
.card-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.card-heading p, .section-header p, .data-options p { color: var(--muted); font-size: .91rem; margin-top: 4px; }
.scan-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--tint); }
.scan-mark::after { content: ""; width: 19px; height: 16px; background: repeating-linear-gradient(90deg, #5b3680 0 2px, transparent 2px 4px, #5b3680 4px 5px, transparent 5px 7px); }
.field { display: grid; gap: 6px; margin: 0; min-width: 0; }
.work-card > .field + .field { margin-top: 16px; }
.field label { font-weight: 640; font-size: .89rem; }
input, select, button { font: inherit; }
input[type=text], input[type=search], input[type=email], input[type=password], select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #cfc8db; border-radius: 8px; background: white; color: inherit; font-size: 1rem; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #615675 50%), linear-gradient(135deg, #615675 50%, transparent 50%); background-position: right 17px top 19px, right 12px top 19px; background-size: 5px 5px; background-repeat: no-repeat; }
:is(button, input, select, label.file-button):focus-visible, .file-button:has(+ input:focus-visible) { outline: 3px solid #9467b6; outline-offset: 2px; }
button, .file-button { cursor: pointer; border-radius: 8px; border: 1px solid transparent; padding: 9px 13px; min-height: 43px; font-weight: 650; font-size: .9rem; line-height: 1.25; }
button:disabled { opacity: .5; cursor: default; }
.primary { background: #522d77; color: #fff; }
.primary:hover:not(:disabled) { background: #432160; }
.secondary { background: white; color: #42285b; border-color: #d8cce5; }
.secondary:hover:not(:disabled), .file-button:hover { background: var(--tint); }
.scan-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
small { color: var(--muted); font-size: .82rem; }
.manual { border-top: 1px solid var(--border); padding-top: 15px; margin-top: 19px; }
.matches { display: grid; max-height: 315px; overflow: auto; }
.matches:empty { display: none; }
.match { display: grid; gap: 3px; background: white; color: inherit; border-radius: 0; border: 0; border-bottom: 1px solid var(--border); text-align: left; padding: 9px 2px; font-weight: 650; overflow-wrap: anywhere; }
.match:hover, .match[aria-pressed=true] { background: var(--tint); }
.match small { font-weight: 450; }
.quantity-panel { background: #f7f3fb; border: 1px solid #e6dbee; border-radius: 10px; display: grid; gap: 12px; padding: 13px; margin-top: 16px; }
.quantity-panel p { color: var(--muted); font-size: .86rem; }
.quantity-entry { display: flex; gap: 9px; align-items: center; }
.quantity-entry input { max-width: 150px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; overflow-wrap: anywhere; }
.check input { width: 19px; height: 19px; flex: none; }
.buttons, .side-heading, .section-header { display: flex; gap: 8px; align-items: center; }
.buttons { flex-wrap: wrap; }
.side-heading, .section-header { justify-content: space-between; }
.section-header { margin-bottom: 17px; }
.side-heading h2 { flex: 1; }
.zone-totals { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zone-totals div { display: grid; gap: 3px; padding-inline: 10px; border-left: 1px solid var(--border); }
.zone-totals div:first-child { border: 0; padding-left: 0; }
.zone-totals strong { font-size: 1.5rem; line-height: 1.08; letter-spacing: -.035em; }
.zone-totals span { font-size: .8rem; color: var(--muted); }
.text-button { background: transparent; color: var(--strong); padding: 0; min-height: 30px; text-align: right; }
.text-button:hover { text-decoration: underline; }
.recent-list { list-style: none; padding: 0; margin: 9px 0 0; }
.recent-list li { display: flex; justify-content: space-between; gap: 8px; padding-block: 9px; border-top: 1px solid var(--border); font-size: .89rem; overflow-wrap: anywhere; }
.recent-list li:first-child { border-top: 0; }
.recent-list li > div { display: grid; gap: 4px; }
.recent-list li > span { white-space: nowrap; }
.save-state { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: .85rem; }
.save-state > span:first-child { font-weight: 750; }
.review-filters { display: grid; grid-template-columns: 1fr .75fr 1fr; gap: 11px; margin-bottom: 15px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th { background: #f4eff8; }
th, td { padding: 10px; border-bottom: 1px solid var(--border); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 11px; font-size: .85rem; color: var(--muted); }
.issue-heading { margin-top: 20px; }
.data-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.data-options section { border: 1px solid var(--border); border-radius: 10px; padding: 13px; }
.data-options .field, .data-options .file-button, .data-options .buttons { margin-top: 9px; }
.file-button { display: inline-flex; align-items: center; justify-content: center; background: white; color: #42285b; border-color: #d8cce5; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.data-options .buttons .file-button { margin: 0; }
.feedback { border-radius: 8px; background: #eaf5ee; color: #244d39; padding: 8px 10px; margin: 10px 0; font-size: .9rem; overflow-wrap: anywhere; }
.feedback.error { background: #fff0e7; color: #782d1a; }
.camera-box { display: grid; gap: 6px; justify-items: start; margin-top: 10px; }
.camera-box video { width: 100%; max-height: 275px; background: #242037; border-radius: 8px; }
.empty { color: var(--muted); padding-block: 6px; font-size: .88rem; }
.footer { color: var(--muted); padding-block: 17px; font-size: .83rem; }
.tabs { flex-wrap: wrap; }
.login-card { max-width: 460px; margin: 55px auto 20px; }
.login-card h1 { font-size: 2rem; }
.login-card p { color: var(--muted); }
#login-form { display: grid; gap: 14px; margin-top: 20px; }
#login-form button { justify-self: start; }
#publish-demo, #publish-options { margin-top: 10px; }
@media (max-width: 760px) {
  .top-inner, .shell { padding-inline: 14px; }
  .hero { gap: 16px; padding: 19px; margin-top: 15px; grid-template-columns: 1fr; }
  .workspace, .data-options { grid-template-columns: 1fr; }
  .workspace { gap: 12px; }
  .card { padding: 15px; }
  .review-filters { grid-template-columns: 1fr 1fr; }
  .review-filters > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .top-inner { height: 54px; }
  .brand { gap: 7px; }
  .brand-icon { display: none; }
  .scan-actions { grid-template-columns: 1fr 1fr; }
  .scan-actions input { grid-column: 1 / -1; }
  .section-header { align-items: start; flex-direction: column; }
  .tabs { gap: 6px; }
}
