:root {
  --ink: #0c2940;
  --muted: #667c8e;
  --line: #d9e3e8;
  --canvas: #f4f7f8;
  --white: #ffffff;
  --nav: #071d2b;
  --nav-soft: #12364a;
  --teal: #08b9bd;
  --teal-dark: #087c7f;
  --teal-pale: #daf5f1;
  --gold: #f5bd46;
  --red: #ce3e55;
  --shadow: 0 18px 50px rgba(7, 29, 43, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.eyebrow { margin: 0 0 8px; color: var(--teal-dark); font-size: .72rem; font-weight: 900; letter-spacing: .13em; }
.muted { color: var(--muted); line-height: 1.6; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, 1.05fr) minmax(420px, .95fr); }
.login-brand { padding: clamp(48px, 8vw, 110px); display: flex; flex-direction: column; justify-content: center; color: white; background: radial-gradient(circle at 12% 12%, #1f6d79 0, transparent 32%), linear-gradient(145deg, #061b29 0%, #0c3348 58%, #086f73 140%); }
.brand-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; margin-bottom: 40px; color: #052231; background: var(--teal); font-size: 1.55rem; font-weight: 950; box-shadow: 0 15px 35px rgba(0,0,0,.22); }
.brand-mark.small { width: 44px; height: 44px; margin: 0; border-radius: 13px; font-size: 1rem; box-shadow: none; }
.login-brand .eyebrow { color: #74e2df; }
.login-brand h1 { max-width: 670px; margin: 0; font-family: Georgia, serif; font-size: clamp(2.7rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.05em; }
.brand-copy { max-width: 590px; margin: 28px 0 42px; color: #c2d5df; font-size: 1.08rem; line-height: 1.75; }
.phase-card { width: min(100%, 520px); padding: 24px 26px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.phase-card span { color: #74e2df; font-size: .7rem; font-weight: 900; letter-spacing: .15em; }
.phase-card strong { font-size: 1.25rem; }
.phase-card p { margin: 2px 0 0; color: #abc4d0; }
.login-panel { display: grid; place-items: center; padding: 36px; }
.login-card { width: min(100%, 480px); padding: 46px; border: 1px solid var(--line); border-radius: 25px; background: var(--white); box-shadow: var(--shadow); }
.login-card h2 { margin: 0; font-size: 2.1rem; font-family: Georgia, serif; }
.stack { display: grid; gap: 18px; margin-top: 30px; }
label { display: grid; gap: 8px; color: var(--ink); font-size: .83rem; font-weight: 800; }
input, select { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); border: 1px solid #c9d6dd; border-radius: 11px; background: white; outline: none; }
input:focus, select:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(8,185,189,.12); }
.button { min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 850; }
.button.primary { color: white; background: var(--ink); }
.button.primary:hover { background: #154d66; }
.button.secondary { color: var(--ink); border-color: var(--line); background: white; }
.button.text-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button.ghost { color: #d6e7ee; border-color: #355368; background: transparent; }
.button.full { width: 100%; }
.button.compact { min-height: 36px; padding: 7px 11px; font-size: .76rem; }
.form-message { padding: 10px 12px; border-radius: 10px; font-size: .88rem; }
.form-message.error { color: #8c2436; background: #ffe9ed; }
.demo-note { margin-top: 26px; padding: 14px; display: grid; gap: 3px; border-radius: 12px; color: #6c4d08; background: #fff3d1; }
.demo-note strong { font-size: .72rem; letter-spacing: .12em; }
.demo-note span { font-size: .82rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: white; background: var(--nav); }
.sidebar-brand { padding: 24px 20px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-brand div:last-child { display: grid; gap: 3px; }
.sidebar-brand span { color: #81a5b4; font-size: .72rem; }
.main-nav { padding: 20px 12px; display: grid; gap: 5px; }
.nav-button { width: 100%; min-height: 48px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; color: #afc8d2; border: 0; border-radius: 11px; background: transparent; text-align: left; font-weight: 750; }
.nav-button:hover, .nav-button.active { color: white; background: var(--nav-soft); }
.nav-button.active { box-shadow: inset 3px 0 var(--teal); }
.nav-icon { width: 22px; color: #54d7d6; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.09); }
.user-summary { display: grid; gap: 3px; margin-bottom: 14px; }
.user-summary strong { font-size: .88rem; }
.user-summary span { color: #83a4b1; font-size: .72rem; }
.workspace { min-width: 0; }
.topbar { min-height: 92px; padding: 20px clamp(22px, 4vw, 48px); display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 1.72rem; }
.topbar .status-badge { margin-left: auto; }
.status-badge { padding: 9px 12px; display: inline-flex; align-items: center; gap: 8px; color: #1b6a5d; border-radius: 99px; background: var(--teal-pale); font-size: .76rem; font-weight: 850; }
.status-badge span { width: 8px; height: 8px; border-radius: 50%; background: #20af87; box-shadow: 0 0 0 4px rgba(32,175,135,.14); }
.menu-button { display: none; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.demo-banner { padding: 10px 48px; color: #6b4b00; background: #fff0c3; font-size: .82rem; }
.demo-banner strong { margin-right: 8px; }
.page-content { padding: clamp(24px, 4vw, 48px); }
.page-intro { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.page-intro h2 { margin: 0 0 6px; font-size: 1.45rem; }
.page-intro p { margin: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 8px 28px rgba(7,29,43,.05); }
.metric-card { min-width: 0; padding: 22px; }
.metric-card span { color: var(--muted); font-size: .77rem; font-weight: 750; }
.metric-card strong { display: block; margin-top: 8px; font-size: 2rem; font-family: Georgia, serif; }
.metric-card.accent { color: white; border-color: #0d4958; background: linear-gradient(145deg, #0b3044, #0b7073); }
.metric-card.accent span { color: #a9dad8; }
.metric-card.compact strong { font-size: clamp(1.05rem, 2.2vw, 1.55rem); line-height: 1.12; overflow-wrap: anywhere; }
.metric-card.compact p { margin-bottom: 0; line-height: 1.45; overflow-wrap: anywhere; }
.panel { padding: 24px; }
.panel + .panel { margin-top: 18px; }
.panel-header { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-header h3 { margin: 0; font-size: 1rem; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.foundation-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check-list { margin: 0; padding: 0; display: grid; gap: 12px; list-style: none; }
.check-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.check-list b { width: 23px; height: 23px; display: grid; place-items: center; color: #0f725f; border-radius: 50%; background: var(--teal-pale); }
.check-list b.pending { color: #8d5b00; background: #fff0c8; }
.check-list strong { display: block; font-size: .87rem; }
.check-list span { color: var(--muted); font-size: .77rem; }
.split { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { min-height: 88px; padding: 12px 14px; resize: vertical; color: var(--ink); border: 1px solid #cad6dc; border-radius: 10px; background: white; font: inherit; }
.settings-subhead { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.number-preview { margin-top: 18px; padding: 15px; display: flex; flex-wrap: wrap; gap: 8px 14px; border-radius: 12px; background: #f0f8f8; color: var(--muted); font: .78rem ui-monospace, monospace; }
.number-preview strong { width: 100%; color: var(--ink); font-family: inherit; }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 760px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { padding: 11px 12px; color: var(--muted); background: #f5f8f9; text-align: left; font-size: .72rem; letter-spacing: .04em; }
td { padding: 13px 12px; border-bottom: 1px solid #edf1f3; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.pill { padding: 5px 8px; display: inline-block; border-radius: 99px; color: #146958; background: var(--teal-pale); font-size: .68rem; font-weight: 850; white-space: nowrap; }
.pill.neutral { color: #566b78; background: #edf2f4; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .79rem; }
.section-tabs { margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.workflow-strip { margin-bottom: 18px; padding: 18px; display: grid; grid-template-columns: repeat(9, auto); align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: white; overflow-x: auto; }
.workflow-strip div { min-width: 130px; display: grid; gap: 3px; }
.workflow-strip b { color: var(--teal-dark); font-size: .69rem; }
.workflow-strip strong { font-size: .85rem; }
.workflow-strip span { color: var(--muted); font-size: .7rem; line-height: 1.35; }
.workflow-strip i { color: #9cb0ba; font-style: normal; }
.purchase-workflow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.purchase-workflow div { min-width: 0; padding-right: 8px; border-right: 1px solid var(--line); }
.purchase-workflow div:last-child { padding-right: 0; border-right: 0; }
.purchase-workflow i { display: none; }
.text-link { color: var(--teal-dark); font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.review-grid { display: grid; gap: 14px; }
.review-card { padding: 18px; display: grid; grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.3fr); gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfc; }
.review-card h3 { margin: 9px 0 5px; }
.review-card p { margin: 0 0 12px; color: var(--muted); font-size: .8rem; }
.accept-product-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.calculation-note { align-self: end; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.decision-controls { min-width: 230px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.decision-controls input { min-height: 36px; padding: 7px 9px; font-size: .76rem; }
.decision-controls input[data-field="note"], .decision-controls div { grid-column: 1 / -1; }
.decision-controls div { display: flex; gap: 7px; }
.tab-button { min-height: 42px; padding: 9px 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: white; font-weight: 800; }
.tab-button.active { color: white; border-color: var(--ink); background: var(--ink); }
.number-result { min-height: 90px; display: grid; place-items: center; border: 1px dashed #9cc7c5; border-radius: 13px; color: var(--teal-dark); background: #edfbf9; font: 800 1.25rem ui-monospace, monospace; }
.audit-detail { max-width: 320px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.purchase-product-list { margin-top: 18px; display: grid; gap: 9px; }
.purchase-product-option { padding: 12px; grid-template-columns: 22px minmax(0, 1fr) 90px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.purchase-product-option > input[type="checkbox"] { width: 20px; min-height: 20px; }
.purchase-product-option small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.purchase-product-option [data-quantity] { min-height: 40px; }
.purchase-task-card { margin-bottom: 18px; }
.purchase-steps { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.purchase-steps span { padding: 10px; color: var(--muted); border-radius: 9px; background: #edf2f4; font-size: .72rem; font-weight: 800; text-align: center; }
.purchase-steps span.done { color: #126554; background: var(--teal-pale); }
.purchase-payment-summary { margin-top: 16px; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-radius: 12px; background: #f2f8f8; }
.purchase-payment-summary div { display: grid; gap: 3px; }
.purchase-payment-summary .wide { grid-column: 1 / -1; }
.purchase-payment-summary span { color: var(--muted); font-size: .7rem; }
.payment-terms { margin-top: 16px; }
.payment-terms ul { margin: 10px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.payment-terms li { padding: 10px 12px; display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 9px; }
.payment-terms li b { min-width: 72px; color: var(--teal-dark); }
.purchase-actions { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-status-stack { display: flex; align-items: flex-end; gap: 6px; flex-direction: column; }
.payment-lifecycle, .attachment-card, .fulfilment-card { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfc; }
.section-heading { margin-bottom: 12px; display: flex; justify-content: space-between; gap: 12px; }
.section-heading h4, .fulfilment-card h4 { margin: 0 0 4px; }
.section-heading p, .fulfilment-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.payment-stage-card { padding: 15px; border: 1px solid #d8e4e6; border-radius: 12px; background: white; }
.payment-stage-card + .payment-stage-card { margin-top: 10px; }
.payment-stage-head { display: flex; justify-content: space-between; gap: 16px; }
.payment-stage-head > div:first-child, .payment-amount { display: grid; gap: 4px; }
.payment-stage-head span, .payment-stage-head small { color: var(--muted); font-size: .7rem; }
.payment-amount { text-align: right; justify-items: end; }
.payment-record { margin-top: 12px; padding: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 9px; background: #f0f6f6; font-size: .75rem; }
.payment-record p { width: 100%; margin: 0; }
.payment-submit-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.attachment-upload-form { display: grid; grid-template-columns: minmax(160px, .45fr) minmax(220px, 1fr) auto; gap: 8px; align-items: end; }
.attachment-list { margin-top: 12px; display: grid; gap: 7px; }
.attachment-row { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 9px; background: #eef4f5; }
.attachment-row span { min-width: 0; display: grid; gap: 2px; }
.attachment-row strong { overflow-wrap: anywhere; }
.attachment-row small { color: var(--muted); }
.logistics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.logistics-grid div { padding: 10px; display: grid; gap: 3px; border-radius: 9px; background: #eff6f6; }
.logistics-grid span { color: var(--muted); font-size: .68rem; }
.logistics-grid .wide { grid-column: 1 / -1; }
.receipt-form { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.conversation { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.conversation h4 { margin: 0 0 12px; }
.conversation-message { width: min(85%, 680px); margin: 8px 0; padding: 10px 12px; border-radius: 11px; background: #edf2f4; }
.conversation-message.mine { margin-left: auto; background: var(--teal-pale); }
.conversation-message p { margin: 4px 0; white-space: pre-wrap; }
.conversation-message small { color: var(--muted); }
.conversation form { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pricing-conflict { margin-top: 10px; padding: 10px 12px; color: #8c2436; border-radius: 10px; background: #ffe9ed; font-size: .78rem; font-weight: 800; }
.quotation-setup { margin-bottom: 18px; }
.quotation-composer { margin-bottom: 24px; }
.contact-fields { margin: 18px 0; padding: 15px; display: flex; flex-wrap: wrap; gap: 12px 22px; border: 1px solid var(--line); border-radius: 12px; }
.contact-fields legend { padding: 0 7px; color: var(--muted); font-size: .76rem; font-weight: 850; }
.contact-fields label { display: flex; align-items: center; gap: 7px; }
.contact-fields input { width: 18px; min-height: 18px; }
.quotation-product-head, .quotation-product-row { display: grid; grid-template-columns: minmax(280px, 1.5fr) 85px minmax(110px, .7fr) minmax(130px, .8fr) 100px; gap: 9px; align-items: center; }
.quotation-product-head { padding: 8px 12px 8px 42px; color: var(--muted); font-size: .68rem; font-weight: 850; }
.quotation-product-row { position: relative; margin-bottom: 8px; padding: 11px 11px 11px 42px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.quotation-product-row > input[type="checkbox"] { position: absolute; left: 13px; width: 18px; min-height: 18px; }
.quotation-product-row > span { min-width: 0; display: grid; gap: 3px; }
.quotation-product-row small { color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.quotation-product-row b { color: var(--teal-dark); font-size: .78rem; }
.quotation-product-row input:not([type="checkbox"]) { min-height: 40px; padding: 8px 9px; }
.quotation-live-total, .quotation-total { margin-top: 16px; padding: 14px; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px 18px; border-radius: 12px; background: #f0f8f8; font-size: .78rem; }
.quotation-live-total strong, .quotation-total strong { color: var(--teal-dark); font-size: 1.05rem; }
.quotation-card { margin-bottom: 18px; }
.quotation-meta { margin-bottom: 16px; display: grid; grid-template-columns: .7fr 1.35fr 1fr 1fr; gap: 10px; }
.quotation-meta div { padding: 11px; display: grid; gap: 3px; border-radius: 10px; background: #f2f7f8; }
.quotation-meta span { color: var(--muted); font-size: .68rem; }
.quotation-meta strong { font-size: .78rem; overflow-wrap: anywhere; }
.quotation-link-notice { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-color: #a9dcd8; background: #f2fbfa; }
.quotation-link-notice h3 { margin: 0 0 5px; }
.quotation-link-notice p { margin: 0; color: var(--muted); }
.extension-download { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-color: #a9dcd8; background: linear-gradient(135deg, #f2fbfa, #fff); }
.extension-download h3, .extension-download p { margin: 0 0 6px; }
.extension-download small { color: var(--muted); }
.scan-records { display: grid; gap: 18px; }
.sketchup-scan-card { overflow: hidden; }
.scan-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 16px; }
.scan-summary span { padding: 11px; border-radius: 10px; background: #f2f7f8; color: var(--muted); font-size: .72rem; }
.scan-summary strong { display: block; color: var(--ink); font-size: 1rem; }
.scan-items { display: grid; gap: 8px; margin: 14px 0; }
.scan-item { display: grid; grid-template-columns: 22px minmax(230px, 1.4fr) minmax(100px, .65fr) 78px minmax(110px, .7fr) minmax(130px, .8fr) 92px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.scan-item input { min-width: 0; min-height: 38px; padding: 7px 8px; }
.scan-item input[type="checkbox"] { width: 18px; min-height: 18px; }
.scan-item.unresolved { grid-template-columns: 150px minmax(220px, 1fr) 1.5fr; border-color: #f0c991; background: #fff9ef; }
.scan-head { padding-top: 4px; padding-bottom: 4px; border: 0; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 800; }
.scan-warning { color: #9a5500; font-weight: 850; }
.scan-linked { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 11px; background: #effaf8; }
.scan-linked span { flex: 1; color: var(--muted); }
.pilot-safety { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pilot-safety > div { display: flex; align-items: center; gap: 14px; }
.pilot-safety h3, .pilot-safety p { margin: 0; }
.pilot-safety p { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.pilot-safety.locked { border-color: #9ad8cd; background: #f2fbf9; }
.pilot-safety.warning { border-color: #efbd76; background: #fff8eb; }
.pilot-lock-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: white; font-size: 1.15rem; }
.pilot-country-grid { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pilot-country-card { margin-top: 0 !important; }
.pilot-country-card .panel-header > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.pilot-country-card .panel-header p { grid-column: 1 / -1; }
.pilot-country-code { width: 34px; height: 34px; display: grid; place-items: center; color: white; border-radius: 10px; background: var(--ink); font-size: .72rem; font-weight: 900; }
.pilot-country-metrics { margin-bottom: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.pilot-country-metrics div, .pilot-summary div { padding: 13px; display: grid; gap: 3px; border-radius: 10px; background: #f2f7f8; }
.pilot-country-metrics strong, .pilot-summary strong { font: 1.25rem Georgia, serif; }
.pilot-country-metrics span, .pilot-summary span { color: var(--muted); font-size: .68rem; }
.pilot-supplier-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.pilot-supplier-list li { padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.pilot-supplier-list li span:first-child { display: grid; gap: 2px; }
.pilot-supplier-list small { color: var(--muted); }
.pilot-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pilot-step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pilot-step-grid article { padding: 16px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfc; }
.pilot-step-grid article > span { color: var(--teal-dark); font-size: .7rem; font-weight: 900; letter-spacing: .1em; }
.pilot-step-grid h4 { margin: 8px 0 5px; }
.pilot-step-grid p { min-height: 58px; margin: 0 0 14px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.pilot-step-grid .button { width: 100%; margin-top: auto; }
.pilot-boundary { border-color: #efbd76; background: #fff8eb; }
.pilot-boundary p { margin: 5px 0 0; color: #805600; }
.onboarding-preview { border-color: #9ad8cd; background: linear-gradient(145deg, #f4fbfa, #fff); }
.onboarding-preview-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 16px; }
.preview-checklist, .email-preview, .agreement-preview { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.preview-checklist h4, .email-preview p, .agreement-preview h4 { margin-top: 0; }
.preview-label { margin-bottom: 13px; color: var(--teal-dark); font-size: .68rem; font-weight: 900; letter-spacing: .11em; }
.email-preview dl { margin: 0 0 16px; display: grid; grid-template-columns: 62px 1fr; gap: 6px 10px; font-size: .8rem; }
.email-preview dt { color: var(--muted); }
.email-preview dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.email-preview p, .agreement-preview p { color: #405b6b; font-size: .84rem; line-height: 1.65; }
.preview-lock-note { margin-top: 18px; padding: 11px 13px; color: #116a59; border-radius: 10px; background: var(--teal-pale); font-size: .76rem; font-weight: 750; }
.agreement-preview { margin-top: 16px; }
.agreement-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.agreement-preview-head h4 { margin-bottom: 4px; }
.agreement-preview-head span:not(.pill) { color: var(--muted); font-size: .74rem; }
.agreement-preview small { display: block; margin-top: 12px; color: var(--muted); overflow-wrap: anywhere; }
.preview-boundary { margin-top: 16px; padding: 15px; border-radius: 11px; }
.pilot-edit-form { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.pilot-edit-form .settings-subhead { margin-top: 4px; }
.approval-panel { margin-top: 16px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 2px solid #8cd7c8; border-radius: 12px; background: #effaf8; }
.approval-panel p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 380px; padding: 14px 18px; color: white; border-radius: 12px; background: var(--ink); box-shadow: var(--shadow); font-weight: 750; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .scan-summary { grid-template-columns: repeat(2, 1fr); }
  .scan-head { display: none; }
  .scan-item { grid-template-columns: 22px 1fr 1fr; }
  .scan-item > span:nth-of-type(1) { grid-column: 2 / -1; }
  .scan-item.unresolved { grid-template-columns: 1fr; }
  .quotation-product-head { display: none; }
  .quotation-product-row { grid-template-columns: 1fr 1fr; padding-left: 42px; }
  .quotation-product-row > span { grid-column: 1 / -1; }
  .quotation-meta { grid-template-columns: 1fr; }
  .pilot-step-grid { grid-template-columns: 1fr 1fr; }
  .onboarding-preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 42vh; padding: 42px 28px; }
  .login-brand h1 { font-size: 2.8rem; }
  .brand-mark { margin-bottom: 28px; }
  .phase-card { display: none; }
  .login-panel { padding: 20px; }
  .login-card { padding: 28px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 270px; transform: translateX(-100%); transition: transform .2s ease; }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .menu-button { display: inline-grid; place-items: center; }
  .topbar { padding: 16px 18px; }
  .topbar .status-badge { display: none; }
  .demo-banner { padding: 10px 18px; }
  .page-content { padding: 20px 16px 40px; }
  .metric-grid, .foundation-grid, .form-grid, .pilot-country-grid, .pilot-step-grid { grid-template-columns: 1fr; }
  .pilot-safety { align-items: flex-start; flex-direction: column; }
  .agreement-preview-head { flex-direction: column; }
  .approval-panel { align-items: flex-start; flex-direction: column; }
  .review-card, .accept-product-form { grid-template-columns: 1fr; }
  .purchase-steps, .purchase-payment-summary, .logistics-grid, .attachment-upload-form, .receipt-form { grid-template-columns: 1fr; }
  .payment-stage-head { flex-direction: column; }
  .payment-amount { text-align: left; justify-items: start; }
  .conversation form { grid-template-columns: 1fr; }
  .quotation-link-notice { align-items: stretch; flex-direction: column; }
  .extension-download, .scan-linked { align-items: stretch; flex-direction: column; }
  .scan-summary { grid-template-columns: 1fr 1fr; }
  .form-grid .wide { grid-column: auto; }
  .page-intro { align-items: start; flex-direction: column; }
}
/* Product detail and after-sales are normal-flow panels, including on tablets. */
.photo-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:16px; margin:16px 0; }
.photo-card { display:flex; flex-direction:column; gap:8px; overflow-wrap:anywhere; }
.photo-card img { width:100%; height:180px; object-fit:contain; background:#f3f7f8; border-radius:12px; }
.product-detail section { margin-top:24px; padding-top:16px; border-top:1px solid #d3e0e8; }
.product-detail textarea { width:100%; box-sizing:border-box; }
.case-conversation { max-height:400px; overflow:auto; }
.case-conversation article { padding:12px; margin-bottom:8px; background:#f3f7f8; border-radius:12px; }
.case-conversation p { white-space:pre-wrap; overflow-wrap:anywhere; }
.case-list { display:grid; gap:12px; margin-top:24px; }
.view-guide { text-align:center; max-width:400px; margin:16px auto; padding:20px; background:#edf7f7; border:1px solid #d3e0e8; border-radius:16px; line-height:2.5; }
.representative-row { padding:12px 0; border-bottom:1px solid #d3e0e8; }
.representative-row form { display:flex; gap:12px; margin-top:8px; flex-wrap:wrap; }
.representative-row select { flex:1; min-width:180px; }
.budget-line { display:grid; grid-template-columns:minmax(180px,1fr) 100px 110px; gap:12px; padding:12px 0; border-bottom:1px solid #d3e0e8; align-items:center; }
@media(max-width:700px) { .budget-line { grid-template-columns:1fr; } }
