:root {
  --ink: #182230;
  --muted: #687486;
  --line: #dfe5eb;
  --soft: #f4f7f9;
  --navy: #0b2f4f;
  --blue: #1269a8;
  --orange: #f59a23;
  --green: #167554;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf2f5;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.topbar { height: 72px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: var(--navy); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: #b9cad8; }
.version { padding: 7px 11px; border: 1px solid #51718b; border-radius: 999px; font-size: 12px; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 34px 24px 60px; }
.hero { display: grid; grid-template-columns: 1.5fr 0.8fr; gap: 24px; align-items: stretch; margin-bottom: 24px; }
.hero > div { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.hero h1 { margin: 5px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -0.04em; }
.lead { max-width: 740px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.eyebrow { margin: 0; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.hero-spec { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, #0b2f4f, #164e78) !important; color: white; }
.hero-spec span { color: #b9d1e1; font-size: 13px; }
.hero-spec strong { margin: 10px 0 8px; font-size: 27px; }
.hero-spec small { color: #d3e2ec; line-height: 1.5; }
.summary-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; margin: 22px 0; }
.summary-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.summary-card span, .summary-card small { display: block; color: var(--muted); }
.summary-card strong { display: block; margin: 8px 0 6px; color: var(--navy); font-size: 29px; }
.total-card { border-color: #f0c27f; background: #fff9ef; }
.total-card strong { color: #9b5500; }
.notice { display: flex; align-items: flex-start; gap: 14px; margin: 20px 0; padding: 18px 20px; border-radius: 14px; }
.notice p { margin: 4px 0 0; }
.notice-ok { color: #0f5d42; background: #e8f6f0; border: 1px solid #b8e4d2; }
.notice-info { color: #225675; background: #e9f3f9; border: 1px solid #c4deed; }
.notice-error { color: #8a2c27; background: #fff0ee; border: 1px solid #efc1bd; }
.notice-saved { color: #5f4b05; background: #fff8dc; border: 1px solid #ead690; }
.notice-error ul { margin: 7px 0 0; }
.check { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-weight: 900; }
.save-icon { color: #d69000; font-size: 22px; line-height: 1; }
.panel { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.panel-heading { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 5px 0 0; font-size: 22px; }
.panel-heading p.muted { margin: 8px 0 0; }
.panel-total { color: var(--navy); font-size: 22px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 13px 17px; color: #576577; background: var(--soft); font-size: 12px; text-align: left; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 14px 17px; border-top: 1px solid #edf0f2; vertical-align: top; }
tbody tr:hover { background: #fbfcfd; }
.number { text-align: right; white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); }
.price-editor { padding-bottom: 24px; }
.price-editor form { padding: 0 24px; }
fieldset { margin: 22px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 13px; color: var(--navy); font-weight: 800; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.price-grid label { display: block; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.price-grid label > span { display: block; min-height: 38px; font-size: 13px; font-weight: 700; }
.input-wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; margin-top: 7px; }
.input-wrap b { color: var(--green); }
.input-wrap input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #cbd4dc; border-radius: 7px; background: white; font: inherit; }
.input-wrap small { grid-column: 2; color: var(--muted); }
button { margin-top: 22px; padding: 12px 20px; border: 0; border-radius: 9px; color: white; background: var(--blue); font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: #0b568c; }
button:disabled, input:disabled, select:disabled, textarea:disabled,
[aria-disabled="true"], .is-disabled {
  color: #9aa7b2 !important;
  border-color: #dde3e8 !important;
  background: #f2f4f6 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}
button:disabled:hover, [aria-disabled="true"]:hover, .is-disabled:hover { color: #9aa7b2 !important; background: #f2f4f6 !important; }
option:disabled { color: #a8b2bb; background: #f4f6f7; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary-button { color: var(--navy); background: #e7edf2; }
.secondary-button:hover { background: #d7e1e9; }
footer { display: flex; gap: 12px; justify-content: center; margin-top: 28px; color: var(--muted); font-size: 13px; }

/* Piloto 07: editor visual directo */
.wide-shell { max-width: 1500px; }
.builder-hero { grid-template-columns: 1.6fr 0.7fr; }
.reference-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0; padding: 15px 18px; border: 1px solid #b8e4d2; border-radius: 14px; background: #e8f6f0; color: #0f5d42; }
.reference-strip > div { display: flex; align-items: center; gap: 12px; }
.reference-strip strong, .reference-strip small { display: block; }
.reference-strip small { margin-top: 3px; color: #477564; }
.text-button { margin: 0; padding: 8px 12px; color: #0f5d42; border: 1px solid #9bcfb9; background: transparent; white-space: nowrap; }
.text-button:hover { color: white; background: #167554; }
.builder-grid { display: grid; grid-template-columns: minmax(360px, 0.78fr) minmax(500px, 1.35fr); gap: 20px; align-items: start; }
.builder-grid .panel { margin-top: 0; }
.no-overflow { overflow: visible; }
.compact-heading { padding: 18px 20px; }
.compact-heading h2 { font-size: 20px; }
.controls-body { padding: 20px; }
.dimension-fieldset { margin: 0; }
.dimension-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.dimension-grid label { font-size: 12px; font-weight: 800; }
.dimension-grid label > span { display: block; margin-bottom: 6px; color: #536273; }
.unit-input { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid #cbd4dc; border-radius: 8px; background: white; }
.unit-input input { width: 100%; min-width: 0; padding: 10px; border: 0; outline: 0; font: inherit; }
.unit-input b { padding: 0 9px; color: var(--muted); font-size: 11px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
button.small-button { margin: 0; padding: 9px 11px; font-size: 12px; }
.subtle-button { color: var(--navy); background: #e7edf2; }
.subtle-button:hover { background: #d6e1e9; }
.technical-details { margin: 0 0 18px; padding: 11px 12px; border: 1px solid #dce4ea; border-radius: 9px; background: #f8fafb; }
.technical-details summary { color: var(--navy); cursor: pointer; font-size: 12px; font-weight: 800; }
.technical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.technical-grid .span-all { grid-column: 1 / -1; }
.section-block { padding-top: 18px; border-top: 1px solid var(--line); }
.section-block + .section-block { margin-top: 18px; }
.subheading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.subheading h3 { margin: 0; color: var(--navy); font-size: 15px; }
.subheading small { color: var(--muted); text-align: right; }
.section-tree { display: grid; gap: 5px; }
.tree-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.tree-button { width: 100%; margin: 0; padding: 9px 10px; border: 1px solid #d8e0e7; border-radius: 8px; color: var(--ink); background: #f8fafb; text-align: left; font-size: 12px; font-weight: 700; }
.tree-button:hover { color: var(--navy); background: #edf3f7; }
.tree-button.active { border-color: #f0a443; background: #fff7e9; box-shadow: inset 3px 0 0 var(--orange); }
.tree-button small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }
.selected-editor-block { min-height: 220px; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.editor-grid .span-2 { grid-column: 1 / -1; }
.editor-field { display: block; font-size: 12px; font-weight: 800; }
.editor-field > span { display: block; margin-bottom: 5px; color: #536273; }
.editor-field input, .editor-field select { width: 100%; padding: 9px 10px; border: 1px solid #cbd4dc; border-radius: 7px; background: white; font: inherit; }
.readout-box { min-height: 39px; padding: 10px; border: 1px solid #dce4ea; border-radius: 7px; background: #f3f6f8; color: var(--navy); font-weight: 800; }
.editor-help { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.editor-warning { padding: 11px 12px; color: #755506; border: 1px solid #ead690; border-radius: 8px; background: #fff8dc; font-size: 12px; line-height: 1.45; }
.editor-warning strong { display: block; margin-bottom: 3px; }
.section-width-help { margin: -2px 0 3px; color: #486476; font-size: 11px; line-height: 1.45; }
.editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.editor-actions button { margin: 0; padding: 10px; font-size: 12px; }
.editor-actions .span-2 { grid-column: 1 / -1; }
.danger-button { color: #8a2c27; background: #fff0ee; border: 1px solid #efc1bd; }
.danger-button:hover { color: white; background: #a83b34; }
.child-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.child-links button { margin: 0; padding: 9px; color: var(--navy); background: #eaf1f6; font-size: 12px; }
.drawer-list { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.drawer-row { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 8px; align-items: end; }
.drawer-row strong { align-self: center; color: var(--navy); font-size: 12px; }
.toggle-line { display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 12px; font-weight: 700; }
.toggle-line input { width: auto; }
.full-button { width: 100%; margin-top: 18px; }
.status-chip { padding: 6px 9px; border-radius: 999px; color: #34596f; background: #e8f1f6; font-size: 11px; font-weight: 800; }
.status-chip.ok { color: #0f5d42; background: #dff2e9; }
.status-chip.error { color: #8a2c27; background: #fee8e5; }
.visual-panel { position: sticky; top: 16px; }
.svg-stage { min-height: 520px; padding: 20px; display: grid; place-items: center; background: radial-gradient(circle at 50% 20%, #ffffff, #f1f5f8 68%); }
.cabinet-svg { width: 100%; height: 100%; overflow: visible; touch-action: none; }
.orbit-canvas { width: 100%; height: 100%; cursor: grab; touch-action: none; }
.orbit-canvas.dragging { cursor: grabbing; }
.orbit-canvas[hidden], .cabinet-svg[hidden] { display: none; }
.cabinet-svg text { pointer-events: none; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.svg-cover { fill: #174f78; stroke: #0b2f4f; stroke-width: 1.5; }
.svg-side, .svg-floor { fill: #d9e2e8; stroke: #7f909d; stroke-width: 1.2; }
.svg-zocal { fill: #c7d1d8; stroke: #738491; stroke-width: 1.2; }
.svg-foot { fill: #263747; }
.svg-division { fill: #f5a027; stroke: #b66a08; stroke-width: 1.2; }
.svg-door { fill: rgba(224, 235, 242, 0.92); stroke: #315d78; stroke-width: 1.4; cursor: pointer; }
.svg-drawer { fill: rgba(255, 248, 232, 0.95); stroke: #9d650d; stroke-width: 1.4; cursor: pointer; }
.svg-front:hover { filter: brightness(0.96); stroke-width: 2.4; }
.svg-shelf { stroke: #62859b; stroke-width: 2; stroke-dasharray: 7 5; pointer-events: none; }
.svg-section-hit { fill: transparent; stroke: transparent; cursor: pointer; }
.svg-section-selected { fill: rgba(245, 154, 35, 0.09); stroke: #f59a23; stroke-width: 3; stroke-dasharray: 9 5; pointer-events: none; }
.svg-front-selected { stroke: #d84a22; stroke-width: 4; filter: drop-shadow(0 0 3px rgba(216, 74, 34, 0.4)); }
.svg-label { fill: #29495d; font-size: 14px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.svg-handle-outline, .svg-handle { fill: none; stroke-linecap: round; pointer-events: none; vector-effect: non-scaling-stroke; }
.svg-handle-outline { stroke: #fff; stroke-width: 10; opacity: .96; }
.svg-handle { stroke: #1d3443; stroke-width: 6; filter: drop-shadow(0 1px 1px rgba(24, 43, 55, .34)); }
.svg-hinge { fill: none; stroke: #758995; stroke-width: 4; stroke-linecap: round; pointer-events: none; vector-effect: non-scaling-stroke; }
.svg-measure { fill: #5e7180; font-size: 12px; font-weight: 700; }
.visual-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.visual-legend span { display: flex; align-items: center; gap: 6px; }
.visual-legend i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.legend-division { background: #f5a027; }
.legend-door { background: #dbe8ef; border: 1px solid #315d78; }
.legend-drawer { background: #fff1d8; border: 1px solid #9d650d; }
.legend-selected { border: 2px dashed #f59a23; }
.legend-handle { height: 4px !important; border-radius: 999px !important; background: #1d3443; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #9cabb5; }
.legend-desk-cover { background: #b58b5c; border: 1px solid #765b3c; }
.legend-desk-structure { background: #c7b89b; border: 1px solid #80745f; }
.legend-desk-hardware { height: 5px !important; border-radius: 999px !important; background: #52626b; }
.legend-desk-audit { border: 2px solid #2b8765; background: #e4f4ed; }
.legend-collision { border: 2px solid #d62f2f; background: rgba(224,45,45,.28); }
.svg-desk-part { stroke: rgba(32, 55, 70, .78); stroke-width: 1.35; transition: filter .12s ease, stroke-width .12s ease; }
.svg-desk-part:hover { filter: brightness(1.08); stroke: #eb8c13; stroke-width: 2.4; }
.svg-desk-fastener, .svg-desk-lock { stroke-width: .8; }
.svg-technical-part { fill: rgba(255,255,255,.36); stroke: #263d4c; stroke-width: 1.35; transition: fill .12s ease, stroke .12s ease, stroke-width .12s ease; }
.svg-technical-part:hover { fill: rgba(210,229,241,.58); stroke: #176da6; stroke-width: 2; }
.svg-technical-part.selected { fill: rgba(255,187,77,.34); stroke: #e68100; stroke-width: 2.6; }
.svg-technical-part.draggable { cursor: pointer; }
.svg-technical-apron { fill: rgba(255,247,229,.46); }
.svg-technical-cover { fill: rgba(235,242,247,.42); }
.svg-technical-dimension,.svg-technical-extension { stroke: #e68100; stroke-width: 1.4; fill: none; }
.svg-technical-main-depth { stroke: #7b909f; stroke-width: 1; stroke-dasharray: 7 5; }
.svg-technical-measure,.svg-technical-axis-label { fill: #38566b; font: 700 13px Arial,sans-serif; }
.svg-technical-axis-label { font-size: 12px; }
.svg-technical-drag-handle { fill: #fff; stroke: #e68100; stroke-width: 2; }
.svg-technical-drag-icon { fill: none; stroke: #e68100; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.svg-technical-axis-handle { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.svg-technical-axis-handle.horizontal { cursor: ew-resize; }
.svg-technical-axis-handle.vertical { cursor: ns-resize; }
.svg-technical-axis-visible { fill: none; stroke: #e68100; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.svg-technical-snap-guide { fill: none; stroke: #68a900; stroke-width: 1.5; stroke-dasharray: 7 4; pointer-events: none; }
.svg-technical-snap-label { fill: #527f00; font: 800 11px Arial,sans-serif; paint-order: stroke; stroke: white; stroke-width: 4px; pointer-events: none; }
.svg-technical-part.collision, .svg-desk-part.collision { stroke: #d62f2f; stroke-width: 3; filter: drop-shadow(0 0 2px rgba(214,47,47,.5)); }
.svg-technical-collision { fill: rgba(224,45,45,.28); stroke: #d62f2f; stroke-width: 1.5; stroke-dasharray: 5 3; pointer-events: none; }
.detail-collision { color: #9d1e1e !important; background: #fee8e5 !important; border: 1px solid #efb0ab; }
.svg-technical-coordinate { fill: #8f570d; font: 800 12px Arial,sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.legend-technical-outline { background: rgba(255,255,255,.5); border: 1px solid #263d4c; }
.legend-technical-editable { background: rgba(255,187,77,.34); border: 2px solid #e68100; }
.desk-position-action button { min-height: 34px; width: 100%; }
body.is-dragging-desk-part, body.is-dragging-desk-part * { user-select: none; }
.selection-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px; min-height: 58px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fbfcfd; font-size: 12px; }
.selection-detail strong { color: var(--navy); }
.selection-detail span { color: var(--muted); }
.detail-pill { padding: 5px 8px; border-radius: 999px; background: #edf3f7; color: #35566b !important; }
.calculation-messages:empty { display: none; }
.message-card { margin: 12px 0; padding: 14px 17px; border-radius: 12px; font-size: 13px; }
.message-card strong { display: block; margin-bottom: 5px; }
.message-card ul { margin: 0; padding-left: 20px; }
.message-card.error { color: #8a2c27; border: 1px solid #efc1bd; background: #fff0ee; }
.message-card.warning { color: #755506; border: 1px solid #ead690; background: #fff8dc; }
.message-card.success { color: #0f5d42; border: 1px solid #b8e4d2; background: #e8f6f0; }
.tall-table { max-height: 600px; overflow: auto; }
.tall-table thead { position: sticky; top: 0; z-index: 1; }
.price-editor .panel-heading { cursor: default; }

.compact-topbar { height: 56px; padding: 0 max(24px, calc((100vw - 1500px) / 2 + 24px)); }
.compact-topbar .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.compact-topbar .brand small { font-size: 11px; }
.wide-shell { height: calc(100vh - 66px); display: flex; flex-direction: column; overflow: hidden; padding-top: 16px; padding-bottom: 0; }
.workspace-bar { position: relative; z-index: 20; flex: 0 0 auto; display: grid; grid-template-columns: minmax(210px, 280px) minmax(540px, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #d6e0e7; border-radius: 13px; background: rgba(255, 255, 255, 0.97); box-shadow: 0 5px 18px rgba(20, 50, 73, 0.08); backdrop-filter: blur(8px); }
.builder-lower-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 48px 0; scrollbar-gutter: stable; }
.builder-product-selector { position: relative; display: grid; gap: 3px; min-width: 0; }
.builder-product-selector > span { color: #637182; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.builder-product-selector select { width: 100%; padding: 8px 30px 8px 10px; border: 1px solid #cbd8e1; border-radius: 8px; background: #fff; color: var(--navy); font-weight: 800; }
.builder-product-selector small { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.product-picker-trigger { width: 100%; min-height: 42px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 8px; margin: 0; padding: 4px 8px 4px 4px; border: 1px solid #c4d4df; border-radius: 9px; color: var(--navy); background: #fff; text-align: left; box-shadow: none; }
.product-picker-trigger:hover, .product-picker-trigger:focus-visible, .builder-product-selector.catalog-open .product-picker-trigger { color: var(--navy); border-color: #e98c13; background: #fff; outline: 0; box-shadow: 0 0 0 3px rgba(233, 140, 19, .13); }
.product-picker-trigger-thumb { width: 42px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #f2f6f8; }
.product-picker-trigger-thumb .product-thumbnail-svg { width: 58px; height: 38px; }
.product-picker-trigger-copy { min-width: 0; display: grid; gap: 1px; }
.product-picker-trigger-copy strong, .product-picker-trigger-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-picker-trigger-copy strong { color: var(--navy); font-size: 12px; }
.product-picker-trigger-copy small { color: #758592; font-size: 9px; font-weight: 650; }
.product-picker-chevron { color: #5d7485; font-size: 18px; text-align: center; transition: transform .16s ease; }
.catalog-open .product-picker-chevron { transform: rotate(180deg); }
.product-catalog-popover { position: absolute; z-index: 100; top: calc(100% + 8px); left: -1px; width: min(910px, calc(100vw - 54px)); overflow: hidden; border: 1px solid #bdcfda; border-radius: 14px; background: #fff; box-shadow: 0 22px 55px rgba(13, 43, 64, .24); }
.product-catalog-popover[hidden] { display: none; }
.product-catalog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 16px 11px; border-bottom: 1px solid #e0e8ed; }
.product-catalog-header > div { min-width: 0; display: grid; gap: 3px; }
.product-catalog-header strong { color: var(--navy); font-size: 15px; }
.product-catalog-header small { color: #687b89; font-size: 10px; }
.product-catalog-close { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; margin: -3px -3px 0 0; padding: 0; border: 1px solid #d5e0e7; border-radius: 8px; color: #5d7180; background: #f7f9fa; font-size: 20px; line-height: 1; }
.product-catalog-close:hover { color: white; background: var(--blue); }
.product-catalog-tools { display: grid; grid-template-columns: minmax(210px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; background: #f5f8fa; }
.product-catalog-search { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid #c7d6df; border-radius: 8px; background: white; }
.product-catalog-search > span { color: #4b6e84; font-size: 21px; text-align: center; transform: rotate(-18deg); }
.product-catalog-search input { width: 100%; min-width: 0; padding: 8px 9px 8px 2px; border: 0; outline: 0; color: var(--navy); background: transparent; font-size: 11px; }
.product-catalog-tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; }
.product-catalog-tabs button { margin: 0; padding: 7px 10px; border: 1px solid transparent; border-radius: 999px; color: #4f6676; background: #e6edf2; font-size: 9px; font-weight: 850; white-space: nowrap; }
.product-catalog-tabs button:hover { color: var(--navy); border-color: #bfd0dc; background: #fff; }
.product-catalog-tabs button.active { color: white; border-color: #e78a10; background: #e78a10; }
.product-catalog-grid { max-height: min(520px, calc(100vh - 250px)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; overflow-y: auto; padding: 13px; }
.product-catalog-card { position: relative; min-height: 174px; display: grid; grid-template-rows: 112px auto; gap: 7px; margin: 0; padding: 8px; border: 1px solid #d5e1e8; border-radius: 11px; color: var(--navy); background: #fff; text-align: left; box-shadow: none; }
.product-catalog-card:hover { color: var(--navy); border-color: #87adc5; background: #f8fbfd; box-shadow: 0 7px 18px rgba(21, 61, 87, .1); transform: translateY(-1px); }
.product-catalog-card.selected { border: 2px solid #ed8b0b; padding: 7px; background: #fffaf2; box-shadow: 0 0 0 3px rgba(237, 139, 11, .1); }
.product-catalog-card.unavailable { color: #8e9aa3; border-color: #e1e6e9; background: #f5f6f7; filter: grayscale(1); opacity: .58; cursor: not-allowed; }
.product-catalog-card.unavailable:hover { border-color: #e1e6e9; background: #f5f6f7; box-shadow: none; transform: none; }
.product-catalog-visual { min-width: 0; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(180deg, #f8fafb, #eef3f6); }
.product-thumbnail-svg { width: 100%; height: 108px; overflow: visible; }
.product-thumbnail-svg .pt-shadow { fill: rgba(28, 50, 65, .12); }
.product-thumbnail-svg .pt-body { fill: var(--pt-fill); stroke: #627887; stroke-width: 1.25; }
.product-thumbnail-svg .pt-side { fill: #b5c3cc; stroke: #627887; stroke-width: 1.25; }
.product-thumbnail-svg .pt-top { fill: var(--pt-fill); stroke: #627887; stroke-width: 1.25; }
.product-thumbnail-svg .pt-edge { fill: #b5c3cc; stroke: #627887; stroke-width: 1.25; }
.product-thumbnail-svg .pt-metal { fill: #465d6c; stroke: #253d4c; stroke-width: 1; }
.product-thumbnail-svg .pt-screen { fill: #dbe7ed; stroke: #526e7f; stroke-width: 1.25; }
.product-thumbnail-svg .pt-wall { fill: none; stroke: #bac7cf; stroke-width: 3; stroke-linecap: round; }
.product-thumbnail-svg line { stroke: #748894; stroke-width: 1.1; }
.product-thumbnail-svg .pt-handle { fill: none; stroke: #263c4a; stroke-width: 3; stroke-linecap: round; }
.product-thumbnail-svg .pt-foot { fill: none; stroke: #263c4a; stroke-width: 4; }
.product-thumbnail-svg .pt-wheel { fill: #263c4a; }
.product-catalog-card-copy { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.product-catalog-card-copy strong { overflow: hidden; color: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-catalog-card-copy small { grid-column: 1 / -1; overflow: hidden; color: #718290; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.product-catalog-card-copy em { grid-row: 1; grid-column: 2; padding: 3px 6px; border-radius: 999px; color: #176248; background: #e4f4eb; font-size: 8px; font-style: normal; font-weight: 850; }
.product-catalog-card.unavailable .product-catalog-card-copy em { color: #6e7a82; background: #e3e7e9; }
.product-catalog-check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: #ed8b0b; box-shadow: 0 2px 7px rgba(142, 79, 0, .25); font-size: 13px; font-weight: 900; }
.product-catalog-empty { margin: 0; padding: 35px 18px; color: #718290; text-align: center; font-size: 11px; }
.workspace-identity { min-width: 170px; }
.workspace-identity span, .workspace-identity strong { display: block; }
.workspace-identity span { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.workspace-identity strong { color: var(--navy); font-size: 17px; white-space: nowrap; }
.compact-dimensions { display: grid; grid-template-columns: repeat(6, minmax(86px, 1fr)); gap: 7px; }
.compact-dimensions.desk-dimensions { grid-template-columns: repeat(4, minmax(105px, 1fr)); }
.compact-dimensions label > span { display: block; margin: 0 0 3px 2px; color: #637182; font-size: 10px; font-weight: 800; }
.compact-dimensions .unit-input input { padding: 7px 8px; font-size: 12px; }
.compact-dimensions .unit-input b { padding: 0 6px; font-size: 9px; }
.compact-dimensions select { width: 100%; min-height: 33px; padding: 7px 25px 7px 8px; border: 1px solid #cbd8e1; border-radius: 8px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 700; }
.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.toolbar-button { margin: 0; padding: 8px 10px; border: 1px solid #d9e2e8; border-radius: 8px; color: var(--navy); background: #f5f8fa; font-size: 11px; font-weight: 800; cursor: pointer; list-style: none; }
.toolbar-button:hover { color: white; background: var(--blue); }
.toolbar-button:disabled { opacity: .42; cursor: not-allowed; }
.toolbar-button:disabled:hover { color: var(--navy); background: #f5f8fa; }
.client-mode-toggle.active { color: #125f45; border-color: #b8decd; background: #e7f5ee; }
.client-mode-toggle.active:hover { color: #125f45; background: #dcefe6; }
.client-mode-toggle{display:grid;place-items:center;width:36px;height:34px;padding:0}.client-mode-icon{position:relative;display:block;width:18px;height:12px;border:2px solid currentColor;border-radius:75% 15%;transform:rotate(45deg);color:#31556c}.client-mode-icon::after{content:"";position:absolute;inset:2px;border-radius:50%;background:currentColor}.client-mode-icon.eye-closed::before{content:"";position:absolute;z-index:2;left:-4px;top:4px;width:24px;height:2px;background:currentColor;box-shadow:0 0 0 2px #e7f5ee;transform:rotate(-90deg)}.client-mode-icon{font-size:0}.client-mode-toggle:not(.active) .client-mode-icon{color:#0b6da8}
.client-mode .client-sensitive { display: none !important; }
.client-mode-notice { display: none; padding: 7px 10px; border-radius: 999px; color: #176248; background: #e6f5ed; font-size: 10px; font-weight: 800; white-space: nowrap; }
.client-mode .client-mode-notice { display: inline-flex; align-items: center; gap: 5px; }
.reference-chip { padding: 7px 9px; border-radius: 999px; color: #116145; background: #e4f5ed; font-size: 10px; font-weight: 800; white-space: nowrap; }
.visual-first-grid { grid-template-columns: minmax(620px, 1fr) minmax(330px, 380px); gap: 16px; }
.visual-first-grid .visual-panel { position: relative; top: auto; }
.inspector-panel { position: sticky; top: 82px; align-self: start; }
.inspector-body { padding: 16px; }
.visual-tip { color: var(--muted); font-size: 11px; text-align: right; }
.visual-first-grid .svg-stage { min-height: 610px; padding: 14px; }
.visual-first-grid #cabinet-svg { height: 590px; }
.context-summary { margin-bottom: 13px; padding: 11px 12px; border-radius: 9px; background: #edf4f8; }
.context-summary strong, .context-summary span { display: block; }
.component-choice-group { display: grid; gap: 7px; margin-top: 12px; padding: 10px; border: 1px solid #dbe4e9; border-radius: 9px; background: #f8fafb; }
.component-choice-group > span { color: var(--navy); font-size: 11px; font-weight: 850; }
.component-choice-group > small { color: #71818e; font-size: 9px; }
.component-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.component-choice-card { min-height: 56px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 7px; margin: 0; padding: 5px; border: 1px solid #d5e0e7; color: #3f596a; background: #fff; text-align: left; }
.component-choice-card:hover { color: var(--navy); background: #edf4f8; }
.component-choice-card.selected { color: #7b4703; border-color: #e78a10; background: #fff8ec; box-shadow: 0 0 0 2px rgba(231, 138, 16, .12); }
.component-choice-image { width: 48px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #eef3f6; }
.component-choice-image img { width: 100%; height: 100%; object-fit: contain; }
.component-choice-standard { color: #176248; font-size: 18px; font-weight: 900; }
.component-choice-card strong, .component-choice-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.component-choice-card strong { font-size: 10px; }.component-choice-card small { margin-top: 2px; color: #71818e; font-size: 8px; }
.context-summary strong { color: var(--navy); font-size: 13px; }
.context-summary span { margin-top: 3px; color: #607282; font-size: 11px; line-height: 1.4; }
.content-choices { display: grid; grid-template-columns: 1fr; gap: 8px; }
.content-choice-group { display: grid; gap: 5px; padding: 8px; border: 1px solid #dce5ea; border-radius: 9px; background: #f8fafb; }
.content-choice-group > span { color: #607282; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.content-choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.content-choices button { display: grid; gap: 2px; min-height: 52px; margin: 0; padding: 7px 6px; border: 1px solid #d6e0e7; color: #40596a; background: #fff; font-size: 10px; text-align: left; }
.content-choices button strong, .content-choices button small { display: block; }
.content-choices button strong { color: inherit; font-size: 10px; }
.content-choices button small { color: #718290; font-size: 9px; font-weight: 650; line-height: 1.25; }
.content-choices button:hover { color: var(--navy); background: #eaf1f5; }
.content-choices button.active { color: white; border-color: #d9820d; background: #e78b12; box-shadow: 0 2px 7px rgba(219, 125, 8, .22); }
.content-choices button.active small { color: #fff8e7; }
.lift-choice-group { border-color: #cbdde8; background: #f1f7fa; }
.front-selector { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; padding: 0; border: 0; background: transparent; }
.door-options-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(92px, .72fr); gap: 8px; align-items: end; }
.shelf-count-field { max-width: 150px; }
.door-options-row .shelf-count-field { max-width: none; }
.field-label-with-help { display: flex !important; align-items: center; gap: 5px; min-width: 0; }
.context-help { position: relative; display: inline-flex; flex: 0 0 auto; vertical-align: middle; }
.context-help-trigger { display: inline-grid; place-items: center; width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; border: 1px solid #8eabc1; border-radius: 50%; color: #27658f; background: #f4f9fc; font: 800 10px/1 system-ui, sans-serif; cursor: help; }
.context-help-trigger:hover, .context-help-trigger:focus-visible, .context-help.is-open .context-help-trigger { color: #fff; border-color: #176ba5; background: #176ba5; outline: 0; }
.context-help-trigger:focus-visible { box-shadow: 0 0 0 3px rgba(23, 107, 165, .2); }
.context-help-popover { position: fixed; z-index: 4000; display: none; width: max-content; max-width: min(285px, calc(100vw - 16px)); padding: 9px 11px; border: 1px solid #bdd2e1; border-radius: 9px; color: #294b63; background: #fff; box-shadow: 0 9px 28px rgba(17, 48, 70, .2); font-size: 11px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal; }
.context-help.is-visible .context-help-popover { display: block; }
.context-help-popover::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; border-right: 1px solid #bdd2e1; border-bottom: 1px solid #bdd2e1; background: #fff; transform: translateX(-50%) rotate(45deg); }
.context-help-popover[data-placement="top"]::after { bottom: -5px; }
.context-help-popover[data-placement="bottom"]::after { top: -5px; transform: translateX(-50%) rotate(225deg); }
@media (prefers-reduced-motion: no-preference) {
  .context-help-popover { animation: context-help-in .12s ease-out; }
  @keyframes context-help-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
}
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin-top: 11px; }
.quick-actions button { margin: 0; padding: 8px 7px; color: var(--navy); background: #e9f1f6; font-size: 10px; }
.quick-actions button:hover { color: white; background: var(--blue); }
.three-actions { grid-template-columns: repeat(3, 1fr); }
.context-advanced, .content-settings, .advanced-settings, .advanced-group { border: 1px solid #dbe3e9; border-radius: 9px; background: #f8fafb; }
.context-advanced, .content-settings { margin-top: 11px; padding: 9px 10px; }
.context-advanced summary, .content-settings summary, .advanced-settings > summary, .advanced-group > summary { color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }
.context-advanced .editor-field { margin-top: 9px; }
.content-settings .drawer-list { margin-top: 9px; padding: 0; border: 0; background: transparent; }
.inspector-panel .drawer-row { grid-template-columns: 1fr 1fr; }
.inspector-panel .drawer-row strong { grid-column: 1 / -1; padding-top: 3px; }
.inspector-panel .drawer-row .editor-field:last-child { grid-column: 1 / -1; }
.advanced-settings { margin-top: 16px; padding: 11px; }
.advanced-settings[open] > summary { margin-bottom: 10px; }
.advanced-group { margin-top: 8px; padding: 9px; background: white; }
.advanced-group[open] > summary { margin-bottom: 9px; }
.advanced-group .section-tree { margin-top: 9px; }
.advanced-settings .full-button { margin-top: 10px; }
.selected-editor-block { min-height: 0; }
.summary-grid { gap: 10px; margin: 16px 0; }
.summary-card { padding: 14px 16px; }
.summary-card strong { margin: 5px 0 3px; font-size: 22px; }
.summary-card small { font-size: 10px; }
.svg-division-hit { fill: transparent; stroke: transparent; pointer-events: all; cursor: ew-resize; touch-action: none; }
.svg-division-hit[data-division-orientation="horizontal"] { cursor: ns-resize; }
.svg-division-hit:hover, .svg-division-hit.active { fill: rgba(245, 154, 35, .16); stroke: rgba(182, 106, 8, .65); stroke-width: 2; }
.svg-division-grip { stroke: #9a5a07; stroke-width: 3; stroke-dasharray: 7 6; pointer-events: none; opacity: .42; }
.svg-division-grip.active { stroke: #d84a22; stroke-width: 4; opacity: 1; }
.svg-division-measure { pointer-events: none; }
.svg-division-measure rect { fill: #fff7e9; stroke: #e28a15; stroke-width: 1.5; }
.svg-division-measure text { fill: #7a4805; font-size: 11px; font-weight: 900; text-anchor: middle; dominant-baseline: middle; }
.svg-inline-editor-object { overflow: visible; }
.svg-inline-editor { height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; border: 1.5px solid #e28a15; border-radius: 9px; background: rgba(255, 255, 255, .96); box-shadow: 0 5px 14px rgba(28, 54, 72, .18); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.svg-inline-editor label > span { display: block; margin: 0 0 2px 2px; color: #4f6170; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.svg-inline-editor label > div { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid #cbd7df; border-radius: 6px; background: white; }
.svg-inline-editor input { min-width: 0; width: 100%; height: 29px; padding: 4px 5px; border: 0; outline: 0; color: var(--navy); background: transparent; font-size: 11px; font-weight: 900; }
.svg-inline-editor b { padding-right: 5px; color: #71818e; font-size: 8px; }
.is-dragging-division { cursor: grabbing; user-select: none; }
.is-dragging-division * { cursor: grabbing !important; }

@media (max-width: 1100px) {
  .wide-shell { height: auto; min-height: 0; display: block; overflow: visible; padding-bottom: 60px; }
  .builder-lower-scroll { overflow: visible; padding: 0; }
  .workspace-bar { position: static; grid-template-columns: auto 1fr; }
  .workspace-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .product-catalog-popover { width: min(820px, calc(100vw - 48px)); }
  .visual-first-grid { grid-template-columns: 1fr; }
  .visual-first-grid .visual-panel { order: 1; }
  .inspector-panel { position: static; order: 2; }
}

@media (max-width: 850px) {
  .hero, .summary-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-bar { grid-template-columns: 1fr; }
  .workspace-actions { grid-column: auto; }
  .compact-dimensions { grid-template-columns: repeat(4, 1fr); }
  .workspace-actions { justify-content: flex-start; }
  .product-catalog-popover { position: fixed; top: 74px; right: 14px; bottom: 14px; left: 14px; width: auto; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .product-catalog-popover[hidden] { display: none; }
  .product-catalog-tools { grid-template-columns: 1fr; }
  .product-catalog-grid { max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-grid { grid-template-columns: 1fr; }
  .visual-first-grid .visual-panel { order: 1; }
  .inspector-panel { position: static; order: 2; }
  .visual-panel { position: static; }
  .svg-stage { min-height: 420px; }
  #cabinet-svg { height: 400px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 18px; }
  .page-shell { padding: 20px 12px 45px; }
  .hero > div, .panel-heading { padding: 20px; }
  .price-grid { grid-template-columns: 1fr; }
  .price-editor form { padding: 0 16px; }
  footer { flex-direction: column; align-items: center; }
  .reference-strip { align-items: stretch; flex-direction: column; }
  .dimension-grid { grid-template-columns: 1fr; }
  .compact-dimensions { grid-template-columns: 1fr 1fr; }
  .product-catalog-grid { grid-template-columns: 1fr; }
  .product-catalog-card { min-height: 140px; grid-template-columns: 130px minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .product-catalog-visual { height: 116px; }
  .product-catalog-card-copy { align-content: center; }
  .workspace-actions .toolbar-button span, .reference-chip { display: none; }
  .workspace-actions .client-mode-toggle .client-mode-icon { display: inline !important; }
  .visual-tip { display: none; }
  .editor-grid, .editor-actions { grid-template-columns: 1fr; }
  .editor-grid .span-2 { grid-column: auto; }
  .drawer-row { grid-template-columns: 1fr; }
  .svg-stage { min-height: 330px; padding: 10px; }
  #cabinet-svg { height: 320px; }
  .visual-first-grid .svg-stage { min-height: 350px; }
  .visual-first-grid #cabinet-svg { height: 340px; }
  .content-choice-buttons { grid-template-columns: 1fr; }
  .front-selector { grid-template-columns: 1fr; }
  .door-options-row { grid-template-columns: 1fr; }
  .door-options-row .shelf-count-field { max-width: 150px; }
}

/* Piloto 08: usuarios, permisos y navegación por áreas */
.app-topbar { min-height: 62px; height: auto; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; gap: 24px; padding-top: 7px; padding-bottom: 7px; }
.app-brand { color: white; text-decoration: none; }
.app-brand:hover strong { color: #dceaf3; }
.app-tabs { display: flex; align-items: center; justify-content: center; gap: 5px; }
.app-tab { padding: 8px 14px; border-radius: 8px; color: #c6d8e5; text-decoration: none; font-size: 13px; font-weight: 800; }
.app-tab:hover { color: white; background: rgba(255, 255, 255, .1); }
.app-tab.active { color: var(--navy); background: white; box-shadow: 0 3px 10px rgba(0, 0, 0, .16); }
.account-area { display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: white; }
.account-name { min-width: 92px; text-align: right; }
.account-name strong, .account-name small { display: block; }
.account-name strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.account-name small { margin-top: 2px; color: #b9cad8; font-size: 10px; }
.logout-form { margin: 0; }
.logout-button { margin: 0; padding: 7px 10px; border: 1px solid #55758e; color: white; background: transparent; font-size: 11px; }
.logout-button:hover { background: #164e78; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 15px; }
.flash-stack .notice { margin: 0; }
.notice-success { color: #0f5d42; background: #e8f6f0; border: 1px solid #b8e4d2; }
.notice-warning { color: #755506; background: #fff8dc; border: 1px solid #ead690; }

.management-shell { max-width: 1340px; }
.narrow-management-shell { max-width: 880px; }
.management-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .45fr); gap: 22px; align-items: stretch; margin-bottom: 20px; }
.management-heading > div { padding: 23px 26px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.management-heading h1 { margin: 7px 0 8px; color: var(--navy); font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.management-heading p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.reference-cost-card { display: flex; flex-direction: column; justify-content: center; color: white; background: linear-gradient(135deg, #0b2f4f, #164e78) !important; }
.reference-cost-card span, .reference-cost-card small { color: #c4d7e4; font-size: 12px; }
.reference-cost-card strong { margin: 8px 0 5px; font-size: 28px; }
.standalone-price-editor { margin-top: 0; }
.standalone-price-editor form { padding-bottom: 24px; }
.sticky-form-actions { position: sticky; bottom: 12px; z-index: 5; margin-top: 24px; padding: 12px; border: 1px solid #d4e0e7; border-radius: 11px; background: rgba(255, 255, 255, .96); box-shadow: 0 7px 22px rgba(18, 48, 70, .14); backdrop-filter: blur(8px); }

.users-heading { grid-template-columns: minmax(0, 1fr) minmax(310px, .55fr); }
.role-summary { display: grid; align-content: center; gap: 10px; }
.role-summary span { padding: 10px 12px; border-radius: 9px; color: #486274; background: #edf4f8; font-size: 12px; line-height: 1.4; }
.role-summary b { display: block; color: var(--navy); }
.user-management-grid { display: grid; grid-template-columns: minmax(330px, .7fr) minmax(600px, 1.3fr); gap: 18px; align-items: start; }
.user-management-grid .panel { margin-top: 0; }
.management-form { padding: 20px 22px 24px; }
.user-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.user-form-grid label > span:first-child, .auth-form label > span:first-child { display: block; margin-bottom: 5px; color: #536273; font-size: 12px; font-weight: 800; }
.user-form-grid input:not([type="checkbox"]), .user-form-grid select, .auth-form input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #c7d2da; border-radius: 8px; background: white; font: inherit; }
.user-form-grid input:focus, .user-form-grid select:focus, .auth-form input:focus { outline: 3px solid rgba(18, 105, 168, .14); border-color: var(--blue); }
.checkbox-field { align-self: end; }
.checkbox-line { min-height: 42px; display: flex !important; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #c7d2da; border-radius: 8px; color: var(--ink) !important; background: white; font-size: 13px !important; font-weight: 700 !important; }
.checkbox-line input { width: 18px; height: 18px; }
.form-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.errorlist { margin: 5px 0 0; padding: 0; color: #9b312b; font-size: 11px; list-style: none; }
.form-error { padding: 11px 13px; border: 1px solid #efc1bd; border-radius: 8px; color: #8a2c27; background: #fff0ee; font-size: 12px; }
.users-table td:first-child strong, .users-table td:first-child small { display: block; }
.users-table td:first-child small { margin-top: 3px; color: var(--muted); }
.role-badge, .status-badge { display: inline-block; padding: 5px 8px; border-radius: 999px; color: #435c6d; background: #e9f0f4; font-size: 10px; font-weight: 900; white-space: nowrap; }
.role-badge.admin { color: #754500; background: #fff0d2; }
.status-badge { color: #7b3430; background: #fee9e7; }
.status-badge.active { color: #126044; background: #dff3e9; }
.table-action { display: inline-block; padding: 7px 9px; border-radius: 7px; color: var(--blue); background: #eaf2f7; text-decoration: none; font-size: 11px; font-weight: 900; }
.table-action:hover { color: white; background: var(--blue); }
.quote-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.inline-delete-form { display: inline-flex; margin: 0; }
.table-action.danger-action { margin: 0; border: 0; color: #8a2c27; background: #fff0ee; cursor: pointer; }
.table-action.danger-action:hover { color: white; background: #a83b34; }
.edit-user-panel { margin-top: 14px; }
.back-link { display: inline-block; margin: 3px 0 5px; color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 800; }
.button-link { display: inline-flex; align-items: center; margin-top: 22px; padding: 12px 20px; border-radius: 9px; color: var(--navy); text-decoration: none; font-weight: 800; }
.access-denied-card { padding: 48px; text-align: center; }
.access-denied-card h1 { margin: 9px 0 10px; color: var(--navy); font-size: 34px; }
.access-denied-card p:not(.eyebrow) { max-width: 600px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.access-denied-card .button-link { color: white; background: var(--blue); }
.access-denied-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: #8a2c27; background: #fee8e5; font-size: 25px; font-weight: 900; }

.auth-page { min-height: 100vh; background: linear-gradient(135deg, #e9f0f4, #f8fafb 52%, #e5edf2); }
.auth-layout { width: min(940px, calc(100% - 32px)); min-height: 560px; display: grid; grid-template-columns: 1fr 1fr; margin: max(40px, 7vh) auto; overflow: hidden; border: 1px solid #d4dee5; border-radius: 22px; background: white; box-shadow: 0 24px 70px rgba(13, 45, 68, .18); }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 42px; color: white; background: linear-gradient(145deg, #0b2f4f, #174f78); }
.auth-brand { color: white; }
.auth-brand small { color: #c3d6e2; }
.auth-intro h1 { max-width: 390px; margin: 9px 0 14px; font-size: 39px; line-height: 1.06; letter-spacing: -.045em; }
.auth-intro p:not(.eyebrow) { max-width: 400px; color: #c8d9e4; line-height: 1.6; }
.auth-intro > small { color: #a9c0cf; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 50px; }
.auth-card h2 { margin: 6px 0 8px; color: var(--navy); font-size: 29px; }
.auth-form { display: grid; gap: 15px; margin-top: 25px; }
.auth-submit { width: 100%; margin: 5px 0 0; }
.auth-links { margin-top: 2px; text-align: center; }
.auth-links-left { margin-top: 24px; text-align: left; }
.auth-links a { color: var(--blue); font-weight: 750; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links .button-link { display: inline-flex; justify-content: center; padding: 11px 18px; border-radius: 8px; color: white; background: var(--blue); text-decoration: none; }
.auth-links .button-link:hover { text-decoration: none; filter: brightness(.96); }
.auth-form .errorlist { margin: 6px 0 0; padding: 0; color: #a83232; font-size: 12px; list-style: none; }
.setup-layout { width: min(1080px, calc(100% - 32px)); }
.setup-card { padding: 38px 46px; }
.setup-form { grid-template-columns: 1fr 1fr; gap: 11px; }
.setup-form .form-error, .setup-form .auth-submit { grid-column: 1 / -1; }

@media (max-width: 1120px) {
  .app-topbar { grid-template-columns: auto 1fr; gap: 6px 16px; }
  .app-tabs { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .account-area { grid-column: 2; grid-row: 1; }
  .user-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-topbar { padding: 8px 14px; }
  .app-brand small, .account-name { display: none; }
  .app-tabs { overflow-x: auto; }
  .app-tab { padding: 7px 11px; }
  .management-heading, .users-heading { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; margin: 16px auto; }
  .auth-intro { min-height: 270px; padding: 30px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-card { padding: 32px 28px; }
  .setup-form { grid-template-columns: 1fr; }
  .setup-form .form-error, .setup-form .auth-submit { grid-column: auto; }
}

@media (max-width: 560px) {
  .app-topbar .version { display: none; }
  .user-form-grid { grid-template-columns: 1fr; }
  .management-heading > div { padding: 19px; }
  .management-form { padding: 17px; }
  .auth-layout { width: calc(100% - 18px); }
  .auth-intro { min-height: 235px; padding: 24px; }
  .auth-card { padding: 28px 22px; }
}

/* Piloto 09: clientes, cotizaciones, versiones y permisos explícitos */
.quote-from-builder { margin: 0; padding: 8px 12px; border-color: #ecad3e; color: #5b3800; background: #ffc45d; font-size: 11px; }
.quote-from-builder:hover { border-color: #ffcc74; background: #ffd384; }
.prepared-team-action { display: grid; gap: 4px; margin: 18px 22px 0; padding: 14px; border: 1px solid #c9dae6; border-radius: 11px; background: #edf5fa; }
.prepared-team-action strong { color: var(--navy); font-size: 13px; }
.prepared-team-action span { color: var(--muted); font-size: 11px; }
.prepared-team-action button { width: 100%; margin: 8px 0 0; }
.password-pending { display: block; margin-top: 5px; color: #9a5d00; font-size: 10px; font-weight: 800; }
.module-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.module-heading h1, .quote-detail-heading h1 { margin: 5px 0 7px; color: var(--navy); font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.module-heading p:not(.eyebrow), .quote-detail-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.compact-module-heading { min-height: 118px; }
.primary-button { color: white; background: var(--blue); }
.primary-button:hover { color: white; background: #0b5d98; }
.module-panel { margin-top: 0; }
.filter-bar { display: flex; align-items: center; gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.filter-bar input, .filter-bar select { min-width: 250px; padding: 9px 11px; border: 1px solid #c6d2da; border-radius: 8px; background: white; font: inherit; }
.filter-bar button { margin: 0; padding: 9px 15px; }
.filter-bar a { color: var(--blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.business-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.business-form-grid label > span:first-child, .quote-line-grid label > span:first-child { display: block; margin-bottom: 5px; color: #536273; font-size: 11px; font-weight: 850; }
.business-form-grid input:not([type="checkbox"]), .business-form-grid select, .business-form-grid textarea, .quote-line-grid input, .quote-line-grid select, .quote-line-grid textarea, .state-form select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #c7d2da; border-radius: 8px; background: white; font: inherit; }
.business-form-grid textarea, .quote-line-grid textarea { resize: vertical; }
.business-form-grid input:focus, .business-form-grid select:focus, .business-form-grid textarea:focus, .quote-line-grid input:focus, .quote-line-grid select:focus, .quote-line-grid textarea:focus { outline: 3px solid rgba(18, 105, 168, .14); border-color: var(--blue); }
.span-all { grid-column: 1 / -1; }
.empty-cell { padding: 35px !important; color: var(--muted); text-align: center; }
.quote-list-table td:nth-child(2) strong, .quote-list-table td:nth-child(2) small, .quote-items-table td:first-child strong, .quote-items-table td:first-child small { display: block; }
.quote-list-table small, .quote-items-table small { margin-top: 3px; color: var(--muted); }
.quote-status { display: inline-block; padding: 6px 9px; border-radius: 999px; color: #435d6e; background: #e7eff4; font-size: 10px; font-weight: 900; white-space: nowrap; }
.status-enviada { color: #0c527d; background: #dceefa; }
.status-aceptada { color: #106044; background: #dff3e9; }
.status-rechazada, .status-anulada { color: #843630; background: #fde8e5; }
.status-vencida { color: #765200; background: #fff0c8; }
.quote-editor-shell { padding-bottom: 110px; }
.quote-editor-shell form { margin: 0; }
.quote-header-form, .quote-lines-panel { margin-top: 13px; }
.quote-business-grid { grid-template-columns: repeat(4, 1fr); }
.quote-business-grid label:first-child, .quote-business-grid label:nth-child(5), .quote-business-grid .span-all { grid-column: span 2; }
.quote-lines { display: grid; gap: 11px; padding: 16px; }
.builder-price-notice { margin: 12px 16px 0; padding: 12px 14px; }
.builder-price-notice p { font-size: 11px; }
.quote-line { border: 1px solid #d5e0e7; border-radius: 12px; background: #f8fafb; transition: opacity .15s ease; }
.quote-line.pending-delete { display: none; }
.quote-line-heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid #dce5ea; color: var(--navy); background: #edf3f6; border-radius: 12px 12px 0 0; }
.quote-line-heading button { margin: 0; padding: 5px 8px; border-color: #e5b8b4; color: #8c332d; background: #fff; font-size: 10px; }
.quote-line-grid { display: grid; grid-template-columns: .75fr repeat(4, 1fr); gap: 10px; align-items: end; padding: 12px; }
.quote-line-grid .product-field { grid-column: 2 / -1; }
.quote-line-grid .description-field { grid-column: 1 / -1; }
.line-total { min-height: 62px; display: flex; flex-direction: column; justify-content: center; padding: 8px 10px; border-radius: 8px; color: white; background: var(--navy); text-align: right; }
.line-total span { color: #bdd1de; font-size: 10px; }
.line-total strong { margin-top: 4px; font-size: 15px; }
.delete-control { display: none; }
.compact-button { margin: 0; padding: 8px 11px; }
.quote-submit-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 12px max(24px, calc((100vw - 1340px) / 2)); border-top: 1px solid #c7d7e1; background: rgba(239, 245, 248, .97); box-shadow: 0 -8px 25px rgba(12, 42, 62, .12); backdrop-filter: blur(8px); }
.quote-submit-bar > div { display: grid; text-align: right; }
.quote-submit-bar span, .quote-submit-bar small { color: var(--muted); font-size: 10px; }
.quote-submit-bar strong { color: var(--navy); font-size: 23px; }
.quote-submit-bar button { margin: 0; }
.quote-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 10px 0 15px; padding: 23px 25px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.quote-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.quote-detail-actions .button-link { margin: 0; }
.quote-detail-actions .inline-delete-form { margin: 0; }
.quote-delete-button { margin: 0; padding: 12px 16px; border-radius: 9px; font: inherit; font-weight: 800; cursor: pointer; }
.quote-version-notice { margin: 8px 0 14px; }
.quote-version-tabs { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 13px; padding: 4px; }
.quote-version-tabs a { min-width: 78px; padding: 8px 12px; border: 1px solid #cedae2; border-radius: 9px; color: var(--navy); background: white; text-decoration: none; font-size: 12px; font-weight: 900; }
.quote-version-tabs a.active { border-color: var(--blue); color: white; background: var(--blue); }
.quote-version-tabs small { display: block; margin-top: 3px; color: inherit; opacity: .72; font-size: 9px; }
.quote-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 14px; }
.quote-metrics article { display: grid; gap: 5px; min-height: 98px; align-content: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.quote-metrics span, .quote-metrics small { color: var(--muted); font-size: 11px; }
.quote-metrics strong { color: var(--navy); font-size: 22px; }
.quote-metrics .cost-metric { border-color: #ebc379; background: #fff9ee; }
.compact-state-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 18px 20px; }
.compact-state-panel h2 { margin: 4px 0 0; }
.state-form { display: flex; gap: 8px; }
.state-form button { margin: 0; }

.print-quote-body { min-height: 100vh; margin: 0; padding: 28px; background: #dfe7ec; }
.quote-paper { width: min(210mm, 100%); min-height: 270mm; margin: 0 auto; padding: 18mm 16mm; color: #172c3b; background: white; box-shadow: 0 8px 32px rgba(12, 36, 54, .2); }
.quote-paper-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 14px; border-bottom: 3px solid var(--navy); }
.quote-paper-header > div:last-child { display: grid; gap: 4px; text-align: right; }
.quote-paper-header > div:last-child strong { color: var(--navy); font-size: 25px; }
.quote-paper-header > div:last-child span { color: var(--muted); font-size: 11px; }
.quote-paper-client { display: grid; grid-template-columns: 1.2fr 1.1fr .9fr; gap: 20px; margin: 20px 0; padding: 14px; background: #eff4f7; }
.quote-paper-client > div { display: grid; align-content: start; gap: 3px; font-size: 11px; }
.quote-paper-client small { color: var(--blue); font-weight: 900; }
.quote-paper h1 { margin: 18px 0; color: var(--navy); font-size: 20px; }
.quote-paper-table { width: 100%; border-collapse: collapse; }
.quote-paper-table th { padding: 9px; color: white; background: var(--navy); text-align: left; font-size: 10px; }
.quote-paper-table td { padding: 11px 9px; border-bottom: 1px solid #dce4e9; vertical-align: top; font-size: 11px; }
.quote-paper-table p { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
.quote-paper-bottom { display: grid; grid-template-columns: 1fr 270px; gap: 28px; margin-top: 25px; }
.quote-paper-bottom p { margin: 0 0 8px; font-size: 11px; }
.quote-paper-bottom dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; margin: 0; font-size: 12px; }
.quote-paper-bottom dt, .quote-paper-bottom dd { margin: 0; }
.quote-paper-bottom dd { text-align: right; font-weight: 800; }
.quote-paper-bottom .grand-total { padding-top: 9px; border-top: 2px solid var(--navy); color: var(--navy); font-size: 15px; font-weight: 900; }
.quote-paper footer { margin-top: 35px; padding-top: 10px; border-top: 1px solid #dce4e9; color: var(--muted); font-size: 9px; text-align: center; }
.print-action { position: fixed; right: 22px; bottom: 22px; margin: 0; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }

@media (max-width: 1120px) {
  .quote-business-grid { grid-template-columns: 1fr 1fr; }
  .quote-line-grid { grid-template-columns: repeat(4, 1fr); }
  .quote-line-grid .product-field { grid-column: span 3; }
  .quote-line-grid .description-field { grid-column: span 4; }
  .quote-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .module-heading, .quote-detail-heading, .compact-state-panel { align-items: flex-start; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar input, .filter-bar select { min-width: 0; width: 100%; }
  .business-form-grid, .quote-business-grid { grid-template-columns: 1fr; }
  .business-form-grid .span-all, .quote-business-grid label:first-child, .quote-business-grid label:nth-child(5), .quote-business-grid .span-all { grid-column: auto; }
  .quote-line-grid { grid-template-columns: 1fr 1fr; }
  .quote-line-grid .product-field { grid-column: auto; }
  .quote-line-grid .description-field { grid-column: span 2; }
  .quote-submit-bar { justify-content: space-between; padding: 10px 14px; }
  .quote-metrics { grid-template-columns: 1fr; }
  .quote-paper-bottom, .quote-paper-client { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 0; }
  .print-quote-body { padding: 0; background: white; }
  .quote-paper { width: 100%; min-height: 0; padding: 14mm; box-shadow: none; }
  .print-action { display: none; }
}

/* Importación de clientes Laudus */
.module-actions { display: flex; align-items: center; gap: 8px; }
.module-actions .button-link { margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination a { padding: 7px 10px; border-radius: 7px; color: var(--blue); background: #eaf2f7; text-decoration: none; font-weight: 900; }
.client-import-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 15px; margin-bottom: 15px; }
.client-import-grid .panel { margin-top: 0; }
.import-upload-form > label > span { display: block; margin-bottom: 7px; color: #536273; font-size: 12px; font-weight: 850; }
.import-upload-form input[type="file"] { width: 100%; padding: 14px; border: 1px dashed #9bb8cb; border-radius: 10px; background: #f4f8fa; }
.import-rules-panel ul { display: grid; gap: 9px; margin: 0; padding: 18px 24px 22px 42px; color: #486274; font-size: 12px; line-height: 1.5; }
.import-preview-panel { margin-top: 0; }
.import-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.import-kpis article { min-height: 84px; display: grid; align-content: center; gap: 5px; padding: 12px; border: 1px solid #d9e4ea; border-radius: 10px; background: #f8fafb; }
.import-kpis span { color: var(--muted); font-size: 10px; }
.import-kpis strong { color: var(--navy); font-size: 23px; }
.import-preview-panel > .notice { margin: 12px 17px 0; }
.import-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr); gap: 16px; padding: 17px; }
.import-detail-grid h3 { margin: 0 0 10px; color: var(--navy); font-size: 14px; }
.selected-data { padding: 15px; border-radius: 11px; background: #edf4f8; }
.selected-data ul { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 0 0 18px; padding-left: 18px; color: #486274; font-size: 11px; }
.selected-data p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.confirm-import-form { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 17px 17px; padding: 15px; border: 1px solid #e4bc70; border-radius: 11px; background: #fff8e9; }
.confirm-import-form > div { display: grid; gap: 4px; }
.confirm-import-form strong { color: #654100; font-size: 13px; }
.confirm-import-form span { color: #84662c; font-size: 11px; }
.confirm-import-form button { margin: 0; }
.import-history { margin-top: 15px; }

@media (max-width: 1120px) {
  .import-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .module-actions { width: 100%; flex-wrap: wrap; }
  .client-import-grid, .import-detail-grid { grid-template-columns: 1fr; }
  .import-kpis { grid-template-columns: 1fr 1fr; }
  .confirm-import-form { align-items: stretch; flex-direction: column; }
}

/* Cotización guiada, catálogo, imágenes y alertas comerciales */
.notification-link { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #b9cbd9; border-radius: 9px; color: #174d75; background: #f7fafc; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.notification-link:hover { border-color: #5f91b3; background: #edf6fb; }
.notification-link.has-unread { border-color: #e6a12e; background: #fff8e9; color: #5e410d; }
.notification-link-icon { font-size: 14px; line-height: 1; }
.notification-link b { min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: #dd8500; font-size: 9px; }
.quote-client-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.quote-client-grid label > span:first-child, .client-picker > label span, .dialog-form-grid label > span:first-child { display: block; margin-bottom: 5px; color: #536273; font-size: 11px; font-weight: 850; }
.quote-client-grid input:not([type="checkbox"]), .quote-client-grid select, .quote-client-grid textarea, .dialog-form-grid input:not([type="checkbox"]) { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #c7d2da; border-radius: 8px; background: white; font: inherit; }
.quote-client-grid input:focus, .quote-client-grid select:focus, .quote-client-grid textarea:focus, .dialog-form-grid input:focus { outline: 3px solid rgba(18,105,168,.14); border-color: var(--blue); }
.quote-client-grid .span-two { grid-column: span 2; }
.search-picker-control { position: relative; }
.search-picker-control input { padding-right: 38px !important; }
.icon-clear { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; color: #647584; background: transparent; font-size: 22px; }
.client-picker, .catalog-search-block { position: relative; }
.search-results { position: absolute; z-index: 45; top: calc(100% + 4px); right: 0; left: 0; max-height: 300px; overflow: auto; border: 1px solid #b9ccd8; border-radius: 10px; background: white; box-shadow: 0 15px 36px rgba(13,45,68,.2); }
.search-result-item { width: 100%; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 0; border-bottom: 1px solid #e2e9ed; border-radius: 0; color: var(--ink); background: white; text-align: left; }
.search-result-item:hover { background: #edf5fa; }
.search-result-item img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; border: 1px solid #dce6ec; border-radius: 7px; background: white; }
.search-result-item > span { min-width: 0; display: grid; gap: 3px; }
.search-result-item strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-item small { color: var(--muted); font-size: 10px; }
.search-empty { margin: 0; padding: 15px; color: var(--muted); font-size: 11px; }
.selected-client-card { margin-top: 7px; padding: 10px 12px; border: 1px solid #bcd6c9; border-radius: 9px; background: #eff9f4; }
.selected-client-card > div { display: grid; gap: 2px; }
.selected-client-card strong { color: #114f3a; font-size: 12px; }
.selected-client-card span, .selected-client-card small, .field-help { color: var(--muted); font-size: 10px; }
.field-help { margin: 6px 0 0; line-height: 1.45; }
.dispatch-picker { position: relative; }
.inline-link { width: auto; margin: 6px 0 0; padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 10px; font-weight: 850; }
.inline-link:hover { color: #084c7d; background: transparent; }
.inline-link:disabled { color: #9cacb8; cursor: not-allowed; }

.quote-line-fields { padding: 13px; }
.quote-line-main { display: grid; grid-template-columns: minmax(170px,.7fr) minmax(280px,1.3fr); gap: 10px; }
.quote-line-main label > span, .quote-line-commercial label > span { display: block; margin-bottom: 5px; color: #536273; font-size: 11px; font-weight: 850; }
.quote-line-main input, .quote-line-main select, .quote-line-main textarea, .quote-line-commercial input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #c7d2da; border-radius: 8px; background: white; font: inherit; }
.quote-line-main input:focus, .quote-line-main select:focus, .quote-line-main textarea:focus, .quote-line-commercial input:focus { outline: 3px solid rgba(18,105,168,.14); border-color: var(--blue); }
.quote-line-main .description-field { grid-column: 1 / -1; }
.quote-line-main textarea { resize: vertical; }
.catalog-search-block { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; padding: 10px; border: 1px solid #bcd3e2; border-radius: 9px; background: #eef6fb; }
.catalog-search-block[hidden] { display: none; }
.catalog-search-block label { min-width: 0; }
.catalog-search-block .catalog-selection { padding: 10px 0; color: #31566f; font-size: 10px; }
.catalog-search-block .search-results { top: calc(100% + 4px); }
.quote-line-commercial { display: grid; grid-template-columns: .65fr repeat(4, minmax(125px,1fr)) minmax(130px,.85fr); gap: 9px; align-items: end; margin-top: 10px; }
.quote-line-commercial label[hidden] { display: none; }
.quote-line-commercial input[readonly], .quote-line-main input[readonly] { color: #37566b; background: #edf2f5; }
.price-source { min-height: 14px; display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.quote-line-media { display: grid; grid-template-columns: 155px 1fr; gap: 13px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid #dce5ea; }
.line-image-preview { height: 105px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #aebfca; border-radius: 9px; color: #7e909d; background: white; font-size: 10px; }
.line-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.line-image-controls { display: grid; justify-items: start; gap: 5px; }
.line-image-controls strong { color: var(--navy); font-size: 12px; }
.line-image-controls small { color: var(--muted); font-size: 10px; }
.image-upload-button { display: inline-flex; margin-top: 3px; padding: 7px 10px; border: 1px solid #b7ccda; border-radius: 7px; color: var(--blue); background: #edf5fa; cursor: pointer; font-size: 10px; font-weight: 850; }
.image-upload-button input { display: none; }

.decision-dialog, .form-dialog { width: min(640px, calc(100% - 28px)); padding: 28px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 25px 80px rgba(8,32,49,.35); }
.decision-dialog::backdrop, .form-dialog::backdrop { background: rgba(4,27,44,.68); backdrop-filter: blur(3px); }
.decision-dialog { text-align: center; }
.decision-dialog .dialog-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #6a3c00; background: #ffd47f; font-size: 34px; font-weight: 900; }
.decision-dialog h2, .form-dialog h2 { margin: 5px 0 9px; color: var(--navy); font-size: 25px; }
.decision-dialog > p:not(.eyebrow) { max-width: 520px; margin: 0 auto; color: #526a7a; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.decision-dialog .dialog-actions { justify-content: center; }
.dialog-actions button { margin: 0; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-close { width: 34px; height: 34px; margin: 0; padding: 0; border: 0; color: #607585; background: #e9f0f4; font-size: 21px; }
.dialog-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 16px; }
.catalog-total { color: var(--blue); font-size: 18px; }
.catalog-sync-panel { margin-bottom: 15px; }
.notification-list { display: grid; gap: 10px; padding: 15px; }
.notification-card { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid #d8e2e8; border-radius: 11px; background: #f9fbfc; }
.notification-card.unread { border-color: #e6b860; background: #fff9ec; }
.notification-state { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #9cacb7; }
.notification-card.unread .notification-state { background: #e39411; box-shadow: 0 0 0 4px #ffe7b8; }
.notification-toast-stack{position:fixed;z-index:10050;right:22px;bottom:22px;display:grid;gap:10px;width:min(370px,calc(100vw - 28px));pointer-events:none}.notification-toast{position:relative;display:grid;gap:5px;padding:16px 42px 15px 17px;border:1px solid #bdd8e8;border-left:5px solid #1677b5;border-radius:13px;background:#fff;box-shadow:0 18px 44px #163d5650;color:#24475e;pointer-events:auto;animation:toast-in .22s ease-out}.notification-toast.priority-alta{border-left-color:#e58b0a}.notification-toast.priority-critica{border-left-color:#b52c25}.notification-toast>small{color:#6d8392;font-size:9px;font-weight:900;letter-spacing:.08em}.notification-toast>strong{font-size:14px}.notification-toast>p{margin:0;color:#526d7e;font-size:11px;line-height:1.45}.notification-toast>div{display:flex;gap:12px;margin-top:5px}.notification-toast a{color:#086aa8;font-size:11px;font-weight:800}.notification-toast-close{position:absolute;top:8px;right:9px;width:27px;height:27px;padding:0;border:0;border-radius:50%;color:#647b8a;background:#edf3f6;font-size:18px;cursor:pointer}@keyframes toast-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.product-operational-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.product-operational-badges span{padding:5px 8px;border-radius:999px;background:#e7f2f8;color:#28536d;font-size:10px;font-weight:800}.product-enable-request form{display:grid;grid-template-columns:1fr 2fr auto;gap:10px;align-items:end}.product-enable-request label{display:grid;gap:4px;font-size:11px;font-weight:800}.product-enable-request input,.product-enable-request textarea{width:100%}.product-category-layout{display:grid;grid-template-columns:minmax(290px,380px) 1fr;gap:16px}.request-resolution{display:grid;min-width:270px;gap:7px}.request-resolution label{display:grid;gap:3px;font-size:10px;font-weight:800}
.registry-choice-group{grid-column:1/-1;padding:12px;border:1px solid #d7e3ea;border-radius:10px;background:#f7fafc}.registry-choice-group>strong{display:block;margin-bottom:8px;color:#294c64;font-size:12px}.registry-choice-group>div{display:flex;flex-wrap:wrap;gap:8px 16px}.registry-choice-group label{display:flex;align-items:center;gap:6px;font-size:11px}
.draft-approval-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:5px solid #e58b0a;background:#fff9ec}.draft-approval-banner p{margin:4px 0 0;color:#6f654e;font-size:11px}
.product-editor-panel{padding:0;overflow:hidden}.product-editor-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:19px 21px 15px;border-bottom:1px solid #dce6eb;background:linear-gradient(135deg,#f8fbfc,#eef5f7)}.product-editor-intro h2{margin:3px 0 4px;color:var(--navy);font-size:20px}.product-editor-intro p:not(.eyebrow){margin:0;color:#5d7180;font-size:11px}.product-editor-photo{width:74px;height:58px;object-fit:contain;border:1px solid #d1dfe6;border-radius:9px;background:white}.product-editor-form{padding:0}.product-tabs{display:flex;align-items:flex-end;gap:2px;overflow-x:auto;padding:0 16px;border-bottom:1px solid #cbdbe4;background:#f4f8fa}.product-tab{position:relative;flex:0 0 auto;margin:0;padding:12px 15px 10px;border:0;border-bottom:3px solid transparent;border-radius:0;color:#597181;background:transparent;font-size:11px;font-weight:850;white-space:nowrap}.product-tab:hover{color:var(--navy);background:#e9f1f5}.product-tab.is-active{color:#086aa8;border-bottom-color:#e78a10;background:white}.product-tab-panels{padding:18px 20px 4px}.product-tab-panel[hidden]{display:none}.product-tab-heading{display:flex;justify-content:space-between;gap:15px;margin-bottom:15px}.product-tab-heading h3{margin:0 0 4px;color:var(--navy);font-size:15px}.product-tab-heading p{margin:0;color:#687b89;font-size:10px}.product-tab-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 16px}.product-tab-field{display:grid;align-content:start;gap:4px;min-width:0;color:#536273;font-size:11px;font-weight:800}.product-tab-field>span{display:block}.product-tab-field>input:not([type=checkbox]),.product-tab-field>select,.product-tab-field>textarea{width:100%;min-width:0;padding:9px 10px;border:1px solid #c7d2da;border-radius:8px;background:white;color:var(--ink);font:inherit;font-weight:500}.product-tab-field>textarea{resize:vertical}.product-tab-field>input:focus,.product-tab-field>select:focus,.product-tab-field>textarea:focus{outline:3px solid rgba(18,105,168,.14);border-color:var(--blue)}.product-tab-field small{color:#6f8190;font-size:9px;font-weight:500;line-height:1.35}.product-tab-field-wide{grid-column:1/-1}.product-tab-field-checkbox{display:flex;grid-template-columns:none;align-items:center;align-content:center;gap:8px;min-height:42px;padding:9px 11px;border:1px solid #d7e3ea;border-radius:8px;background:#f8fafb}.product-tab-field-checkbox>span{order:2}.product-tab-field-checkbox>input{order:1;width:16px;height:16px;margin:0}.product-tab-field-checkbox small,.product-tab-field-checkbox .errorlist{grid-column:1/-1}.product-tab-field .errorlist{margin:0;padding:0;color:#a3261f;font-size:9px;font-weight:700;list-style:none}.product-tab-field .errorlist li{margin:0}.product-tab-field.registry-choice-group{display:block;padding:12px}.product-tab-field.registry-choice-group>strong{display:block;margin-bottom:8px;color:#294c64;font-size:12px}.product-tab-field.registry-choice-group>div{display:flex;flex-wrap:wrap;gap:8px 16px}.product-tab-field.registry-choice-group label{display:flex;align-items:center;gap:6px;font-size:11px}.product-editor-form .form-actions{margin:8px 20px 20px;padding-top:15px;border-top:1px solid #dce6eb}
.product-record-actions{align-self:flex-start}.product-record-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;margin:0;padding:9px 11px;font-size:11px;line-height:1.2;white-space:nowrap}.product-record-action svg{width:16px;height:16px;flex:none}.product-mode-badge{background:#eef2f5!important;color:#506375!important}.product-form-fields{min-width:0;margin:0;padding:0;border:0}.product-tabs-hint{display:none}.product-tab:focus-visible{outline:2px solid var(--blue);outline-offset:-3px}.product-save-error{margin:16px 20px 12px;padding:12px 14px;border:1px solid #edb8b3;border-left:4px solid #b6372f;border-radius:8px;background:#fff6f4;color:#80312b}.product-save-error strong{font-size:13px}.product-save-error p{margin:4px 0 7px;font-size:11px}.product-save-error ul{margin:0;padding-left:19px;font-size:11px}.product-save-error a{color:#8a2924;font-weight:700;text-decoration:underline}.product-save-error:focus{outline:2px solid #b6372f;outline-offset:2px}
@media(max-width:760px){.notification-toast-stack{right:14px;bottom:14px}.product-enable-request form,.product-category-layout{grid-template-columns:1fr}}
@media(max-width:760px){.product-editor-intro{align-items:flex-start;padding:16px}.product-tabs{padding:0 8px}.product-tab-panels{padding:16px 14px 2px}.product-tab-grid{grid-template-columns:1fr}.product-tab-field-wide{grid-column:auto}.product-editor-form .form-actions{margin:8px 14px 16px}}
@media(max-width:760px){.product-record-actions{width:100%}.product-record-action{flex:1 1 auto}.product-tabs-hint{display:block;margin:8px 14px 0;color:#617585;font-size:10px}.product-save-error{margin:12px 14px}}
.notification-content { display: grid; gap: 4px; }
.notification-content strong { color: var(--navy); font-size: 13px; }
.notification-content p { margin: 0; color: #526a7a; font-size: 11px; line-height: 1.5; }
.notification-content small { color: var(--muted); font-size: 9px; }
.notification-actions { display: flex; gap: 6px; }
.notification-actions .button-link, .notification-actions button { margin: 0; padding: 7px 9px; font-size: 10px; }

@media (max-width: 1120px) {
  .quote-client-grid { grid-template-columns: 1fr 1fr; }
  .quote-line-commercial { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .quote-client-grid, .quote-line-main, .dialog-form-grid { grid-template-columns: 1fr; }
  .quote-client-grid .span-two, .quote-line-main .description-field, .dialog-form-grid .span-all { grid-column: auto; }
  .catalog-search-block { grid-template-columns: 1fr; }
  .quote-line-commercial { grid-template-columns: 1fr 1fr; }
  .quote-line-media { grid-template-columns: 105px 1fr; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .notification-card { grid-template-columns: 12px 1fr; }
  .notification-actions { grid-column: 2; }
}

.billing-copy-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 12px; border: 1px solid #c9dae5; border-radius: 10px; background: #f0f6f9; }
.billing-copy-row button { margin: 0; }
.billing-copy-row small { color: var(--muted); font-size: 10px; }
.client-address-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #d9e3e9; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.subsection-heading h3 { margin: 4px 0; color: var(--navy); font-size: 18px; }
.subsection-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10px; }
.subsection-heading button { margin: 0; }
.client-address-list { display: grid; gap: 11px; }
.client-address-card { border: 1px solid #d4e0e7; border-radius: 11px; background: #f8fafb; }
.client-address-card.pending-delete { display: none; }
.client-address-heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid #dce5ea; color: var(--navy); background: #edf3f6; border-radius: 11px 11px 0 0; }
.client-address-heading button { margin: 0; padding: 5px 8px; border-color: #e5b8b4; color: #8c332d; background: white; font-size: 10px; }
.address-form-grid { padding: 12px; }
.viewport-global-tools { position: relative; z-index: 6; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-bottom: 1px solid #dbe5eb; background: #f6f9fb; }
.viewport-global-tools button, .snap-menu summary, .view-count-menu summary { min-height: 28px; margin: 0; padding: 5px 9px; border: 1px solid #c6d5df; border-radius: 6px; color: #36566c; background: white; font-size: 9px; font-weight: 800; cursor: pointer; list-style: none; }
.snap-menu, .view-count-menu { position: relative; }
.snap-menu summary::-webkit-details-marker, .view-count-menu summary::-webkit-details-marker { display: none; }
.snap-menu[open] summary { color: white; border-color: #6b9b16; background: #6b9b16; }
.view-count-menu summary { display: flex; align-items: center; gap: 6px; }
.view-count-menu[open] summary { color: white; border-color: #1474af; background: #1474af; }
.view-count-options { position: absolute; top: calc(100% + 5px); left: 0; z-index: 20; width: 238px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; border: 1px solid #bdccd5; border-radius: 8px; background: white; box-shadow: 0 8px 25px rgba(20,48,66,.18); }
.view-count-options button { min-width: 0; min-height: 67px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 6px 3px; color: #36566c; background: white; border-color: transparent; }
.view-count-options button:hover, .view-count-options button.active { color: #0e659d; border-color: #9bc0d7; background: #edf6fb; }
.layout-choice, .layout-mini { display: grid; gap: 2px; }
.layout-choice { width: 30px; height: 26px; }
.layout-choice i, .layout-mini i { display: block; min-width: 0; min-height: 0; border: 1px solid currentColor; background: rgba(255,255,255,.45); }
.layout-mini { width: 16px; height: 14px; }
.layout-one { grid-template: 1fr / 1fr; }
.layout-two { grid-template: 1fr / repeat(2, 1fr); }
.layout-three { grid-template: repeat(2, 1fr) / 1.35fr 1fr; }
.layout-three i:first-child { grid-row: 1 / span 2; }
.layout-four { grid-template: repeat(2, 1fr) / repeat(2, 1fr); }
.snap-menu-content { position: absolute; top: calc(100% + 5px); left: 0; z-index: 20; width: 250px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; padding: 11px; border: 1px solid #bdccd5; border-radius: 8px; background: white; box-shadow: 0 8px 25px rgba(20,48,66,.18); }
.snap-menu-content strong, .snap-menu-content small { grid-column: 1 / -1; }
.snap-menu-content label { display: flex; align-items: center; gap: 6px; color: #304f63; font-size: 10px; font-weight: 700; }
.snap-menu-content input { width: auto; }
.snap-menu-content small { color: var(--muted); font-size: 9px; }
.cabinet-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 7px; background: #dfe8ee; }
.cabinet-view-grid[data-view-count="1"] { grid-template-columns: minmax(0, 1fr); }
.cabinet-view-grid[data-view-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cabinet-view-grid[data-view-count="3"] { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: repeat(2, auto); }
.cabinet-view-grid[data-view-count="3"] .cabinet-viewport:first-child { grid-row: 1 / span 2; }
.cabinet-view-grid[data-view-count="1"] .viewport-stage,
.cabinet-view-grid[data-view-count="2"] .viewport-stage { height: 62vh; max-height: 760px; }
.cabinet-view-grid[data-view-count="3"] .cabinet-viewport:first-child .viewport-stage { height: calc(62vh + 42px); max-height: 827px; }
.cabinet-view-grid.maximized { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
.cabinet-view-grid.maximized .cabinet-viewport { grid-row: auto; }
.cabinet-view-grid.maximized .viewport-stage { height: 72vh; max-height: 860px; }
.cabinet-viewport { min-width: 0; overflow: hidden; border: 1px solid #b9cbd7; border-radius: 7px; background: #f5f8fa; }
.cabinet-viewport.active { border-color: #1474af; box-shadow: 0 0 0 2px rgba(20,116,175,.18); }
.viewport-header { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #d4e0e7; background: #fff; user-select: none; }
.viewport-view-select { min-width: 0; max-width: 190px; padding: 5px 25px 5px 7px; border: 1px solid #c3d2dc; border-radius: 5px; color: #294c62; background: #fff; font: inherit; font-size: 9px; font-weight: 800; }
.viewport-actions { display: flex; align-items: center; gap: 5px; }
.viewport-actions button { min-width: 28px; min-height: 26px; margin: 0; padding: 4px 6px; border: 1px solid #c3d2dc; border-radius: 5px; color: #36566c; background: #f8fafb; font-size: 11px; }
.viewport-actions button.active { color: white; border-color: #1474af; background: #1474af; }
.viewport-internal { display: flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 750; color: #516979; }
.viewport-internal[hidden] { display: none; }
.viewport-internal input { width: auto; }
.viewport-stage { min-height: 285px; height: 31vh; max-height: 390px; display: grid; place-items: center; padding: 7px; background: radial-gradient(circle at 50% 20%, #fff, #f0f4f7 72%); }
.viewport-stage > * { grid-area: 1 / 1; }
.cabinet-viewport.pan-enabled .cabinet-svg, .cabinet-viewport.pan-enabled .orbit-canvas { cursor: grab !important; touch-action: none; }
.cabinet-viewport.panning .cabinet-svg, .cabinet-viewport.panning .orbit-canvas { cursor: grabbing !important; }
.orbit-controls { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.orbit-controls[hidden] { display: none; }
.technical-view-controls { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid #c5d3dd; border-radius: 6px; background: #edf3f7; }
.technical-view-controls[hidden] { display: none; }
.technical-view-controls button { padding: 5px 8px; border-color: transparent; background: transparent; }
.technical-view-controls button.active { color: #fff; border-color: #1269a8; background: #1269a8; }
.orbit-controls label { display: inline-flex; align-items: center; gap: 4px; padding: 0 5px; color: #4f6b7e; font-size: 9px; font-weight: 750; white-space: nowrap; }
.orbit-controls input { width: auto; margin: 0; }
.orbit-controls button { color: #36566c; background: #eef4f7; }
#cabinet-svg.orbit-view { cursor: grab; touch-action: none; }
#cabinet-svg.orbit-view.dragging { cursor: grabbing; }
.svg-cover-core { fill: #d8e4eb; stroke: #6b8799; stroke-width: 1.5; }
.svg-cover-durolac { fill: #f1ead9; stroke: #8b876f; stroke-width: 1; }
.svg-door-profile { fill: #d9ebf6; stroke: #2d6588; stroke-width: 1.5; }
.svg-front-profile { fill: #fff2d8; stroke: #bd7812; stroke-width: 1.5; }
.svg-lock-profile { fill: #687784; stroke: #394b57; stroke-width: 1; }
.svg-side-plan { fill: #d8e4eb; stroke: #6b8799; stroke-width: 1.5; }
.svg-zocal-plan { fill: #eef8d8; stroke: #88a600; stroke-width: 1.5; }
.svg-plan-label { fill: #4e6810; font-size: 11px; font-weight: 700; }
.svg-side-alt { fill: #d8e4eb; stroke: #6b8799; stroke-width: 2; }
.svg-technical-line, .svg-front-edge, .svg-perspective-floor { fill: none; stroke: #63849a; stroke-width: 2; }
.svg-zocal-alt { fill: #c9d6de; stroke: #7891a1; stroke-width: 1.5; }
.svg-back-panel { fill: #eeeae0; stroke: #8a887f; stroke-width: 1.5; }
.svg-rear-tie-bar { fill: #b9ceda; fill-opacity: .92; stroke: #53768c; stroke-width: 1.5; }
.svg-rear-tie-bar-edge { fill: none; stroke: #315f7b; stroke-width: 2; stroke-dasharray: 8 5; }
.svg-rear-zocal { fill: #c9d6de; stroke: #657f90; stroke-width: 1.5; }
.svg-structure-label { fill: #294f67; font-size: 11px; font-weight: 800; }
.svg-underside { fill: #dbe6ec; stroke: #55758a; stroke-width: 2; }
.svg-technical-strip { fill: #c9d6de; stroke: #7891a1; stroke-width: 1.5; }
.svg-foot-plan { fill: #233b4a; }
.svg-perspective-top { fill: #ecf3f7; stroke: #426a83; stroke-width: 2; }
.svg-perspective-side { fill: #c8d9e4; stroke: #426a83; stroke-width: 2; }
.svg-perspective-front { fill: #f8fbfc; stroke: #426a83; stroke-width: 2; }
.svg-view-caption { fill: #31566f; font-size: 16px; font-weight: 750; }
@media (max-width: 760px) {
  .billing-copy-row, .subsection-heading { align-items: stretch; flex-direction: column; }
  .cabinet-view-grid, .cabinet-view-grid[data-view-count="2"], .cabinet-view-grid[data-view-count="3"] { grid-template-columns: 1fr; grid-template-rows: auto; }
  .cabinet-view-grid[data-view-count="3"] .cabinet-viewport:first-child { grid-row: auto; }
  .cabinet-view-grid[data-view-count="1"] .viewport-stage,
  .cabinet-view-grid[data-view-count="2"] .viewport-stage,
  .cabinet-view-grid[data-view-count="3"] .cabinet-viewport:first-child .viewport-stage { height: 330px; }
  .cabinet-view-grid.maximized .viewport-stage { height: 70vh; }
  .viewport-stage { height: 330px; }
}

/* Cotización comercial inspirada en el formato Dasec vigente */
.dasec-reference-quote { width: min(216mm, 100%); min-height: 279mm; padding: 10mm 11mm 9mm; color: #23282c; font-family: Arial, Helvetica, sans-serif; }
.reference-quote-header { display: flex; align-items: center; justify-content: space-between; gap: 9mm; padding: 0 1mm 3mm; border: 0; }
.reference-brand { display: flex; align-items: center; gap: 6mm; }
.reference-logo { position: relative; display: grid; grid-template-columns: 7mm auto; align-items: center; min-width: 58mm; }
.reference-logo i { grid-row: 1 / span 2; align-self: stretch; display: flex; align-items: center; justify-content: center; color: #121212; font-size: 7pt; font-style: normal; font-weight: 800; letter-spacing: .06em; writing-mode: vertical-rl; transform: rotate(180deg); }
.reference-logo strong { color: #030303; font-size: 30pt; font-weight: 500; letter-spacing: .14em; line-height: 1; }
.reference-logo strong b { color: #e31e24; font-weight: 650; }
.reference-logo > span { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm; padding: 1.3mm .5mm 0; }
.reference-logo em { height: 5mm; background: #24398d; }
.reference-logo em:nth-child(2) { background: #007239; }.reference-logo em:nth-child(3) { background: #df2029; }.reference-logo em:nth-child(4) { background: #f5ad2f; }
.company-copy { display: grid; min-width: 54mm; font-size: 6.6pt; line-height: 1.2; }
.company-copy strong { font-size: 6.7pt; }
.quote-number-box { min-width: 58mm; display: grid; gap: 1.5mm; padding: 3mm 5mm; border: 1px solid #333; text-align: center; }
.quote-number-box span, .quote-number-box strong { font-size: 9pt; font-weight: 500; }.quote-number-box b { color: #ed1c24; font-size: 13pt; font-weight: 500; }.quote-number-box small { color: #666; font-size: 6pt; }
.reference-client-box { display: grid; grid-template-columns: .95fr .95fr 1.1fr; gap: 4mm; padding: 2.4mm 1mm; border: 1px solid #333; }
.reference-client-box dl { display: grid; grid-template-columns: 23mm 1fr; align-content: start; gap: .8mm 1.5mm; margin: 0; font-size: 6.6pt; line-height: 1.25; }
.reference-client-box dt, .reference-client-box dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }.reference-client-box dt { font-weight: 700; }.reference-client-box dt::after { content: " :"; }.reference-client-box dd { color: #42484c; }
.reference-slogan { display: flex; align-items: center; justify-content: space-between; min-height: 10mm; padding: 1mm 6mm; color: #777; }
.reference-slogan > span { font-size: 14pt; font-weight: 300; letter-spacing: .03em; }.reference-slogan > div { display: flex; align-items: center; gap: 2.5mm; }.service-badges b { padding: 1mm 1.4mm; border: 1px solid #8d969c; color: #5d686f; font-size: 5.5pt; letter-spacing: .04em; }.service-badges strong { color: #68727a; font-size: 11pt; }
.reference-subject { margin: 0 0 2mm !important; padding: 1.5mm 2mm; border-left: 3px solid #233e70; color: #233e70 !important; font-size: 9pt !important; }
.reference-products-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.reference-products-table thead { display: table-header-group; }
.reference-products-table th { padding: 2mm 1.8mm; color: white; background: #233e70; font-size: 8pt; font-weight: 500; text-align: left; }
.reference-products-table th.number { text-align: center; }.reference-products-table .image-column { width: 48mm; text-align: center; }.reference-products-table .quantity-column { width: 13mm; }.reference-products-table .price-column { width: 20mm; }.reference-products-table .discount-column { width: 17mm; }.reference-products-table .total-column { width: 22mm; }
.reference-products-table tbody tr { break-inside: avoid; page-break-inside: avoid; }
.reference-products-table td { height: auto; padding: 1.8mm 1.5mm; border-bottom: 1px solid #888; vertical-align: top; font-size: 6.5pt; line-height: 1.22; }
.reference-products-table td.number { padding-top: 1.8mm; vertical-align: middle; text-align: center; white-space: nowrap; }
.reference-product-image { text-align: center; vertical-align: middle !important; }.reference-product-image img { width: 43mm; height: 24mm; object-fit: contain; }.reference-product-image span { display: inline-grid; place-items: center; width: 40mm; height: 21mm; color: #aaa; border: 1px dashed #bbb; font-size: 6pt; }
.reference-product-copy { min-width: 0; }.product-copy-layout { min-height: 25mm; display: grid; grid-template-columns: 7mm minmax(0,1fr); gap: 1mm; align-content: start; }.reference-product-copy .line-index { text-align: center; }.product-copy-layout > div { min-width: 0; overflow-wrap: anywhere; }.reference-product-copy strong { font-size: 6.8pt; text-transform: uppercase; }.reference-product-copy p { margin: .8mm 0 0; color: #30363a; font-size: 6.4pt; line-height: 1.28; overflow-wrap: anywhere; }
.reference-summary { display: grid; grid-template-columns: 1fr 39mm; gap: 4mm; align-items: center; margin-top: 7mm; padding: 1.5mm 2mm; border: 1px solid #333; break-inside: avoid; page-break-inside: avoid; }
.summary-gallery { display: flex; align-items: center; gap: 4mm; min-height: 17mm; color: #576b79; }.summary-gallery > div:last-child { display: grid; margin-left: auto; text-align: center; }.summary-gallery strong { color: #050505; font-size: 22pt; letter-spacing: .08em; line-height: 1; }.summary-gallery small { color: #333; font-size: 5pt; letter-spacing: .23em; }.summary-gallery b { margin-top: 1mm; color: #111; font-size: 9pt; }.summary-products { display: flex; gap: 1.4mm; }.summary-products span { padding: 2mm 1.7mm; border: 1px solid #718797; color: #4d687a; background: #f2f6f8; font-size: 5.2pt; font-weight: 800; }
.reference-summary dl { display: grid; grid-template-columns: 1fr auto; gap: .7mm 2mm; margin: 0; font-size: 6.8pt; }.reference-summary dt,.reference-summary dd { margin: 0; }.reference-summary dd { text-align: right; }.reference-summary .grand-total { font-weight: 800; }
.reference-quote-footer { display: grid; grid-template-columns: .85fr 1.2fr 1fr; margin-top: 2.5mm; padding: 0; border: 0; color: #686f73; font-size: 6.4pt; line-height: 1.4; text-align: left; break-inside: avoid; page-break-inside: avoid; }
.reference-quote-footer > div { min-height: 22mm; padding: 1.5mm 2mm; border-left: 1px solid #444; }.reference-quote-footer > div:last-child { color: #303438; font-size: 6.7pt; }
.reference-notes { margin-top: 2mm; padding: 2mm; border-top: 1px solid #999; color: #555; font-size: 6.4pt; break-inside: avoid; }
.history-product-image { width: 92px; text-align: center; }.history-product-image img { width: 82px; height: 64px; object-fit: contain; border: 1px solid #dbe4e9; border-radius: 7px; background: white; }

@media print {
  @page { size: Letter; margin: 0; }
  .dasec-reference-quote { width: 216mm; min-height: 279mm; padding: 10mm 11mm 9mm; }
}

/* Piloto 18: margen en constructor, biblioteca, correlativos y orden de líneas */
.commercial-summary-card { gap: 8px; }
.commercial-summary-card label { margin: 0; }
.margin-control { display: flex; align-items: center; gap: 8px; }
.margin-control input { width: 110px; font-size: 1.1rem; font-weight: 700; }
.margin-control b { color: var(--muted, #607080); }
.builder-context-notice { margin-bottom: 18px; }
.quote-line-actions, .line-order-actions { display: flex; align-items: center; gap: 8px; }
.line-order-actions button { min-width: 36px; padding: 8px 10px; }
.line-order-actions .remove-quote-line { min-width: auto; }
.quote-save-error { margin-bottom: 14px; }
.builder-action-dialog { width: min(760px, calc(100vw - 32px)); }
.builder-name-field { display: grid; gap: 7px; margin: 16px 0; }
.builder-action-options { display: grid; gap: 10px; }
.builder-option { display: grid; gap: 4px; width: 100%; text-align: left; padding: 16px; border-radius: 12px; border: 1px solid #ccd7e2; background: #fff; color: #17324a; }
.builder-option:hover { border-color: #2776b5; background: #f5faff; }
.builder-option strong { font-size: 1rem; }
.builder-option span { font-size: .88rem; color: #617385; font-weight: 400; }
.builder-option.primary-option { border-color: #1f74b7; background: #eef7ff; }
.existing-quote-picker { margin-top: 16px; padding-top: 16px; border-top: 1px solid #d9e1e8; }
.existing-quote-picker label { display: grid; gap: 7px; }
.existing-quote-picker .search-results { position: static; display: grid; margin-top: 10px; max-height: 260px; overflow: auto; }
.furniture-library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.furniture-card { overflow: hidden; padding: 0; }
.furniture-card-image { min-height: 220px; display: grid; place-items: center; background: #f4f7fa; border-bottom: 1px solid #e1e7ed; }
.furniture-card-image img { width: 100%; height: 240px; object-fit: contain; }
.furniture-card-image span { color: #8794a0; }
.furniture-card-body { display: grid; gap: 12px; padding: 20px; }
.compact-data-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.compact-data-list div { display: grid; gap: 2px; }
.compact-data-list dt { color: #71808e; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.compact-data-list dd { margin: 0; font-weight: 700; }
.narrow-management-shell { max-width: 980px; }
.sequence-current { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; border-bottom: 1px solid #e1e7ed; }
.sequence-current div { display: grid; gap: 6px; }
.sequence-current span { color: #6f7e8a; }
.sequence-current strong { font-size: 2rem; color: #123d61; }
.sequence-form { padding: 20px; }
@media (max-width: 760px) {
  .quote-line-actions { align-items: stretch; flex-direction: column; }
  .line-order-actions { flex-wrap: wrap; }
  .sequence-current { grid-template-columns: 1fr; }
  .compact-data-list { grid-template-columns: 1fr; }
}

/* Piloto 19: permisos, biblioteca segura y documentos multipágina */
.permission-group { margin: 0 0 18px; padding: 18px; border: 1px solid #d8e2e9; border-radius: 14px; background: #fbfdfe; }
.permission-group legend { padding: 0 8px; color: #123d61; font-weight: 850; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.permission-grid label { min-width: 0; }
.permission-admin-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid #cbd9e3; }
.permission-admin-tabs a { padding: 11px 18px; color: #496579; font-weight: 800; text-decoration: none; border-bottom: 3px solid transparent; }
.permission-admin-tabs a.active { color: #0b5f9b; border-bottom-color: #0d74b8; background: #f5f9fc; }
.permission-profile-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 14px; align-items: end; }
.permission-profile-row label span { display: block; margin-bottom: 6px; font-weight: 800; }
.permission-matrix-wrap { overflow-x: auto; border: 1px solid #d7e2e9; border-radius: 10px; background: #fff; }
.permission-matrix { width: 100%; min-width: 850px; border-collapse: collapse; }
.permission-matrix th, .permission-matrix td { padding: 9px 10px; border-bottom: 1px solid #dce5eb; text-align: center; vertical-align: middle; }
.permission-matrix thead th { position: sticky; top: 0; z-index: 1; color: #35566e; background: #eaf1f6; font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
.permission-matrix th:first-child { min-width: 210px; text-align: left; }
.permission-matrix input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: #0875b9; }
.permission-matrix .permission-not-applicable { color: #91a2ae; background: #f3f6f8; font-weight: 700; }
.permission-parent th, .permission-parent td { background: #dfeaf2; color: #123d61; font-weight: 900; }
.permission-child:hover th, .permission-child:hover td { background: #f7fafc; }
.permission-tree-line { display: inline-block; width: 24px; color: #6f8da1; }
.permission-cell .errorlist, .permission-matrix td .errorlist { min-width: 170px; text-align: left; }
.special-permission-groups { display: grid; gap: 16px; }
.special-permission-groups section { padding-bottom: 14px; border-bottom: 1px solid #dde6ec; }
.special-permission-groups section:last-child { padding-bottom: 0; border-bottom: 0; }
.special-permission-groups h3 { margin: 0 0 10px; color: #173f5d; font-size: 14px; }
.permission-profile-layout { display: grid; grid-template-columns: minmax(230px, .28fr) minmax(700px, 1fr); gap: 18px; align-items: start; }
.permission-profile-layout > .panel { margin-top: 0; }
.permission-profile-list nav { display: grid; }
.permission-profile-list nav a { display: grid; gap: 3px; padding: 13px 15px; border-bottom: 1px solid #e1e8ed; color: #173f5d; text-decoration: none; }
.permission-profile-list nav a:hover, .permission-profile-list nav a.active { background: #eaf4fb; box-shadow: inset 4px 0 #0875b9; }
.permission-profile-list nav a span { color: #61798a; font-size: 11px; }
.permission-profile-list nav a em { width: max-content; padding: 2px 6px; border-radius: 10px; color: #8f2a25; background: #fde9e7; font-size: 10px; font-style: normal; font-weight: 800; }
.protected-access-badge { padding: 7px 10px; border-radius: 999px; color: #754500; background: #fff0d2; font-size: 11px; font-weight: 900; }
.permission-audit { margin-top: 18px; }
.wide-field { grid-column: 1 / -1; }
.wide-user-management { grid-template-columns: minmax(480px, .95fr) minmax(620px, 1.25fr); }
.users-list-heading { grid-template-columns: minmax(0, 1fr) auto; }
.users-list-heading .heading-actions { align-items: center; justify-content: flex-end; padding: 18px 22px; }
.users-list-heading .button-link { margin: 0; }
.users-list-heading .heading-actions .button-link:last-child { color: white; background: var(--blue); }
.user-permission-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.user-permission-guide span { padding: 11px 13px; border: 1px solid #d7e3eb; border-radius: 10px; color: #60798b; background: white; font-size: 11px; line-height: 1.45; }
.user-permission-guide b { display: block; margin-bottom: 2px; color: #173f5d; font-size: 12px; }
.full-user-list { margin-top: 0; }
.full-user-list .users-table { min-width: 960px; }
.exception-count { display: block; margin-top: 6px; color: #9a5b08 !important; font-weight: 750; }
.prepared-team-details { margin-top: 16px; padding: 0; }
.prepared-team-details summary { cursor: pointer; padding: 14px 18px; color: #496579; font-size: 12px; font-weight: 800; }
.prepared-team-details .prepared-team-action { margin: 0; border: 0; border-top: 1px solid #dce5eb; border-radius: 0 0 12px 12px; }

.user-editor-panel { max-width: 1280px; margin: 14px auto 0; overflow: visible; }
.user-editor-heading h1 { margin: 5px 0 0; color: var(--navy); font-size: 27px; }
.user-editor-form { padding: 0 22px 22px; }
.user-editor-tabs { position: sticky; top: 64px; z-index: 12; display: flex; gap: 6px; margin: 0 -22px 22px; padding: 12px 22px 0; border-bottom: 1px solid #cbd9e3; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); }
.user-editor-tabs button { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; color: #587286; background: transparent; font-size: 12px; font-weight: 850; cursor: pointer; }
.user-editor-tabs button span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #476579; background: #e8eff4; }
.user-editor-tabs button.active { color: #0b5f9b; border-bottom-color: #0d74b8; background: #edf6fc; }
.user-editor-tabs button.active span { color: white; background: #0d74b8; }
.user-tab-panel[hidden] { display: none !important; }
.user-tab-panel { min-height: 330px; }
.user-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 16px; padding: 0 2px 13px; border-bottom: 1px solid #dce5eb; }
.user-section-heading h2 { margin: 0 0 4px; color: #153f60; font-size: 20px; }
.user-section-heading p { margin: 0; color: #6b8292; font-size: 12px; }
.user-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; max-width: 960px; }
.user-account-grid label > span:first-child { display: block; margin-bottom: 6px; color: #4f687a; font-size: 12px; font-weight: 800; }
.user-account-grid input:not([type="checkbox"]), .user-account-grid select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #c7d6df; border-radius: 8px; background: white; font: inherit; }
.user-account-grid label > small { display: block; margin-top: 5px; color: #788d9c; font-size: 10px; }
.account-active-field { align-self: stretch; }
.account-active-field .checkbox-line { margin-top: 0; }
.tab-next-action { display: flex; justify-content: flex-end; max-width: 960px; margin-top: 22px; }
.sticky-user-actions { position: sticky; bottom: 10px; z-index: 15; justify-content: flex-end; margin: 24px -4px 0; padding: 11px; border: 1px solid #d3e0e8; border-radius: 11px; background: rgba(255,255,255,.97); box-shadow: 0 7px 22px rgba(18,48,70,.14); backdrop-filter: blur(8px); }
.sticky-user-actions .button-link { margin: 0; }
.permission-visual-legend { display: flex; gap: 13px; flex-wrap: wrap; }
.permission-visual-legend span { display: flex; align-items: center; gap: 6px; color: #60798a; font-size: 10px; font-weight: 750; }
.permission-visual-legend i { width: 13px; height: 13px; border: 1px solid #c8d6df; border-radius: 3px; background: white; }
.permission-visual-legend i.exception { border-color: #dca34b; background: #fff0d7; }
.user-tab-panel .permission-group { background: white; }
.user-tab-panel .permission-matrix-fieldset { padding: 16px; }
.user-tab-panel .permission-matrix-wrap { overflow: visible; }
.user-tab-panel .permission-matrix { min-width: 930px; table-layout: fixed; }
.user-tab-panel .permission-matrix thead th { top: 121px; }
.user-tab-panel .permission-matrix th:first-child { position: sticky; left: 0; z-index: 3; width: 270px; min-width: 270px; box-shadow: 1px 0 #dce5eb; }
.user-tab-panel .permission-matrix thead th:first-child { z-index: 5; background: #eaf1f6; }
.user-tab-panel .permission-child th:first-child { background: white; }
.user-tab-panel .permission-child:hover th:first-child { background: #f7fafc; }
.user-tab-panel .permission-parent th:first-child { background: #dfeaf2; }
.user-tab-panel .permission-matrix thead th:not(:first-child) { width: 132px; }
.matrix-header-label { display: block; max-width: 120px; margin: auto; line-height: 1.25; white-space: normal; }
.matrix-help { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; color: #5d7587; background: #edf5fa; font-size: 11px; }
.matrix-help strong { color: #173f5d; }
.permission-cell { position: relative; transition: background .15s ease; }
.permission-cell.is-permission-exception { background: #fff0d7 !important; box-shadow: inset 0 0 0 1px #edc779; }
.permission-cell.is-permission-exception::after { content: "Excepción"; position: absolute; right: 4px; bottom: 2px; color: #98600d; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.checkbox-line.is-permission-exception { border-color: #e1aa50; background: #fff4df; box-shadow: inset 3px 0 #d99424; }
.furniture-filter-bar select { min-width: 150px; }
.furniture-management { margin-top: 4px; padding-top: 10px; border-top: 1px solid #dce5eb; }
.furniture-management summary { cursor: pointer; color: #174f79; font-weight: 800; }
.furniture-management form { margin-top: 9px; }
.inline-management-form { display: flex; gap: 8px; }
.inline-management-form input { flex: 1; min-width: 0; }
.archived-card { opacity: .84; }
.builder-save-confirmation .dialog-actions { margin-top: 12px; }
.commercial-only-summary { grid-template-columns: minmax(280px, 440px); justify-content: center; }
.quote-line.requires-approval { border-color: #d49b36; box-shadow: 0 0 0 2px rgba(212,155,54,.12); }
.approval-banner { margin: 14px 0; }
.approval-decision-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; }
.approval-form { display: flex; align-items: center; gap: 10px; }
.approval-form input { min-width: 280px; }
.quote-save-error ul { margin: 8px 0 0; padding-left: 20px; }

.quote-document { display: grid; gap: 18px; }
.quote-page { position: relative; width: min(216mm, 100%); min-height: 279mm; margin: 0 auto; padding: 9mm 11mm 10mm; color: #23282c; background: #fff; box-shadow: 0 8px 32px rgba(12,36,54,.2); overflow: hidden; box-sizing: border-box; }
.official-dasec-logo { display: block; width: 56mm; height: 17mm; object-fit: contain; object-position: left center; }
.official-dasec-logo.compact-logo { width: 37mm; height: 11mm; }
.continuation-header { display: flex; align-items: center; justify-content: space-between; gap: 10mm; margin-bottom: 4mm; padding-bottom: 2mm; border-bottom: 1.2mm solid #233e70; }
.continuation-header > div { display: flex; align-items: center; gap: 5mm; color: #4f5c65; font-size: 8pt; }
.continuation-header > strong { color: #233e70; font-size: 9pt; }
.page-counter { position: absolute; right: 11mm; bottom: 4mm; color: #707b83; font-size: 6.5pt; }
.summary-continuation-title { margin: 18mm 0 6mm; color: #233e70; font-size: 16pt; font-weight: 800; text-align: center; }
.final-page-spacer { min-height: 3mm; }
.quote-page .reference-summary { margin-top: 4mm; }
.quote-page .reference-quote-footer { margin-top: 2mm; }

@media (max-width: 980px) {
  .wide-user-management { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
  .permission-profile-layout { grid-template-columns: 1fr; }
  .permission-profile-row { grid-template-columns: 1fr; }
  .users-list-heading { grid-template-columns: 1fr; }
  .users-list-heading .heading-actions { justify-content: flex-start; }
  .user-permission-guide { grid-template-columns: 1fr; }
  .user-account-grid { grid-template-columns: 1fr; }
  .user-editor-tabs { top: 58px; overflow-x: auto; }
  .user-editor-tabs button { flex: 0 0 auto; }
  .user-section-heading { align-items: stretch; flex-direction: column; }
  .user-tab-panel .permission-matrix-wrap { overflow-x: auto; overflow-y: hidden; }
  .user-tab-panel .permission-matrix thead th { position: static; }
  .approval-decision-panel, .approval-form { align-items: stretch; flex-direction: column; }
  .approval-form input { min-width: 0; width: 100%; }
}

@media print {
  @page { size: Letter portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: white !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .print-quote-body { margin: 0; padding: 0 !important; background: white; }
  .quote-document { display: block; }
  .quote-page { width: 216mm; height: 279mm; min-height: 279mm; margin: 0; padding: 9mm 11mm 10mm; box-shadow: none; break-after: page; page-break-after: always; }
  .quote-page:last-child { break-after: auto; page-break-after: auto; }
  .reference-products-table tbody tr, .reference-summary, .reference-quote-footer, .reference-notes { break-inside: avoid !important; page-break-inside: avoid !important; }
  .reference-products-table th { color: white !important; background: #233e70 !important; }
  .print-action { display: none !important; }
}
.role-default-action { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d5e2ea; border-radius: 10px; background: #f7fafc; }
.role-default-action small { color: var(--muted); }
@media (max-width: 720px) { .role-default-action { align-items: stretch; flex-direction: column; } }

/* Versión 19.4: precio visible, medidas enteras, promociones web y cajones editables */
.builder-price-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 8px 2px 0;
  border: 0;
  border-top: 1px solid #e2e9ee;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.builder-price-main { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.builder-price-main > span, .builder-margin-top > span { color: #657584; font-size: .72rem; white-space: nowrap; }
.builder-price-main > strong { color: #123d61; font-size: 1.55rem; line-height: 1; white-space: nowrap; }
.builder-price-main > small, .builder-margin-top > small { color: #71808c; font-size: .66rem; white-space: nowrap; }
.builder-margin-top { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.builder-margin-top > strong { color: #123d61; font-size: 1.15rem; }
.builder-margin-top .margin-control { width: 92px; }
.drawer-height-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d5e1e8;
  border-radius: 11px;
  background: #f7fafc;
}
.drawer-height-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.drawer-height-heading small { color: #6b7d8b; }
.drawer-height-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.web-promotion-field .readout-box { color: #12643a; background: #eaf7ef; border-color: #b9dec7; font-weight: 800; }
.description-counter { float: right; color: #547084; font-weight: 800; }
.reference-product-copy p { max-height: 17mm; overflow: hidden; }

@media (max-width: 760px) {
  .builder-price-strip { align-items: stretch; flex-direction: column; gap: 7px; }
  .builder-price-main { align-items: flex-start; flex-wrap: wrap; }
  .builder-price-main > small { flex-basis: 100%; }
  .builder-margin-top { justify-content: flex-start; flex-wrap: wrap; }
  .drawer-height-list { grid-template-columns: 1fr; }
}

/* Versión 19.4: paginación Carta calibrada para hasta seis productos estándar */
.reference-products-table td {
  padding-top: 1.15mm;
  padding-bottom: 1.15mm;
}
.reference-product-image img {
  width: 40mm;
  height: 20mm;
}
.reference-product-image span {
  width: 38mm;
  height: 18mm;
}
.product-copy-layout {
  min-height: 21mm;
}
.reference-product-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  max-height: 19.5mm;
}

/* Versión 19.4: navegación lateral, catálogos administrables y configuración central */
:root { --sidebar-width: 236px; --modern-topbar-height: 66px; }
.modern-topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1100; height: var(--modern-topbar-height);
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  color: #102d4c; background: rgba(255,255,255,.97); border-bottom: 1px solid #dce5ec;
  box-shadow: 0 2px 12px rgba(12,43,70,.05); backdrop-filter: blur(10px);
}
.menu-collapse { width: 38px; height: 38px; padding: 0; border: 1px solid #d7e2ea; border-radius: 50%; color: #1e4d78; background: #fff; }
.modern-brand { display: flex; align-items: center; gap: 10px; min-width: 210px; color: #102d4c; text-decoration: none; }
.modern-brand .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #102d4c; background: #f4a51c; font-weight: 900; }
.modern-brand span:last-child { display: grid; }
.modern-brand strong { font-size: 15px; }.modern-brand small { color: #688096; font-size: 9px; }
.topbar-search { flex: 1; max-width: 470px; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #dbe5ec; border-radius: 10px; background: #f8fafc; }
.topbar-search input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; }.topbar-search kbd { padding: 3px 7px; border: 1px solid #dce5ec; border-radius: 6px; color: #758697; background: white; font-size: 10px; }
.modern-account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.builder-primary-actions { min-width: 116px; display: grid; gap: 6px; }
.builder-primary-actions > * { box-sizing: border-box; width: 100%; min-height: 34px; }
.builder-new-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #1266b1; border-radius: 9px; color: #fff; background: #1266b1; font-size: 11px; font-weight: 800; line-height: normal; text-decoration: none; }
.builder-new-button:hover { color: #fff; background: #0b5d98; }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #0c4f8d; font-weight: 900; }
.modern-account .account-name { display: grid; min-width: 120px; }.modern-account .account-name strong { font-size: 12px; }.modern-account .account-name small { color: #718294; font-size: 9px; }
.modern-account .version { padding: 7px 10px; border: 1px solid #cbd9e3; border-radius: 999px; color: #254f72; background: #f7fafc; font-size: 10px; }
.modern-sidebar {
  position: fixed; z-index: 1050; top: var(--modern-topbar-height); bottom: 0; left: 0; width: var(--sidebar-width);
  display: flex; flex-direction: column; padding: 18px 13px; border-right: 1px solid #dce5ec; background: #fff; overflow-y: auto;
}
.modern-sidebar nav { display: grid; gap: 3px; }.sidebar-group { margin: 18px 10px 6px; color: #1763aa; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 11px; border-left: 3px solid transparent; border-radius: 9px; color: #38546d; text-decoration: none; }
.sidebar-link span { width: 22px; color: #416a91; font-size: 17px; text-align: center; }.sidebar-link b { font-size: 12px; font-weight: 750; }
.sidebar-link:hover { background: #f4f8fb; }.sidebar-link.active { border-left-color: #1169c4; color: #0b58a5; background: #eaf3ff; }
.sidebar-footer { display: grid; grid-template-columns: 24px 1fr; gap: 6px 10px; margin-top: auto; padding: 15px 10px 0; border-top: 1px solid #e2e8ed; color: #567086; }.sidebar-footer small { grid-column: 1 / -1; color: #8a98a4; font-size: 9px; }
body:not(.print-quote-body) > .page-shell { margin-top: var(--modern-topbar-height); margin-left: var(--sidebar-width); width: auto; max-width: none; }
body.menu-collapsed { --sidebar-width: 72px; }.menu-collapsed .modern-sidebar { width: 72px; }.menu-collapsed .sidebar-link b,.menu-collapsed .sidebar-group,.menu-collapsed .sidebar-footer b,.menu-collapsed .sidebar-footer small { display:none; }.menu-collapsed .sidebar-link { justify-content:center; }.menu-collapsed .modern-brand span:last-child { display:none; }.menu-collapsed .modern-brand { min-width:44px; }

.modern-management-shell { padding: 28px 32px 50px; background: #f6f9fb; min-height: calc(100vh - var(--modern-topbar-height)); }
.modern-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.modern-page-heading h1 { margin: 3px 0 6px; color: #102f4f; font-size: clamp(24px, 3vw, 36px); }.modern-page-heading p:not(.eyebrow) { margin: 0; color: #657a8d; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }.primary-button { display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border:1px solid #1266b1;border-radius:9px;color:white;background:#1266b1;font-weight:800;text-decoration:none; }
.price-kpi-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px;border:1px solid #dbe5ec;border-radius:14px;background:white;overflow:hidden; }
.price-kpi-grid article { display:grid;gap:5px;padding:18px 20px;border-right:1px solid #e0e7ec; }.price-kpi-grid article:last-child{border-right:0}.price-kpi-grid span{color:#667d90;font-size:11px}.price-kpi-grid strong{color:#153f64;font-size:22px}.price-kpi-grid small{color:#6f8495;font-size:10px}.price-validation-kpi{background:#eff7ff!important}
.catalog-filter-bar { display:grid;grid-template-columns:minmax(260px,1.4fr) minmax(180px,.8fr) minmax(160px,.6fr) auto auto;gap:12px;align-items:end;margin-bottom:14px; }.catalog-filter-bar label{display:grid;gap:5px}.catalog-filter-bar label span{color:#526b80;font-size:10px;font-weight:800}.catalog-filter-bar input,.catalog-filter-bar select{width:100%;padding:11px 12px;border:1px solid #d3e0e8;border-radius:9px;background:white}
.catalog-table-panel { padding:0;overflow:hidden; }.catalog-table-wrap{overflow:auto}.catalog-edit-table{width:100%;min-width:900px;border-collapse:collapse}.catalog-edit-table th{padding:13px 16px;color:#526b80;background:#f7fafc;text-align:left;font-size:10px;text-transform:uppercase}.catalog-edit-table td{padding:10px 16px;border-top:1px solid #e4eaee;color:#334f66;font-size:11px}.catalog-edit-table td:first-child{min-width:245px}.catalog-edit-table td small{display:block;color:#8796a3}.table-text-input{width:100%;min-width:130px;padding:7px 8px;border:1px solid transparent;border-radius:7px;background:transparent}.table-text-input:focus{border-color:#9fc4e2;background:white}.money-table-input{display:flex;align-items:center;gap:7px;padding:0 9px;border:1px solid #d4e0e8;border-radius:8px;background:white}.money-table-input span{color:#377b55;font-weight:900}.money-table-input input{width:100%;padding:8px 0;border:0;background:transparent}.status-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;color:#157341;background:#e7f6ed;font-weight:800}.status-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:#29a858}.status-pill.inactive{color:#7d5656;background:#f6eaea}.status-pill.inactive::before{background:#b86464}.inactive-row{opacity:.66}.table-actions{display:flex;gap:4px}.table-actions button{width:30px;height:30px;padding:0;border:0;border-radius:7px;color:#43627b;background:transparent}.table-actions button:hover{background:#edf4f8}.table-actions .danger-action{color:#b8483d}.catalog-table-footer{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-top:1px solid #e2e9ed;color:#6a7f90}.catalog-table-footer div{display:flex;gap:7px}.catalog-table-footer a,.catalog-table-footer b{display:grid;place-items:center;min-width:30px;height:30px;border:1px solid #d5e1e8;border-radius:7px;text-decoration:none}.catalog-table-footer b{color:white;background:#1266b1}
.side-form-dialog{width:min(430px,calc(100vw - 30px));margin-right:0;margin-left:auto;height:100vh;max-height:none;border:0;border-left:1px solid #d9e4eb;border-radius:0;padding:0;box-shadow:-10px 0 36px rgba(18,50,76,.18)}.side-form-dialog::backdrop{background:rgba(18,39,57,.35)}.side-form-dialog form{height:100%;display:flex;flex-direction:column;gap:18px;padding:25px}.side-form-dialog label{display:grid;gap:7px}.side-form-dialog label>span{font-weight:800;color:#36546d}.side-form-dialog input{padding:11px;border:1px solid #d3e0e8;border-radius:8px}.side-form-dialog .dialog-actions{margin-top:auto}

.manufacturing-layout{display:grid;grid-template-columns:210px minmax(620px,1fr) 270px;gap:18px;align-items:start}.config-section-index{position:sticky;top:88px;display:grid;padding:10px;border:1px solid #dce5eb;border-radius:12px;background:white}.config-section-index a{padding:9px 10px;border-radius:8px;color:#49657b;text-decoration:none;font-size:11px;font-weight:750}.config-section-index a:hover{color:#0e5da5;background:#edf5fb}.manufacturing-form{display:grid;gap:16px}.config-group{scroll-margin-top:85px}.config-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:18px}.config-field{display:grid;gap:6px}.config-field>span{color:#3b5b73;font-size:10px;font-weight:800}.parameter-input{display:flex;align-items:center;border:1px solid #d2dfe7;border-radius:8px;background:white;overflow:hidden}.parameter-input input{flex:1;min-width:0;padding:10px;border:0;background:transparent}.parameter-input b{padding:10px;color:#6b7f90;background:#f6f9fb;font-size:10px}.config-field small{color:#7a8c99;font-size:9px}.wide-field{grid-column:span 2}.config-save-panel{position:sticky;bottom:12px;z-index:5;display:flex;align-items:end;justify-content:space-between;gap:18px;padding:15px 18px;box-shadow:0 8px 25px rgba(20,53,78,.16)}.config-save-panel label{flex:1;display:grid;gap:5px}.config-save-panel input{width:100%;padding:10px;border:1px solid #d4e1e9;border-radius:8px}.config-save-panel>div{display:flex;gap:8px}.manufacturing-preview{position:sticky;top:88px}.manufacturing-preview .panel{display:grid;gap:10px;padding:18px}.preview-cost{color:#0d4f85;font-size:26px}.manufacturing-preview dl{display:grid;grid-template-columns:1fr auto;gap:8px;margin:8px 0 0}.manufacturing-preview dt,.manufacturing-preview dd{margin:0;font-size:10px}.manufacturing-preview dd{font-weight:800}.config-version-card{display:grid;gap:3px;min-width:230px;padding:14px 16px;border:1px solid #d3e0e8;border-radius:12px;background:white}.config-version-card span,.config-version-card small{color:#718494;font-size:10px}.config-version-card strong{color:#0e4f85}.config-history{margin-top:18px;scroll-margin-top:85px}

/* Edición de cotización: líneas identificables, índice y acciones duplicadas */
.quote-header-form{border-top:4px solid #173f69}.quote-client-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.quote-lines-panel>.panel-heading{position:sticky;top:66px;z-index:20;background:white;box-shadow:0 5px 12px rgba(20,52,78,.06)}.quote-editor-lines-layout{display:grid;grid-template-columns:170px minmax(0,1fr);gap:14px;padding:14px;background:#f5f8fa}.quote-line-index{position:sticky;top:145px;align-self:start;display:grid;gap:9px;padding:12px;border:1px solid #d8e4eb;border-radius:11px;background:white;max-height:calc(100vh - 180px);overflow:auto}.quote-line-index>strong{color:#173e61;text-transform:uppercase;font-size:10px;letter-spacing:.07em}.quote-line-index-list{display:grid;gap:6px}.quote-line-index-list button{display:flex;align-items:center;gap:8px;width:100%;padding:8px;border:0;border-radius:8px;color:#426079;background:#f6f9fb;text-align:left}.quote-line-index-list button:hover{background:#e7f2fb}.quote-line-index-list button span{display:grid;place-items:center;width:24px;height:24px;border:1px solid #a8c4d8;border-radius:6px;color:#0e65ad;background:white;font-weight:900}.quote-line-index-list button b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.quote-lines{display:grid;gap:12px}.quote-line{border:1px solid #d2e0e8;border-left:5px solid #2375b6;border-radius:12px;background:white;box-shadow:0 3px 11px rgba(15,48,72,.05)}.quote-line-heading{padding:9px 12px;color:#123e64;background:#edf5fa;border-radius:8px 8px 0 0}.quote-line-fields{padding:13px}.quote-line-main{grid-template-columns:180px minmax(260px,1fr)}.quote-line-commercial{padding-top:10px;border-top:1px solid #e1e8ed;grid-template-columns:repeat(5,minmax(115px,1fr))}.quote-line-actions-bottom{justify-content:flex-end;padding:15px 4px 2px}.quote-submit-bar{position:sticky;bottom:0;z-index:30;margin-top:16px;box-shadow:0 -6px 24px rgba(19,51,76,.14)}

/* El pie se ancla a la base de cada hoja de la cotización */
.quote-page{display:flex;flex-direction:column}.reference-products-table{flex:0 0 auto}.quote-page-footer-anchor{margin-top:auto;padding-top:4mm;break-inside:avoid;page-break-inside:avoid}.quote-page .reference-summary{margin-top:0}.continuation-total{align-content:center}.continuation-total dt,.continuation-total dd{color:#617384}.reference-quote-footer{margin-top:2mm}.page-counter{bottom:2.7mm}

@media (max-width:1180px){
  .topbar-search{display:none}.modern-account .account-name{display:none}.manufacturing-layout{grid-template-columns:1fr}.config-section-index{position:static;grid-template-columns:repeat(3,1fr)}.manufacturing-preview{position:static}.quote-editor-lines-layout{grid-template-columns:1fr}.quote-line-index{position:static;max-height:none}.quote-line-index-list{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}.price-kpi-grid{grid-template-columns:repeat(2,1fr)}.catalog-filter-bar{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
  :root{--sidebar-width:0px}.modern-sidebar{display:none}.modern-topbar{padding:0 10px}.modern-brand{min-width:0}.modern-brand small{display:none}.modern-account .version{display:none}.modern-management-shell{padding:18px 12px 40px}.modern-page-heading{flex-direction:column}.price-kpi-grid{grid-template-columns:1fr}.price-kpi-grid article{border-right:0;border-bottom:1px solid #e0e7ec}.catalog-filter-bar{grid-template-columns:1fr}.config-field-grid{grid-template-columns:1fr}.wide-field{grid-column:auto}.config-section-index{grid-template-columns:1fr 1fr}.config-save-panel{position:static;align-items:stretch;flex-direction:column}.config-save-panel>div{flex-direction:column}.quote-client-grid{grid-template-columns:1fr}.quote-line-main,.quote-line-commercial{grid-template-columns:1fr}.quote-line-index-list{grid-template-columns:1fr 1fr}
}
@media print{
  .quote-page{display:flex!important;flex-direction:column!important}.quote-page-footer-anchor{margin-top:auto!important;padding-top:3mm!important}.reference-summary,.reference-quote-footer{break-inside:avoid!important;page-break-inside:avoid!important}
}

/* Versión 19.4: controles amigables para reglas de fabricación */
.config-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d2dfe7;
  border-radius: 8px;
  color: #294b64;
  background: #fff;
}
.edge-rule-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.edge-rule-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d5e2e9;
  border-radius: 8px;
  color: #3e5e76;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 750;
}
.edge-rule-picker label:has(input:checked) {
  border-color: #83b5dd;
  color: #0d5d9f;
  background: #eaf4fc;
}
.edge-rule-picker input { accent-color: #1266b1; }
.config-history form { margin: 0; }
.config-history .compact-button { white-space: nowrap; }
.reference-notes { margin-top: 3mm; }

@media (max-width: 760px) {
  .edge-rule-picker { grid-template-columns: 1fr 1fr; }
}

/* PASO 12 — DESGLOSE INTERNO DE DESCUENTOS */
.internal-discount-breakdown {
  min-width: 190px;
}

.internal-discount-breakdown strong,
.internal-discount-breakdown small {
  display: block;
  white-space: nowrap;
}

.internal-discount-breakdown small {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

@media(max-width:760px) {
 body.menu-collapsed { --sidebar-width:0px; }
 body.mobile-menu-open .modern-sidebar { display:flex; width:235px; max-width:85vw; box-shadow:5px 0 18px #173b5e30; }
 body.mobile-menu-open .sidebar-link b,body.mobile-menu-open .sidebar-group,body.mobile-menu-open .sidebar-footer b,body.mobile-menu-open .sidebar-footer small { display:block; }
 body.mobile-menu-open .sidebar-link { justify-content:flex-start; }
}
.stock-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 14px}.stock-kpis article{background:#fff;border:1px solid #bdcfe3;border-radius:4px;padding:14px}.stock-kpis span{display:block;color:#536b86;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.stock-kpis strong{display:block;color:#083b70;font-size:24px;margin-top:5px}.stock-entry-grid select{min-width:210px}.stock-entry-grid input{min-width:105px}.stock-entry-grid td{vertical-align:top}.stock-line-total{font-weight:700;white-space:nowrap}.stock-warning{color:#a3261f;font-weight:700}.module-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
@media(max-width:760px){.stock-kpis{grid-template-columns:repeat(2,minmax(120px,1fr))}.stock-entry-grid{min-width:1050px}}

/* Catálogo visual de materiales del constructor */
.material-picker-trigger{display:inline-flex;align-items:center;gap:7px}.material-trigger-swatch{width:20px;height:20px;border:1px solid #bfd0db;border-radius:5px;background:#eef3f6 center/cover no-repeat;box-shadow:inset 0 0 0 1px #ffffff80}.material-picker-trigger:hover .material-trigger-swatch{border-color:#fff}.material-picker-dialog{width:min(980px,calc(100% - 28px));max-height:min(820px,calc(100vh - 30px));padding:0;overflow:hidden}.material-picker-dialog .dialog-heading{padding:22px 24px 17px;border-bottom:1px solid #dfe8ee}.material-picker-dialog .dialog-heading h2{margin-bottom:4px}.material-picker-dialog .dialog-heading p:not(.eyebrow){margin:0;color:#6a7e8e;font-size:11px}.material-role-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:16px 24px 8px}.material-role-tabs button{display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px;align-items:center;min-width:0;padding:8px;border:1px solid #d7e3ea;border-radius:11px;color:#35546b;background:#fff;text-align:left;cursor:pointer}.material-role-tabs button:hover{border-color:#8db9d8;background:#f5faff}.material-role-tabs button.active{border-color:#0f70b8;box-shadow:0 0 0 2px #d8edfb;background:#eff8fe}.material-role-thumb{width:52px;height:48px;border-radius:8px;background:#edf2f5 center/cover no-repeat}.material-role-tabs button>span:last-child{min-width:0}.material-role-tabs small,.material-role-tabs strong{display:block}.material-role-tabs small{margin-bottom:3px;color:#72899a;font-size:9px;text-transform:uppercase;letter-spacing:.05em}.material-role-tabs strong{overflow:hidden;color:#183f5f;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.material-catalog-tools{display:flex;align-items:center;gap:14px;padding:8px 24px 13px}.material-catalog-tools label{display:flex;align-items:center;gap:7px;flex:1;max-width:380px;padding:0 11px;border:1px solid #d4e1e8;border-radius:9px;background:#fff}.material-catalog-tools input{width:100%;padding:10px 0;border:0;outline:0}.material-catalog-tools>span{color:#6e8292;font-size:10px}.material-catalog-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;max-height:510px;padding:0 24px 24px;overflow:auto}.material-catalog-card{position:relative;display:grid;grid-template-rows:116px auto;gap:8px;min-width:0;padding:7px;border:1px solid #d8e3e9;border-radius:11px;color:#294b63;background:#fff;text-align:left;cursor:pointer}.material-catalog-card:hover{border-color:#72abd3;box-shadow:0 7px 18px #163c5614;transform:translateY(-1px)}.material-catalog-card.selected{border-color:#0872bf;box-shadow:0 0 0 2px #d8edfb}.material-catalog-card img{width:100%;height:116px;border-radius:7px;object-fit:cover;background:#f3f5f6}.material-catalog-card span{display:grid;gap:3px;padding:0 3px 3px}.material-catalog-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.material-catalog-card small{color:#718697;font-size:9px}.material-catalog-card i{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;color:#fff;background:#0872bf;font-style:normal;font-weight:900;box-shadow:0 2px 7px #173c5960}

@media(max-width:900px){.material-role-tabs{grid-template-columns:1fr 1fr}.material-catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.material-picker-dialog{width:calc(100% - 14px)}.material-role-tabs{padding-inline:13px}.material-catalog-tools{align-items:stretch;flex-direction:column;padding-inline:13px}.material-catalog-tools label{max-width:none}.material-catalog-grid{grid-template-columns:1fr 1fr;padding-inline:13px}.material-catalog-card{grid-template-rows:92px auto}.material-catalog-card img{height:92px}}
