:root { --primary: #123a63; --secondary: #f58220; --surface: #ffffff; --page: #eaf0f6; --text: #243447; --muted: #74808e; --border: #d6e0ea; }
/* Accesibilidad: el tamaño se aplica al elemento raíz para que también escalen
   Bootstrap, formularios, modales y tablas que usan unidades rem. */
html[data-font-size="small"] { font-size: 14px; }
html[data-font-size="normal"] { font-size: 16px; }
html[data-font-size="large"] { font-size: 18px; }
.metric-card { padding: .7rem .8rem; min-height: 76px; gap: .6rem; align-items: center; }.metric-card p { font-size: .72rem; line-height: 1.15; }.metric-card h3 { margin: .08rem 0; font-size: 1.08rem; line-height: 1.2; }.metric-card small { font-size: .7rem; line-height: 1.1; display: block; }.metric-icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; font-size: .95rem; }.dashboard-chart-card canvas { max-height: 230px; }
.product-column { min-width: 285px; }.product-cell { position: relative; min-width: 285px; }.suggestions { position: absolute; z-index: 20; width: calc(100% - 1.8rem); background: var(--surface); border: 1px solid var(--border); border-radius: .4rem; box-shadow: 0 6px 16px rgba(0,0,0,.12); }.suggestion-item { display: block; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: .4rem .55rem; }.suggestion-item:hover { background: var(--page); }.suggestion-item small { color: var(--muted); }.product-status { min-height: 1rem; }.catalog-option { font-size: .68rem; color: var(--muted); display: block; }
.topbar-logo { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; background: var(--secondary); color: white; display: grid; place-items: center; font-weight: 800; }.topbar-logo img { width: 100%; height: 100%; object-fit: cover; }
.jornada-table { table-layout: fixed; }.jornada-table .code-column { width: 9%; }.jornada-table .product-column { width: 30%; }.jornada-table .qty-column { width: 8%; }.jornada-table .price-column { width: 12%; }.jornada-table .total-column { width: 11%; }.jornada-table .payment-column { width: 14%; }.jornada-table .rubro-column { width: 16%; }.jornada-table .form-control,.jornada-table .form-select { min-width: 0; width: 100%; }.jornada-summary { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1.1rem; font-size:.78rem; color:var(--muted); }.jornada-summary b { color:var(--text); }.jornada-summary .jornada-total { margin-left:auto; }.jornada-summary .jornada-total strong { font-size:1.2rem; } @media (max-width: 767px) { .jornada-table { min-width: 860px; }.jornada-summary .jornada-total { margin-left:0; } }
.dashboard-selector { min-width: 260px; }.dashboard-selector .form-label { margin-bottom: .35rem; font-size: .82rem; color: var(--muted); }.rubro-tabs { gap: .45rem; }.rubro-tabs .nav-link { color: var(--primary); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: .42rem .9rem; }.rubro-tabs .nav-link.active { background: var(--primary); color: white; border-color: var(--primary); }.metric-product { font-size: 1rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }.section-divider { display: flex; align-items: center; gap: 1rem; margin: 2.5rem 0 1.25rem; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.section-divider::before, .section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }.gastos-card { border-left: 4px solid var(--secondary); }.gastos-total { color: var(--muted); font-size: 1.45rem; }
.list-group-item { background: transparent; color: var(--text); border-color: var(--border); }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="dark"] { --surface: #182331; --page: #101923; --text: #e8eef5; --muted: #a5b2c0; --border: #314154; }
[data-font-size="small"] { font-size: 14px; } [data-font-size="large"] { font-size: 18px; }
body { background: var(--page); color: var(--text); font-family: Inter, system-ui, -apple-system, sans-serif; }
.app-shell { min-height: 100vh; display: flex; }.sidebar { width: 265px; flex: 0 0 265px; min-height: 100vh; background: var(--primary); color: white; padding: 1.5rem 1rem; display: flex; flex-direction: column; }.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .5rem; }.brand-logo, .logo-preview { width: 45px; height: 45px; border-radius: 12px; overflow: hidden; background: var(--secondary); display: grid; place-items: center; color: white; font-weight: 800; }.brand-logo img { width: 100%; height: 100%; object-fit: cover; }.brand small { display: block; opacity: .7; font-size: .72rem; }.sidebar .nav-link { color: rgba(255,255,255,.75); padding: .8rem 1rem; margin-bottom: .25rem; border-radius: 9px; }.sidebar .nav-link i { margin-right: .7rem; }.sidebar .nav-link:hover, .sidebar .nav-link.active { color: white; background: rgba(255,255,255,.15); }.sidebar-footer { margin-top: auto; font-size: .8rem; color: rgba(255,255,255,.65); padding: 1rem .5rem 0; }.main-content { flex: 1; min-width: 0; }.topbar { background: var(--surface); min-height: 92px; border-bottom: 1px solid var(--border); padding: 1.25rem 2.25rem; display: flex; gap: 1rem; align-items: center; }.topbar h1 { font-size: 1.3rem; margin: 0; font-weight: 700; }.topbar p { color: var(--muted); margin: .1rem 0 0; font-size: .9rem; }.toolbar { display: flex; gap: .5rem; }.page-content { padding: 2rem 2.25rem; }.section-kicker { color: var(--secondary); font-weight: 800; font-size: .72rem; letter-spacing: .1em; margin-bottom: .3rem; }.page-content h2 { font-size: 1.4rem; font-weight: 700; }.content-card, .metric-card { border: 1px solid var(--border); background: var(--surface); box-shadow: 0 3px 12px rgba(25,48,74,.04); }.content-card { border-radius: 14px; }.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); }.sales-table th { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; white-space: nowrap; }.sales-table th, .sales-table td { padding: .9rem; vertical-align: middle; }.sales-table .form-control, .sales-table .form-select { min-width: 115px; }.jornada-total { color: var(--muted); }.jornada-total strong { color: var(--primary); display: block; font-size: 1.45rem; }.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: #0c2c4d; --bs-btn-hover-border-color: #0c2c4d; }.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); }.metric-card { border-radius: 14px; padding: 1.3rem; display: flex; gap: 1rem; }.metric-card p { margin: 0; color: var(--muted); font-size: .85rem; }.metric-card h3 { margin: .2rem 0; font-size: 1.35rem; }.metric-card small { color: var(--muted); }.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-size: 1.2rem; }.metric-icon.primary { background: #e2edf7; color: var(--primary); }.metric-icon.orange { background: #fff0df; color: var(--secondary); }.metric-icon.gray { background: #edf0f3; color: #586675; }.metric-icon.green { background: #e1f5ed; color: #16835c; }.empty-state { height: 200px; display: grid; place-content: center; text-align: center; color: var(--muted); gap: .5rem; }.empty-state i { font-size: 2rem; }.settings-icon { width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; background: #e2edf7; color: var(--primary); }.color-input { display: flex; gap: .5rem; }.color-input input[type="color"] { width: 48px; height: 38px; border: 0; padding: 0; background: transparent; }.logo-preview { width: 100px; height: 100px; border-radius: 16px; font-size: 1.15rem; }.form-control, .form-select { background-color: var(--surface); color: var(--text); border-color: var(--border); }.form-control:focus, .form-select:focus { background-color: var(--surface); color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(18,58,99,.12); }
.metric-card { padding: .7rem .8rem; min-height: 76px; gap: .6rem; align-items: center; }.metric-card p { font-size: .72rem; line-height: 1.15; }.metric-card h3 { margin: .08rem 0; font-size: 1.08rem; line-height: 1.2; }.metric-card small { font-size: .7rem; line-height: 1.1; display: block; }.metric-icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; font-size: .95rem; }.dashboard-chart-card canvas { max-height: 230px; }
@media (max-width: 991.98px) { .sidebar { position: fixed; z-index: 1040; transform: translateX(-100%); transition: transform .2s ease; }.sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.2); }.topbar, .page-content { padding-left: 1.25rem; padding-right: 1.25rem; } } @media (max-width: 575.98px) { .topbar { padding: 1rem; }.page-content { padding: 1.25rem 1rem; }.topbar p { display: none; } }

/* Gastos: interfaz compacta, legible en ambos temas y sin alterar los módulos existentes. */
.gasto-tabs { padding-bottom: .15rem; }.gasto-tabs .nav-link { white-space: nowrap; font-size: .8rem; }
.gastos-table { min-width: 1050px; }.gastos-table td { padding-top: .65rem; padding-bottom: .65rem; }.gastos-table .badge { font-size: .67rem; letter-spacing: .02em; }.gasto-observaciones { min-width: 180px; max-width: 250px; color: var(--muted); font-size: .78rem; }
.period-panel { display: flex; gap: .65rem; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; background: color-mix(in srgb, var(--page) 65%, var(--surface)); }.period-panel > i { color: var(--secondary); margin-top: .25rem; }
.upcoming-expense { height: 100%; border: 1px solid var(--border); border-radius: 10px; padding: .65rem .75rem; font-size: .77rem; background: color-mix(in srgb, var(--page) 45%, var(--surface)); }.upcoming-expense strong { font-size: .8rem; }.upcoming-expense small { color: var(--muted); display: block; margin-top: .15rem; }.upcoming-expense b { color: var(--primary); }
.modal-content { background: var(--surface); color: var(--text); border-color: var(--border); }.modal-header, .modal-footer { border-color: var(--border); }.btn-close { filter: var(--close-filter, none); }[data-theme="dark"] { --close-filter: invert(1); }
.global-alert-wrap { max-width: 1500px; margin: 0 auto; }.global-alert-wrap .alert { font-size: .82rem; border-radius: 10px; }
@media (max-width: 575.98px) { .gasto-tabs { margin: -.15rem -.15rem; }.gasto-tabs .nav-link { padding-left: .72rem; padding-right: .72rem; }.metric-card h3 { font-size: 1rem; }.upcoming-expense { min-width: 210px; } }
:root { --permission-card: var(--surface); }
.permission-module-card{border:1px solid var(--border);border-radius:12px;padding:1rem;height:100%;background:var(--permission-card)}.permission-module-header{display:flex;justify-content:space-between;gap:.5rem}.permission-counter{font-size:.78rem;color:var(--muted)}.permission-actions{display:flex;gap:.5rem;margin:.75rem 0}.permission-grid{display:grid;gap:.4rem}.permission-grid .form-check{padding:.35rem .25rem .35rem 1.75rem}.permission-profile-selector{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}@media(max-width:575px){.permission-module-card{padding:.75rem}.permission-module-header{display:block}}

