:root {
  --ink: #20243a;
  --ink-soft: #697086;
  --paper: #f6f7fb;
  --card: #ffffff;
  --line: #dfe3ee;
  --primary: #2e78d2;
  --primary-dark: #245fa9;
  --primary-soft: #eaf2fd;
  --cyan: #20a2b9;
  --pink: #e55a98;
  --green: #477fc6;
  --green-dark: #285f9e;
  --green-soft: #eaf2fd;
  --blue: #2e78d2;
  --blue-soft: #eaf2fd;
  --purple: #7656ad;
  --purple-soft: #f1ecfb;
  --amber: #c4872d;
  --amber-soft: #fff5df;
  --red: #b84e5b;
  --red-soft: #fcebed;
  --shadow: 0 16px 42px rgba(43, 54, 91, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(180deg, #f8f9fd 0%, var(--paper) 100%); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: 4px; z-index: 100; background: linear-gradient(90deg, var(--pink) 0%, var(--purple) 23%, var(--primary) 45%, var(--cyan) 62%, #579bd0 80%, #e6c94e 92%, #e99a50 100%); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.topbar { height: 72px; padding: 0 clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 4px; z-index: 20; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand > div:last-child { display: grid; line-height: 1.05; }
.brand strong { font-family: Manrope, sans-serif; font-size: 15px; }
.brand small, .brand span { font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--ink-soft); margin-top: 5px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(145deg, var(--purple), var(--primary) 52%, var(--cyan)); box-shadow: 0 7px 18px rgba(46,120,210,.18); display: flex; padding: 8px; align-items: flex-end; gap: 3px; }
.brand-mark span { width: 4px; border-radius: 4px; background: #f2a6cb; }
.brand-mark span:nth-child(2) { background: #90b8e5; }.brand-mark span:nth-child(3) { background: #f3da6c; }
.brand-mark span:nth-child(1) { height: 8px; }.brand-mark span:nth-child(2) { height: 16px; }.brand-mark span:nth-child(3) { height: 12px; }
.privacy-pill { border: 1px solid #c8d8ed; background: #fff; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.privacy-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.integration-pill { border: 1px solid #cad9ee; background: #fff; color: var(--ink); min-height: 36px; padding: 8px 12px; border-radius: 999px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.integration-pill:hover { border-color: var(--primary); background: #f8fbff; }
.integration-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.integration-dot.loading { background: #91a2bf; box-shadow: 0 0 0 4px #eef3fa; }
.integration-dot.configured, .integration-dot.error { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.integration-dot.connected { background: #27845f; box-shadow: 0 0 0 4px #e2f3ea; }

main { overflow: hidden; }
.hero { min-height: 275px; padding: 50px clamp(22px, 6vw, 88px) 48px; background: radial-gradient(circle at 92% 18%, rgba(32,162,185,.14), transparent 24%), radial-gradient(circle at 72% 108%, rgba(229,90,152,.07), transparent 30%), linear-gradient(135deg, #fbfbfe 0%, #f0f5fc 100%); border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; position: relative; }
.hero::after { content: ""; position: absolute; right: 6vw; top: 26px; width: 260px; height: 260px; border: 1px solid rgba(46,120,210,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(32,162,185,.035), 0 0 0 84px rgba(118,86,173,.022); }
.hero-copy, .hero-actions { position: relative; z-index: 1; }
.eyebrow, .section-kicker { font: 700 11px/1 Manrope, sans-serif; letter-spacing: .17em; color: var(--purple); }
h1 { font: 800 clamp(38px, 5.2vw, 66px)/.98 Manrope, sans-serif; letter-spacing: -.055em; margin: 15px 0 18px; max-width: 780px; }
h1 em { background: linear-gradient(90deg, var(--purple), var(--primary), var(--cyan)); background-clip: text; -webkit-background-clip: text; color: transparent; font-style: normal; }
.hero-actions { min-width: 265px; display: grid; gap: 9px; }
.hero-actions small { text-align: center; color: var(--ink-soft); margin-top: 4px; }

.button { appearance: none; border: 1px solid transparent; border-radius: 11px; padding: 13px 16px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(43,54,91,.11); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.button.primary { background: linear-gradient(135deg, var(--primary), var(--cyan)); color: white; box-shadow: 0 9px 24px rgba(46,120,210,.18); }
.button.primary:hover { background: linear-gradient(135deg, var(--primary-dark), #198ca6); }
.button.secondary { background: white; border-color: #d5dbe8; }
.button.dark { background: var(--ink); color: white; }
.button.ghost { background: transparent; color: var(--red); }
.button.compact { padding: 9px 13px; border-radius: 9px; font-size: 13px; }
.button-icon { font-size: 17px; vertical-align: -1px; }

.workspace-section, .results-section { padding: 0 clamp(18px, 4.5vw, 72px); }
.workspace-section { margin-top: -28px; position: relative; z-index: 2; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 1280px; margin: 18px auto 0; }
.metric { min-height: 132px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.metric > span { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.metric strong { font: 800 34px/1 Manrope, sans-serif; margin: 16px 0 8px; letter-spacing: -.04em; }
.metric small { color: #7c8ca7; }
.metric.accent { background: linear-gradient(145deg, #424467, #57537d); border-color: #4b4c70; color: white; }
.metric.accent > span, .metric.accent small { color: #d9dbed; }
.metric.has-shortage strong, .metric.has-shortage small { color: var(--red); }

.panel { max-width: 1280px; margin: 0 auto; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.order-panel { overflow: hidden; }
.panel-heading { padding: 24px 26px 19px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.panel-heading h2 { font: 700 21px/1.2 Manrope, sans-serif; letter-spacing: -.025em; margin: 8px 0 0; }
.panel-heading p { color: var(--ink-soft); margin: 7px 0 0; font-size: 13px; }
.order-identity { padding: 12px 26px; border-top: 1px solid #eceff5; background: #f3f7fd; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.order-identity[hidden] { display: none; }.order-identity > div { min-width: 0; display: grid; gap: 3px; }.order-identity span { color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }.order-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 12px/1.2 Manrope, sans-serif; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.search { width: 230px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fcfcfe; }
.search span { font-size: 20px; color: #768ba9; transform: rotate(-15deg); }
.search input { width: 100%; border: 0; outline: none; background: transparent; padding: 8px 0; font-size: 13px; color: var(--ink); }
.order-product-actions { padding: 13px 26px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid #eceff5; }
.order-product-actions .search { width: min(100%, 320px); }
.order-product-actions #add-row { background: #2e78d2; color: white; box-shadow: 0 7px 16px rgba(46,120,210,.16); }
.order-product-actions #add-row:hover { background: #245fa9; }
.order-product-actions .camera-action { background: #4267bd; box-shadow: 0 7px 16px rgba(66,103,189,.16); }
.order-product-actions .camera-action:hover { background: #304fa7; }
.filter-bar { padding: 12px 26px; border-top: 1px solid #eceff5; background: #f8f9fc; display: flex; align-items: center; gap: 12px; }
.filter-bar #open-filters { color: #375caf; border-color: #b9c9e8; }
.filter-bar #open-filters.filter-active { background: #e6efff; border-color: #6c90d3; }
#filter-summary { font-size: 12px; font-weight: 700; color: var(--ink); }
#visible-count { margin-left: auto; font-size: 11px; color: #7a8aa5; white-space: nowrap; }
.filter-dialog-shell { max-width: 500px; }
.filter-options { border: 0; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.filter-options legend { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.filter-options label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #d5dbe8; border-radius: 10px; cursor: pointer; }
.filter-options label:has(input:checked) { border-color: #6488d0; background: #eef4ff; }
.filter-options input { width: 18px; height: 18px; accent-color: #4e75ca; }
.filter-dialog-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1260px; table-layout: fixed; }
th { padding: 11px 9px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #737a8d; background: #f4f6fb; border: 1px solid #e7e9f1; border-left: 0; }
th:nth-child(1) { width: 112px; } th:nth-child(2) { width: 220px; } th:nth-child(3) { width: 112px; text-align: center; letter-spacing: .03em; } th:nth-child(4) { width: 100px; } th:nth-child(5), th:nth-child(6), th:nth-child(7) { width: 94px; } th:nth-child(8) { width: 245px; } th:nth-child(9) { width: 170px; border-right: 0; }
td { padding: 8px 9px; border-bottom: 1px solid #e8eeeb; vertical-align: middle; background: white; }
tbody tr:last-child td { border-bottom: 0; }
td input { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 8px 7px; outline: none; color: var(--ink); font-size: 12px; }
td input:hover { border-color: #d7e3f2; }.status-row-conflict td input { border-color: rgba(186,69,69,.12); }.status-row-conflict td input:hover { border-color: var(--red); }
td input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.cell-sku input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; color: #33405f; text-transform: uppercase; }
.cell-description input { font-weight: 500; }
.number-input { text-align: center; font-variant-numeric: tabular-nums; }
.price-table-cell strong { display: block; color: var(--green-dark); font: 700 11px/1.2 Manrope, sans-serif; white-space: nowrap; }.price-table-cell small { margin-top: 3px; }
.allocation-stack { display: flex; gap: 5px; flex-wrap: wrap; }
.allocation-pill { font-size: 9.5px; padding: 5px 7px; border-radius: 6px; white-space: nowrap; }
.allocation-pill strong { font-size: 11px; margin-left: 4px; }
.depot-partiufesta { background: var(--green-soft); color: var(--green-dark); }.depot-transito { background: var(--blue-soft); color: #315f9b; }.depot-importacao { background: var(--purple-soft); color: #6e489f; }
.fulfillment-select { width: 100%; min-height: 37px; border: 1px solid #cbd9ec; border-radius: 8px; background: white; color: var(--ink); padding: 7px 28px 7px 8px; outline: none; font-size: 10px; font-weight: 600; cursor: pointer; }
.fulfillment-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.choice-preview { min-height: 20px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.suggestion-button { border: 0; background: var(--green-soft); color: var(--green-dark); border-radius: 5px; padding: 4px 7px; font-size: 9px; font-weight: 700; cursor: pointer; }
.suggestion-button:hover { background: #dceafa; }
.discard-preview { color: #697995; background: #eef3fa; border-radius: 5px; padding: 4px 7px; font-size: 9px; font-weight: 700; }
.status-wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status > span { width: 6px; height: 6px; border-radius: 50%; }
.status-ok { background: var(--green-soft); color: var(--green-dark); }.status-ok > span { background: var(--green); }
.status-split { background: var(--blue-soft); color: #315f9b; }.status-split > span { background: var(--blue); }
.status-shortage { background: var(--amber-soft); color: #94560c; }.status-shortage > span { background: var(--amber); }
.status-conflict { background: var(--red-soft); color: #9f3030; }.status-conflict > span { background: var(--red); }
.status-ready { background: var(--green-soft); color: var(--green-dark); }.status-ready > span { background: var(--green); }
.status-unselected { background: #edf2fa; color: #677873; }.status-unselected > span { background: #8798b4; }
.status-discarded { background: #e8eef7; color: #495a75; }.status-discarded > span { background: #60708c; }
td small { display: block; margin-top: 4px; color: #7c8ca7; font-size: 9px; line-height: 1.25; }
.icon-button { width: 25px; height: 25px; border: 0; border-radius: 7px; color: #9aa9c0; background: transparent; font-size: 17px; cursor: pointer; opacity: .2; transition: opacity .15s, background .15s, color .15s; }
tr:hover .icon-button, .icon-button:focus { opacity: 1; }.icon-button:hover { background: var(--red-soft); color: var(--red); }
.status-row-shortage td { background: linear-gradient(90deg, rgba(255,241,215,.3), transparent 28%); }.status-row-conflict td { background: linear-gradient(90deg, rgba(253,233,231,.36), transparent 28%); }
.status-row-unselected td { background: linear-gradient(90deg, rgba(237,241,239,.48), transparent 28%); }
.status-row-discarded td { background: #f4f6f5; opacity: .82; }
.th-dot, .legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }.th-dot.green { background: var(--green); }.th-dot.blue { background: var(--blue); }.th-dot.purple { background: var(--purple); }
.table-note { padding: 12px 26px; background: #f8f9fc; border-top: 1px solid var(--line); display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-soft); font-size: 10px; }.legend-dot.split { background: var(--blue); }.legend-dot.shortage { background: var(--amber); }.legend-dot.conflict { background: var(--red); }
.empty-state { padding: 35px; text-align: center; color: var(--ink-soft); }

.decision-action { padding: 18px 26px; border-top: 1px solid var(--line); background: #f8f9fc; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.decision-copy { display: flex; align-items: center; gap: 11px; min-width: 0; }
.decision-step { width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px; background: #373d5b; color: white; display: grid; place-items: center; font: 800 11px/1 Manrope, sans-serif; }
.decision-copy > div { min-width: 0; display: grid; gap: 3px; }
.decision-copy strong { font: 700 12px/1.25 Manrope, sans-serif; }
.decision-copy small { color: var(--ink-soft); font-size: 10px; }
.decision-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.split-button { min-width: 285px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.split-button span { font-size: 18px; }

.results-section { max-width: 1424px; margin: 24px auto 75px; }
.results-heading { padding-left: 0; padding-right: 0; }
.picking-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.results-empty { grid-column: 1 / -1; min-height: 220px; border: 1px dashed #b9cce5; border-radius: 16px; background: rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; padding: 35px; text-align: center; color: #7a8b86; }
.results-empty > span { width: 27px; height: 27px; border-radius: 8px; background: white; border: 1px solid #d7e3df; display: grid; place-items: center; color: var(--green-dark); font: 800 10px/1 Manrope, sans-serif; }.results-empty > i { font-style: normal; }.results-empty > strong, .results-empty > p { flex-basis: 100%; }.results-empty > strong { color: var(--ink); font: 700 15px/1.3 Manrope, sans-serif; margin-top: 8px; }.results-empty > p { margin: -2px 0 0; font-size: 11px; }
.picking-card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.picking-card header { padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.picking-card header > div { display: flex; align-items: center; gap: 8px; min-width: 0; }.picking-card h3 { margin: 0; font: 700 13px/1.1 Manrope, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.picking-card header > strong { font-size: 11px; padding: 5px 7px; border-radius: 6px; white-space: nowrap; }
.depot-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }.depot-card-transito .depot-dot { background: var(--blue); }.depot-card-importacao .depot-dot { background: var(--purple); }.shortage-card .depot-dot { background: var(--amber); }
.discarded-card .depot-dot { background: #6e7975; }.discarded-card header > strong, .discarded-card .picking-item b { background: #edf0ef; color: #586560; }
.depot-card-partiufesta header > strong { background: var(--green-soft); color: var(--green-dark); }.depot-card-transito header > strong { background: var(--blue-soft); color: #315f9b; }.depot-card-importacao header > strong { background: var(--purple-soft); color: #6e489f; }.shortage-card header > strong { background: var(--amber-soft); color: #94560c; }
.picking-list { max-height: 310px; overflow: auto; }
.picking-item { min-height: 62px; padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #edf2fa; }.picking-item:last-child { border-bottom: 0; }.picking-item > div { min-width: 0; display: grid; gap: 4px; }.picking-item strong { font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }.picking-item span { color: var(--ink-soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.picking-item small { color: var(--green-dark); font-size: 8px; }.picking-item b { min-width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #f0f4f2; font: 700 13px/1 Manrope, sans-serif; }.shortage-card .picking-item b { background: var(--amber-soft); color: var(--amber); }
.empty-mini { padding: 30px 15px; color: #879690; text-align: center; font-size: 11px; }.success-mini { color: var(--green); }
.bling-action { margin-top: 17px; border: 1px solid #bdd4ed; background: linear-gradient(135deg, #eef7fa, #f7fbfc); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bling-action[hidden] { display: none; }
.bling-action-copy { display: flex; align-items: center; gap: 11px; }.bling-action-copy .decision-step { background: var(--primary); }.bling-action-copy > div { display: grid; gap: 4px; }.bling-action-copy strong { font: 700 13px/1.2 Manrope, sans-serif; }.bling-action-copy small { color: #5c7088; font-size: 10px; }
.bling-button { background: linear-gradient(135deg, var(--primary), var(--cyan)); color: white; border-color: transparent; box-shadow: 0 9px 24px rgba(46,120,210,.18); }.bling-button:hover { background: linear-gradient(135deg, var(--primary-dark), #198ca6); }.bling-button span { margin-left: 14px; font-size: 17px; }
.simulation-note { margin-top: 17px; border: 1px solid #d8e4f3; background: #eef4fd; border-radius: 12px; padding: 12px 15px; display: flex; align-items: center; gap: 11px; color: var(--ink-soft); font-size: 12px; }.simulation-note > span { width: 23px; height: 23px; flex: 0 0 23px; border-radius: 50%; display: grid; place-items: center; background: white; color: var(--green); font-weight: 700; }.simulation-note p { margin: 0; }.simulation-note strong { color: var(--ink); }

dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; border: 0; padding: 0; border-radius: 18px; box-shadow: 0 30px 100px rgba(9,35,28,.28); color: var(--ink); }
dialog::backdrop { background: rgba(8, 33, 27, .48); backdrop-filter: blur(3px); }
.dialog-shell { padding: 28px; position: relative; }.dialog-shell h2 { font: 700 24px/1.2 Manrope, sans-serif; margin: 10px 0 8px; }.dialog-shell > p { margin: 0 30px 19px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }.dialog-close { position: absolute; right: 18px; top: 15px; border: 0; background: transparent; color: #83918d; font-size: 24px; cursor: pointer; }
.column-preview { display: grid; grid-template-columns: .8fr 1.6fr .6fr repeat(3, 1fr); background: #eef4fc; border-radius: 9px 9px 0 0; overflow: hidden; }.column-preview span { padding: 8px 7px; border-right: 1px solid #dce7f4; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: #687a75; text-align: center; }.column-preview span:last-child { border: 0; }
#paste-area { width: 100%; height: 210px; resize: vertical; border: 1px solid #cbd9eb; border-top: 0; border-radius: 0 0 9px 9px; padding: 13px; outline: none; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); }.dialog-shell textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.import-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 15px; }.import-footer > div { display: flex; gap: 7px; }.file-label { color: var(--green-dark); font-size: 12px; font-weight: 700; cursor: pointer; border-bottom: 1px solid currentColor; }.file-label input { display: none; }
.simulation-badge { display: inline-flex; color: #9a5c0d; background: var(--amber-soft); border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.real-send-badge { color: var(--green-dark); background: var(--green-soft); }
.integration-dialog-shell { padding: 30px; }
.integration-status-card { margin: 18px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7faff; display: flex; align-items: center; gap: 12px; }
.integration-status-card > div { display: grid; gap: 4px; }.integration-status-card strong { font: 700 13px/1.25 Manrope, sans-serif; }.integration-status-card small { color: var(--ink-soft); font-size: 11px; }
.integration-status-icon { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: #97a6a1; box-shadow: 0 0 0 5px #e9eeec; }
.integration-status-card[data-status="configured"] .integration-status-icon { background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.integration-status-card[data-status="connected"] { border-color: #bdd2ed; background: #f0f6fe; }.integration-status-card[data-status="connected"] .integration-status-icon { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.integration-status-card[data-status="error"] { border-color: #edc4c0; background: #fff5f4; }.integration-status-card[data-status="error"] .integration-status-icon { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
.callback-box { margin: 0 0 16px; }.callback-box > label, .credential-fields label { display: grid; gap: 7px; color: #536887; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.callback-box > div { display: flex; gap: 7px; margin-top: 7px; }.callback-box input, .credential-fields input { width: 100%; min-width: 0; border: 1px solid #cbd9ed; background: white; border-radius: 9px; padding: 11px 12px; outline: none; color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: normal; }
.callback-box input { background: #f5f8fd; color: #536887; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.credential-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }.credential-fields input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.security-note { margin: 13px 0; padding: 11px 12px; border-radius: 10px; background: #edf4fd; display: flex; gap: 9px; align-items: flex-start; color: var(--ink-soft); }.security-note > span { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--green); font-size: 11px; font-weight: 800; }.security-note p { margin: 1px 0 0; font-size: 10px; line-height: 1.45; }.security-note strong { color: var(--ink); }
.integration-primary { width: 100%; display: flex; justify-content: space-between; align-items: center; }.integration-primary span { font-size: 18px; }
.connected-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.connected-actions[hidden] { display: none; }
.integration-test-result { margin-top: 13px; padding: 13px; border: 1px solid #bdd2ed; border-radius: 10px; background: #f0f6fe; color: var(--green-dark); font-size: 11px; line-height: 1.5; }.integration-test-result[hidden] { display: none; }.integration-test-result.error { border-color: #edc4c0; background: #fff5f4; color: #973737; }
.disconnect-link { display: block; margin: 16px auto 0; border: 0; background: transparent; color: var(--red); font-size: 11px; text-decoration: underline; cursor: pointer; }.disconnect-link[hidden] { display: none; }
.bling-dialog-shell > p { margin-bottom: 16px; }.bling-preview { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.send-party-summary { margin-bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.send-party-summary > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #f7faff; display: grid; gap: 3px; }.send-party-summary span { color: var(--ink-soft); font-size: 9px; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }.send-party-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.bling-preview-row { min-height: 58px; padding: 10px 12px; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }.bling-preview-row:last-child { border-bottom: 0; }.bling-preview-row > div { display: grid; gap: 3px; }.bling-preview-row strong { font-size: 12px; }.bling-preview-row small { color: var(--ink-soft); font-size: 9px; }.bling-preview-row > b { font: 700 12px/1 Manrope, sans-serif; }
.preview-dot-partiufesta { background: var(--green); }.preview-dot-transito { background: var(--blue); }.preview-dot-importacao { background: var(--purple); }
.bling-warning { margin-top: 13px; border-radius: 9px; padding: 10px 12px; background: var(--amber-soft); color: #7f531d; font-size: 10px; line-height: 1.45; }
.send-confirm-check { margin-top: 13px; padding: 11px 12px; border: 1px solid #cbd9ed; border-radius: 9px; display: flex; align-items: flex-start; gap: 9px; font-size: 11px; font-weight: 700; cursor: pointer; }.send-confirm-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }.send-result { margin-top: 13px; padding: 12px; border: 1px solid #bdd2ed; border-radius: 10px; background: #f0f6fe; color: var(--green-dark); font-size: 11px; line-height: 1.45; }.send-result[hidden] { display: none; }.send-result.error { border-color: #edc4c0; background: #fff5f4; color: #973737; }.send-result > strong, .send-result > small { display: block; }.send-result > div { margin-top: 7px; display: flex; justify-content: space-between; gap: 12px; }.send-result p { margin: 8px 0 0; }
.dialog-actions { margin-top: 17px; display: flex; justify-content: flex-end; gap: 8px; }
.row-actions { display: inline-flex; align-items: center; gap: 1px; }
td input[readonly] { color: #344969; background: #f4f7fc; cursor: default; }
td input[readonly]:focus { border-color: transparent; box-shadow: none; }
.row-source-badge { display: inline-flex; margin: 2px 0 0 7px; padding: 2px 5px; border-radius: 999px; background: #e7f3f8; color: #1d6e8e; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

.real-order-shell { padding: 30px; }
.read-only-banner { margin: 15px 0; padding: 12px 13px; border: 1px solid #bdd2ed; border-radius: 11px; background: #f0f6fe; display: flex; align-items: center; gap: 10px; }
.read-only-banner > span { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--green); font-weight: 800; }
.read-only-banner > div { display: grid; gap: 3px; }.read-only-banner strong { font: 700 12px/1.2 Manrope, sans-serif; }.read-only-banner small { color: var(--ink-soft); font-size: 10px; }
.real-order-step { margin-top: 13px; border: 1px solid var(--line); border-radius: 13px; padding: 15px; }
.real-order-step > header { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.real-order-step > header > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: white; font: 800 10px/1 Manrope, sans-serif; }
.real-order-step > header > div { display: grid; gap: 3px; }.real-order-step > header strong { font: 700 12px/1.2 Manrope, sans-serif; }.real-order-step > header small { color: var(--ink-soft); font-size: 10px; }
.entity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.entity-picker { min-width: 0; }.bling-entity-search > label { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }.bling-entity-search > div { margin-top: 7px; display: flex; gap: 6px; }.bling-entity-search input { width: 100%; min-width: 0; border: 1px solid #cbd9ed; border-radius: 9px; padding: 10px; outline: none; }.bling-entity-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }.entity-status { margin: 8px 1px 6px; min-height: 14px; color: var(--ink-soft); font-size: 9px; }.entity-results { display: grid; max-height: 185px; overflow-y: auto; }.entity-result { width: 100%; border: 1px solid var(--line); border-bottom: 0; background: white; padding: 9px; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; text-align: left; cursor: pointer; }.entity-result:first-child { border-radius: 9px 9px 0 0; }.entity-result:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 9px 9px; }.entity-result:only-child { border-radius: 9px; }.entity-result:hover { border-color: #9ebde4; background: #f2f7fe; }.entity-result strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.entity-result small { color: var(--ink-soft); font-size: 8px; }.entity-result i { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }.selected-entity { margin-top: 8px; padding: 9px 10px; border: 1px solid #bdd2ed; border-radius: 9px; background: #f0f6fe; display: grid; gap: 3px; }.selected-entity[hidden] { display: none; }.selected-entity span { color: var(--green-dark); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }.selected-entity strong { font-size: 10px; }.selected-entity small { color: var(--ink-soft); font-size: 8px; }
.depot-mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.depot-mapping-grid label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.depot-mapping-grid select { grid-column: 1 / -1; width: 100%; min-width: 0; border: 1px solid #cbd9ed; border-radius: 9px; background: white; padding: 10px 9px; outline: none; color: var(--ink); font-size: 11px; }
.depot-mapping-grid select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.mapping-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.mapping-dot.blue { background: var(--blue); }.mapping-dot.purple { background: var(--purple); }
.mapping-message { margin-top: 9px; color: var(--ink-soft); font-size: 10px; }.mapping-message.success { color: var(--green-dark); }.mapping-message.error { color: var(--red); }
.bling-product-search > label { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.bling-product-search > div { display: flex; gap: 7px; margin-top: 7px; }.bling-product-search input { width: 100%; min-width: 0; border: 1px solid #cbd9ed; border-radius: 9px; padding: 10px 11px; outline: none; color: var(--ink); }.bling-product-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }
.product-search-status { margin: 10px 1px 7px; color: var(--ink-soft); font-size: 10px; }
.product-results { display: grid; max-height: 220px; overflow-y: auto; border-radius: 10px; }
.product-result { width: 100%; min-width: 0; border: 1px solid var(--line); border-bottom: 0; background: white; padding: 10px 11px; display: grid; grid-template-columns: 105px 1fr auto auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.product-result:first-child { border-radius: 10px 10px 0 0; }.product-result:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 10px 10px; }.product-result:only-child { border-radius: 10px; }
.product-result:hover, .product-result.selected { border-color: #9ebde4; background: #f2f7fe; }.product-result span { color: var(--green-dark); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }.product-result strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.product-result b { color: var(--ink); font-size: 10px; white-space: nowrap; }.product-result i { color: var(--green); font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.selected-product-card { margin-top: 13px; border: 1px solid #b9d4e0; border-radius: 13px; padding: 15px; background: #f7fbfc; }.selected-product-card[hidden] { display: none; }
.selected-product-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.selected-product-heading > div { min-width: 0; display: grid; gap: 4px; }.selected-product-heading span:first-child { color: #1d6e8e; font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }.selected-product-heading strong { font: 700 13px/1.3 Manrope, sans-serif; }
.selected-product-heading .product-price { flex: 0 0 auto; padding: 8px 10px; border-radius: 9px; background: white; border: 1px solid #d0dff1; text-align: right; }.selected-product-heading .product-price span { color: var(--ink-soft); font: 800 8px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .05em; }.selected-product-heading .product-price strong { color: var(--green-dark); font-size: 13px; white-space: nowrap; }
.real-data-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #dfeff6; color: #1d6e8e !important; font: 800 8px/1 Manrope, sans-serif !important; text-transform: uppercase; letter-spacing: .07em; }
.stock-preview { margin: 13px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }.stock-value { padding: 10px; border: 1px solid #d0dff1; border-radius: 10px; background: white; display: grid; gap: 3px; }.stock-value span { color: var(--ink-soft); font-size: 9px; }.stock-value strong { font: 800 21px/1 Manrope, sans-serif; }.stock-value small { color: #7c8ca7; font-size: 8px; }.depot-stock-transito { border-color: #ceddee; }.depot-stock-importacao { border-color: #dfd4ef; }
.stock-loading { grid-column: 1 / -1; padding: 18px; border: 1px dashed #c2d4ec; border-radius: 10px; color: var(--ink-soft); text-align: center; font-size: 10px; }.stock-loading.error { border-color: #edc4c0; color: var(--red); }
.add-product-controls { display: grid; grid-template-columns: 150px 1fr; gap: 9px; align-items: end; }.add-product-controls label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }.add-product-controls input { width: 100%; border: 1px solid #cbd9ed; border-radius: 9px; padding: 11px; outline: none; }.add-product-controls input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,120,210,.1); }.add-product-controls .button { display: flex; align-items: center; justify-content: space-between; }
.stock-rule { display: block; margin-top: 9px; color: var(--ink-soft); font-size: 9px; }
.real-order-footer { margin-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }.real-order-footer > span { color: var(--ink-soft); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; background: #373d5b; color: white; padding: 11px 17px; border-radius: 999px; box-shadow: 0 12px 35px rgba(43,54,91,.25); font-size: 13px; font-weight: 600; z-index: 100; transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: var(--red); }

@media (max-width: 1000px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; max-width: 400px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .picking-grid { grid-template-columns: repeat(2, 1fr); }
  .decision-action { align-items: stretch; flex-direction: column; }.decision-buttons { width: 100%; }.decision-buttons .button { min-width: 0; width: 100%; }
  .bling-action { align-items: stretch; flex-direction: column; }.bling-action .bling-button { width: 100%; display: flex; justify-content: space-between; }
}

@media (max-width: 680px) {
  .topbar { height: 62px; padding-left: 14px; padding-right: 14px; top: 4px; }.privacy-pill { display: none; }.integration-pill { font-size: 10px; padding: 8px 10px; }
  .hero { padding-top: 43px; min-height: auto; }.hero::after { display: none; } h1 { font-size: 40px; }
  .workspace-section { margin-top: 18px; }.metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.metric { min-height: 115px; padding: 16px; }.metric strong { font-size: 29px; margin-top: 13px; }.metric small { font-size: 10px; }
  .panel-heading { align-items: stretch; flex-direction: column; padding: 21px 18px 15px; }.heading-actions { flex-wrap: wrap; }.search { width: 100%; }.order-identity { padding: 12px 18px; grid-template-columns: 1fr; gap: 10px; }.order-identity .button { width: 100%; }.order-product-actions { padding: 12px 18px; }.order-product-actions .search { width: 100%; }.order-product-actions .button { flex: 1 1 auto; } .filter-bar { padding: 12px 18px; flex-wrap: wrap; } .filter-dialog-actions .button { flex: 1; }.table-note { padding: 12px 18px; }
  .decision-action { padding: 16px 18px; }
  .table-wrap { overflow: visible; padding: 10px; background: #eef4fc; }
  table { min-width: 0; display: block; } thead { display: none; } tbody { display: grid; gap: 10px; }
  tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dbe5f2; border-radius: 13px; padding: 10px; background: white; box-shadow: 0 5px 15px rgba(43,76,132,.05); }
  tbody td { display: block; border: 0; padding: 6px 5px; background: transparent !important; min-width: 0; }
  tbody td::before { content: attr(data-label); display: block; margin: 0 0 4px 6px; color: #71819d; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
  tbody .cell-sku { grid-column: span 1; } tbody .cell-description { grid-column: span 2; } tbody .choice-cell { grid-column: 1 / -1; } tbody td:last-child { grid-column: 1 / -1; }
  tbody td input { border-color: #e0e9f4; background: white; }.fulfillment-select { min-height: 43px; font-size: 12px; }.status-wrap { justify-content: flex-start; }.status-wrap .icon-button { margin-left: auto; opacity: 1; }
  .results-section { margin-top: 42px; }.results-heading .heading-actions { width: 100%; }.results-heading .button { flex: 1; }.picking-grid { grid-template-columns: 1fr; }
  .dialog-shell { padding: 22px 18px; }.column-preview { display: none; }.import-footer { align-items: stretch; flex-direction: column; }.import-footer > div { display: grid; grid-template-columns: 1fr 1fr; }.import-footer .ghost { grid-column: 1 / -1; order: 3; }.file-label { align-self: flex-start; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }.dialog-actions .button { width: 100%; }
  .integration-dialog-shell { padding: 24px 18px; }.credential-fields, .connected-actions { grid-template-columns: 1fr; }.callback-box > div { align-items: stretch; flex-direction: column; }
  .real-order-shell { padding: 24px 18px; }.entity-grid, .depot-mapping-grid, .stock-preview, .send-party-summary { grid-template-columns: 1fr; }.bling-entity-search > div, .bling-product-search > div { align-items: stretch; flex-direction: column; }.product-result { grid-template-columns: 80px 1fr auto; }.product-result b { grid-column: 2; }.product-result i { grid-column: 3; grid-row: 1 / span 2; }.add-product-controls { grid-template-columns: 1fr; }.real-order-footer { align-items: stretch; flex-direction: column; }.real-order-footer .button { width: 100%; }
}

/* Identidade visual #PartiuFesta: foco digital em azul, ciano e roxo. */
.customer-first { padding:18px 26px; border-top:1px solid var(--line); background:linear-gradient(135deg,#f7faff,#edf4fe); }
.customer-first-copy { display:flex; align-items:center; gap:11px; margin-bottom:14px; }
.customer-first-copy > div { display:grid; gap:3px; }
.customer-first-copy strong { font:700 14px/1.2 Manrope,sans-serif; }
.customer-first-copy small { color:var(--ink-soft); font-size:11px; }
.customer-quick-search { display:grid; gap:7px; color:var(--ink-soft); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.055em; }
.customer-quick-search input,.export-choice select,.draft-actions select { width:100%; border:1px solid #c8d6e9; border-radius:9px; background:white; padding:11px 12px; color:var(--ink); font:inherit; outline:none; }
.customer-quick-search input:focus,.export-choice select:focus,.draft-actions select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(46,120,210,.1); }
.customer-quick-results { max-width:100%; }
.export-choice select { min-width:118px; padding:8px 32px 8px 10px; font-size:12px; font-weight:700; }
.draft-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.draft-actions select { padding:9px; font-size:12px; font-weight:700; }
.bling-entity-search input:focus,
.depot-mapping-grid select:focus,
.bling-product-search input:focus,
.add-product-controls input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,120,210,.1);
}

@media (max-width:680px) {
  .customer-first { padding:16px 18px; }
  .results-heading .heading-actions { display:grid; grid-template-columns:1fr 1fr; }
  .results-heading .heading-actions #copy-summary { grid-column:1/-1; }
  .draft-actions { width:100%; }
}

.customer-input-wrap{display:block;position:relative}
.customer-input-wrap input{padding-right:48px}
.customer-input-wrap svg{position:absolute;right:17px;top:50%;width:20px;height:20px;transform:translateY(-50%);color:#4f78b7;pointer-events:none}

/* Setas visíveis de quantidade no pedido, inclusive em dispositivos móveis. */
.quantity-stepper{position:relative;width:100%;min-width:0}
.quantity-stepper input.number-input{height:44px;padding:8px 34px 8px 6px;border:1px solid #d5dbe8;background:#fff;appearance:textfield;-moz-appearance:textfield}
.quantity-stepper input::-webkit-inner-spin-button,.quantity-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.quantity-arrows{position:absolute;right:1px;top:1px;bottom:1px;width:29px;display:grid;grid-template-rows:1fr 1fr;border-left:1px solid #d5dbe8;overflow:hidden;border-radius:0 6px 6px 0}
.quantity-arrows button{border:0;background:#eef3ff;color:#4166b0;font-size:16px;line-height:1;cursor:pointer;padding:0}
.quantity-arrows button+button{border-top:1px solid #d5dbe8}
.quantity-arrows button:hover{background:#dce8ff}
.quantity-arrows button:focus-visible{outline:2px solid #4e75ca;outline-offset:-2px}
