/* SalesPro ERP 3.2.6.42 — estabilización de vistas administrativas */
:root{
  --sp42-bg:#f5f7fb;--sp42-card:#fff;--sp42-text:#172033;--sp42-muted:#6b7890;
  --sp42-border:#dde4ef;--sp42-primary:#5420a4;--sp42-primary-dark:#26124f;
  --sp42-shadow:0 14px 38px rgba(20,31,56,.07);--sp42-radius:18px;
}
body.spds-admin{background:var(--sp42-bg)!important;color:var(--sp42-text)!important}
body.spds-admin .content-area{padding-top:24px!important;padding-bottom:44px!important}
body.spds-admin .content-area>.container,body.spds-admin .content-area>.dashboard-shell,body.spds-admin .content-area>.hb-admin{width:min(1540px,calc(100% - 40px))!important;max-width:none!important;margin-inline:auto!important}
body.spds-admin .global-header{background:#fff!important;border:1px solid #d8e0eb!important;box-shadow:0 12px 30px rgba(15,23,42,.06)!important}
body.spds-admin .header-menu-btn{display:inline-flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;background:#172033!important;border:1px solid #172033!important;color:#fff!important;box-shadow:0 6px 16px rgba(15,23,42,.16)!important}
body.spds-admin .header-menu-btn span{display:block!important;width:18px!important;height:2px!important;border-radius:999px!important;background:#fff!important;opacity:1!important}
body.spds-admin .sp-sidebar{z-index:1800!important}
body.spds-admin .sp-sidebar .nav{position:relative!important;z-index:2!important}
body.spds-admin .sp-sidebar .nav>a{position:relative!important;z-index:3!important;pointer-events:auto!important}
body.spds-admin .sp-sidebar .nav>a+ a{margin-top:2px!important}
body.spds-admin .sp-sidebar .nav-title{pointer-events:none!important}

/* Componentes compartidos */
body.spds-admin .page-head,body.spds-admin .sp-page-head,body.spds-admin .sp-page-head-pro,body.spds-admin .spds-page-head{
  display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:20px!important;margin:0 0 22px!important;padding:0!important
}
body.spds-admin .page-head h1,body.spds-admin .sp-page-head h1,body.spds-admin .sp-page-head-pro h1,body.spds-admin .spds-page-head h1{margin:5px 0 6px!important;font-size:clamp(25px,2vw,34px)!important;line-height:1.05!important;color:var(--sp42-text)!important}
body.spds-admin .page-head p,body.spds-admin .sp-page-head p,body.spds-admin .sp-page-head-pro p,body.spds-admin .spds-page-head p{margin:0!important;color:var(--sp42-muted)!important}
body.spds-admin .eyebrow,body.spds-admin .sp-eyebrow{font-size:11px!important;font-weight:900!important;letter-spacing:.1em!important;text-transform:uppercase!important;color:var(--sp42-primary)!important}
body.spds-admin .card,body.spds-admin .sp-card,body.spds-admin .table-card,body.spds-admin .panel,body.spds-admin .sp-module-panel{
  border:1px solid var(--sp42-border)!important;border-radius:var(--sp42-radius)!important;background:var(--sp42-card)!important;box-shadow:var(--sp42-shadow)!important
}
body.spds-admin .btn,body.spds-admin .sp-btn,body.spds-admin button.btn{min-height:42px!important;padding:0 16px!important;border-radius:12px!important;font-weight:850!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;text-decoration:none!important}
body.spds-admin .btn:not(.light):not(.secondary),body.spds-admin .sp-btn-primary{background:linear-gradient(135deg,var(--sp42-primary-dark),var(--sp42-primary))!important;color:#fff!important;border:1px solid transparent!important;box-shadow:0 8px 18px rgba(84,32,164,.2)!important}
body.spds-admin .btn.light,body.spds-admin .btn.secondary,body.spds-admin .sp-btn-secondary{background:#fff!important;color:#202a3c!important;border:1px solid var(--sp42-border)!important;box-shadow:none!important}
body.spds-admin input:not([type=checkbox]):not([type=radio]):not([type=color]),body.spds-admin select,body.spds-admin textarea{border:1px solid var(--sp42-border)!important;border-radius:12px!important;background:#fff!important;color:#172033!important;box-shadow:none!important}
body.spds-admin input:not([type=checkbox]):not([type=radio]):not([type=color]),body.spds-admin select{min-height:44px!important;padding-inline:12px!important}
body.spds-admin textarea{padding:12px!important}
body.spds-admin input:focus,body.spds-admin select:focus,body.spds-admin textarea:focus{border-color:#8157c5!important;box-shadow:0 0 0 3px rgba(84,32,164,.11)!important;outline:none!important}
body.spds-admin table{border-collapse:separate!important;border-spacing:0!important;width:100%!important}
body.spds-admin thead th{background:#f7f9fc!important;color:#59667d!important;font-size:11px!important;text-transform:uppercase!important;letter-spacing:.04em!important;border-bottom:1px solid var(--sp42-border)!important}
body.spds-admin tbody td{border-bottom:1px solid #edf1f6!important;color:#344057!important}
body.spds-admin tbody tr:hover td{background:#fbfcfe!important}

/* Productos: espacio operativo y editor por bloques */
body.route-products .products-head-v4{gap:22px!important;margin-bottom:20px!important}
body.route-products .head-actions-v4{gap:12px!important}
body.route-products .products-toolbar-v4{gap:12px!important;padding:14px!important;border:1px solid var(--sp42-border)!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--sp42-shadow)!important}
body.route-products .bulk-panel-v4{gap:16px!important;padding:15px 16px!important;margin:14px 0 16px!important}
body.route-products .bulk-actions-v4,body.route-products .bulk-create-actions-v3101{gap:10px!important}
body.route-products .products-sheet-card-v4{padding:16px!important;border:1px solid var(--sp42-border)!important;border-radius:20px!important;overflow:auto!important}
body.route-products .products-grid-head-v4,body.route-products .product-row-v4{grid-template-columns:78px 90px 132px minmax(360px,1.45fr) minmax(330px,1.25fr) minmax(220px,1fr) 160px 116px!important;gap:16px!important;min-width:1510px!important}
body.route-products .product-row-v4{padding:18px 16px!important;background:#fff!important}
body.route-products .codes-v4,body.route-products .details-v4,body.route-products .varios-v4,body.route-products .prices-v4,body.route-products .status-v4,body.route-products .actions-v4{padding:12px!important;border:1px solid #e5eaf2!important;border-radius:14px!important;background:#fafbfd!important;gap:10px!important}
body.route-products .inline-input-v4,body.route-products .inline-select-v4{min-height:38px!important;background:#fff!important;border:1px solid #dfe5ee!important}

/* Home Builder */
body.route-home_builder .hb-admin{display:grid!important;gap:18px!important}
body.route-home_builder .hb-admin-head{padding:22px 24px!important;border:1px solid var(--sp42-border)!important;border-radius:20px!important;background:#fff!important;box-shadow:var(--sp42-shadow)!important}
body.route-home_builder .hb-head-actions{display:flex!important;gap:10px!important;flex-wrap:wrap!important}
body.route-home_builder .hb-add-card{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:20px!important;padding:18px 20px!important}
body.route-home_builder .hb-add-form{display:grid!important;grid-template-columns:minmax(220px,300px) auto!important;gap:10px!important}
body.route-home_builder .hb-list{display:grid!important;gap:16px!important}
body.route-home_builder .hb-block{position:relative!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) 38px!important;gap:14px!important;padding:20px!important;overflow:visible!important}
body.route-home_builder .hb-block-main{min-width:0!important}
body.route-home_builder .hb-block-top{display:flex!important;justify-content:space-between!important;gap:18px!important;padding-bottom:14px!important;margin-bottom:16px!important;border-bottom:1px solid #e8edf4!important}
body.route-home_builder .hb-type{display:block!important;font-size:15px!important;font-weight:950!important;color:#1c2638!important;text-transform:uppercase!important;letter-spacing:.04em!important}
body.route-home_builder .hb-block-top small{display:block!important;margin-top:5px!important;color:var(--sp42-muted)!important}
body.route-home_builder .hb-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 16px!important}
body.route-home_builder .hb-field{display:grid!important;gap:7px!important;min-width:0!important}
body.route-home_builder .hb-field>span{font-size:12px!important;font-weight:850!important;color:#455169!important}
body.route-home_builder .hb-wide{grid-column:1/-1!important}
body.route-home_builder .hb-drag{display:grid!important;place-items:center!important;width:32px!important;height:42px!important;border-radius:10px!important;background:#f0edf8!important;color:#5420a4!important;font-size:20px!important;cursor:grab!important}
body.route-home_builder .hb-delete{align-self:start!important;width:36px!important;height:36px!important;border:1px solid #f0d4d8!important;border-radius:10px!important;background:#fff5f6!important;color:#b42318!important;font-size:20px!important}
body.route-home_builder .hb-manual-products{padding:15px!important;border:1px solid #dfe5ee!important;border-radius:16px!important;background:#f9fafc!important}
body.route-home_builder .hb-product-selector{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))!important;gap:9px!important;max-height:310px!important;overflow:auto!important;padding:10px!important;border:1px solid #e1e7ef!important;border-radius:12px!important;background:#fff!important}
body.route-home_builder .hb-product-option{display:flex!important;align-items:flex-start!important;gap:10px!important;min-height:58px!important;padding:10px!important;border:1px solid #edf1f6!important;border-radius:11px!important;background:#fff!important}
body.route-home_builder .hb-product-option:hover{border-color:#cdb9ec!important;background:#faf8ff!important}
body.route-home_builder .hb-product-option input{margin-top:3px!important}
body.route-home_builder .hb-product-option span{font-weight:750!important;color:#283348!important}
body.route-home_builder .hb-product-option small{display:block!important;margin-top:4px!important;color:#7b879a!important}

/* Pedidos web */
body.route-web_orders .wo-kpis-v30362{gap:14px!important;margin-bottom:18px!important}
body.route-web_orders .wo-kpis-v30362 a{min-height:102px!important;padding:16px 17px!important;border-radius:17px!important;box-shadow:0 8px 22px rgba(15,23,42,.04)!important}
body.route-web_orders .wo-filter-v30362{grid-template-columns:minmax(280px,1fr) 250px auto!important;gap:12px!important;padding:16px!important;margin-bottom:16px!important}
body.route-web_orders .wo-table-wrap-v30362{margin-top:0!important;padding:0!important;overflow:auto!important}
body.route-web_orders .wo-table-v30362{min-width:1120px!important}
body.route-web_orders .wo-table-v30362 th{padding:15px 14px!important}
body.route-web_orders .wo-table-v30362 td{padding:15px 14px!important;vertical-align:middle!important}

/* Formularios y módulos laterales solicitados */
body.route-category_form .sp-form-shell,body.route-company .sp-form-shell,body.route-company_form .sp-form-shell{display:grid!important;grid-template-columns:minmax(220px,300px) minmax(0,1fr)!important;gap:22px!important;align-items:start!important}
body.route-category_form .sp-form-aside{position:sticky!important;top:100px!important}
body.route-category_form .sp-preview-card,body.route-category_form .sp-form-card{padding:20px!important}
body.route-category_form .sp-form-grid{gap:16px!important}
body.route-category_form .web-taxonomy-block-v292{padding:18px!important;background:#fbf9ff!important}
body.route-price_types .sp-summary-grid,body.route-offers .sp-summary-grid,body.route-sales .sp-summary-grid,body.route-inventory_stocks .sp-summary-grid,body.route-clients .sp-summary-grid,body.route-quotes .sp-summary-grid,body.route-catalogs .sp-summary-grid,body.route-users .sp-summary-grid{gap:14px!important;margin-bottom:18px!important}
body.route-price_types .sp-filter-bar-pro,body.route-offers .sp-filter-bar-pro,body.route-sales .sp-filter-bar-pro,body.route-inventory_stocks .sp-filter-bar-pro,body.route-clients .sp-filter-bar-pro,body.route-quotes .sp-filter-bar-pro,body.route-catalogs .sp-filter-bar-pro,body.route-users .sp-filter-bar-pro{padding:14px!important;border:1px solid var(--sp42-border)!important;border-radius:17px!important;background:#fff!important;box-shadow:var(--sp42-shadow)!important}
body:is(.route-price_types,.route-offers,.route-sales,.route-inventory_stocks,.route-inventory_adjust,.route-transfers,.route-inventory_diagnostics,.route-inventory_kardex,.route-clients,.route-quotes,.route-catalogs,.route-users,.route-company,.route-branches) .table-card,
body:is(.route-price_types,.route-offers,.route-sales,.route-inventory_stocks,.route-inventory_adjust,.route-transfers,.route-inventory_diagnostics,.route-inventory_kardex,.route-clients,.route-quotes,.route-catalogs,.route-users,.route-company,.route-branches) .sp-table-panel{overflow:auto!important;padding:0!important}
body:is(.route-price_types,.route-offers,.route-sales,.route-inventory_stocks,.route-inventory_adjust,.route-transfers,.route-inventory_diagnostics,.route-inventory_kardex,.route-clients,.route-quotes,.route-catalogs,.route-users,.route-company,.route-branches) .table-card>table{min-width:820px!important}
body:is(.route-inventory_adjust,.route-inventory_diagnostics,.route-inventory_kardex) form.card,body.route-company form.card{padding:20px!important}

/* POS */
body.route-sales_pos .pos-shell{grid-template-columns:minmax(250px,.75fr) minmax(560px,1.65fr) minmax(300px,.8fr)!important;gap:16px!important;align-items:start!important}
body.route-sales_pos .pos-left,body.route-sales_pos .pos-center,body.route-sales_pos .pos-right{min-width:0!important}
body.route-sales_pos .pos-panel,body.route-sales_pos .pos-search-card,body.route-sales_pos .pos-cart,body.route-sales_pos .checkout-card{border:1px solid var(--sp42-border)!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--sp42-shadow)!important}
body.route-sales_pos .pos-cart{min-height:560px!important}
body.route-sales_pos .cart-items{min-height:475px!important;max-height:calc(100vh - 250px)!important;overflow:auto!important;padding:12px!important;color:#344057!important}
body.route-sales_pos .pos-hero h1,body.route-sales_pos .pos-cart-head h2,body.route-sales_pos .checkout-card h2{color:#172033!important}
body.route-sales_pos .pos-hero p,body.route-sales_pos label,body.route-sales_pos small{color:#637087!important}
body.route-sales_pos .simple-qr-card{background:#fff!important;border:1px solid rgba(255,255,255,.78)!important;border-radius:30px!important;box-shadow:0 28px 90px rgba(15,23,42,.35)!important;overflow:hidden!important}
body.route-sales_pos .simple-qr-image-box{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:24px!important}
body.route-sales_pos .simple-qr-info{background:#fff!important;color:#172033!important;border-radius:22px!important;padding:24px!important}

/* Sales */
body.route-sales .sp-page-actions,body.route-sales .page-head>div:last-child{display:flex!important;gap:10px!important;flex-wrap:wrap!important}
body.route-sales .sp-table-panel .btn,body.route-sales .table-card .btn{min-height:36px!important;padding-inline:12px!important}

@media(max-width:1100px){
 body.route-sales_pos .pos-shell{grid-template-columns:1fr!important}
 body.route-sales_pos .pos-cart{min-height:420px!important}
 body.route-home_builder .hb-grid{grid-template-columns:1fr!important}
 body.route-home_builder .hb-wide{grid-column:auto!important}
}
@media(max-width:760px){
 body.spds-admin .content-area>.container,body.spds-admin .content-area>.dashboard-shell,body.spds-admin .content-area>.hb-admin{width:min(100% - 22px,1540px)!important}
 body.spds-admin .page-head,body.spds-admin .sp-page-head,body.spds-admin .sp-page-head-pro,body.spds-admin .spds-page-head{display:grid!important;align-items:start!important}
 body.route-home_builder .hb-add-card{grid-template-columns:1fr!important}
 body.route-home_builder .hb-add-form{grid-template-columns:1fr!important}
 body.route-home_builder .hb-block{grid-template-columns:28px minmax(0,1fr)!important;padding:15px!important}
 body.route-home_builder .hb-delete{position:absolute!important;right:14px!important;top:14px!important}
 body.route-home_builder .hb-block-top{padding-right:42px!important;display:grid!important}
 body.route-category_form .sp-form-shell,body.route-company .sp-form-shell,body.route-company_form .sp-form-shell{grid-template-columns:1fr!important}
 body.route-category_form .sp-form-aside{position:static!important}
 body.route-web_orders .wo-filter-v30362{grid-template-columns:1fr!important}
}