/* Contraste completo para componentes Bootstrap en modo oscuro. */
[data-theme="dark"]{--bs-body-bg:var(--page);--bs-body-color:var(--text);--bs-secondary-color:#b8c4d0;--bs-tertiary-bg:#222f3e;--bs-table-striped-bg:#202d3b;--bs-table-hover-bg:#263646;--bs-border-color:var(--border)}[data-theme="dark"] .text-muted,[data-theme="dark"] .form-text{color:#b8c4d0!important}[data-theme="dark"] .table>thead>tr>th{background:#202d3b!important;color:#f5f8fb!important;border-color:var(--border)}[data-theme="dark"] .table>tbody>tr>td{color:var(--text);border-color:var(--border)}[data-theme="dark"] .table-hover>tbody>tr:hover>*{color:#fff;background:#263646}[data-theme="dark"] .form-control::placeholder{color:#aab7c5;opacity:1}[data-theme="dark"] .form-control,[data-theme="dark"] .form-select,[data-theme="dark"] textarea{background:#202d3b!important;color:#f4f7fa!important;border-color:#45596e!important}[data-theme="dark"] .input-group-text{background:#2a3949;color:#f4f7fa;border-color:#45596e}[data-theme="dark"] .dropdown-menu,[data-theme="dark"] .list-group-item{background:#202d3b;color:#f4f7fa;border-color:#45596e}[data-theme="dark"] .dropdown-item{color:#e8eef5}[data-theme="dark"] .dropdown-item:hover{background:#314154;color:#fff}[data-theme="dark"] .btn-outline-primary{--bs-btn-color:#9fc8f2;--bs-btn-border-color:#5e9ed4}[data-theme="dark"] .metric-icon.primary{background:#1e3e5b;color:#a9d0f5}[data-theme="dark"] .metric-icon.orange{background:#563716;color:#ffb166}[data-theme="dark"] .metric-icon.gray{background:#344251;color:#d9e1e8}[data-theme="dark"] .metric-icon.green{background:#1d4b3b;color:#9be1c2}
.login-page{display:grid!important;place-items:center!important;padding:1.5rem;background:linear-gradient(135deg,#edf3f7,#dfe8ef)}.login-card{margin:auto!important}.rubro-summary-card{cursor:pointer;transition:transform .15s,border-color .15s}.rubro-summary-card:hover,.rubro-summary-card.active{transform:translateY(-2px);border-color:var(--secondary)}

/* Panels and quick filters shared by Productos and Proveedores. */
.module-page { max-width: 1500px; margin: 0 auto; }
.module-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: .8rem; }
.module-summary-card { appearance: none; width: 100%; min-height: 104px; display: flex; align-items: center; gap: .75rem; padding: .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 3px 12px rgba(25,48,74,.04); text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.module-summary-card:hover { color: var(--text); transform: translateY(-2px); border-color: color-mix(in srgb, var(--secondary) 70%, var(--border)); box-shadow: 0 7px 18px rgba(25,48,74,.10); }
.module-summary-card.active { border-color: var(--secondary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--secondary) 22%, transparent), 0 6px 16px rgba(25,48,74,.08); }
.module-summary-card > span:last-child { min-width: 0; display: grid; gap: .08rem; }
.module-summary-card strong { font-size: 1.28rem; line-height: 1.12; color: var(--text); }
.module-summary-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-summary-card small { overflow: visible; text-overflow: clip; white-space: normal; }
.module-summary-name { display: block; color: var(--muted); font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.module-summary-card small { color: var(--muted); font-size: .72rem; }
.sidebar .nav-link-sub { padding-top: .36rem; padding-bottom: .36rem; padding-left: 2.15rem; font-size: .86rem; opacity: .86; }
.product-summary-card, .product-summary-card:visited, .product-summary-card:hover, .product-summary-card:focus { text-decoration: none; }
.product-summary-card { cursor: pointer; min-height: 108px; }
.product-summary-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--secondary) 60%, transparent); outline-offset: 3px; }
.product-summary-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; font-size: 1.1rem; }
.product-summary-card-0 .product-summary-icon { background: #e8f0fb; color: #285a96; }.product-summary-card-1 .product-summary-icon { background: #dff4f3; color: #19766f; }.product-summary-card-2 .product-summary-icon { background: #eee8ff; color: #6147ab; }.product-summary-card-3 .product-summary-icon { background: #fff0e5; color: #b75d1d; }.product-summary-card-4 .product-summary-icon { background: #ffe8f0; color: #a94369; }
.product-summary-card.active { background: color-mix(in srgb, var(--surface) 88%, var(--secondary)); border-width: 2px; }
[data-theme="dark"] .product-summary-card-0 .product-summary-icon { background:#1e3e5b;color:#a9d0f5; }[data-theme="dark"] .product-summary-card-1 .product-summary-icon { background:#174d4b;color:#a5e8e1; }[data-theme="dark"] .product-summary-card-2 .product-summary-icon { background:#453875;color:#ddd1ff; }[data-theme="dark"] .product-summary-card-3 .product-summary-icon { background:#6d421d;color:#ffd7a9; }[data-theme="dark"] .product-summary-card-4 .product-summary-icon { background:#6d304b;color:#ffc7df; }
.supplier-summary-grid { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.supplier-summary-amount { margin-top: .1rem; font-size: 1.1rem !important; color: var(--primary) !important; }
.module-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 12px rgba(25,48,74,.04); }
.module-panel-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--page) 55%, var(--surface)); }
.module-panel-header h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text); }
.module-panel-header p { margin: .14rem 0 0; color: var(--muted); font-size: .8rem; }
.module-panel-body { padding: 1rem; }
.module-empty-state { min-height: 120px; display: grid; place-content: center; gap: .35rem; text-align: center; color: var(--muted); }
.module-empty-state i { font-size: 1.45rem; color: var(--secondary); }
.module-panel .table { margin-bottom: 0; }
.module-panel .table > :not(caption) > * > * { padding: .78rem .9rem; }
.module-panel .table thead th { background: color-mix(in srgb, var(--page) 60%, var(--surface)); }
.module-rubro-tabs { display: flex; flex-wrap: wrap; gap: .45rem; padding: .45rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 12px rgba(25,48,74,.04); }
.module-rubro-tabs > a, .module-rubro-tabs > button { appearance: none; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 700; padding: .45rem .7rem; text-decoration: none; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.module-rubro-tabs > a:hover, .module-rubro-tabs > button:hover { color: var(--primary); border-color: var(--border); }
.module-rubro-tabs > a.active, .module-rubro-tabs > button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.module-rubro-section[hidden] { display: none !important; }
.module-rubro-section .module-panel-header { min-height: 64px; }
.rubro-badge { display: inline-block; margin: .08rem .18rem .08rem 0; padding: .25rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.rubro-3d { color: #0f5a87; background: #dceff9; }.rubro-electronica { color: #5940a8; background: #ebe5ff; }.rubro-bazar { color: #8b4a13; background: #fff0dc; }.rubro-sublimacion { color: #a33567; background: #fde5f0; }
.product-read-table td, .supplier-read-table td { height: 54px; }
.product-compact-table td, .product-compact-table th { padding: .48rem .55rem !important; white-space: nowrap; vertical-align: middle; }
.product-compact-table .product-name-col { min-width: 180px; white-space: normal; }
.product-compact-table .quick-edit-col { width: 38px; }.product-compact-table .quick-edit { padding: .2rem .4rem; }
.product-compact-table .product-provider-column { display: none !important; }
.product-compact-table th:nth-last-child(2), .product-compact-table td:nth-last-child(2) { display: none !important; }
.product-compact-table th:nth-last-child(4), .product-compact-table td:nth-last-child(4) { display: none !important; }
.products-page .module-panel-header .form-select { min-width: 145px; }
#newProductModal .modal-content, #editProductModal .modal-content, #viewProductModal .modal-content, #familyModal .modal-content, #familyProductsModal .modal-content, #familyAdjustModal .modal-content, #promotionModal .modal-content, #promotionDetailModal .modal-content, #quickSupplierModal .modal-content { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 20px 48px rgba(16,35,54,.22); }
#newProductModal .modal-header, #editProductModal .modal-header, #viewProductModal .modal-header, #familyModal .modal-header, #familyProductsModal .modal-header, #familyAdjustModal .modal-header, #promotionModal .modal-header, #promotionDetailModal .modal-header, #quickSupplierModal .modal-header { padding: 1rem 1.2rem; background: color-mix(in srgb, var(--page) 62%, var(--surface)); }
#newProductModal .modal-body, #editProductModal .modal-body, #viewProductModal .modal-body, #familyModal .modal-body, #familyProductsModal .modal-body, #familyAdjustModal .modal-body, #promotionModal .modal-body, #promotionDetailModal .modal-body, #quickSupplierModal .modal-body { padding: 1.2rem; background: var(--surface); }
.product-editor-modal { max-width: min(1040px, calc(100vw - 2rem)); }
.product-editor-modal .modal-body { max-height: 72vh; overflow-y: auto; padding: 1rem 1.05rem !important; }
.cost3d-editor{border-top:1px solid var(--border);padding-top:1rem}
.cost3d-editor-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.85rem}
.cost3d-card{border:1px solid var(--border);border-radius:14px;padding:.95rem;background:color-mix(in srgb,var(--page) 40%,var(--surface))}
.cost3d-card-title{font-size:.82rem;font-weight:800;color:var(--primary);margin-bottom:.75rem;text-transform:uppercase;letter-spacing:.04em}
.cost3d-breakdown{display:grid;gap:.45rem}
.cost3d-breakdown>div{display:flex;justify-content:space-between;gap:.75rem;font-size:.9rem}
.cost3d-breakdown-total{margin-top:.35rem;padding-top:.55rem;border-top:1px dashed var(--border);font-weight:700}
.cost3d-extra-list{display:grid;gap:.55rem}
.cost3d-extra-row{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:.5rem;align-items:center}
.cost3d-price-actions{display:flex;justify-content:space-between;align-items:center;gap:.75rem}
.cost3d-messages{min-height:1.2rem}
.config-admin-card,.config-admin-detail .border.rounded-4{min-width:0}
.family-editor-modal { max-width: min(760px, calc(100vw - 2rem)); }
.promotion-editor-modal { max-width: min(1080px, calc(100vw - 2rem)); }
.promotion-editor-modal .modal-body { max-height: 74vh; overflow-y: auto; padding: 1.05rem 1.1rem !important; }
.promotion-form-grid .form-control, .promotion-form-grid .form-select { min-height: 44px; }
.promotion-form-grid textarea { min-height: 92px; }
.stock-header-card, .promotions-header-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.stock-header-copy h5, .promotions-header-copy h5 { margin:0; font-size:1rem; font-weight:700; }
.stock-view-pill { display:inline-flex; align-items:center; padding:.42rem .72rem; border:1px solid var(--border); border-radius:999px; background:color-mix(in srgb, var(--page) 50%, var(--surface)); color:var(--primary); font-size:.78rem; font-weight:700; }
.stock-table-toolbar { padding:.15rem 0 .85rem; }
.stock-table-toolbar .form-label { font-size:.74rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.stock-compact-table th, .stock-compact-table td { padding:.62rem .7rem !important; }
.stock-status-badge { font-size:.7rem; padding:.35rem .55rem; }
.promotion-compact-table th, .promotion-compact-table td { padding:.62rem .7rem !important; }
.promotion-row-description { margin-top:.12rem; max-width:360px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.promotion-status-badge { font-size:.7rem; padding:.35rem .55rem; }
.promotion-row-actions { display:inline-flex; align-items:center; justify-content:flex-end; gap:.35rem; flex-wrap:nowrap; }
.promotion-icon-btn { width:2rem; height:2rem; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:.65rem; }
.promotion-icon-btn i { font-size:.92rem; }
.promotion-secondary-create { white-space:nowrap; }
.product-editor-grid .form-control, .product-editor-grid .form-select { min-height: 44px; }
.product-family-combobox { position: relative; }
.product-family-results { position: absolute; inset: calc(100% + .35rem) 0 auto 0; z-index: 1065; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 32px rgba(25,48,74,.14); }
.product-family-results .list-group-item { border: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent); }
.product-family-results .list-group-item:last-child { border-bottom: 0; }
.product-family-results .family-create-entry { color: var(--primary); font-weight: 700; }
.family-management-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); gap: 1rem; align-items: stretch; }
.family-management-main, .family-management-side { border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 82%, var(--page)); padding: 1rem 1.05rem; }
.family-management-main { display: grid; gap: .95rem; }
.family-management-copy h5, .family-management-side h6 { margin: 0; font-size: 1rem; font-weight: 700; }
.family-management-copy p, .family-management-side p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.family-inline-form .form-control, .family-inline-form .form-select { min-height: 44px; }
.family-management-side { display: flex; flex-direction: column; justify-content: space-between; gap: .85rem; }
.family-automation-box { margin-top: 1rem; border-top: 1px solid var(--border); padding: 1rem 0 0; }
.family-empty-state-compact { min-height: 92px; }
.family-search-panel { border: 1px solid var(--border); border-radius: 14px; padding: .85rem; background: color-mix(in srgb, var(--page) 35%, var(--surface)); }
.family-search-results { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.family-search-option { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent); }
.family-search-option:last-child { border-bottom: 0; }
.family-search-option .form-check-input { margin-top: .2rem; }
.family-selected-products { min-height: 42px; }
#editProductModal .modal-body > .row { padding: .9rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--page) 45%, var(--surface)); }
#editProductModal h6 { font-size: .9rem; font-weight: 800; color: var(--primary); }
#editProductModal hr { border-color: var(--border); margin: 1.15rem 0 .85rem; }
#priceHistoryRows td { font-size: .78rem; white-space: nowrap; }
#viewProductBody { display: grid; gap: .9rem; }
#viewProductBody .product-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
#viewProductBody .product-view-card { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--page) 45%, var(--surface)); }
#viewProductBody .product-view-card .section-kicker { display:block; margin-bottom:.7rem; }
#viewProductBody .product-view-card dl { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:.7rem 1rem; margin:0; }
#viewProductBody .product-view-card dl > div { min-width:0; }
#viewProductBody .product-view-card dt { color:var(--muted); font-size:.76rem; font-weight:600; }
#viewProductBody .product-view-card dd { margin:.12rem 0 0; font-weight:700; overflow-wrap:anywhere; }
#viewProductBody .product-view-providers { grid-column: span 2; }
#viewProductBody .product-view-providers li { overflow-wrap:anywhere; }
#viewProductBody > .row { margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--page) 45%, var(--surface)); }
#viewProductBody h6 { margin: .15rem 0 .55rem; color: var(--primary); font-weight: 800; font-size: .9rem; }
#viewProductBody .table-responsive { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
#viewProductBody .table { margin: 0; } #viewProductBody .table th, #viewProductBody .table td { padding: .45rem .55rem; font-size: .78rem; }
#viewProductBody .badge { padding: .42rem .55rem; color: var(--text); background: color-mix(in srgb, var(--page) 55%, var(--surface)) !important; }
#viewProductBody > small, #viewProductBody > p.text-muted { margin: 0; padding: .75rem .9rem; border-left: 3px solid var(--secondary); border-radius: 8px; background: color-mix(in srgb, var(--page) 55%, var(--surface)); }
@media (max-width: 767.98px) { #newProductModal .modal-body, #editProductModal .modal-body, #viewProductModal .modal-body, #familyModal .modal-body, #familyProductsModal .modal-body, #familyAdjustModal .modal-body, #promotionModal .modal-body, #promotionDetailModal .modal-body, #quickSupplierModal .modal-body { padding: .85rem; } .products-page .module-panel-header .form-select { min-width: 130px; } .products-page .product-table-wrap { overflow-x:auto; overflow-y:visible; } .family-management-card { grid-template-columns: 1fr; } .family-management-main, .family-management-side { padding: .9rem; } .product-editor-modal, .family-editor-modal, .promotion-editor-modal { max-width: calc(100vw - 1rem); margin: .5rem auto; } .family-search-option { padding: .72rem .8rem; } #viewProductBody .product-view-grid { grid-template-columns:1fr; } #viewProductBody .product-view-providers { grid-column:auto; } #viewProductBody .product-view-card dl { grid-template-columns:1fr 1fr; } .stock-header-card, .promotions-header-card { align-items:flex-start; flex-direction:column; } .promotion-row-actions { gap:.25rem; } .promotion-icon-btn { width:1.9rem; height:1.9rem; } }
@media (max-width: 1100px) { .product-compact-table .table-secondary-data { display:none; } }
@media (max-width: 767.98px) { .product-compact-table .product-provider-column { display:none; } .product-compact-table .product-name-col { min-width:150px; } }
.product-read-table .dropdown-toggle, .supplier-read-table .dropdown-toggle { min-width: 88px; }
.product-rubro-hint { cursor: pointer; }
.expense-category-icon { display: inline-block; width: 1.25rem; color: var(--secondary); }

/* Shared fine-tuning: existing screens use these same cards and tables. */
.content-card { overflow: hidden; }
.content-card > .table-responsive:last-child, .content-card > .card-body > .table-responsive:last-child { border-top: 1px solid var(--border); }
.content-card .table > :not(caption) > * > * { vertical-align: middle; }
.content-card .table thead th { background: color-mix(in srgb, var(--page) 60%, var(--surface)); }

[data-theme="dark"] .module-summary-card, [data-theme="dark"] .module-panel { background: var(--surface); border-color: var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.18); }

/* Vender: capa visual POS inspirada en la segunda propuesta.
   Mantiene la lógica actual y rehace jerarquía, tarjetas y densidad visual. */
.module-toolbar{min-height:58px;padding:8px 12px;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 14px 34px rgba(17,38,66,.08)}
.module-toolbar-brand{font-size:.95rem;letter-spacing:.01em}
.module-toolbar-tabs a,.module-toolbar-tab-button{position:relative;border-radius:12px;padding:.58rem .76rem;font-size:.9rem;font-weight:700;color:color-mix(in srgb,var(--text) 72%,var(--muted))}
.module-toolbar-tabs a:hover,.module-toolbar-tab-button:hover{background:color-mix(in srgb,var(--primary) 6%,var(--surface));color:var(--primary)}
.module-toolbar-tabs a.active{background:transparent;color:var(--primary);box-shadow:none}
.module-toolbar-tabs a.active::after{content:"";position:absolute;left:.7rem;right:.7rem;bottom:.12rem;height:3px;border-radius:999px;background:var(--primary)}
.module-toolbar-tools .btn,.module-toolbar-tools .dropdown-toggle{border-radius:12px}
.module-toolbar-tabs{-ms-overflow-style:none;scrollbar-width:none}
.module-toolbar-tabs::-webkit-scrollbar{width:0;height:0;display:none}

