:root{--navy:#0b1f35;--navy2:#143450;--ink:#142438;--muted:#718096;--line:#e7edf2;--paper:#f5f8fa;--white:#fff;--accent:#19a88e;--accent-soft:#e5f6f1;--accent-softer:#eff9f6;--accent-strong:#118c7e;--accent-bright:#23c6a5;--accent-ink:#087a68;--accent-deep:#07372f;--accent-light:#6fe0bd;--accent-muted:#80b5b1;--accent-muted-ink:#45675e;--accent-border:#8bd4bf;--accent-line:#cde8df;--accent-rgb:25,168,142;--navy-hover:#1c4b6b;--navy-accent:#14504d;--topbar-text:#b9c8d7;--topbar-muted:#9fb2c6;--font-body:'DM Sans',system-ui,sans-serif;--font-title:Manrope,sans-serif;--blue:#377de0;--blue-soft:#eaf2ff;--amber:#d28a1c;--amber-soft:#fff4df;--red:#d95d5d;--red-soft:#fff0ef;--shadow:0 8px 28px rgba(18,47,74,.06)}
*{box-sizing:border-box}html{min-height:100%;background:var(--paper)}body{margin:0;min-height:100vh;color:var(--ink);font:15px var(--font-body);background:var(--paper)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.topbar{min-height:78px;background:var(--navy);color:#fff;padding:0 clamp(16px,4vw,56px);display:flex;align-items:center;gap:clamp(18px,3vw,46px);position:sticky;top:0;z-index:10;box-shadow:0 4px 22px rgba(5,21,37,.14)}.brand{display:flex;align-items:center;gap:11px;flex:none;font:800 19px var(--font-title);letter-spacing:-.5px}.brand small{display:block;color:var(--topbar-muted);font:500 9px var(--font-body);letter-spacing:1.35px;text-transform:uppercase;margin-top:1px}.brand-mark{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(140deg,var(--accent-bright),var(--accent-strong));font:800 20px var(--font-title);color:#fff;box-shadow:0 5px 16px var(--accent-strong)}.main-nav{display:flex;align-items:center;gap:4px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:none}.main-nav::-webkit-scrollbar{display:none}.nav-link{display:flex;align-items:center;gap:7px;padding:11px 12px;white-space:nowrap;border-radius:10px;color:var(--topbar-text);font-size:13px;font-weight:600;transition:.18s}.nav-link:hover,.nav-link.active{color:#fff;background:rgba(255,255,255,.11)}.nav-link.active{box-shadow:inset 0 -2px 0 var(--accent-light)}.nav-icon{font-size:16px;color:var(--accent-muted)}.top-profit{display:flex;align-items:center;gap:11px;flex:none;border-left:1px solid rgba(255,255,255,.14);padding-left:22px}.profit-dot{width:9px;height:9px;border-radius:50%;background:var(--accent-light);box-shadow:0 0 0 5px rgba(var(--accent-rgb),.13)}.profit-copy small{display:block;color:var(--topbar-muted);font-size:9px;font-weight:700;letter-spacing:1.1px}.profit-copy strong{display:block;margin-top:3px;font:700 17px var(--font-title);color:var(--accent-light)}.page-shell{width:min(1440px,100%);min-height:calc(100vh - 132px);margin:0 auto;padding:30px clamp(16px,4vw,56px) 54px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.35px;color:#8999a9;margin-bottom:7px}.page-heading h1{font:800 clamp(25px,3vw,34px) var(--font-title);letter-spacing:-1.2px;margin:0;color:var(--navy)}.today{color:var(--muted);font-size:13px;padding-bottom:4px}.flash{border-radius:12px;padding:13px 16px;margin-bottom:18px;font-weight:600;font-size:14px}.flash.success{background:#e3f7f2;color:#087a68}.flash.error{background:var(--red-soft);color:#a83d3d}.flash.info{background:var(--blue-soft);color:#2859a0}.grid{display:grid;gap:18px}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px}.stat-card,.card{background:var(--white);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}.stat-card{padding:20px 21px;position:relative;overflow:hidden}.stat-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:12px;font-weight:600}.stat-icon{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;font-size:16px;background:var(--blue-soft);color:var(--blue)}.stat-icon.green{background:#e3f7f2;color:#19a88e}.stat-icon.amber{background:var(--amber-soft);color:var(--amber)}.stat-icon.red{background:var(--red-soft);color:var(--red)}.stat-value{font:800 27px var(--font-title);letter-spacing:-1px;margin-top:17px;color:var(--navy)}.stat-note{font-size:11px;color:var(--muted);margin-top:4px}.dashboard-grid{grid-template-columns:minmax(0,1.7fr) minmax(270px,.8fr);align-items:start}.card{padding:21px;margin-bottom:18px}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.card-heading h2{font:700 17px var(--font-title);letter-spacing:-.35px;margin:0;color:var(--navy)}.card-heading p{margin:5px 0 0;color:var(--muted);font-size:12px}.text-link{color:var(--blue);font-size:12px;font-weight:700}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}.toolbar form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.search{min-width:210px}.input,.select,.textarea{width:100%;border:1px solid #dce5ed;border-radius:10px;padding:11px 12px;color:var(--ink);background:#fff;outline:none;transition:.15s}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent-border);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.11)}.input-sm,.select-sm{width:auto;padding:8px 10px;font-size:12px}.btn{border:0;border-radius:10px;padding:11px 15px;font-weight:700;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.16s;white-space:nowrap}.btn-primary{background:var(--navy2);color:#fff}.btn-primary:hover{background:var(--navy-hover);transform:translateY(-1px)}.btn-teal{background:var(--accent);color:#fff}.btn-light{background:#eef3f7;color:#375064}.btn-danger{background:var(--red-soft);color:#ac4141}.btn-small{padding:8px 10px;font-size:11px}.table-wrap{overflow:auto;width:100%}.orders-table table{width:100%;min-width:0;table-layout:fixed}.orders-table th:nth-child(1),.orders-table td:nth-child(1){width:3%;padding-inline:4px}.orders-table th:nth-child(2),.orders-table td:nth-child(2){width:17.5%}.orders-table th:nth-child(3),.orders-table td:nth-child(3){width:11%}.orders-table th:nth-child(4),.orders-table td:nth-child(4){width:13%}.orders-table th:nth-child(5),.orders-table td:nth-child(5){width:8.5%;text-align:right}.orders-table th:nth-child(6),.orders-table td:nth-child(6){width:8%;text-align:right}.orders-table th:nth-child(7),.orders-table td:nth-child(7){width:9.5%;padding-inline:4px}.orders-table th:nth-child(8),.orders-table td:nth-child(8){width:8.5%;padding-left:3px;padding-right:3px}.orders-table th:nth-child(9),.orders-table td:nth-child(9){width:21%;padding-left:3px}.orders-table th,.orders-table td{padding-inline:6px}.orders-table th{white-space:normal;line-height:1.25}.orders-table th:nth-child(5),.orders-table td:nth-child(5){border-left:2px solid var(--line);padding-left:16px}.orders-table td:nth-child(2),.orders-table td:nth-child(3){overflow-wrap:anywhere}.order-dates{min-width:0;white-space:normal}.order-dates div{display:flex;flex-direction:column;gap:1px;font-size:10px;line-height:1.25}.order-dates div+div{margin-top:5px}.order-dates span{color:var(--muted);font-size:9px}.order-dates strong{color:var(--navy);font-size:10px;font-weight:700}.orders-table .badge{padding:5px 6px;font-size:9px}.order-update-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:4px}.order-update-form .select{width:100%;min-width:0;max-width:none;padding:7px 5px;font-size:10px}.order-update-form .btn{padding:7px 6px;font-size:10px}.order-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.order-actions form{display:inline-flex}.order-actions .btn{padding:6px 7px;font-size:10px}table{border-collapse:collapse;width:100%;min-width:720px}th{text-align:left;padding:11px 12px;color:#8a99a8;font-size:10px;letter-spacing:.85px;text-transform:uppercase;border-bottom:1px solid var(--line);font-weight:700;white-space:nowrap}td{padding:13px 12px;border-bottom:1px solid #edf1f4;font-size:13px;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcfd}.primary-cell{font-weight:700;color:var(--navy)}.sub-cell{font-size:11px;color:var(--muted);margin-top:3px}.num{font-variant-numeric:tabular-nums;white-space:nowrap}.positive{color:#07846f;font-weight:700}.negative{color:#bd5353;font-weight:700}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 9px;font-size:10px;font-weight:700;white-space:nowrap;background:#f0f3f6;color:#637587}.badge:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}.badge-entregado,.badge-pagado{background:#e3f7f2;color:#07846f}.badge-en-curso,.badge-solicitado,.badge-parcial{background:#eaf2ff;color:#3975d2}.badge-pendiente{background:#fff4df;color:#b17a1a}.badge-cancelado{background:#fff0ef;color:#cd5555}.badge-borrador{background:#f0f3f6;color:#718096}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:12px;color:#53687b;font-weight:700}.field .hint{color:#92a0ad;font-size:11px;margin-top:-2px}.field-full{grid-column:1/-1}.textarea{min-height:90px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.form-card{max-width:900px}.inline-form{display:flex;align-items:center;gap:6px}.inline-form select{max-width:130px}.empty{padding:38px 16px;text-align:center;color:var(--muted)}.empty .empty-icon{font-size:30px;color:#a7bac8;margin-bottom:10px}.empty strong{display:block;color:var(--navy);font-size:14px;margin-bottom:5px}.empty p{font-size:12px;margin:0 0 14px}.summary-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.summary-pill{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 16px;flex:1;min-width:145px}.summary-pill span{display:block;font-size:10px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.65px}.summary-pill strong{display:block;font:700 18px var(--font-title);margin-top:5px;color:var(--navy)}.chart-list{display:flex;flex-direction:column;gap:15px}.chart-row{display:grid;grid-template-columns:92px 1fr auto;gap:12px;align-items:center;font-size:12px}.chart-label{color:#607487;font-weight:600}.chart-track{height:9px;border-radius:20px;background:#edf2f5;overflow:hidden}.chart-fill{height:100%;border-radius:20px;background:linear-gradient(90deg,var(--accent),var(--accent-light))}.chart-value{font-weight:700;color:var(--navy);font-variant-numeric:tabular-nums}.callout{padding:14px;border-radius:12px;background:#f1f7f8;color:#526f7e;font-size:12px;line-height:1.6}.footer{width:min(1440px,100%);margin:0 auto;padding:17px clamp(16px,4vw,56px);display:flex;justify-content:space-between;gap:10px;color:#93a1ae;font-size:10px;border-top:1px solid #e8eef2}.mobile-label{display:none}.metric-highlight{background:linear-gradient(130deg,var(--navy),var(--navy-accent));color:#fff}.metric-highlight .stat-top,.metric-highlight .stat-note{color:#aac8ca}.metric-highlight .stat-value{color:var(--accent-light)}.metric-highlight .stat-icon{background:rgba(var(--accent-rgb),.16);color:var(--accent-light)}
@media(max-width:1050px){.topbar{gap:18px;padding-inline:20px}.nav-link{padding:10px 9px;font-size:12px}.top-profit{padding-left:14px}.nav-icon{display:none}.page-shell{padding-inline:22px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1050px) and (min-width:761px){.order-update-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.order-update-form .btn{grid-column:1/-1}}@media(max-width:760px){.table-wrap.orders-table{width:100%;margin-inline:0;overflow:visible}.orders-table table{display:block;width:100%;min-width:0;table-layout:auto}.orders-table thead{display:block}.orders-table thead tr{display:block}.orders-table thead th{display:none}.orders-table thead th:first-child{display:block;width:auto;padding:8px 10px}.orders-table thead th:first-child::after{content:"Seleccionar todos los pedidos";margin-left:8px;color:var(--muted);font-size:10px;letter-spacing:0;text-transform:none}.orders-table tbody{display:grid;gap:12px}.orders-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;box-shadow:var(--shadow)}.orders-table tbody tr:hover{background:#fff}.orders-table tbody td{display:block;width:auto!important;min-width:0;padding:10px;border-bottom:1px solid #edf1f4;font-size:12px}.orders-table tbody td:nth-child(1),.orders-table tbody td:nth-child(2),.orders-table tbody td:nth-child(3),.orders-table tbody td:nth-child(4),.orders-table tbody td:nth-child(9){grid-column:1/-1}.orders-table tbody td:nth-child(1){padding-bottom:2px;border-bottom:0}.orders-table tbody td:nth-child(5),.orders-table tbody td:nth-child(6),.orders-table tbody td:nth-child(7),.orders-table tbody td:nth-child(8){border-bottom:0}.orders-table tbody td:nth-child(5)::before{content:"Venta"}.orders-table tbody td:nth-child(6)::before{content:"Beneficio"}.orders-table tbody td:nth-child(7)::before{content:"Estado del pedido"}.orders-table tbody td:nth-child(8)::before{content:"Estado de pago"}.orders-table tbody td:nth-child(9)::before{content:"Actualizar / acciones"}.orders-table tbody td:nth-child(5)::before,.orders-table tbody td:nth-child(6)::before,.orders-table tbody td:nth-child(7)::before,.orders-table tbody td:nth-child(8)::before,.orders-table tbody td:nth-child(9)::before{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.45px}.orders-table tbody td:nth-child(5){border-left:0;padding-left:10px}.orders-table .order-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.orders-table .order-dates div+div{margin-top:0}.orders-table .order-update-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.orders-table .order-update-form .btn{grid-column:1/-1}.topbar{position:relative;display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px 16px 0;min-height:unset}.brand{grid-column:1}.top-profit{grid-column:2;grid-row:1;border-left:0;padding:0;gap:8px}.profit-copy small{font-size:8px}.profit-copy strong{font-size:14px}.profit-dot{width:7px;height:7px}.main-nav{grid-column:1/-1;grid-row:2;margin:0 -16px;padding:0 12px 9px;gap:3px}.nav-link{padding:9px 11px;font-size:11px;border-radius:9px}.nav-icon{display:inline;font-size:14px}.page-shell{padding:23px 15px 38px;min-height:calc(100vh - 132px)}.page-heading{align-items:flex-start;margin-bottom:19px}.page-heading h1{font-size:26px}.today{font-size:11px;text-align:right;padding-top:19px}.stats-grid{gap:10px;margin-bottom:12px}.stat-card{padding:15px}.stat-value{font-size:22px;margin-top:12px}.stat-note{font-size:10px}.stat-top{font-size:11px}.stat-icon{width:31px;height:31px}.dashboard-grid{grid-template-columns:1fr;gap:0}.card{padding:16px;border-radius:14px;margin-bottom:12px}.card-heading h2{font-size:16px}.form-grid{grid-template-columns:1fr;gap:13px}.field-full{grid-column:auto}.form-actions{justify-content:stretch}.form-actions .btn{flex:1}.toolbar{align-items:stretch}.toolbar>*,.toolbar form{width:100%}.toolbar form .search{flex:1;min-width:0}.toolbar form .btn{flex:none}.summary-pill{min-width:calc(50% - 6px);padding:11px}.summary-pill strong{font-size:16px}.chart-row{grid-template-columns:72px 1fr auto;gap:8px}.table-wrap{margin-inline:-4px;width:calc(100% + 8px)}td{padding:12px 9px}.footer{padding:14px 15px;flex-direction:column;gap:4px}}
@media(max-width:390px){.brand{font-size:17px}.brand-mark{width:32px;height:32px}.profit-copy strong{font-size:12px}.stats-grid{grid-template-columns:1fr 1fr}.stat-card{padding:12px}.stat-value{font-size:19px}.page-heading h1{font-size:23px}}

/* Ranking de productos calculado con pedidos entregados y el código del catálogo. */
.best-sellers-card{width:100%;min-width:0}
.best-sellers-toolbar{justify-content:flex-start}
.best-sellers-search{display:flex;align-items:center;gap:8px;flex:1 1 300px;min-width:260px}
.best-sellers-search .input{flex:1;min-width:0;width:auto}
.best-sellers-table-wrap{width:100%;margin:0;overflow:visible}
.best-sellers-table{width:100%;min-width:0;table-layout:fixed}
.best-sellers-table th,.best-sellers-table td{overflow-wrap:anywhere}
.best-sellers-table th{white-space:normal;line-height:1.3}
.best-sellers-table th:nth-child(1),.best-sellers-table td:nth-child(1){width:22%}
.best-sellers-table th:nth-child(2),.best-sellers-table td:nth-child(2){width:12%}
.best-sellers-table th:nth-child(3),.best-sellers-table td:nth-child(3){width:10%}
.best-sellers-table th:nth-child(4),.best-sellers-table td:nth-child(4){width:12%}
.best-sellers-table th:nth-child(5),.best-sellers-table td:nth-child(5){width:13%;text-align:right}
.best-sellers-table th:nth-child(6),.best-sellers-table td:nth-child(6){width:15%;text-align:right}
.best-sellers-table th:nth-child(7),.best-sellers-table td:nth-child(7){width:16%;text-align:right}
.best-sellers-units{font-weight:800;color:var(--navy);font-size:15px}
.best-sellers-sort-link{display:inline-flex;align-items:center;gap:5px;color:inherit}
.best-sellers-sort-link:hover,.best-sellers-sort-link.active{color:var(--accent)}
.best-sellers-sort-link span{font-size:13px;color:#a0adb8}
.best-sellers-sort-link.active span{color:var(--accent);font-weight:800}
@media(max-width:760px){.best-sellers-toolbar{align-items:stretch}.best-sellers-search{width:100%;min-width:0;flex-basis:100%}.best-sellers-search .btn{flex:none}.best-sellers-toolbar .product-filter,.best-sellers-toolbar .orders-page-size{width:100%;justify-content:space-between}.table-wrap.best-sellers-table-wrap{width:100%;margin:0;overflow:visible}.best-sellers-table{display:block;width:100%;min-width:0;table-layout:auto}.best-sellers-table thead{display:none}.best-sellers-table tbody{display:grid;gap:12px}.best-sellers-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.best-sellers-table tbody tr:hover{background:#fff}.best-sellers-table tbody td{display:block;width:auto!important;min-width:0;padding:10px;border-bottom:1px solid #edf1f4;font-size:12px;text-align:left!important}.best-sellers-table tbody td:before{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.45px;content:attr(data-label)}.best-sellers-table tbody td:first-child{grid-column:1/-1}.best-sellers-table tbody td:last-child{border-bottom:0}.best-sellers-table .best-sellers-units{font-size:14px}}
/* Compras al proveedor: listado a todo el ancho, sin desplazamiento lateral. */
.provider-purchases-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.provider-purchase-form{max-width:none}
.table-wrap.purchase-table-wrap{width:100%;margin:0;overflow:visible}
.purchase-table{width:100%;min-width:0;table-layout:fixed}
.purchase-table td{overflow-wrap:anywhere}
/* Los títulos solo se parten entre palabras, nunca letra a letra. */
.purchase-table th{white-space:normal;line-height:1.25;overflow-wrap:normal;word-break:normal;hyphens:none}
/* Nueve columnas: los anchos suman 100 % y «Acciones» tiene sitio para Editar, Ha llegado y Cerrar en una fila. */
.purchase-table th:nth-child(1),.purchase-table td:nth-child(1){width:13%}
.purchase-table th:nth-child(2),.purchase-table td:nth-child(2){width:9%}
.purchase-table th:nth-child(3),.purchase-table td:nth-child(3){width:9%}
.purchase-table th:nth-child(4),.purchase-table td:nth-child(4){width:9%}
.purchase-table th:nth-child(5),.purchase-table td:nth-child(5){width:10%}
.purchase-table th:nth-child(6),.purchase-table td:nth-child(6){width:10%}
.purchase-table th:nth-child(7),.purchase-table td:nth-child(7){width:9%}
.purchase-table th:nth-child(8),.purchase-table td:nth-child(8){width:10%}
.purchase-table th:nth-child(9),.purchase-table td:nth-child(9){width:21%}
.purchase-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.purchase-actions form{display:inline-flex}
.purchase-actions .btn{white-space:nowrap}
@media(min-width:1101px) and (max-width:1240px){.purchase-actions{gap:4px}.purchase-actions .btn{padding-inline:8px}}
.purchase-page-controls{justify-content:flex-start;gap:10px;margin:12px 0 16px}
.purchase-page-controls .orders-page-size{margin:0}
.purchase-search-field{display:flex;flex:1 1 240px;min-width:220px}
.purchase-search-field .search{width:100%;min-width:0}
.purchase-period-filter{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:600}
.purchase-period-filter .select{min-width:118px}
/* Hasta 1100 px las nueve columnas no caben: fichas como en el móvil. */
@media(max-width:1100px){.table-wrap.purchase-table-wrap{width:100%;margin:0;overflow:visible}.purchase-table{display:block;width:100%;min-width:0;table-layout:auto}.purchase-table thead{display:none}.purchase-table tbody{display:grid;gap:12px}.purchase-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.purchase-table tbody td{display:block;width:auto!important;min-width:0;padding:10px;border-bottom:1px solid #edf1f4;font-size:12px}.purchase-table tbody td:before{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.45px;content:attr(data-label)}.purchase-table tbody td:first-child,.purchase-table tbody td:nth-child(8),.purchase-table tbody td:last-child{grid-column:1/-1}.purchase-table tbody td:last-child{border-bottom:0}.purchase-actions{gap:6px}}
@media(max-width:760px){.purchase-page-controls{align-items:stretch;gap:9px}.purchase-page-controls .purchase-search-field{width:100%;min-width:0;flex-basis:100%}.purchase-search-field .search{min-width:0}.purchase-page-controls .purchase-period-filter,.purchase-page-controls .orders-page-size{width:100%;justify-content:space-between}.purchase-period-filter .select{min-width:150px}.purchase-page-controls>.btn{width:100%}}
/* Paginación compacta del listado de pedidos. */
.stock-search{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 16px}
.stock-search .search{flex:1;min-width:210px;width:auto}
.stock-search .orders-page-size{margin-left:auto;margin-right:0}
.client-search-row{display:flex;align-items:center;gap:8px;flex:1;min-width:280px}
.client-search-row .search{flex:1;min-width:0;width:auto}
.client-toolbar .orders-page-size{margin-right:0;margin-left:auto}
.orders-filter-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.orders-page-size{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:600}
.orders-page-size .select{min-width:72px}
.orders-page-size{margin-right:auto}
.orders-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}
.orders-pagination-summary{color:var(--muted);font-size:12px}
.orders-pagination-links{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.orders-page-link{min-width:34px;height:34px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:9px;background:#fff;color:#52687a;font-size:12px;font-weight:700}
.orders-page-link:hover,.orders-page-link.active{border-color:var(--navy2);background:var(--navy2);color:#fff}
.orders-page-gap{padding:0 3px;color:var(--muted);font-size:12px}
@media(max-width:760px){.stock-search{align-items:stretch}.stock-search .search{flex:1 1 100%;min-width:0}.stock-search .orders-page-size{flex:1 1 100%;margin:0;width:100%;justify-content:space-between}.stock-search>.btn{flex:1}.client-search-row{width:100%;min-width:0}.client-toolbar .orders-page-size{margin-left:0}.orders-filter-actions{align-items:stretch}.orders-page-size{width:100%;justify-content:space-between}.orders-filter-actions>.btn{flex:1}.orders-pagination{align-items:flex-start;flex-direction:column}.orders-pagination-links{justify-content:flex-start;width:100%}.orders-page-link{min-width:32px;height:32px;padding-inline:7px}}

/* Registro de gastos: listado a todo el ancho y tarjetas cómodas en móvil. */
.expenses-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.expenses-layout .form-card{max-width:none}
.expenses-register-card{width:100%;min-width:0}
.expense-month-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.expense-month-controls>.input{width:auto;min-width:155px}
.expense-month-controls .orders-page-size{margin:0}
.expenses-table-wrap{width:100%;margin:0;overflow:visible}
.expenses-table{width:100%;min-width:0;table-layout:fixed}
.expenses-table th,.expenses-table td{overflow-wrap:anywhere}
.expenses-table th{white-space:normal;line-height:1.25}
.expenses-table th:nth-child(1),.expenses-table td:nth-child(1){width:48%}
.expenses-table th:nth-child(2),.expenses-table td:nth-child(2){width:16%}
.expenses-table th:nth-child(3),.expenses-table td:nth-child(3){width:15%}
.expenses-table th:nth-child(4),.expenses-table td:nth-child(4){width:21%}
.expense-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.expense-actions form{display:inline-flex;margin:0}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.expense-month-controls{width:100%;align-items:stretch;flex-direction:column}.expense-month-controls>.input{width:100%}.expense-month-controls .orders-page-size{width:100%;justify-content:space-between}.expense-month-controls>.btn{width:100%}.table-wrap.expenses-table-wrap{width:100%;margin:0;overflow:visible}.expenses-table{display:block;width:100%;min-width:0;table-layout:auto}.expenses-table thead{display:none}.expenses-table tbody{display:grid;gap:12px}.expenses-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.expenses-table tbody tr:hover{background:#fff}.expenses-table tbody td{display:block;width:auto!important;min-width:0;padding:10px;border-bottom:1px solid #edf1f4;font-size:12px}.expenses-table tbody td:before{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.45px;content:attr(data-label)}.expenses-table tbody td:first-child,.expenses-table tbody td:last-child{grid-column:1/-1}.expenses-table tbody td:last-child{border-bottom:0}.expense-actions{gap:8px}}

/* Catálogo de productos. */
.products-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.products-form{max-width:none}
.product-best-sellers-button{flex:none}
.product-directory-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.product-toolbar{align-items:center}
.product-search-row{display:flex;align-items:center;gap:8px;flex:1;min-width:240px}
.product-search-row .search{flex:1;min-width:0;width:auto}
.product-filter{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:600}
.product-filter .select{min-width:100px}
.product-toolbar .orders-page-size{margin:0 0 0 auto}
.products-table-wrap{width:100%;margin:0;overflow:visible}
.products-table{width:100%;min-width:0;table-layout:fixed}
.products-table th,.products-table td{overflow-wrap:anywhere}
.products-table th{white-space:normal;line-height:1.25}
.products-table th:nth-child(1),.products-table td:nth-child(1){width:22%}
.products-table th:nth-child(2),.products-table td:nth-child(2){width:13%}
.products-table th:nth-child(3),.products-table td:nth-child(3){width:9%}
.products-table th:nth-child(4),.products-table td:nth-child(4){width:12%}
.products-table th:nth-child(5),.products-table td:nth-child(5){width:14%}
.products-table th:nth-child(6),.products-table td:nth-child(6){width:14%}
.products-table th:nth-child(7),.products-table td:nth-child(7){width:16%}
.products-table td a{overflow-wrap:anywhere}
.product-actions{display:flex;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:nowrap;white-space:nowrap}
.product-actions form{display:inline-flex;flex:0 0 auto;margin:0}
.product-actions .btn{flex:0 0 auto;padding-inline:8px}
@media(max-width:760px){.product-search-row{width:100%;min-width:0}.product-filter,.product-toolbar .orders-page-size{margin:0;width:100%;justify-content:space-between}.product-filter .select{min-width:120px}.table-wrap.products-table-wrap{width:100%;margin:0;overflow:visible}.products-table{display:block;width:100%;min-width:0;table-layout:auto}.products-table thead{display:none}.products-table tbody{display:grid;gap:12px}.products-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.products-table tbody tr:hover{background:#fff}.products-table tbody td{display:block;width:auto!important;min-width:0;padding:10px;border-bottom:1px solid #edf1f4;font-size:12px}.products-table tbody td:before{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.45px;content:attr(data-label)}.products-table tbody td:first-child,.products-table tbody td:nth-child(6),.products-table tbody td:last-child{grid-column:1/-1}.products-table tbody td:last-child{border-bottom:0}}
@media(hover:hover) and (min-width:761px){.client-table tbody tr,.products-table tbody tr,.purchase-table tbody tr,.stock-table tbody tr,.expenses-table tbody tr{transition:background-color .15s ease,box-shadow .15s ease}.client-table tbody tr:hover,.products-table tbody tr:hover,.purchase-table tbody tr:hover,.stock-table tbody tr:hover,.expenses-table tbody tr:hover{background:var(--accent-soft);box-shadow:inset 4px 0 var(--accent)}.client-table tbody tr:hover td,.products-table tbody tr:hover td,.purchase-table tbody tr:hover td,.stock-table tbody tr:hover td,.expenses-table tbody tr:hover td{background:transparent}.client-table tbody tr:hover .primary-cell,.products-table tbody tr:hover .primary-cell,.purchase-table tbody tr:hover .primary-cell,.stock-table tbody tr:hover .primary-cell,.expenses-table tbody tr:hover .primary-cell{color:var(--accent-ink)}}
.product-stock-filter{display:flex;flex-direction:column;gap:4px;color:inherit;transition:border-color .16s,background .16s,transform .16s}.product-stock-filter:hover{border-color:var(--accent-border);background:var(--accent-softer);transform:translateY(-1px)}.product-stock-filter.active{border-color:var(--accent);background:var(--accent-softer);box-shadow:0 0 0 2px rgba(var(--accent-rgb),.1)}.product-stock-filter small{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.products-table th:nth-child(1),.products-table td:nth-child(1){width:19%}.products-table th:nth-child(2),.products-table td:nth-child(2){width:11%}.products-table th:nth-child(3),.products-table td:nth-child(3){width:8%}.products-table th:nth-child(4),.products-table td:nth-child(4){width:11%}.products-table th:nth-child(5),.products-table td:nth-child(5){width:10%}.products-table th:nth-child(6),.products-table td:nth-child(6){width:12%}.products-table th:nth-child(7),.products-table td:nth-child(7){width:13%}.products-table th:nth-child(8),.products-table td:nth-child(8){width:16%}
@media(max-width:760px){.products-table tbody td:nth-child(6){grid-column:auto}.products-table tbody td:nth-child(7){grid-column:1/-1}}
.products-table-wrap{overflow-x:auto;overflow-y:hidden}.products-table th:nth-child(1),.products-table td:nth-child(1){width:18%}.products-table th:nth-child(2),.products-table td:nth-child(2){width:10%}.products-table th:nth-child(3),.products-table td:nth-child(3){width:8%}.products-table th:nth-child(4),.products-table td:nth-child(4){width:10%}.products-table th:nth-child(5),.products-table td:nth-child(5){width:9%}.products-table th:nth-child(6),.products-table td:nth-child(6){width:12%}.products-table th:nth-child(7),.products-table td:nth-child(7){width:15%}.products-table th:nth-child(8),.products-table td:nth-child(8){width:18%;min-width:140px}.products-table th:last-child{white-space:nowrap}.products-table td:last-child{overflow-wrap:normal}.product-actions{flex-wrap:wrap;white-space:normal;row-gap:5px}
@media(max-width:760px){.products-table-wrap{overflow:visible}.products-table th:nth-child(8),.products-table td:nth-child(8){min-width:0}.products-table tbody td:last-child{grid-column:1/-1}.product-actions{flex-wrap:nowrap;white-space:nowrap}}
.product-name-cell{display:flex;align-items:center;gap:10px;min-width:0}.product-name-cell>div{min-width:0}.product-thumb{width:42px;height:42px;flex:none;border-radius:9px;border:1px solid var(--line);background:#fff;object-fit:contain}.product-thumb-empty{display:grid;place-items:center;background:var(--paper);color:#b7c5d1;font-size:14px}
.product-images-title{font-size:12px;color:#53687b;font-weight:700}.product-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px}.product-image-item{display:flex;flex-direction:column;margin:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff;transition:border-color .15s,opacity .15s}.product-image-preview{display:grid;place-items:center;aspect-ratio:1;background:var(--paper)}.product-image-preview img{width:100%;height:100%;object-fit:contain}.product-image-preview.no-preview img{display:none}.product-image-preview.no-preview:after{content:'Sin vista previa';padding:8px;color:var(--muted);font-size:11px;text-align:center}.product-image-item figcaption,.product-image-option{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:7px 8px;border-top:1px solid var(--line);font-size:11px;font-weight:600;color:#53687b}.product-image-option{cursor:pointer}.product-image-item figcaption .product-image-option{padding:0;border:0}.product-image-option small{margin-left:auto;color:var(--muted);font-weight:500}.product-image-item input{accent-color:var(--accent);margin:0}.product-image-item:has(input[name="imagen_principal"]:checked){border-color:var(--accent)}.product-image-item.is-removed{opacity:.45;border-color:#f0c4c4}.product-image-remove{color:#ac4141}.product-scan-item:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 2px rgba(var(--accent-rgb),.12)}.product-scan-item.is-saved{opacity:.6}
.product-image-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.product-image-upload{cursor:pointer}.product-image-counter{color:var(--muted);font-size:12px;font-weight:600}.product-image-counter.is-over{color:#b17a1a}.product-upload-list{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px dashed var(--line);border-radius:12px;background:var(--paper)}.product-upload-item{display:flex;align-items:center;gap:9px;min-width:0;font-size:12px;color:#53687b}.product-upload-item img{width:38px;height:38px;flex:none;border-radius:7px;background:#fff;object-fit:cover}.product-upload-item span{min-width:0;overflow-wrap:anywhere}.product-upload-item.is-error{color:#a83d3d}.product-upload-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:2px}.product-upload-error{margin:0;color:#a83d3d;font-size:12px;font-weight:600}
.product-scan{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-softer)}.product-scan-status{margin:0;color:var(--accent-ink);font-size:12px;font-weight:600}.product-scan-status.is-error{color:#a83d3d}.product-scan-tools{display:flex;gap:6px;flex-wrap:wrap}.product-scan-tools[hidden],.product-upload-list[hidden],.product-scan[hidden]{display:none}.product-import{padding:12px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-softer)}.product-import-row{display:flex;gap:8px}.product-import-row .input{flex:1;min-width:0}.product-import-row .btn{flex:none;white-space:nowrap}.product-import-review{display:flex;flex-direction:column;gap:10px;margin-top:4px}.product-import-review[hidden],.product-import-actions[hidden]{display:none}.product-import-list{display:flex;flex-direction:column;gap:6px}.product-import-list:empty{display:none}.product-import-item{display:flex;align-items:flex-start;gap:10px;padding:9px 12px;border-radius:10px;background:#fff;border:1px solid var(--line);cursor:pointer}.product-import-item input{margin-top:3px;flex:none}.product-import-item>span{display:flex;flex-direction:column;gap:2px;min-width:0}.product-import-item strong{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--navy)}.product-import-value{font-size:13px;color:#24384a;overflow-wrap:anywhere}.product-import-value.is-long{max-height:96px;overflow:auto;white-space:pre-line;font-size:12px;line-height:1.5}.product-import-item small{font-size:11px;color:#6b7f91}.product-import-item.is-same{opacity:.65;cursor:default}.product-import-actions{display:flex;gap:6px;flex-wrap:wrap}@media(max-width:560px){.product-import-row{flex-direction:column}}
@media(max-width:760px){.product-image-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}.product-image-actions .btn{flex:1 1 auto}.product-image-option small{display:none}}
.expense-register-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.expense-register-actions>.btn{flex:0 0 auto}
@media(max-width:760px){.expense-register-actions{width:100%;align-items:stretch;flex-direction:column}.expense-register-actions>.btn{width:100%}}
/* Ventana de confirmación (assets/dialog.js). */
.app-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:0;border-radius:18px;background:#fff;color:var(--ink);box-shadow:0 24px 60px rgba(6,24,40,.28)}
.app-dialog::backdrop{background:rgba(8,20,33,.45);backdrop-filter:blur(2px)}
.app-dialog[open]{animation:app-dialog-in .16s ease-out}
@keyframes app-dialog-in{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.app-dialog-box{display:grid;gap:14px;padding:22px}
.app-dialog-head{display:flex;align-items:center;gap:12px}
.app-dialog-head h2{margin:0;color:var(--navy);font:700 18px var(--font-title);letter-spacing:-.3px}
.app-dialog-icon{display:grid;flex:none;width:38px;height:38px;place-items:center;border-radius:12px;background:var(--amber-soft);color:var(--amber);font:800 19px var(--font-title)}
.app-dialog-danger .app-dialog-icon{background:var(--red-soft);color:var(--red)}
.app-dialog-info .app-dialog-icon{background:var(--accent-soft);color:var(--accent-ink)}
.app-dialog-body{display:grid;gap:12px;color:#53687b;font-size:13px;line-height:1.55}
.app-dialog-body p{margin:0}
.app-dialog-body strong{color:var(--navy)}
.app-dialog-section{display:grid;gap:6px;padding:12px 14px;border-radius:12px;background:var(--paper)}
.app-dialog-section.is-danger{background:var(--red-soft)}
.app-dialog-section ul{margin:0;padding-left:18px}
.app-dialog-section li+li{margin-top:3px}
.app-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:4px}
@media(max-width:760px){.app-dialog-box{padding:18px}.app-dialog-actions{flex-direction:column-reverse}.app-dialog-actions .btn{width:100%}}
.btn-danger-solid{background:var(--red);color:#fff}.btn-danger-solid:hover{background:#c24f4f}
.list-sort-link{display:inline;color:inherit}.list-sort-link span{display:inline-block;margin-left:3px;font-size:11px;color:#a0adb8}.list-sort-link:hover,.list-sort-link.active{color:var(--accent)}.list-sort-link.active span{color:var(--accent);font-weight:800}
.product-sheet-link{display:block}.product-sheet-link:hover{color:var(--accent-ink);text-decoration:underline;text-underline-offset:2px}.product-name-cell>a{flex:none;line-height:0}
.product-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.product-sheet-title{min-width:0}.product-sheet-title h2{margin:0;font:800 22px var(--font-title);letter-spacing:-.5px;color:var(--navy);overflow-wrap:anywhere}.product-sheet-subtitle{margin:4px 0 0;color:#53687b;font-size:14px;font-weight:600}.product-sheet-meta{margin:8px 0 0;color:var(--muted);font-size:12px}.product-sheet-actions{display:flex;gap:7px;flex-wrap:wrap}
.product-sheet-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:18px;align-items:start}.product-sheet-gallery{display:flex;flex-direction:column;gap:10px}.product-sheet-main{display:grid;place-items:center;aspect-ratio:1;border-radius:12px;background:var(--paper);overflow:hidden}.product-sheet-main img{width:100%;height:100%;object-fit:contain}.product-sheet-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:8px}.product-sheet-thumb{padding:0;aspect-ratio:1;border:2px solid var(--line);border-radius:10px;background:#fff;overflow:hidden;cursor:pointer}.product-sheet-thumb img{width:100%;height:100%;object-fit:contain}.product-sheet-thumb.active{border-color:var(--accent)}.product-sheet-noimage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:1;border-radius:12px;background:var(--paper);color:var(--muted);font-size:13px;text-align:center;padding:16px}.product-sheet-noimage span{font-size:30px;color:#a7bac8}.product-sheet-noimage p{margin:0 0 6px}
.product-sheet-info{min-width:0}.product-sheet-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.product-sheet-stats .summary-pill{min-width:0}.product-sheet-stats .summary-pill small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.product-sheet-stats .summary-pill .badge{display:inline-flex;margin-top:6px;color:#cd5555;font-size:10px;letter-spacing:0;text-transform:none}.product-sheet-text h3{margin:0 0 7px;font:700 14px var(--font-title);color:var(--navy)}.product-sheet-text h3:not(:first-child){margin-top:20px}.product-sheet-text p{margin:0;color:#3d5164;font-size:14px;line-height:1.6;overflow-wrap:anywhere}.product-sheet-text .product-sheet-empty{color:var(--muted);font-size:13px}.product-sheet-url{font-size:13px}
@media(max-width:860px){.product-sheet-grid{grid-template-columns:1fr;gap:0}.product-sheet-actions{width:100%}.product-sheet-actions .btn{flex:1 1 auto}.product-sheet-gallery{margin-bottom:12px}}
.product-shop-toggle{display:flex;align-items:center;gap:8px;cursor:pointer}.product-shop-toggle input{width:16px;height:16px;margin:0;accent-color:var(--accent)}.product-shop-hidden{color:#b17a1a}
.product-sheet-old-price{color:#6b7f91;font-size:12px;font-weight:600}
.price-refresh{display:grid;gap:10px}.price-refresh[hidden],.product-price-refresh[hidden],.price-refresh-progress[hidden]{display:none}.product-price-refresh{margin-bottom:16px;padding:14px 16px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-softer)}.price-refresh-intro{margin:0;color:#53687b;font-size:13px;line-height:1.5}.price-refresh-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}.price-refresh .hint{color:var(--muted);font-size:12px;line-height:1.5}.price-refresh-progress{display:grid;gap:6px}.price-refresh-bar{height:10px;border-radius:999px;background:#edf2f5;overflow:hidden}.price-refresh-bar span{display:block;width:0;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-light));transition:width .25s}.price-refresh-progress.error .price-refresh-bar span{background:#d95d5d}.price-refresh-progress.error .hint{color:#a83d3d;font-weight:600}.price-refresh-results{display:grid;gap:4px;max-height:280px;margin:0;padding:0;overflow:auto;list-style:none}.price-refresh-results:empty{display:none}.price-refresh-results li{display:flex;flex-direction:column;gap:2px;padding:7px 10px;border-radius:8px;background:#fff;border:1px solid var(--line);font-size:12px}.price-refresh-results a{color:var(--navy);font-weight:700}.price-refresh-results a:hover{text-decoration:underline}.price-refresh-results span{color:#53687b;overflow-wrap:anywhere}.price-refresh-results .price-refresh-note,.price-refresh-results .price-refresh-failed span{color:#a83d3d}.price-refresh-fields{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;padding:0;border:0}.price-refresh-fields legend{width:100%;margin-bottom:6px;padding:0;color:#53687b;font-size:12px;font-weight:700}.price-refresh-check{display:flex;align-items:center;gap:7px;color:var(--navy);font-size:13px;font-weight:600;cursor:pointer}.price-refresh-check input{width:16px;height:16px;margin:0;accent-color:var(--accent)}.product-fixed-texts{margin-top:6px;font-size:12px;font-weight:600;color:#53687b}
.price-refresh-catalog{display:grid;gap:4px;max-width:420px}.price-refresh-catalog label{font-size:12px;font-weight:700;color:var(--ink,#18324a)}.price-refresh-catalog .input{max-width:160px;text-transform:uppercase}.price-refresh-catalog .input::placeholder,.catalog-web-catalog .input::placeholder{text-transform:none}
.product-catalog-tag{display:block;width:max-content;margin-top:4px;padding:1px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);font-size:10px;font-weight:700;letter-spacing:.02em}
.product-retired-card{margin-bottom:18px;border-color:#f3d9a4}.product-retired-card .card-heading{align-items:flex-start}.product-retired-card .card-heading p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.product-retired-card h2 .badge{margin-left:6px;vertical-align:middle}
.product-retired-list{display:grid;max-height:360px;margin:0;padding:0;overflow:auto;border:1px solid var(--line);border-radius:12px;list-style:none}
.product-retired-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid #edf1f4}.product-retired-list li:last-child{border-bottom:0}
.product-retired-main{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}.product-retired-actions{display:flex;flex:none;flex-wrap:wrap;gap:6px;justify-content:flex-end}.product-retired-actions form{margin:0}
@media(max-width:640px){.product-retired-card .card-heading{flex-direction:column}.product-retired-list li{flex-direction:column;align-items:stretch}.product-retired-actions{justify-content:flex-start}}
.price-history .card-heading{flex-wrap:wrap}.price-history-tabs{display:flex;gap:6px;flex-wrap:wrap}.price-history-svg{display:block;width:100%;height:auto}.ph-grid{stroke:#edf1f4;stroke-width:1}.ph-grid-v{stroke-dasharray:2 4}.ph-axis{fill:#8a99a8;font:600 10px var(--font-body)}.ph-line-thin{stroke-width:1.6;opacity:.6}.ph-line{stroke-width:3;stroke-linecap:round}.ph-line-dashed{stroke-width:1.6;stroke-dasharray:5 5}.ph-step{stroke-width:1.5;stroke-dasharray:3 3;opacity:.7}.ph-point{stroke:#fff;stroke-width:2}.ph-order{fill:#fff;stroke-width:2.2}.price-history-chart.hide-orders .ph-order{display:none}.ph-point,.ph-order{cursor:default}
.price-history-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:12px 0 4px;color:#53687b;font-size:12px;font-weight:600}.price-history-legend span,.price-history-orders-toggle{display:inline-flex;align-items:center;gap:7px}.price-history-legend i{width:18px;height:4px;border-radius:3px;background:var(--c)}.price-history-legend i.dashed{height:0;border-top:2px dashed var(--c);background:none}.price-history-legend i.ring{width:10px;height:10px;border-radius:50%;border:2px solid var(--c);background:#fff}.price-history-orders-toggle{cursor:pointer}.price-history-legend-note{color:var(--muted);font-weight:500}
.price-history-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.price-history-stats .summary-pill{min-width:0}.price-history-stats .summary-pill strong{font-size:16px}.price-history-stats .summary-pill small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.price-history-years{margin-top:14px}.price-history-years table,.price-history-details table{min-width:560px}.price-history-year{display:inline-flex;align-items:center;gap:7px;font-weight:700;color:var(--navy)}.price-history-year:before{content:'';width:10px;height:10px;border-radius:50%;background:var(--c)}
.price-history-details{margin-top:16px}.price-history-details summary{cursor:pointer;color:var(--blue);font-size:13px;font-weight:700;padding:4px 0}.price-history-details table{margin-top:8px}.price-history-details td{padding:9px 12px}.price-history-details form{display:inline}
@media(max-width:860px){.price-history-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.price-history-chart{margin:0}.ph-axis{font-size:19px}.ph-line{stroke-width:5}.ph-line-thin{stroke-width:3}.ph-point{r:7}.ph-order{r:8;stroke-width:3}}
.price-drop-banner{display:flex;align-items:center;gap:12px;margin-bottom:18px;padding:13px 16px;border:1px solid var(--accent-line);border-radius:14px;background:var(--accent-softer)}.price-drop-banner>span{font-size:20px;color:var(--accent)}.price-drop-banner p{flex:1;margin:0;color:#3d5164;font-size:13px}.price-drop-banner strong{color:var(--navy)}.price-refresh-drops{margin-top:6px;white-space:normal;text-align:left}
.price-drop-intro .flash{margin:12px 0 0}.price-drop-all{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:#53687b;cursor:pointer;white-space:nowrap}.price-drop-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}.price-drop-client{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,2fr) auto;gap:14px;align-items:start;padding:14px;border:1px solid var(--line);border-radius:12px}.price-drop-client.done{background:var(--paper)}.price-drop-check{display:flex;gap:10px;align-items:flex-start;cursor:pointer;min-width:0}.price-drop-check input{margin-top:3px}.price-drop-check span{min-width:0}.price-drop-check strong{display:block;color:var(--navy)}.price-drop-check small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.price-drop-products{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:13px}.price-drop-products li{min-width:0}.price-drop-products .product-catalog-tag{display:inline-block;margin:0 0 0 6px;vertical-align:middle}.price-drop-prices{display:block;margin-top:2px}.price-drop-prices s{color:var(--muted)}.price-drop-prices strong{color:var(--accent-ink)}.price-drop-percent{display:inline-block;margin-left:4px;padding:2px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);font-size:11px;font-weight:700}.price-drop-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.price-drop-status{font-size:12px;font-weight:700;color:var(--muted);text-align:right}.price-drop-status.ok{color:var(--accent-ink)}.price-drop-status.error{color:#bd5353}
.price-drop-send{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:16px;flex-wrap:wrap}.price-drop-send p{margin:0;color:#53687b;font-size:13px;font-weight:600}
@media(max-width:760px){.price-drop-intro .card-heading{flex-direction:column;align-items:flex-start}.price-drop-banner{flex-wrap:wrap}.price-drop-banner .btn{width:100%}.price-drop-client{grid-template-columns:1fr;gap:10px}.price-drop-actions{flex-direction:row;justify-content:space-between;align-items:center}.price-drop-send .btn{width:100%}}
.client-notice-optout{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.client-notice-optout p{margin:0;font-size:13px;color:#3d5164}.client-notice-optout small{color:var(--muted);font-size:11px}.client-notice-optout .badge{margin-left:4px}.price-drop-unsubscribed{margin:12px 0 0;color:var(--muted);font-size:12px}
.price-summary-picker{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}.price-summary-picker label{font-size:12px;font-weight:700;color:#53687b}.price-summary-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.price-summary-counts .summary-pill{min-width:0;transition:.15s}.price-summary-counts .summary-pill:hover{border-color:var(--accent-border)}.price-summary-copy .textarea{font-size:13px;line-height:1.55}.price-summary-table td{vertical-align:top}.price-summary-old-tag{opacity:.55}
@media(max-width:860px){.price-summary-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.price-summary-table{table-layout:fixed}.price-summary-table th:nth-child(1){width:32%}.price-summary-table th:nth-child(2){width:17%}.price-summary-table th:nth-child(3),.price-summary-table th:nth-child(4),.price-summary-table th:nth-child(5){width:12%}.price-summary-table .product-catalog-tag{display:inline-block;margin:0;vertical-align:middle}.price-summary-table td:nth-child(2){white-space:nowrap}
@media(max-width:760px){.price-summary-table{min-width:0;table-layout:auto}.price-summary-table thead{display:none}.price-summary-table tbody{display:block}.price-summary-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 10px;padding:12px 0;border-bottom:1px solid #edf1f4}.price-summary-table tbody tr:last-child{border-bottom:0}.price-summary-table td{display:block;padding:0;border:0;font-size:13px}.price-summary-table td:nth-child(1){grid-column:1/-1}.price-summary-table td:nth-child(2){grid-column:1/-1;white-space:normal}.price-summary-table td:nth-child(6){grid-column:1/-1;color:var(--muted);font-size:12px}.price-summary-table td:nth-child(3)::before,.price-summary-table td:nth-child(4)::before,.price-summary-table td:nth-child(5)::before{display:block;margin-bottom:2px;color:var(--muted);font-size:9px;font-weight:700;letter-spacing:.45px;text-transform:uppercase}.price-summary-table td:nth-child(3)::before{content:"Antes"}.price-summary-table td:nth-child(4)::before{content:"Ahora"}.price-summary-table td:nth-child(5)::before{content:"Cambio"}.price-summary-table td.price-summary-nolists{display:none}}
.app-install{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;border-left:4px solid var(--accent)}.app-install[hidden],.app-install [hidden]{display:none}.app-install img{flex:none;border-radius:11px}.app-install-text{flex:1;min-width:0}.app-install-text strong{color:var(--navy);font-size:14px}.app-install-text p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.app-install-actions{display:flex;flex:none;align-items:center;gap:4px}.app-install-close{border:0;background:none;color:var(--muted);font-size:15px;padding:6px 8px;cursor:pointer;border-radius:8px}.app-install-close:hover{background:#eef3f7}
@media(max-width:760px){.product-directory-heading{flex-direction:column;align-items:stretch;gap:12px}.product-directory-heading .product-directory-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px}.product-directory-heading .product-directory-actions .btn{min-width:0;padding:10px 8px;font-size:12px;white-space:normal;text-align:center;line-height:1.25}.product-directory-heading .product-directory-actions .btn-primary{grid-column:1/-1}}
.purchases-directory-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
@media(max-width:760px){.purchases-directory-heading{flex-direction:column;align-items:stretch;gap:12px}.purchases-directory-actions{display:grid;grid-template-columns:minmax(0,1fr)}.purchases-directory-actions .btn{padding:10px 8px;font-size:12px}.purchase-page-controls .purchase-period-filter{width:calc(50% - 5px);flex-direction:column;align-items:stretch;gap:4px}.purchase-page-controls .purchase-period-filter .select{width:100%;min-width:0}.purchase-page-controls .orders-page-size{width:calc(50% - 5px);flex-direction:column;align-items:stretch;gap:4px}.purchase-page-controls .orders-page-size .select{width:100%}.purchase-page-controls>.btn{width:calc(50% - 5px);align-self:flex-end}.purchase-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.purchase-actions form,.purchase-actions form .btn{width:100%}}
@media(max-width:760px){.expenses-register-heading{flex-direction:column;align-items:stretch;gap:12px}.expenses-register-heading .expense-register-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:8px}.expenses-register-heading .expense-month-controls{display:contents}.expenses-register-heading .expense-month-controls>.input{grid-column:1/-1;width:100%}.expenses-register-heading .expense-month-controls .orders-page-size{flex-direction:column;align-items:stretch;gap:4px;width:auto}.expenses-register-heading .expense-month-controls .orders-page-size .select{width:100%}.expenses-register-heading .expense-register-actions .btn{width:100%;min-width:0;padding:10px 8px;font-size:12px;white-space:normal;line-height:1.25}.expenses-register-heading .expense-month-controls:not(:has(a.btn))+.btn{grid-column:1/-1}.expense-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.expense-actions form,.expense-actions form .btn,.expense-actions>.btn{width:100%}}
@media(max-width:760px){.best-sellers-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:10px 8px}.best-sellers-toolbar>input[type=hidden]{display:none}.best-sellers-toolbar .best-sellers-search{grid-column:1/-1}.best-sellers-toolbar .product-filter,.best-sellers-toolbar .orders-page-size{width:auto;min-width:0;margin:0;flex-direction:column;align-items:stretch;gap:4px}.best-sellers-toolbar .product-filter .select,.best-sellers-toolbar .orders-page-size .select{width:100%;min-width:0}.best-sellers-toolbar>.btn{width:100%;min-width:0;padding-inline:8px}.best-sellers-toolbar>a.btn{grid-column:1/-1}}
/* Packs: casilla de la lista de productos, etiqueta del pack, barra «Crear pack» (fija abajo mientras hay marcados) y packs.php. */
.product-pack-check{display:inline-flex;align-items:center;margin-right:8px;vertical-align:middle;cursor:pointer}.product-pack-check input{width:17px;height:17px;accent-color:var(--accent)}
.products-table td[data-label="Producto"]{position:relative}.products-table td[data-label="Producto"]>.product-pack-check{float:left;margin-top:2px}
.product-pack-tag{display:inline-block;margin:4px 4px 0 0;padding:1px 8px;border-radius:999px;background:#eef3f8;color:#36536d;font-size:11px;font-weight:700;text-decoration:none}.product-pack-tag:hover{background:var(--accent-soft);color:var(--accent-ink)}
.product-pack-bar{position:sticky;z-index:30;bottom:14px;display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:14px 0;padding:10px 14px;border:1px solid var(--accent-border);border-radius:14px;background:#fff;box-shadow:0 14px 40px rgba(5,21,37,.18)}.product-pack-bar[hidden]{display:none}
.product-pack-summary{display:flex;align-items:center;gap:12px}.product-pack-clear{border:0;background:none;padding:0;font:inherit;font-size:13px;cursor:pointer}
.product-pack-create,.product-pack-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.product-pack-create .input{width:220px}
.pack-help{margin:0;color:var(--muted);font-size:14px}.pack-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}
.pack-description{margin:0 0 12px;padding:10px 14px;border-left:3px solid var(--accent);border-radius:0 10px 10px 0;background:var(--accent-softer);font-size:14px;line-height:1.5}.pack-description.is-empty{border-left-color:var(--line);background:none;color:var(--muted);font-size:13px}.pack-edit{margin:0 0 12px}.pack-edit>summary{cursor:pointer;color:var(--accent-ink);font-size:13px;font-weight:700}.pack-edit-form{margin-top:10px}.pack-edit-form textarea{min-height:100px;resize:vertical}.pack-zone-tag{display:inline-block;margin-left:4px;padding:2px 9px;border-radius:999px;background:#e3f4ef;color:#0f7a66;font-size:12px;font-weight:700;vertical-align:middle}.pack-zone-tag.is-off{background:#fdf1d8;color:#9a6408}.pack-help+.pack-help{margin-top:8px}.pack-card .card-heading{align-items:flex-start}.pack-heading-text{flex:1;min-width:0}.pack-image-thumb{flex:0 0 72px;width:72px;height:72px;margin-right:4px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff}.pack-image-thumb img{width:100%;height:100%;object-fit:cover}.pack-image-current{display:flex;align-items:center;gap:14px;margin-bottom:8px}.pack-image-current img{width:96px;height:96px;object-fit:cover;border:1px solid var(--line);border-radius:12px;background:#fff}.pack-warning{margin:0 0 12px}.pack-image-sizes{margin-top:8px}.pack-add{margin-top:12px}.pack-add>summary{cursor:pointer;color:var(--accent-ink);font-size:13px;font-weight:700}.pack-add-form{display:grid;gap:10px;margin-top:10px}.pack-add-results{list-style:none;margin:0;padding:0;display:grid;gap:6px}.pack-add-results:empty{display:none}.pack-add-results label{display:flex;align-items:center;gap:12px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;cursor:pointer}.pack-add-results label:has(input:checked){border-color:var(--accent);background:var(--accent-softer)}.pack-add-results input{flex:none;width:18px;height:18px;accent-color:var(--accent)}.pack-add-text{display:flex;flex-direction:column;gap:2px;min-width:0}.pack-add-text strong{color:var(--navy);font-size:14px}.pack-add-text small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}.pack-add-empty{margin:0;color:var(--muted);font-size:13px}.pack-add-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.pack-full{margin:12px 0 0}.pack-image-sizes ul{margin:6px 0 0;padding-left:18px}.pack-image-sizes li+li{margin-top:3px}.pack-items{list-style:none;margin:0;padding:0;display:grid;gap:8px}.pack-items li{display:flex;align-items:center;gap:12px;padding:8px 10px;border:1px solid var(--line);border-radius:12px}.pack-item-text{flex:1;min-width:0}
@media(max-width:760px){.product-pack-bar{bottom:72px;display:grid;grid-template-columns:minmax(0,1fr)}.product-pack-summary{justify-content:space-between}.product-pack-create .input,.product-pack-add .select{flex:1;width:auto;min-width:0}.products-table td[data-label="Producto"]>.product-pack-check{float:none;margin:0 0 6px}.pack-items li{flex-wrap:wrap}.pack-card .card-heading{flex-wrap:wrap;gap:10px}.pack-heading-text{flex:1 1 0}.pack-image-thumb{flex-basis:56px;width:56px;height:56px}.pack-actions{flex:1 1 100%}}

/* Aviso de catálogo caducado (render_header(), catalog_expired_date()) */
.catalog-expired-banner{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-bottom:18px;padding:12px 16px;border:1px solid #f1c4c4;border-radius:12px;background:var(--red-soft);color:#a83d3d;font-size:14px}.catalog-expired-banner span{flex:1 1 220px}.catalog-expired-banner .btn{margin-left:auto;background:#c94a4a;color:#fff}.catalog-expired-banner .btn:hover{background:#b23d3d}@media(max-width:760px){.catalog-expired-banner .btn{width:100%;margin-left:0}}
/* Ventana «¿Cómo te han pagado?» (assets/forma_pago.js). */
.payment-method-dialog{width:min(460px,calc(100vw - 32px))}
.payment-method-amount{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:12px;background:#e3f7f2}.payment-method-amount span{color:#53687b;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.4px}.payment-method-amount strong{color:#07846f;font:800 22px var(--font-title);letter-spacing:-.4px}
.payment-method-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:2px 0 0;padding:0;border:0;min-width:0}.payment-method-options legend{margin-bottom:8px;padding:0;color:var(--navy);font-weight:700;font-size:13px}
.payment-method-option{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:12px;border:2px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s,transform .1s,box-shadow .15s}
.payment-method-option:hover{border-color:var(--accent-border,var(--accent));transform:translateY(-1px)}
.payment-method-option input{position:absolute;opacity:0;pointer-events:none}
.payment-method-icon{grid-row:1/3;display:grid;width:40px;height:40px;place-items:center;border-radius:12px;background:var(--paper);font-size:21px;line-height:1}
.payment-method-name{color:var(--navy);font-weight:800;font-size:14px}
.payment-method-note{color:#7a8a99;font-size:12px}
.payment-method-option:has(input:checked){border-color:var(--accent);background:var(--accent-softer,var(--accent-soft));box-shadow:0 6px 18px rgba(5,21,37,.08)}
.payment-method-option:has(input:checked) .payment-method-icon{background:var(--accent);color:#fff}
.payment-method-option:has(input:checked)::after{content:'✓';position:absolute;top:8px;right:10px;color:var(--accent-ink);font-weight:800;font-size:13px}
.payment-method-option:has(input:focus-visible){outline:3px solid var(--accent-soft);outline-offset:2px}
.payment-method-error{color:var(--red);font-weight:700}
@media(max-width:380px){.payment-method-options{grid-template-columns:minmax(0,1fr)}}
/* Precio del pack en packs.php (precio propio, precio de antes, suma por separado y «↻ Precio de la web»). */
.pack-price{display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;margin:0 0 12px;padding:10px 14px;border:1px solid var(--line);border-radius:12px}.pack-price-main{color:var(--navy);font-size:14px}.pack-price-main strong{font-size:17px}.pack-price-main s{margin-left:4px;color:var(--muted);font-size:13px}.pack-price-detail{flex:1 1 220px;color:var(--muted);font-size:13px}.pack-price-web{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px}
/* packs.php: cada pack es un desplegable (fila con foto, nombre, etiquetas y precio; al abrirlo, todo el pack). */
.pack-list-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin:0 0 10px;color:var(--muted);font-size:13px}
details.pack-card{padding:0}details.pack-card+details.pack-card{margin-top:10px}
.pack-summary{display:flex;align-items:center;gap:14px;padding:12px 16px;cursor:pointer;list-style:none}.pack-summary::-webkit-details-marker{display:none}.pack-summary:hover{background:var(--accent-softer)}details.pack-card[open]>.pack-summary{border-bottom:1px solid var(--line)}
.pack-summary .pack-image-thumb{flex:0 0 52px;width:52px;height:52px;margin:0;border-radius:10px}.pack-image-empty{display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:22px}
.pack-summary-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pack-summary-name{color:var(--navy);font:700 15px var(--font-title);overflow-wrap:anywhere}.pack-summary-meta{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.pack-summary-meta .pack-zone-tag{margin-left:0}.pack-summary-warning{display:inline-block;padding:2px 9px;border-radius:999px;background:#fdf1d8;color:#9a6408;font-size:12px;font-weight:700}
.pack-summary-price{flex:none;display:flex;flex-direction:column;align-items:flex-end;text-align:right}.pack-summary-price strong{color:var(--navy);font-size:17px}.pack-summary-price s{color:var(--muted);font-size:12px}.pack-summary-price small{color:var(--muted);font-size:11px}
.pack-summary-chevron{flex:none;width:9px;height:9px;margin:0 2px 4px 4px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .15s}details.pack-card[open] .pack-summary-chevron{margin-bottom:0;margin-top:4px;transform:rotate(-135deg)}
.pack-body{padding:14px 16px 16px}.pack-body-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
@media(max-width:760px){.pack-summary{flex-wrap:wrap;gap:10px;padding:12px}.pack-summary .pack-image-thumb{flex-basis:44px;width:44px;height:44px}.pack-summary-text{flex:1 1 calc(100% - 80px)}.pack-summary-price{flex:1 1 auto;flex-direction:row;align-items:baseline;justify-content:flex-start;gap:6px;padding-left:54px;text-align:left}.pack-summary-chevron{position:absolute;right:16px;top:20px}.pack-summary{position:relative;padding-right:36px}.pack-body{padding:12px}.pack-body-heading .pack-actions{flex:1 1 100%}}
.pack-url-tag{display:inline-flex;align-items:center;padding:1px 7px;border-radius:999px;background:#e3f4ef;font-size:11px;line-height:18px}.pack-url-tag.is-missing{background:#eef1f4;color:var(--muted);font-weight:700}
/* packs.php: el pack desplegado se enmarca en ámbar con más margen, como los pedidos conjuntos abiertos de pedidos.php. */
details.pack-card[open]{margin:18px 0;border:3px solid #e0a93b;box-shadow:0 10px 28px rgba(154,100,8,.14)}details.pack-card[open]:first-of-type{margin-top:0}
details.pack-card[open]>.pack-summary{background:#fdf1d8;border-bottom-color:#efd39a}details.pack-card[open]>.pack-summary:hover{background:#fbe8c2}
details.pack-card[open] .pack-summary-chevron{border-color:#9a6408}
@media(max-width:760px){details.pack-card[open]{margin:14px 0}}
details.pack-card+details.pack-card[open],details.pack-card[open]+details.pack-card{margin-top:18px}@media(max-width:760px){details.pack-card+details.pack-card[open],details.pack-card[open]+details.pack-card{margin-top:14px}}
.pack-create{margin-top:12px}.pack-create>summary{list-style:none;display:inline-flex}.pack-create>summary::-webkit-details-marker{display:none}.pack-create[open]>summary{margin-bottom:2px}.pack-create .pack-add-form{padding:14px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-softer)}.pack-create .pack-add-results label{background:#fff}
.app-dialog-success .app-dialog-icon{background:#e3f4ef;color:#0f7a66}
.page-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.page-help-btn,.help-tip{display:inline-grid;place-items:center;flex:none;padding:0;border:1px solid var(--accent-border);border-radius:50%;background:var(--accent-soft);color:var(--accent-ink);font:800 15px var(--font-title);letter-spacing:0;text-transform:none;cursor:pointer;transition:.15s}.page-help-btn{width:28px;height:28px}.page-help-btn:hover,.help-tip:hover,.help-tip[aria-expanded="true"]{background:var(--accent);border-color:var(--accent);color:#fff}.page-help-btn:focus-visible,.help-tip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.help-tip{width:17px;height:17px;margin-left:5px;font:italic 700 11px Georgia,serif;vertical-align:1px}.help-tip-pop{position:absolute;z-index:60;max-width:min(280px,calc(100vw - 16px));padding:10px 12px;border-radius:10px;background:var(--navy);color:#fff;font-size:12px;line-height:1.45;box-shadow:0 10px 28px rgba(6,24,40,.25)}.page-help-dialog .app-dialog-actions .btn{text-decoration:none}
@media print{.page-help-btn,.help-tip,.help-tip-pop{display:none!important}}
/* Productos: ver y eliminar categorías sin productos (formulario de la ficha). */
.product-categories{padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--accent-softer)}.product-categories summary{cursor:pointer;color:var(--navy);font-size:13px;font-weight:700}.product-categories .hint{display:block;margin:8px 0}.product-categories-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}.product-categories-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:38px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:13px}.product-categories-list li>span{min-width:0;overflow-wrap:anywhere}.product-categories-list .sub-cell{display:inline;margin-left:4px}
/* Variantes de producto (otro color, tono o tamaño, cada una con su código): productos.php y la tienda del portal */
.variant-swatch{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px rgba(0,0,0,.18);vertical-align:-1px;flex:none}
.product-variant-tag{display:inline-flex;align-items:center;gap:5px;margin:4px 4px 0 0;padding:1px 8px;border-radius:999px;background:#f4eefa;color:#5b3f78;font-size:11px;font-weight:700;text-decoration:none}.product-variant-tag:hover{background:var(--accent-soft);color:var(--accent-ink)}
.product-variants{border:1px solid var(--line,#e5e9ef);border-radius:12px;padding:12px 14px;background:#fbfaff}
.product-variants-title{margin:0 0 8px;font-size:14px}.product-variants-title .hint{display:block;font-weight:400;margin-top:2px}
.product-variant-list{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.product-variant-list li{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--line,#e5e9ef);border-radius:999px;background:#fff;font-size:13px;min-width:0}
.product-variant-list li.is-current{border-color:var(--accent);background:var(--accent-soft)}
.product-variant-list .sub-cell{margin:0}
.product-variant-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:10px}
.product-variant-color input[type=color]{width:56px;height:36px;padding:2px;border:1px solid var(--line,#e5e9ef);border-radius:8px;background:#fff;cursor:pointer}.product-variant-color input[type=color]:disabled{opacity:.4;cursor:not-allowed}
.product-variant-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.product-variant-leave{font-size:13px}
.product-variant-join{display:flex;align-items:center}
@media (max-width:760px){.product-variant-fields{grid-template-columns:1fr}}

.top-actions{display:flex;align-items:center;gap:14px;flex:none}.account-dropdown{position:relative;flex:none}.account-dropdown>summary{list-style:none}.account-dropdown>summary::-webkit-details-marker{display:none}.account-trigger{display:flex;align-items:center;gap:8px;min-height:39px;padding:5px 10px 5px 6px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.06);color:#e3edf4;cursor:pointer;user-select:none;transition:background .15s,border-color .15s}.account-trigger:hover,.account-dropdown[open] .account-trigger{background:rgba(255,255,255,.13);border-color:rgba(255,255,255,.3)}.account-avatar{display:grid;width:27px;height:27px;place-items:center;border-radius:9px;background:linear-gradient(140deg,var(--accent-bright),var(--accent-strong));color:#fff;font-size:16px}.account-trigger-name{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:700}.account-chevron{color:#98b5c3;font-size:16px;line-height:1;transition:transform .15s}.account-dropdown[open] .account-chevron{transform:rotate(180deg)}.account-menu{position:absolute;top:calc(100% + 10px);right:0;z-index:30;width:260px;padding:8px;border:1px solid #e1e9ee;border-radius:15px;background:#fff;box-shadow:0 18px 42px rgba(6,24,40,.22);color:var(--ink)}.account-menu-heading{display:grid;gap:4px;padding:11px 12px 13px;border-bottom:1px solid #edf1f4}.account-menu-heading small{color:#8b9aa7;font-size:9px;font-weight:700;letter-spacing:.8px}.account-menu-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--navy);font-size:13px}.account-menu-link{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:10px}.account-menu-link:hover{background:var(--accent-softer)}.account-menu-icon{display:grid;width:31px;height:31px;flex:none;place-items:center;border-radius:10px;background:var(--accent-soft);color:var(--accent-ink);font-size:16px;font-weight:800}.account-menu-link>span:last-child{display:grid;gap:2px}.account-menu-link strong{color:var(--navy);font-size:12px}.account-menu-link small{color:var(--muted);font-size:10px}.account-logout-form{margin-top:5px;padding-top:5px;border-top:1px solid #edf1f4}.account-menu-logout{display:flex;width:100%;align-items:center;gap:10px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:#ad4c4c;font-size:12px;font-weight:700;text-align:left;cursor:pointer}.account-menu-logout:hover{background:#fff1f0}.account-menu-logout span{width:20px;text-align:center;font-size:16px}
.stats-grid{grid-template-columns:repeat(auto-fit,minmax(205px,1fr))}
.badge-cerrado{background:var(--blue-soft);color:var(--blue)}
.auth-body{min-height:100vh;background:radial-gradient(circle at 50% 0,var(--accent-soft) 0,#f5f8fa 45%,#eef3f6 100%)}.auth-wrap{width:min(430px,100%);min-height:100vh;margin:auto;padding:28px 18px;display:flex;flex-direction:column;justify-content:center}.auth-brand{align-self:center;margin-bottom:22px;color:var(--navy)}.auth-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:clamp(22px,6vw,34px);box-shadow:0 18px 55px rgba(18,47,74,.1)}.auth-card h1{font:800 29px var(--font-title);letter-spacing:-1px;color:var(--navy);margin:0}.auth-intro{font-size:13px;color:var(--muted);line-height:1.6;margin:8px 0 22px}.auth-submit{width:100%;margin-top:21px;padding:13px}.auth-foot{text-align:center;color:#8d9aa6;font-size:10px;border-top:1px solid var(--line);padding-top:15px;margin-top:21px}
@media(max-width:760px){.top-actions{grid-column:2;grid-row:1;gap:8px}.top-actions .top-profit{border-left:0;padding:0;gap:8px}.account-trigger{min-height:35px;gap:6px;padding:4px 7px 4px 4px}.account-avatar{width:25px;height:25px}.account-trigger-name{max-width:76px;font-size:11px}.account-menu{top:calc(100% + 8px);width:min(260px,calc(100vw - 24px))}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media (min-width: 761px) and (max-width: 1500px) {
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 18px;
        padding: 12px 24px 0;
        min-height: unset;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
    }

    .top-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: stretch;
        flex-wrap: wrap;
        overflow: visible;
        gap: 3px;
        padding-bottom: 10px;
    }

    .main-nav .nav-link {
        padding: 9px 10px;
    }
}
/* Aviso de mensajes sin leer sobre «Mensajes» en el menú superior. */
.nav-link{position:relative}.nav-badge{position:absolute;top:1px;right:1px;min-width:17px;height:17px;padding:0 4px;border:2px solid var(--navy);border-radius:999px;background:#d64545;color:#fff;font:700 9px/13px var(--font-body);text-align:center}
.auth-remember{display:flex;align-items:flex-start;gap:9px;margin-top:15px;color:#53687b;font-size:13px;font-weight:600;cursor:pointer;line-height:1.4}.auth-remember input{width:17px;height:17px;margin:1px 0 0;flex:none;accent-color:var(--accent)}.auth-remember small{display:block;color:var(--muted);font-size:11px;font-weight:500}
/* Menú principal: en el móvil, barra fija abajo con icono y nombre corto (desliza si no cabe), como el portal de clientes */
.nav-svg,.nav-short{display:none}
@media(max-width:760px){
.topbar{position:sticky;top:0;z-index:30;padding:10px 16px}
html{scroll-padding-top:72px}
body{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
.main-nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;gap:2px;margin:0;padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:var(--navy);box-shadow:0 -4px 18px rgba(5,21,37,.18);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.nav-link{flex:1 0 68px;min-width:68px;flex-direction:column;justify-content:center;gap:3px;padding:6px 2px;border-radius:12px;font-size:10px;font-weight:700;line-height:1.1;scroll-snap-align:start}
.nav-link.active{box-shadow:none;background:rgba(255,255,255,.13);color:#fff}
.nav-icon{display:none}
.nav-svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-full{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.nav-short{display:block}
.nav-badge{top:2px;right:auto;left:calc(50% + 5px)}
.account-menu{max-height:calc(100vh - 140px - env(safe-area-inset-bottom));max-height:calc(100dvh - 140px - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}
}

