:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f0f4f8;
  --text: #172033;
  --muted: #68758a;
  --line: #e3e8ef;
  --primary: #4567e8;
  --primary-dark: #2d4bc6;
  --primary-soft: #edf1ff;
  --success: #258e67;
  --success-soft: #e9f8f2;
  --warning: #c67a12;
  --warning-soft: #fff4df;
  --danger: #cb4554;
  --danger-soft: #fff0f2;
  --shadow: 0 5px 18px rgba(35, 51, 84, .055);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(400px, .7fr); padding: 28px; gap: 28px; }
.auth-visual { border-radius: 30px; padding: 72px; background: radial-gradient(circle at 20% 15%, #fff, transparent 30%), linear-gradient(135deg, #eef3ff, #dfeaff 65%, #edf7ff); color: var(--text); display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); border: 1px solid #d9e4f5; }
.auth-visual .eyebrow { color: var(--primary); }
.auth-visual h1 { max-width: 700px; font-size: clamp(40px, 5vw, 72px); line-height: 1.04; margin: 22px 0; letter-spacing: -.04em; }
.auth-visual p { max-width: 680px; font-size: 20px; color: var(--muted); line-height: 1.6; }
.auth-features { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.auth-features div { min-width: 150px; border: 1px solid #ccd9ee; background: rgba(255,255,255,.62); border-radius: 16px; padding: 18px; display: grid; gap: 4px; backdrop-filter: blur(10px); }
.auth-features span { font-size: 12px; color: var(--muted); }
.auth-card { background: var(--panel); border-radius: 30px; padding: 52px; align-self: center; box-shadow: var(--shadow); display: grid; gap: 22px; }
.auth-card h2 { margin: 16px 0 2px; font-size: 30px; }
.brand-row { display: flex; gap: 12px; align-items: center; }
.brand-row > div:last-child { display: grid; }
.brand-row small { color: var(--muted); }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #88a6ff); display: grid; place-items: center; color: #fff; font-weight: 900; letter-spacing: -.04em; box-shadow: 0 8px 22px rgba(69,103,232,.28); }
.brand-mark.large { width: 70px; height: 70px; font-size: 25px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); box-shadow: none; margin-bottom: 24px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; color: #4f5e73; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; outline: none; transition: .18s ease; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: #8da1f2; box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 95px; resize: vertical; }
.btn { border: 0; border-radius: 10px; padding: 11px 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: none; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--panel-soft); color: var(--text); }
.btn.success { background: var(--success); color: #fff; }
.btn.warning { background: var(--warning); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.btn.small { padding: 8px 11px; border-radius: 9px; font-size: 12px; }
.demo-accounts { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.demo-accounts code { color: var(--text); background: var(--panel-soft); padding: 7px 9px; border-radius: 8px; }
.app-shell { min-height: 100vh; display: block; }
.sidebar { background: #ffffff; color: var(--text); display: flex; flex-direction: column; padding: 22px 18px; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; border-right: 1px solid var(--line); box-shadow: none; }
.sidebar-brand { padding: 0 8px 28px; }
.sidebar-brand small { color: var(--muted); }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button { border: 0; background: transparent; color: #5f6d82; border-radius: 12px; padding: 12px 13px; display: flex; gap: 12px; align-items: center; text-align: left; font-weight: 700; }
.sidebar nav button span { width: 22px; text-align: center; font-size: 18px; }
.sidebar nav button:hover, .sidebar nav button.active { color: var(--primary-dark); background: var(--primary-soft); }
.sidebar-footer { margin-top: auto; display: grid; gap: 14px; padding: 18px 8px 2px; border-top: 1px solid var(--line); }
.connection { font-size: 11px; display: flex; gap: 8px; align-items: center; color: #9faabd; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #7f8a9e; }
.dot.online { background: #4fe0a1; box-shadow: 0 0 0 4px rgba(79,224,161,.11); }
.link-button { border: 0; background: transparent; color: var(--primary); text-align: left; padding: 0; }
.main { margin-left: 260px; width: calc(100% - 260px); min-width: 0; min-height: 100vh; }
.topbar > div:first-child { min-width: 0; }
.topbar { height: 92px; padding: 18px 30px; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(223,230,238,.8); }
.topbar h1 { margin: 5px 0 0; font-size: 28px; letter-spacing: -.03em; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 8px; }
.user-chip > div:last-child { display: grid; }
.user-chip small { color: var(--muted); text-transform: capitalize; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-weight: 900; display: grid; place-items: center; }
.content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 24px 30px 60px; }
.grid { display: grid; gap: 18px; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.metric { min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; }
.metric .metric-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 20px; }
.metric strong { font-size: 31px; letter-spacing: -.04em; }
.metric small { color: var(--muted); font-weight: 650; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 12px; }
.section-head h2 { margin: 0; font-size: 20px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.table-card { padding: 0; overflow-x: auto; overflow-y: hidden; }
.table-card > table { min-width: 760px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); background: #fbfcfe; padding: 11px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px solid #edf1f5; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tr.clickable:hover { background: #f9fbff; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; background: var(--panel-soft); color: #4c5b70; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search { max-width: 430px; position: relative; flex: 1; }
.search input { padding-left: 38px; }
.search:before { content: "⌕"; position: absolute; left: 14px; top: 9px; color: var(--muted); font-size: 20px; z-index: 1; }
.product-cell { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.product-thumb { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: var(--panel-soft); border: 1px solid var(--line); }
.product-thumb.placeholder { display: grid; place-items: center; color: #9aa6b7; font-weight: 900; }
.product-cell div { min-width: 0; }
.product-cell b, .product-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-cell small { color: var(--muted); margin-top: 3px; max-width: 480px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .span-2 { grid-column: span 2; }
.drop-zone { border: 1.5px dashed #b9c4d3; border-radius: 16px; background: #fafcff; padding: 30px; display: grid; place-items: center; text-align: center; gap: 9px; color: var(--muted); transition: .18s ease; }
.drop-zone:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.drop-zone input { display: none; }
.drop-zone strong { color: var(--text); }
.import-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; }
.steps { display: grid; gap: 11px; }
.step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.step-num { width: 28px; height: 28px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.step b, .step small { display: block; }
.step small { color: var(--muted); margin-top: 4px; }
.progress { height: 10px; background: #e9edf3; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #7d9aff); transition: width .25s ease; }
.progress-large { height: 14px; }
.inbound-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.inbound-hero h2 { margin: 5px 0 8px; font-size: 26px; }
.inbound-hero p { color: var(--muted); margin: 0; }
.stats-inline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 17px; }
.stats-inline div { display: grid; gap: 2px; }
.stats-inline strong { font-size: 22px; }
.stats-inline span { color: var(--muted); font-size: 12px; }
.scan-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 20px; align-items: start; }
.scan-main, .scan-sidebar { min-width: 0; }
.scan-main { display: grid; gap: 18px; }
.scan-input-wrap { position: relative; }
.scan-input { font-size: 25px; font-weight: 800; height: 70px; border-width: 2px; padding-left: 58px; letter-spacing: .02em; }
.scan-input-wrap:before { content: "▥"; position: absolute; left: 20px; top: 17px; font-size: 28px; color: var(--primary); z-index: 1; }
.current-product { min-height: 270px; display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; }
.current-product img, .current-product .product-placeholder { width: 170px; height: 170px; border-radius: 18px; object-fit: cover; background: var(--panel-soft); border: 1px solid var(--line); }
.current-product .product-placeholder { display: grid; place-items: center; color: #9aa6b7; font-size: 46px; font-weight: 900; }
.current-product h2 { margin: 6px 0; font-size: 26px; }
.current-product p { color: var(--muted); line-height: 1.5; }
.quantity-big { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.quantity-big strong { font-size: 52px; letter-spacing: -.06em; }
.quantity-big span { color: var(--muted); font-weight: 750; }
.scan-sidebar { display: grid; gap: 18px; align-content: start; }
.weight-gauge { display: grid; gap: 13px; }
.weight-value { display: flex; align-items: baseline; justify-content: space-between; }
.weight-value strong { font-size: 37px; letter-spacing: -.05em; }
.weight-value span { color: var(--muted); }
.box-number { background: linear-gradient(135deg, #172033, #2a3850); color: #fff; }
.box-number .eyebrow { color: #9fb3ff; }
.box-number strong { display: block; font-size: 54px; margin: 7px 0; letter-spacing: -.06em; }
.box-number small { color: #b8c3d4; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.empty-state { padding: 54px 20px; text-align: center; display: grid; gap: 12px; place-items: center; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 26px; }
.alert { border-radius: 14px; padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.alert.info { background: var(--primary-soft); color: #294abf; }
.alert.warning { background: var(--warning-soft); color: #9a5f0e; }
.alert.danger { background: var(--danger-soft); color: #a42d3b; }
.alert.success { background: var(--success-soft); color: #207758; }
.import-result-summary { display:grid; gap:12px; }
.import-result-summary .grid { gap:14px; }
.import-result-summary .alert { display:block; margin:0; line-height:1.5; overflow-wrap:anywhere; }
.import-result-summary > p { margin:4px 0; line-height:1.45; }
.import-result-summary .table-card { margin:0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(13,21,37,.58); backdrop-filter: blur(7px); display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(680px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 30px 100px rgba(9,18,38,.32); }
.modal-head { padding: 22px 24px 16px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 4px 0 0; }
.icon-button { border: 0; background: var(--panel-soft); width: 34px; height: 34px; border-radius: 10px; font-size: 22px; }
.modal-body { padding: 22px 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.toast-root { position: fixed; top: 20px; right: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { background: #172033; color: #fff; border-radius: 13px; padding: 13px 16px; min-width: 280px; box-shadow: var(--shadow); animation: toast-in .18s ease; }
.toast.success { background: #1f7e5c; }
.toast.warning { background: #a96810; }
.toast.danger { background: #a93644; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
.pagination-bar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.page-size-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.page-size-control select { width: auto; min-width: 76px; padding: 8px 30px 8px 10px; border-radius: 9px; }
.pagination-summary { color: var(--muted); font-size: 12px; margin-right: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 11px; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--panel-soft); border-radius: 7px; padding: 3px 6px; }
.suggestion-list { display: grid; gap: 10px; }
.suggestion { border: 1px solid var(--line); border-radius: 13px; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.suggestion:hover { border-color: #a9b7ee; background: #fafbff; }
.tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; padding: 10px 12px; font-weight: 800; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
@media (max-width: 1150px) {
  .grid.metrics { grid-template-columns: repeat(2, 1fr); }
  .scan-shell, .import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .sidebar { width: 76px; padding: 20px 10px; }
  .sidebar .brand-row > div:last-child, .sidebar nav button:not(.active) { }
  .sidebar nav button { justify-content: center; }
  .sidebar nav button span { margin: 0; }
  .sidebar nav button { font-size: 0; }
  .sidebar nav button span { font-size: 18px; }
  .sidebar-footer { display: none; }
  .main { margin-left: 76px; width: calc(100% - 76px); }
  .topbar { padding: 20px; }
  .content { padding: 20px; }
  .grid.two, .grid.three, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .current-product { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .pagination-bar { justify-content: stretch; }
  .pagination-summary { width: 100%; order: -1; }
  .page-size-control { margin-right: auto; }
}

/* v0.5.6 — consolidação, rastreabilidade e confirmação visual */
.inbound-selection-bar { display:grid; grid-template-columns:auto minmax(420px,1fr) auto; align-items:center; gap:18px; margin-bottom:14px; padding:14px 16px; border-color:#c6d1f8; background:#fafbff; }
.inbound-selection-bar > div:first-child { display:grid; gap:3px; min-width:150px; }
.inbound-selection-totals { display:grid; grid-template-columns:.8fr 1.35fr 1fr; gap:10px; }
.inbound-selection-totals > div { display:grid; gap:2px; padding-left:12px; border-left:1px solid var(--line); }
.inbound-selection-totals span { color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.05em; }
.inbound-selection-totals strong { font-size:15px; }
.inbound-selection-totals small { color:var(--muted); font-size:10px; line-height:1.3; }
.inbound-select-column { width:44px !important; text-align:center; }
.inbounds-selectable input[type="checkbox"] { width:17px; height:17px; accent-color:var(--primary); }

.inbounds-selectable th:nth-child(1) { width:4%; }
.inbounds-selectable th:nth-child(2) { width:19%; }
.inbounds-selectable th:nth-child(3) { width:9%; }
.inbounds-selectable th:nth-child(4) { width:10%; }
.inbounds-selectable th:nth-child(5) { width:12%; }
.inbounds-selectable th:nth-child(6) { width:34%; }
.inbounds-selectable th:nth-child(7) { width:12%; }

.current-product-complete { border:2px solid #65c59e; background:linear-gradient(135deg,#f1fff8,#fbfffd); box-shadow:0 14px 42px rgba(31,126,92,.15); }
.current-product-complete img,.current-product-complete .product-placeholder { border-color:#76cfa9; box-shadow:0 0 0 6px rgba(65,177,132,.1); }
.product-ok-banner { display:flex; align-items:center; gap:10px; width:fit-content; margin-bottom:12px; padding:9px 12px; border-radius:13px; background:#daf6e9; color:#17684b; }
.product-ok-banner > span { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:#21835f; color:#fff; font-size:21px; font-weight:900; }
.product-ok-banner > div { display:grid; gap:1px; }
.product-ok-banner b { font-size:14px; }
.product-ok-banner small { font-size:11px; color:#36745f; }

.scan-items-head,.scan-item-row { grid-template-columns:minmax(210px,1fr) minmax(110px,160px) 92px minmax(190px,auto); }
.report-filter-options { display:grid; gap:10px; margin-top:14px; }
.report-filter-option { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:12px; width:100%; padding:14px; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--text); text-align:left; }
.report-filter-option:hover { border-color:#9badf0; background:#fafbff; }
.report-filter-option:disabled { opacity:.55; cursor:wait; }
.report-filter-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:var(--primary-soft); color:var(--primary); font-size:20px; font-weight:900; }
.report-filter-option div { display:grid; gap:3px; }
.report-filter-option small { color:var(--muted); line-height:1.4; }

.history-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:18px; }
.history-summary > div { display:grid; gap:3px; padding:12px; border-radius:13px; background:var(--panel-soft); }
.history-summary strong { font-size:23px; }
.history-summary span { color:var(--muted); font-size:11px; }
.history-section + .history-section { margin-top:20px; }
.history-section h3 { margin:0 0 10px; font-size:15px; }
.history-list { display:grid; gap:9px; }
.history-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:14px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.history-row > div:first-child { display:grid; gap:3px; }
.history-row small,.history-row time,.history-row > span { color:var(--muted); font-size:11px; }
.history-times { display:grid; gap:3px; text-align:right; color:var(--muted); font-size:11px; }
.history-times b { color:var(--text); }
.print-history-row { grid-template-columns:minmax(0,1fr) auto; }
button.reopen-box-choice { width:100%; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
button.reopen-box-choice:hover { border-color:#9badf0; background:#fafbff; }

@media (max-width:1280px) {
  .inbounds-selectable th:nth-child(2),.inbounds-selectable td:nth-child(2) { display:table-cell; width:23%; }
  .inbounds-selectable th:nth-child(3),.inbounds-selectable td:nth-child(3) { display:none; }
  .inbounds-selectable th:nth-child(4) { width:11%; }
  .inbounds-selectable th:nth-child(5) { width:13%; }
  .inbounds-selectable th:nth-child(6) { width:38%; }
  .inbounds-selectable th:nth-child(7) { width:11%; }
  .inbound-selection-bar { grid-template-columns:1fr auto; }
  .inbound-selection-totals { grid-column:1 / -1; grid-row:2; }
}
@media (max-width:1050px) {
  .inbounds-selectable th:nth-child(2),.inbounds-selectable td:nth-child(2) { display:table-cell; width:27%; }
  .inbounds-selectable th:nth-child(4) { width:14%; }
  .inbounds-selectable th:nth-child(5) { width:16%; }
  .inbounds-selectable th:nth-child(6) { width:39%; }
  .inbounds-selectable th:nth-child(7),.inbounds-selectable td:nth-child(7) { display:none; }
}
@media (max-width:700px) {
  .inbound-selection-bar { grid-template-columns:1fr; }
  .inbound-selection-bar .actions { justify-content:stretch; }
  .inbound-selection-bar .actions .btn { flex:1; }
  .inbound-selection-totals { grid-column:auto; grid-row:auto; grid-template-columns:1fr; }
  .inbound-selection-totals > div { padding:8px 0 0; border-left:0; border-top:1px solid var(--line); }
  .history-summary { grid-template-columns:1fr; }
  .history-row { grid-template-columns:1fr; }
  .history-times { text-align:left; }
  .product-ok-banner { width:100%; align-items:flex-start; }
}

/* v0.5.0 — caixas pausáveis, documentos recolhidos e operação responsiva */
.inbound-files-panel { margin-top:18px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); overflow:hidden; }
.inbound-files-panel > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; }
.inbound-files-panel > summary::-webkit-details-marker { display:none; }
.inbound-files-panel > summary > div { display:grid; gap:3px; }
.inbound-files-panel > summary strong { font-size:17px; }
.inbound-files-panel > summary small { color:var(--muted); }
.details-chevron { color:var(--primary); font-size:20px; transition:transform .18s ease; }
.inbound-files-panel[open] .details-chevron { transform:rotate(180deg); }
.inbound-files-content { padding:0 18px 18px; border-top:1px solid var(--line); }
.inbound-files-content .section-head:first-child { margin-top:18px; }
.box-units-primary strong { font-size:58px; line-height:1; }
.box-volume-secondary { min-width:118px; padding-left:18px; border-left:1px solid rgba(255,255,255,.18); display:grid; align-content:center; justify-items:end; gap:3px; text-align:right; }
.box-volume-secondary span,.box-volume-secondary small { color:#b8c3d4; font-size:11px; }
.box-volume-secondary strong { font-size:34px; margin:0; line-height:1; }
.paused-boxes-card { display:grid; gap:10px; }
.paused-box-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:10px; border-top:1px solid var(--line); }
.paused-box-row > div:first-child { display:grid; gap:3px; }
.paused-box-row small { color:var(--muted); }
.location-result { display:grid; gap:9px; padding:13px 0; border-bottom:1px solid var(--line); }
.location-result:first-child { padding-top:0; }
.location-result:last-child { border-bottom:0; }
.location-result > div:first-child { display:grid; gap:3px; }
.location-result small { color:var(--muted); }
.location-boxes { display:flex; flex-wrap:wrap; gap:7px; }
button.location-open-box { border:0; cursor:pointer; }
.box-content-list { display:grid; }
.box-content-row { display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:11px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.box-content-row:last-child { border-bottom:0; }
.box-content-row img { width:46px; height:46px; border-radius:10px; object-fit:cover; border:1px solid var(--line); }
.box-content-row > div:nth-child(2) { display:grid; gap:2px; min-width:0; }
.box-content-row small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.box-content-row > strong { font-size:22px; }
.compact-table td,.compact-table th { padding:9px 10px; }

@media (max-width:1400px) {
  #items-table table { min-width:0; table-layout:fixed; }
  #items-table th,#items-table td { padding-left:9px; padding-right:9px; overflow-wrap:anywhere; }
  #items-table th:nth-child(4),#items-table td:nth-child(4) { display:none; }
  #items-table th:nth-child(1) { width:18%; }
  #items-table th:nth-child(2) { width:25%; }
  #items-table th:nth-child(3) { width:10%; }
  #items-table th:nth-child(5) { width:12%; }
  #items-table th:nth-child(6) { width:14%; }
  #items-table th:nth-child(7) { width:21%; }
  #items-table .product-cell { min-width:0; }
  #items-table .product-thumb { width:38px; height:38px; }
  #items-table .label-print-cell { min-width:0; gap:5px; flex-wrap:wrap; }
  #items-table .label-print-cell .badge { min-width:0; }
  #items-table .print-product-label { min-width:38px; width:38px; padding:8px; }
  #items-table .print-label-text { display:none; }
  #items-table .pending-actions { min-width:0; }
}

@media (max-width:760px) {
  .inbound-files-content { padding:0 12px 12px; }
  .box-number { grid-template-columns:minmax(0,1fr) auto; }
  .box-units-primary strong { font-size:48px; }
  .box-volume-secondary { min-width:96px; }
  .paused-box-row { align-items:flex-start; flex-direction:column; }
}

/* v0.5.2 — totais operacionais por inbound e retorno no detalhe */
.inbound-back-button { margin-bottom:12px; }
.table-card > table.inbounds-operational-table { min-width:980px; table-layout:fixed; }
.inbounds-operational-table th:nth-child(1) { width:20%; }
.inbounds-operational-table th:nth-child(2) { width:10%; }
.inbounds-operational-table th:nth-child(3) { width:10%; }
.inbounds-operational-table th:nth-child(4) { width:13%; }
.inbounds-operational-table th:nth-child(5) { width:34%; }
.inbounds-operational-table th:nth-child(6) { width:13%; }
.inbound-row-totals { display:grid; grid-template-columns:.75fr 1.35fr 1fr; gap:10px; min-width:0; }
.inbound-row-totals > div { min-width:0; display:grid; align-content:start; gap:2px; padding-left:10px; border-left:1px solid var(--line); }
.inbound-row-totals > div:first-child { padding-left:0; border-left:0; }
.inbound-row-totals span { color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.05em; }
.inbound-row-totals strong { font-size:14px; line-height:1.25; overflow-wrap:anywhere; }
.inbound-row-totals small { color:var(--muted); font-size:9px; line-height:1.3; }

@media (max-width:1280px) {
  .table-card > table.inbounds-operational-table { min-width:840px; }
  .inbounds-operational-table th:nth-child(2), .inbounds-operational-table td:nth-child(2) { display:none; }
  .inbounds-operational-table th:nth-child(1) { width:22%; }
  .inbounds-operational-table th:nth-child(3) { width:11%; }
  .inbounds-operational-table th:nth-child(4) { width:14%; }
  .inbounds-operational-table th:nth-child(5) { width:39%; }
  .inbounds-operational-table th:nth-child(6) { width:14%; }
}

@media (max-width:1050px) {
  .table-card > table.inbounds-operational-table { min-width:700px; }
  .inbounds-operational-table th:nth-child(6), .inbounds-operational-table td:nth-child(6) { display:none; }
  .inbounds-operational-table th:nth-child(1) { width:26%; }
  .inbounds-operational-table th:nth-child(3) { width:14%; }
  .inbounds-operational-table th:nth-child(4) { width:17%; }
  .inbounds-operational-table th:nth-child(5) { width:43%; }
}

.auth-recovery-link { color: var(--primary); text-align: center; justify-self: center; font-weight: 800; }
.form-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.password-rule { background: var(--primary-soft); color: #3652b7; padding: 10px 12px; border-radius: 10px; font-size: 12px; }
.checkbox-label { display: flex; align-items: center; align-self: end; min-height: 45px; gap: 9px; }
.checkbox-label input { width: auto; }
.locked-notice { margin-top: 12px; border: 1px solid #efb4bd; background: #fff8f9; color: #923543; border-radius: 12px; padding: 11px 13px; font-size: 12px; font-weight: 750; }
.modal-locked .modal-card { box-shadow: 0 30px 100px rgba(145,25,45,.35); border: 2px solid rgba(203,69,84,.3); }
.scan-items-card { padding: 0; overflow: hidden; }
.scan-items { min-width: 0; }
.scan-items-head, .scan-item-row { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(145px, 200px) 102px 142px; align-items: center; gap: 12px; padding: 11px 14px; }
.scan-items-head { background: #fafbfd; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.scan-item-row { border-bottom: 1px solid #edf1f5; min-width: 0; }
.scan-item-row:last-child { border-bottom: 0; }
.scan-item-row:hover { background: #fafcff; }
.scan-item-product { display: flex; align-items: center; gap: 11px; min-width: 0; }
.scan-item-text { min-width: 0; display: grid; gap: 3px; }
.scan-item-text b, .scan-item-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-item-text small { color: var(--muted); }
.scan-item-text .code { width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.scan-item-progress { display: grid; gap: 7px; }
.scan-item-progress strong { font-size: 13px; }
.scan-item-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.scan-item-actions .btn { margin:0; white-space:nowrap; }
.scan-print-product-label:disabled { opacity:.46; cursor:not-allowed; color:var(--muted); }
.scan-print-product-label:disabled:hover { transform:none; }
.recovery-code-box { display: grid; gap: 10px; text-align: center; background: #f7f9ff; border: 1px solid #ccd6fa; border-radius: 16px; padding: 22px; }
.recovery-code-box strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 25px; letter-spacing: .08em; user-select: all; color: #263f9f; }
.recovery-code-box span, .recovery-code-box small { color: var(--muted); }
@media (max-width: 720px) {
  .scan-items-head { display: none; }
  .scan-item-row { grid-template-columns: 1fr; gap: 10px; }
}


/* Catálogo v0.1.6: tabela compacta sem rolagem horizontal */
.product-table-card { padding: 0; overflow: hidden; }
.product-table { width: 100%; min-width: 0; table-layout: fixed; }
.product-table .col-product { width: 39%; }
.product-table .col-sku { width: 14%; }
.product-table .col-weight { width: 9%; }
.product-table .col-variation { width: 18%; }
.product-table .col-actions { width: 12%; }
.product-table th, .product-table td { min-width: 0; overflow: hidden; }
.product-table .product-cell { min-width: 0; width: 100%; }
.product-table .product-cell > div { min-width: 0; }
.product-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal !important;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  line-height: 1.35;
  max-height: 2.7em;
}
.product-variation {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.35;
  max-height: 2.7em;
  color: #405067;
}
.product-sku { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-weight { white-space: nowrap; }
.product-actions { flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
.product-actions .btn { min-width: 0; padding-left: 9px; padding-right: 9px; }

@media (max-width: 1180px) {
  .product-table .col-product { width: 38%; }
  .product-table .col-sku { width: 14%; }
  .product-table .col-weight { width: 10%; }
  .product-table .col-variation { width: 18%; }
    .product-table .col-actions { width: 12%; }
  .product-actions { flex-direction: column; align-items: stretch; }
  .product-actions .btn { width: 100%; }
}

/* v0.1.8 - action hierarchy for inbound details (retained) */
.btn { text-decoration: none; }
.btn.compact { padding: 9px 12px; border-radius: 10px; font-size: 13px; box-shadow: none; }
.btn.subtle { background: #f7f9fc; color: #344054; border: 1px solid var(--line); box-shadow: none; }
.btn.subtle:hover, .btn.ghost:hover { transform: none; background: #eef3f8; border-color: #cbd6e3; }
.inbound-actions { align-items: center; gap: 8px; }
.more-actions { position: relative; }
.more-actions > summary { list-style: none; user-select: none; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions[open] > summary { background: #eef3f8; border-color: #cbd6e3; }
.action-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 190px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 45px rgba(31,44,75,.16); }
.action-menu-item { width: 100%; border: 0; background: transparent; border-radius: 9px; padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 750; color: var(--text); }
.action-menu-item:hover { background: var(--panel-soft); }
.action-menu-item.danger-text { color: #a93644; }
.action-menu-item.danger-text:hover { background: var(--danger-soft); }
@media (max-width: 760px) {
  .inbound-actions { width: 100%; }
  .inbound-actions .btn, .inbound-actions .more-actions { flex: 1 1 auto; }
  .more-actions > summary { width: 100%; }
}

/* v0.1.9 - import feedback and volume labels */
.file-drop { position: relative; border: 1.5px dashed #b9c4d3; border-radius: 16px; background: #fafcff; min-height: 118px; transition: .18s ease; overflow: hidden; }
.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop.has-file { border-style: solid; border-color: #aebcf4; background: #f7f9ff; }
.file-drop-main { width: 100%; min-height: 116px; border: 0; background: transparent; padding: 22px 58px; display: grid; grid-template-columns: auto minmax(0,auto); align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--muted); }
.file-drop-main > div:last-child { min-width: 0; display: grid; justify-items: center; gap: 5px; }
.file-drop-main strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.file-drop-main span { font-size: 12px; line-height: 1.4; }
.file-remove { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 20px; line-height: 1; display: grid; place-items: center; box-shadow: 0 5px 16px rgba(30,45,75,.08); }
.file-remove:hover { color: var(--danger); border-color: #efb6be; background: var(--danger-soft); }
.modal-file-drop { margin-top: 16px; }
.import-progress { border: 1px solid #dbe3ff; border-radius: 14px; background: #f7f9ff; padding: 14px; display: grid; gap: 10px; }
.import-progress > div:last-child { display: grid; gap: 3px; }
.import-progress small { color: var(--muted); }
.progress.indeterminate > span { width: 34%; animation: indeterminate-progress 1.15s ease-in-out infinite; }
@keyframes indeterminate-progress { 0% { transform: translateX(-115%); } 55% { transform: translateX(125%); } 100% { transform: translateX(310%); } }
.volume-label-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.volume-label-info { display: flex; align-items: center; gap: 13px; min-width: 0; }
.volume-label-info > div:last-child { display: grid; gap: 4px; min-width: 0; }
.volume-label-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.volume-label-info small { color: var(--muted); }
.volume-label-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 20px; flex: 0 0 auto; }
@media (max-width: 700px) { .volume-label-card { align-items: stretch; flex-direction: column; } .volume-label-card .actions { justify-content: flex-end; } }

/* v0.2.0 - reliable import feedback and post-import volume labels */
.file-drop.has-file .file-remove { display: grid !important; }
.file-remove { z-index: 4; cursor: pointer; }
.file-remove::after { content: ''; position: absolute; inset: -5px; }
.import-progress.success { border-color: #b9e5d3; background: #f2fbf7; }
.import-progress.success strong { color: #176b4d; }
.import-progress.success .progress > span { background: var(--success); animation: none; transform: none; }
.import-progress.error { border-color: #f0c7cd; background: #fff6f7; }
.import-progress.error strong { color: #a93644; }
.import-progress.error .progress > span { background: var(--danger); animation: none; transform: none; }
.section-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.volume-label-info small { line-height: 1.45; }
.volume-label-status { display: inline-flex; margin-top: 5px; width: fit-content; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 750; }
.volume-label-status.sufficient { color: #176b4d; background: #eaf8f1; }
.volume-label-status.low { color: #8a5a10; background: #fff6df; }
.volume-label-card.volume-label-warning { border-color: #ead49f; background: #fffdf7; }
.replacement-required-cell { display:grid; gap:7px; justify-items:start; min-width:150px; }
.replacement-required-cell .badge { white-space:nowrap; }

/* v0.4.5 - etiquetas, aprovação Shopee, pendências e alarme operacional */
.product-label-card { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.product-label-card.product-label-warning { border-color:#ead49f; background:#fffdf7; }
.label-print-cell { display:grid; gap:7px; justify-items:start; min-width:112px; }
.label-print-cell .btn { white-space:nowrap; }
.pending-actions { flex-wrap:wrap; min-width:190px; }
.label-layout-preview { display:grid; gap:7px; align-content:center; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fafcff; color:var(--muted); }
.label-layout-preview > b { color:var(--text); font-size:12px; }
.label-layout-preview > span { width:160px; height:40px; display:grid; grid-template-columns:1fr 1fr; border:2px solid #172033; background:#fff; }
.label-layout-preview i { display:grid; place-items:center; border-right:1px dashed #7f8a9e; font-size:10px; font-style:normal; }
.label-layout-preview i:last-child { border-right:0; }
.label-layout-preview small { max-width:220px; line-height:1.35; }
.settings-subsection { margin-top:8px; padding-top:18px; border-top:1px solid var(--line); }
.settings-subsection h3 { margin:5px 0 4px; }
.settings-subsection p { margin:0; color:var(--muted); font-size:13px; }
.critical-alarm { position:fixed; inset:0; z-index:1000; display:grid; place-items:start center; padding:28px; background:rgba(100,13,24,.36); backdrop-filter:blur(3px); animation:critical-flash .7s ease-in-out infinite alternate; }
.critical-alarm-card { width:min(760px,100%); display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding:18px; border:3px solid #d72c42; border-radius:18px; background:#fff; box-shadow:0 24px 90px rgba(111,10,25,.42); }
.critical-alarm-icon { width:56px; height:56px; display:grid; place-items:center; border-radius:16px; background:var(--danger); color:#fff; font-size:34px; font-weight:950; }
.critical-alarm-card > div:nth-child(2) { display:grid; gap:3px; min-width:0; }
.critical-alarm-card span { color:var(--danger); font-size:11px; letter-spacing:.13em; font-weight:900; }
.critical-alarm-card strong { font-size:18px; overflow-wrap:anywhere; }
.critical-alarm-card small { color:var(--muted); }
@keyframes critical-flash { from { background:rgba(100,13,24,.26); } to { background:rgba(203,69,84,.46); } }
@media (max-width:760px) {
  .product-label-card { align-items:stretch; flex-direction:column; }
  .critical-alarm { padding:12px; }
  .critical-alarm-card { grid-template-columns:auto 1fr; }
  .critical-alarm-card .btn { grid-column:span 2; width:100%; }
}


/* v0.2.1 - store accounts, centered imports and controlled early completion */
.early-complete-btn { grid-column: span 2; color: #8a5a10; border-color: #ead49f; background: #fffdf7; }
.early-complete-btn:hover { background: #fff7df; color: #6f470b; }
.early-complete-help { display:block; margin-top:10px; color:var(--muted); text-align:center; line-height:1.4; }
@media (max-width:700px){ .file-drop-main { grid-template-columns:1fr; padding:22px 50px; } .file-drop-main .empty-icon { margin:auto; } }

/* v0.4.6 — conferência segura e acabamento mais clean */
.field-error { display:block; color:var(--danger); font-size:11px; font-weight:750; line-height:1.35; }
.field-invalid { border-color:#dc6977 !important; background:#fffafb !important; box-shadow:0 0 0 3px rgba(203,69,84,.1) !important; }
.manager-action-form { margin-top:16px; }
.label-print-cell { display:flex; align-items:center; gap:8px; min-width:190px; }
.label-print-cell .badge { min-width:78px; justify-content:center; white-space:nowrap; }
.label-print-cell .print-product-label { min-width:88px; margin:0; white-space:nowrap; }
.scan-filter-bar { display:flex; align-items:center; gap:7px; flex-wrap:wrap; padding:10px 14px; border-bottom:1px solid var(--line); background:#fcfdff; }
.scan-filter-bar .btn { box-shadow:none; }
.compact-empty { padding:34px 18px; }
.muted-dash { color:#a8b1bf; }
.box-number { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch; gap:18px; }
.box-number > div:first-child { min-width:0; }
.box-scan-count { min-width:128px; padding-left:18px; border-left:1px solid rgba(255,255,255,.18); display:grid; align-content:center; justify-items:end; gap:2px; text-align:right; }
.box-scan-count span,.box-scan-count small { color:#b8c3d4; font-size:11px; }
.box-scan-count strong { font-size:38px; margin:0; line-height:1; }
.weight-override-card { border-color:#e6c27f; background:#fffdf8; }
.weight-override-card .progress > span { background:linear-gradient(90deg,#d38b21,#cb4554); }
.weight-override-badge { width:fit-content; margin-top:2px; }
.reopen-previous-box { grid-column:span 2; }
.box-note { display:block; margin-top:4px; color:var(--muted); font-size:10px; white-space:nowrap; }
.warning-text { color:#a7650e; }

@media (max-width:760px) {
  .scan-filter-bar { align-items:stretch; }
  .scan-filter-bar .btn { flex:1 1 130px; }
  .box-number { grid-template-columns:1fr 1fr; }
  .label-print-cell { min-width:170px; }
}


/* v0.2.2 - cleaner catalog, rich previews, copy helpers and list search */
.metric-copy { display: grid; gap: 7px; align-content: end; }
.metric-copy strong { line-height: 1; display: block; }
.metric-copy small { line-height: 1.3; display: block; }

.product-table .col-product { width: 47%; }
.product-table .col-sku { width: 16%; }
.product-table .col-weight { width: 10%; }
.product-table .col-variation { width: 19%; }
.product-table .col-actions { width: 8%; }
.product-actions { justify-content: flex-end; }
.product-actions .btn { min-width: 66px; }
.image-preview-trigger { display: inline-flex; flex: 0 0 auto; border-radius: 11px; cursor: zoom-in; }
.current-image-trigger { border-radius: 18px; }
.copy-hover { cursor: copy; border-radius: 5px; transition: background .15s ease, color .15s ease; }
.copy-hover:hover, .copy-hover:focus { background: #edf1ff; color: #2d4bc6; outline: none; }
.floating-image-popover, .floating-copy-popover { position: fixed; z-index: 350; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 18px 55px rgba(23,32,51,.22); }
.floating-image-popover { width: 250px; padding: 10px; display: grid; gap: 8px; pointer-events: none; }
.floating-image-popover img { width: 228px; height: 228px; object-fit: contain; border-radius: 11px; background: #f6f8fb; }
.floating-image-popover small { color: var(--muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.floating-copy-popover { width: min(360px, calc(100vw - 24px)); padding: 11px; display: flex; align-items: center; gap: 10px; }
.floating-copy-popover > div { min-width: 0; display: grid; gap: 3px; flex: 1; }
.floating-copy-popover small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.floating-copy-popover strong { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.copy-popover-button { border: 0; border-radius: 9px; padding: 8px 10px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 850; }
.product-image-editor { display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 16px; border: 1px solid var(--line); background: #fafcff; border-radius: 15px; padding: 14px; }
.product-edit-image-preview { width: 96px; height: 96px; border-radius: 13px; background: var(--panel-soft); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.product-edit-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.product-image-editor label small { font-weight: 500; color: var(--muted); line-height: 1.4; }
.field-label-row { display: flex; align-items: center; gap: 7px; min-height: 18px; }
.info-tip { position: relative; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 900; cursor: help; outline: none; }
.info-tip::after { content: attr(data-tip); position: absolute; right: -8px; bottom: calc(100% + 9px); width: 270px; padding: 10px 12px; border-radius: 10px; background: #172033; color: #fff; font-size: 11px; font-weight: 600; line-height: 1.45; box-shadow: 0 12px 35px rgba(23,32,51,.24); opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s ease; z-index: 50; pointer-events: none; }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; visibility: visible; transform: translateY(0); }
.list-search-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin: -2px 0 12px; }
.list-search-row .search { max-width: 520px; }
.list-search-row > small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.scan-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.scan-list-toolbar h2 { margin: 0 0 3px; font-size: 18px; }
.scan-list-toolbar small { color: var(--muted); }
.scan-list-toolbar .search { width: min(420px, 50%); }
.import-layout .form-grid > label { align-self: start; }

@media (max-width: 1180px) {
  .product-table .col-product { width: 44%; }
  .product-table .col-sku { width: 16%; }
  .product-table .col-weight { width: 11%; }
  .product-table .col-variation { width: 20%; }
  .product-table .col-actions { width: 9%; }
  .product-actions { flex-direction: row; }
}
@media (max-width: 760px) {
  .product-image-editor { grid-template-columns: 1fr; }
  .list-search-row, .scan-list-toolbar { align-items: stretch; flex-direction: column; }
  .scan-list-toolbar .search, .list-search-row .search { width: 100%; max-width: none; }
  .info-tip::after { left: -8px; right: auto; width: min(270px, calc(100vw - 70px)); }
}

/* v0.2.3 */
.floating-copy-popover { width: auto; min-width: 0; padding: 5px; border-radius: 10px; }
.copy-popover-button { border: 0; border-radius: 7px; padding: 5px 8px; background: var(--primary-soft); color: var(--primary); font-size: 11px; line-height: 1; font-weight: 850; cursor: pointer; }
.import-provider-help { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border-radius: 13px; background: var(--primary-soft); color: #243b8e; }
.import-provider-help > div { display: grid; gap: 3px; }
.import-provider-help span { font-size: 12px; line-height: 1.45; }
.file-picker-card { border: 1px dashed #b9c5e8; border-radius: 14px; padding: 14px; background: #fbfcff; }
.file-picker-card input[type="file"] { margin-top: 9px; }
.weight-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn.tiny { min-height: 28px; padding: 5px 8px; font-size: 11px; border-radius: 8px; }

/* v0.3.0 — planejamento, limites mistos e evidências */
.planner-layout { display: grid; grid-template-columns: minmax(420px,.9fr) minmax(430px,1.1fr); gap: 22px; align-items: start; }
.planner-form h2 { margin: 6px 0 4px; }
.planner-history { min-width: 0; }
.compact-head { margin-top: 2px; }
.plan-list { display: grid; gap: 10px; }
.plan-list-item { width: 100%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 16px; cursor: pointer; }
.plan-list-item:hover { border-color: #aebcf4; background: #fafcff; }
.plan-list-item > div:first-child { display: grid; gap: 5px; min-width: 0; }
.plan-list-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-list-item small { color: var(--muted); }
.plan-list-metrics { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.plan-list-metrics span:first-child { display: grid; text-align: right; font-size: 11px; color: var(--muted); }
.plan-list-metrics strong { font-size: 18px; color: var(--text); }
.plan-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.plan-hero > div:first-child { display: grid; gap: 5px; }
.plan-hero h2 { margin: 3px 0; }
.plan-hero p { color: var(--muted); margin: 0; }
.back-link { width: fit-content; margin-bottom: 8px; cursor: pointer; font-weight: 800; }
.plan-metrics { margin-top: 18px; }
.compact-metric { min-height: 96px; }
.planner-toolbar { margin: 18px 0; display: grid; grid-template-columns: auto minmax(240px,1fr) auto; align-items: stretch; gap: 16px; padding: 14px; }
.planner-tabs { display: flex; align-items: center; gap: 5px; min-height: 48px; padding: 4px; border-radius: 12px; background: var(--panel-soft); }
.planner-tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 11px; border-radius: 9px; font-weight: 800; font-size: 12px; }
.planner-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 3px 10px rgba(31,44,75,.08); }
.planner-table-card { padding: 0; overflow: hidden; }
.planner-table-head, .planner-table-row { display: grid; grid-template-columns: minmax(330px,1.35fr) minmax(180px,.7fr) 110px 160px; gap: 16px; align-items: center; padding: 13px 16px; }
.planner-table-head { background: #fafbfd; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.planner-table-row { border-bottom: 1px solid #edf1f5; }
.planner-table-row:last-child { border-bottom: 0; }
.planner-table-row.included { background: #fcfdff; }
.plan-product { display: flex; gap: 11px; align-items: center; min-width: 0; }
.plan-product > div:last-child { display: grid; gap: 4px; min-width: 0; }
.plan-product b, .plan-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-product small { color: var(--muted); }
.plan-product .badge { width: fit-content; }
.plan-stock { display: grid; gap: 5px; font-size: 12px; }
.plan-stock small { color: var(--muted); }
.plan-stock small b { color: var(--text); }
.plan-suggestion { display: grid; gap: 3px; text-align: center; }
.plan-suggestion strong { font-size: 24px; }
.plan-suggestion small { color: var(--muted); }
.plan-final { display: grid; grid-template-columns: 68px 1fr; gap: 7px; }
.plan-final input { padding: 8px; text-align: center; }
.packaging-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); background: #fafcff; border-radius: 14px; }
.packaging-fields .alert { align-self: end; }
.packing-rule-label { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
/* v0.5.3 — escolha auditável do estoque aguardando ASN */
.asn-choice-group { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fafcff; }
.asn-choice-group legend { padding: 0 7px; color: var(--text); font-size: 14px; font-weight: 850; }
.asn-choice-group > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.asn-choice-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.asn-choice-options label { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.asn-choice-options label:hover { border-color: #9badf0; background: var(--primary-soft); }
.asn-choice-options input { width: 18px; height: 18px; margin: 1px 0 0; padding: 0; accent-color: var(--primary); }
.asn-choice-options span { display: grid; gap: 4px; min-width: 0; }
.asn-choice-options small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.asn-choice-options code { font-size: 11px; }
.video-search-card { display: flex; gap: 12px; align-items: center; }
.video-search-card .search { max-width: none; }
.video-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 14px; }
.video-result { display: grid; gap: 12px; }
.video-result-head { display: flex; justify-content: space-between; gap: 12px; }
.video-result-head > div { display: grid; gap: 4px; }
.video-result-head small { color: var(--muted); }
.video-result video { width: 100%; border-radius: 12px; background: #0e1625; }
.limit-mini { margin-top: 12px; display: grid; gap: 8px; padding: 14px; }
.limit-mini > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.camera-live-card { margin-top: 12px; display: grid; gap: 8px; }
#camera-live-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }

@media (max-width: 1200px) {
  .planner-layout { grid-template-columns: 1fr; }
  .planner-toolbar { grid-template-columns: 1fr; }
  .planner-toolbar .search { max-width: none; }
}
@media (max-width: 900px) {
  .planner-table-head { display: none; }
  .planner-table-row { grid-template-columns: 1fr 1fr; }
  .plan-product { grid-column: span 2; }
  .video-results { grid-template-columns: 1fr; }
  .packaging-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .planner-table-row { grid-template-columns: 1fr; }
  .plan-product { grid-column: span 1; }
  .plan-list-item, .plan-hero, .video-search-card { align-items: stretch; flex-direction: column; }
  .packaging-fields { grid-template-columns: 1fr; }
  .asn-choice-options { grid-template-columns: 1fr; }
}

/* v0.4.0 — revisão contínua, seleção em massa e navegação compacta */
.sidebar-toggle { position: absolute; top: 30px; right: -14px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--primary); box-shadow: 0 6px 18px rgba(31,44,75,.12); font-size: 20px; line-height: 1; display: grid; place-items: center; z-index: 2; }
body.sidebar-collapsed .sidebar { width: 82px; padding-left: 12px; padding-right: 12px; }
body.sidebar-collapsed .main { margin-left: 82px; width: calc(100% - 82px); }
body.sidebar-collapsed .sidebar-brand > div:last-child, body.sidebar-collapsed .connection span:last-child { display: none; }
body.sidebar-collapsed .sidebar-brand { padding-left: 7px; }
body.sidebar-collapsed .sidebar nav button { justify-content: center; font-size: 0; padding-left: 10px; padding-right: 10px; }
body.sidebar-collapsed .sidebar nav button span { font-size: 18px; }
body.sidebar-collapsed .sidebar-footer { padding-left: 4px; padding-right: 4px; text-align: center; }
body.sidebar-collapsed .sidebar-footer .link-button { text-align: center; }
body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
.home-label-lookup { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.home-label-lookup .scan-input { height: 62px; font-size: 20px; }
.lookup-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.lookup-product { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 18px; align-items: center; }
.lookup-product .product-thumb { width: 92px; height: 92px; }
.lookup-product h2 { font-size: 18px; margin: 6px 0; }
.lookup-product p { color: var(--muted); margin: 0 0 9px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 12px 14px; border-color: #cbd5fa; background: #fafbff; }
.product-table .col-select { width: 4%; }
.product-table .col-product { width: 43%; }
.product-table .col-sku { width: 15%; }
.product-table .col-weight { width: 10%; }
.product-table .col-variation { width: 20%; }
.product-table .col-actions { width: 8%; }
.product-table input[type="checkbox"], .planner-table-card input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); }
.grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.metric-note { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.plan-hero-actions { display: flex; align-items: center; gap: 16px; }
.plan-hero-actions label { min-width: 210px; }
.coverage-editor { display: grid; grid-template-columns: 74px 1fr; gap: 7px; }
.coverage-editor input { padding: 8px; }
.planner-toolbar .search, .planner-toolbar .actions { min-height: 48px; }
.planner-toolbar .search input, .planner-toolbar .actions .btn { height: 100%; min-height: 48px; }
.planner-toolbar .actions { align-items: stretch; justify-content: flex-end; flex-wrap: nowrap; }
.planner-table-head, .planner-table-row { grid-template-columns: 30px minmax(300px,1.25fr) minmax(165px,.65fr) minmax(145px,.55fr) 172px; gap: 12px; }
.plan-suggestion { text-align: left; }
.suggestion-reason { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; margin-top: 4px; }
.plan-final { grid-template-columns: 72px minmax(88px,auto); justify-content: end; align-items: stretch; }
.plan-final .plan-toggle:not(.icon-trash) { min-width: 88px; white-space: nowrap; }
.plan-final .icon-trash { width: 38px; padding: 7px; justify-self: end; color: var(--danger); border-color: #f0cbd0; }
.icon-trash { min-width: 34px; padding-left: 8px; padding-right: 8px; }
.actions.nowrap { flex-wrap: nowrap; }
.compact-number { min-width: 78px; max-width: 100px; padding: 8px 9px; }
.choice-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.choice-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 20px; text-align: left; display: grid; gap: 8px; color: var(--text); }
.choice-card:hover { border-color: #9badf0; background: #fafbff; transform: translateY(-1px); }
.choice-card strong { font-size: 18px; }
.choice-card small, .choice-card span:last-child { color: var(--muted); line-height: 1.45; }
.settings-template-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.settings-template-card > div:first-child { display: grid; gap: 6px; }
.settings-template-card small { color: var(--muted); }
@media (max-width: 1050px) {
  .grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .planner-table-head { display: none; }
  .planner-table-row { grid-template-columns: 28px minmax(0,1fr) minmax(180px,.55fr); }
  .plan-product { grid-column: 2 / 4; }
}
@media (max-width: 700px) {
  .home-label-lookup, .lookup-product, .choice-cards { grid-template-columns: 1fr; }
  .lookup-results { grid-template-columns: 1fr; }
  .bulk-bar, .settings-template-card, .plan-hero-actions { align-items: stretch; flex-direction: column; }
  .planner-table-row { grid-template-columns: 28px 1fr; }
  .plan-product { grid-column: 2; }
  .plan-stock, .plan-suggestion, .plan-final { grid-column: 2; }
}

/* Mantém os índices corretos da tabela após inserir a coluna de seleção. */
.table-card > table.inbounds-operational-table.inbounds-selectable { min-width:1020px; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(1) { width:4%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(2) { width:19%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(3) { width:9%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(4) { width:10%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(5) { width:12%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(6) { width:34%; }
.table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(7) { width:12%; }
.scan-items-head,.scan-item-row { grid-template-columns:minmax(210px,1fr) minmax(110px,160px) 92px minmax(190px,auto); }
@media (max-width:1280px) {
  .table-card > table.inbounds-operational-table.inbounds-selectable { min-width:880px; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(2),.table-card > table.inbounds-operational-table.inbounds-selectable td:nth-child(2) { display:table-cell; width:23%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(3),.table-card > table.inbounds-operational-table.inbounds-selectable td:nth-child(3) { display:none; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(4) { width:11%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(5) { width:13%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(6) { width:38%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(7) { width:11%; }
}
@media (max-width:1050px) {
  .table-card > table.inbounds-operational-table.inbounds-selectable { min-width:730px; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(2),.table-card > table.inbounds-operational-table.inbounds-selectable td:nth-child(2) { display:table-cell; width:27%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(4) { width:14%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(5) { width:16%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(6) { width:39%; }
  .table-card > table.inbounds-operational-table.inbounds-selectable th:nth-child(7),.table-card > table.inbounds-operational-table.inbounds-selectable td:nth-child(7) { display:none; }
}

/* v0.6.0 alpha — navegação multi-sistema e gestão financeira */
.module-switch { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin:0 3px 18px; padding:4px; border:1px solid var(--line); border-radius:12px; background:#f6f8fb; }
.module-switch button { min-width:0; border:0; border-radius:8px; padding:8px 7px; background:transparent; color:var(--muted); font-size:11px; font-weight:850; }
.module-switch button.active { background:#fff; color:var(--primary-dark); box-shadow:0 2px 8px rgba(35,51,84,.09); }
.nav-group { display:grid; gap:5px; }
body.sidebar-collapsed .module-switch { grid-template-columns:1fr; padding:3px; }
body.sidebar-collapsed .module-switch button { font-size:0; height:31px; position:relative; }
body.sidebar-collapsed .module-switch button::after { content:'O'; font-size:11px; font-weight:900; }
body.sidebar-collapsed .module-switch button[data-module='finance']::after { content:'G'; }

.finance-context { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; padding:5px 2px; }
.finance-context h2 { margin:5px 0 4px; font-size:22px; letter-spacing:-.025em; }
.finance-context p { margin:0; color:var(--muted); font-size:13px; text-transform:capitalize; }
.finance-context-actions { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.finance-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.finance-metric { min-height:145px; display:grid; align-content:space-between; gap:9px; overflow:hidden; position:relative; }
.finance-metric::after { content:''; position:absolute; width:86px; height:86px; right:-35px; bottom:-38px; border-radius:50%; background:var(--primary-soft); }
.finance-metric-head { display:flex; align-items:center; gap:9px; }
.finance-metric-head > span { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:var(--primary-soft); color:var(--primary); font-weight:900; }
.finance-metric-head small { color:var(--muted); font-weight:800; }
.finance-metric > strong { font-size:31px; line-height:1; letter-spacing:-.05em; }
.finance-metric > p { margin:0; color:var(--muted); font-size:11px; line-height:1.35; max-width:85%; }
.finance-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(340px,.75fr); gap:18px; margin-top:18px; }
.finance-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.finance-card-head h2 { margin:5px 0 0; font-size:20px; }
.finance-card-head > span:not(.badge) { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:var(--panel-soft); color:var(--muted); font-weight:900; }
.dre-card { min-height:350px; }
.dre-empty-visual { min-height:255px; display:grid; grid-template-columns:minmax(260px,1.2fr) minmax(220px,.8fr); gap:30px; align-items:center; padding:20px 10px 2px; }
.dre-empty-visual > div:last-child { display:grid; gap:10px; align-content:center; }
.dre-empty-visual small { color:var(--muted); line-height:1.55; }
.dre-empty-visual .btn { width:fit-content; margin-top:5px; }
.dre-columns { height:195px; display:flex; align-items:end; gap:13px; padding:18px 18px 0; border-left:1px solid var(--line); border-bottom:1px solid var(--line); background:linear-gradient(to top,rgba(237,241,255,.55),transparent); }
.dre-columns span { flex:1; min-width:16px; border-radius:7px 7px 0 0; background:linear-gradient(180deg,#8ea5f5,var(--primary)); opacity:.42; }
.finance-alert-list { display:grid; gap:10px; margin-top:18px; }
.finance-alert { display:grid; grid-template-columns:9px minmax(0,1fr); gap:11px; padding:12px 13px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.finance-alert > span { width:8px; height:8px; margin-top:4px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.finance-alert.warning > span { background:var(--warning); box-shadow:0 0 0 4px var(--warning-soft); }
.finance-alert.critical > span,.finance-alert.danger > span { background:var(--danger); box-shadow:0 0 0 4px var(--danger-soft); }
.finance-alert.success > span { background:var(--success); box-shadow:0 0 0 4px var(--success-soft); }
.finance-alert b,.finance-alert small { display:block; }
.finance-alert b { font-size:12px; }
.finance-alert small { color:var(--muted); font-size:11px; line-height:1.45; margin-top:4px; }
.import-batch-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.import-batch-card { width:100%; text-align:left; display:grid; gap:10px; color:var(--text); transition:border-color .15s ease,transform .15s ease; }
.import-batch-card:hover { border-color:#aab8ed; transform:translateY(-1px); }
.import-batch-head,.import-batch-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.import-batch-head > div { display:grid; gap:3px; min-width:0; }
.import-batch-head small,.import-batch-meta,.import-batch-card > small { color:var(--muted); font-size:10px; }
.import-batch-meta { font-weight:750; }
.ai-policy { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:14px; margin-top:22px; background:linear-gradient(135deg,#fbfcff,#f4f7ff); }
.ai-policy-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--primary); color:#fff; font-size:20px; }
.ai-policy > div:nth-child(2) { display:grid; gap:4px; }
.ai-policy small { color:var(--muted); line-height:1.4; }
.empty-state.compact { min-height:145px; padding:24px; }

.finance-catalog-note { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; background:linear-gradient(135deg,#fff,#f8faff); }
.finance-catalog-note > div { display:grid; gap:5px; }
.finance-catalog-note small { color:var(--muted); }
.finance-toolbar { justify-content:flex-start; }
.finance-toolbar .search { max-width:620px; }
.finance-product-table table { min-width:1040px; }
.finance-product-table th:first-child { width:36%; }
.modal-product-summary { display:grid; grid-template-columns:56px minmax(0,1fr); align-items:center; gap:13px; padding:12px; margin-bottom:18px; border:1px solid var(--line); border-radius:13px; background:#fafcff; }
.modal-product-summary .product-thumb { width:56px; height:56px; }
.modal-product-summary > div:last-child { display:grid; gap:6px; min-width:0; }

.pricing-layout { display:grid; grid-template-columns:minmax(520px,.95fr) minmax(400px,.75fr); gap:20px; align-items:start; }
.pricing-form-card { padding:22px; }
.pricing-search { display:flex; gap:9px; margin:22px 0 7px; }
.pricing-search .search { max-width:none; }
.pricing-form { margin-top:16px; }
.profile-rate-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; padding:10px; border-radius:12px; background:var(--panel-soft); }
.profile-rate-strip span { display:grid; gap:3px; padding:4px 7px; font-size:10px; color:var(--muted); }
.profile-rate-strip b { color:var(--text); font-size:12px; }
.pricing-result-card { min-height:565px; position:sticky; top:116px; display:grid; align-content:start; gap:17px; overflow:hidden; }
.pricing-result-empty { min-height:500px; display:grid; place-items:center; align-content:center; gap:10px; text-align:center; color:var(--muted); padding:35px; }
.pricing-result-empty > span { width:64px; height:64px; border-radius:20px; display:grid; place-items:center; background:var(--primary-soft); color:var(--primary); font-size:27px; }
.pricing-result-empty b { color:var(--text); font-size:17px; }
.selected-product-preview { display:grid; grid-template-columns:58px minmax(0,1fr); gap:13px; align-items:center; }
.selected-product-preview .product-thumb { width:58px; height:58px; }
.selected-product-preview > div:last-child { min-width:0; display:grid; gap:5px; }
.selected-product-preview small { display:block; }
.pricing-result-hero { margin:-18px -18px 0; padding:28px; background:linear-gradient(135deg,#172033,#31405b); color:#fff; display:grid; gap:8px; }
.pricing-result-hero .eyebrow { color:#9fb3ff; }
.pricing-result-hero > small { color:#c1ccda; }
.pricing-result-hero > strong { font-size:44px; letter-spacing:-.06em; line-height:1.05; }
.margin-pill { width:fit-content; border-radius:999px; padding:6px 10px; font-size:11px; font-weight:850; background:rgba(255,255,255,.12); }
.margin-pill.success { color:#84e9bf; }.margin-pill.warning { color:#ffd083; }.margin-pill.danger { color:#ff9aa6; }
.pricing-breakdown { display:grid; gap:1px; border:1px solid var(--line); border-radius:13px; overflow:hidden; background:var(--line); }
.pricing-breakdown > div { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; background:#fff; font-size:12px; }
.pricing-breakdown span { color:var(--muted); }
.pricing-breakdown .highlight { background:var(--success-soft); }
.pricing-breakdown .highlight span,.pricing-breakdown .highlight b { color:var(--success); }
.break-even { display:grid; grid-template-columns:1fr auto; gap:4px 12px; padding:13px; border-radius:12px; background:var(--panel-soft); }
.break-even span,.break-even small { color:var(--muted); font-size:11px; }
.break-even b { grid-row:1 / 3; grid-column:2; align-self:center; }

.smart-import-layout { display:grid; grid-template-columns:minmax(500px,1.05fr) minmax(330px,.65fr); gap:18px; align-items:stretch; }
.smart-import-card { padding:25px; }
.smart-import-card h2 { margin:6px 0 8px; font-size:25px; }
.smart-import-card p { margin:0 0 20px; color:var(--muted); line-height:1.55; }
.smart-import-card form { display:grid; gap:14px; }
.smart-drop-zone { min-height:190px; border:1.5px dashed #aebbe7; border-radius:17px; display:grid; place-items:center; align-content:center; gap:8px; text-align:center; padding:25px; background:#fafbff; cursor:pointer; transition:.16s ease; }
.smart-drop-zone:hover,.smart-drop-zone.dragging { border-color:var(--primary); background:var(--primary-soft); }
.smart-drop-zone input { display:none; }
.smart-drop-zone > span { width:48px; height:48px; border-radius:14px; display:grid; place-items:center; background:#fff; color:var(--primary); font-size:22px; box-shadow:var(--shadow); }
.smart-drop-zone small { color:var(--muted); font-weight:600; }
.smart-file-summary { padding:9px 11px; border-radius:10px; background:var(--panel-soft); color:var(--muted); font-size:11px; font-weight:750; }
.smart-import-explainer { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.smart-import-explainer .card { display:grid; grid-template-columns:32px minmax(0,1fr); align-content:start; gap:11px; box-shadow:none; }
.smart-import-explainer .card > div { display:grid; gap:5px; }
.smart-import-explainer small { color:var(--muted); line-height:1.45; }
.import-detail-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-bottom:14px; }
.import-detail-summary > div { display:grid; gap:6px; padding:11px; border-radius:11px; background:var(--panel-soft); }
.import-detail-summary span { color:var(--muted); font-size:10px; font-weight:750; }
.import-document-table { margin-top:16px; max-height:430px; overflow:auto; }
.import-document-table table { min-width:940px; }
.import-document-table td:first-child { max-width:260px; overflow-wrap:anywhere; }

@media (max-width:1200px) {
  .finance-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-dashboard-grid,.pricing-layout,.smart-import-layout { grid-template-columns:1fr; }
  .pricing-result-card { position:static; min-height:0; }
  .pricing-result-empty { min-height:250px; }
  .import-batch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:850px) {
  .module-switch { grid-template-columns:1fr; padding:3px; }
  .module-switch button { height:31px; font-size:0; position:relative; }
  .module-switch button::after { content:'O'; font-size:11px; font-weight:900; }
  .module-switch button[data-module='finance']::after { content:'G'; }
}
@media (max-width:760px) {
  .finance-context,.finance-catalog-note,.ai-policy { align-items:flex-start; flex-direction:column; }
  .finance-context,.finance-catalog-note { display:flex; }
  .ai-policy { display:grid; grid-template-columns:42px 1fr; }
  .ai-policy > .badge { grid-column:1 / 3; }
  .finance-metrics,.import-batch-grid,.smart-import-explainer { grid-template-columns:1fr; }
  .dre-empty-visual { grid-template-columns:1fr; }
  .dre-columns { height:130px; }
  .pricing-layout,.smart-import-layout { display:block; }
  .pricing-result-card,.smart-import-explainer { margin-top:16px; }
  .profile-rate-strip,.import-detail-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pricing-search { align-items:stretch; flex-direction:column; }
  .pricing-result-hero > strong { font-size:37px; }
}
