:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #d9e1ec;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --ok: #15803d;
    --warn: #d97706;
    --side: #111827;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--side); color: #e5e7eb; padding: 18px 14px; position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
.brand { padding: 8px 10px 20px; display: flex; flex-direction: column; gap: 3px; }
.brand strong { font-size: 24px; }
.brand span { color: #9ca3af; font-size: 13px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar a { padding: 10px 12px; border-radius: 8px; color: #cbd5e1; }
.sidebar a:hover, .sidebar a.active { background: #1f2937; color: #fff; }
.main { margin-left: 240px; flex: 1; min-width: 0; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 18px 26px; display: flex; justify-content: space-between; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 2; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar span { color: var(--muted); font-size: 13px; }
.userbar { display: flex; align-items: center; gap: 12px; }
.content { padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi strong { font-size: 28px; }
.kpi span { color: var(--muted); }
.muted { color: var(--muted); line-height: 1.4; }
.label-help, .heading-help, .th-help { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.help-icon { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid #93a4b8; border-radius: 999px; background: #f8fafc; color: #334155; font-size: 11px; font-weight: 900; line-height: 1; cursor: help; text-transform: none; z-index: 40; }
.help-icon:hover, .help-icon:focus { border-color: var(--primary); background: #dbeafe; color: var(--primary-dark); outline: 0; }
.help-tooltip-popover { position: fixed; z-index: 5000; width: max-content; max-width: min(300px, calc(100vw - 24px)); padding: 8px 9px; border-radius: 6px; background: #0f172a; color: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .28); font-size: 12px; font-weight: 700; line-height: 1.35; text-align: left; text-transform: none; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s ease, transform .12s ease; }
.help-tooltip-popover.is-visible { opacity: 1; visibility: visible; }
.help-tooltip-popover::before { content: ""; position: absolute; left: var(--tooltip-arrow-left, 50%); transform: translateX(-50%); border: 5px solid transparent; }
.help-tooltip-popover[data-placement="top"]::before { top: 100%; border-top-color: #0f172a; }
.help-tooltip-popover[data-placement="bottom"]::before { bottom: 100%; border-bottom-color: #0f172a; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.top-menu { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.top-menu a { padding: 10px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 700; }
.top-menu a:hover, .top-menu a.active { background: var(--panel); border-color: var(--line); color: var(--text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); background: #f8fafc; }
th .help-icon { text-transform: none; vertical-align: middle; margin-left: 4px; }
tr:last-child td { border-bottom: 0; }
.product-tree-table { min-width: 980px; }
.product-tree-table th:first-child, .product-tree-table td:first-child { width: 42px; }
.product-list-row.is-expandable { cursor: pointer; }
.product-list-row.is-expandable:hover td, .product-list-row.is-open td { background: #f8fbff; }
.product-list-row:focus { outline: 2px solid #bfdbfe; outline-offset: -2px; }
.product-toggle-cell { text-align: center; vertical-align: middle; }
.product-expand-toggle { width: 28px; height: 28px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155; cursor: pointer; display: inline-grid; place-items: center; }
.product-expand-toggle:hover, .product-list-row.is-open .product-expand-toggle { border-color: var(--primary); background: #eff6ff; color: var(--primary-dark); }
.product-expand-icon { display: inline-block; font-weight: 900; line-height: 1; transition: transform .14s ease; }
.product-list-row.is-open .product-expand-icon { transform: rotate(90deg); }
.product-name-cell strong { display: block; max-width: 520px; overflow-wrap: anywhere; }
.product-variant-count { display: inline-flex; min-width: 30px; height: 24px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 999px; background: #e8f0ff; color: var(--primary-dark); font-weight: 800; }
.product-variant-row > td { padding: 0; background: #f8fafc; }
.product-variant-panel { padding: 10px 12px 14px 54px; border-bottom: 1px solid var(--line); }
.product-variant-table { min-width: 820px; background: #fff; border: 1px solid #d9e1ec; border-radius: 6px; overflow: hidden; }
.product-variant-table th, .product-variant-table td { padding: 7px 8px; font-size: 12px; vertical-align: middle; }
.product-variant-table th { background: #eef3f8; }
.form { display: grid; gap: 14px; max-width: 1100px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font: inherit; background: #fff; color: var(--text); }
input[readonly] { background: #f8fafc; color: #475569; }
textarea { min-height: 96px; }
.searchable-select { position: relative; width: 100%; }
.searchable-select-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.searchable-select-trigger { width: 100%; min-height: 41px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: #fff; color: var(--text); font: inherit; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; cursor: pointer; }
.searchable-select-trigger span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchable-select-trigger:focus { outline: 2px solid rgba(37, 99, 235, .25); border-color: var(--primary); }
.searchable-select-icon { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -3px; }
.searchable-select-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; max-height: 320px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 36px rgba(15, 23, 42, .16); }
.searchable-select-search { padding: 8px 10px; border-radius: 6px; }
.searchable-select-options { display: grid; gap: 2px; max-height: 250px; overflow: auto; }
.searchable-select-option { width: 100%; border: 0; border-radius: 6px; padding: 8px 9px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.searchable-select-option:hover, .searchable-select-option:focus, .searchable-select-option.is-selected { background: #e8f0ff; outline: 0; }
.searchable-select-empty { padding: 10px; color: var(--muted); font-weight: 600; }
.product-search-field { position: relative; display: grid; gap: 6px; }
.product-search-selected { min-height: 38px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--text); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.product-search-input { padding: 9px 11px; }
.product-search-results { position: absolute; z-index: 35; left: 0; right: 0; top: calc(100% + 6px); max-height: 320px; overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 36px rgba(15, 23, 42, .16); }
.product-search-result { width: 100%; border: 0; border-radius: 6px; padding: 8px 9px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; }
.product-search-result:hover, .product-search-result:focus { background: #e8f0ff; outline: 0; }
.product-search-result strong { font-family: Consolas, monospace; overflow-wrap: anywhere; }
.product-search-result span { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; color: var(--muted); font-weight: 600; }
.product-search-result em { color: var(--text); font-style: normal; }
.product-search-result small:empty { display: none; }
.product-search-result small { color: var(--muted); font-size: 12px; line-height: 1.25; }
.product-search-empty { padding: 10px; color: var(--muted); font-weight: 700; }
.product-search-empty.is-error { color: #991b1b; }
.variant-select-field { display: grid; gap: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button-help-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.button-help-row .btn { width: 100%; }
.btn { border: 0; border-radius: 8px; padding: 9px 12px; background: var(--primary); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.btn:hover { background: var(--primary-dark); }
.btn-lg { padding: 13px 18px; font-size: 16px; }
.btn-light { background: #e2e8f0; color: #1e293b; }
.btn-light:hover { background: #cbd5e1; }
.btn-danger { background: var(--danger); }
.btn-ok { background: var(--ok); }
.btn-mini { padding: 5px 7px; border-radius: 6px; font-size: 11px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; background: #e2e8f0; color: #334155; white-space: nowrap; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-dark { background: #334155; color: #fff; }
.badge-gray { background: #e2e8f0; color: #334155; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-black { background: #111827; color: #fff; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert-ok { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 2200; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 44px)); pointer-events: none; }
.toast { border-radius: 8px; padding: 11px 13px; box-shadow: 0 16px 38px rgba(15, 23, 42, .22); font-weight: 800; pointer-events: auto; animation: toast-in .18s ease-out; }
.toast-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.toast-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.workflow-board { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 14px; align-items: start; margin-bottom: 16px; }
.workflow-main { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.workflow-main h2 { margin: 0 0 6px; }
.workflow-main p { margin: 0; color: var(--muted); line-height: 1.4; }
.workflow-states { display: flex; gap: 8px; flex-wrap: wrap; }
.state-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.state-chip strong { background: #e2e8f0; border-radius: 999px; padding: 2px 7px; font-size: 12px; }
.state-chip:hover, .state-chip.active { border-color: var(--primary); box-shadow: 0 0 0 2px #dbeafe; }
.state-chip.badge-blue { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.state-chip.badge-purple { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.state-chip.badge-yellow { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.state-chip.badge-orange { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.state-chip.badge-green { background: #dcfce7; color: #15803d; border-color: #86efac; }
.state-chip.badge-red { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.state-chip.badge-gray { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }
.state-chip.badge-black { background: #111827; color: #fff; border-color: #111827; }
.state-chip[class*="badge-"] strong { background: rgba(255,255,255,.62); color: inherit; }
.state-chip.badge-black strong { background: #374151; color: #fff; }
.locator-head { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.locator-summary { display: grid; gap: 8px; }
.locator-selection-status { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: #eaf7ee; color: #166534; font-weight: 800; }
.locator-filters { display: grid; gap: 10px; margin-bottom: 12px; }
.locator-search-main { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 8px; align-items: end; }
.locator-advanced summary { cursor: pointer; width: fit-content; color: var(--primary-dark); font-weight: 800; }
.locator-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.sticky-actions { position: sticky; top: 74px; z-index: 7; background: rgba(245, 247, 251, .98); border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.locator-actions { align-items: end; }
.locator-bulk-fields { display: grid; grid-template-columns: 160px minmax(160px, 1fr) minmax(190px, 1.2fr) 150px; gap: 8px; align-items: end; flex: 1 1 620px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.quick-actions .btn { padding: 7px 10px; font-size: 12px; }
.quick-status-button { border: 0; padding: 7px 10px; cursor: pointer; font: inherit; }
.quick-status-button:hover { filter: brightness(.94); }
.quick-status-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.locator-table { overflow-x: auto; }
.locator-table table { min-width: 1400px; width: 100%; table-layout: fixed; font-size: 12px; }
.locator-table th, .locator-table td { padding: 6px 6px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.locator-table th { white-space: nowrap; }
.locator-table th:nth-child(1), .locator-table td:nth-child(1) { width: 30px; }
.locator-table th:nth-child(2), .locator-table td:nth-child(2) { width: 92px; }
.locator-table th:nth-child(3), .locator-table td:nth-child(3) { width: 140px; }
/* Producto absorbe el espacio libre; los controles conservan su ancho. */
.locator-table th:nth-child(4), .locator-table td:nth-child(4) { width: auto; }
.locator-table th:nth-child(5), .locator-table td:nth-child(5) { width: 100px; text-align: center; }
.locator-quantity-cell strong { display: block; font-weight: 900; }
.locator-quantity-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.locator-table th:nth-child(6), .locator-table td:nth-child(6) { width: 190px; }
.locator-table th:nth-child(7), .locator-table td:nth-child(7) { width: 170px; }
.locator-table th:nth-child(8), .locator-table td:nth-child(8) { width: 190px; }
.locator-table th:nth-child(9), .locator-table td:nth-child(9) { width: 82px; }
.locator-table th:nth-child(10), .locator-table td:nth-child(10) { width: 116px; }
.locator-table th:nth-child(11), .locator-table td:nth-child(11) { width: 106px; }
.locator-table th:nth-child(12), .locator-table td:nth-child(12) { width: 44px; }
.locator-table .line-status-select { max-width: none; font-size: 11px; }
.locator-table .sort-button { width: auto; }
.locator-table .product-id-tools { flex-wrap: wrap; }
.locator-row.is-selected td { background: #eff6ff; }
.locator-row:hover td { background: #f8fbff; }
.locator-order { white-space: nowrap; }
.locator-table td.locator-order-link-cell { padding-left: 3px; padding-right: 3px; }
.locator-table .locator-order-link { width: 100%; padding: 5px 0; line-height: 1.15; text-align: center; }
.locator-order .locator-print-line { display: block; width: 100%; margin-top: 4px; padding: 4px 5px; white-space: normal; line-height: 1.2; }
.locator-notes-input { min-height: 34px; max-height: 72px; resize: vertical; }
.wide-cell { min-width: 240px; max-width: 420px; }
.pick-workbench { display: grid; gap: 16px; }
.pick-report { margin-bottom: 16px; }
.pick-report h2, .pick-scanner-card h2 { margin-top: 0; }
.pick-report-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
.pick-report-grid div { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.pick-report-grid span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.pick-report-grid strong { font-size: 20px; }
.pick-scanner-card { display: grid; gap: 10px; max-width: none; }
.pick-scan-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 8px; align-items: end; }
.pick-scan-message { min-height: 20px; margin: 0; color: var(--primary-dark); font-weight: 800; overflow-wrap: anywhere; }
.pick-live-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.pick-live-summary span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: #f8fafc; color: var(--muted); font-weight: 800; }
.pick-live-summary strong { color: var(--text); }
.pick-table table { min-width: 1080px; }
.pick-table th, .pick-table td { vertical-align: middle; }
.pick-table tr.pick-ok td { background: #f0fdf4; }
.pick-table tr.pick-error td { background: #fff1f2; }
.pick-table tr.pick-short td { box-shadow: inset 4px 0 0 #dc2626; }
.pick-table tr.pick-over td { box-shadow: inset 4px 0 0 #d97706; }
.pick-table tr.pick-extra td { box-shadow: inset 4px 0 0 #7c3aed; }
.pick-qty-input { width: 92px; min-width: 72px; padding: 7px 8px; border-radius: 6px; text-align: center; font-weight: 800; }
.pick-lines-card h2 { margin-top: 0; }
.pick-id-cell { display: grid; gap: 5px; }
.pick-id-cell > strong { color: var(--muted); font-family: inherit; font-size: 11px; }
.pick-error-note { display: block; margin-top: 5px; color: #b91c1c; font-weight: 900; }
.pick-format-hint { margin: 0; color: var(--muted); font-size: 12px; }
.pick-format-hint code { color: var(--text); font-weight: 900; }
.pick-incident-select, .line-incident-select { width: 100%; min-width: 130px; border-radius: 6px; padding: 6px 24px 6px 7px; font-size: 11px; font-weight: 800; background: #fff; }
.pick-actions { align-items: center; justify-content: space-between; margin-top: 12px; }
.pick-report-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pick-report-head h2 { margin: 0; }
.pick-customer-ticket { border: 1px dashed #64748b; }
.pick-ticket-logo { height: 25mm; }
.pick-ticket-logo img { max-height: 21mm; }
.pick-ticket-result { padding: 2.2mm 1mm; background: #000; color: #fff; text-align: center; font-size: 4.1mm; line-height: 1.1; font-weight: 900; }
.pick-ticket-order { padding: 2.4mm 1mm; border-bottom: .4mm solid #000; text-align: center; font-size: 12mm; line-height: 1; font-weight: 900; overflow-wrap: anywhere; }
.pick-ticket-meta { display: grid; grid-template-columns: 23mm minmax(0, 1fr); gap: 0; margin: 0; border-bottom: .35mm solid #000; }
.pick-ticket-meta dt, .pick-ticket-meta dd { margin: 0; padding: 1mm; border-bottom: .2mm solid #d9d9d9; font-size: 2.9mm; line-height: 1.15; overflow-wrap: anywhere; }
.pick-ticket-meta dt { font-weight: 900; text-transform: uppercase; }
.pick-ticket-meta dd { font-weight: 700; }
.pick-ticket-meta dt:nth-last-of-type(1), .pick-ticket-meta dd:last-child { border-bottom: 0; }
.pick-ticket-lines { border-bottom: .4mm solid #000; }
.pick-ticket-line { display: grid; grid-template-columns: minmax(0, 1fr) 13mm 8mm; min-height: 10mm; border-bottom: .2mm solid #d9d9d9; align-items: stretch; }
.pick-ticket-line:last-child { border-bottom: 0; }
.pick-ticket-line > span { display: flex; align-items: center; padding: 1mm; border-right: .2mm solid #d9d9d9; font-size: 2.8mm; line-height: 1.12; font-weight: 800; overflow-wrap: anywhere; }
.pick-ticket-line > span:last-child { border-right: 0; }
.pick-ticket-line-head { min-height: 6mm; background: #f0f0f0; }
.pick-ticket-line-head > span { justify-content: center; font-size: 2.3mm; text-align: center; }
.pick-ticket-product { display: grid !important; align-content: center; gap: .6mm; }
.pick-ticket-product strong { font-family: Consolas, monospace; font-size: 2.75mm; }
.pick-ticket-product small { font-size: 2.65mm; font-weight: 700; }
.pick-ticket-line-error { box-shadow: inset .8mm 0 0 #000; }
.pick-ticket-error-note { font-size: 2.35mm !important; font-weight: 900 !important; text-transform: uppercase; }
.pick-ticket-quantity, .pick-ticket-ok { justify-content: center; text-align: center; }
.pick-ticket-quantity { font-size: 3.6mm !important; white-space: nowrap; }
.pick-ticket-ok { font-size: 5mm !important; font-weight: 900 !important; }
.pick-ticket-ok.is-error { font-size: 4.4mm !important; }
.pick-ticket-summary { display: grid; grid-template-columns: 1fr 13mm; border-bottom: .4mm solid #000; }
.pick-ticket-summary span, .pick-ticket-summary strong { padding: 1.2mm 1mm; border-bottom: .2mm solid #d9d9d9; font-size: 2.9mm; }
.pick-ticket-summary span { font-weight: 900; text-transform: uppercase; }
.pick-ticket-summary strong { text-align: center; font-size: 4mm; }
.pick-ticket-footer { display: grid; gap: 1.2mm; padding: 3mm 1mm 2mm; text-align: center; }
.pick-ticket-footer strong { font-size: 3.25mm; }
.pick-ticket-footer span { font-size: 2.5mm; }
.detailed-label-modal { display: grid; gap: 14px; max-width: none; }
.detailed-label-head { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 14px; align-items: start; }
.detailed-label-head h2 { margin: 0 0 6px; }
.detailed-label-head p { margin: 0; }
.detailed-label-head .actions { align-items: end; justify-content: flex-end; }
.detailed-label-head label { min-width: 150px; }
.detailed-stock-ticket-mode { align-self: center; max-width: 190px; font-weight: 800; }
.inline-check { display: inline-flex; width: auto; align-items: center; gap: 7px; font-weight: 800; }
.inline-check input { width: auto; }
.detailed-label-table table { min-width: 1320px; font-size: 12px; }
.detailed-label-table th, .detailed-label-table td { padding: 7px 8px; vertical-align: middle; }
.detailed-label-table td:nth-child(4) { min-width: 300px; }
.detailed-label-table small { display: block; margin-top: 4px; color: var(--muted); font-weight: 700; }
.detailed-label-table textarea { min-height: 54px; max-height: 90px; resize: vertical; }
.detailed-label-table input[type="number"] { min-width: 74px; padding: 7px 8px; }
.detailed-thumb { width: 70px; height: 70px; object-fit: contain; display: block; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.order-sticky-actions { position: sticky; top: 74px; z-index: 8; background: rgba(245, 247, 251, .98); border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.order-actions-spacer { display: none; }
.order-bulk-actions { background: rgba(245, 247, 251, .96); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.order-list-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.order-list-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: #eef3f8; color: var(--text); font-weight: 800; }
.order-list-tabs a.active { background: #fff; color: var(--primary-dark); position: relative; top: 1px; }
.order-list-tabs span { color: var(--muted); font-weight: 700; }
.order-list-bulk { position: static; background: rgba(245, 247, 251, .96); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.order-list-table table { min-width: 900px; }
.order-list-table tr.priority-urgent td { background: #fff1f2; }
.order-list-table tr.priority-preorder td { background: #fff7ed; }
.order-list-table tr.priority-normal td { background: #fff; }
.order-list-table tr:hover td { filter: brightness(.985); }
.order-lines-table { overflow-x: auto; overflow-y: visible; }
.order-lines-table table { min-width: 1580px; width: 100%; table-layout: fixed; font-size: 12px; }
.order-lines-table th, .order-lines-table td { padding: 6px 7px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.order-lines-table th { white-space: normal; }
.order-lines-table td { line-height: 1.2; }
.order-col-check { width: 36px; }
.order-col-refs { width: 128px; }
/* El producto aprovecha el espacio restante sin estrechar los controles. */
.order-col-product { width: auto; }
.order-col-qty { width: 76px; }
.order-col-money { width: 100px; }
.order-col-status { width: 190px; }
.order-col-incident { width: 144px; }
.order-col-support { width: 90px; }
.order-col-file { width: 132px; }
.order-col-notes { width: 270px; }
.order-col-stock { width: 80px; }
.order-col-ficha { width: 96px; }
.order-col-label { width: 96px; }
.order-ticket-actions { display: grid; grid-template-columns: 1fr; gap: 4px; align-items: center; }
.order-ticket-actions .btn-mini { width: 100%; padding-left: 5px; padding-right: 5px; }
.order-lines-table .line-status-select { max-width: none; font-size: 11px; }
.order-lines-table .line-incident-select { min-width: 0; }
.order-lines-table .sort-button { width: auto; }
.order-lines-table .product-line-link { white-space: normal; overflow-wrap: anywhere; }
.sortable-header { cursor: pointer; user-select: none; position: relative; }
.sortable-header:hover { color: var(--primary-dark); background: #eef6ff; }
.sortable-header[data-sort-direction="asc"]::after { content: " ▲"; font-size: 10px; }
.sortable-header[data-sort-direction="desc"]::after { content: " ▼"; font-size: 10px; }
.sort-button { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-transform: inherit; text-align: left; padding: 0; cursor: pointer; }
.sort-button:focus { outline: 2px solid #bfdbfe; outline-offset: 2px; border-radius: 4px; }
.line-status-select { width: 100%; min-width: 0; max-width: 84px; border: 0; border-radius: 999px; padding: 4px 16px 4px 7px; font-size: 10px; font-weight: 800; cursor: pointer; }
.line-status-feedback { margin-top: 3px; font-size: 10px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
.line-status-feedback[hidden], .line-status-feedback button[hidden] { display: none; }
.line-status-feedback-pending { color: #92400e; }
.line-status-feedback-saved { color: #15803d; }
.line-status-feedback-error { color: #b91c1c; }
.line-status-feedback button { border: 1px solid currentColor; border-radius: 3px; background: #fff; color: inherit; padding: 2px 4px; margin: 3px 3px 0 0; font: inherit; cursor: pointer; }
.line-status-feedback span { display: block; }
.line-status-select.badge-blue { background: #dbeafe; color: #1d4ed8; }
.line-status-select.badge-purple { background: #ede9fe; color: #6d28d9; }
.line-status-select.badge-yellow { background: #fef3c7; color: #92400e; }
.line-status-select.badge-orange { background: #ffedd5; color: #c2410c; }
.line-status-select.badge-green { background: #dcfce7; color: #15803d; }
.line-status-select.badge-red { background: #fee2e2; color: #b91c1c; }
.line-status-select.badge-gray { background: #e2e8f0; color: #334155; }
.line-status-select.badge-black { background: #111827; color: #fff; }
.line-status-select option.badge-blue { background: #dbeafe; color: #1d4ed8; }
.line-status-select option.badge-purple { background: #ede9fe; color: #6d28d9; }
.line-status-select option.badge-yellow { background: #fef3c7; color: #92400e; }
.line-status-select option.badge-orange { background: #ffedd5; color: #c2410c; }
.line-status-select option.badge-green { background: #dcfce7; color: #15803d; }
.line-status-select option.badge-red { background: #fee2e2; color: #b91c1c; }
.line-status-select option.badge-gray { background: #e2e8f0; color: #334155; }
.line-status-select option.badge-black { background: #111827; color: #fff; }
.code-cell { font-family: Consolas, monospace; white-space: nowrap; font-weight: 700; font-size: 11px; }
.code-cell a, .product-line-link { color: #075fbd; text-decoration: underline; }
.everything-link { font-weight: 900; }
.product-id-tools { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; vertical-align: middle; }
.product-id-link, .product-id-tools .product-id-link { color: #075fbd; text-decoration: underline; }
.product-id-everything { font-size: 10px; padding: 2px 5px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; text-decoration: none; }
.order-refs-cell { overflow: visible !important; }
.order-refs-content { display: grid; gap: 6px; align-content: center; justify-items: center; }
.order-ref-block { display: grid; grid-template-columns: 26px minmax(70px, 1fr); gap: 4px; align-items: center; width: 100%; }
.order-ref-label { color: #64748b; font-family: inherit; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.order-reference-stack { display: block; min-width: 0; width: 100%; }
.order-reference-stack .product-id-tools { display: grid; grid-template-columns: 1fr 24px 24px 1fr; gap: 4px; align-items: center; justify-items: center; width: 100%; }
.order-reference-stack .product-id-code { grid-column: 1 / -1; max-width: 100%; overflow: visible; text-overflow: clip; white-space: nowrap; text-align: center; }
.order-reference-stack .copy-id-btn { grid-column: 2; width: 24px; min-width: 24px; padding: 0; }
.order-reference-stack .product-id-everything { grid-column: 3; width: 24px; height: 22px; overflow: hidden; padding: 0; display: inline-grid; place-items: center; border-radius: 4px; font-size: 0; }
.order-reference-stack .product-id-everything::before { content: "E"; font-size: 10px; font-weight: 900; }
.everything-file-link, .product-search-everything { justify-self: start; font-size: 11px; padding: 3px 7px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; text-decoration: none; white-space: nowrap; }
.line-file-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; align-items: center; }
.copy-id-btn { border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 4px; min-width: 24px; height: 22px; padding: 0 5px; cursor: pointer; font-weight: 800; line-height: 1; }
.copy-id-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: #eff6ff; }
.copy-id-btn.copied { background: #dcfce7; border-color: #86efac; color: #166534; }
.product-line-cell { min-width: 0; max-width: none; background: inherit; }
.product-line-cell a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Los nombres del Localizador se muestran completos, también junto a una foto. */
.locator-table .product-line-cell { white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
.locator-table .product-line-cell .product-line-link { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; }
.product-line-cell small { display: block; color: var(--muted); margin-top: 3px; }
.line-variant-switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; margin-top: 5px; align-items: center; }
.line-variant-switch select { min-width: 0; padding: 5px 22px 5px 6px; border-radius: 6px; font-size: 11px; }
.line-variant-switch .btn { white-space: nowrap; }
.order-lines-table tr.order-line-scale-15 .product-line-cell, .locator-table tr.order-line-scale-15 .product-line-cell { background: #dff3ff; }
.order-lines-table tr.order-line-scale-28 .product-line-cell, .locator-table tr.order-line-scale-28 .product-line-cell { background: #dcfce7; }
.order-lines-table tr.order-line-scale-32 .product-line-cell, .locator-table tr.order-line-scale-32 .product-line-cell { background: #fef9c3; }
.order-lines-table tr.order-line-scale-32-special .product-line-cell, .locator-table tr.order-line-scale-32-special .product-line-cell { background: #ffedd5; }
.order-lines-table tr.order-line-round-base .product-line-cell, .locator-table tr.order-line-round-base .product-line-cell { background: #fce7f3; }
.line-edit-field { border-radius: 4px; padding: 5px 6px; font-size: 12px; background: #fff; min-width: 0; }
.line-edit-field:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
.line-file-input { min-width: 0; }
.line-notes-input { min-width: 0; min-height: 38px; resize: vertical; }
.order-qty-cell, .order-money-cell { text-align: center; }
.order-qty-cell, .order-money-cell, .stock-empty, .stock-ok { padding-left: 4px !important; padding-right: 4px !important; }
.order-qty-cell strong, .order-money-cell strong { display: block; font-weight: 900; }
.order-qty-cell small, .order-money-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.order-ficha-cell { overflow: visible !important; }
.order-ficha-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; justify-items: center; align-items: center; text-align: center; min-width: 0; }
.order-ficha-cell img { width: 40px; height: 48px; object-fit: contain; border-radius: 3px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease; transform-origin: center; }
.order-ficha-cell img:hover { box-shadow: 0 0 0 2px #bfdbfe; }
.order-ficha-cell span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 11px; }
.line-image-cell { width: 48px; text-align: center; }
.line-image-cell img { width: 34px; height: 42px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease; transform-origin: center; }
.line-image-cell img:hover { transform: scale(13.6); box-shadow: 0 12px 34px rgba(15, 23, 42, .35); position: relative; z-index: 20; }
.support-ready { background: #bbf7d0; white-space: nowrap; font-weight: 800; text-align: center; }
.support-probable { background: #fed7aa; color: #9a3412; font-weight: 800; white-space: nowrap; text-align: center; }
.support-missing { background: #fecaca; color: #7f1d1d; font-weight: 800; white-space: nowrap; text-align: center; }
.stock-empty { background: #fee2e2; color: #7f1d1d; font-family: Consolas, monospace; font-size: 10px; font-weight: 800; white-space: nowrap; text-align: center; }
.stock-ok { background: #dcfce7; color: #166534; font-size: 10px; font-weight: 800; white-space: nowrap; text-align: center; }
.order-lines-table tr.order-line-magnet .product-line-cell, .locator-table tr.order-line-magnet .product-line-cell { background: #111827; color: #fff; }
.order-lines-table tr.order-line-magnet .product-line-cell a, .order-lines-table tr.order-line-magnet .product-line-cell small, .locator-table tr.order-line-magnet .product-line-cell a, .locator-table tr.order-line-magnet .product-line-cell small { color: #dbeafe; }
.order-lines-table tr.order-line-magnet .product-line-cell select, .locator-table tr.order-line-magnet .product-line-cell select { background: #1f2937; border-color: #64748b; color: #fff; }
.order-lines-table tr.order-line-magnet .product-line-cell .btn-light, .locator-table tr.order-line-magnet .product-line-cell .btn-light { background: #e5e7eb; color: #111827; }
.checkbox-line { display: flex; grid-template-columns: none; grid-auto-flow: column; align-items: center; justify-content: start; gap: 8px; }
.checkbox-line input { width: auto; }
.prestashop-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 430px); gap: 18px; align-items: center; background: #eef6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 22px; }
.prestashop-hero h2 { margin: 10px 0 8px; font-size: 28px; }
.prestashop-hero p { margin: 0; color: #334155; line-height: 1.45; max-width: 760px; }
.prestashop-hero-actions { display: grid; gap: 10px; }
.import-progress { background: #fff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px; }
.import-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.import-progress-top span { color: var(--primary-dark); font-weight: 800; }
.progress-bar { height: 12px; overflow: hidden; background: #dbeafe; border-radius: 999px; }
.progress-bar span { display: block; width: 0; height: 100%; background: var(--primary); border-radius: inherit; transition: width .2s ease; }
.import-progress p { margin: 8px 0 0; }
.import-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.import-steps div { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.import-steps strong { width: 30px; height: 30px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary); color: #fff; flex: 0 0 auto; }
.import-steps span { color: #334155; line-height: 1.35; }
.prestashop-main-form { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.prestashop-details summary { cursor: pointer; font-weight: 800; }
code { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 5px; font-family: Consolas, monospace; font-size: 12px; }
.ficha-card { background: #eef3f8; border: 1px solid #b8c7d8; border-radius: 6px; padding: 10px; margin-bottom: 10px; box-shadow: inset 0 1px 0 #fff; }
.ficha-topline { display: grid; grid-template-columns: 180px 1fr 110px; gap: 8px; margin-bottom: 8px; align-items: end; }
.ficha-actions { margin: 0 0 8px; }
.ficha-summary { display: grid; grid-template-columns: 170px minmax(0, .9fr) 145px; gap: 8px; align-items: stretch; }
.ficha-media { width: 170px; display: grid; gap: 7px; align-content: start; }
.ficha-image { border: 1px solid #9fb1c3; background: #fff; border-radius: 4px; width: 170px; min-height: 170px; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; position: relative; z-index: 1; }
.ficha-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ficha-image-stock { border: 1px solid #9fb1c3; background: #fff; border-radius: 4px; padding: 7px; display: grid; gap: 6px; }
.ficha-stock-total { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 6px; align-items: center; }
.ficha-stock-total span { color: #475569; font-size: 10px; line-height: 1.1; text-transform: uppercase; font-weight: 800; }
.ficha-stock-total strong { min-height: 34px; display: grid; place-items: center; border-radius: 4px; font-size: 20px; line-height: 1; font-weight: 900; }
.ficha-stock-total strong.is-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.ficha-stock-total strong.is-empty { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.ficha-stock-lines { display: grid; gap: 4px; max-height: 112px; overflow: auto; }
.ficha-stock-line { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 5px; align-items: center; }
.ficha-stock-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; font-size: 10px; font-weight: 800; }
.ficha-stock-line strong { min-height: 25px; display: grid; place-items: center; border: 1px solid #cbd5e1; border-radius: 4px; background: #f8fafc; padding: 3px 5px; font-size: 12px; font-weight: 900; }
.ficha-stock-line input { width: 52px; min-width: 0; text-align: center; }
.ficha-stock-missing { color: #64748b; font-size: 11px; font-weight: 700; line-height: 1.25; }
.ficha-zoomable { cursor: zoom-in; background: #fff; border-radius: 4px; }
.image-hover-preview { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 4500; pointer-events: none; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .96); box-shadow: 0 24px 70px rgba(15, 23, 42, .38); }
.image-hover-preview img { display: block; max-width: min(28vw, 370px); max-height: 54vh; object-fit: contain; border-radius: 7px; }
.image-zoom-overlay { position: fixed; inset: 0; z-index: 5000; background: rgba(15, 23, 42, .78); display: grid; place-items: center; padding: 12px; cursor: zoom-out; }
.image-zoom-overlay img { max-width: 66vw; max-height: 66vh; object-fit: contain; background: #fff; border-radius: 8px; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); cursor: zoom-out; }
.ficha-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-content: start; }
.ficha-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ficha-prices { display: grid; gap: 6px; align-content: start; }
.ficha-field { display: grid; gap: 2px; min-width: 0; }
.ficha-field span { color: #475569; font-size: 11px; text-transform: uppercase; font-weight: 700; }
.ficha-field strong { min-height: 28px; background: #fff; border: 1px solid #b8c7d8; border-radius: 4px; padding: 6px 7px; font-size: 13px; line-height: 1.25; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ficha-editor-form { display: block; }
.ficha-editor-form.editing .ficha-card,
.ficha-editor-form.editing .ficha-tabs,
.ficha-editor-form.editing .ficha-panel { background: #fff1f2; border-color: #fca5a5; }
.ficha-editor-form.editing .ficha-tab-labels label { background: #fee2e2; border-color: #fca5a5; }
.ficha-editor-form.editing #tab-general:checked ~ .ficha-tab-labels label[for="tab-general"],
.ficha-editor-form.editing #tab-precios:checked ~ .ficha-tab-labels label[for="tab-precios"],
.ficha-editor-form.editing #tab-descripciones:checked ~ .ficha-tab-labels label[for="tab-descripciones"],
.ficha-editor-form.editing #tab-catalogo:checked ~ .ficha-tab-labels label[for="tab-catalogo"],
.ficha-editor-form.editing #tab-stock:checked ~ .ficha-tab-labels label[for="tab-stock"],
.ficha-editor-form.editing #tab-atributos:checked ~ .ficha-tab-labels label[for="tab-atributos"] { background: #fff7f7; color: #7f1d1d; }
.ficha-editable input, .ficha-editable select, .ficha-editable textarea, .ficha-check { display: none; }
.ficha-editor-form.editing .ficha-editable strong { display: none; }
.ficha-editor-form.editing .ficha-editable input,
.ficha-editor-form.editing .ficha-editable select,
.ficha-editor-form.editing .ficha-editable textarea,
.ficha-editor-form.editing .ficha-check { display: block; }
.ficha-editor-form.editing .ficha-editable input,
.ficha-editor-form.editing .ficha-editable select,
.ficha-editor-form.editing .ficha-editable textarea { min-height: 28px; border-radius: 4px; padding: 6px 7px; font-size: 13px; }
.ficha-editor-form.editing .ficha-editable textarea { min-height: 82px; resize: vertical; }
.ficha-editor-form.editing .ficha-check { background: #fff; border: 1px solid #b8c7d8; border-radius: 4px; padding: 6px 7px; font-size: 13px; }
.ficha-editor-form.editing .ficha-check input { display: inline-block; width: auto; margin-right: 6px; }
.ficha-attribute-editor { display: none; }
.ficha-editor-form.editing .ficha-attribute-readonly { display: none; }
.ficha-editor-form.editing .ficha-attribute-editor { display: grid; }
.ficha-link { color: var(--primary); text-decoration: underline; overflow-wrap: anywhere; }
.ficha-field.wide { grid-column: 1 / -1; }
.ficha-title .ficha-field strong { font-size: 15px; }
.ficha-tabs { background: #dfe8f2; border: 1px solid #b8c7d8; border-radius: 6px; padding: 8px; }
.ficha-tabs > input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.ficha-tab-labels { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-end; border-bottom: 1px solid #9fb1c3; margin-bottom: 8px; }
.ficha-tab-labels label { display: inline-flex; width: auto; padding: 7px 10px; border: 1px solid #9fb1c3; border-bottom: 0; border-radius: 5px 5px 0 0; background: #eef3f8; color: #334155; font-size: 13px; cursor: pointer; font-weight: 700; }
.ficha-panel { display: none; background: #f8fafc; border: 1px solid #b8c7d8; border-radius: 4px; padding: 10px; max-height: 360px; overflow: auto; }
#tab-general:checked ~ .ficha-tab-labels label[for="tab-general"],
#tab-precios:checked ~ .ficha-tab-labels label[for="tab-precios"],
#tab-descripciones:checked ~ .ficha-tab-labels label[for="tab-descripciones"],
#tab-catalogo:checked ~ .ficha-tab-labels label[for="tab-catalogo"],
#tab-stock:checked ~ .ficha-tab-labels label[for="tab-stock"],
#tab-atributos:checked ~ .ficha-tab-labels label[for="tab-atributos"] { background: #fff; color: #0f172a; position: relative; top: 1px; }
#tab-general:checked ~ .panel-general,
#tab-precios:checked ~ .panel-precios,
#tab-descripciones:checked ~ .panel-descripciones,
#tab-catalogo:checked ~ .panel-catalogo,
#tab-stock:checked ~ .panel-stock,
#tab-atributos:checked ~ .panel-atributos { display: block; }
.ficha-table { border-radius: 4px; margin-bottom: 8px; }
.ficha-table th, .ficha-table td { padding: 7px 8px; font-size: 13px; }
.variant-lock-editor { display: none; align-items: center; gap: 6px; white-space: nowrap; }
.variant-lock-editor input[type="checkbox"] { width: auto; }
.ficha-editor-form.editing .variant-lock-display { display: none; }
.ficha-editor-form.editing .variant-lock-editor { display: inline-flex; }
.ficha-attributes { max-width: none; margin-top: 8px; }
.ficha-attributes .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ficha-attributes input { padding: 7px 8px; border-radius: 4px; }
.sales-calendar { margin-top: 10px; background: #dfe8f2; border: 1px solid #b8c7d8; border-radius: 6px; padding: 8px; }
.sales-calendar h2 { margin: 0 0 8px; font-size: 15px; }
.sales-calendar table { min-width: 980px; }
.sales-calendar th, .sales-calendar td { text-align: center; padding: 6px 7px; }
.sales-calendar th:first-child { text-align: left; width: 110px; }
.sales-month-cell { position: relative; min-width: 62px; }
.sales-month-cell details { position: relative; }
.sales-month-cell summary { list-style: none; cursor: pointer; display: block; min-width: 42px; padding: 5px 7px; border: 1px solid #b8c7d8; border-radius: 4px; background: #fff; font-weight: 700; }
.sales-month-cell summary::-webkit-details-marker { display: none; }
.sales-month-cell details[open] summary { background: #dbeafe; border-color: var(--primary); color: var(--primary-dark); }
.sales-popover { position: fixed; z-index: 1200; left: 16px; top: 16px; width: min(720px, calc(100vw - 32px)); max-height: min(420px, calc(100vh - 32px)); overflow: auto; background: #fff; border: 1px solid #94a3b8; border-radius: 6px; box-shadow: 0 18px 45px rgba(15, 23, 42, .28); padding: 8px; text-align: left; }
.sales-detail table { min-width: 620px; }
.sales-detail th, .sales-detail td { text-align: left; padding: 6px 7px; font-size: 12px; }
.sales-empty { color: var(--muted); padding: 8px; white-space: nowrap; }
.sales-total { font-weight: 800; background: #eef3f8; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #f8fafc, #dbeafe); }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.login-card h1 { margin-top: 0; }
.label-print-sheet { display: grid; gap: 1mm; align-items: start; justify-items: start; }
.label-print-toolbar { position: sticky; top: 74px; z-index: 8; background: rgba(245, 247, 251, .98); border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.quick-print-button { white-space: nowrap; }
.quick-print-ticket { background: #0f766e; }
.quick-print-ticket:hover { background: #115e59; }
.quick-print-label { background: #6d28d9; }
.quick-print-label:hover { background: #5b21b6; }
.quick-print-status { display: block; min-height: 16px; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.quick-print-status.is-ok { color: #166534; }
.quick-print-status.is-error { color: #b91c1c; }
.label-preview-grid { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.label-preview-panel { display: grid; gap: 8px; min-width: 0; width: max-content; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #eef2f7; }
.label-preview-panel.is-print-target { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.label-preview-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.label-preview-title h2 { margin: 0; font-size: 15px; }
.label-stock-append { margin-bottom: 14px; border-color: #93c5fd; background: linear-gradient(135deg, #ffffff, #eff6ff); }
.label-stock-append-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.label-stock-append-head h2 { margin: 2px 0 4px; font-size: 19px; }
.label-stock-append-head p { max-width: 760px; margin: 0; color: var(--muted); }
.label-stock-kicker { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.label-stock-total { flex: 0 0 auto; min-width: 92px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--primary-dark); text-align: center; }
.label-stock-total strong { display: block; font-size: 24px; line-height: 1; }
.label-stock-total span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.label-stock-append-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 8px; }
.label-stock-append-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.label-stock-product { display: grid; min-width: 0; gap: 2px; }
.label-stock-product strong { color: var(--primary-dark); }
.label-stock-product span { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.label-stock-product small { color: var(--muted); }
.label-stock-stepper { display: grid; grid-template-columns: 38px 58px 38px; flex: 0 0 auto; align-items: stretch; }
.label-stock-stepper .btn { min-height: 38px; border-radius: 0; padding: 5px; font-size: 18px; }
.label-stock-stepper .btn:first-child { border-radius: 7px 0 0 7px; }
.label-stock-stepper .btn:last-child { border-radius: 0 7px 7px 0; }
.label-stock-stepper input { width: 58px; min-width: 0; border: 1px solid #b8c7d8; border-left: 0; border-right: 0; border-radius: 0; padding: 5px; font-size: 16px; font-weight: 900; text-align: center; }
.label-stock-stepper input::-webkit-inner-spin-button, .label-stock-stepper input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.label-stock-append-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.label-stock-append-footer p { margin: 0; }
.label-stock-append-footer .btn { flex: 0 0 auto; min-width: 240px; }
.label-line-selector { margin-bottom: 14px; }
.label-line-selector-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.label-line-selector-head.compact { margin: 12px 0 6px; }
.label-line-selector h2 { margin: 0; }
.label-line-selector h3 { margin: 0; font-size: 15px; }
.label-custom-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.label-custom-form label { margin: 0; }
.label-custom-note-list { margin-bottom: 12px; }
.label-line-selector table { min-width: 760px; }
.label-line-selector th, .label-line-selector td { padding: 7px 8px; font-size: 12px; }
.ticket-qty-input { width: 76px; padding: 6px 8px; border-radius: 6px; text-align: center; font-weight: 800; }
.ticket-quantity-action-row td { background: #f8fafc; border-top: 1px solid var(--line); vertical-align: middle; }
.ticket-quantity-action-row td:last-child { text-align: center; }
.label-quantity-auto-status { display: none; }
html.label-quantity-autosave .label-quantity-manual-status,
html.label-quantity-autosave [data-label-quantity-save] { display: none; }
html.label-quantity-autosave .label-quantity-auto-status { display: inline; }
.label-selector-error { color: #991b1b; font-weight: 800; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.form-grid .wide { grid-column: 1 / -1; }
.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.bar-cell { position: relative; min-width: 120px; height: 24px; display: flex; align-items: center; padding: 0 8px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.bar-cell span { position: absolute; inset: 0 auto 0 0; background: #bfdbfe; }
.bar-cell strong { position: relative; z-index: 1; }
.print-label { background: #fff; color: #000; page-break-inside: avoid; break-inside: avoid; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.print-label-small { width: 57mm; min-height: 0; padding: 0 1.5mm; }
.print-label-small::after { content: "."; display: block; padding-top: 18mm; font-size: 3mm; line-height: 3mm; color: #000; text-align: left; }
.print-label-large { width: 100mm; height: 150mm; padding: 3mm 4mm; border: 1px dashed #64748b; }
.label-logo-row { position: relative; display: grid; place-items: center; height: 34mm; margin: 0; border-bottom: 1px solid #d9d9d9; }
.label-logo-row img { max-width: 44mm; max-height: 29mm; display: block; }
.label-incidence-mark { position: absolute; right: 3mm; top: 3mm; display: grid; place-items: center; width: 10mm; height: 10mm; border: .6mm solid #000; color: #000; font-size: 8mm; line-height: 1; font-weight: 900; }
.label-qr-row { display: grid; grid-template-columns: 18mm 1fr; min-height: 18mm; align-items: stretch; border-bottom: 1px solid #d9d9d9; }
.label-qr { width: 17mm; height: 17mm; object-fit: contain; align-self: center; justify-self: start; image-rendering: pixelated; }
.label-order-number { background: #fff; color: #000; border: .35mm solid #000; display: grid; place-items: center; font-size: 5.2mm; font-weight: 900; line-height: 1; overflow-wrap: anywhere; text-align: center; padding: .7mm; }
.print-label-small .label-order-number { font-size: 10.4mm; line-height: 1.2; }
.label-order-number-blank { background: #fff; color: #000; border: .35mm solid #000; }
.label-reference-table { border-bottom: 1px solid #d9d9d9; margin-top: 0; }
.label-reference-row { display: grid; grid-template-columns: 16mm minmax(0, 1fr) 9mm; min-height: 8mm; border-bottom: 1px solid #e5e5e5; align-items: stretch; }
.label-reference-row:last-child { border-bottom: 0; }
.label-reference-row span { display: flex; align-items: center; padding: .9mm 1mm; font-size: 3.25mm; line-height: 1.12; font-weight: 800; overflow-wrap: anywhere; }
.label-reference-code { font-family: Consolas, monospace; border-right: 1px solid #d9d9d9; flex-direction: column; align-items: flex-start !important; justify-content: center; }
.label-reference-main, .label-reference-suffix { display: block; font: inherit; line-height: 1; }
.label-reference-magnets { display: block; margin-top: .35mm; font-family: Arial, sans-serif; font-size: 2.35mm; line-height: 1.05; font-weight: 900; }
.label-reference-description { border-right: 1px solid #d9d9d9; }
.print-label-small .label-reference-description { font-size: 2.8mm; line-height: 1.1; }
.label-reference-qty { justify-content: center; font-size: 5mm !important; font-weight: 500 !important; white-space: nowrap; }
.label-reference-qty.is-multiple { background-color: #000000; color: #ffffff; font-weight: 900 !important; }
.label-stock-reference-table .label-reference-row { grid-template-columns: 16mm minmax(0, 1fr) 12mm 11mm; }
.label-stock-reference-table .label-reference-head { min-height: 6mm; background: #f3f4f6; }
.label-stock-reference-table .label-reference-head span { font-size: 2.15mm; line-height: 1.05; font-weight: 900 !important; text-align: center; justify-content: center; }
.label-stock-reference-table .label-reference-row span { font-size: 2.65mm; padding: .65mm .7mm; }
.label-reference-stock { display: flex; align-items: center; justify-content: center; border-right: 0; font-size: 4.2mm !important; font-weight: 900 !important; white-space: nowrap; }
.label-custom-controls { display: flex; gap: 6px; align-items: center; padding: 8px; margin: 0 0 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.label-custom-controls input { min-width: 0; padding: 6px 8px; border-radius: 6px; font-size: 12px; }
.label-notes { border-bottom: 1px solid #d9d9d9; padding: 1.2mm 1mm; font-size: 3.25mm; line-height: 1.18; font-weight: 900; }
.label-notes:empty { display: none; }
.label-notes p { margin: 0 0 .8mm; display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.label-notes span { min-width: 0; overflow-wrap: anywhere; }
.label-notes p:last-child { margin-bottom: 0; }
.label-note-remove { border: 1px solid #d9d9d9; background: #fff; color: #111827; width: 18px; height: 18px; border-radius: 4px; cursor: pointer; line-height: 1; font-weight: 900; display: inline-grid; place-items: center; flex: 0 0 auto; }
.label-note-remove:hover { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.label-legal { margin-top: 2mm; display: grid; gap: .7mm; font-size: 3mm; line-height: 1.25; font-weight: 700; }
.print-label-small .label-legal { font-size: 2.65mm; }
.label-legal p { margin: 0; padding: .35mm 1mm; }
.label-legal-warning { background: #e2f0d9; }
.label-legal-gap { height: 1.5mm; }
.label-stock-check { margin-top: 3mm; padding: 2mm 1mm; font-size: 6mm; line-height: 1.05; font-weight: 900; text-align: center; border-top: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; }
.label-ticket-spacer { display: none; }
.print-label-large .label-logo-row { height: 22mm; }
.print-label-large .label-logo-row img { max-width: 45mm; max-height: 20mm; }
.print-label-large .label-qr-row { grid-template-columns: 16mm 1fr; min-height: 16mm; }
.print-label-large .label-qr { width: 15mm; height: 15mm; }
.print-label-large .label-order-number { font-size: 6.2mm; }
.print-label-large .label-reference-table { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #e5e5e5; }
.print-label-large .label-reference-row { grid-template-columns: 18mm minmax(0, 1fr) 8mm; min-height: 6.8mm; border-right: 1px solid #e5e5e5; }
.print-label-large .label-reference-row span { font-size: 2.45mm; padding: .55mm .7mm; }
.print-label-large .label-reference-qty { font-size: 4mm !important; }
.print-label-large .label-notes { font-size: 2.65mm; padding: .9mm .8mm; }
.print-label-large .label-legal { font-size: 2.5mm; margin-top: 1mm; gap: .35mm; }
.print-label-large .label-legal p { padding: .15mm .8mm; }
.print-label-large .label-ticket-spacer { display: none; }
.qr-box { border: 2px solid #111827; padding: 10px; font-family: monospace; white-space: pre-line; margin-top: 8px; }
@media (max-width: 900px) {
    .sidebar { position: static; width: 100%; }
    .app-shell { display: block; }
    .main { margin-left: 0; }
    .topbar { position: static; flex-direction: column; align-items: flex-start; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid { grid-template-columns: 1fr; }
    .prestashop-hero, .import-steps { grid-template-columns: 1fr; }
    .ficha-topline, .ficha-summary, .ficha-grid, .ficha-grid.compact, .ficha-attributes .form-grid { grid-template-columns: 1fr; }
    .ficha-panel { max-height: none; }
    .sales-popover { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
    .workflow-board, .locator-head { grid-template-columns: 1fr; }
    .locator-search-main, .locator-filter-grid, .locator-bulk-fields { grid-template-columns: 1fr; }
    .pick-report-grid, .pick-scan-row { grid-template-columns: 1fr; }
    .sticky-actions { position: static; }
    .order-sticky-actions, .order-bulk-actions, .label-print-toolbar { position: static; }
    .order-actions-spacer { display: none; }
    .label-stock-append-head, .label-stock-append-footer { align-items: stretch; flex-direction: column; }
    .label-stock-total { align-self: flex-start; min-width: 110px; }
    .label-stock-append-list { grid-template-columns: 1fr; }
    .label-stock-append-footer .btn { width: 100%; min-width: 0; }
}
@media print {
    .sidebar, .topbar, .toolbar, .no-print, .toast-stack, .content > .alert { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; }
    body { background: #fff; }
    @page { margin: 0; }
    .label-print-sheet { display: block; }
    .label-preview-grid { display: block; }
    .label-preview-panel { display: none !important; width: auto; max-width: none; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .label-preview-panel.is-print-target { display: block !important; }
    .print-label { border: 0; margin: 0 0 1mm; }
    .print-label .label-reference-qty.is-multiple {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background-color: #000000 !important;
        color: #ffffff !important;
    }
    .print-label .pick-ticket-result {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background-color: #000000 !important;
        color: #ffffff !important;
    }
    .print-label-small { width: 57mm; min-height: 0; height: auto; padding-bottom: 0; page-break-after: auto; break-after: auto; }
    .print-label-large { width: 100mm; height: 150mm; page-break-after: always; break-after: page; }
    .print-label-large:last-child { page-break-after: auto; break-after: auto; }
}

/* Control de entregas y SLA */
.delivery-menu { margin-bottom: 20px; }
.delivery-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 4px solid var(--primary); }
.delivery-hero h2 { margin: 8px 0 4px; }
.delivery-hero p { margin: 0; color: var(--muted); }
.delivery-rate { min-width: 130px; text-align: center; }
.delivery-rate strong { display: block; font-size: 34px; color: var(--primary); }
.delivery-rate span { color: var(--muted); }
.delivery-kpis { margin: 16px 0; }
.delivery-kpis .kpi small { color: var(--muted); }
.delivery-filters { align-items: end; }
.delivery-table small, .table-wrap td small { display: block; margin-top: 4px; color: var(--muted); }
.delivery-table tr.delivery-near td { background: #fffbeb; }
.delivery-table tr.delivery-overdue td { background: #fff1f2; }
.delivery-warning { color: #b45309 !important; font-weight: 700; }
.delivery-error { color: #b91c1c !important; }
.delivery-detail-grid, .delivery-detail-panels, .delivery-report-grid, .delivery-config-grid { margin-bottom: 16px; }
.delivery-detail-grid h2 { margin: 8px 0 4px; overflow-wrap: anywhere; }
.delivery-definition-list, .delivery-detail-list { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.5fr); gap: 9px 16px; margin: 0; }
.delivery-definition-list dt, .delivery-detail-list dt { color: var(--muted); font-weight: 700; }
.delivery-definition-list dd, .delivery-detail-list dd { margin: 0; overflow-wrap: anywhere; }
.delivery-timeline { position: relative; padding-left: 28px; }
.delivery-timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.delivery-timeline article { position: relative; padding: 0 0 22px 12px; }
.delivery-timeline article:last-child { padding-bottom: 0; }
.delivery-timeline-dot { position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--panel); }
.delivery-timeline header { display: flex; justify-content: space-between; gap: 12px; }
.delivery-timeline time, .delivery-timeline small { color: var(--muted); }
.delivery-timeline p { margin: 5px 0; }
.delivery-timeline pre { max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px; }
.delivery-weekdays { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 18px; }
.delivery-provider-form fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.delivery-provider-form h2:not(:first-child) { margin-top: 24px; }
.delivery-config-grid table { width: 100%; }

@media (max-width: 900px) {
    .delivery-hero { align-items: flex-start; flex-direction: column; }
    .delivery-definition-list, .delivery-detail-list { grid-template-columns: 1fr; gap: 4px; }
    .delivery-definition-list dd, .delivery-detail-list dd { margin-bottom: 8px; }
    .delivery-timeline header { flex-direction: column; gap: 4px; }
}

@media print {
    .pick-customer-ticket { width: 57mm; min-height: 0; border: 0; margin: 0; padding: 0 1.5mm; }
}
