:root {
  --ink: #17243d;
  --muted: #66738b;
  --line: #dfe5ef;
  --paper: #ffffff;
  --canvas: #f4f6fa;
  --accent: #e8b620;
  --accent-dark: #b98200;
  --green: #16765d;
  --red: #b53f4e;
  --blue: #315dd6;
  --shadow: 0 18px 48px rgba(30, 48, 82, .09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(232,182,32,.10), transparent 29rem),
    var(--canvas);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto 80px; }
.topbar { height: 94px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.launch-warning { margin-top: 18px; padding: 11px 14px; color: #865d00; border: 1px solid rgba(185,130,0,.24); border-radius: 11px; background: rgba(232,182,32,.12); font-size: 13px; line-height: 1.4; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); font-weight: 900; letter-spacing: -.05em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.2; }
h2 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.035em; line-height: 1.05; }
h3 { font-size: 18px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mode-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--green); background: rgba(22,118,93,.08); border: 1px solid rgba(22,118,93,.16); border-radius: 999px; font-size: 13px; font-weight: 700; }
.mode-pill span { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(22,118,93,.10); }
.portal-controls { display: flex; align-items: center; gap: 9px; }
.tenant-control { display: grid; gap: 2px; color: var(--muted); font-size: 9px; font-weight: 800; }
.tenant-control select { min-width: 150px; height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 28px 0 10px; color: var(--ink); background: white; font-size: 11px; font-weight: 750; }
.portal-user { display: grid; gap: 2px; max-width: 150px; }
.portal-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.portal-user span { color: var(--muted); font-size: 9px; }
.logout-button { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted); background: white; cursor: pointer; font-size: 10px; font-weight: 800; }
.intro { padding: 52px 4px 28px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.intro h2 { margin-top: 8px; }
.intro p:not(.eyebrow) { margin-top: 12px; max-width: 720px; color: var(--muted); line-height: 1.55; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 750; cursor: pointer; padding: 10px 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(540px, .92fr) minmax(380px, .68fr); gap: 24px; align-items: start; }
.card, .results { background: var(--paper); border: 1px solid rgba(216,223,235,.9); border-radius: 20px; box-shadow: var(--shadow); }
.form-card { padding: 28px; }
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 14px; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.step-number { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: #f1f3f8; color: var(--muted); font-size: 11px; font-weight: 850; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.field input, .field select { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fbfcfe; outline: 0; transition: .18s ease; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 4px rgba(232,182,32,.13); background: white; }
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.application-field { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; transition: .18s ease; }
.application-field:focus-within { border-color: var(--accent-dark); box-shadow: 0 0 0 4px rgba(232,182,32,.13); background: white; }
textarea { display: block; resize: vertical; width: 100%; min-height: 210px; border: 0; outline: 0; padding: 18px; color: var(--ink); background: transparent; line-height: 1.55; }
textarea::placeholder { color: #9ca6b8; }
.textarea-footer { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px 8px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.upload-controls { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; max-width: 72%; }
.upload-button { min-width: 0; padding: 7px 10px; overflow: hidden; border-radius: 8px; background: #f0f3f8; cursor: pointer; transition: .15s ease; }
.upload-button:hover { color: var(--ink); background: #e8ecf3; }
.upload-button.has-file { color: var(--green); background: rgba(22,118,93,.09); }
.upload-button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-button input { display: none; }
.clear-file { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border: 0; border-radius: 8px; color: var(--red); background: rgba(181,63,78,.08); cursor: pointer; font-size: 18px; line-height: 1; }
.customer-warning { margin: 5px 0 3px; color: #865d00; font-size: 11px; line-height: 1.35; }
.customer-refinement { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 7px; align-items: end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.customer-refinement label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 750; }
.customer-refinement input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; color: var(--ink); background: white; outline: 0; font-size: 11px; }
.customer-refinement button { min-height: 34px; border: 1px solid rgba(49,93,214,.22); border-radius: 8px; color: var(--blue); background: rgba(49,93,214,.07); cursor: pointer; font-size: 10px; font-weight: 800; }
.primary-button, .secondary-button { width: 100%; min-height: 52px; margin-top: 18px; border: 0; border-radius: 13px; font-weight: 850; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--accent); box-shadow: 0 10px 24px rgba(185,130,0,.18); }
.primary-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(185,130,0,.24); }
.primary-button:disabled { opacity: .6; cursor: wait; transform: none; }
.secondary-button { color: #7c8799; background: #edf0f5; cursor: not-allowed; }
.secondary-button.action-button { color: var(--ink); background: #edf0f5; cursor: pointer; }
.secondary-button.action-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(30,48,82,.10); }
.message { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.message.error { display: block; color: var(--red); background: rgba(181,63,78,.08); border: 1px solid rgba(181,63,78,.14); }
.message.warning { display: block; color: #865d00; background: rgba(232,182,32,.12); border: 1px solid rgba(185,130,0,.2); }
.message.success { display: block; color: var(--green); background: rgba(22,118,93,.08); border: 1px solid rgba(22,118,93,.16); }
.normalization-warning { margin: -5px 0 10px; color: #865d00; font-size: 11px; line-height: 1.4; }
.item-clarification { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 2px 0 12px; padding: 10px; border: 1px solid rgba(185,130,0,.22); border-radius: 9px; background: rgba(232,182,32,.07); }
.item-clarification p { grid-column: 1 / -1; color: #865d00; font-size: 10px; }
.item-clarification label, .delivery-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 750; }
.item-clarification input, .item-clarification select, .delivery-fields input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; color: var(--ink); background: white; outline: 0; font-size: 11px; }
.product-refinement { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: end; margin: 4px 0 12px; padding: 10px; border: 1px solid rgba(49,93,214,.16); border-radius: 9px; background: rgba(49,93,214,.045); }
.product-refinement p { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.product-refinement label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 750; }
.product-refinement input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; color: var(--ink); background: white; outline: 0; font-size: 11px; }
.product-refinement button { min-height: 34px; border: 1px solid rgba(49,93,214,.22); border-radius: 8px; padding: 0 11px; color: var(--blue); background: rgba(49,93,214,.07); cursor: pointer; font-size: 10px; font-weight: 800; white-space: nowrap; }
.product-refinement button:disabled { opacity: .55; cursor: wait; }
.result-card { min-height: 582px; padding: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.result-card > p { max-width: 410px; margin-top: 10px; color: var(--muted); line-height: 1.55; }
.empty-illustration { position: relative; width: 130px; height: 126px; margin-bottom: 24px; }
.sheet { position: absolute; width: 78px; height: 100px; border: 1px solid #cfd7e5; border-radius: 10px; background: white; box-shadow: 0 13px 26px rgba(48,65,98,.12); }
.sheet-back { left: 19px; top: 8px; transform: rotate(-9deg); background: #f8fafc; }
.sheet-front { left: 31px; top: 2px; padding: 24px 14px; }
.sheet-front span { display: block; height: 5px; margin-bottom: 9px; border-radius: 9px; background: #dfe5ef; }
.sheet-front span:first-child { width: 70%; background: var(--accent); }
.search-dot { position: absolute; right: 5px; bottom: 6px; width: 46px; height: 46px; border: 8px solid var(--ink); border-radius: 50%; background: var(--accent); }
.search-dot::after { content: ""; position: absolute; width: 25px; height: 8px; right: -20px; bottom: -10px; border-radius: 8px; background: var(--ink); transform: rotate(45deg); }
.feature-list { list-style: none; display: grid; gap: 9px; margin: 24px 0 0; padding: 0; color: var(--muted); font-size: 13px; text-align: left; }
.feature-list span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; color: var(--green); background: rgba(22,118,93,.1); font-size: 11px; font-weight: 900; }
.results { padding: 28px; font-size: 13px; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.result-toolbar h2 { margin-top: 6px; font-size: 24px; }
.read-only-badge { padding: 7px 10px; border-radius: 8px; color: var(--muted); background: #f0f3f8; font-size: 11px; font-weight: 800; }
.customer-card, .delivery-card, .item-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.customer-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; background: #fafbfe; }
.customer-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(49,93,214,.1); color: var(--blue); font-weight: 900; }
.customer-card p, .delivery-card p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.customer-card-list { align-items: flex-start; }
.customer-choices { flex: 1; min-width: 0; }
.customer-choices h3 { margin-bottom: 8px; }
.customer-choice { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.customer-choice input { margin-top: 3px; accent-color: var(--accent-dark); }
.customer-choice span { display: grid; gap: 3px; min-width: 0; }
.customer-choice strong { font-size: 13px; line-height: 1.3; }
.customer-choice small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.item-card { margin-top: 12px; }
.requested-line { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.requested-line h3 { font-size: 15px; line-height: 1.35; }
.quantity { white-space: nowrap; padding: 5px 8px; color: var(--ink); background: #f1f3f8; border-radius: 7px; font-size: 11px; font-weight: 800; }
.attribute-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.attribute { padding: 5px 7px; border-radius: 6px; color: #59667d; background: #f3f5f9; font-size: 10px; }
.candidate { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.create-candidate { margin-top: 4px; padding: 12px; border: 1px dashed #d7ae2b; border-radius: 10px; background: rgba(232,182,32,.06); }
.candidate input { margin-top: 5px; accent-color: var(--accent-dark); }
.incompatible-candidate { margin-inline: -8px; padding-inline: 8px; border-radius: 8px; background: rgba(181,63,78,.035); }
.incompatible-candidate input { cursor: not-allowed; }
.candidate-name { font-size: 12px; font-weight: 750; line-height: 1.35; }
.candidate-meta { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.more-candidates { margin: 4px 0 8px; border-top: 1px solid var(--line); }
.more-candidates summary { padding: 12px 2px; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.more-candidates summary:hover { color: #244bb4; }
.more-candidates-list .candidate:first-child { border-top: 0; }
.order-action-message { margin-top: 10px; padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.order-action-message[hidden] { display: none; }
.order-action-message.error { color: var(--red); background: rgba(181,63,78,.08); border: 1px solid rgba(181,63,78,.16); }
.score { min-width: 43px; padding: 5px 7px; border-radius: 7px; text-align: center; font-size: 10px; font-weight: 900; }
.score.exact { color: var(--green); background: rgba(22,118,93,.1); }
.score.high { color: #4c856f; background: rgba(82,173,135,.07); }
.score.auto { color: #477d69; background: rgba(82,173,135,.11); }
.score.choose { color: #9a6800; background: rgba(232,182,32,.16); }
.score.create { color: var(--red); background: rgba(181,63,78,.09); }
.conflict { color: var(--red); }
.delivery-card { margin-top: 12px; background: #fafbfe; }
.delivery-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.delivery-options label { cursor: pointer; }
.delivery-options input { display: none; }
.delivery-options span { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 11px; font-weight: 750; }
.delivery-options input:checked + span { border-color: var(--accent-dark); background: rgba(232,182,32,.12); }
.delivery-warning { margin-top: 8px; color: #865d00; font-size: 10px; font-weight: 750; }
.delivery-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.confirmation-card { margin-top: 16px; padding: 18px; border: 1px solid rgba(185,130,0,.32); border-radius: 14px; background: linear-gradient(180deg, rgba(232,182,32,.06), #fff 180px); }
.confirmation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.confirmation-heading h3 { margin-top: 5px; font-size: 17px; }
.draft-badge { padding: 6px 8px; border-radius: 7px; color: #865d00; background: rgba(232,182,32,.15); font-size: 9px; font-weight: 850; white-space: nowrap; }
.source-note { margin-top: 13px; padding: 9px 10px; border-radius: 8px; color: var(--muted); background: #f4f6fa; font-size: 10px; line-height: 1.4; }
.confirmation-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.confirmation-settings > div, .confirmation-settings > label { display: grid; gap: 4px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.confirmation-settings span { color: var(--muted); font-size: 9px; font-weight: 750; }
.confirmation-settings strong, .confirmation-settings select { min-width: 0; color: var(--ink); font-size: 11px; font-weight: 750; }
.confirmation-settings select { width: 100%; border: 0; outline: 0; background: transparent; }
.confirmation-items { margin-top: 13px; border-top: 1px solid var(--line); }
.confirmation-item { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(120px, .8fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.confirmation-item > div { display: grid; gap: 3px; min-width: 0; }
.confirmation-item strong { font-size: 11px; line-height: 1.35; }
.confirmation-item small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.price-cell { text-align: right; }
.recommended-price { color: var(--muted); font-size: 9px; }
.recommended-price strong { color: var(--green); font-size: 11px; }
.recommended-price.placeholder-price strong, .placeholder-note { color: var(--red); }
.amount-cell { text-align: right; font-size: 11px; font-weight: 850; white-space: nowrap; }
.manual-price-field { display: grid; gap: 4px; margin-top: 5px; text-align: left; }
.manual-price-field span { color: #865d00; font-size: 9px; }
.manual-price-field input { width: 100%; height: 34px; border: 1px solid rgba(185,130,0,.36); border-radius: 8px; padding: 0 9px; outline: 0; }
.manual-price-field.placeholder-input span { color: var(--red); }
.manual-price-field.placeholder-input input { border-color: rgba(181,63,78,.52); background: rgba(181,63,78,.04); }
.apply-prices-button { min-height: 40px; margin-top: 12px; font-size: 11px; }
.apply-prices-button:disabled { opacity: .48; cursor: default; transform: none; box-shadow: none; }
.print-info { margin-top: 12px; padding: 10px; border-radius: 9px; background: #f7f8fb; }
.print-info > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.print-info pre { margin: 6px 0 0; white-space: pre-wrap; color: var(--ink); font: 10px/1.45 inherit; }
.totals { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.totals span { display: grid; gap: 3px; color: var(--muted); font-size: 9px; text-align: right; }
.totals strong { color: var(--ink); font-size: 12px; }
.confirmation-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; cursor: pointer; font-size: 10px; line-height: 1.4; }
.confirmation-check input { margin-top: 2px; accent-color: var(--accent-dark); }
.create-order-button { width: 100%; min-height: 48px; margin-top: 12px; border: 0; border-radius: 11px; color: var(--ink); background: var(--accent); font-size: 12px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 22px rgba(185,130,0,.18); }
.create-order-button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.price-warning { margin-top: 14px; padding: 10px; border-radius: 8px; color: #865d00; background: rgba(232,182,32,.12); font-size: 10px; line-height: 1.4; }
.price-warning.placeholder-warning { color: var(--red); background: rgba(181,63,78,.08); border: 1px solid rgba(181,63,78,.16); }
.creation-result { display: none; margin-top: 12px; padding: 11px; border-radius: 9px; font-size: 10px; line-height: 1.4; }
.creation-result.success, .creation-result.warning, .creation-result.error { display: grid; gap: 3px; }
.creation-result.success { color: var(--green); background: rgba(22,118,93,.08); border: 1px solid rgba(22,118,93,.16); }
.creation-result.warning { color: #865d00; background: rgba(232,182,32,.12); border: 1px solid rgba(185,130,0,.2); }
.creation-result.error { color: var(--red); background: rgba(181,63,78,.08); border: 1px solid rgba(181,63,78,.14); }
.progress-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(23,36,61,.30); backdrop-filter: blur(2px); }
.progress-dialog { width: min(390px, 100%); padding: 22px; border: 1px solid rgba(216,223,235,.95); border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(23,36,61,.24); }
.progress-heading { display: flex; align-items: center; gap: 13px; }
.progress-heading h3 { margin-top: 4px; font-size: 17px; }
.progress-spinner { width: 36px; height: 36px; flex: 0 0 36px; border: 4px solid rgba(232,182,32,.24); border-top-color: var(--accent-dark); border-radius: 50%; animation: progress-spin .85s linear infinite; }
.progress-status { margin-top: 22px; font-size: 14px; font-weight: 800; }
.progress-detail { min-height: 34px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.progress-track { height: 8px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.progress-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; color: var(--muted); font-size: 10px; }
.progress-footer strong { color: var(--ink); font-size: 11px; }
@keyframes progress-spin { to { transform: rotate(360deg); } }
.modal-open { overflow: hidden; }
.success-overlay { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; background: rgba(19,41,35,.38); backdrop-filter: blur(5px); animation: success-overlay-in .22s ease-out both; }
.success-dialog { width: min(420px, 100%); padding: 30px 28px 26px; border: 1px solid rgba(22,118,93,.18); border-radius: 22px; background: white; box-shadow: 0 28px 80px rgba(16,73,58,.28); text-align: center; animation: success-dialog-in .42s cubic-bezier(.2,.8,.2,1.15) both; }
.success-check { width: 84px; height: 84px; margin: 0 auto 19px; }
.success-check svg { width: 100%; height: 100%; overflow: visible; }
.success-check circle { fill: rgba(22,118,93,.10); stroke: var(--green); stroke-width: 4; transform-origin: center; animation: success-circle-in .52s cubic-bezier(.2,.9,.3,1.2) .08s both; }
.success-check path { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 46; stroke-dashoffset: 46; animation: success-check-draw .46s ease-out .42s forwards; }
.success-dialog .eyebrow { color: var(--green); }
.success-dialog h3 { margin-top: 7px; font-size: 27px; letter-spacing: -.025em; }
.success-copy { margin: 10px auto 0; max-width: 330px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.success-close-button { width: 100%; min-height: 48px; margin-top: 22px; border: 0; border-radius: 12px; color: white; background: var(--green); box-shadow: 0 12px 25px rgba(22,118,93,.22); cursor: pointer; font-size: 13px; font-weight: 850; transition: transform .15s ease, box-shadow .15s ease; }
.success-close-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(22,118,93,.28); }
.success-close-button:focus-visible { outline: 3px solid rgba(22,118,93,.23); outline-offset: 3px; }
.login-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: linear-gradient(145deg, rgba(23,36,61,.92), rgba(30,59,78,.88)); backdrop-filter: blur(8px); }
.login-dialog { width: min(410px, 100%); padding: 31px; border: 1px solid rgba(255,255,255,.75); border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(8,19,39,.34); }
.login-brand { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 21px; border-radius: 14px; color: var(--ink); background: var(--accent); font-size: 21px; font-weight: 950; }
.login-dialog h2 { margin-top: 8px; font-size: 32px; }
.login-dialog > p:not(.eyebrow) { margin: 10px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-field { display: grid; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 11px; font-weight: 800; }
.login-field input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fbfcfe; outline: none; }
.login-field input:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 4px rgba(232,182,32,.13); background: white; }
.login-button { width: 100%; height: 49px; margin-top: 20px; border: 0; border-radius: 11px; background: var(--accent); cursor: pointer; font-weight: 900; }
.login-button:disabled { opacity: .6; cursor: wait; }
.login-message { min-height: 20px; margin-top: 12px; color: var(--red); font-size: 12px; line-height: 1.4; }
.password-cancel-button { width: 100%; height: 42px; margin-top: 8px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-weight: 800; }
@keyframes success-overlay-in { from { opacity: 0; } }
@keyframes success-dialog-in { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes success-circle-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes success-check-draw { to { stroke-dashoffset: 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .success-overlay, .success-dialog, .success-check circle, .success-check path { animation-duration: .01ms; animation-delay: 0s; }
}

@media (max-width: 980px) {
  .page-shell { width: min(100% - 28px, 760px); }
  .workspace-grid { grid-template-columns: 1fr; }
  .result-card { min-height: 400px; }
  .mode-pill { display: none; }
}

@media (max-width: 600px) {
  .page-shell { width: min(100% - 20px, 520px); }
  .topbar { height: 78px; }
  .topbar-actions { min-width: 0; }
  .portal-user { display: none; }
  .tenant-control select { min-width: 110px; max-width: 145px; }
  .intro { padding-top: 34px; align-items: start; flex-direction: column; }
  .form-card, .results { padding: 20px; border-radius: 16px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .mode-pill { font-size: 0; }
  .mode-pill span { margin: 0; }
  .result-toolbar { align-items: start; flex-direction: column; }
  .confirmation-settings { grid-template-columns: 1fr; }
  .confirmation-item { grid-template-columns: 1fr; }
  .customer-refinement { grid-template-columns: 1fr; }
  .product-refinement { grid-template-columns: 1fr; }
  .product-refinement p { grid-column: auto; }
  .item-clarification, .delivery-fields { grid-template-columns: 1fr; }
  .item-clarification p { grid-column: auto; }
  .price-cell, .amount-cell { text-align: left; }
}