.pos-shell{max-width:1480px;padding:0 .1rem}
.pos-shell .pos-header,.pos-shell .pos-cart,.pos-shell .pos-summary{border:1px solid color-mix(in srgb,var(--border) 78%,#d6dfeb);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,250,253,.98));box-shadow:0 18px 40px rgba(18,42,70,.07)}
.pos-shell .section-kicker{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#f08a28;font-weight:800}
.pos-shell h4{font-size:1.15rem;color:#17324d}
.pos-shell .text-muted{color:color-mix(in srgb,var(--muted) 92%,#5a6777)!important}
.pos-sales-grid>.pos-main-column,.pos-sales-grid>.pos-checkout-column{min-width:0}
@media(min-width:992px){.pos-sales-grid>.pos-main-column{width:70%}.pos-sales-grid>.pos-checkout-column{width:30%}}

.pos-header{padding:1rem 1.2rem!important;background:linear-gradient(180deg,#ffffff,#f7fafc)}
.pos-mode-cf .pos-header{padding:1rem 1.2rem!important}
.pos-mode-cf .pos-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:0;background:transparent;box-shadow:none;padding:0!important}
.pos-mode-cf .pos-sale-meta{width:100%;display:grid;grid-template-columns:minmax(320px,420px) minmax(190px,240px);justify-content:space-between;align-items:stretch}
.pos-sale-meta{justify-content:flex-start;gap:1rem}
.pos-info-tile{display:flex;align-items:center;gap:.9rem;padding:.85rem 1rem;border:1px solid color-mix(in srgb,var(--border) 75%,#dae4f0);border-radius:16px;background:#fff;min-width:min(100%,320px)}
.pos-info-copy{display:grid;gap:.12rem;min-width:0}
.pos-info-copy strong{font-size:1rem;letter-spacing:.01em;color:#15314d}
.pos-info-icon,.pos-panel-icon,.pos-stat-icon,.pos-empty-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:16px;flex:0 0 46px}
.pos-info-icon-customer,.pos-panel-icon-customer{background:#eaf7ee;color:#218a4f}
.pos-info-icon-date{background:#ebf3fb;color:#2b6ea5}
.pos-panel-icon-products{background:#eef4ff;color:#244f87}
.pos-panel-icon-payment{background:#e9f8ef;color:#2a8d59}
.pos-client-badge{display:inline-flex;align-items:center;gap:.25rem;padding:.22rem .56rem;border-radius:999px;background:#e9f7ee;color:#1b7f48;font-size:.76rem;font-weight:800}
.pos-date-control .form-control,.pos-client-date .form-control{min-height:40px;border-radius:12px;border-color:color-mix(in srgb,var(--border) 78%,#d4deea);font-weight:700;color:#17324d;background:#fff}
.pos-date-control .form-control{max-width:180px}
.pos-client-date{padding:.2rem 0}

.pos-client-panel{display:grid;gap:.9rem}
.pos-panel-heading{display:flex;align-items:flex-start;gap:.85rem;min-width:0}
.pos-panel-heading h4{margin:0;font-size:1.04rem}
.pos-panel-heading small{display:block;line-height:1.35}
.pos-client-controls{gap:.7rem}
.pos-client-controls .btn,.pos-client-controls .input-group-text,.pos-client-controls .form-control{min-height:48px;border-radius:14px!important}
.pos-client-controls .btn{font-weight:700}
.pos-client-search{background:#fff;border-radius:14px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--border) 80%,#d6dfeb)}
.pos-client-search .input-group-text{border:0;background:transparent;color:#58718c;padding:0 .95rem}
.pos-client-search .form-control{border:0;box-shadow:none;padding-left:.1rem}
.pos-client-search .btn{border:0;border-left:1px solid color-mix(in srgb,var(--border) 78%,#d6dfeb);background:transparent;color:#35567a;padding:0 .95rem}
.pos-selected-client{padding:.85rem 1rem;border:1px solid color-mix(in srgb,var(--border) 72%,#d7e2ee);border-radius:14px;background:linear-gradient(180deg,#fbfdff,#f4f8fc);min-height:58px}
.pos-selected-client-label{font-size:.7rem;letter-spacing:.14em}
#clienteSeleccionado{display:flex;flex-wrap:wrap;gap:.32rem .42rem;align-items:center;font-size:.95rem;color:#17324d}
#clienteSeleccionado i{color:#1f6fb2}

.pos-cart{padding:1.2rem 1.3rem!important}
.pos-cart-head{align-items:flex-start!important}
.pos-cart-badge{display:inline-flex;align-items:center;justify-content:center;padding:.52rem .8rem;border-radius:999px;background:#edf3ff;color:#294d7a;font-weight:800;font-size:.83rem;white-space:nowrap}
.pos-product-search{padding:1rem!important;background:linear-gradient(180deg,#fbfdff,#f5f9fc);border:1px solid color-mix(in srgb,var(--primary) 16%,#d6e1ee);border-radius:18px}
.pos-search-tool{align-items:stretch;box-shadow:0 8px 24px rgba(24,49,78,.06)}
.pos-search-tool .input-group-text,.pos-search-tool .form-control,.pos-search-tool .btn{min-height:58px;border-radius:16px!important}
.pos-search-tool .input-group-text{border:1px solid #ccdae8;border-right:0;background:#fff;padding:0 1rem;color:#294f7d;font-size:1.08rem}
.pos-search-tool .form-control{border:1px solid #ccdae8;border-left:0;box-shadow:none;font-size:1rem}
.pos-search-tool .form-control:focus{border-color:#9fbcdd}
.pos-search-tool .btn{font-weight:800;padding:0 1.1rem}
.pos-search-tool .btn-outline-primary{border:1px solid #c8d8ea;background:#f7fbff;color:#193754}
.pos-search-tool .btn-outline-primary:hover{background:#edf4fb;color:#17324d;border-color:#acc4df}
.pos-search-tool .pos-add-button{border:1px solid #de7d2f;background:linear-gradient(180deg,#f79942,#ea7f22);color:#fff}
.pos-search-tool .pos-add-button:hover{border-color:#c96a1b;background:linear-gradient(180deg,#ea8e3d,#d9731e)}
.pos-search-help{margin-top:.6rem;font-size:.86rem;color:#6a7c91}
.pos-search-help .btn-link{font-size:.86rem;font-weight:700;text-decoration:none;color:#de7d2f}
.pos-search-help .btn-link:hover{text-decoration:underline;color:#b96218}
.pos-empty-state{display:grid;place-items:center;gap:.7rem;min-height:260px;padding:2rem 1rem;border:1px dashed color-mix(in srgb,var(--border) 70%,#d8e2ee);border-radius:18px;background:linear-gradient(180deg,#fcfdff,#f7fafc)}
.pos-empty-icon{width:68px;height:68px;border-radius:24px;background:#eef4ff;color:#294f80;font-size:1.8rem}
.pos-empty-state strong{font-size:1.05rem;color:#16314b}
.pos-empty-state p{max-width:360px;font-size:.95rem}

#cartItems{display:grid;gap:.7rem}
.cart-item{padding:0;border:1px solid color-mix(in srgb,var(--border) 76%,#d7e1ee);border-radius:16px;background:#fff;box-shadow:0 10px 26px rgba(18,43,72,.05);overflow:hidden}
.cart-item:hover{background:#fff;border-color:#bdd0e4}
.cart-item>div{padding:1rem 1.1rem}
.cart-item .fw-semibold{font-size:1rem;color:#17324d}
.cart-item small{line-height:1.35}
.cart-price{min-width:8.25rem;flex:0 0 8.25rem}
.cart-price .small{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.cart-price b{font-size:1rem;color:#17324d}
.cart-quantity{width:4.75rem;min-width:4.75rem;max-width:none;text-align:center;font-weight:700}
.cart-item .input-group{justify-content:center;flex-wrap:nowrap;min-width:9.9rem}
.cart-item .input-group .btn{min-width:40px;min-height:40px;border-radius:12px!important}
.cart-item .input-group .form-control{min-height:40px;border-radius:12px!important}
.cart-delete{align-self:center;border-radius:12px;padding:.55rem .7rem;background:#fff2f3;border-color:#f2c2c6;color:#b54654}
.cart-delete:hover{background:#fde7ea;border-color:#e5aeb6;color:#8e2834}
.stock-low{color:#c33d4b;font-weight:700}
.pos-description,.pos-price{border-radius:12px;border-color:#d0dcea}

.pos-summary{padding:1.2rem 1.2rem!important;border-top:0;overflow:hidden}
.pos-checkout-head{display:flex;align-items:flex-start;gap:.85rem;margin-bottom:1rem}
.pos-stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}
.pos-stat-card{display:grid;gap:.25rem;padding:.9rem .95rem;border:1px solid color-mix(in srgb,var(--border) 74%,#d7e1ed);border-radius:16px;background:#fff;box-shadow:0 8px 20px rgba(22,46,74,.04)}
.pos-stat-card small{font-size:.78rem;color:#6f8092}
.pos-stat-card strong{font-size:1.45rem;line-height:1.1;color:#15314d}
.pos-stat-icon{width:38px;height:38px;border-radius:14px;background:#edf4ff;color:#264f7d;font-size:1rem}
.pos-total-card{padding:1.05rem 1rem;border-radius:18px;background:linear-gradient(180deg,#eff6ff,#ffffff);border:1px solid color-mix(in srgb,var(--primary) 20%,#cfdae8)}
.pos-total{margin-top:.1rem;font-size:clamp(2.35rem,4.4vw,3.55rem);font-weight:900;line-height:1;letter-spacing:-.05em;color:#143150}
.pos-summary .btn-success{min-height:62px;border-radius:16px;background:linear-gradient(180deg,#33b06d,#1f9658);border-color:#1d8e53;font-size:1.05rem;font-weight:900;box-shadow:0 16px 28px rgba(28,128,76,.22)}
.pos-summary .btn-success:hover{background:linear-gradient(180deg,#2ea365,#1b8a50);border-color:#197f4a}
.pos-summary .btn-success:disabled{background:linear-gradient(180deg,#9dc4af,#92bda5);border-color:#92bda5;box-shadow:none}

#productoResultados.app-floating-panel,#clienteResultados.app-floating-panel{border-radius:18px;border:1px solid color-mix(in srgb,var(--border) 74%,#d6dfeb);box-shadow:0 24px 40px rgba(14,32,54,.16);padding:.35rem;background:#fff}
.product-autocomplete-result,.customer-result{border:0!important;border-radius:14px!important;padding:.8rem .9rem;line-height:1.32}
.product-autocomplete-result+.product-autocomplete-result,.customer-result+.customer-result{margin-top:.15rem}
.product-autocomplete-result:hover,.product-autocomplete-result.active,.customer-result:hover,.customer-result.active{background:#f0f6ff;color:#143150}
[data-theme="dark"] .product-autocomplete-result:hover,[data-theme="dark"] .product-autocomplete-result.active,[data-theme="dark"] .customer-result:hover,[data-theme="dark"] .customer-result.active{background:#233346}
[data-theme="dark"] .module-panel-header, [data-theme="dark"] .module-panel .table thead th { background: color-mix(in srgb, var(--page) 55%, var(--surface)); }
[data-theme="dark"] .module-summary-card:hover { color: var(--text); border-color: var(--secondary); }
[data-theme="dark"] .module-summary-card.active { box-shadow: 0 0 0 2px rgba(245,130,32,.22), 0 6px 16px rgba(0,0,0,.28); }
[data-theme="dark"] .module-rubro-tabs { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .module-rubro-tabs > a, [data-theme="dark"] .module-rubro-tabs > button { color: var(--muted); }
[data-theme="dark"] .module-rubro-tabs > a:hover, [data-theme="dark"] .module-rubro-tabs > button:hover { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .content-card > .table-responsive:last-child, [data-theme="dark"] .content-card > .card-body > .table-responsive:last-child { border-color: var(--border); }
[data-theme="dark"] .rubro-3d { color: #b9e5ff; background: #164660; }[data-theme="dark"] .rubro-electronica { color: #ddd1ff; background: #453875; }[data-theme="dark"] .rubro-bazar { color: #ffd7a9; background: #6d421d; }[data-theme="dark"] .rubro-sublimacion { color: #ffc7df; background: #713151; }

@media (max-width: 1199.98px) { .module-summary-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
@media (max-width: 1199.98px) { .supplier-summary-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); } }
@media (max-width: 1199.98px) { .product-read-table .table-secondary-data { display: none; } }
@media (max-width: 767.98px) { .module-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .module-summary-card { min-height: 94px; padding: .75rem; } .module-summary-card .metric-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: .9rem; } .module-panel-header { padding: .8rem; } .module-panel-body { padding: .8rem; } .module-rubro-tabs { flex-wrap: nowrap; overflow-x: auto; } .module-rubro-tabs > a, .module-rubro-tabs > button { white-space: nowrap; } }
@media (max-width: 767.98px) { .supplier-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 399.98px) { .module-summary-grid { grid-template-columns: 1fr; } }

/* Compras: accesos claros, sin apariencia de enlace y con estados legibles. */
.compras-page .module-summary-grid { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.cash-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.cash-card{border:1px solid var(--border);border-radius:16px;padding:1.15rem;background:var(--surface);box-shadow:0 4px 14px rgba(25,48,74,.06)}.cash-card-1{border-top:4px solid #3a9b67}.cash-card-2{border-top:4px solid #377ec4}.cash-card-3{border-top:4px solid #7362b5}.cash-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.cash-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:color-mix(in srgb,var(--secondary) 17%,var(--surface));color:var(--primary);font-size:1.2rem}.cash-card h5{font-size:1rem;margin:0;color:var(--text)}.cash-label{display:block;color:var(--muted);font-size:.78rem;margin-top:.8rem}.cash-balance{display:block;font-size:1.7rem;line-height:1.2;color:var(--text);margin:.15rem 0 .9rem}.cash-card dl{margin:0;display:grid;gap:.45rem}.cash-card dl div{display:flex;justify-content:space-between;gap:.5rem;font-size:.82rem}.cash-card dt{font-weight:500;color:var(--muted)}.cash-card dd{margin:0;font-weight:700}.cash-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.cash-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.cash-choice{border:1px solid var(--border);border-radius:13px;background:var(--surface);padding:1rem;text-align:left;display:grid;gap:.25rem;color:var(--text)}.cash-choice:hover{border-color:var(--secondary);background:color-mix(in srgb,var(--surface) 88%,var(--secondary))}.cash-choice i{font-size:1.3rem;color:var(--secondary)}.cash-choice small{color:var(--muted)}[data-theme="dark"] .cash-card,[data-theme="dark"] .cash-choice{background:var(--surface);border-color:var(--border)}@media(max-width:767.98px){.cash-summary-grid{grid-template-columns:1fr}.cash-choice-grid{grid-template-columns:1fr}.cash-actions .ms-auto{margin-left:0!important;width:100%}}
.compras-page .purchase-shortcut { text-decoration: none !important; position: relative; overflow: hidden; min-height: 116px; }
.compras-page .purchase-shortcut:hover, .compras-page .purchase-shortcut:focus, .compras-page .purchase-shortcut:visited { text-decoration: none; }
.compras-page .purchase-shortcut > i { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; font-size:1.25rem; flex:0 0 42px; }
.compras-page .purchase-shortcut strong { display:block; font-size:.94rem; }.compras-page .purchase-shortcut small{display:block;margin-top:.2rem;}
.purchase-shortcut.manual { border-left:4px solid #3174b9; }.purchase-shortcut.manual > i{background:#e5f0fc;color:#24629f;}
.purchase-shortcut.upload { border-left:4px solid #de7a27; }.purchase-shortcut.upload > i{background:#fff0e4;color:#bd5e13;}
.purchase-shortcut.pending { border-left:4px solid #c49622; }.purchase-shortcut.pending > i{background:#fff6d9;color:#a67800;}
.purchase-shortcut.review { border-left:4px solid #6550af; }.purchase-shortcut.review > i{background:#eee9ff;color:#55409a;}
.purchase-shortcut.quote { border-left:4px solid #58748b; }.purchase-shortcut.quote > i{background:#e8f0f5;color:#416278;}
.purchase-status { font-size:.72rem; padding:.38rem .56rem; white-space:nowrap; }.purchase-status.status-completar{background:#fff1ca;color:#765400;}.purchase-status.status-revision{background:#eae6ff;color:#4d3995;}.purchase-status.status-aprobada{background:#dff4e8;color:#14653d;}.purchase-status.status-rechazada{background:#fde3e5;color:#9a2734;}.purchase-status.status-cotizacion{background:#e4eef5;color:#315e78;}.purchase-status.status-borrador{background:#e9edf1;color:#475460;}
.compras-page .module-panel .table td,.compras-page .module-panel .table th{padding:.58rem .7rem;}.compras-page .purchase-total{font-weight:800;white-space:nowrap;}
[data-theme="dark"] .purchase-shortcut.manual > i{background:#1e4369;color:#abd3f9;}[data-theme="dark"] .purchase-shortcut.upload > i{background:#623b1a;color:#ffd0a5;}[data-theme="dark"] .purchase-shortcut.pending > i{background:#605019;color:#ffe590;}[data-theme="dark"] .purchase-shortcut.review > i{background:#40356e;color:#ddd3ff;}[data-theme="dark"] .purchase-shortcut.quote > i{background:#2c4659;color:#bddded;}
@media (max-width:1199.98px){.compras-page .module-summary-grid{grid-template-columns:repeat(3,minmax(160px,1fr));}}@media(max-width:767.98px){.compras-page .module-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.compras-page .purchase-shortcut{min-height:96px;}.compras-page .purchase-shortcut>i{width:36px;height:36px;flex-basis:36px;font-size:1.05rem;}}

/* Editor de compras: factura, cargos y transporte son conceptos distintos. */
.compra-editor-page .module-panel{overflow:visible}.purchase-editor-section{padding:1rem;margin-bottom:1rem;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--page) 40%,var(--surface))}.purchase-editor-section h5{font-size:.95rem;font-weight:800;color:var(--primary);margin:0 0 .85rem}.purchase-editor-section h5 i{color:var(--secondary);margin-right:.35rem}.supplier-charge-section{border-left:4px solid #d5902f}.transport-section{border-left:4px solid #41799e}.purchase-lines-table td,.purchase-lines-table th{padding:.55rem .5rem!important;vertical-align:top}.purchase-lines-table .line-summary{display:flex;align-items:center;gap:.4rem;min-width:190px}.purchase-lines-table .line-name{font-size:.82rem}.line-editor{padding:.5rem;border:1px dashed var(--border);border-radius:8px;background:var(--surface)}.purchase-totals{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:.55rem;margin-top:1rem}.purchase-totals>div{padding:.65rem .75rem;border:1px solid var(--border);border-radius:10px;background:var(--surface);display:flex;justify-content:space-between;gap:.5rem;font-size:.8rem}.purchase-totals span{color:var(--muted)}.purchase-total-final{border-color:var(--secondary)!important;background:color-mix(in srgb,var(--surface) 86%,var(--secondary))!important}.purchase-total-final strong{color:var(--primary);font-size:.95rem}@media(max-width:767.98px){.purchase-editor-section{padding:.75rem}.purchase-totals{grid-template-columns:1fr}.purchase-lines-table{min-width:820px}}[data-theme="dark"] .purchase-editor-section,.line-editor,.purchase-totals>div{background:color-mix(in srgb,var(--page) 48%,var(--surface))}[data-theme="dark"] .purchase-total-final{background:color-mix(in srgb,var(--surface) 75%,#6d421d)!important}

/* Validación y tabla compacta de Compras. */
.purchase-validation-summary{margin:0 0 1rem;padding:.8rem 1rem;border:1px solid #d95a65;border-radius:10px;background:#fff2f3;color:#7f1f28}.purchase-validation-summary ul{margin:.35rem 0 0;padding-left:1.1rem}.purchase-validation-summary button{padding:0;border:0;background:transparent;color:inherit;text-decoration:underline;text-align:left}.purchase-lines-table .purchase-product-cell{min-width:280px}.purchase-lines-table .line-summary{min-width:0}.purchase-lines-table .line-state{font-size:.67rem;font-weight:700;white-space:nowrap}.line-state-vinculado{background:#dff4e8;color:#14653d}.line-state-nuevo_automatico{background:#e2eefb;color:#205d9d}.line-state-requiere_revision{background:#fff1ca;color:#765400}.line-state-cargo_adicional{background:#eceff2;color:#485765}.purchase-lines-table .supplier-code{min-width:110px}.purchase-lines-table .qty{width:68px}.purchase-lines-table .price{width:115px}.line-actions .btn{padding:.23rem .38rem}.purchase-editor-page .is-invalid{border-color:#d95a65!important;background-color:#fff8f8!important}.purchase-editor-page .invalid-feedback{font-size:.72rem}.purchase-editor-page .form-text{font-size:.72rem}@media(max-width:767.98px){.purchase-lines-table{min-width:690px}.purchase-lines-table .purchase-product-cell{min-width:230px}.line-actions{min-width:152px}}[data-theme="dark"] .purchase-validation-summary{background:#512b32;border-color:#d87984;color:#ffe5e8}[data-theme="dark"] .purchase-editor-page .is-invalid{background-color:#4a2a31!important;border-color:#e1848d!important}
.purchase-lines-table tr.purchase-line-error>td{background:#fff4f5!important;border-top-color:#df7480!important;border-bottom-color:#df7480!important}.purchase-lines-table tr.purchase-line-error>td:first-child{border-left:4px solid #d95a65}.purchase-lines-table tr.purchase-line-error .line-state{background:#fde3e5;color:#9a2734}.purchase-lines-table tr.purchase-line-error .line-state::after{content:' · Requiere corrección'}[data-theme="dark"] .purchase-lines-table tr.purchase-line-error>td{background:#4b2a31!important}

/* Infraestructura visual global: tablas, capas flotantes y modales.
   El scroll horizontal pertenece a la tabla; los menús se elevan a una capa
   independiente para que ningún panel, card o tbody pueda recortarlos. */
:root{--app-z-content:1;--app-z-dropdown:1040;--app-z-modal-backdrop:1050;--app-z-modal:1055;--app-z-toast:1090}
.table-app-responsive{position:relative;width:100%;height:auto;max-height:none;overflow-x:auto;overscroll-behavior-inline:contain}.table-app-responsive>.table{margin-bottom:0}
/* El mismo menú se porta temporalmente a body. No hereda dimensiones de la
   tabla/card y, al no haber una capa fullscreen, no puede interceptar clicks. */
.app-floating-dropdown-menu{position:fixed!important;z-index:var(--app-z-dropdown);width:auto!important;min-width:var(--bs-dropdown-min-width,10rem)!important;max-width:calc(100dvw - 1rem);height:auto!important;min-height:0!important;max-height:calc(100dvh - 1rem);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.app-floating-panel{position:fixed!important;z-index:var(--app-z-dropdown);box-sizing:border-box;max-width:calc(100dvw - 1rem);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.modal-backdrop{z-index:var(--app-z-modal-backdrop)}.modal{z-index:var(--app-z-modal)}.toast-container{z-index:var(--app-z-toast)}.modal-dialog{max-height:calc(100dvh - 2rem)}.modal-content{max-height:calc(100dvh - 2rem)}.modal-header,.modal-footer{flex:0 0 auto}.modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}.modal .dropdown-menu{z-index:1}
@media(max-width:575.98px){.modal-dialog{margin:.5rem;max-height:calc(100dvh - 1rem)}.modal-content{max-height:calc(100dvh - 1rem)}}

/* Responsive V1: navegación, punto de venta y listados de uso diario.
   Desktop conserva la estructura original; tablet y móvil priorizan lectura y toque. */
.mobile-nav-backdrop{display:none}.mobile-app-name{font-size:.74rem;line-height:1.15;color:var(--muted);letter-spacing:.02em}.nav-link-sell{font-weight:700;background:rgba(245,130,32,.16);color:#fff!important}.nav-link-sell:hover,.nav-link-sell.active{background:var(--secondary)!important}.nav-link-secondary{font-size:.92em;opacity:.85}
.brand-dashboard{color:inherit;text-decoration:none}.brand-dashboard:hover{color:#fff}.module-context-wrap{max-width:1500px;margin:0 auto}.module-context-nav{display:flex;align-items:center;gap:.45rem;overflow-x:auto;padding:.55rem .7rem;border:1px solid var(--border);border-radius:.8rem;background:var(--surface);white-space:nowrap}.module-context-title{font-weight:750;padding:.35rem .55rem;color:var(--primary)}.module-context-nav>a{color:var(--text);text-decoration:none;border-radius:.55rem;padding:.4rem .65rem;font-size:.9rem}.module-context-nav>a:hover,.module-context-nav>a.active{color:#fff;background:var(--primary)}.module-context-more{margin-left:auto}.module-context-more .btn{white-space:nowrap}
.pos-shell{max-width:1440px;margin:0 auto}.pos-header,.pos-cart,.pos-summary{border:1px solid var(--border);border-radius:1rem;background:var(--surface);box-shadow:0 .35rem 1.2rem rgba(0,0,0,.05)}.pos-product-search{background:color-mix(in srgb,var(--primary) 7%,var(--surface));border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--border));border-radius:.85rem}.pos-cart.product-search-open #cartEmpty,.pos-cart.product-search-open #cartItems{margin-top:var(--pos-product-popup-space,0px)}#productoResultados.app-floating-panel,#clienteResultados.app-floating-panel{background:var(--surface);border:1px solid var(--border);border-radius:.65rem}.product-autocomplete-result,.customer-result{padding:.55rem .75rem;line-height:1.3;text-align:left}.cart-item{border-bottom:1px solid var(--border);padding:1rem 0}.cart-item:last-child{border-bottom:0}.cart-price{min-width:7.5rem;text-align:end}.cart-quantity{width:7.5rem;text-align:center}.pos-total{font-size:clamp(2rem,4vw,3rem);font-weight:800;letter-spacing:-.04em}.pos-summary{position:sticky;top:1rem}.payment-option{cursor:pointer;border:1px solid var(--border);border-radius:.8rem;padding:.8rem;height:100%}.payment-option:has(input:checked){border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface));box-shadow:0 0 0 .15rem color-mix(in srgb,var(--primary) 18%,transparent)}.stock-low{color:var(--bs-danger);font-weight:600}.pos-client-area{position:relative}.pos-client-controls{display:flex;flex-wrap:wrap;gap:.5rem;align-items:stretch}.pos-client-search{flex:1 1 17rem;min-width:0}.pos-selected-client{display:flex;flex-wrap:wrap;gap:.35rem .6rem;align-items:baseline;margin-top:.65rem;padding:.6rem .75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--bs-tertiary-bg);line-height:1.35;overflow-wrap:anywhere}.pos-client-area.customer-search-open .pos-selected-client{margin-top:calc(.65rem + var(--pos-client-popup-space,0px))}.pos-selected-client-label{flex:0 0 auto;color:var(--muted);font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}#clienteSeleccionado{min-width:0;flex:1 1 14rem}.customer-result-title{display:block;font-size:.9rem}.customer-result-meta{display:block;margin-top:.15rem;font-size:.76rem}.pos-mobile-charge{display:none}

@media(max-width:991.98px){.sidebar{width:min(84vw,310px);flex-basis:min(84vw,310px);height:100dvh;min-height:100dvh;overflow-y:auto;z-index:1035}.mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:1030;background:rgba(13,24,37,.5);opacity:0;pointer-events:none;transition:opacity .2s ease}.mobile-nav-open .mobile-nav-backdrop{opacity:1;pointer-events:auto}.mobile-nav-open{overflow:hidden}.topbar{min-height:68px;padding: .8rem 1.25rem}.pos-summary{position:static}.cart-price{min-width:0}.module-panel-header form{width:100%}.module-panel-header form .form-control{min-width:12rem}}

@media(max-width:767.98px){.page-content{padding:1rem}.module-context-wrap{padding:1rem 1rem 0!important}.module-context-nav{border-radius:.65rem}.module-context-title{font-size:.85rem}.module-context-more{margin-left:0}.topbar{gap:.6rem}.topbar-logo{width:32px;height:32px}.topbar-title h1{font-size:1rem}.topbar-title p{display:none}.toolbar .dropdown{display:none}.pos-header,.pos-cart,.pos-summary{border-radius:.8rem}.pos-header{padding:1rem!important}.pos-header .row{gap:.75rem}.pos-client-controls{display:grid;grid-template-columns:1fr}.pos-client-controls>.btn,.pos-client-search{width:100%;min-height:44px}.pos-client-search{order:0}.pos-client-search .form-control,.pos-client-search .btn{min-height:44px}.pos-selected-client{margin-top:.6rem}.pos-header .form-control{min-height:44px}.pos-product-search{padding:.85rem!important}.pos-product-search .input-group{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}.pos-product-search .input-group .form-control{grid-column:1/-1;width:100%;min-height:48px;border-radius:.5rem!important}.pos-product-search .input-group .btn{min-height:44px;border-radius:.5rem!important}.pos-cart{padding:1rem!important}.cart-item>div{display:grid!important;grid-template-columns:1fr auto;gap:.7rem!important;align-items:end!important}.cart-item>div>.flex-grow-1{grid-column:1/-1}.cart-item .cart-price{min-width:0;text-align:left}.cart-item .cart-price:last-of-type{text-align:right}.cart-item .input-group .btn,.cart-item .cart-quantity{min-height:42px}.cart-item .cart-delete{grid-column:1/-1;min-height:42px}.pos-summary{margin-bottom:5.4rem}.pos-summary #btnCobrar{min-height:46px}.pos-mobile-charge:not(.d-none){position:fixed;left:0;right:0;bottom:0;z-index:1025;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.7rem max(1rem,env(safe-area-inset-right)) calc(.7rem + env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));background:var(--surface);border-top:1px solid var(--border);box-shadow:0 -8px 22px rgba(0,0,0,.12)}.pos-mobile-charge span{display:grid;min-width:0}.pos-mobile-charge small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pos-mobile-charge strong{font-size:1.15rem;line-height:1.25}.pos-mobile-charge .btn{min-height:46px;white-space:nowrap}.pos-has-cart .page-content{padding-bottom:5.8rem}.app-floating-panel{max-width:calc(100dvw - 1rem)!important}.product-autocomplete-result,.customer-result{min-height:52px;padding:.6rem .75rem}.app-floating-panel .list-group-item{overflow-wrap:anywhere}.modal-fullscreen-sm-down .modal-header,.modal-fullscreen-sm-down .modal-footer{padding:.8rem 1rem}.modal-fullscreen-sm-down .modal-footer .btn{min-height:44px}.payment-option{min-height:54px;display:flex!important;align-items:center}.module-panel-body .row>[class*="col-"]{margin-bottom:.15rem}.module-panel-body .btn{min-height:42px}.cash-summary-grid{grid-template-columns:1fr!important}.dashboard-chart-card{min-width:0}.dashboard-chart-card canvas{max-width:100%!important;height:auto!important}}
.config-page,.config-panel{min-width:0;overflow-x:hidden}.config-summary-stack{display:grid;gap:.9rem}.config-summary-label{font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700}.config-summary-value{font-size:1.05rem;font-weight:700;color:var(--text)}.config-summary-muted{color:var(--muted)}.config-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.config-admin-card{border:1px solid var(--border);border-radius:16px;background:var(--surface);padding:1rem 1rem 1.1rem;display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;box-shadow:var(--shadow-sm)}.config-admin-card h3{font-size:1rem;margin:0 0 .25rem}.config-admin-detail{border-top:1px solid var(--border);padding-top:1.25rem;margin-top:1.25rem}.config-admin-detail-header{margin-bottom:1rem}.config-check-stack{display:grid;gap:.4rem}.printing-doc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.config-doc-card{border:1px solid var(--border);border-radius:16px;padding:1rem;background:var(--surface);box-shadow:var(--shadow-sm);cursor:pointer;display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.config-doc-card.active{border-color:var(--primary);background:var(--primary-soft)}.config-doc-card h3{font-size:1rem;margin:0 0 .25rem}.config-print-side,.config-print-editor,.config-preview-panel,.config-blocks-panel{border:1px solid var(--border);border-radius:16px;padding:1rem;background:var(--surface);box-shadow:var(--shadow-sm);min-width:0}.config-template-list .list-group-item{border-radius:14px!important;margin-bottom:.45rem;border:1px solid var(--border)}.config-template-list .list-group-item.active{background:var(--primary);border-color:var(--primary)}.config-print-actions{display:flex;flex-wrap:wrap;gap:.5rem}.config-block-card{border:1px solid var(--border);border-radius:14px;padding:.85rem;background:color-mix(in srgb,var(--page) 45%,var(--surface));cursor:pointer}.config-block-card.is-selected{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 18%,transparent)}.config-block-card.is-dragging{opacity:.65}.config-preview-sheet{border:1px dashed var(--border);background:color-mix(in srgb,var(--page) 70%,var(--surface));border-radius:16px;padding:1rem;overflow:auto;max-width:100%}.config-preview-stage{display:flex;justify-content:center;align-items:flex-start;transform:scale(var(--preview-scale, .85));transform-origin:top center;transition:transform .15s ease}.config-preview-safe-area{width:min(100%,210mm);min-height:297mm;background:#fff;color:#111;border:1px solid #d9d9d9;margin:0 auto;padding:14mm 16mm;box-shadow:0 12px 24px rgba(0,0,0,.06);display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;position:relative;background-image:linear-gradient(to right, rgba(18,58,99,.05) 1px, transparent 1px);background-size:calc(100% / 12) 100%}.config-preview-block{grid-column:span 12;border:1px solid transparent;padding:.35rem .4rem;position:relative;cursor:pointer}.config-preview-block.is-selected{border-color:#123a63;background:rgba(18,58,99,.06)}.config-preview-block.with-border{border-color:#cfcfcf}.config-preview-block-tools{position:absolute;top:.2rem;right:.2rem;display:flex;gap:.2rem;opacity:0;transition:opacity .15s ease}.config-preview-block:hover .config-preview-block-tools,.config-preview-block.is-selected .config-preview-block-tools{opacity:1}.config-preview-tool{border:1px solid #d0d7e1;background:#fff;border-radius:999px;width:24px;height:24px;font-size:.72rem;line-height:1}.config-preview-block-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:#666;margin-bottom:.2rem}.config-preview-block-body{white-space:normal;line-height:1.35}.config-preview-block.width-6{grid-column:span 6}.config-preview-block.width-4{grid-column:span 4}.config-preview-block.width-3{grid-column:span 3}.config-preview-block.width-2{grid-column:span 2}.config-preview-block.align-center{text-align:center}.config-preview-block.align-right{text-align:right}.config-preview-block.align-left{text-align:left}
.ferias-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.ferias-summary-card{border-radius:18px;box-shadow:var(--shadow-sm)}.ferias-summary-card small{display:block;color:var(--muted);margin-bottom:.35rem}.ferias-summary-card strong{font-size:1.35rem;color:var(--primary)}.ferias-list-card,.ferias-detail-card{border-radius:18px}.ferias-list{display:grid;gap:.75rem;max-height:70vh;overflow:auto}.feria-list-item{width:100%;text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:16px;padding:.9rem 1rem;transition:border-color .2s ease,box-shadow .2s ease}.feria-list-item.active,.feria-list-item:hover{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 14%,transparent)}.feria-empty-inline,.feria-empty-state{border:1px dashed var(--border);border-radius:18px;padding:1.2rem;background:color-mix(in srgb,var(--page) 70%,var(--surface))}.feria-empty-state{min-height:280px;display:grid;place-content:center;gap:.6rem}.feria-empty-state i{font-size:2rem;color:var(--primary)}.feria-info-grid,.ferias-stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.feria-info-card,.feria-panel-card{border:1px solid var(--border);border-radius:18px;background:var(--surface);padding:1rem;box-shadow:var(--shadow-sm)}.feria-info-card{display:flex;gap:.85rem;align-items:flex-start}.feria-info-card small{display:block;color:var(--muted);margin-bottom:.25rem}.feria-info-card strong{display:block}.feria-info-icon{width:42px;height:42px;border-radius:14px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:1.15rem}.feria-lines-stack{display:grid;gap:.7rem}.feria-line-item{display:flex;justify-content:space-between;gap:1rem;padding-bottom:.55rem;border-bottom:1px dashed var(--border)}.feria-line-item.total{padding-top:.35rem;border-bottom:0;font-size:1rem}.feria-calendar-title{font-size:1.05rem;font-weight:700;color:var(--primary);text-transform:capitalize}.feria-calendar-multi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.feria-calendar-month-card{border:1px solid var(--border);border-radius:18px;background:color-mix(in srgb,var(--surface) 88%,var(--page));padding:.95rem;box-shadow:var(--shadow-sm)}.feria-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.38rem}.feria-calendar-header{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);text-align:center}.feria-calendar-cell{min-height:84px;border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:.45rem;display:flex;flex-direction:column;gap:.3rem}.feria-calendar-cell.has-events{background:color-mix(in srgb,var(--primary) 3%,var(--surface));border-color:color-mix(in srgb,var(--primary) 22%,var(--border))}.feria-calendar-cell.empty{background:transparent;border-style:dashed;min-height:84px}.feria-calendar-day{font-weight:700;color:var(--primary);font-size:.86rem}.feria-calendar-events{display:grid;gap:.26rem;min-height:0}.feria-calendar-pill{border:0;border-radius:12px;background:color-mix(in srgb,var(--secondary) 18%,var(--surface));color:var(--primary);padding:.28rem .42rem;font-size:.68rem;line-height:1.2;text-align:left;white-space:normal}.feria-calendar-pill:hover{background:color-mix(in srgb,var(--secondary) 26%,var(--surface))}.feria-operations-list,.feria-expenses-list,.feria-day-stats{display:grid;gap:.85rem}.feria-operation-card,.feria-expense-card,.feria-day-card{border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--page) 45%,var(--surface));padding:1rem}.feria-operation-card.is-cancelled{border-color:#dc3545;background:color-mix(in srgb,#dc3545 7%,var(--surface))}.feria-day-card{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}.pos-feria-banner{display:flex;gap:.85rem;align-items:flex-start;padding:1rem 1.1rem;border:1px solid var(--border);background:var(--surface);border-radius:18px;box-shadow:var(--shadow-sm)}
.backup-cards-grid{display:grid;gap:1rem}.backup-card,.version-history-card,.config-summary-card{border:1px solid var(--border);border-radius:16px;background:var(--surface);padding:1rem;box-shadow:var(--shadow-sm)}.backup-card{cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.backup-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)}.backup-card.selected{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 22%,transparent)}.backup-card-title{font-weight:700;color:var(--text);font-size:1rem}.backup-card-summary{color:var(--text);margin:.35rem 0 .7rem;line-height:1.45}.backup-card-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem .9rem}.backup-card-meta span{display:block;font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:.15rem}.backup-card-meta strong{font-size:.92rem}.backup-card-actions{display:flex;flex-wrap:wrap;gap:.5rem}.version-history-list{display:grid;gap:1rem}.version-history-card.is-current{border-color:var(--primary);background:var(--primary-soft)}.backup-restore-summary{display:grid;gap:.3rem;padding:.9rem 1rem;border-radius:14px;background:color-mix(in srgb,var(--page) 45%,var(--surface));border:1px solid var(--border)}
@media(max-width:1199.98px){.config-admin-grid,.printing-doc-grid{grid-template-columns:1fr}.config-preview-safe-area{transform-origin:top center}}
@media(max-width:1199.98px){.ferias-summary-grid,.feria-info-grid,.ferias-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feria-calendar-multi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767.98px){.backup-card-meta{grid-template-columns:1fr}.backup-card-actions{flex-direction:column}.backup-card-actions .btn{width:100%}}
@media(max-width:767.98px){.config-admin-card{flex-direction:column;align-items:stretch}.config-print-actions{flex-direction:column}.config-preview-sheet{padding:.65rem;overflow-x:auto}.config-preview-safe-area{width:620px;min-width:620px;min-height:auto}.ferias-summary-grid,.feria-info-grid,.ferias-stats-grid{grid-template-columns:1fr}.feria-calendar-multi-grid{grid-template-columns:1fr}.feria-calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.feria-calendar-header{font-size:.64rem}.feria-calendar-cell{min-height:78px;padding:.35rem}.feria-calendar-day{font-size:.8rem}.feria-calendar-pill{font-size:.63rem;padding:.24rem .35rem}.feria-day-card{align-items:flex-start}.pos-feria-banner{padding:.85rem}}
.sales-table-sm th,.sales-table-sm td{padding:.45rem .55rem;font-size:.92rem}
.products-filter-bar .form-control,.products-filter-bar .form-select{width:auto;min-width:145px}
.products-filter-bar .form-control[name="buscar"]{min-width:240px;flex:1 1 260px}
.products-filter-bar button{white-space:nowrap}
.trend-kpi-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}
.trend-kpi-row>div{border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--page) 45%,var(--surface));padding:.75rem .85rem}
.trend-kpi-row span{display:block;font-size:.76rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:.2rem}
.trend-kpi-row strong{display:block;color:var(--primary);font-size:1rem}
.trend-mini-card{border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--surface) 94%,var(--page));padding:.95rem}
.trend-inline-stat{display:flex;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px dashed var(--border)}
.trend-inline-stat:last-child{border-bottom:0;padding-bottom:0}
.trend-inline-stat small{display:block;color:var(--muted)}
.trend-compare-list{display:grid;gap:.75rem}
.trend-compare-row{display:grid;grid-template-columns:minmax(0,220px) 1fr;gap:1rem;align-items:center}
.trend-compare-main small{display:block;color:var(--muted)}
.trend-compare-values{display:grid;grid-template-columns:auto 1fr auto;gap:.75rem;align-items:center;font-size:.9rem}
.trend-compare-bar{display:flex;height:10px;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--page) 55%,var(--surface));min-width:140px}
.trend-compare-bar .local{background:var(--primary)}
.trend-compare-bar .ferias{background:var(--secondary)}
.trend-stock-alert,.trend-opportunity,.trend-now-card,.trend-date-card{border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--page) 35%,var(--surface));padding:.85rem}
.trend-now-card span{display:block;color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.25rem}
.trend-now-card strong{display:block;color:var(--primary)}
.client-period-switch .btn{min-width:92px}
.client-stats-visual{display:grid;grid-template-columns:minmax(0,280px) 1fr;gap:1rem;align-items:center}
.client-stats-chart-wrap{display:grid;place-items:center;min-height:280px}
.client-stats-breakdown{display:grid;gap:.7rem}
.client-breakdown-row{display:flex;justify-content:space-between;gap:1rem;padding:.55rem 0;border-bottom:1px dashed var(--border)}
.client-breakdown-row:last-child{border-bottom:0;padding-bottom:0}
.client-breakdown-row small{display:block;color:var(--muted)}
@media(max-width:991.98px){.trend-kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}.trend-compare-row{grid-template-columns:1fr}.client-stats-visual{grid-template-columns:1fr}.client-stats-chart-wrap{min-height:240px}}
@media(max-width:991.98px){.products-filter-bar .form-control,.products-filter-bar .form-select{width:100%;min-width:0}}
@media(max-width:575.98px){.trend-kpi-row{grid-template-columns:1fr}.client-period-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem}.client-period-switch .btn{border-radius:.5rem!important}}

/* Ferias v2 */
.ferias-action-bar{border-radius:20px}
.ferias-base-list,.ferias-editions-list,.ferias-upcoming-grid,.ferias-results-grid,.ferias-compare-grid{display:grid;gap:1rem}
.ferias-upcoming-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ferias-results-grid,.ferias-compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.feria-base-item,.feria-upcoming-card,.feria-result-card,.feria-compare-card,.feria-edition-item{width:100%;text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:18px;padding:1rem;box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease}
.feria-base-item.active,.feria-base-item:hover,.feria-edition-item:hover,.feria-upcoming-card:hover{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 14%,transparent)}
.feria-form-block{border:1px solid var(--border);border-radius:18px;background:color-mix(in srgb,var(--surface) 90%,var(--page));padding:1rem 1.1rem;box-shadow:var(--shadow-sm)}
.feria-suggestion-box,.feria-days-preview{border:1px dashed var(--border);border-radius:16px;background:color-mix(in srgb,var(--page) 50%,var(--surface));padding:.85rem 1rem;color:var(--muted);font-size:.92rem}
.feria-operational-card{border-radius:20px;box-shadow:var(--shadow-sm)}.ferias-top-view .h4,.ferias-top-view .h5{color:var(--primary)}.feria-operational-card .form-control,.feria-operational-card .form-select{min-height:42px}.feria-operational-card .btn{min-height:40px}.feria-operational-card .badge{font-weight:700}.feria-operational-card .feria-operations-list,.feria-operational-card .feria-expenses-list{max-height:520px;overflow:auto}.feria-operational-card .feria-base-item .form-check{margin:0}.feria-operational-card .feria-base-item{cursor:default}.feria-home-main-card .feria-days-preview{display:flex;align-items:center;min-height:42px}.feria-home-main-card .form-text{margin-bottom:0}.pos-mode-feria .pos-header .pos-client-row{display:none!important}.pos-mode-feria .pos-cf-strip{align-items:stretch}.pos-mode-feria .pos-info-copy strong{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.feria-detail-tabs{display:flex;gap:.65rem;flex-wrap:wrap;overflow-x:auto;padding-bottom:.2rem}
.feria-detail-tabs button{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:999px;padding:.55rem 1rem;font-weight:600;white-space:nowrap}
.feria-detail-tabs button.active{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface));color:var(--primary)}
.feria-compare-card .feria-line-item,.feria-result-card .feria-line-item{font-size:.92rem}
.feria-operation-card .btn,.feria-expense-card .btn{min-height:40px}

@media(max-width:1199.98px){
  .ferias-upcoming-grid,.ferias-results-grid,.ferias-compare-grid{grid-template-columns:1fr}
}

@media(max-width:767.98px){
  .ferias-action-bar .p-lg-4,.ferias-list-card .p-lg-4,.ferias-detail-card .p-lg-4{padding:1rem!important}
  .feria-form-block{padding:.9rem}
  .feria-detail-tabs{flex-wrap:nowrap}
  .feria-detail-tabs button{padding:.5rem .85rem}
  .ferias-upcoming-grid,.ferias-results-grid,.ferias-compare-grid{grid-template-columns:1fr}
}

@media(max-width:575.98px){.topbar{padding:.65rem .85rem}.topbar .btn{min-height:40px}.topbar-title{min-width:0}.mobile-app-name{display:block}.page-content h2{font-size:1.25rem}.pos-header .text-lg-end{width:100%}.pos-header .text-lg-end .form-control{max-width:none}.pos-total{font-size:2rem}.cart-item{padding:.9rem 0}.cart-item .cart-quantity{width:5.25rem}.pos-selected-client-label{width:100%}.clientes-table,.product-compact-table{border:0}.clientes-table thead,.product-compact-table thead{display:none}.clientes-table,.clientes-table tbody,.clientes-table tr,.product-compact-table,.product-compact-table tbody,.product-compact-table tr{display:block;width:100%}.clientes-table tr,.product-compact-table tr{margin:.75rem;border:1px solid var(--border);border-radius:.75rem;padding:.75rem;background:var(--surface)}.clientes-table td,.product-compact-table td{display:none;border:0;padding:.25rem 0!important;text-align:left!important}.clientes-table td:nth-child(1),.clientes-table td:nth-child(2),.clientes-table td:nth-child(3),.clientes-table td:nth-child(4),.clientes-table td:nth-last-child(2),.clientes-table td:last-child{display:block}.product-compact-table td:nth-child(2),.product-compact-table td:nth-child(3),.product-compact-table td:nth-last-child(5),.product-compact-table td:nth-last-child(3),.product-compact-table td:last-child{display:block}.clientes-table td:last-child,.product-compact-table td:last-child{margin-top:.45rem}.clientes-table .dropdown-toggle,.product-compact-table .dropdown-toggle{min-height:40px}.table-responsive{overflow-x:auto}.gasto-tabs{overflow-x:auto;flex-wrap:nowrap}.gasto-tabs .nav-link{white-space:nowrap}.reportes-tabs-card{margin:0 -1rem}.global-alert-wrap{padding-left:1rem!important;padding-right:1rem!important}}

/* Barra comercial compacta: en Vender los controles de apariencia viven junto
   a Venta / Presupuesto / Historial y no duplican un encabezado decorativo. */
.topbar-vender{display:none}.module-context-tools{display:flex;align-items:center;gap:.45rem;margin-left:0}.module-context-tools .btn{white-space:nowrap}
@media(max-width:767.98px){.topbar-vender{display:flex;min-height:52px;padding:.45rem .75rem}.topbar-vender #sidebarToggle{margin-right:auto}.module-context-tools .dropdown{display:block!important}.module-context-tools{margin-left:0}}

/* Barra compacta unificada de módulos. La cabecera global queda reservada al
   disparador del menú móvil; títulos, pestañas y preferencias viven aquí. */
.topbar-navigation{display:none!important}
.module-toolbar-wrap{padding:12px 24px 0;max-width:1500px;margin:0 auto}
.module-toolbar{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 10px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-sm)}
.module-toolbar-leading{display:flex;align-items:center;min-width:0;gap:10px;flex:1}
.module-toolbar-brand{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-weight:800;color:var(--text);padding:0 5px}
.module-toolbar-tabs{display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:thin;padding:1px}
.module-toolbar-tabs a,.module-toolbar-tab-button{display:inline-flex;align-items:center;white-space:nowrap;border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:.88rem;font-weight:650;padding:.42rem .62rem;text-decoration:none}
.module-toolbar-tabs a:hover,.module-toolbar-tabs a.active,.module-toolbar-tab-button:hover{background:var(--primary-soft);color:var(--primary)}
.module-toolbar-tools{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-shrink:0}.module-toolbar-tools .btn{white-space:nowrap}.module-toolbar-create{order:-1}
.pos-sale-meta{display:flex;align-items:stretch;justify-content:space-between;gap:1rem}.pos-cf-card,.pos-date-control{display:flex;flex-direction:column;gap:.12rem;padding:.65rem .8rem;border:1px solid var(--border);border-radius:.8rem;background:color-mix(in srgb,var(--primary) 5%,var(--surface))}.pos-cf-card strong{font-size:1rem;letter-spacing:.01em}.pos-cf-card small{color:var(--muted);font-weight:650}.pos-date-control{min-width:10rem;background:var(--surface)}.pos-date-control .form-control{min-height:34px}.pos-mode-cf .pos-header>.d-flex,.pos-mode-cf .pos-header>.row{display:none!important}.pos-mode-client .pos-sale-meta{display:none!important}.pos-mode-client .pos-header>.row>.col-lg-4{display:none!important}.pos-mode-client #btnConsumidorFinal{display:none!important}.pos-mode-client .pos-header>.d-flex{justify-content:flex-start!important}.pos-mode-client .pos-header>.d-flex .text-lg-end{margin:0!important;text-align:start!important}.pos-mode-client .pos-header>.row{margin-top:.25rem!important}.pos-cart .section-kicker{color:var(--secondary);font-weight:800}.pos-summary{border-top:3px solid color-mix(in srgb,var(--secondary) 80%,var(--primary));}.pos-summary .btn-success{min-height:52px;font-weight:800;letter-spacing:.02em}.cart-item{transition:background-color .15s ease}.cart-item:hover{background:color-mix(in srgb,var(--primary) 3%,transparent)}
@media(max-width:1536px){.cart-item>div{flex-wrap:wrap;align-items:flex-start!important;gap:.8rem!important}.cart-item>div>.flex-grow-1{flex:1 1 100%}.cart-price{min-width:7.9rem;flex-basis:7.9rem}.cart-item .input-group{min-width:10.4rem}.cart-delete{align-self:flex-end}}
@media(max-width:991.98px){.topbar-navigation{display:flex!important;align-items:center;min-height:44px;padding:4px 12px;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:none}.topbar-navigation #sidebarToggle{min-width:40px;min-height:36px}.module-toolbar-wrap{padding:8px 12px 0}}
@media(max-width:767.98px){.module-toolbar{align-items:flex-start;min-height:50px;padding:6px 7px;gap:6px}.module-toolbar-leading{gap:5px;overflow:hidden}.module-toolbar-brand{font-size:.88rem;padding:5px 4px}.module-toolbar-tabs{gap:2px;max-width:calc(100vw - 175px)}.module-toolbar-tabs a,.module-toolbar-tab-button{font-size:.79rem;padding:.4rem .48rem}.module-toolbar-tools{gap:3px}.module-toolbar-tool-label,.module-toolbar-create span{display:none}.module-toolbar-tools .btn{min-width:34px;min-height:34px;padding:.32rem .45rem}.module-toolbar-create{display:inline-flex;align-items:center;justify-content:center}.pos-sale-meta{align-items:stretch}.pos-cf-card{flex:1}.pos-date-control{min-width:8.5rem}.pos-mode-cf .pos-header{padding:1rem!important}.pos-mode-cf .pos-sale-meta{display:grid;grid-template-columns:1fr minmax(8.5rem,42%)}.pos-mode-client .pos-header>.row>.col-lg-8{width:100%}}

/* Encabezados antiguos: las acciones pasan a la barra común y las frases
   genéricas dejan de consumir una segunda fila vertical. */
.products-page>.module-page-heading,.suppliers-page>.module-page-heading,.compras-page>.module-page-heading,.cajas-page>.module-page-heading{display:none!important}
.page-content>.module-page-heading>div:first-child,.dashboard-page .module-page-heading>div:first-child{display:none!important}
.page-content>.module-page-heading{min-height:0;margin-bottom:1rem!important;justify-content:flex-end!important}
.page-content>.module-page-heading:has(#newExpenseButtonLegacy){display:none!important}
/* Rutas directas que aún conservaban el encabezado anterior en línea. */
.page-content>div.d-flex.justify-content-between.align-items-end.mb-4:not(.module-page-heading),.page-content>div.mb-4:first-child{display:none!important}
[data-theme="dark"] .pos-shell .pos-header,[data-theme="dark"] .pos-shell .pos-cart,[data-theme="dark"] .pos-shell .pos-summary{background:linear-gradient(180deg,#1d2734,#17202c);box-shadow:0 16px 34px rgba(0,0,0,.28)}
[data-theme="dark"] .pos-info-tile,[data-theme="dark"] .pos-product-search,[data-theme="dark"] .pos-empty-state,[data-theme="dark"] .cart-item,[data-theme="dark"] .pos-stat-card,[data-theme="dark"] .pos-total-card{background:#1f2a37}
[data-theme="dark"] .pos-info-copy strong,[data-theme="dark"] .pos-empty-state strong,[data-theme="dark"] .pos-stat-card strong,[data-theme="dark"] .pos-total,[data-theme="dark"] .cart-item .fw-semibold{color:#eef4fb}
[data-theme="dark"] .pos-client-search,[data-theme="dark"] .pos-selected-client{background:#1b2430}
[data-theme="dark"] .pos-search-tool .input-group-text,[data-theme="dark"] .pos-search-tool .form-control{background:#18212c;border-color:#31465c;color:#edf4fc}
[data-theme="dark"] #productoResultados.app-floating-panel,[data-theme="dark"] #clienteResultados.app-floating-panel{background:#1d2734}

@media(max-width:991.98px){
  .module-toolbar{min-height:54px;padding:7px 9px}
  .pos-header,.pos-cart,.pos-summary{border-radius:16px}
  .pos-cart,.pos-summary{padding:1rem!important}
  .pos-total{font-size:clamp(2.2rem,7vw,3rem)}
}

@media(max-width:767.98px){
  .module-toolbar{padding:7px 8px;border-radius:16px}
  .module-toolbar-tabs{max-width:calc(100vw - 158px)}
  .module-toolbar-tabs a,.module-toolbar-tab-button{padding:.5rem .56rem;font-size:.8rem}
  .module-toolbar-tabs a.active::after{left:.5rem;right:.5rem}
  .pos-header{padding:1rem!important}
  .pos-sale-meta{display:grid;grid-template-columns:1fr;gap:.7rem}
  .pos-mode-cf .pos-sale-meta{grid-template-columns:1fr}
  .pos-info-tile{min-width:0}
  .pos-client-controls{grid-template-columns:1fr}
  .pos-panel-heading{align-items:center}
  .pos-cart-head{flex-direction:column;align-items:flex-start!important}
  .pos-search-tool{display:grid!important;grid-template-columns:1fr 1fr;gap:.55rem}
  .pos-search-tool .input-group-text{grid-column:1/2;border-right:0;border-bottom:1px solid #ccdae8;border-radius:16px 0 0 16px!important}
  .pos-search-tool .form-control{grid-column:1/-1;order:-1;border-left:1px solid #ccdae8;border-radius:16px!important}
  .pos-search-tool .btn{min-height:48px}
  .pos-search-tool .input-group-text{display:none}
  .pos-empty-state{min-height:190px;padding:1.5rem 1rem}
  .cart-item>div{display:grid!important;grid-template-columns:1fr auto;gap:.8rem!important;align-items:start!important}
  .cart-item>div>.flex-grow-1{grid-column:1/-1}
  .cart-price{min-width:0;text-align:left}
  .cart-item .cart-price:last-of-type{text-align:right}
  .cart-delete{grid-column:1/-1;justify-self:stretch}
  .pos-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:575.98px){
  .pos-shell{padding:0}
  .pos-header,.pos-cart,.pos-summary{border-radius:14px}
  .pos-info-icon,.pos-panel-icon,.pos-stat-icon,.pos-empty-icon{width:42px;height:42px;flex-basis:42px;border-radius:14px}
  .pos-info-copy strong,.pos-panel-heading h4{font-size:.98rem}
  .pos-search-tool .form-control{min-height:52px}
  .pos-search-tool .btn{min-height:46px}
  .cart-item>div{padding:.9rem}
  .pos-stat-card{padding:.8rem}
  .pos-total-card{padding:.95rem}
  .pos-total{font-size:2.25rem}
}

/* Ajuste fino de inicio operativo Vender:
   menos altura arriba, más espacio visible para productos y cobro. */
.module-toolbar-wrap{padding-top:8px}
.pos-header{margin-bottom:.85rem!important}
.pos-checkout-head small{display:none}
.pos-cart-head{margin-bottom:.8rem!important}
.pos-cart,.pos-summary{padding:1rem 1.05rem!important}
.pos-product-search{padding:.8rem .9rem!important}
.pos-search-tool{display:grid!important;grid-template-columns:56px minmax(0,1fr) auto auto;gap:.8rem;align-items:stretch;box-shadow:none}
.pos-search-tool .input-group-text,.pos-search-tool .form-control,.pos-search-tool .btn{min-height:52px}
.pos-search-tool .input-group-text{border-right:1px solid #ccdae8;border-radius:14px!important}
.pos-search-tool .form-control{border-left:1px solid #ccdae8;border-radius:14px!important;padding-inline:1rem}
.pos-search-tool .btn{border-radius:14px!important;padding-inline:1.15rem}
#cartItems{gap:.9rem}
.cart-item>div{padding:.95rem 1rem;gap:1rem!important}
.cart-item .input-group{gap:.4rem}
.cart-item .input-group .btn{min-width:42px}
.cart-quantity,.budget-quantity{width:5.25rem;min-width:5.25rem;max-width:5.25rem;text-align:center;font-weight:700}
.pos-summary .btn-success{min-height:56px}
.pos-total-card{padding:.9rem 1rem}

.pos-mode-cf .pos-header{display:block!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.pos-mode-cf .pos-sale-meta{display:block!important}
.pos-cf-strip{display:flex;align-items:center;gap:.9rem;max-width:740px;padding:.8rem 1rem;border:1px solid color-mix(in srgb,var(--border) 82%,#d8e2ee);border-radius:18px;background:linear-gradient(180deg,#ffffff,#f7fafc);box-shadow:0 10px 28px rgba(18,42,70,.06)}
.pos-cf-divider{width:1px;align-self:stretch;background:color-mix(in srgb,var(--border) 75%,#d6dfeb);margin:.1rem .1rem}
.pos-mode-cf .pos-info-tile{min-width:0;padding:0;border:0;background:transparent;box-shadow:none}
.pos-mode-cf .pos-cf-card{flex:1 1 auto}
.pos-mode-cf .pos-date-control{flex:0 0 215px}
.pos-mode-cf .pos-info-copy{gap:.05rem}
.pos-mode-cf .pos-info-copy strong{font-size:1rem}
.pos-mode-cf .pos-date-control .form-control{max-width:160px;min-height:38px;padding:.28rem .7rem}
.pos-mode-cf .pos-client-row{display:none!important}

.pos-mode-client .pos-sale-meta{display:none!important}
.pos-mode-client .pos-header{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.pos-mode-client .pos-client-row{margin-top:0!important}
.pos-client-panel{gap:.65rem;padding:.85rem 1rem;border:1px solid color-mix(in srgb,var(--border) 82%,#d8e2ee);border-radius:18px;background:linear-gradient(180deg,#ffffff,#f7fafc);box-shadow:0 10px 28px rgba(18,42,70,.06)}
.pos-client-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.pos-client-heading-main{display:flex;align-items:flex-start;gap:.8rem;min-width:0}
.pos-client-inline-date{flex:0 0 190px;max-width:205px}
.pos-client-inline-date .form-control{min-height:40px;border-radius:12px}
.pos-client-heading h4{font-size:1rem}
.pos-client-heading small{display:block;line-height:1.25}
.pos-client-area{display:grid;gap:.5rem}
.pos-mode-client #btnConsumidorFinal{display:none!important}
.pos-mode-client .pos-client-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.7rem;align-items:center}
.pos-mode-client .pos-client-search{flex:0 0 auto}
.pos-selected-client{margin-top:0;padding:.5rem .75rem;min-height:0}
.pos-selected-client:has(#clienteSeleccionado .text-muted:only-child){padding:.2rem 0;border:0;background:transparent}
.pos-selected-client:has(#clienteSeleccionado .text-muted:only-child) .pos-selected-client-label{display:none}

@media(min-width:992px){
  .pos-sales-grid{margin-top:.05rem!important}
  .pos-main-column,.pos-checkout-column{padding-top:0!important}
}

@media(max-width:767.98px){
  .module-toolbar-wrap{padding-top:6px}
  .pos-mode-cf .pos-header,.pos-mode-client .pos-header{padding:0!important}
  .pos-cf-strip{display:grid;grid-template-columns:1fr;gap:.55rem;padding:.75rem .85rem;max-width:none}
  .pos-cf-divider{display:none}
  .pos-mode-cf .pos-date-control{flex:1 1 auto}
  .pos-client-panel{padding:.8rem .85rem}
  .pos-client-heading{display:grid;grid-template-columns:1fr;gap:.55rem}
  .pos-client-inline-date{max-width:none}
  .pos-mode-client .pos-client-controls{grid-template-columns:1fr}
  .pos-search-tool{grid-template-columns:1fr 1fr!important;gap:.55rem}
  .pos-search-tool .input-group-text{display:none}
  .pos-search-tool .form-control{grid-column:1/-1;order:-1}
  .pos-cart,.pos-summary{padding:.9rem!important}
}

@media(min-width:768px){
  .pos-search-tool{display:flex!important;align-items:stretch;gap:.8rem}
  .pos-search-tool .input-group-text{flex:0 0 56px;display:grid;place-items:center}
  .pos-search-tool .form-control{flex:1 1 auto;min-width:0;width:auto}
  .pos-search-tool .btn{flex:0 0 auto}
  .pos-mode-client .pos-client-search{display:flex!important;align-items:stretch;gap:0;min-width:0}
  .pos-mode-client .pos-client-search .input-group-text{flex:0 0 52px;display:grid;place-items:center}
  .pos-mode-client .pos-client-search .form-control{flex:1 1 auto;min-width:0;width:auto}
  .pos-mode-client .pos-client-search .btn{flex:0 0 54px}
}

/* Ajuste visual adicional para Vender: fecha + cliente en una banda más baja,
   misma familia visual para Venta CF, Venta y Presupuesto. */
.pos-mode-cf .pos-cf-strip{max-width:680px;padding:.68rem .9rem;gap:.8rem}
.pos-mode-cf .pos-date-control{flex:0 0 172px}
.pos-mode-cf .pos-date-control .form-control{max-width:142px;min-height:36px}
.pos-mode-cf .pos-cf-card strong{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;font-size:.98rem}
.pos-mode-cf .pos-client-badge{display:inline-flex;align-items:center;padding:.18rem .48rem;border-radius:999px;background:#e8f7ee;color:#1a7a48;font-size:.72rem;font-weight:800}

.pos-mode-client .pos-client-panel{padding:.75rem .95rem}
.pos-mode-client .pos-client-heading{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:center;gap:.85rem}
.pos-mode-client .pos-client-inline-date{flex:0 0 auto;max-width:none}
.pos-mode-client .pos-client-heading-main{gap:.65rem}
.pos-mode-client .pos-client-heading h4{font-size:.95rem;margin-bottom:.15rem!important}
.pos-mode-client .pos-client-heading small{font-size:.79rem}
.pos-mode-client .pos-client-controls{gap:.6rem}
.pos-mode-client .pos-selected-client{padding:.42rem .7rem}
.pos-mode-client .pos-selected-client-label{font-size:.72rem}
.pos-client-area{gap:.42rem}

.budget-shell .pos-cart,.budget-shell .pos-summary{height:100%}
.budget-shell .form-label{font-weight:700;color:var(--text)}
.budget-shell .form-control,.budget-shell .form-select{min-height:44px;border-radius:14px}

@media(max-width:767.98px){
  .pos-mode-cf .pos-cf-strip{padding:.62rem .78rem}
  .pos-mode-client .pos-client-heading{grid-template-columns:1fr;gap:.55rem}
  .budget-shell .pos-cart-head{flex-direction:column;align-items:flex-start!important}
}

.family-management-card{grid-template-columns:minmax(0,1fr)!important;gap:.75rem!important}
.family-management-main{padding:.9rem 1rem!important;display:grid;gap:.55rem!important}
.family-inline-form .row{--bs-gutter-y:.45rem}
.family-inline-form .form-label{font-size:.74rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.family-inline-form .form-control,.family-inline-form .form-select,.family-inline-form .btn{min-height:40px}
.family-inline-automation .btn,.family-inline-actions-readonly .btn{min-height:40px}
.family-automation-box{margin-top:.65rem!important;padding-top:.7rem!important}
.family-table-toolbar{padding:.1rem 0 .85rem}
.family-table-toolbar .form-label{font-size:.74rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.family-compact-table th,.family-compact-table td{padding:.62rem .7rem!important}
.family-compact-table tbody tr{line-height:1.2}
.family-row-description{margin-top:.12rem;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.family-status-badge{font-size:.7rem;padding:.35rem .55rem}
.family-row-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:.35rem;flex-wrap:nowrap}
.family-icon-btn{width:2rem;height:2rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:.65rem}
.family-icon-btn i{font-size:.92rem}
.family-compact-table td:last-child{white-space:nowrap}
#familySuggestionsPanel .module-panel-header,#familySuggestionsPanel .module-panel-body{padding-bottom:.75rem}

@media(max-width:1199.98px){
  .family-inline-automation{margin-top:.15rem}
}

@media(max-width:991.98px){
  .family-row-description{max-width:240px}
}

@media(max-width:767.98px){
  .family-management-main{padding:.8rem .85rem!important}
  .family-inline-form .form-control,.family-inline-form .form-select,.family-inline-form .btn{min-height:38px}
  .family-row-actions{gap:.25rem}
  .family-icon-btn{width:1.9rem;height:1.9rem}
}

.pos-mode-cf .pos-sale-meta{width:100%;max-width:none;display:flex;align-items:stretch;gap:.9rem}
.pos-mode-cf .pos-cf-strip{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.35fr);gap:.75rem;align-items:stretch;width:100%;max-width:none!important;padding:.58rem .75rem}
.pos-mode-cf .pos-info-tile{min-width:0;height:100%}
.pos-mode-cf .pos-cf-divider{display:none}
.pos-mode-cf .pos-date-control,.pos-mode-cf .pos-cf-card{padding:.5rem .72rem}
.pos-mode-cf .pos-info-icon{width:42px;height:42px;border-radius:14px}
.pos-mode-cf .pos-info-copy{justify-content:center}
.pos-mode-cf .pos-info-copy .section-kicker{margin-bottom:.1rem}
.pos-mode-cf .pos-cf-card strong{font-size:.96rem;line-height:1.15}
.pos-mode-cf .pos-date-control .form-control,.pos-mode-cf .pos-date-control .form-select{max-width:156px;min-height:36px}
.pos-client-panel{gap:.65rem}
.pos-client-heading{align-items:center;justify-content:space-between;gap:.9rem}
.pos-client-inline-date{min-width:170px}
.pos-client-heading-main{display:flex;align-items:center;gap:.85rem;min-width:0}
.pos-client-controls .btn,.pos-client-controls .input-group-text,.pos-client-controls .form-control{min-height:44px}
.pos-selected-client{min-height:42px;padding:.45rem .75rem}
.pos-selected-client.is-empty{display:flex;align-items:center;min-height:14px;padding:.08rem 0;border:0;background:transparent}
.pos-selected-client.is-empty .pos-selected-client-label{display:none}
.pos-cart,.pos-summary{padding:1rem 1.05rem!important}
.pos-cart-head{margin-bottom:.85rem!important}
.pos-product-search{padding:.85rem!important}
.pos-summary .btn-success{min-height:56px}
.jornada-top-card{overflow:visible}
.jornada-topbar{align-items:end}
.jornada-date-block{min-width:170px}
.jornada-client-block{position:relative;min-width:0}
.jornada-client-inline{align-items:stretch}
.jornada-client-search{flex:1 1 19rem;min-width:220px}
.jornada-client-search .input-group-text,.jornada-client-search .form-control,.jornada-client-current{min-height:44px}
.jornada-client-current{display:inline-flex;align-items:center;justify-content:center;font-weight:700;white-space:nowrap;min-width:220px}
#clientResults{left:0;right:0;top:100%;margin-top:.35rem;z-index:30;background:var(--surface);border:1px solid var(--border);border-radius:.75rem;max-height:320px;overflow:auto}
.resumen-month-card{height:100%}
.resumen-month-rubro{display:flex;justify-content:space-between;gap:.75rem;padding:.18rem 0;font-size:.88rem}
.resumen-month-rubro span:last-child{font-weight:700;color:var(--primary)}
.missing-costs-table{table-layout:fixed}
.missing-costs-table .missing-col-producto{width:31%}
.missing-costs-table .missing-col-codigo{width:10%}
.missing-costs-table .missing-col-rubro{width:12%}
.missing-costs-table .missing-col-lineas{width:8%}
.missing-costs-table .missing-col-precio{width:14%}
.missing-costs-table .missing-col-costo{width:11%}
.missing-costs-table .missing-col-nuevo{width:14%}
.missing-costs-table td,.missing-costs-table th{vertical-align:middle}
.missing-costs-table td.missing-col-producto,.missing-costs-table th.missing-col-producto{white-space:normal;word-break:break-word}
.missing-costs-table td.missing-col-codigo,.missing-costs-table th.missing-col-codigo,.missing-costs-table td.missing-col-rubro,.missing-costs-table th.missing-col-rubro,.missing-costs-table td.missing-col-lineas,.missing-costs-table th.missing-col-lineas{white-space:nowrap}
.missing-costs-table .missing-cost-input{max-width:140px;margin-left:auto}
#periodChart,#weekdayChart{max-height:195px}
.payment-period-card{display:flex;flex-direction:column}
.payment-period-layout{display:flex;flex-direction:column;gap:1rem;justify-content:center;min-height:100%}
.payment-period-chart-wrap{display:flex;align-items:center;justify-content:center}
.payment-period-chart-box{width:min(100%,320px);height:320px;margin:0 auto;position:relative}
.payment-period-chart-box canvas{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
.payment-period-summary{display:grid;gap:.7rem;align-content:start}
.payment-period-total{padding:.8rem .9rem;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--page) 45%,var(--surface));text-align:center}
.payment-period-total strong{display:block;font-size:1.4rem;line-height:1.15;color:var(--primary)}
.payment-period-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem .9rem}
.payment-period-row{display:flex;justify-content:space-between;gap:.7rem;padding:.5rem .15rem;border-bottom:1px dashed color-mix(in srgb,var(--border) 88%, transparent);font-size:.88rem}
.payment-period-row:last-child{border-bottom:0}
.payment-period-name{color:var(--text);font-weight:700}
.payment-period-value{color:var(--muted);text-align:right;white-space:nowrap}
@media (max-width: 991.98px){
  .pos-mode-cf .pos-cf-strip{grid-template-columns:1fr}
  .jornada-client-current{min-width:0}
  .missing-costs-table{min-width:820px}
  .payment-period-layout{gap:.85rem}
  .payment-period-chart-box{width:min(100%,290px);height:290px}
}
@media (max-width: 767.98px){
  .pos-mode-cf .pos-cf-strip{padding:.62rem .72rem}
  .pos-mode-cf .pos-date-control,.pos-mode-cf .pos-cf-card{padding:.5rem .6rem}
  .pos-client-heading{align-items:flex-start}
  .pos-client-inline-date{width:100%;min-width:0}
  .jornada-topbar{gap:.85rem}
  .jornada-date-block,.jornada-client-search,.jornada-client-current{width:100%;min-width:0}
  .jornada-client-inline .btn{width:100%}
  .payment-period-chart-box{width:min(100%,250px);height:250px}
  .payment-period-total{padding:.65rem .75rem}
  .payment-period-rows{grid-template-columns:1fr}
  .payment-period-row{font-size:.84rem}
}
.caja-diaria-hero{padding:1rem 1.1rem}
.caja-diaria-hero-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(260px,320px);gap:1rem;align-items:stretch}
.caja-diaria-hero-block{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:.95rem 1rem;display:flex;flex-direction:column;gap:.25rem}
.caja-diaria-hero-value{font-size:1.55rem;line-height:1.1;color:var(--primary)}
.caja-diaria-hero-actions{display:grid;grid-template-columns:1fr;gap:.55rem}
.caja-diaria-side-summary{display:grid;grid-template-columns:1fr;gap:.55rem}
.caja-diaria-side-summary div{display:flex;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px solid #eef2f7}
.caja-diaria-side-summary div:last-child{border-bottom:0;padding-bottom:0}
.caja-diaria-side-summary dt,.caja-diaria-side-summary dd{margin:0}
.daily-info-row{display:flex;justify-content:space-between;gap:1rem;padding:.65rem .2rem;border-bottom:1px solid #eef2f7}
.daily-info-row:last-child{border-bottom:0;padding-bottom:0}
.caja-diaria-filter-bar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.daily-diff-chart{display:flex;flex-direction:column;gap:.65rem}
.daily-diff-row{display:grid;grid-template-columns:96px minmax(0,1fr) 110px;gap:.75rem;align-items:center}
.daily-diff-date{font-size:.85rem;color:var(--muted)}
.daily-diff-bar-wrap{position:relative;height:16px;background:#f1f5f9;border-radius:999px;overflow:hidden}
.daily-diff-zero{position:absolute;left:50%;top:0;bottom:0;width:1px;background:#94a3b8}
.daily-diff-bar{position:absolute;top:2px;bottom:2px;border-radius:999px}
.daily-diff-bar.positive{left:50%;background:#198754}
.daily-diff-bar.negative{right:50%;background:#dc3545}
@media (max-width: 1400px){
  .caja-diaria-hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .caja-diaria-hero-actions{grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (max-width: 992px){
  .caja-diaria-hero-grid{grid-template-columns:1fr}
  .caja-diaria-hero-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .daily-diff-row{grid-template-columns:80px minmax(0,1fr) 90px}
}
@media (max-width: 576px){
  .caja-diaria-hero-actions{grid-template-columns:1fr}
  .daily-diff-row{grid-template-columns:1fr}
}
.printer-summary-card {
  background: #fff;
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.printer-summary-card--compact {
  padding: 0.7rem 0.85rem;
}

.printer-summary-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.printer-summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #123a63;
  line-height: 1.1;
}

.printer-bridge-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.printer-summary-helper {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.printer-live-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: #123a63;
}

.printer-live-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.printer-live-dot.is-online {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.printer-live-dot.is-offline {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.printer-overview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.printer-overview-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(18, 58, 99, 0.08);
}

.printer-overview-value {
  font-weight: 700;
  font-size: 1rem;
  color: #123a63;
}

.printer-overview-label {
  font-size: 0.82rem;
  color: #64748b;
}

.printer-states-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.printer-state-card {
  background: #fff;
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
  padding: 0.9rem;
  display: grid;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.printer-state-card.is-busy {
  opacity: 0.86;
}

.printer-state-card:hover,
.printer-state-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(18, 58, 99, 0.24);
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.08);
  outline: none;
}

.printer-state-card--printing {
  border-color: rgba(22, 131, 92, 0.35);
}

.printer-state-card--success-soft {
  border-color: rgba(34, 197, 94, 0.2);
}

.printer-state-card--warning {
  border-color: rgba(245, 158, 11, 0.32);
}

.printer-state-card--warning-soft {
  border-color: rgba(249, 115, 22, 0.3);
}

.printer-state-card--danger {
  border-color: rgba(220, 38, 38, 0.34);
}

.printer-state-card--disconnected {
  border-color: rgba(100, 116, 139, 0.28);
}

.printer-state-card--info {
  border-color: rgba(18, 58, 99, 0.2);
}

.printer-state-card--cancel {
  border-color: rgba(148, 163, 184, 0.32);
}

.printer-state-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.printer-state-heading {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.printer-state-top-side {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.printer-state-card-body {
  display: grid;
  gap: 0.65rem;
}

.printer-state-card-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding-top: 0.8rem;
}

.printer-state-machine {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #123a63;
}

.printer-state-model {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.printer-state-job {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.printer-state-progress-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.printer-state-progress {
  height: 0.58rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.printer-state-progress-bar {
  height: 100%;
  border-radius: 999px;
}

.printer-state-progress-primary { background: #123a63; }
.printer-state-progress-info { background: #0ea5e9; }
.printer-state-progress-warning { background: #f59e0b; }
.printer-state-progress-warning-soft { background: #f97316; }
.printer-state-progress-danger { background: #dc2626; }
.printer-state-progress-success { background: #15803d; }
.printer-state-progress-success-soft { background: #16a34a; }
.printer-state-progress-secondary { background: #7c3aed; }
.printer-state-progress-disconnected { background: #2563eb; }
.printer-state-progress-printing { background: #16a34a; }
.printer-state-progress-cancel { background: #94a3b8; }

.printer-state-progress-label {
  font-weight: 700;
  color: #123a63;
  font-size: 0.88rem;
}

.printer-state-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.printer-state-meta-item {
  display: grid;
  gap: 0.18rem;
}

.printer-state-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.printer-state-meta-item strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.printer-state-helper {
  font-size: 0.86rem;
  color: #475569;
}

.printer-state-helper.is-error {
  color: #b42318;
}

.printer-state-footer,
.printer-state-materials {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.printer-state-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.printer-state-action {
  --bs-btn-padding-y: 0.18rem;
  --bs-btn-padding-x: 0.4rem;
  --bs-btn-font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.printer-color-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.printer-color-dot {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.printer-color-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}

.printer-state-grams,
.printer-state-speed {
  font-size: 0.86rem;
  font-weight: 700;
  color: #123a63;
}

.printer-material-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.printer-material-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 100%;
}

.printer-material-chip.is-color-only {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  min-height: 1rem;
  padding: 0;
}

.printer-state-speed-row {
  display: flex;
  justify-content: flex-end;
}

.printer-speed-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #123a63;
}

.printer-speed-control .form-select {
  min-width: 11rem;
}

.printer-camera-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #0f172a;
}

.printer-camera-frame iframe,
.printer-camera-frame img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.printer-camera-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.printer-camera-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.printer-camera-meta-item {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(18, 58, 99, 0.08);
  min-width: 9.25rem;
}

.printer-camera-meta-item strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.printer-camera-meta-item span:last-child {
  color: #123a63;
  font-weight: 700;
}

.printer-files-status {
  display: grid;
  gap: 0.45rem;
}

.printer-inline-icon-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.printer-live-status--compact {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.printer-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.85rem;
}

.printer-modal-stat {
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(18, 58, 99, 0.08);
  background: rgba(248, 250, 252, 0.92);
  display: grid;
  gap: 0.2rem;
}

.printer-modal-stat span,
.printer-modal-section-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.printer-modal-stat strong {
  color: #123a63;
  font-size: 0.96rem;
}

.printer-modal-section {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.impresoras-table thead th[data-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.impresoras-table thead th.is-active {
  color: #123a63;
}

.printer-state-badge {
  font-weight: 700;
  border-radius: 999px;
}

.printer-state-printing {
  background: rgba(22, 131, 92, 0.14);
  color: #166534;
}

.printer-state-success-soft {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.printer-state-danger {
  background: rgba(220, 53, 69, 0.12);
  color: #b42318;
}

.printer-state-warning {
  background: rgba(245, 130, 32, 0.16);
  color: #9a3412;
}

.printer-state-warning-soft {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}

.printer-state-success {
  background: rgba(22, 131, 92, 0.14);
  color: #166534;
}

.printer-state-secondary {
  background: rgba(109, 40, 217, 0.13);
  color: #6d28d9;
}

.printer-state-primary {
  background: rgba(18, 58, 99, 0.12);
  color: #123a63;
}

.printer-state-cancel {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.printer-state-info {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.printer-state-disconnected {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.printer-job-cell {
  max-width: 24rem;
  min-width: 14rem;
  white-space: normal;
  word-break: break-word;
}

.printer-row-selected {
  background: rgba(18, 58, 99, 0.06);
}

.impresoras-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.impresoras-filter-bar > * {
  flex: 1 1 11rem;
}

.impresoras-cost-breakdown {
  min-height: 8rem;
}

.printer-filament-row {
  border: 1px solid rgba(18, 58, 99, 0.08);
  border-radius: 0.95rem;
  padding: 0.85rem;
  background: rgba(248, 250, 252, 0.8);
}

.printer-filament-meta {
  padding-top: 0.25rem;
}

.printer-chart-box {
  position: relative;
  height: 310px;
  max-height: 310px;
  width: 100%;
}

.printer-chart-box-lg {
  height: 420px;
  max-height: 420px;
}

.printer-chart-box canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.printer-cost-result {
  display: grid;
  gap: 1rem;
}

.printer-cost-topline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.printer-cost-topline strong {
  color: #123a63;
  font-size: 1.15rem;
}

.printer-cost-lines {
  display: grid;
  gap: 0.6rem;
}

.printer-cost-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(100, 116, 139, 0.35);
}

.printer-cost-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.printer-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.printer-subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(18, 58, 99, 0.12);
  background: #f8fafc;
  color: #123a63;
  font-weight: 600;
  text-decoration: none;
  transition: all .16s ease;
}

.printer-subtab:hover {
  color: #123a63;
  border-color: rgba(18, 58, 99, 0.22);
  background: #eef4fb;
}

.printer-subtab.is-active {
  background: #123a63;
  border-color: #123a63;
  color: #fff;
}

.printer-kpi-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(18, 58, 99, 0.08);
}

.printer-kpi-line span {
  color: #475569;
  font-size: 0.9rem;
}

.printer-kpi-line strong {
  color: #123a63;
  font-size: 1rem;
}

.printer-kpi-line--compact {
  padding: 0.65rem 0.75rem;
  min-height: 4.1rem;
}

.printer-kpi-line--compact span {
  font-size: 0.82rem;
}

.printer-kpi-line--compact strong {
  font-size: 0.94rem;
}

.printer-color-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.printer-timeline {
  display: grid;
  gap: 0.9rem;
}

.printer-timeline-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.printer-timeline-label {
  font-weight: 700;
  color: #123a63;
  font-size: 0.92rem;
}

.printer-timeline-track {
  position: relative;
  min-height: 2.8rem;
  border-radius: 1rem;
  background:
    linear-gradient(90deg, rgba(18, 58, 99, 0.05) 0, rgba(18, 58, 99, 0.05) 1px, transparent 1px, transparent calc(100% / 24)),
    #f8fafc;
  border: 1px solid rgba(18, 58, 99, 0.08);
  overflow: hidden;
}

.printer-timeline-segment {
  position: absolute;
  top: 0.38rem;
  bottom: 0.38rem;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  padding: 0 0.55rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.76rem;
  font-weight: 700;
}

.printer-timeline-segment span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.impresoras-calendar td {
  min-width: 120px;
  vertical-align: top;
}

.impresoras-calendar td.is-muted {
  background: rgba(248, 250, 252, 0.7);
  color: #94a3b8;
}

.printer-calendar-day {
  font-weight: 700;
  color: #123a63;
  margin-bottom: 0.25rem;
}

.printer-calendar-meta {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.35;
}

.printer-state-finalizada,
.printer-state-finalizada.pill {
  background: rgba(109, 40, 217, 0.13);
  color: #6d28d9;
}

.printer-state-cancelada-por-usuario {
  background: rgba(245, 130, 32, 0.16);
  color: #9a3412;
}

.printer-state-error {
  background: rgba(220, 53, 69, 0.12);
  color: #b42318;
}

.printer-state-pausada,
.printer-state-interrumpida {
  background: rgba(245, 130, 32, 0.16);
  color: #9a3412;
}

.printer-state-imprimiendo {
  background: rgba(18, 58, 99, 0.12);
  color: #123a63;
}

.printer-state-libre {
  background: rgba(22, 131, 92, 0.14);
  color: #166534;
}

.printer-state-preparando {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.printer-state-desconectada {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.config-admin-detail #bridgeIntegrationTestStatus {
  min-height: 1.25rem;
}

@media (max-width: 991.98px) {
  .printer-states-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .printer-state-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .printer-cost-topline {
    grid-template-columns: 1fr;
  }

  .printer-job-cell {
    min-width: 11rem;
  }

  .printer-chart-box {
    height: 280px;
    max-height: 280px;
  }

  .printer-timeline-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .printer-states-grid {
    grid-template-columns: 1fr;
  }

  .printer-state-meta-grid {
    grid-template-columns: 1fr;
  }

  .printer-state-top-side {
    width: 100%;
    justify-content: space-between;
  }

  .printer-state-speed-row {
    justify-content: stretch;
  }

  .printer-speed-control {
    width: 100%;
    justify-content: space-between;
  }

  .printer-speed-control .form-select {
    min-width: 0;
    width: 100%;
    max-width: 11rem;
  }

  .impresoras-calendar td {
    min-width: 92px;
  }

  .printer-chart-box {
    height: 260px;
    max-height: 260px;
  }
}

/* Genesis 1.6.0 · Estados de Granja compactos en teléfono */
@media (max-width: 767.98px) {
  .printer-state-card { min-height: 0 !important; padding: .62rem .72rem !important; border-radius: .75rem !important; }
  .printer-state-card-top { margin-bottom: .32rem !important; gap: .4rem !important; }
  .printer-state-card-body { gap: .28rem !important; }
  .printer-state-card-bottom { margin-top: .38rem !important; padding-top: .35rem !important; }
  .printer-state-meta-grid { display: none !important; }
  .printer-state-progress-wrap { margin-top: .3rem !important; }
  .printer-state-progress { height: 5px !important; }
  .printer-state-progress-label { min-width: 2.5rem; font-size: .82rem !important; }
  .printer-state-job { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .86rem !important; }
  .printer-state-card .printer-material-chips, .printer-state-card .printer-color-row { display:none !important; }
  .printer-states-grid { gap: .45rem !important; }
}
/* Genesis Tecno Manager 2.0 */
.production-thumb-wrap{aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--bs-tertiary-bg)}.production-thumb{width:100%;height:100%;object-fit:contain}.production-thumb-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;color:var(--bs-secondary-color)}.production-thumb-placeholder i{font-size:2rem}.production-3mf-card{min-width:0}.production-v2 .order-good,.production-v2 .order-bad{width:78px}.stat-color-dot{width:18px;height:18px;border-radius:50%;display:inline-block;border:1px solid rgba(0,0,0,.22);vertical-align:middle;margin-right:.4rem}.printer-mini-preview{width:72px;height:54px;object-fit:contain;border-radius:8px;background:var(--bs-tertiary-bg)}

/* Genesis Tecno Manager 2.0 · tarjetas compactas de Granja */
.printer-state-card-main{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;align-items:center}
.printer-state-preview{width:72px;height:72px;border-radius:10px;overflow:hidden;background:#f1f3f5;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(0,0,0,.08)}
.printer-state-preview img{width:100%;height:100%;object-fit:cover;display:block}
.printer-preview-placeholder{display:none;color:#98a2ad;font-size:1.4rem}
.printer-state-preview.is-unavailable .printer-preview-placeholder{display:block}
.printer-state-telemetry{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin-top:.35rem;font-size:.82rem;color:var(--bs-secondary-color)}
.printer-telemetry-item{display:inline-flex;align-items:center;gap:.2rem;white-space:nowrap}
.printer-state-actions{display:flex;gap:.3rem;flex-wrap:wrap;justify-content:flex-end}
.printer-state-action{width:32px;height:32px;padding:0;display:inline-grid;place-items:center}
@media (max-width:575.98px){.printer-state-preview{width:58px;height:58px}.printer-state-card-main{gap:.55rem}.printer-state-telemetry{gap:.5rem}}

/* Genesis Tecno Manager 2.0.1 · Granja: detalle/error/telemetría */
.printer-state-error-box{margin-top:.45rem;padding:.55rem .65rem;border:1px solid rgba(220,53,69,.22);background:rgba(220,53,69,.06);border-radius:.65rem;color:#8f1d2c;font-size:.82rem;display:grid;gap:.25rem}
.printer-state-error-box code{font-size:.78rem;color:#8f1d2c;background:rgba(255,255,255,.72);padding:.08rem .35rem;border-radius:.3rem}
.printer-detail-live{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.9rem;align-items:center}
.printer-detail-live .printer-state-preview{width:112px;height:112px}
.printer-detail-live-body{min-width:0}
@media (max-width:575.98px){.printer-detail-live{grid-template-columns:1fr}.printer-detail-live .printer-state-preview{width:100%;height:auto;aspect-ratio:16/9}.printer-modal-grid{grid-template-columns:1fr 1fr;gap:.55rem}.printer-modal-stat{padding:.65rem .7rem}}

/* Producción 2.1.2 · buscador de productos para planificación */
.planning-product-results {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .75rem;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08);
}
.planning-product-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--bs-border-color, #e9ecef);
  background: transparent;
  padding: .75rem .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}
.planning-product-result:last-child { border-bottom: 0; }
.planning-product-result:hover,
.planning-product-result:focus-visible { background: rgba(13, 110, 253, .07); outline: none; }
.planning-product-result span:first-child { min-width: 0; }
.planning-product-result strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-product-result small { display: block; color: var(--bs-secondary-color, #6c757d); }
.planning-product-stock { min-width: 64px; text-align: right; }
.planning-product-stock strong { font-size: 1.05rem; }
.planning-selected-product {
  border: 1px solid rgba(13,110,253,.25);
  border-radius: .75rem;
  padding: .75rem .9rem;
  background: rgba(13,110,253,.05);
}
.planning-need-summary {
  min-height: 48px;
  border-radius: .65rem;
  padding: .65rem .75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
}
.planning-qty-input::-webkit-outer-spin-button,
.planning-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.planning-qty-input { appearance: textfield; -moz-appearance: textfield; }
@media (max-width: 575.98px) {
  .planning-product-result { align-items: flex-start; }
  .planning-product-stock { min-width: 52px; }
}

/* Genesis Tecno Manager 2.2.0 · planificación operativa compacta */
.production-planning .planning-focus-card{padding:1rem 1.05rem}
.planning-focus-header{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:.8rem 1rem;align-items:center}
.planning-focus-title{display:flex;align-items:center;gap:.75rem;min-width:0}
.planning-focus-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:440px}
.planning-focus-stats{display:flex;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}
.planning-focus-stats span{display:flex;align-items:baseline;gap:.35rem;border:1px solid var(--bs-border-color,#dee2e6);background:var(--bs-tertiary-bg,#f8f9fa);border-radius:.55rem;padding:.38rem .55rem;white-space:nowrap}
.planning-focus-stats small{color:var(--bs-secondary-color,#6c757d);font-size:.72rem}.planning-focus-stats strong{font-size:.95rem}
.planning-focus-actions{display:flex;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}
.planning-focus-note{font-size:.84rem;color:var(--bs-secondary-color,#6c757d);padding:.4rem .2rem .1rem}
.planning-add-panel{display:grid;grid-template-columns:minmax(300px,1.8fr) minmax(280px,1.35fr) minmax(120px,.55fr) minmax(180px,.7fr);gap:.55rem;align-items:end;border:1px solid var(--bs-border-color,#dee2e6);border-radius:.8rem;padding:.7rem;margin-top:.7rem;position:relative}
.planning-add-panel .form-label{font-size:.78rem;color:var(--bs-secondary-color,#6c757d)}
.planning-product-results-multi{grid-column:1/-1;max-height:250px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-radius:.55rem}
.planning-product-result-check{cursor:pointer;padding:.55rem .7rem}
.planning-product-check-wrap{display:flex;align-items:center;gap:.55rem;min-width:0}.planning-product-check{flex:0 0 auto}
.planning-product-result-check:nth-child(odd){border-right:1px solid var(--bs-border-color,#e9ecef)}
.planning-product-result-check:hover{background:rgba(13,110,253,.06)}
.planning-table-wrap{margin-top:.75rem;border:1px solid var(--bs-border-color,#dee2e6);border-radius:.75rem;overflow:auto}
.planning-table-compact{font-size:.86rem}.planning-table-compact thead th{background:var(--bs-tertiary-bg,#f8f9fa);font-size:.76rem;white-space:nowrap;padding:.55rem .5rem}.planning-table-compact td{padding:.5rem;vertical-align:middle}
.planning-table-compact .planning-target{width:82px;min-width:70px}.planning-table-compact .planning-observation{min-width:135px;width:155px}.planning-table-compact .planning-row-need{min-width:135px}.planning-table-compact td:first-child{min-width:170px}
.planning-footer-actions{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:.7rem}
.planning-agenda-card{display:block;border:1px solid var(--bs-border-color,#dee2e6);border-radius:.75rem;padding:.8rem;height:100%;transition:background .15s,border-color .15s}.planning-agenda-card:hover{background:rgba(13,110,253,.04);border-color:rgba(13,110,253,.3)}
@media (max-width:1199.98px){.planning-focus-header{grid-template-columns:1fr}.planning-focus-stats,.planning-focus-actions{justify-content:flex-start}.planning-add-panel{grid-template-columns:1fr 1fr}.planning-add-submit{grid-column:auto}.planning-product-results-multi{grid-template-columns:1fr}}
@media (max-width:767.98px){.planning-focus-title{align-items:flex-start;flex-wrap:wrap}.planning-focus-title h3{white-space:normal;max-width:none}.planning-add-panel{grid-template-columns:1fr}.planning-add-submit{grid-column:1}.planning-focus-stats span{flex:1 1 45%;justify-content:space-between}.planning-table-wrap{margin-left:-.25rem;margin-right:-.25rem}.planning-overview-strip{display:none}.planning-product-result-check:nth-child(odd){border-right:0}}
.planning-page-title-compact{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
/* Producción 2.2.2: edición fluida con guardado automático. */
.planning-autosave-status{display:inline-flex;align-items:center;gap:.35rem;font-size:.78rem;color:var(--bs-success,#198754);padding:.3rem .5rem;border:1px solid var(--bs-border-color,#dee2e6);border-radius:.5rem;white-space:nowrap}
.planning-autosave-status[data-state="saving"]{color:var(--bs-secondary-color,#6c757d)}
.planning-autosave-status[data-state="error"]{color:var(--bs-danger,#dc3545);border-color:var(--bs-danger,#dc3545)}
.planning-table tbody tr.planning-row-dirty td{background:rgba(255,193,7,.035)}
.planning-table tbody tr.planning-row-saving td{background:rgba(13,110,253,.035)}
.planning-table tbody tr.planning-row-saved td{transition:background .25s}
/* Costos 3D 2.5: etapas claras y reutilización de cards/formularios del sistema. */
.cost-flow-heading{display:flex;align-items:center;justify-content:center;gap:.75rem;flex-wrap:wrap;font-size:.76rem;font-weight:800;letter-spacing:.06em;color:var(--bs-secondary-color);margin:1rem 0}
.cost-breakdown-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.cost-breakdown-item,.cost-price-card{border:1px solid var(--bs-border-color);border-radius:var(--radius-lg,1rem);padding:1rem;background:var(--bs-body-bg)}
.cost-breakdown-item{display:flex;flex-direction:column;gap:.2rem}.cost-breakdown-item span{font-size:.82rem;color:var(--bs-secondary-color)}.cost-breakdown-item.is-total{border-color:rgba(var(--bs-primary-rgb),.35);background:rgba(var(--bs-primary-rgb),.05)}
.cost-price-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}.cost-price-card{display:flex;flex-direction:column;gap:.4rem;cursor:pointer}.cost-price-card:has(input[type=radio]:checked){border-color:var(--bs-primary);box-shadow:0 0 0 2px rgba(var(--bs-primary-rgb),.12)}.cost-price-card strong{font-size:1.15rem}.cost-price-card small,.cost-price-card em{font-size:.75rem;color:var(--bs-secondary-color);font-style:normal}
.product-costs-table input{min-width:6rem}.internal-cost-snapshot summary{cursor:pointer}
@media(max-width:991.98px){.cost-breakdown-grid,.cost-price-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:575.98px){.cost-breakdown-grid,.cost-price-grid{grid-template-columns:1fr}.cost-flow-heading i{display:none}.cost-flow-heading{justify-content:flex-start;gap:.4rem}.cost-flow-heading span:not(:last-of-type)::after{content:' →';color:var(--bs-primary)}}
@media(max-width:575.98px){.runtime-environment-banner{padding-left:.75rem!important;padding-right:.75rem!important;overflow-wrap:anywhere}.runtime-environment-banner .ms-2{display:block;margin-left:0!important}}
@media(max-width:575.98px){.impresoras-stats-grid{margin-left:0;margin-right:0}.impresoras-stats-grid>[class*="col-"]{padding-left:0;padding-right:0}}

/* 2.6.1 · Cliente más visible en Venta */
.pos-mode-client .pos-client-panel{border:2px solid #17324d!important;box-shadow:0 12px 30px rgba(18,42,70,.12)!important;background:linear-gradient(180deg,#fff,#f8fbff)!important}
.pos-mode-client .pos-client-heading{padding-bottom:.7rem;border-bottom:1px solid color-mix(in srgb,#17324d 24%,transparent)}
.pos-mode-client .pos-client-search{border:2px solid #17324d!important;box-shadow:0 0 0 .18rem rgba(23,50,77,.06)!important}
.pos-mode-client .pos-selected-client{border:1px solid #17324d!important;background:#f4f8fc!important}
.pos-fiscal-choice{border:1px solid var(--border);border-radius:.85rem;padding:.85rem 1rem;background:color-mix(in srgb,var(--primary) 5%,var(--surface))}
.pos-fiscal-choice .form-check-input{width:2.5rem;height:1.3rem}
[data-theme="dark"] .pos-mode-client .pos-client-panel{border-color:#a8c2dc!important;background:#151e29!important}
[data-theme="dark"] .pos-mode-client .pos-client-search{border-color:#8aa9c7!important}
[data-theme="dark"] .pos-mode-client .pos-selected-client{border-color:#6f8eab!important;background:#1b2430!important}

/* 2.6.3 · Actualizaciones: nombres largos nunca deben ocultar Estado/Acción. */
#updatesSection .updates-table { width: 100%; table-layout: fixed; }
#updatesSection .updates-table th:nth-child(1) { width: 31%; }
#updatesSection .updates-table th:nth-child(2) { width: 8%; }
#updatesSection .updates-table th:nth-child(3) { width: 37%; }
#updatesSection .updates-table th:nth-child(4) { width: 10%; }
#updatesSection .updates-table th:nth-child(5) { width: 14%; }
#updatesSection .updates-table td { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
#updatesSection .update-package-name { display: block; overflow-wrap: anywhere; word-break: break-word; }
#updatesSection .update-notes { white-space: normal; }
#updatesSection .update-action .btn { white-space: normal; width: 100%; min-width: 0; }
@media (max-width: 991.98px) {
  #updatesSection .updates-table-wrap { overflow: visible; }
  #updatesSection .updates-table, #updatesSection .updates-table tbody, #updatesSection .updates-table tr, #updatesSection .updates-table td { display: block; width: 100%; }
  #updatesSection .updates-table thead { display: none; }
  #updatesSection .updates-table tr { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; margin-bottom: .8rem; background: var(--surface); }
  #updatesSection .updates-table td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: minmax(92px, 28%) minmax(0, 1fr); gap: .75rem; align-items: start; }
  #updatesSection .updates-table td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
  #updatesSection .updates-table td[colspan] { display: block; }
  #updatesSection .updates-table td[colspan]::before { display: none; }
  #updatesSection .update-action .btn { width: auto; justify-self: start; }
}

.facturacion-row-eliminada{opacity:.68;background:color-mix(in srgb,var(--page) 70%,var(--surface))!important}.facturacion-row-eliminada td{text-decoration:none}.facturacion-row-eliminada strong{color:var(--muted)}

/* 2.7.3 · Navegación lateral compacta en escritorio. Recupera ancho útil sin achicar contenido. */
@media (min-width: 992px) {
  .sidebar { width: 76px; flex-basis: 76px; padding: 1.1rem .65rem; overflow-x: hidden; transition: width .18s ease, flex-basis .18s ease, box-shadow .18s ease; position: relative; z-index: 1025; }
  .sidebar.sidebar-expanded { width: 265px; flex-basis: 265px; box-shadow: 4px 0 18px rgba(12,35,58,.12); }
  .sidebar .brand { padding: 0; justify-content: center; gap: .75rem; min-height: 48px; }
  .sidebar.sidebar-expanded .brand { justify-content: flex-start; padding: 0 .5rem; }
  .sidebar .brand-logo { flex: 0 0 45px; }
  .sidebar .sidebar-brand-copy, .sidebar .sidebar-label, .sidebar .sidebar-version { display: none; }
  .sidebar.sidebar-expanded .sidebar-brand-copy, .sidebar.sidebar-expanded .sidebar-label { display: inline; }
  .sidebar.sidebar-expanded .sidebar-version { display: inline-block; }
  .sidebar .nav-link { min-height: 46px; display: flex; align-items: center; justify-content: center; padding: .72rem; white-space: nowrap; }
  .sidebar.sidebar-expanded .nav-link { justify-content: flex-start; padding: .8rem 1rem; }
  .sidebar .nav-link i { margin-right: 0; min-width: 22px; text-align: center; font-size: 1.08rem; }
  .sidebar.sidebar-expanded .nav-link i { margin-right: .7rem; }
  .sidebar .nav-link #gastosAlertBadge { position: absolute; transform: translate(13px,-13px); margin: 0!important; }
  .sidebar.sidebar-expanded .nav-link #gastosAlertBadge { position: static; transform: none; margin-left: .25rem!important; }
  .sidebar-footer { padding: .75rem 0 0; justify-content: center!important; }
  .sidebar.sidebar-expanded .sidebar-footer { padding: 1rem .5rem 0; justify-content: space-between!important; }
  .sidebar-footer-copy { display: none; }
  .sidebar.sidebar-expanded .sidebar-footer-copy { display: inline; }
  .sidebar-pin { width: 36px; height: 34px; align-items: center; justify-content: center; padding: 0; }
  .sidebar.sidebar-expanded .sidebar-pin { width: auto; min-width: 36px; }
  .sidebar-user-copy { display: flex; justify-content: center; align-items: center; }
  .sidebar.sidebar-expanded .sidebar-user-copy { justify-content: flex-start; }
  .sidebar-user-copy > i { font-size: 1.15rem; }
  .sidebar .sidebar-logout { display: flex; align-items: center; justify-content: center; padding-left: .45rem; padding-right: .45rem; }
  .sidebar.sidebar-expanded .sidebar-logout { justify-content: flex-start; }
}
/* 2.7.5 · Usuarios y roles */
.role-card{border:1px solid var(--border);border-radius:16px;background:var(--surface);padding:1rem 1.1rem;height:100%}.role-card .btn-group form{display:inline-flex}.permission-module-card{border:1px solid var(--border);border-radius:14px;padding:.9rem;background:color-mix(in srgb,var(--surface) 96%,var(--page))}.permission-module-header{display:flex;justify-content:space-between;gap:1rem;margin-bottom:.65rem}.permission-counter{font-size:.78rem;color:var(--muted)}.permission-actions{display:flex;gap:.4rem;margin-bottom:.7rem}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .8rem}.permission-grid .form-check{font-size:.88rem;margin:0}@media(max-width:575.98px){.permission-grid{grid-template-columns:1fr}}
/* 2.7.5 · Clientes duplicados */
.duplicate-client-card{border:1px solid var(--border);border-radius:14px;padding:1rem;background:var(--surface)}
/* 2.7.5 · Tendencias por rubro: evita paneles apretados en dos columnas. */
.trend-rubro-tabs{display:flex;flex-wrap:wrap;gap:.55rem}.trend-rubro-tabs a{display:inline-flex;align-items:center;gap:.45rem;padding:.62rem .9rem;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);text-decoration:none;font-weight:650}.trend-rubro-tabs a:hover{border-color:var(--primary);color:var(--primary)}.trend-rubro-tabs a.active{background:var(--primary);border-color:var(--primary);color:#fff}.trends-page .module-panel .sales-table{min-width:0}.trends-page .trend-mini-card .table-responsive{overflow-x:auto}@media(min-width:1200px){.trends-page .module-panel-body>.row>.col-lg-7{width:58.333333%}.trends-page .module-panel-body>.row>.col-lg-5{width:41.666667%}}

/* 2.7.7 DEV · Nuevo presupuesto más claro y consistente con Vender */
.budget-3d-button{background:#ffc107!important;border-color:#111!important;color:#111!important;font-weight:800;box-shadow:0 .25rem .7rem rgba(0,0,0,.08)}
.budget-3d-button:hover,.budget-3d-button:focus{background:#111!important;border-color:#ffc107!important;color:#ffc107!important}
#budgetProductoResultados.app-floating-panel,#budgetClienteResultados.app-floating-panel{z-index:1090!important;background:var(--surface)!important;border:1px solid var(--border)!important;border-radius:.75rem!important;box-shadow:0 24px 42px rgba(14,32,54,.2)!important;padding:.25rem!important}
#budgetProductoResultados .list-group-item,#budgetClienteResultados .list-group-item{background:var(--surface);color:var(--text);position:relative;z-index:1}
.pos-budget-shell .pos-product-search .pos-search-tool{position:relative;z-index:2}
.pos-budget-shell .pos-client-panel{border:2px solid #17324d!important;box-shadow:0 12px 30px rgba(18,42,70,.12)!important;background:linear-gradient(180deg,#fff,#f8fbff)!important}
[data-theme="dark"] .pos-budget-shell .pos-client-panel{border-color:#a8c2dc!important;background:#151e29!important}

/* 2.8 · condiciones del presupuesto e impresión real */
.budget-conditions-card{border:1px solid var(--border);border-radius:18px;background:color-mix(in srgb,var(--surface) 96%,var(--page));padding:1rem;box-shadow:var(--shadow-sm)}
.budget-conditions-card .section-kicker{margin-bottom:.35rem}
.config-preview-safe-area.is-monochrome{filter:grayscale(1)}
.config-preview-safe-area.is-monochrome .config-preview-block.is-selected{background:#f1f1f1;border-color:#333}
/* 2.8.3 · inteligencia comercial */
.smart-insight-card{display:flex;gap:.85rem;padding:1rem;border:1px solid var(--bs-border-color);border-radius:14px;background:var(--bs-body-bg)}
.smart-insight-icon{width:42px;height:42px;border-radius:12px;background:var(--bs-tertiary-bg);display:grid;place-items:center;font-size:1.2rem;flex:0 0 auto}.mini-stat{border:1px solid var(--bs-border-color);border-radius:12px;padding:.75rem;text-align:center;height:100%}.mini-stat strong{display:block;font-size:1.25rem}.mini-stat span{font-size:.75rem;color:var(--bs-secondary-color)}.dashboard-heatmap .heat-cell{display:inline-grid;place-items:center;min-width:28px;height:28px;border-radius:6px;font-size:.75rem}.dashboard-heatmap td{padding:.25rem}
.system-resource-meter{height:8px}.task-status-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.task-status-dot.ok{background:#198754}.task-status-dot.error{background:#dc3545}.task-status-dot.running{background:#ffc107}

/* 3.0.4 · Logos de cajas y billeteras. */
.cash-icon{width:48px;height:48px;padding:0;overflow:hidden;background:var(--surface)}
.cash-icon img{display:block;width:48px;height:48px;object-fit:contain}

/* 3.0.7 DEV · lectura visual de jornadas y dashboard */
.jornada-row-card{position:relative;padding:1rem 1.1rem;overflow:hidden}.jornada-row-main{display:grid;grid-template-columns:minmax(145px,1.1fr) minmax(130px,.8fr) minmax(280px,1.6fr) minmax(130px,.8fr) auto;gap:1rem;align-items:center}.jornada-date,.jornada-total{display:flex;flex-direction:column}.jornada-date>span,.jornada-total>small{color:var(--muted);font-size:.78rem}.jornada-date>strong,.jornada-total>strong{font-size:1.05rem}.jornada-date .badge{width:max-content;margin-top:.3rem}.jornada-numbers{display:flex;gap:1.1rem}.jornada-numbers div{display:flex;flex-direction:column}.jornada-numbers small{color:var(--muted)}.jornada-numbers strong{font-size:1.25rem}.jornada-payments{display:flex;flex-wrap:wrap;gap:.45rem}.jornada-payments span{background:var(--page);border:1px solid var(--border);border-radius:999px;padding:.38rem .62rem;font-size:.83rem}.jornada-payment-bar{display:flex;height:5px;border-radius:999px;overflow:hidden;background:var(--border);margin-top:.85rem}.jornada-payment-bar i{display:block}.jornada-payment-bar .cash{background:#1f9d68}.jornada-payment-bar .bank{background:#2467a6}.jornada-payment-bar .mp{background:#08a9df}.jornada-best{border-color:#e1a900;box-shadow:0 8px 24px rgba(225,169,0,.12)}.jornada-trophy{position:absolute;right:1rem;top:.35rem;font-size:.7rem;color:#8a6800}.dashboard-week-card.is-current{border:2px solid var(--primary)}.dashboard-week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.4rem;min-height:130px;align-items:end}.dashboard-week-day{position:relative;display:flex;min-height:112px;flex-direction:column;justify-content:flex-end;align-items:center;text-align:center;border-radius:10px;padding:.4rem;overflow:hidden;background:var(--page)}.dashboard-week-day>*{position:relative;z-index:1}.dashboard-week-day>strong{font-size:.75rem}.dashboard-week-day>span,.dashboard-week-day>small{font-size:.68rem;color:var(--muted)}.dashboard-week-day>b{font-size:.72rem;margin-top:.35rem}.dashboard-week-day>i{position:absolute;bottom:0;left:0;right:0;background:color-mix(in srgb,var(--primary) 18%,transparent)}.dashboard-week-day.has-sales{color:var(--primary)}.shift-card{border-top:5px solid #f5a623}.shift-card.shift-2{border-top-color:#6948b8}.shift-card>strong{color:var(--primary)}
@media(max-width:991.98px){.jornada-row-main{grid-template-columns:1fr auto}.jornada-numbers,.jornada-payments{grid-column:1/-1}.jornada-total{grid-column:1}.jornada-row-main>a{grid-column:2;grid-row:3}.jornada-trophy{display:none}}
@media(max-width:575.98px){.jornada-kpis .metric-card{padding:.8rem}.jornada-kpis .metric-icon{display:none}.jornada-row-card{padding:.9rem}.jornada-payments{display:grid;grid-template-columns:1fr}.jornada-payments span{border-radius:9px}.dashboard-week-days{grid-template-columns:repeat(4,1fr);align-items:stretch}.dashboard-week-day{min-height:86px}.dashboard-week-card .text-end{text-align:left!important}.dashboard-week-card>.d-flex{flex-direction:column}}
.client-rubro-ranking{display:grid}.client-rubro-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto 16px;gap:.65rem;align-items:center;padding:.72rem 1rem;border-bottom:1px solid var(--border);color:var(--text);text-decoration:none}.client-rubro-row:last-child{border-bottom:0}.client-rubro-row:hover{background:var(--page)}.rank-number{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--page);color:var(--primary)}.client-rubro-row small,.client-rubro-row span{display:block;color:var(--muted);font-size:.75rem}.client-rubro-row span{display:flex;gap:.45rem;margin-top:.2rem}.client-ranking-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto 18px;align-items:center;gap:.8rem;padding:.85rem 1rem}.client-ranking-row small{display:block;color:var(--muted)}
@media(max-width:575.98px){.client-rubro-row,.client-ranking-row{grid-template-columns:32px minmax(0,1fr) 14px}.client-rubro-row>strong:nth-last-of-type(1),.client-ranking-row>.text-end{grid-column:2;text-align:left!important}.client-ranking-page .metric-card{padding:.7rem}.client-ranking-page .metric-card h3{font-size:1rem}}
.printer-donut-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:.75rem}.printer-donut-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:.85rem;border:1px solid var(--border);border-radius:14px;color:var(--text);text-decoration:none;background:var(--surface)}.printer-donut-card:hover{border-color:var(--donut-color,var(--primary));transform:translateY(-1px)}.printer-donut{--pct:0;--donut-color:var(--primary);width:86px;height:86px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--donut-color) calc(var(--pct)*1%),var(--page) 0);position:relative;margin-bottom:.5rem}.printer-donut:after{content:"";position:absolute;inset:10px;border-radius:50%;background:var(--surface)}.printer-donut span{position:relative;z-index:1;display:flex;flex-direction:column}.printer-donut strong{font-size:1.1rem}.printer-donut small{font-size:.62rem;color:var(--muted)}.printer-donut-card>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:.2rem .45rem;margin-top:.45rem;font-size:.7rem;color:var(--muted)}.printer-profile-grid .content-card:hover{border-color:var(--primary)}
/* Simulador móvil exclusivo de DEV 3.0.7. */
.dev-mobile-preview-link {
    color: #b9e5ff !important;
}

.dev-mobile-preview-link i {
    color: #7dd3fc;
}

.mobile-preview-page {
    --preview-ink: #102f50;
    --preview-blue: #0f4778;
    --preview-orange: #ff7a1a;
    max-width: 1480px;
    margin: 0 auto;
    padding: 1.25rem;
}

.mobile-preview-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid #d7e3ef;
    border-radius: 22px;
    background: linear-gradient(120deg, #ffffff 0%, #f4f9ff 68%, #fff4e9 100%);
    box-shadow: 0 14px 34px rgba(15, 46, 77, .08);
}

.mobile-preview-intro h1 {
    margin: .25rem 0 .35rem;
    color: var(--preview-ink);
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 800;
}

.mobile-preview-intro p {
    max-width: 760px;
    margin: 0;
    color: #60748a;
}

.mobile-preview-kicker {
    color: var(--preview-orange);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.mobile-preview-dev-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .45rem;
    padding: .55rem .75rem;
    border: 1px solid #f4c879;
    border-radius: 999px;
    background: #fff8e8;
    color: #774b00;
    font-size: .78rem;
    font-weight: 800;
}

.mobile-preview-dev-badge span {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #22a06b;
    box-shadow: 0 0 0 4px rgba(34, 160, 107, .13);
}

.mobile-preview-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 315px) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.mobile-preview-controls,
.mobile-preview-stage {
    border: 1px solid #d7e3ef;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 46, 77, .08);
}

.mobile-preview-controls {
    position: sticky;
    top: 1rem;
    padding: 1.15rem;
}

.mobile-preview-control-block {
    margin-bottom: 1rem;
}

.mobile-preview-control-block label {
    display: block;
    margin-bottom: .4rem;
    color: #304a64;
    font-size: .84rem;
    font-weight: 700;
}

.mobile-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-bottom: .65rem;
}

.mobile-preview-help {
    margin-top: 1rem;
    padding: .9rem;
    border-radius: 15px;
    background: #f2f7fc;
    color: #526a82;
    font-size: .8rem;
}

.mobile-preview-help strong {
    color: var(--preview-ink);
}

.mobile-preview-help ul {
    margin: .6rem 0;
    padding-left: 1.2rem;
}

.mobile-preview-help p {
    margin: 0;
}

.mobile-preview-stage {
    min-height: 980px;
    padding: 1rem;
    overflow: auto;
    background:
        radial-gradient(circle at 15% 20%, rgba(22, 116, 178, .12), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(255, 122, 26, .11), transparent 30%),
        #edf3f8;
}

.mobile-preview-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 760px;
    margin: 0 auto .75rem;
    color: #526a82;
    font-size: .8rem;
}

.mobile-preview-status span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.mobile-preview-status .bi-circle-fill {
    color: #22a06b;
    font-size: .55rem;
}

.mobile-device-shell {
    position: relative;
    width: calc(var(--device-width) + 24px);
    height: calc(var(--device-height) + 52px);
    margin: 0 auto;
    padding: 25px 12px 27px;
    border: 2px solid #0b1b2b;
    border-radius: 34px;
    background: #12273a;
    box-shadow: 0 28px 70px rgba(7, 26, 43, .26), inset 0 0 0 2px rgba(255,255,255,.09);
    transition: width .25s ease, height .25s ease;
}

.mobile-device-shell iframe {
    display: block;
    width: var(--device-width);
    height: var(--device-height);
    border: 0;
    border-radius: 19px;
    background: #fff;
    transition: width .25s ease, height .25s ease;
}

.mobile-device-speaker {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 50%;
    width: 54px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #587084;
}

.mobile-device-home {
    position: absolute;
    bottom: 9px;
    left: 50%;
    width: 72px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #71879a;
}

@media (max-width: 991.98px) {
    .mobile-preview-workspace {
        grid-template-columns: 1fr;
    }

    .mobile-preview-controls {
        position: static;
    }

    .mobile-preview-stage {
        min-height: 900px;
    }
}

@media (max-width: 575.98px) {
    .mobile-preview-page {
        padding: .75rem;
    }

    .mobile-preview-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .mobile-preview-stage {
        padding: .65rem;
    }

    .mobile-device-shell {
        transform: scale(.78);
        transform-origin: top left;
        margin-left: calc((100% - (var(--device-width) + 24px) * .78) / 2);
        margin-bottom: calc((var(--device-height) + 52px) * -.22);
    }
}
/* 3.1.15 · identidad visual de sesión */
.current-user-chip{display:inline-flex;align-items:center;gap:.4rem;text-decoration:none;color:var(--bs-body-color);padding:.18rem .4rem;border:1px solid var(--bs-border-color);border-radius:999px;background:var(--bs-body-bg)}
.current-user-avatar{--user-color:#123a63;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--user-color);color:#fff;font-size:1rem;line-height:1;border:2px solid color-mix(in srgb,var(--user-color) 55%,white)}
.current-user-avatar img{width:100%;height:100%;object-fit:cover}.current-user-name{font-size:.78rem;font-weight:700;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--user-color,#123a63);font-size:1.1rem;flex:0 0 36px}.sidebar-user-avatar img{width:100%;height:100%;object-fit:cover}

/* 3.1.16 identidad de sesión */
.current-user-chip{display:inline-flex;align-items:center;gap:.45rem;padding:.22rem .55rem;border-radius:999px;background:color-mix(in srgb,var(--bs-body-bg) 88%,var(--user-color,#123a63) 12%);color:var(--bs-body-color);text-decoration:none!important;box-shadow:none}.current-user-chip:hover,.current-user-chip:focus{background:color-mix(in srgb,var(--bs-body-bg) 78%,var(--user-color,#123a63) 22%);color:var(--bs-body-color);text-decoration:none!important}.current-user-name{color:var(--bs-body-color)!important;text-decoration:none!important;max-width:130px}
