:root{--bg:#f3f3f5;--card:#fff;--text:#293355;--muted:#7f86a6;--line:#ececf4;--primary:#6d3cff;--primary2:#18b99a;--rail:#fff;--menu:#fff;--shadow:0 18px 50px rgba(30,35,60,.07)}
html[data-theme="dark"]{--bg:#12131a;--card:#1d2030;--text:#f5f6ff;--muted:#a7accb;--line:#303346;--rail:#181a26;--menu:#181a26;--shadow:0 18px 50px rgba(0,0,0,.25)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);font-weight:600}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#29155c,#6d3cff 48%,#20d6b0)}.login-card{width:390px;max-width:92%;background:#fff;border-radius:28px;padding:36px;box-shadow:0 30px 90px rgba(0,0,0,.35);text-align:center}.login-card img{width:110px;margin-bottom:12px}.login-card input{width:100%;padding:14px;border:1px solid #ddd;border-radius:14px;margin:8px 0}.btn{display:inline-flex;gap:7px;align-items:center;justify-content:center;padding:10px 15px;border:0;border-radius:8px;background:var(--primary);color:#fff;text-decoration:none;cursor:pointer;font-weight:800}.btn-sm{padding:7px 9px;font-size:12px}.btn-light{background:#f5f6fb;color:var(--text)}html[data-theme="dark"] .btn-light{background:#2a2d40;color:#fff}.btn-green{background:#18b99a}.btn-lime{background:#9ad83a;color:#254500}.btn-red{background:#ef5f6f}.btn-blue{background:#4b8cff}.btn-orange{background:#ffa23b;color:#5a3100}.btn-purple{background:#a174ff}.btn-icon{width:34px;height:34px;border-radius:50%;padding:0;background:#f4f5fb;color:#72809f;font-size:17px}html[data-theme="dark"] .btn-icon{background:#282c3e;color:#c6c9dd}.btn-icon:hover{background:var(--primary);color:#fff}.layout{display:flex;min-height:100vh}.sidebar{width:330px;display:flex;background:var(--menu);border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;z-index:100;box-shadow:8px 0 30px rgba(90,70,170,.04)}.icon-rail{width:82px;background:var(--rail);border-right:1px solid var(--line);padding:26px 14px;display:flex;flex-direction:column;gap:18px;align-items:center}.rail-icon{width:48px;height:48px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#8a8eaf;text-decoration:none;font-size:26px}.rail-icon.active,.rail-icon:hover{background:var(--primary);color:#fff}.menu-panel{flex:1;padding:24px 20px;overflow:auto}.brand{display:flex;align-items:center;gap:10px;margin-bottom:18px}.brand img{width:52px;height:52px;object-fit:contain;background:#fff;border-radius:14px;padding:5px}.brand strong{display:block;color:var(--text);letter-spacing:.12em}.brand small{color:var(--muted)}.nav a{display:flex;align-items:center;gap:14px;color:#8a8eaf;text-decoration:none;padding:14px 4px;border-radius:12px;margin:1px 0;text-transform:uppercase;font-weight:900;letter-spacing:-.02em;font-size:17px}.nav a span{width:26px;text-align:center;font-size:22px}.nav a:hover,.nav a.active{color:var(--primary)}.main{margin-left:330px;width:calc(100% - 330px)}.topbar{height:76px;background:var(--card);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.topbar strong{letter-spacing:.08em;text-transform:uppercase}.topbar small{color:var(--muted)}.top-actions{display:flex;gap:10px;align-items:center}.theme-toggle{height:42px;border:0;border-radius:999px;background:var(--primary);color:#fff;padding:0 15px;display:flex;gap:8px;align-items:center;font-weight:900;cursor:pointer}.theme-toggle i{font-size:20px}.content{padding:28px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.page-head h1{margin:0;text-transform:uppercase;letter-spacing:.08em;font-size:20px}.grid{display:grid;gap:16px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.status-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.card{background:var(--card);border-radius:0;padding:20px;box-shadow:none;border:1px solid var(--line)}.stat{min-height:118px;display:flex;align-items:center;justify-content:space-between;gap:16px}.stat-left{display:flex;align-items:center;gap:18px}.stat img{width:66px;height:66px;object-fit:contain}.stat .num{font-size:34px;font-weight:900;line-height:1;color:var(--text)}.stat small{display:block;text-transform:uppercase;letter-spacing:.14em;font-weight:900;color:var(--text);margin-top:8px}.stat-eye{width:46px;height:46px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px}.payment-summary{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.pay-box{background:var(--card);border:1px solid var(--line);padding:20px;display:flex;align-items:center;justify-content:space-between}.pay-box strong{font-size:32px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;background:var(--card)}.table th,.table td{border-bottom:1px solid var(--line);padding:17px 14px;text-align:left;vertical-align:middle}.table th{font-size:12px;text-transform:uppercase;color:#65728c;letter-spacing:.02em}.table td{color:#667792;font-size:14px}.order-num{font-weight:900;color:#65728c}.client-link{font-weight:900;color:#6d3cff;text-decoration:none}.item-list{margin:0;padding-left:18px}.badge{display:inline-flex;padding:6px 10px;border-radius:5px;font-size:12px;font-weight:900;white-space:nowrap}.status-ingresado{background:#ffd8a8;color:#944b00}.status-confirmado{background:#fff3bf;color:#8a6d00}.status-cocina{background:#e9d5ff;color:#6b21a8}.status-esperando{background:#bfdbfe;color:#1d4ed8}.status-reparto{background:#bbf7d0;color:#166534}.status-entregado{background:#d9f99d;color:#3f6212}.status-cancelado{background:#fecaca;color:#991b1b}.status-no-recibido{background:#e9c0cf;color:#7f1d3d}.status-gray{background:#e5e7eb;color:#374151}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-control,select,textarea{width:100%;padding:11px;border:1px solid #dbe0e8;border-radius:10px;background:var(--card);color:var(--text)}label{font-size:13px;font-weight:900;color:var(--text);margin-bottom:5px;display:block}.actions{display:flex;gap:8px;flex-wrap:wrap}.alert{padding:14px 16px;border-radius:14px;margin-bottom:14px}.alert-success{background:#dcfce7;color:#166534}.alert-danger{background:#fee2e2;color:#991b1b}.modal{position:fixed;inset:0;background:rgba(10,10,20,.55);z-index:500;display:none;align-items:center;justify-content:center;padding:20px}.modal.show{display:flex}.modal-card{background:var(--card);color:var(--text);width:760px;max-width:96vw;max-height:86vh;overflow:auto;border-radius:20px;padding:24px;box-shadow:0 40px 100px rgba(0,0,0,.35)}.modal-head{display:flex;justify-content:space-between;gap:15px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:18px}.close-x{border:0;background:#111827;color:#fff;width:36px;height:36px;border-radius:50%;cursor:pointer}.kitchen-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}.kitchen-card{border:2px solid #d8b4fe}.blink{animation:pulse 1s infinite}@keyframes pulse{50%{filter:brightness(1.12);transform:scale(1.02)}}.pagination-select{display:flex;align-items:center;gap:8px}.pagination-select select{width:auto}.mobile-menu{display:none}@media(max-width:1100px){.sidebar{width:260px}.icon-rail{display:none}.main{margin-left:260px;width:calc(100% - 260px)}.status-grid,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.sidebar{position:relative;width:100%;inset:auto}.layout{display:block}.main{margin-left:0;width:100%}.grid-4,.grid-3,.form-row,.status-grid,.payment-summary{grid-template-columns:1fr}.topbar{position:relative}.content{padding:14px}.table th,.table td{padding:12px 10px}.menu-panel{max-height:none}.nav a{font-size:15px}.card{padding:14px}}
/* Ajustes solicitados 2026-05-28 */
.status-reparto{background:#14532d!important;color:#fff!important;animation:pulse 1s infinite}
.status-entregado{background:#d9f99d!important;color:#365314!important}
.delivery-alert{background:#ef233c!important;color:#fff!important;box-shadow:0 0 0 0 rgba(239,35,60,.65)}
.delivery-alert i{color:#fff!important}
.delivery-alert:hover{background:#c1121f!important;color:#fff!important}


/* Ajustes finales órdenes/domicilios */
.delivery-alert{
  width:62px!important;height:62px!important;min-width:62px!important;border-radius:50%!important;
  background:#ef233c!important;color:#fff!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  font-size:31px!important;line-height:1!important;vertical-align:middle!important;box-shadow:0 0 0 0 rgba(239,35,60,.75)!important;
  animation:deliveryStrongPulse .72s infinite!important;
}
.delivery-alert i{display:block!important;color:#fff!important;margin:0!important;line-height:1!important;transform:none!important}
@keyframes deliveryStrongPulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,.8);filter:brightness(1)}
  50%{transform:scale(1.13);box-shadow:0 0 0 13px rgba(239,35,60,.18);filter:brightness(1.18)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,0);filter:brightness(1)}
}
.items-cell{min-width:150px}.items-cell .order-item-line{min-height:30px;display:flex;align-items:center;border-bottom:1px dashed rgba(102,119,146,.28);padding:4px 0}.items-cell .order-item-line:last-child{border-bottom:0}.qty-cell,.price-cell{text-align:left;white-space:nowrap}.table td.actions{min-width:360px}.status-reparto{background:#14532d!important;color:#fff!important;animation:pulse 1s infinite}.status-entregado{background:#d9f99d!important;color:#365314!important}

/* Ajuste 2026-05-28: alerta de pedido ingresado y barra esperando domiciliario */
.status-ingresado{
  animation:incomingOrderBlink .7s infinite!important;
  box-shadow:0 0 0 0 rgba(255,162,59,.65)!important;
}
@keyframes incomingOrderBlink{
  0%{filter:brightness(1);transform:scale(1);box-shadow:0 0 0 0 rgba(255,162,59,.72)}
  50%{filter:brightness(1.18);transform:scale(1.04);box-shadow:0 0 0 7px rgba(255,162,59,.18)}
  100%{filter:brightness(1);transform:scale(1);box-shadow:0 0 0 0 rgba(255,162,59,0)}
}
.delivery-alert{display:none!important}
.delivery-wait-bar{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-width:116px!important;height:34px!important;padding:0 12px!important;border-radius:999px!important;
  background:#ef233c!important;color:#fff!important;text-decoration:none!important;font-size:12px!important;font-weight:950!important;
  letter-spacing:.05em!important;vertical-align:middle!important;box-shadow:0 0 0 0 rgba(239,35,60,.75)!important;
  animation:waitBarPulse .55s infinite!important;
}
.delivery-wait-bar i{font-size:20px!important;color:#fff!important;line-height:1!important;margin:0!important;display:inline-flex!important;align-items:center!important}
.delivery-wait-bar span{line-height:1!important;color:#fff!important}
.delivery-wait-bar:hover{background:#c1121f!important;color:#fff!important}
@keyframes waitBarPulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,.75);filter:brightness(1)}
  50%{transform:scale(1.08);box-shadow:0 0 0 9px rgba(239,35,60,.16);filter:brightness(1.2)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,0);filter:brightness(1)}
}
.items-combo{min-width:430px!important}
.item-combo-line{
  display:grid!important;grid-template-columns:minmax(220px,1fr) 70px 120px!important;gap:16px!important;
  align-items:center!important;border-bottom:1px dashed rgba(102,119,146,.30)!important;padding:6px 0!important;line-height:1.25!important;
}
.item-combo-line:last-child{border-bottom:0!important}
.item-name{font-weight:800!important;color:#667792!important}.item-qty,.item-price{font-weight:800!important;color:#667792!important;white-space:nowrap!important}.item-price{text-align:left!important}


/* Ajuste final: orden diario, domicilio, productos con líneas y alertas */
.daily-order{display:flex;flex-direction:column;gap:2px;line-height:1.15;min-width:130px}
.daily-order strong{font-size:12px;letter-spacing:.12em;color:#243052}
.daily-order span{font-size:12px;color:#667792;font-weight:800}
.daily-order b{font-size:18px;color:#243052}
.daily-order em{font-style:normal;font-size:12px;color:#667792}
.status-ingresado{animation:incomingOrderBlinkStrong .55s infinite!important;box-shadow:0 0 0 0 rgba(255,149,43,.95)!important}
@keyframes incomingOrderBlinkStrong{0%{transform:scale(1);filter:brightness(1);box-shadow:0 0 0 0 rgba(255,149,43,.95)}50%{transform:scale(1.09);filter:brightness(1.24);box-shadow:0 0 0 10px rgba(255,149,43,.22)}100%{transform:scale(1);filter:brightness(1);box-shadow:0 0 0 0 rgba(255,149,43,0)}}
.delivery-wait-bar{height:34px!important;min-width:145px!important;border-radius:12px!important;background:#ef233c!important;padding:0 12px!important;gap:8px!important;animation:waitBarPulseStrong .48s infinite!important}
.delivery-wait-bar .wait-icon{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#ef233c!important;flex:0 0 24px}
.delivery-wait-bar .wait-icon i{font-size:17px!important;color:#ef233c!important}
.delivery-wait-bar span:last-child{font-size:12px!important;letter-spacing:.07em!important}
@keyframes waitBarPulseStrong{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,.95)}50%{transform:scale(1.10);box-shadow:0 0 0 12px rgba(239,35,60,.20)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,0)}}
.items-combo{min-width:520px!important}
.item-combo-line{grid-template-columns:minmax(260px,1fr) 70px 130px!important;border-bottom:1px dashed rgba(102,119,146,.24)!important;padding:7px 0!important}
.item-combo-line .item-name,.item-combo-line .item-qty,.item-combo-line .item-price{display:flex;align-items:center;min-height:24px}

/* Ajuste puntual: tabla de Órdenes responsive sin cortar botón ESPERANDO */
.table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.table{
  table-layout:fixed!important;
  min-width:1280px!important;
}
.table th,.table td{
  padding:14px 10px!important;
  vertical-align:middle!important;
}
.table th:nth-child(1),.table td:nth-child(1){width:125px!important;}
.table th:nth-child(2),.table td:nth-child(2){width:115px!important;}
.table th:nth-child(3),.table td:nth-child(3){width:235px!important;}
.table th:nth-child(4),.table td:nth-child(4){width:70px!important;text-align:center!important;}
.table th:nth-child(5),.table td:nth-child(5){width:125px!important;}
.table th:nth-child(6),.table td:nth-child(6){width:115px!important;}
.table th:nth-child(7),.table td:nth-child(7){width:115px!important;}
.table th:nth-child(8),.table td:nth-child(8){width:125px!important;}
.table th:nth-child(9),.table td:nth-child(9){width:160px!important;}
.table th:nth-child(10),.table td:nth-child(10){width:300px!important;}
.items-list-col,.qty-list-col,.price-list-col{vertical-align:top!important;}
.order-item-line{
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  border-bottom:1px dashed rgba(102,119,146,.24)!important;
  padding:5px 0!important;
  line-height:1.2!important;
}
.order-item-line:last-child{border-bottom:0!important;}
.qty-list-col .order-item-line{justify-content:center!important;}
.price-list-col .order-item-line{justify-content:flex-start!important;white-space:nowrap!important;}
.order-actions{
  min-width:300px!important;
  max-width:300px!important;
  overflow:visible!important;
  white-space:normal!important;
}
.order-action-icons{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  width:100%!important;
}
.order-actions .btn-icon{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  flex:0 0 34px!important;
}
.delivery-wait-bar{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:126px!important;
  min-width:126px!important;
  max-width:126px!important;
  height:32px!important;
  overflow:hidden!important;
  flex:0 0 126px!important;
  margin-left:2px!important;
}
.delivery-wait-bar span:last-child{
  white-space:nowrap!important;
  overflow:visible!important;
  font-size:11px!important;
}
.status-change-form{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  margin-top:8px!important;
  width:100%!important;
}
.status-change-form select{
  min-width:190px!important;
  flex:1 1 auto!important;
}
.status-change-form .btn{
  flex:0 0 auto!important;
}
@media(max-width:1500px){
  .table{min-width:1220px!important;}
  .table th,.table td{padding:12px 8px!important;font-size:13px!important;}
  .table th:nth-child(10),.table td:nth-child(10){width:286px!important;}
  .order-actions{min-width:286px!important;max-width:286px!important;}
  .delivery-wait-bar{width:118px!important;min-width:118px!important;max-width:118px!important;}
  .status-change-form select{min-width:170px!important;}
}

/* Ajuste puntual 2026-06-04: fecha por defecto, mostrar todo y alertas de acciones */
.payment-date-summary{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.pay-box-stack{display:grid!important;grid-template-columns:1fr 1fr;gap:18px;align-items:center}
.pay-box-stack>div{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
.date-box{display:block!important}.date-filter-form{display:grid;gap:8px}.date-filter-form input[type="date"]{height:42px}
.action-required{background:#6d3cff!important;color:#fff!important;animation:requiredActionPulse .9s infinite!important;box-shadow:0 0 0 0 rgba(109,60,255,.70)!important}
.action-required i{color:#fff!important}@keyframes requiredActionPulse{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(109,60,255,.70)}50%{transform:scale(1.08);box-shadow:0 0 0 8px rgba(109,60,255,.16)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(109,60,255,0)}}
@media(max-width:1100px){.payment-date-summary,.pay-box-stack{grid-template-columns:1fr!important}}

/* Ajuste resumen pagos/envíos */
.summary-4{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 22px;align-items:center}
.summary-4>div{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px dashed rgba(101,114,140,.18);padding:7px 0}
.summary-4 span{font-weight:900;color:var(--text)}
.summary-4 strong{font-size:28px}
@media(max-width:760px){.summary-4{grid-template-columns:1fr}.summary-4>div{padding:9px 0}}

/* Ajuste 2026-06-05: resumen de órdenes oculto/expandible */
.summary-collapsible{
  grid-column:1 / -1;
  margin-top:0;
}
.summary-collapsible details{
  background:var(--card);
  border:1px solid var(--line);
  padding:0;
}
.summary-collapsible summary{
  list-style:none;
  cursor:pointer;
  padding:14px 18px;
  font-weight:950;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.summary-collapsible summary::-webkit-details-marker{display:none}
.summary-collapsible details[open] summary{
  border-bottom:1px solid var(--line);
}
.summary-collapsible details[open] summary i{
  transform:rotate(180deg);
}
.summary-collapsible .payment-date-summary{
  padding:16px;
}

/* Ajuste cocina y domicilios */
.kitchen-filter-card,.delivery-filter-card{margin-top:12px}
.kitchen-filter-form{grid-template-columns:1fr 1fr auto!important;align-items:end}
.kitchen-filter-actions{align-items:end;flex-wrap:wrap}
.kitchen-card h2{margin-bottom:8px}
.kitchen-card-closed{border-color:#bfdbfe!important;opacity:.92}
.deliveries-table th:nth-child(4),.deliveries-table td:nth-child(4){min-width:220px!important}
.deliveries-table th:nth-child(8),.deliveries-table td:nth-child(8){width:90px!important;text-align:center!important}
.deliveries-table .btn-icon{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:1100px){
  .kitchen-filter-form{grid-template-columns:1fr!important}
}

/* Ajustes 2026-06-05 módulo domicilios/configuración */
.nav a[href="orders.php"]{text-transform:uppercase}
.deliveries-table{min-width:1180px!important;table-layout:fixed!important}
.deliveries-table th:nth-child(1),.deliveries-table td:nth-child(1){width:145px!important}
.deliveries-table th:nth-child(2),.deliveries-table td:nth-child(2){width:155px!important}
.deliveries-table th:nth-child(3),.deliveries-table td:nth-child(3){width:135px!important}
.deliveries-table th:nth-child(4),.deliveries-table td:nth-child(4){width:260px!important;min-width:260px!important;white-space:normal!important;line-height:1.2!important}
.deliveries-table th:nth-child(5),.deliveries-table td:nth-child(5){width:135px!important}
.deliveries-table th:nth-child(6),.deliveries-table td:nth-child(6){width:190px!important}
.deliveries-table th:nth-child(7),.deliveries-table td:nth-child(7){width:190px!important}
.deliveries-table th:nth-child(8),.deliveries-table td:nth-child(8){width:120px!important;text-align:center!important}
.delivery-action-cell{display:flex!important;gap:8px!important;align-items:center!important;justify-content:center!important}
.delivery-action-cell .btn-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-decoration:none!important}
.status-reparto{background:#14532d!important;color:#fff!important;animation:repartoBlink 1s infinite!important}
@keyframes repartoBlink{0%,100%{filter:brightness(1);box-shadow:0 0 0 0 rgba(20,83,45,.6)}50%{filter:brightness(1.22);box-shadow:0 0 0 7px rgba(20,83,45,.16)}}
.settings-grid .settings-card h2,.settings-card h2{text-transform:uppercase;letter-spacing:.09em;font-size:17px;margin-top:0;border-bottom:1px dashed var(--line);padding-bottom:14px}
.settings-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 30px;margin-top:16px}.switch-row{display:flex;align-items:center;gap:10px;font-size:16px;color:#667792}.switch-row input{width:38px;height:20px;accent-color:var(--primary)}.clear-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.danger-zone{border:1px solid #fecaca!important}.danger-zone h2{color:#991b1b}
@media(max-width:900px){.settings-options,.clear-grid{grid-template-columns:1fr}.deliveries-table{min-width:1100px!important}}

/* Módulo Productos estilo Metor: categorías superiores + listado editable */
.product-category-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:16px;
}
.category-card{
  background:var(--card);
  border:1px solid var(--line);
  padding:16px;
  min-height:132px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition:.18s ease;
}
.category-card:hover,.category-card.active{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
  border-color:rgba(109,60,255,.28);
}
.category-card-main{
  display:flex;
  align-items:center;
  gap:14px;
  cursor:pointer;
}
.category-card-main img{
  width:58px;
  height:58px;
  object-fit:contain;
  flex:0 0 58px;
}
.category-card-text{min-width:0;flex:1}
.category-card-text strong{
  display:block;
  color:var(--text);
  font-size:15px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.03em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.category-card-text p{
  margin:5px 0 6px;
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}
.category-card-text span{
  color:#16a34a;
  font-weight:900;
  font-size:12px;
}
.category-card-text span i{font-size:9px}
.category-eye{width:40px;height:40px;flex:0 0 40px;text-decoration:none}
.category-card-actions{
  border-top:1px dashed rgba(101,114,140,.18);
  margin-top:12px;
  padding-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.category-card-actions form{margin:0}
.mini-action{
  border:0;
  background:#f5f6fb;
  color:var(--text);
  padding:7px 10px;
  border-radius:8px;
  font-weight:900;
  cursor:pointer;
}
html[data-theme="dark"] .mini-action{background:#282c3e;color:#fff}
.mini-action:hover{background:var(--primary);color:#fff}
.mini-action.danger:hover{background:#ef4444;color:#fff}
.product-toolbar{margin-bottom:16px}
.product-filter-form{
  display:grid;
  grid-template-columns:300px 1fr auto;
  gap:14px;
  align-items:end;
}
.product-filter-actions{display:flex;gap:8px;align-items:center}
.product-list-card h2{margin:0;font-size:17px;text-transform:uppercase;letter-spacing:.08em}
.card-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.card-title-row small{color:var(--muted);font-weight:900}
.product-table-wrap{overflow:auto!important}
.product-list-table{
  min-width:1120px!important;
  table-layout:auto!important;
}
.product-list-table th,.product-list-table td{
  padding:13px 12px!important;
}
.product-list-table th:nth-child(1),.product-list-table td:nth-child(1){width:90px!important}
.product-list-table th:nth-child(2),.product-list-table td:nth-child(2){width:210px!important}
.product-list-table th:nth-child(3),.product-list-table td:nth-child(3){width:320px!important}
.product-list-table th:nth-child(4),.product-list-table td:nth-child(4){width:150px!important}
.product-list-table th:nth-child(5),.product-list-table td:nth-child(5){width:140px!important}
.product-list-table th:nth-child(6),.product-list-table td:nth-child(6){width:150px!important}
.product-list-table th:nth-child(7),.product-list-table td:nth-child(7){width:110px!important}
.product-list-table th:nth-child(8),.product-list-table td:nth-child(8){width:170px!important}
.product-photo{
  width:62px;
  height:62px;
  object-fit:contain;
  border-radius:12px;
  background:#f7f8fc;
  border:1px solid var(--line);
  padding:6px;
}
html[data-theme="dark"] .product-photo{background:#282c3e}
.product-desc{
  max-width:320px;
  color:#667792;
  line-height:1.35;
}
.product-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.product-actions form{margin:0;display:inline-flex}
.danger-icon:hover{background:#ef4444!important;color:#fff!important}
.switch-line{display:flex;gap:8px;align-items:center;margin-top:9px}
@media(max-width:1400px){
  .product-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1000px){
  .product-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .product-filter-form{grid-template-columns:1fr}
}
@media(max-width:640px){
  .product-category-grid{grid-template-columns:1fr}
  .category-card-main{align-items:flex-start}
}

/* Ajustes observaciones y bitácora de órdenes */
.items-list-col .order-item-line{display:flex;flex-direction:column;gap:2px;padding:4px 0;border-bottom:1px dashed rgba(101,114,140,.18)}
.items-list-col .order-item-line:last-child{border-bottom:0}
.item-note{display:block;color:#7a4d00;background:#fff7d6;border-radius:6px;padding:2px 6px;margin-top:2px;font-weight:800;line-height:1.25}
.general-note-row{margin-top:8px;padding-top:8px;border-top:1px dashed rgba(101,114,140,.35);font-weight:900;color:var(--text)}
.order-modal-detail h3{margin:12px 0 8px;font-size:18px}
.order-modal-detail .modal-table{margin-top:8px}
.general-note{background:#fff7d6;border-radius:10px;padding:10px 12px}
.timeline-log{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.log-entry{border-left:4px solid var(--primary);background:#f7f8fc;border-radius:10px;padding:10px 12px;line-height:1.45}
.client-log{border-left-color:#21bf9a}
.client-log pre{white-space:pre-wrap;margin:8px 0 0;font-family:inherit;font-size:13px;color:var(--text)}
html[data-theme="dark"] .log-entry{background:#262a3a}


/* Tomar pedido manual: estilo carta móvil + datos del cliente al lado */
.take-order-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px;align-items:start}.take-menu-panel{min-width:0}.take-category-tabs{display:flex;gap:8px;overflow:auto;background:var(--card);border:1px solid var(--line);padding:10px;margin-bottom:16px;position:sticky;top:76px;z-index:3}.take-tab{white-space:nowrap;text-decoration:none;color:var(--text);font-weight:950;border:1px solid var(--line);border-radius:999px;padding:8px 14px;background:var(--card);text-transform:uppercase}.take-tab.active,.take-tab:hover{background:var(--primary);color:#fff}.take-category{margin-bottom:22px}.take-category h2{text-transform:uppercase;letter-spacing:.08em;font-size:18px}.take-products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}.take-product-card{background:var(--card);border:1px solid var(--line);padding:14px;border-radius:18px;box-shadow:var(--shadow)}.take-product-top{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center}.take-product-top img{width:72px;height:72px;object-fit:contain;border-radius:18px;background:#fff1ed;padding:6px}.take-product-card h3{margin:0 0 4px;font-size:15px;line-height:1.1;color:var(--text)}.take-product-card p{margin:0;color:#65728c;font-size:12px;line-height:1.22;max-height:58px;overflow:auto}.take-price{font-weight:950;color:var(--primary);margin:8px 0}.mini-label{font-size:11px;margin-top:8px}.take-price-select{margin:6px 0 8px}.qty-control{display:flex;align-items:center;gap:8px;margin-top:10px}.qty-control button{width:32px;height:32px;border-radius:50%;border:0;background:var(--primary);color:#fff;font-size:20px;font-weight:900;cursor:pointer}.qty-control input{width:70px;text-align:center;border:1px solid var(--line);border-radius:10px;padding:8px;background:var(--card);color:var(--text);font-weight:900}.take-note{margin-top:10px}.take-checkout{position:sticky;top:86px;align-self:start}.take-checkout-card{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow);max-height:calc(100vh - 110px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-bottom:28px}.take-checkout-card::-webkit-scrollbar{width:8px}.take-checkout-card::-webkit-scrollbar-thumb{background:rgba(101,114,140,.35);border-radius:999px}.take-logo{display:block;width:92px;height:92px;object-fit:contain;margin:0 auto 10px;background:#fff;border-radius:22px;padding:6px}.take-checkout-card h2{text-align:center;margin:0 0 14px;font-size:26px}.manual-cart-empty,.manual-cart-list{background:#f7f8fc;border:1px dashed var(--line);border-radius:14px;padding:12px;margin-bottom:12px;color:#65728c}.manual-cart-line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px dashed rgba(101,114,140,.25);padding:7px 0}.manual-cart-line:last-child{border-bottom:0}.manual-total-row{display:flex;justify-content:space-between;align-items:center;font-size:18px;margin:12px 0 16px}.manual-total-row strong{font-size:24px}.btn-block{width:100%;margin-top:14px}.take-checkout label{margin-top:10px}.take-checkout textarea.form-control{min-height:96px;resize:vertical}.take-checkout .manual-cart-list{max-height:180px;overflow:auto}.take-checkout .btn-soft{margin-bottom:4px}@media(max-width:1180px){.take-order-layout{grid-template-columns:1fr}.take-checkout{position:relative;top:auto;order:-1}.take-category-tabs{top:0}}@media(max-width:640px){.take-products-grid{grid-template-columns:1fr}.take-product-card{border-radius:16px}.take-product-top{grid-template-columns:64px 1fr}.take-product-top img{width:64px;height:64px}.take-checkout-card{border-radius:20px;padding:16px}}

/* Ajustes Tomar Pedido: categorías con scroll correcto, botón agregar, borrador local */
.take-category{scroll-margin-top:160px}.take-add-btn{width:100%;margin-top:10px;padding:10px 12px;border-radius:12px;font-size:13px}.manual-cart-line small{display:block;margin-top:3px;color:#8a5a00;background:#fff3cd;border-radius:8px;padding:2px 6px;font-weight:800;width:max-content;max-width:100%}.btn-soft{background:#f1f3f8!important;color:var(--text)!important;border:1px solid var(--line)!important}.btn-soft:hover{filter:brightness(.96)}
@media(max-width:1180px){.take-category{scroll-margin-top:90px}}
.manual-cart-line{align-items:flex-start;position:relative;padding-right:30px}
.manual-cart-line .manual-remove-line{position:absolute;right:0;top:8px;width:22px;height:22px;border:0;border-radius:50%;background:#ffeef0;color:#c4121a;font-weight:900;line-height:20px;cursor:pointer}
.manual-cart-line .manual-remove-line:hover{background:#c4121a;color:#fff}

/* Motivo visible para pedidos no entregados */
.no-delivery-reason{margin-top:6px;font-size:12px;font-weight:900;line-height:1.25;color:#8b1e3f;background:#ffe5ee;border:1px solid rgba(139,30,63,.18);border-radius:8px;padding:5px 7px;max-width:190px}
.deliveries-table .no-delivery-reason{max-width:230px}
html[data-theme="dark"] .no-delivery-reason{background:rgba(139,30,63,.22);color:#ffb3c8;border-color:rgba(255,179,200,.25)}

/* Ajuste profesional del listado de productos */
.product-list-card .product-table-wrap{
  overflow-x:auto!important;
}
.product-list-table{
  width:100%!important;
  min-width:1240px!important;
  table-layout:fixed!important;
}
.product-list-table col.col-drag{width:42px!important;}
.product-list-table col.col-foto{width:86px!important;}
.product-list-table col.col-producto{width:190px!important;}
.product-list-table col.col-descripcion{width:360px!important;}
.product-list-table col.col-categoria{width:120px!important;}
.product-list-table col.col-precio{width:115px!important;}
.product-list-table col.col-presentacion{width:125px!important;}
.product-list-table col.col-estado{width:100px!important;}
.product-list-table col.col-accion{width:178px!important;}
.product-list-table th,
.product-list-table td{
  padding:16px 10px!important;
  vertical-align:middle!important;
}
.product-list-table th:nth-child(1),.product-list-table td:nth-child(1),
.product-list-table th:nth-child(2),.product-list-table td:nth-child(2),
.product-list-table th:nth-child(3),.product-list-table td:nth-child(3),
.product-list-table th:nth-child(4),.product-list-table td:nth-child(4),
.product-list-table th:nth-child(5),.product-list-table td:nth-child(5),
.product-list-table th:nth-child(6),.product-list-table td:nth-child(6),
.product-list-table th:nth-child(7),.product-list-table td:nth-child(7),
.product-list-table th:nth-child(8),.product-list-table td:nth-child(8),
.product-list-table th:nth-child(9),.product-list-table td:nth-child(9){
  width:auto!important;
}
.product-list-table td:nth-child(3) strong{
  display:block;
  line-height:1.25;
}
.product-list-table td.product-desc,
.product-list-table .product-desc{
  max-width:none!important;
  white-space:normal!important;
  line-height:1.38!important;
  text-align:left!important;
}
.product-list-table td:nth-child(5),
.product-list-table td:nth-child(6),
.product-list-table td:nth-child(7),
.product-list-table td:nth-child(8){
  white-space:normal!important;
}
.product-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  min-width:152px!important;
}
.product-actions form{
  margin:0!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
}
.product-actions .btn-icon{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  flex:0 0 34px!important;
}
@media(max-width:1500px){
  .product-list-table{min-width:1180px!important;}
  .product-list-table col.col-descripcion{width:330px!important;}
  .product-list-table col.col-producto{width:180px!important;}
  .product-list-table col.col-accion{width:172px!important;}
}

/* Ajuste elegante específico módulo ORDENES - 2026-06-06 */
.orders-card-modern{
  padding:18px!important;
  border:1px solid rgba(101,114,140,.16)!important;
  background:var(--card)!important;
}
.orders-table-modern{
  table-layout:fixed!important;
  min-width:1380px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.orders-table-modern th{
  text-align:center!important;
  vertical-align:middle!important;
  padding:16px 10px!important;
  color:#65728c!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.045em!important;
  line-height:1.15!important;
  white-space:normal!important;
}
.orders-table-modern td{
  padding:20px 12px!important;
  vertical-align:middle!important;
  border-bottom:2px solid rgba(101,114,140,.18)!important;
  color:#667792!important;
  font-size:14px!important;
  line-height:1.25!important;
}
.orders-table-modern tbody tr:hover td{
  background:rgba(109,60,255,.025)!important;
}
.orders-table-modern th:nth-child(1),.orders-table-modern td:nth-child(1){width:118px!important;}
.orders-table-modern th:nth-child(2),.orders-table-modern td:nth-child(2){width:112px!important;}
.orders-table-modern th:nth-child(3),.orders-table-modern td:nth-child(3){width:270px!important;}
.orders-table-modern th:nth-child(4),.orders-table-modern td:nth-child(4){width:72px!important;text-align:center!important;}
.orders-table-modern th:nth-child(5),.orders-table-modern td:nth-child(5){width:110px!important;}
.orders-table-modern th:nth-child(6),.orders-table-modern td:nth-child(6){width:120px!important;}
.orders-table-modern th:nth-child(7),.orders-table-modern td:nth-child(7){width:130px!important;}
.orders-table-modern th:nth-child(8),.orders-table-modern td:nth-child(8){width:190px!important;}
.orders-table-modern th:nth-child(9),.orders-table-modern td:nth-child(9){width:155px!important;text-align:center!important;}
.orders-table-modern th:nth-child(10),.orders-table-modern td:nth-child(10){width:305px!important;}
.orders-table-modern th:nth-child(8){white-space:nowrap!important;}
.orders-date-clean{
  min-width:0!important;
  gap:1px!important;
  line-height:1.08!important;
}
.orders-date-clean span{
  display:block!important;
  font-size:12px!important;
  color:#667792!important;
  font-weight:900!important;
}
.orders-date-clean b{
  display:block!important;
  margin-top:6px!important;
  font-size:24px!important;
  color:#243052!important;
  line-height:1!important;
}
.customer-clean{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  line-height:1.1!important;
  gap:2px!important;
}
.customer-clean .client-link,
.customer-clean strong{
  font-weight:950!important;
  color:#6d3cff!important;
  text-decoration:none!important;
  font-size:15px!important;
}
.customer-clean small{
  margin-top:3px!important;
  font-weight:850!important;
  color:#667792!important;
  letter-spacing:.01em!important;
}
.address-clean{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  line-height:1.14!important;
  color:#667792!important;
  font-weight:850!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
.address-clean strong{
  margin-top:5px!important;
  color:#243052!important;
  font-weight:950!important;
}
.items-list-col .order-item-line{
  align-items:flex-start!important;
  flex-direction:column!important;
  gap:3px!important;
}
.orders-table-modern .order-item-line{
  border-bottom:1px dashed rgba(101,114,140,.30)!important;
}
.orders-table-modern .general-note-row{
  margin-top:10px!important;
  padding-top:10px!important;
  border-top:1px dashed rgba(101,114,140,.32)!important;
  color:#243052!important;
  font-weight:900!important;
  line-height:1.22!important;
}
.orders-table-modern .order-actions{
  min-width:0!important;
  max-width:none!important;
  width:100%!important;
}
.orders-table-modern .order-action-icons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  overflow:visible!important;
}
.orders-table-modern .delivery-wait-bar{
  flex:0 0 130px!important;
  width:130px!important;
  min-width:130px!important;
  max-width:130px!important;
  height:34px!important;
  margin-left:2px!important;
}
.orders-table-modern .status-change-form{
  margin-top:10px!important;
  display:flex!important;
  width:100%!important;
  gap:8px!important;
}
.orders-table-modern .status-change-form select{
  min-width:0!important;
  width:100%!important;
  flex:1 1 auto!important;
  height:42px!important;
}
.orders-table-modern .status-change-form .btn{
  height:42px!important;
  min-width:44px!important;
  border-radius:10px!important;
}
@media(max-width:1500px){
  .orders-table-modern{min-width:1320px!important;}
  .orders-table-modern th:nth-child(3),.orders-table-modern td:nth-child(3){width:250px!important;}
  .orders-table-modern th:nth-child(8),.orders-table-modern td:nth-child(8){width:180px!important;}
  .orders-table-modern th:nth-child(10),.orders-table-modern td:nth-child(10){width:300px!important;}
  .orders-table-modern .delivery-wait-bar{flex-basis:126px!important;width:126px!important;min-width:126px!important;max-width:126px!important;}
}

/* Ajustes finos tabla Ordenes - fecha/hora, teléfono y estado en dos líneas */
.orders-date-clean em{
  display:block!important;
  margin-top:5px!important;
  font-style:normal!important;
  font-size:12px!important;
  font-weight:900!important;
  color:#667792!important;
  line-height:1!important;
  text-transform:lowercase!important;
}
.orders-table-modern .order-status-cell{
  text-align:center!important;
}
.orders-table-modern .order-status-cell .badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1.12!important;
  white-space:normal!important;
  min-height:30px!important;
  padding:7px 12px!important;
}
.orders-table-modern td{
  border-bottom-color:rgba(101,114,140,.28)!important;
}
.orders-table-modern tbody tr:not(:last-child) td{
  border-bottom-width:2px!important;
}


/* ===== Ajustes finales Ordenes + menú contraíble ===== */
.sidebar-collapse-btn{
  position:absolute!important;
  top:14px!important;
  right:12px!important;
  z-index:5!important;
  width:34px!important;
  height:34px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--card)!important;
  color:#8a8eaf!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
  box-shadow:0 8px 22px rgba(36,48,82,.08)!important;
}
.sidebar-collapse-btn:hover{background:var(--primary)!important;color:#fff!important;}
html.sidebar-collapsed .sidebar{width:82px!important;}
html.sidebar-collapsed .menu-panel{display:none!important;}
html.sidebar-collapsed .icon-rail{display:flex!important;border-right:0!important;}
html.sidebar-collapsed .main{margin-left:82px!important;width:calc(100% - 82px)!important;}
html.sidebar-collapsed .sidebar-collapse-btn{right:-17px!important;}
html.sidebar-collapsed .sidebar-collapse-btn i:before{content:"\ec56";}

.orders-table-modern th{
  text-align:center!important;
  vertical-align:middle!important;
}
.orders-table-modern th:nth-child(4),
.orders-table-modern td:nth-child(4),
.orders-table-modern th:nth-child(5),
.orders-table-modern td:nth-child(5){
  text-align:center!important;
}
.orders-table-modern td:nth-child(4) .order-item-line,
.orders-table-modern td:nth-child(5) .order-item-line{
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
.orders-table-modern th:nth-child(4),.orders-table-modern td:nth-child(4){width:58px!important;}
.orders-table-modern th:nth-child(5),.orders-table-modern td:nth-child(5){width:88px!important;}
.orders-table-modern th:nth-child(8){white-space:nowrap!important;}
.orders-table-modern .payment-method-cell>strong{
  display:block!important;
  font-weight:950!important;
  color:#667792!important;
  line-height:1.16!important;
}
.orders-table-modern .delivery-wait-bar{
  flex:0 0 108px!important;
  width:108px!important;
  min-width:108px!important;
  max-width:108px!important;
  height:34px!important;
  padding:0 14px!important;
  justify-content:center!important;
}
.orders-table-modern .delivery-wait-bar .wait-icon,
.orders-table-modern .delivery-wait-bar i{
  display:none!important;
}
.orders-table-modern .delivery-wait-bar span{
  letter-spacing:.08em!important;
  font-size:13px!important;
}
.orders-table-modern th:nth-child(10),.orders-table-modern td:nth-child(10){width:285px!important;}
@media(max-width:1100px){
  html.sidebar-collapsed .main{margin-left:0!important;width:100%!important;}
}

/* ===== Ajustes UI: Ordenes, Productos, WhatsApp y Cocina ===== */
.status-grid .stat-no-eye{
  justify-content:flex-start!important;
}
.status-grid .stat-no-eye .stat-left{
  width:100%!important;
}
.category-card .category-eye{display:none!important;}
.product-actions{justify-content:flex-start!important;gap:8px!important;flex-wrap:nowrap!important;}
.whatsapp-settings-card p{color:#667792;margin-top:0;margin-bottom:18px;}
.whatsapp-preview-box{align-self:end;}
.wa-number{
  min-height:44px;display:flex;align-items:center;gap:10px;
  padding:11px 14px;border:1px solid var(--line);border-radius:12px;
  background:#f7f8fc;color:#243052;font-weight:950;
}
.wa-number i{font-size:22px;color:#25d366;}

.kitchen-card{
  border:3px solid #b985ff!important;
  box-shadow:0 18px 40px rgba(109,60,255,.08)!important;
  max-width:390px!important;
}
.kitchen-card-label{
  display:inline-flex!important;
  font-size:12px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  color:#243052!important;
  margin-bottom:14px!important;
}
.kitchen-card h2{font-size:28px!important;margin:8px 0 14px!important;}
.kitchen-entry-time{font-size:14px!important;color:#243052!important;line-height:1.35!important;margin:8px 0 12px!important;}
.kitchen-entry-time b{font-weight:950!important;}
.kitchen-card p{font-size:16px!important;line-height:1.28!important;margin:14px 0!important;}
.kitchen-ready-btn{
  width:100%!important;
  min-height:46px!important;
  border-radius:12px!important;
  background:var(--primary)!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:950!important;
  margin-top:16px!important;
}
.kitchen-single-label{
  margin:14px 0 8px!important;
  padding:10px 14px!important;
  border-radius:12px!important;
  background:#f2ecff!important;
  color:#6d3cff!important;
  font-weight:950!important;
  text-align:center!important;
  letter-spacing:.06em!important;
}


/* Ajustes finales Tomar Pedido: carrito completo y editable */
.take-checkout .manual-cart-list.manual-cart-list-expanded{
    max-height:none !important;
    overflow:visible !important;
}
.manual-cart-line-editable{
    display:block !important;
    padding:10px 30px 10px 0 !important;
}
.manual-cart-main{display:grid;gap:8px;min-width:0}
.manual-cart-title{font-weight:900;color:var(--text);line-height:1.25;padding-right:8px}
.manual-cart-edit-row{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
.manual-cart-edit-row input{
    width:52px;
    height:30px;
    text-align:center;
    border:1px solid var(--line);
    border-radius:9px;
    font-weight:900;
    background:var(--card);
    color:var(--text);
}
.manual-cart-edit-row strong{margin-left:auto;white-space:nowrap;color:var(--text);font-weight:950}
.manual-cart-mini{
    width:28px;
    height:28px;
    border:0;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    font-weight:950;
    cursor:pointer;
    line-height:1;
}
.manual-cart-note-input{
    width:100%;
    border:1px solid var(--line);
    border-radius:10px;
    padding:8px 10px;
    font-size:12px;
    font-weight:800;
    background:var(--card);
    color:var(--text);
}
.manual-cart-note-input:focus{outline:2px solid rgba(108,60,255,.18);border-color:var(--primary)}

/* Cronómetro grande en comandas de cocina */
.kitchen-timer{
    margin:12px 0 14px !important;
    padding:14px 16px !important;
    border-radius:18px !important;
    background:linear-gradient(135deg, rgba(109,60,255,.12), rgba(109,60,255,.04)) !important;
    border:1px solid rgba(109,60,255,.22) !important;
    text-align:center !important;
}
.kitchen-timer-label{
    display:block !important;
    font-size:11px !important;
    font-weight:950 !important;
    letter-spacing:.16em !important;
    text-transform:uppercase !important;
    color:#6d3cff !important;
    margin-bottom:4px !important;
}
.kitchen-timer strong{
    display:block !important;
    font-size:38px !important;
    line-height:1 !important;
    font-weight:950 !important;
    letter-spacing:.04em !important;
    color:#243052 !important;
}
.kitchen-timer.timer-warning{
    background:linear-gradient(135deg, rgba(255,193,7,.20), rgba(255,193,7,.06)) !important;
    border-color:rgba(255,193,7,.35) !important;
}
.kitchen-timer.timer-warning .kitchen-timer-label,
.kitchen-timer.timer-warning strong{color:#9a6a00 !important;}
.kitchen-timer.timer-danger{
    background:linear-gradient(135deg, rgba(239,35,60,.16), rgba(239,35,60,.05)) !important;
    border-color:rgba(239,35,60,.35) !important;
}
.kitchen-timer.timer-danger .kitchen-timer-label,
.kitchen-timer.timer-danger strong{color:#b91c1c !important;}
html[data-theme="dark"] .kitchen-timer strong{color:#fff !important;}

/* Ajustes domicilios: acciones estilo Clientes + mapa de ruta */
.delivery-action-cell{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
}
.delivery-action-cell .btn-icon{
  width:38px!important;
  height:38px!important;
  border-radius:50%!important;
  background:#f4f5fb!important;
  color:#72809f!important;
  border:0!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-decoration:none!important;
  font-size:18px!important;
  transition:.18s ease!important;
}
.delivery-action-cell .btn-icon:hover{
  background:var(--primary)!important;
  color:#fff!important;
  transform:translateY(-1px);
}
.delivery-action-cell .btn-icon i{line-height:1!important;}

.delivery-map-title{
  margin-bottom:16px;
}
.delivery-map-title h2{
  margin:0 0 8px;
  font-size:22px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.delivery-map-title p{
  margin:4px 0;
  font-weight:800;
  color:var(--muted);
}
.route-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}
.route-map-frame-main{
  height:680px;
}
@media(max-width:900px){
  .route-map-frame-main{height:520px;}
}

.route-summary{
  display:grid;
  grid-template-columns:1fr 80px 1fr 80px 1fr;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
}
.route-point{
  min-height:118px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:14px;
  text-align:center;
}
html[data-theme="dark"] .route-point{background:#202436;}
.route-ico{font-size:32px;line-height:1;}
.route-point b{font-size:15px;text-transform:uppercase;letter-spacing:.08em;color:var(--text);}
.route-point small{font-size:12px;color:#657792;font-weight:800;line-height:1.25;}
.route-line{height:5px;border-radius:999px;background:repeating-linear-gradient(90deg,var(--primary) 0 16px, transparent 16px 26px);}
.route-map-frame{
  width:100%;
  height:520px;
  border:0;
  border-radius:18px;
  display:block;
  background:#eef2f7;
}
.route-map-frame.small{height:360px;margin-top:10px;}
.map-subtitle{font-size:18px;text-transform:uppercase;letter-spacing:.08em;margin:22px 0 10px;}
@media(max-width:900px){
  
.delivery-map-title{
  margin-bottom:16px;
}
.delivery-map-title h2{
  margin:0 0 8px;
  font-size:22px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.delivery-map-title p{
  margin:4px 0;
  font-weight:800;
  color:var(--muted);
}
.route-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}
.route-map-frame-main{
  height:680px;
}
@media(max-width:900px){
  .route-map-frame-main{height:520px;}
}

.route-summary{grid-template-columns:1fr;}
  .route-line{height:4px;width:100%;}
  .route-map-frame{height:430px;}
}

/* =========================================================
   AJUSTE FINAL DOMICILIOS: botones de acción iguales a CLIENTES
   Mantiene WhatsApp, Seguimiento GPS y Editar perfectamente redondos.
========================================================= */
.deliveries-table .delivery-action-cell{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:11px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
  white-space:nowrap!important;
}
.deliveries-table .delivery-action-cell > .btn-icon,
.deliveries-table .delivery-action-cell > button.btn-icon,
.deliveries-table .delivery-action-cell > a.btn-icon,
.deliveries-table .delivery-action-cell .rider-whatsapp-btn,
.deliveries-table .delivery-action-cell .rider-track-btn,
.deliveries-table .delivery-action-cell .rider-edit-btn{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  background:#f4f5fb!important;
  color:#72809f!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:none!important;
  vertical-align:middle!important;
  position:relative!important;
  cursor:pointer!important;
}
.deliveries-table .delivery-action-cell > .btn-icon:hover,
.deliveries-table .delivery-action-cell > button.btn-icon:hover,
.deliveries-table .delivery-action-cell > a.btn-icon:hover,
.deliveries-table .delivery-action-cell .rider-whatsapp-btn:hover,
.deliveries-table .delivery-action-cell .rider-track-btn:hover,
.deliveries-table .delivery-action-cell .rider-edit-btn:hover{
  background:var(--primary)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
}
.deliveries-table .delivery-action-cell .btn-icon i{
  font-size:17px!important;
  width:17px!important;
  height:17px!important;
  line-height:17px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
}

/* =========================================================
   PANEL MODERNO TAZ ANDES - estilo Metor
   ========================================================= */
.panel-hero{
  background:linear-gradient(135deg,rgba(109,60,255,.95),rgba(132,92,255,.88) 52%,rgba(24,185,154,.88));
  color:#fff;border-radius:28px;padding:28px 30px;margin-bottom:22px;display:flex;align-items:center;justify-content:space-between;gap:24px;box-shadow:0 26px 70px rgba(109,60,255,.18);overflow:hidden;position:relative
}
.panel-hero:before{content:"";position:absolute;right:-80px;top:-90px;width:250px;height:250px;border-radius:50%;background:rgba(255,255,255,.13)}
.panel-hero:after{content:"";position:absolute;right:120px;bottom:-70px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.10)}
.panel-hero>*{position:relative;z-index:1}.panel-kicker{display:inline-flex;background:rgba(255,255,255,.16);padding:7px 12px;border-radius:999px;font-size:12px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;margin-bottom:12px}.panel-hero h1{margin:0;font-size:34px;letter-spacing:-.03em;text-transform:uppercase}.panel-hero p{margin:8px 0 0;max-width:660px;color:rgba(255,255,255,.86);font-weight:700;line-height:1.5}.panel-hero-actions{display:flex;gap:10px;flex-wrap:wrap}.panel-action{height:46px;padding:0 18px;border-radius:999px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.24);color:#fff;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:950;white-space:nowrap}.panel-action.primary{background:#fff;color:#5632d8}.panel-action:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(0,0,0,.13)}
.dashboard-top-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.metric-card{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:20px;display:flex;align-items:center;gap:16px;text-decoration:none;color:var(--text);box-shadow:var(--shadow);min-height:122px;position:relative;overflow:hidden}.metric-card:after{content:"";position:absolute;right:-26px;bottom:-26px;width:92px;height:92px;border-radius:50%;background:rgba(109,60,255,.08)}.metric-card:hover{transform:translateY(-3px);box-shadow:0 24px 70px rgba(30,35,60,.10)}.metric-icon{width:60px;height:60px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:30px;color:#fff;flex:0 0 60px}.metric-card.revenue .metric-icon{background:linear-gradient(135deg,#18b99a,#27d9b7)}.metric-card.orders .metric-icon{background:linear-gradient(135deg,#6d3cff,#9d7cff)}.metric-card.customers .metric-icon{background:linear-gradient(135deg,#ff9f43,#ffcc80)}.metric-card.products .metric-icon{background:linear-gradient(135deg,#ef476f,#ff85a1)}.metric-info span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:950}.metric-info strong{display:block;font-size:27px;line-height:1.05;margin:6px 0 5px;color:var(--text);font-weight:1000}.metric-info small{color:var(--muted);font-weight:800}
.dashboard-section-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px;margin-bottom:18px}.dashboard-card{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow)}.dash-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.dash-card-head h2{margin:0;font-size:19px;text-transform:uppercase;letter-spacing:.02em;color:var(--text)}.dash-card-head p{margin:5px 0 0;color:var(--muted);font-size:13px}.dash-card-head a{color:var(--primary);font-weight:950;text-decoration:none;white-space:nowrap}.dash-card-head.compact{margin-bottom:14px}.status-modern-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.status-modern{display:flex;align-items:center;gap:12px;padding:14px;border-radius:18px;background:#f8f8fc;color:var(--text);text-decoration:none;border:1px solid rgba(100,110,150,.09)}html[data-theme="dark"] .status-modern{background:#24283a}.status-modern-icon{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:rgba(109,60,255,.10);color:var(--primary);font-size:22px}.status-modern b{display:block;font-size:24px;line-height:1;color:var(--text)}.status-modern small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-top:5px;font-weight:950}.status-modern.status-ingresado,.status-modern.status-pedido_manual{background:#fff4e6}.status-modern.status-cocina{background:#f3e8ff}.status-modern.status-reparto{background:#dcfce7}.status-modern.status-no_entregado{background:#ffe4ec}.status-modern.status-cancelado{background:#fee2e2}html[data-theme="dark"] .status-modern.status-ingresado,html[data-theme="dark"] .status-modern.status-pedido_manual,html[data-theme="dark"] .status-modern.status-cocina,html[data-theme="dark"] .status-modern.status-reparto,html[data-theme="dark"] .status-modern.status-no_entregado,html[data-theme="dark"] .status-modern.status-cancelado{background:#252839}.operation-bars{margin-top:18px;display:grid;gap:12px}.operation-bars div{position:relative;background:#eef0f8;border-radius:999px;height:32px;overflow:hidden;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:12px;color:#47516d;font-weight:950}html[data-theme="dark"] .operation-bars div{background:#2b3045}.operation-bars i{position:absolute;left:0;top:0;bottom:0;background:rgba(24,185,154,.30);border-radius:999px}.operation-bars i.danger{background:rgba(239,71,111,.25)}.operation-bars span,.operation-bars b{position:relative;z-index:1}.payment-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.payment-mini-grid div{background:#f7f8fc;border:1px solid var(--line);border-radius:18px;padding:14px;display:grid;gap:4px}html[data-theme="dark"] .payment-mini-grid div{background:#24283a}.payment-mini-grid i{font-size:24px;color:var(--primary)}.payment-mini-grid span{font-size:12px;color:var(--muted);font-weight:950;text-transform:uppercase}.payment-mini-grid strong{font-size:24px}.quick-module-list{margin-top:14px;display:grid;gap:10px}.quick-module-list a{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);padding:12px;border-radius:16px;background:#f8f8fc;border:1px solid var(--line)}html[data-theme="dark"] .quick-module-list a{background:#24283a}.quick-module-list i{font-size:22px;color:var(--primary)}.quick-module-list span{flex:1;color:var(--muted);font-weight:950}.quick-module-list b{font-size:20px}
.dashboard-main-grid{display:grid;grid-template-columns:1.55fr .95fr;gap:18px;margin-bottom:18px}.dashboard-main-grid.lower{grid-template-columns:1fr 1fr}.mini-table-wrap{overflow:auto}.mini-table{width:100%;border-collapse:separate;border-spacing:0 8px}.mini-table th{font-size:11px;text-transform:uppercase;color:var(--muted);text-align:left;padding:0 12px 4px}.mini-table td{background:#f8f8fc;padding:12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#64708e;font-size:13px}.mini-table td:first-child{border-left:1px solid var(--line);border-radius:14px 0 0 14px}.mini-table td:last-child{border-right:1px solid var(--line);border-radius:0 14px 14px 0}.mini-table td strong,.mini-table td b{color:var(--text)}.mini-table small{display:block;color:var(--muted);font-size:11px;margin-top:3px}html[data-theme="dark"] .mini-table td{background:#24283a}.empty-row{text-align:center!important;color:var(--muted)!important}.top-products-list,.ops-columns,.module-grid-mini{display:grid;gap:10px}.top-product-item{display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;background:#f8f8fc;border:1px solid var(--line)}html[data-theme="dark"] .top-product-item{background:#24283a}.top-product-item>span{width:38px;height:38px;border-radius:13px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:1000}.top-product-item strong{display:block;color:var(--text)}.top-product-item small{color:var(--muted);font-weight:800}.empty-soft{padding:14px;border-radius:16px;background:#f8f8fc;border:1px dashed var(--line);color:var(--muted);font-weight:900;text-align:center}html[data-theme="dark"] .empty-soft{background:#24283a}.ops-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.ops-columns h3,.stock-warning-list h3{margin:0 0 10px;font-size:14px;text-transform:uppercase;color:var(--text);display:flex;gap:8px;align-items:center}.ops-item{display:flex;align-items:center;justify-content:space-between;gap:10px;text-decoration:none;background:#f8f8fc;border:1px solid var(--line);border-radius:16px;padding:12px;color:var(--text);margin-bottom:8px}html[data-theme="dark"] .ops-item{background:#24283a}.ops-item span{color:var(--muted);font-size:12px;font-weight:800;text-align:right}.module-grid-mini{grid-template-columns:repeat(2,minmax(0,1fr))}.module-grid-mini a{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;text-decoration:none;color:var(--text);background:#f8f8fc;border:1px solid var(--line);border-radius:16px;padding:13px}.module-grid-mini i{font-size:24px;color:var(--primary)}.module-grid-mini span{font-size:12px;color:var(--muted);text-transform:uppercase;font-weight:950}.module-grid-mini b{grid-column:2;font-size:16px;white-space:nowrap}.stock-warning-list{margin-top:16px}.stock-warning-list div{display:flex;justify-content:space-between;gap:12px;border-top:1px dashed var(--line);padding:10px 0;color:var(--muted)}.stock-warning-list b{color:#ef476f}.side-card{min-width:0}
@media(max-width:1350px){.dashboard-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-section-grid,.dashboard-main-grid,.dashboard-main-grid.lower{grid-template-columns:1fr}.status-modern-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.panel-hero{flex-direction:column;align-items:flex-start;border-radius:20px}.panel-hero h1{font-size:26px}.dashboard-top-grid,.status-modern-grid,.payment-mini-grid,.ops-columns,.module-grid-mini{grid-template-columns:1fr}.dashboard-card{border-radius:18px;padding:16px}.metric-card{border-radius:18px}.mini-table{min-width:720px}.panel-hero-actions{width:100%}.panel-action{flex:1}}

/* =========================================================
   COCINA EN TIEMPO REAL / REINGRESOS
========================================================= */
.kitchen-card-topline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:10px!important;
}
.kitchen-card-topline .kitchen-card-label{
  margin:0!important;
}
.kitchen-reentry-toggle{
  appearance:none!important;
  border:0!important;
  border-radius:999px!important;
  padding:8px 12px!important;
  background:linear-gradient(135deg,#6d3cff,#8b5cf6)!important;
  color:#fff!important;
  font-weight:950!important;
  font-size:12px!important;
  letter-spacing:.02em!important;
  cursor:pointer!important;
  box-shadow:0 10px 24px rgba(109,60,255,.18)!important;
  white-space:nowrap!important;
}
.kitchen-reentry-toggle.is-open{
  background:#111827!important;
}
.kitchen-reentry-box{
  margin:12px 0 14px!important;
  padding:14px!important;
  border-radius:18px!important;
  background:#fff7ed!important;
  border:1px solid #fed7aa!important;
  color:#7c2d12!important;
  font-size:13px!important;
  line-height:1.45!important;
  overflow:hidden!important;
  transition:max-height .25s ease, opacity .2s ease, margin .2s ease, padding .2s ease!important;
}
.kitchen-reentry-box.is-collapsed{
  max-height:0!important;
  opacity:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  margin-top:0!important;
  margin-bottom:0!important;
  border-width:0!important;
  pointer-events:none!important;
}
.kitchen-reentry-box:not(.is-collapsed){
  max-height:1400px!important;
  opacity:1!important;
}
.kitchen-reentry-box>b{
  display:block!important;
  font-size:12px!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  margin-bottom:10px!important;
  color:#1f2a4d!important;
}
.kitchen-session-row{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:8px 0!important;
  padding:12px!important;
  border-radius:14px!important;
  background:#fff!important;
  border:1px solid rgba(109,60,255,.12)!important;
}
.kitchen-session-row>span{
  min-width:0!important;
  color:#1f2a4d!important;
  font-weight:950!important;
}
.kitchen-session-row em{
  display:inline-flex!important;
  margin-left:6px!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  background:#dcfce7!important;
  color:#047857!important;
  font-style:normal!important;
  font-size:11px!important;
  text-transform:uppercase!important;
}
.kitchen-session-row strong{
  font-weight:1000!important;
  color:#6d3cff!important;
  white-space:nowrap!important;
  font-size:18px!important;
}
.kitchen-session-row small{
  display:block!important;
  margin-top:6px!important;
  color:#7c86a6!important;
  font-weight:800!important;
}
.kitchen-session-total{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-top:10px!important;
  padding:12px!important;
  border-radius:14px!important;
  background:#ede9fe!important;
  color:#4c1d95!important;
  font-weight:1000!important;
}
.kitchen-session-total strong{
  font-size:22px!important;
  color:#4f24e8!important;
}
.kitchen-reentry-box>small{
  display:block!important;
  margin-top:10px!important;
  color:#9a3412!important;
  font-weight:900!important;
}
.kitchen-empty-card{
  grid-column:1 / -1!important;
  text-align:center!important;
}
html[data-theme="dark"] .kitchen-reentry-toggle.is-open{background:#0f172a!important;}
html[data-theme="dark"] .kitchen-reentry-box{
  background:#3b250e!important;
  border-color:#fb923c!important;
  color:#fed7aa!important;
}
html[data-theme="dark"] .kitchen-reentry-box>b{color:#fff!important;}
html[data-theme="dark"] .kitchen-session-row{background:#24283a!important;border-color:#3f4564!important;}
html[data-theme="dark"] .kitchen-session-row>span{color:#fff!important;}
html[data-theme="dark"] .kitchen-session-row small{color:#b8c0dd!important;}
html[data-theme="dark"] .kitchen-session-total{background:#312e81!important;color:#ddd6fe!important;}
html[data-theme="dark"] .kitchen-reentry-box>small{color:#fdba74!important;}
@media(max-width:767px){
  .kitchen-card-topline{margin-bottom:16px!important;}
  .kitchen-reentry-toggle{font-size:13px!important;padding:9px 13px!important;}
  .kitchen-session-row{padding:12px!important;}
}

/* Ajuste solicitado: en ORDENES el botón ESPERANDO DOMICILIARIO queda redondo como los demás botones de ACCIÓN */
.order-action-icons .delivery-wait-bar.delivery-wait-circle{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  max-width:34px!important;
  flex:0 0 34px!important;
  border-radius:50%!important;
  padding:0!important;
  margin-left:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#ef233c!important;
  color:#fff!important;
  text-decoration:none!important;
  overflow:visible!important;
  box-shadow:0 0 0 0 rgba(239,35,60,.78)!important;
  animation:deliveryCirclePulse .85s infinite!important;
}
.order-action-icons .delivery-wait-bar.delivery-wait-circle:hover{
  background:#c1121f!important;
  color:#fff!important;
}
.order-action-icons .delivery-wait-bar.delivery-wait-circle .wait-helmet{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  color:#fff!important;
  font-size:18px!important;
  line-height:1!important;
  transform-origin:center center!important;
  animation:deliveryHelmetSpin 1.25s linear infinite!important;
}
.order-action-icons .delivery-wait-bar.delivery-wait-circle span:last-child{
  font-size:18px!important;
  letter-spacing:0!important;
  white-space:normal!important;
}
@keyframes deliveryCirclePulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,.78);filter:brightness(1)}
  50%{transform:scale(1.08);box-shadow:0 0 0 7px rgba(239,35,60,.18);filter:brightness(1.16)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(239,35,60,0);filter:brightness(1)}
}
@keyframes deliveryHelmetSpin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}
@media(max-width:1500px){
  .order-action-icons .delivery-wait-bar.delivery-wait-circle{
    width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;flex:0 0 34px!important;
  }
}

/* =========================================================
   AJUSTE FINAL ORDENES: todos los botones de ACCION iguales
   a los circulos usados en CLIENTES / DOMICILIOS.
   Solo afecta la columna ACCION del modulo ORDENES.
========================================================= */
.orders-table-modern .order-action-icons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}

.orders-table-modern .order-action-icons .btn-icon,
.orders-table-modern .order-action-icons a.btn-icon,
.orders-table-modern .order-action-icons button.btn-icon{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  padding:0!important;
  margin:0!important;
  border:2px solid #3f3f46!important;
  background:#f4f5fb!important;
  color:#72809f!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:2px 3px 0 #000!important;
  vertical-align:middle!important;
  position:relative!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

.orders-table-modern .order-action-icons .btn-icon i,
.orders-table-modern .order-action-icons a.btn-icon i,
.orders-table-modern .order-action-icons button.btn-icon i{
  font-size:17px!important;
  line-height:1!important;
  width:17px!important;
  height:17px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.orders-table-modern .order-action-icons .btn-icon:hover,
.orders-table-modern .order-action-icons a.btn-icon:hover,
.orders-table-modern .order-action-icons button.btn-icon:hover{
  background:var(--primary)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
}

/* Boton rojo ESPERANDO DOMICILIARIO: circular, mismo tamaño, casco girando */
.orders-table-modern .order-action-icons .delivery-wait-bar.delivery-wait-circle,
.order-action-icons .delivery-wait-bar.delivery-wait-circle{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  padding:0!important;
  margin:0!important;
  border:2px solid #3f3f46!important;
  background:#ef233c!important;
  color:#fff!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:2px 3px 0 #000!important;
  overflow:visible!important;
  position:relative!important;
  animation:ordersWaitingPulse 1s infinite!important;
}

.orders-table-modern .order-action-icons .delivery-wait-bar.delivery-wait-circle:hover,
.order-action-icons .delivery-wait-bar.delivery-wait-circle:hover{
  background:#c1121f!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
}

.orders-table-modern .order-action-icons .delivery-wait-bar.delivery-wait-circle .wait-helmet,
.order-action-icons .delivery-wait-bar.delivery-wait-circle .wait-helmet{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  color:#fff!important;
  font-size:17px!important;
  line-height:1!important;
  transform-origin:center center!important;
  animation:ordersHelmetSpin 1.15s linear infinite!important;
}

@keyframes ordersWaitingPulse{
  0%{filter:brightness(1);}
  50%{filter:brightness(1.22);}
  100%{filter:brightness(1);}
}

@keyframes ordersHelmetSpin{
  from{transform:rotate(0deg);}
  to{transform:rotate(360deg);}
}

@media(max-width:1500px){
  .orders-table-modern .order-action-icons .btn-icon,
  .orders-table-modern .order-action-icons a.btn-icon,
  .orders-table-modern .order-action-icons button.btn-icon,
  .orders-table-modern .order-action-icons .delivery-wait-bar.delivery-wait-circle{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    flex-basis:34px!important;
  }
}

/* =========================================================
   FIX FINAL: ORDENES - botones de ACCION 100% uniformes
   Igual a DOMICILIOS / CLIENTES con borde negro circular.
   No modifica la estructura del modulo ORDENES.
========================================================= */
.orders-table-modern td.order-actions .order-action-icons,
td.order-actions .order-action-icons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}

.orders-table-modern td.order-actions .order-action-icons > .btn-icon,
.orders-table-modern td.order-actions .order-action-icons > a.btn-icon,
.orders-table-modern td.order-actions .order-action-icons > button.btn-icon,
td.order-actions .order-action-icons > .btn-icon,
td.order-actions .order-action-icons > a.btn-icon,
td.order-actions .order-action-icons > button.btn-icon,
td.order-actions .order-action-icons > a[href*="take-order.php?edit_order"]{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  border:2px solid #3f3f46!important;
  background:#f4f5fb!important;
  color:#72809f!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  text-align:center!important;
  text-decoration:none!important;
  box-shadow:2px 3px 0 #000!important;
  outline:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

.orders-table-modern td.order-actions .order-action-icons > .btn-icon i,
.orders-table-modern td.order-actions .order-action-icons > a.btn-icon i,
.orders-table-modern td.order-actions .order-action-icons > button.btn-icon i,
td.order-actions .order-action-icons > .btn-icon i,
td.order-actions .order-action-icons > a.btn-icon i,
td.order-actions .order-action-icons > button.btn-icon i,
td.order-actions .order-action-icons > a[href*="take-order.php?edit_order"] i{
  font-size:17px!important;
  width:17px!important;
  height:17px!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:inherit!important;
}

.orders-table-modern td.order-actions .order-action-icons > .btn-icon:hover,
.orders-table-modern td.order-actions .order-action-icons > a.btn-icon:hover,
.orders-table-modern td.order-actions .order-action-icons > button.btn-icon:hover,
td.order-actions .order-action-icons > .btn-icon:hover,
td.order-actions .order-action-icons > a.btn-icon:hover,
td.order-actions .order-action-icons > button.btn-icon:hover,
td.order-actions .order-action-icons > a[href*="take-order.php?edit_order"]:hover{
  background:var(--primary)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
}

/* El sexto icono ESPERANDO queda circular rojo, titilando y con casco girando */
.orders-table-modern td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle,
td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  border:2px solid #3f3f46!important;
  background:#ef233c!important;
  color:#fff!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:2px 3px 0 #000!important;
  animation:ordenesEsperandoTitilarFinal 1s infinite!important;
}

.orders-table-modern td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle .wait-helmet,
td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle .wait-helmet{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  font-size:17px!important;
  line-height:1!important;
  color:#fff!important;
  animation:ordenesCascoGirandoFinal 1.15s linear infinite!important;
  transform-origin:center center!important;
}

@keyframes ordenesEsperandoTitilarFinal{
  0%{filter:brightness(1);box-shadow:2px 3px 0 #000,0 0 0 0 rgba(239,35,60,.45)}
  50%{filter:brightness(1.22);box-shadow:2px 3px 0 #000,0 0 0 6px rgba(239,35,60,.18)}
  100%{filter:brightness(1);box-shadow:2px 3px 0 #000,0 0 0 0 rgba(239,35,60,0)}
}

@keyframes ordenesCascoGirandoFinal{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}


/* =========================================================
   AJUSTE TAZ: acciones pendientes y mapa de domicilios
   - Cuenta / domicilio pendientes quedan morados y titilando.
   - Al guardar datos vuelven al estilo gris normal.
========================================================= */
.orders-table-modern td.order-actions .order-action-icons > .btn-icon.action-required,
td.order-actions .order-action-icons > .btn-icon.action-required,
.orders-table-modern td.order-actions .order-action-icons > button.btn-icon.action-required,
td.order-actions .order-action-icons > button.btn-icon.action-required{
  background:#6d3cff!important;
  color:#fff!important;
  border-color:#3f3f46!important;
  animation:requiredActionPulseFinal .9s infinite!important;
  box-shadow:2px 3px 0 #000,0 0 0 0 rgba(109,60,255,.70)!important;
}
.orders-table-modern td.order-actions .order-action-icons > .btn-icon.action-required i,
td.order-actions .order-action-icons > .btn-icon.action-required i{
  color:#fff!important;
}
@keyframes requiredActionPulseFinal{
  0%{transform:scale(1);box-shadow:2px 3px 0 #000,0 0 0 0 rgba(109,60,255,.70)}
  50%{transform:scale(1.08);box-shadow:2px 3px 0 #000,0 0 0 8px rgba(109,60,255,.18)}
  100%{transform:scale(1);box-shadow:2px 3px 0 #000,0 0 0 0 rgba(109,60,255,0)}
}
.route-map-live-wrap{position:relative;border-radius:18px;overflow:hidden;margin-top:10px;}
.route-map-live-wrap .route-map-frame{margin-top:0!important;border-radius:18px!important;}
.live-moto-label{
  position:absolute;z-index:3;left:50%;top:14px;transform:translateX(-50%);
  background:#fff;color:#17213c;border:2px solid #3f3f46;border-radius:999px;
  box-shadow:2px 3px 0 #000;padding:9px 16px;font-weight:1000;letter-spacing:.02em;
  white-space:nowrap;pointer-events:none;
}
html[data-theme="dark"] .live-moto-label{background:#202436;color:#fff;}
.live-routes-map{height:620px;width:100%;border-radius:18px;border:1px solid var(--line);overflow:hidden;background:#e9eef7;}
.live-routes-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:14px;}
.live-route-card{border:1px solid var(--line);border-radius:16px;padding:14px;background:var(--card);}
.live-route-card strong{display:block;color:var(--text);font-size:16px;}
.live-route-card small{display:block;color:#657792;font-weight:800;line-height:1.35;margin-top:4px;}
.live-moto-marker{background:#fff;border:2px solid #3f3f46;border-radius:999px;box-shadow:2px 3px 0 #000;padding:5px 8px;font-weight:1000;color:#17213c;white-space:nowrap;}
.live-moto-marker span{font-size:20px;margin-right:4px;}
@media(max-width:760px){.live-routes-map{height:460px}.live-moto-label{max-width:92%;overflow:hidden;text-overflow:ellipsis;font-size:12px}}

/* Ajuste 2026-06-08: Panel general - solo titila el estado activo en este módulo */
.dashboard-card .status-modern{animation:none!important;}
.dashboard-card .status-modern.active-blink{animation:dashboardActivePulse 1s infinite!important;}
.dashboard-card .badge{animation:none!important;}
@keyframes dashboardActivePulse{0%,100%{filter:brightness(1);transform:scale(1);box-shadow:0 0 0 0 rgba(109,60,255,.35)}50%{filter:brightness(1.12);transform:scale(1.015);box-shadow:0 0 0 8px rgba(109,60,255,.10)}}
.dash-link-btn{border:0;background:transparent;color:var(--primary);font-weight:950;cursor:pointer;font-size:14px;padding:0;text-decoration:none}
.dash-link-btn:hover{text-decoration:underline}
.status-reparto{background:#ffb300!important;color:#2b2430!important;}
.status-modern.status-reparto{background:#ffb300!important;color:#2b2430!important;border-color:#f2a300!important;}
.status-modern.status-reparto .status-modern-icon{background:rgba(255,255,255,.45)!important;color:#2b2430!important;}

/* Ajuste móvil general ERP: menú lateral compacto y contenido usable en celulares */
@media(max-width:760px){
  .layout{display:block!important;}
  .sidebar{position:sticky!important;top:0!important;width:100%!important;height:auto!important;inset:auto!important;z-index:200!important;display:block!important;box-shadow:0 8px 24px rgba(16,24,40,.08)!important;}
  .icon-rail{display:none!important;}
  .menu-panel{padding:10px 10px 8px!important;max-height:none!important;overflow:visible!important;}
  .brand{margin-bottom:8px!important;gap:8px!important;}
  .brand img{width:38px!important;height:38px!important;border-radius:10px!important;}
  .brand strong{font-size:13px!important;letter-spacing:.08em!important;}
  .brand small{font-size:11px!important;}
  .nav{display:flex!important;gap:8px!important;overflow-x:auto!important;white-space:nowrap!important;padding-bottom:4px!important;-webkit-overflow-scrolling:touch!important;}
  .nav a{flex:0 0 auto!important;margin:0!important;padding:8px 10px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--card)!important;font-size:12px!important;gap:6px!important;letter-spacing:0!important;}
  .nav a span{width:auto!important;font-size:17px!important;}
  .nav a.active{background:var(--primary)!important;color:#fff!important;border-color:var(--primary)!important;}
  .main{margin-left:0!important;width:100%!important;}
  .topbar{height:auto!important;min-height:56px!important;padding:10px 12px!important;position:sticky!important;top:0!important;z-index:150!important;}
  .topbar strong{font-size:13px!important;}
  .topbar small{font-size:11px!important;}
  .top-actions{gap:6px!important;}
  .theme-toggle,.top-actions .btn{height:36px!important;padding:0 10px!important;font-size:12px!important;}
  .content{padding:12px!important;}
  .page-head{align-items:flex-start!important;flex-direction:column!important;}
  .page-head .actions{width:100%!important;}
  .page-head .actions .btn{flex:1 1 auto!important;}
  .panel-hero,.dashboard-top-grid,.dashboard-section-grid,.dashboard-main-grid,.dashboard-main-grid.lower{grid-template-columns:1fr!important;}
  .panel-hero{padding:20px!important;border-radius:20px!important;}
  .panel-hero h1{font-size:24px!important;}
  .panel-hero-actions{flex-direction:column!important;align-items:stretch!important;width:100%!important;}
  .status-modern-grid{grid-template-columns:1fr!important;}
  .payment-mini-grid,.module-grid-mini{grid-template-columns:1fr 1fr!important;}
  .mini-table-wrap,.table-wrap{overflow-x:auto!important;}
  .mini-table{min-width:620px!important;}
}

/* Ajuste permisos por usuario */
.permissions-table input[type="checkbox"]{width:20px;height:20px;accent-color:#7047ff;cursor:pointer;}
.permissions-table th,.permissions-table td{vertical-align:middle;}
.permissions-table small{color:#7d86a5;}
@media (max-width: 900px){.permissions-table{min-width:980px}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}}


/* ROLES Y PERMISOS - columnas organizadas y submódulos */
.permissions-card{overflow:hidden}.permissions-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap;margin-bottom:16px}.permissions-head h2{margin:0 0 4px}.permissions-head>small{max-width:540px;color:var(--muted);line-height:1.35}.permissions-table-clean{table-layout:fixed;width:100%;border-collapse:collapse}.permissions-table-clean th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);text-align:center;white-space:nowrap;padding:14px 10px;border-bottom:1px solid var(--line)}.permissions-table-clean th.module-col{text-align:left;width:260px}.permissions-table-clean td{vertical-align:middle;border-bottom:1px solid var(--line);padding:13px 10px}.permissions-table-clean .perm-check{text-align:center;width:110px}.permissions-table-clean input[type=checkbox]{width:20px;height:20px;accent-color:#7d4cff;cursor:pointer}.permissions-table-clean .module-name b{display:block;font-weight:900;color:var(--text)}.permissions-table-clean .module-name small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.permissions-table-clean .main-module-row.options-parent-row td{background:rgba(125,76,255,.05)}.permissions-table-clean .submodules-title td{background:rgba(125,76,255,.10);font-weight:900;color:#6f3cff;padding:10px 14px}.permissions-table-clean .submodule-row td{background:rgba(125,76,255,.025)}.permissions-table-clean .module-name.sub{padding-left:28px;position:relative}.permissions-table-clean .module-name.sub:before{content:'└';position:absolute;left:8px;top:15px;color:#7d4cff;font-weight:900}@media(max-width:900px){.permissions-table-clean{min-width:980px}.permissions-table-clean th.module-col{width:220px}.permissions-head>small{max-width:100%}}


/* =========================================================
   Ajustes móviles 2026-06-08: órdenes, cocina, domicilios,
   tomar pedido por deslizamiento y Caja debajo de Panel.
========================================================= */
.mobile-collapsible-panel{display:block;background:transparent;border:0;margin:0 0 14px;}
.mobile-collapsible-panel>summary{display:none;list-style:none;cursor:pointer;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;font-weight:1000;text-transform:uppercase;letter-spacing:.04em;color:var(--text);}
.mobile-collapsible-panel>summary::-webkit-details-marker{display:none;}
.mobile-collapsible-panel>summary i{font-size:22px;transition:transform .2s ease;}
.mobile-collapsible-panel[open]>summary i{transform:rotate(180deg);}
.mobile-collapsible-body{display:block;}
.take-mobile-switch,.take-mobile-hint{display:none;}

@media(max-width:760px){
  /* En órdenes, el resumen y los filtros dejan de ser protagonistas. */
  .mobile-collapsible-panel>summary{display:flex!important;}
  .mobile-collapsible-panel:not([open])>.mobile-collapsible-body{display:none!important;}
  .orders-mobile-summary .status-grid{grid-template-columns:1fr!important;margin-top:12px!important;}
  .orders-mobile-summary .summary-collapsible{grid-column:auto!important;}
  .orders-mobile-summary .card.stat{min-height:88px!important;padding:14px!important;}
  .orders-mobile-summary .stat img{width:54px!important;height:54px!important;}
  .orders-mobile-summary .stat .num{font-size:28px!important;}
  .orders-mobile-summary .stat small{font-size:12px!important;letter-spacing:.10em!important;}
  .orders-mobile-summary .form-row{gap:14px!important;}
  .orders-mobile-summary .pagination-select{align-items:stretch!important;flex-wrap:wrap!important;}
  .orders-mobile-summary .pagination-select label{width:100%!important;}
  .orders-mobile-summary .pagination-select select{flex:1!important;width:auto!important;min-width:110px!important;}
  .orders-mobile-summary .pagination-select .btn{flex:1!important;}
  .orders-card-modern{margin-top:6px!important;}
  .orders-table-modern{min-width:980px!important;}

  /* Cocina: primero se ven las comandas; filtros quedan desplegables. */
  .kitchen-mobile-filter .kitchen-filter-card{margin-top:12px!important;padding:16px!important;}
  .kitchen-grid{grid-template-columns:1fr!important;}
  .kitchen-filter-actions{align-items:stretch!important;gap:10px!important;}
  .kitchen-filter-actions .btn{flex:1 1 100%!important;min-height:48px!important;}

  /* Domicilios: primero se ve el listado; filtros quedan desplegables. */
  .deliveries-mobile-filter .delivery-filter-card{margin-top:12px!important;padding:16px!important;}
  .delivery-filter-card .pagination-select{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;align-items:stretch!important;}
  .delivery-filter-card .pagination-select label{display:none!important;}
  .delivery-filter-card .pagination-select .btn{width:100%!important;min-height:54px!important;white-space:normal!important;line-height:1.1!important;}
  .deliveries-table{min-width:980px!important;}

  /* Tomar pedido móvil: datos y productos en dos paneles con swipe. */
  .take-mobile-switch{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px;position:sticky;top:58px;z-index:145;background:var(--bg);padding:8px 0;}
  .take-mobile-switch button{border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:16px;padding:12px 8px;font-weight:1000;font-size:13px;display:flex;align-items:center;justify-content:center;gap:6px;}
  .take-mobile-switch button.active{background:var(--primary);border-color:var(--primary);color:#fff;}
  .take-mobile-hint{display:block!important;color:var(--muted);font-size:12px;font-weight:800;margin:-2px 0 10px;text-align:center;}
  .take-order-layout{display:block!important;overflow:hidden!important;}
  .take-checkout,.take-menu-panel{width:100%!important;min-width:0!important;}
  .take-order-layout.mobile-show-datos .take-menu-panel{display:none!important;}
  .take-order-layout.mobile-show-datos .take-checkout{display:block!important;}
  .take-order-layout.mobile-show-products .take-checkout{display:none!important;}
  .take-order-layout.mobile-show-products .take-menu-panel{display:block!important;}
  .take-checkout{position:relative!important;top:auto!important;order:0!important;}
  .take-checkout-card{max-height:none!important;overflow:visible!important;border-radius:20px!important;padding:18px!important;}
  .take-logo{width:66px!important;height:66px!important;margin-bottom:6px!important;}
  .take-checkout-card h2{font-size:22px!important;}
  .take-checkout .btn-block{min-height:50px!important;font-size:15px!important;white-space:normal!important;}
  .take-checkout .btn-soft.btn-block:last-child{display:flex!important;visibility:visible!important;margin-bottom:18px!important;background:#f3f4fa!important;color:var(--text)!important;}
  .take-category-tabs{position:sticky!important;top:118px!important;margin-bottom:12px!important;}
  .take-products-grid{grid-template-columns:1fr!important;}
  .take-product-card{padding:14px!important;}
  .take-add-btn{width:100%!important;margin-top:10px!important;min-height:44px!important;}
}

/* Ajustes móviles solicitados: evitar espacio gris y compactar Productos */
@media(max-width:760px){
  .orders-mobile-summary:not([open]){margin-bottom:10px!important;}
  .orders-mobile-summary:not([open]) + br{display:none!important;}
  .orders-card-modern{margin-top:10px!important;}
  .orders-card-modern .table-wrap{margin-top:0!important;}
  .products-mobile-categories{margin-bottom:14px!important;}
  .products-mobile-categories>summary{display:flex!important;}
  .products-mobile-categories:not([open])>.mobile-collapsible-body{display:none!important;}
  .products-mobile-categories .product-category-grid{margin-top:12px!important;}
}


/* GPS en tiempo real - moto amarilla + burbuja */
.delivery-live-map-shell{
  position:relative;
  width:100%;
  background:#eef2f7;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}
.delivery-live-map{
  width:100%;
  height:680px;
  min-height:420px;
  background:#e9eef7;
}
.delivery-map-address-card{
  position:absolute;
  z-index:500;
  top:24px;
  width:250px;
  max-width:calc(50% - 34px);
  background:#fff;
  border:1px solid rgba(26,35,66,.12);
  border-radius:14px;
  padding:15px 17px;
  box-shadow:0 12px 35px rgba(16,24,40,.12);
  color:#17213c;
}
.delivery-map-address-card b,
.delivery-map-address-card strong,
.delivery-map-address-card span{display:block;}
.delivery-map-address-card b{font-size:14px;margin-bottom:10px;}
.delivery-map-address-card strong{font-size:14px;margin-bottom:8px;}
.delivery-map-address-card span{font-size:13px;line-height:1.45;font-weight:800;color:#536280;}
.delivery-map-start-card{left:24px;}
.delivery-map-dest-card{right:24px;}
.delivery-pin-wrap{background:transparent!important;border:0!important;}
.delivery-simple-pin{
  width:34px;height:34px;border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 5px 16px rgba(0,0,0,.25);
  border:3px solid #fff;
}
.delivery-simple-pin span{transform:rotate(45deg);font-size:17px;line-height:1;}
.delivery-pin-start .delivery-simple-pin{background:#13a568;}
.delivery-pin-dest .delivery-simple-pin{background:#ef4444;}
.delivery-moto-bubble,
.delivery-routes-moto-bubble{
  position:absolute;
  left:50%;
  top:0;
  transform:translate(-50%,-100%);
  background:#fff;
  color:#121827;
  border:2px solid #111827;
  border-radius:10px;
  padding:7px 12px;
  text-align:center;
  font-size:13px;
  font-weight:1000;
  line-height:1.15;
  white-space:nowrap;
  box-shadow:2px 3px 0 #111827;
}
.delivery-moto-bubble:after,
.delivery-routes-moto-bubble:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  transform:translateX(-50%);
  width:12px;height:12px;
  background:#fff;
  border-right:2px solid #111827;
  border-bottom:2px solid #111827;
  transform:translateX(-50%) rotate(45deg);
}
.delivery-moto-pin,
.delivery-routes-moto-pin{
  position:absolute;
  left:50%;
  top:32px;
  transform:translateX(-50%);
  width:58px;
  height:72px;
  background:#ffd200;
  border-radius:50% 50% 50% 0;
  transform-origin:center;
  transform:translateX(-50%) rotate(-45deg);
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}
.delivery-moto-circle,
.delivery-routes-moto-circle{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%) rotate(45deg);
  width:42px;height:42px;
  border-radius:50%;
  background:#151515;
  color:#ffd200;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
}
.delivery-routes-moto-marker{
  position:relative;
  width:74px;height:96px;
}
html[data-theme="dark"] .delivery-map-address-card,
html[data-theme="dark"] .delivery-moto-bubble,
html[data-theme="dark"] .delivery-routes-moto-bubble{
  background:#202436;
  color:#fff;
}
html[data-theme="dark"] .delivery-map-address-card span{color:#cbd5e1;}
@media(max-width:900px){
  .delivery-live-map{height:540px;}
  .delivery-map-address-card{
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    width:auto;
    max-width:none;
    margin:10px 12px;
  }
  .delivery-live-map-shell{
    display:flex;
    flex-direction:column;
  }
  .delivery-map-start-card{order:1;}
  .delivery-live-map{order:2;}
  .delivery-map-dest-card{order:3;}
}
@media(max-width:760px){
  .delivery-live-map{height:460px;}
  .delivery-moto-bubble,
  .delivery-routes-moto-bubble{font-size:11px;padding:6px 9px;}
}


/* Ajuste mapa tipo Google + marcadores solicitados */
.delivery-live-map .leaflet-tile-pane,
.live-routes-map .leaflet-tile-pane{filter:saturate(1.08) contrast(1.03) brightness(1.02);}
.delivery-pin-start .delivery-simple-pin{background:#ffffff;border-color:#1fa463;color:#1fa463;}
.delivery-pin-dest .delivery-simple-pin{background:#ffffff;border-color:#111827;color:#111827;}
.delivery-simple-pin span{font-size:20px;}
.delivery-moto-bubble span,
.delivery-routes-moto-bubble span{display:block;font-weight:1000;}
.delivery-moto-bubble small,
.delivery-routes-moto-bubble small{display:block;font-size:11px;font-weight:900;margin-top:2px;}
.delivery-map-address-card b{font-weight:1000;}
.delivery-map-start-card b::before{content:'🏠 ';}
.delivery-map-dest-card b::before{content:'🏁 ';}

/* Ajuste elegante de mapa GPS: moto premium, inicio y destino visibles */
.delivery-pin-wrap{background:transparent!important;border:0!important;}
.delivery-static-pin{
  position:relative;
  width:58px;
  height:74px;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,.28));
}
.delivery-static-pin::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  width:46px;
  height:46px;
  transform:translateX(-50%) rotate(-45deg);
  border-radius:50% 50% 50% 0;
  border:4px solid #fff;
  box-shadow:0 4px 12px rgba(15,23,42,.22);
}
.delivery-static-pin-circle{
  position:absolute;
  left:50%;
  top:8px;
  width:34px;
  height:34px;
  transform:translateX(-50%);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
}
.delivery-static-pin-circle svg{width:22px;height:22px;display:block;fill:currentColor;}
.delivery-pin-start .delivery-static-pin::before{background:#16a34a;}
.delivery-pin-start .delivery-static-pin-circle{background:#fff;color:#16a34a;}
.delivery-pin-dest .delivery-static-pin::before{background:#ef4444;}
.delivery-pin-dest .delivery-static-pin-circle{background:#fff;color:#ef4444;}

.delivery-moto-pin-elegant{
  width:64px!important;
  height:80px!important;
  background:linear-gradient(135deg,#ffd400 0%,#f5b900 100%)!important;
  border:4px solid #fff;
  box-shadow:0 12px 28px rgba(15,23,42,.34), inset -7px -7px 0 rgba(0,0,0,.06)!important;
}
.delivery-moto-pin-elegant .delivery-moto-circle{
  width:46px!important;
  height:46px!important;
  background:#111827!important;
  color:#ffd400!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.08);
}
.delivery-moto-pin-elegant .delivery-moto-circle svg{
  width:32px;
  height:32px;
  display:block;
  fill:currentColor;
}
.delivery-moto-bubble,
.delivery-routes-moto-bubble{
  border-radius:12px!important;
  border:2px solid #17213c!important;
  box-shadow:0 10px 22px rgba(15,23,42,.18), 2px 3px 0 #17213c!important;
  background:#fff!important;
  color:#17213c!important;
  min-width:92px;
}
.delivery-map-start-card b::before{content:'🟢 ';}
.delivery-map-dest-card b::before{content:'🏁 ';}
.delivery-map-address-card{
  pointer-events:none;
}
.delivery-live-map .leaflet-marker-pane{z-index:650!important;}
.delivery-live-map .leaflet-overlay-pane{z-index:450!important;}


/* =========================================================
   Ajustes finales: Tomar pedido móvil/escritorio + GPS premium
========================================================= */
@media(max-width:760px){
  body:has(.take-order-layout){overflow-x:hidden!important;}
  .take-mobile-switch{top:0!important;z-index:250!important;padding:10px 0!important;margin-bottom:14px!important;}
  .take-mobile-switch button{min-height:54px!important;border-radius:22px!important;font-size:14px!important;}
  .take-order-layout.mobile-show-products .take-menu-panel{overflow:visible!important;padding-top:0!important;}
  .take-category-tabs{
    position:sticky!important;
    top:74px!important;
    z-index:240!important;
    display:flex!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    max-width:100%!important;
    width:100%!important;
    padding:12px 14px!important;
    margin:0 0 18px 0!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 10px 24px rgba(15,23,42,.08)!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  .take-category-tabs::-webkit-scrollbar{display:none!important;}
  .take-tab{flex:0 0 auto!important;padding:12px 22px!important;border-radius:999px!important;font-size:16px!important;line-height:1!important;}
  .take-category{scroll-margin-top:160px!important;padding-top:8px!important;margin-top:0!important;}
  .take-category:first-of-type{padding-top:14px!important;}
  .take-products-grid{gap:16px!important;}
  .take-product-card{overflow:hidden!important;box-shadow:0 14px 30px rgba(15,23,42,.08)!important;}
}
@media(min-width:761px){
  .take-checkout-card{padding-bottom:56px!important;}
  .take-checkout .btn-soft.btn-block:last-child{margin-bottom:28px!important;}
}

/* Marcadores GPS premium: restaurante, moto y destino */
.delivery-moto-bubble,
.delivery-routes-moto-bubble{
  border:1px solid rgba(15,23,42,.18)!important;
  box-shadow:0 14px 32px rgba(15,23,42,.18)!important;
  border-radius:14px!important;
  min-width:104px!important;
  padding:8px 12px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%)!important;
  color:#15213d!important;
}
.delivery-moto-bubble:after,
.delivery-routes-moto-bubble:after{
  border-right:1px solid rgba(15,23,42,.18)!important;
  border-bottom:1px solid rgba(15,23,42,.18)!important;
  box-shadow:3px 3px 6px rgba(15,23,42,.08)!important;
}
.delivery-moto-pin-elegant,
.delivery-routes-moto-pin{
  background:linear-gradient(145deg,#ffcf24 0%,#f0b90b 100%)!important;
  border:4px solid #fff!important;
  box-shadow:0 16px 34px rgba(15,23,42,.30), inset -8px -8px 0 rgba(113,63,18,.10)!important;
}
.delivery-moto-circle,
.delivery-routes-moto-circle{
  background:radial-gradient(circle at 35% 30%,#2b3449 0%,#111827 58%,#050816 100%)!important;
  color:#ffd21f!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.08),0 2px 8px rgba(0,0,0,.18)!important;
}
.delivery-static-pin{width:66px!important;height:86px!important;filter:drop-shadow(0 16px 24px rgba(15,23,42,.28))!important;}
.delivery-static-pin::before{width:52px!important;height:52px!important;border-width:5px!important;}
.delivery-static-pin-circle{top:9px!important;width:38px!important;height:38px!important;}
.delivery-static-pin-circle svg{width:25px!important;height:25px!important;}
.delivery-pin-start .delivery-static-pin::before{background:linear-gradient(145deg,#10b981,#059669)!important;}
.delivery-pin-start .delivery-static-pin-circle{background:#fff!important;color:#059669!important;}
.delivery-pin-dest .delivery-static-pin::before{background:linear-gradient(145deg,#1f2937,#020617)!important;}
.delivery-pin-dest .delivery-static-pin-circle{background:#fff!important;color:#111827!important;}
.delivery-map-address-card{border-radius:18px!important;box-shadow:0 18px 45px rgba(15,23,42,.15)!important;border:1px solid rgba(15,23,42,.08)!important;}
.delivery-map-start-card b::before{content:'🏠 ' !important;}
.delivery-map-dest-card b::before{content:'🏁 ' !important;}


/* =========================================================
   Ajustes 2026-06-09: factura, tablet/iPad y tomar pedido móvil
========================================================= */
/* La línea de motivo lleva el valor de la propina al frente y recargos queda sin importe. */
.invoice-ticket .inv-line b + span:empty{min-width:0!important;}

/* iPad/tablet: el botón Cancelar pedido no queda escondido al final. */
@media (min-width:761px) and (max-width:1180px){
  body:has(.take-order-layout){padding-bottom:120px!important;}
  .take-order-layout{padding-bottom:120px!important;}
  .take-checkout{position:relative!important;top:auto!important;}
  .take-checkout-card{max-height:none!important;overflow:visible!important;padding-bottom:100px!important;}
  .take-checkout .btn-soft.btn-block:last-child{margin-bottom:90px!important;}
}

/* Android/iPhone: misma experiencia móvil en Tomar pedido. */
@media(max-width:900px){
  body:has(.take-order-layout),
  body.take-order-mobile-page{overflow-x:hidden!important;background:var(--bg)!important;}
  .take-mobile-switch{
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;
    position:relative!important;top:auto!important;z-index:60!important;
    background:transparent!important;padding:0!important;margin:10px 0 18px!important;
  }
  .take-mobile-switch button{
    appearance:none!important;-webkit-appearance:none!important;border:1px solid var(--line)!important;
    background:#fff!important;color:var(--text)!important;border-radius:24px!important;
    min-height:58px!important;padding:12px 10px!important;font-weight:1000!important;
    font-size:16px!important;line-height:1.1!important;box-shadow:none!important;
  }
  .take-mobile-switch button.active{background:var(--primary)!important;border-color:var(--primary)!important;color:#fff!important;}
  .take-mobile-hint{display:block!important;margin:2px 0 18px!important;text-align:center!important;color:var(--muted)!important;font-size:14px!important;font-weight:900!important;line-height:1.25!important;}
  .take-order-layout{display:block!important;overflow:visible!important;margin-top:0!important;padding-top:0!important;}
  .take-order-layout.mobile-show-datos .take-menu-panel{display:none!important;}
  .take-order-layout.mobile-show-products .take-checkout{display:none!important;}
  .take-order-layout.mobile-show-datos .take-checkout,
  .take-order-layout.mobile-show-products .take-menu-panel{display:block!important;}
  .take-menu-panel{margin-top:0!important;padding-top:0!important;overflow:visible!important;}
  .take-category-tabs{
    position:sticky!important;top:0!important;z-index:300!important;
    display:flex!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;
    width:100%!important;max-width:100%!important;margin:0 0 16px!important;padding:12px 14px!important;
    border-radius:22px!important;background:rgba(255,255,255,.98)!important;
    border:1px solid var(--line)!important;box-shadow:0 12px 30px rgba(15,23,42,.10)!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;scroll-snap-type:x proximity!important;
  }
  .take-category-tabs::-webkit-scrollbar{display:none!important;}
  .take-tab{flex:0 0 auto!important;scroll-snap-align:center!important;white-space:nowrap!important;border-radius:999px!important;padding:13px 24px!important;font-size:17px!important;line-height:1!important;}
  .take-tab.active{background:var(--primary)!important;color:#fff!important;border-color:var(--primary)!important;}
  .take-category{scroll-margin-top:112px!important;padding-top:0!important;margin-top:0!important;margin-bottom:18px!important;}
  .take-category:first-of-type{padding-top:0!important;margin-top:0!important;}
  .take-category h2{display:block!important;visibility:visible!important;margin:0 0 14px!important;font-size:25px!important;line-height:1.1!important;letter-spacing:.08em!important;}
  .take-products-grid{grid-template-columns:1fr!important;gap:18px!important;}
  .take-product-card{border-radius:24px!important;padding:16px!important;overflow:hidden!important;box-shadow:0 14px 34px rgba(15,23,42,.08)!important;}
  .take-product-top{grid-template-columns:78px 1fr!important;gap:12px!important;align-items:start!important;}
  .take-product-top img{width:78px!important;height:78px!important;border-radius:22px!important;}
  .take-product-card h3{font-size:19px!important;line-height:1.1!important;}
  .take-product-card p{font-size:15px!important;line-height:1.22!important;max-height:none!important;overflow:visible!important;}
  .take-price{font-size:21px!important;margin:12px 0!important;}
  .qty-control{gap:14px!important;}
  .qty-control button{width:44px!important;height:44px!important;font-size:28px!important;}
  .qty-control input{width:96px!important;height:44px!important;font-size:18px!important;}
  .take-note{min-height:48px!important;font-size:16px!important;}
  .take-add-btn{width:100%!important;min-height:56px!important;font-size:17px!important;border-radius:18px!important;margin-top:12px!important;}
  .take-checkout{position:relative!important;top:auto!important;}
  .take-checkout-card{max-height:none!important;overflow:visible!important;border-radius:28px!important;padding:22px!important;padding-bottom:76px!important;}
  .take-checkout .btn-soft.btn-block:last-child{margin-bottom:48px!important;}
}


/* =========================================================
   AJUSTE FINAL 2026-06-09 - Tomar pedido iPad/tablet y móvil
   1) iPad/tablet: Cancelar pedido visible.
   2) Android/iPhone: elimina espacio gris al entrar a productos.
   3) Android/iPhone: categoría seleccionada siempre visible/centrada.
========================================================= */
@media (min-width: 761px) and (max-width: 1366px) and (pointer: coarse){
  body:has(.take-order-layout){padding-bottom:160px!important;}
  .take-order-layout{align-items:start!important;padding-bottom:150px!important;}
  .take-checkout{position:sticky!important;top:86px!important;max-height:calc(100dvh - 105px)!important;overflow:visible!important;}
  .take-checkout-card{
    max-height:calc(100dvh - 110px)!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:120px!important;
    overscroll-behavior:contain!important;
  }
  .take-checkout .btn-soft.btn-block:last-child{
    position:sticky!important;
    bottom:14px!important;
    z-index:20!important;
    display:flex!important;
    visibility:visible!important;
    min-height:52px!important;
    margin-top:12px!important;
    margin-bottom:0!important;
    background:#f3f4fa!important;
    color:var(--text)!important;
    box-shadow:0 14px 30px rgba(15,23,42,.12)!important;
  }
}

@media (min-width: 901px) and (max-width: 1180px){
  .take-order-layout{grid-template-columns:minmax(0,1fr) 360px!important;}
}

@media (max-width:900px){
  html,body{scroll-behavior:smooth;}
  body:has(.take-order-layout), body.take-order-mobile-page{overflow-x:hidden!important;}
  .take-mobile-switch{margin:8px 0 12px!important;}
  .take-mobile-hint{margin:0 0 12px!important;}
  .take-order-layout{margin-top:0!important;padding-top:0!important;min-height:0!important;}
  .take-order-layout.mobile-show-products{margin-top:0!important;padding-top:0!important;}
  .take-order-layout.mobile-show-products .take-menu-panel{
    display:block!important;
    margin-top:0!important;
    padding-top:0!important;
    min-height:0!important;
    transform:none!important;
  }
  .take-category-tabs{
    position:sticky!important;
    top:0!important;
    z-index:500!important;
    margin-top:0!important;
    margin-bottom:14px!important;
    scroll-padding-inline:40px!important;
  }
  .take-category:first-of-type,
  .take-category:first-of-type h2,
  .take-category h2:first-child{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .take-category:first-of-type{padding-top:0!important;margin-top:0!important;}
  .take-category h2{position:relative!important;z-index:1!important;}
  .take-tab{scroll-snap-align:center!important;}
  .take-tab.active{box-shadow:0 8px 20px rgba(109,60,255,.24)!important;}
}

@supports (-webkit-touch-callout: none){
  @media(max-width:900px){
    .take-category-tabs{top:0!important;}
    .take-order-layout.mobile-show-products .take-menu-panel{padding-top:0!important;}
  }
}

/* Ajuste móvil: centrar automáticamente el módulo seleccionado en la barra superior */
@media(max-width:760px){
  .erp-mobile-module-nav{
    scroll-behavior:smooth!important;
    scroll-snap-type:x proximity!important;
    overscroll-behavior-x:contain!important;
    padding-left:max(10px, calc(50vw - 165px))!important;
    padding-right:max(10px, calc(50vw - 165px))!important;
    scrollbar-width:none!important;
  }
  .erp-mobile-module-nav::-webkit-scrollbar{display:none!important;}
  .erp-mobile-module-nav a{
    scroll-snap-align:center!important;
  }
  .erp-mobile-module-nav a.active{
    box-shadow:0 8px 18px rgba(109,60,255,.22)!important;
  }
}

/* =========================================================
   COCINA - RESUMEN REAL DE INGRESOS / REINGRESOS
========================================================= */
.kitchen-sessions-box{
  background:linear-gradient(135deg,#fff7ed,#f5f0ff)!important;
  border:1px solid rgba(109,60,255,.22)!important;
  color:#263154!important;
}
.kitchen-sessions-box .kitchen-session-row{
  align-items:flex-start!important;
  background:rgba(255,255,255,.68)!important;
  border:1px solid rgba(109,60,255,.10)!important;
  border-radius:12px!important;
  padding:9px 10px!important;
}
.kitchen-sessions-box .kitchen-session-row span{
  display:block!important;
  font-weight:950!important;
}
.kitchen-sessions-box .kitchen-session-row small{
  display:block!important;
  margin-top:3px!important;
  font-size:11px!important;
  color:#7b85a5!important;
  text-transform:none!important;
  letter-spacing:0!important;
}
.kitchen-sessions-box .kitchen-session-row em{
  display:inline-flex!important;
  margin-left:6px!important;
  padding:2px 7px!important;
  border-radius:999px!important;
  background:#dcfce7!important;
  color:#047857!important;
  font-size:10px!important;
  font-style:normal!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
}
.kitchen-sessions-box .kitchen-session-row strong{
  white-space:nowrap!important;
  color:#6d3cff!important;
  font-size:16px!important;
}
.kitchen-session-total{
  margin-top:8px!important;
  padding:10px 12px!important;
  border-radius:12px!important;
  background:#ede9fe!important;
  color:#4422c9!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  font-weight:1000!important;
}
.kitchen-session-total strong{font-size:18px!important;color:#4422c9!important;}
html[data-theme="dark"] .kitchen-sessions-box{
  background:linear-gradient(135deg,#2d2334,#22273a)!important;
  color:#eef2ff!important;
}
html[data-theme="dark"] .kitchen-sessions-box .kitchen-session-row{
  background:rgba(255,255,255,.06)!important;
}
html[data-theme="dark"] .kitchen-sessions-box .kitchen-session-row small{color:#aab3d6!important;}
html[data-theme="dark"] .kitchen-session-total{background:#33265e!important;color:#d9ccff!important;}
html[data-theme="dark"] .kitchen-session-total strong{color:#d9ccff!important;}

/* =========================================================
   COCINA - BOTÓN SUTIL DE REINGRESOS / HISTORIAL CERRADO
   Ajuste final: el historial queda oculto por defecto y solo abre al tocar.
========================================================= */
.kitchen-card-topline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  width:100%!important;
  margin-bottom:18px!important;
}
.kitchen-card-topline .kitchen-card-label{
  flex:1 1 auto!important;
  margin:0!important;
  min-width:0!important;
}
.kitchen-reentry-toggle{
  appearance:none!important;
  border:1px solid rgba(109,60,255,.16)!important;
  background:rgba(109,60,255,.055)!important;
  color:#5b4bd8!important;
  box-shadow:none!important;
  border-radius:999px!important;
  padding:7px 11px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease!important;
}
.kitchen-reentry-toggle span{display:inline-block!important;}
.kitchen-reentry-toggle strong{
  min-width:21px!important;
  height:21px!important;
  padding:0 6px!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#6d3cff!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:11px!important;
  font-weight:1000!important;
  box-shadow:0 4px 10px rgba(30,35,60,.06)!important;
}
.kitchen-reentry-toggle i{
  font-size:12px!important;
  line-height:1!important;
  transition:transform .18s ease!important;
}
.kitchen-reentry-toggle:hover,
.kitchen-reentry-toggle.is-open{
  background:rgba(109,60,255,.11)!important;
  border-color:rgba(109,60,255,.25)!important;
  color:#4f24e8!important;
  transform:translateY(-1px)!important;
}
.kitchen-reentry-toggle.is-open i{transform:rotate(180deg)!important;}
.kitchen-reentry-box.is-collapsed{
  display:none!important;
  max-height:0!important;
  opacity:0!important;
  padding:0!important;
  margin:0!important;
  border-width:0!important;
  pointer-events:none!important;
}
.kitchen-reentry-box:not(.is-collapsed){
  display:block!important;
  max-height:none!important;
  opacity:1!important;
  margin:14px 0 18px!important;
}
@media(max-width:767px){
  .kitchen-card-topline{gap:10px!important;margin-bottom:16px!important;}
  .kitchen-reentry-toggle{padding:7px 10px!important;font-size:11px!important;}
  .kitchen-reentry-toggle strong{min-width:20px!important;height:20px!important;font-size:10px!important;}
}
html[data-theme="dark"] .kitchen-reentry-toggle{
  background:rgba(139,92,246,.12)!important;
  border-color:rgba(167,139,250,.24)!important;
  color:#c4b5fd!important;
}
html[data-theme="dark"] .kitchen-reentry-toggle strong{
  background:#1f2335!important;
  color:#ddd6fe!important;
}
html[data-theme="dark"] .kitchen-reentry-toggle:hover,
html[data-theme="dark"] .kitchen-reentry-toggle.is-open{
  background:rgba(139,92,246,.20)!important;
  border-color:rgba(167,139,250,.36)!important;
  color:#fff!important;
}

/* Estado recoger en restaurante: cliente debe llegar */
.status-esperando-cliente{
  background:#ead7bd!important;
  color:#7a4a16!important;
  border:1px solid #d7b98f!important;
  box-shadow:0 0 0 0 rgba(170,105,30,.35);
}
.status-esperando-cliente.blink{
  animation:customerWaitBlink .85s infinite!important;
}
@keyframes customerWaitBlink{
  0%,100%{filter:brightness(1);box-shadow:0 0 0 0 rgba(170,105,30,.30)}
  50%{filter:brightness(1.08);box-shadow:0 0 0 4px rgba(170,105,30,.14)}
}


/* =========================================================
   ÓRDENES - distribución de estados por dispositivo
   Escritorio: 5 columnas visibles.
   Tablet: panel desplegable con 4 + 4 + 2.
   Móvil: panel desplegable 1 por fila.
========================================================= */
.orders-mobile-summary .status-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:16px!important;
  margin-bottom:16px!important;
}
.orders-mobile-summary .summary-collapsible{
  grid-column:1 / -1!important;
}
.orders-mobile-summary .card.stat{
  min-height:104px!important;
  padding:16px!important;
}
.orders-mobile-summary .stat img{
  width:58px!important;
  height:58px!important;
}
.orders-mobile-summary .stat .num{
  font-size:30px!important;
}
.orders-mobile-summary .stat small{
  font-size:12px!important;
  letter-spacing:.13em!important;
  line-height:1.15!important;
}

@media (min-width:761px) and (max-width:1200px){
  .orders-mobile-summary>summary{
    display:flex!important;
  }
  .orders-mobile-summary:not([open])>.mobile-collapsible-body{
    display:none!important;
  }
  .orders-mobile-summary .status-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    margin-top:12px!important;
  }
  .orders-mobile-summary .card.stat{
    min-height:96px!important;
    padding:14px!important;
  }
  .orders-mobile-summary .stat img{
    width:52px!important;
    height:52px!important;
  }
  .orders-mobile-summary .stat .num{
    font-size:28px!important;
  }
}

@media (max-width:760px){
  .orders-mobile-summary .status-grid{
    grid-template-columns:1fr!important;
  }
}

/* =========================================================
   ÓRDENES 2026-06-10: estados responsive + resumen moderno
   - Escritorio: estados visibles 5 x 2.
   - Tablet: estados desplegables 4 + 4 + 2.
   - Móvil: estados desplegables 1 por fila.
   - Resumen/calendario mantiene desplegable con diseño tipo PANEL.
========================================================= */
.orders-mobile-summary{
  margin-bottom:18px!important;
}
.orders-mobile-summary>summary{
  border-radius:16px!important;
  min-height:56px!important;
  box-shadow:0 12px 28px rgba(17,24,39,.04)!important;
}
.orders-mobile-summary .status-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:16px!important;
  margin-bottom:16px!important;
}
.orders-mobile-summary .card.stat{
  min-height:104px!important;
  padding:16px!important;
  background:#fff!important;
}
.orders-mobile-summary .stat-left{
  width:100%!important;
}
.orders-mobile-summary .stat img{
  width:58px!important;
  height:58px!important;
}
.orders-mobile-summary .stat .num{
  font-size:30px!important;
}
.orders-mobile-summary .stat small{
  font-size:12px!important;
  letter-spacing:.13em!important;
  line-height:1.15!important;
}
.orders-summary-modern{
  grid-column:1 / -1!important;
  margin-top:2px!important;
}
.orders-summary-modern details{
  border:1px solid rgba(226,232,240,.95)!important;
  border-radius:0!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 14px 34px rgba(15,23,42,.035)!important;
}
.orders-summary-modern summary{
  min-height:62px!important;
  padding:16px 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  background:#fff!important;
}
.orders-summary-modern summary span{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  color:var(--text)!important;
  font-weight:1000!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
}
.orders-summary-modern summary i{
  font-size:22px!important;
  transition:transform .2s ease!important;
}
.orders-summary-modern details[open] summary i{
  transform:rotate(180deg)!important;
}
.orders-summary-modern summary em{
  font-style:normal!important;
  color:#8a8eaf!important;
  font-size:12px!important;
  font-weight:900!important;
  text-transform:none!important;
  letter-spacing:0!important;
}
.orders-summary-body{
  display:grid!important;
  grid-template-columns:1.15fr .85fr!important;
  gap:18px!important;
  padding:18px!important;
  background:linear-gradient(180deg,#fff 0%,#f8f9ff 100%)!important;
}
.orders-summary-cards{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
.orders-summary-card{
  position:relative!important;
  min-height:124px!important;
  padding:22px 22px!important;
  border-radius:28px!important;
  background:#fff!important;
  border:1px solid rgba(226,232,240,.80)!important;
  box-shadow:0 18px 44px rgba(15,23,42,.055)!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
}
.orders-summary-card::after{
  content:""!important;
  position:absolute!important;
  width:110px!important;
  height:110px!important;
  right:-34px!important;
  bottom:-40px!important;
  border-radius:42% 58% 48% 52%!important;
  background:rgba(109,60,255,.09)!important;
}
.orders-summary-icon{
  width:76px!important;
  height:76px!important;
  border-radius:22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#fff!important;
  font-size:38px!important;
  flex:0 0 auto!important;
  background:linear-gradient(135deg,#16c8a0,#34d399)!important;
}
.orders-summary-card.transfer .orders-summary-icon{background:linear-gradient(135deg,#6d3cff,#9b7cff)!important;}
.orders-summary-card.delivery .orders-summary-icon{background:linear-gradient(135deg,#2563eb,#38bdf8)!important;}
.orders-summary-card.pickup .orders-summary-icon{background:linear-gradient(135deg,#f59e0b,#f97316)!important;}
.orders-summary-copy{
  position:relative!important;
  z-index:1!important;
}
.orders-summary-copy small{
  display:block!important;
  color:#8a8eaf!important;
  text-transform:uppercase!important;
  letter-spacing:.10em!important;
  font-weight:1000!important;
  font-size:12px!important;
  line-height:1.25!important;
}
.orders-summary-copy strong{
  display:block!important;
  margin-top:8px!important;
  color:var(--text)!important;
  font-size:38px!important;
  line-height:1!important;
  font-weight:1000!important;
}
.orders-date-modern{
  min-height:124px!important;
  padding:22px!important;
  border-radius:28px!important;
  background:#fff!important;
  border:1px solid rgba(226,232,240,.80)!important;
  box-shadow:0 18px 44px rgba(15,23,42,.055)!important;
}
.orders-date-modern .date-filter-form{
  display:grid!important;
  gap:12px!important;
}
.orders-date-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
}
.orders-date-head label{
  margin:0 0 4px!important;
  font-size:14px!important;
  text-transform:none!important;
}
.orders-date-head p{
  margin:0!important;
  color:#8a8eaf!important;
  font-size:13px!important;
  font-weight:800!important;
}
.orders-date-head>i{
  width:52px!important;
  height:52px!important;
  border-radius:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:28px!important;
  color:#6d3cff!important;
  background:#f1edff!important;
  flex:0 0 auto!important;
}
.orders-date-modern input[type="date"]{
  height:50px!important;
  border-radius:18px!important;
  text-align:center!important;
  font-weight:900!important;
  color:var(--text)!important;
  background:#f7f8fc!important;
}
.orders-date-actions{
  gap:10px!important;
}
.orders-date-actions .btn{
  border-radius:14px!important;
}
.orders-date-modern small{
  color:#8a8eaf!important;
  font-weight:800!important;
  line-height:1.35!important;
}

@media (min-width:761px) and (max-width:1200px){
  .orders-mobile-summary>summary{display:flex!important;}
  .orders-mobile-summary:not([open])>.mobile-collapsible-body{display:none!important;}
  .orders-mobile-summary .status-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin-top:12px!important;}
  .orders-mobile-summary .card.stat{min-height:96px!important;padding:14px!important;}
  .orders-mobile-summary .stat img{width:52px!important;height:52px!important;}
  .orders-mobile-summary .stat .num{font-size:28px!important;}
  .orders-summary-body{grid-template-columns:1fr!important;}
}
@media (max-width:760px){
  .orders-mobile-summary .status-grid{grid-template-columns:1fr!important;}
  .orders-summary-modern summary{align-items:flex-start!important;flex-direction:column!important;gap:4px!important;}
  .orders-summary-modern summary em{display:none!important;}
  .orders-summary-body{grid-template-columns:1fr!important;padding:14px!important;}
  .orders-summary-cards{grid-template-columns:1fr!important;}
  .orders-summary-card{min-height:104px!important;border-radius:24px!important;padding:18px!important;}
  .orders-summary-icon{width:64px!important;height:64px!important;border-radius:20px!important;font-size:32px!important;}
  .orders-summary-copy strong{font-size:32px!important;}
  .orders-date-modern{border-radius:24px!important;padding:18px!important;}
  .orders-date-actions{display:grid!important;grid-template-columns:1fr!important;}
  .orders-date-actions .btn{width:100%!important;text-align:center!important;justify-content:center!important;}
}

/* Ajuste alineación productos / unidades / precio en ÓRDENES */
.orders-table-modern .order-items-grid-cell{
  min-width:390px!important;
  width:390px!important;
  vertical-align:top!important;
  padding-right:16px!important;
}
.orders-table-modern .order-items-grid{
  display:grid!important;
  grid-template-columns:minmax(240px,1fr) 52px 100px!important;
  gap:0 14px!important;
  width:100%!important;
}
.orders-table-modern .order-item-grid-row{
  display:contents!important;
}
.orders-table-modern .order-item-product,
.orders-table-modern .order-item-qty,
.orders-table-modern .order-item-price{
  min-height:38px!important;
  padding:6px 0!important;
  border-bottom:1px dashed rgba(101,114,140,.28)!important;
  color:#667792!important;
  font-weight:850!important;
  line-height:1.18!important;
}
.orders-table-modern .order-item-product{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:3px!important;
}
.orders-table-modern .order-item-qty,
.orders-table-modern .order-item-price{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.orders-table-modern .order-item-price{
  justify-content:flex-end!important;
}
.orders-table-modern .order-item-grid-row:last-child .order-item-product,
.orders-table-modern .order-item-grid-row:last-child .order-item-qty,
.orders-table-modern .order-item-grid-row:last-child .order-item-price{
  border-bottom:0!important;
}
.orders-table-modern .order-total-cell{
  min-width:120px!important;
  width:120px!important;
  white-space:nowrap!important;
  text-align:left!important;
  vertical-align:middle!important;
}
.orders-table-modern .payment-method-cell{min-width:130px!important;width:130px!important;}
.orders-table-modern .order-address-cell{min-width:170px!important;width:170px!important;}
.orders-table-modern .order-status-cell{min-width:150px!important;width:150px!important;text-align:center!important;}
.orders-table-modern .order-actions{min-width:330px!important;width:330px!important;}
@media(max-width:900px){
  .orders-table-modern .order-items-grid-cell{min-width:360px!important;width:360px!important;}
  .orders-table-modern .order-items-grid{grid-template-columns:minmax(210px,1fr) 46px 92px!important;gap:0 10px!important;}
}


/* Fecha y hora Colombia en la franja superior */
.topbar-user-block{min-width:220px;}
.topbar-colombia-clock{
  margin-left:auto;
  margin-right:18px;
  min-width:310px;
  padding:8px 16px;
  border-radius:18px;
  border:1px solid #ececf5;
  background:linear-gradient(135deg,#ffffff 0%,#f7f7ff 100%);
  box-shadow:0 12px 32px rgba(32,35,70,.06);
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  line-height:1.15;
  white-space:nowrap;
}
.topbar-colombia-clock .topbar-clock-date{
  color:var(--text);
  font-size:13px;
  font-weight:900;
  letter-spacing:.01em;
}
.topbar-colombia-clock .topbar-clock-time{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}
html[data-theme="dark"] .topbar-colombia-clock{
  background:linear-gradient(135deg,#242739 0%,#1d2030 100%);
  border-color:#34384f;
  box-shadow:none;
}
@media(max-width:1180px){
  .topbar-colombia-clock{min-width:250px;padding:7px 12px;margin-right:12px;}
  .topbar-colombia-clock .topbar-clock-date{font-size:12px;}
  .topbar-colombia-clock .topbar-clock-time{font-size:11px;}
}
@media(max-width:900px){
  .topbar-colombia-clock{display:none;}
}

/* ===== Corrección tablet/desktop: evitar montaje PRECIO vs PRECIO TOTAL ===== */
.orders-table-modern .order-items-grid-cell{
  overflow:hidden!important;
}
.orders-table-modern .order-items-grid{
  grid-template-columns:minmax(0,1fr) 54px 104px!important;
  gap:0 12px!important;
}
.orders-table-modern .order-item-product{
  min-width:0!important;
  overflow-wrap:anywhere!important;
}
.orders-table-modern .order-item-qty,
.orders-table-modern .order-item-price,
.orders-table-modern .order-total-cell{
  text-align:center!important;
  justify-content:center!important;
}
.orders-table-modern .order-item-price{
  justify-content:center!important;
  padding-left:4px!important;
  padding-right:4px!important;
}
.orders-table-modern .order-total-cell{
  min-width:138px!important;
  width:138px!important;
  padding-left:18px!important;
  padding-right:18px!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
.orders-table-modern .order-total-cell small,
.orders-table-modern .order-total-cell b{
  display:block!important;
  text-align:center!important;
}

@media (min-width:761px) and (max-width:1200px){
  .orders-table-modern{
    min-width:1460px!important;
  }
  .orders-table-modern .order-items-grid-cell{
    min-width:400px!important;
    width:400px!important;
    padding-right:18px!important;
  }
  .orders-table-modern .order-items-grid{
    grid-template-columns:minmax(0,1fr) 50px 96px!important;
    gap:0 10px!important;
  }
  .orders-table-modern .order-total-cell{
    min-width:145px!important;
    width:145px!important;
    padding-left:20px!important;
    padding-right:20px!important;
  }
}

@media (max-width:760px){
  .orders-table-modern .order-item-qty,
  .orders-table-modern .order-item-price,
  .orders-table-modern .order-total-cell{
    text-align:center!important;
    justify-content:center!important;
  }
}

/* =========================================================
   Ajuste puntual aprobado - Ordenes: PRECIO y PRECIO TOTAL
   Base: TAZ-MOLINOS-ERP-ORDENES-TABLET-PRECIOS-CENTRADOS(1)
   Solo centra los valores monetarios sin mover columnas ni layout.
   ========================================================= */
.orders-table-modern th:nth-child(5),
.orders-table-modern th:nth-child(6){
  text-align:center!important;
  vertical-align:middle!important;
}

.orders-table-modern .order-item-price,
.orders-table-modern td.order-total-cell{
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}

.orders-table-modern .order-item-price{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:100%!important;
  font-weight:800!important;
  color:#667792!important;
}

.orders-table-modern td.order-total-cell{
  font-weight:800!important;
  color:#667792!important;
  line-height:1.35!important;
}

.orders-table-modern td.order-total-cell small,
.orders-table-modern td.order-total-cell b{
  display:block!important;
  text-align:center!important;
  white-space:nowrap!important;
}

.orders-table-modern td.order-total-cell b{
  font-weight:950!important;
  color:#243052!important;
}

/* ===== AJUSTE FINAL ÓRDENES: encabezados vs datos y precios a la derecha =====
   Mantiene la distribución aprobada. Solo alinea ARTÍCULO / UD. / PRECIO / PRECIO TOTAL. */
.orders-table-modern th:nth-child(3){text-align:center!important;}
.orders-table-modern th:nth-child(4){text-align:center!important;}
.orders-table-modern th:nth-child(5),
.orders-table-modern th:nth-child(6){text-align:right!important;}

.orders-table-modern .order-items-grid-cell{
  padding-left:12px!important;
  padding-right:12px!important;
  min-width:auto!important;
  width:auto!important;
  overflow:visible!important;
}
.orders-table-modern .order-items-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 64px 118px!important;
  column-gap:0!important;
  row-gap:0!important;
  width:100%!important;
  align-items:stretch!important;
}
.orders-table-modern .order-item-product{
  min-width:0!important;
  padding-right:12px!important;
  overflow-wrap:anywhere!important;
  text-align:left!important;
  align-items:flex-start!important;
}
.orders-table-modern .order-item-qty{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  padding-left:6px!important;
  padding-right:6px!important;
}
.orders-table-modern .order-item-price{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  text-align:right!important;
  white-space:nowrap!important;
  padding-left:8px!important;
  padding-right:0!important;
}
.orders-table-modern .order-total-cell{
  text-align:right!important;
  white-space:nowrap!important;
  padding-left:14px!important;
  padding-right:14px!important;
  min-width:138px!important;
  width:138px!important;
}
.orders-table-modern .order-total-cell small,
.orders-table-modern .order-total-cell b{
  display:block!important;
  text-align:right!important;
}

@media (min-width:761px) and (max-width:1200px){
  .orders-table-modern{min-width:1480px!important;}
  .orders-table-modern .order-items-grid{
    grid-template-columns:minmax(0,1fr) 60px 112px!important;
  }
  .orders-table-modern .order-total-cell{
    min-width:142px!important;
    width:142px!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
}

/* ===== AJUSTE FINAL PEDIDOS: columnas reales ARTÍCULO / UND. / PRECIO / PRECIO TOTAL ===== */
.orders-table-modern th:nth-child(4){text-align:center!important;}
.orders-table-modern th:nth-child(5),
.orders-table-modern th:nth-child(6){text-align:right!important;}

.orders-table-modern .order-products-cell,
.orders-table-modern .order-qty-cell,
.orders-table-modern .order-unit-price-cell,
.orders-table-modern .order-total-cell{
  vertical-align:middle!important;
}
.orders-table-modern .order-products-cell{
  text-align:left!important;
  overflow-wrap:anywhere!important;
}
.orders-table-modern .order-qty-cell{
  text-align:center!important;
  width:72px!important;
  min-width:72px!important;
}
.orders-table-modern .order-unit-price-cell{
  text-align:right!important;
  width:112px!important;
  min-width:112px!important;
  white-space:nowrap!important;
}
.orders-table-modern .order-total-cell{
  text-align:right!important;
  width:132px!important;
  min-width:132px!important;
  white-space:nowrap!important;
}
.orders-table-modern .order-products-stack,
.orders-table-modern .order-qty-stack,
.orders-table-modern .order-price-stack{
  display:grid!important;
  grid-auto-rows:minmax(38px,auto)!important;
  align-items:stretch!important;
  row-gap:0!important;
}
.orders-table-modern .order-product-line,
.orders-table-modern .order-qty-line,
.orders-table-modern .order-price-line{
  min-height:38px!important;
  border-bottom:1px dashed rgba(101,114,140,.30)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  font-weight:900!important;
  color:#667792!important;
  line-height:1.18!important;
}
.orders-table-modern .order-product-line{
  align-items:flex-start!important;
  padding-right:12px!important;
}
.orders-table-modern .order-qty-line{
  align-items:center!important;
  text-align:center!important;
}
.orders-table-modern .order-price-line{
  align-items:flex-end!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.orders-table-modern .order-product-line:last-child,
.orders-table-modern .order-qty-line:last-child,
.orders-table-modern .order-price-line:last-child{
  border-bottom:0!important;
}
.orders-table-modern .order-total-cell small,
.orders-table-modern .order-total-cell b{
  display:block!important;
  text-align:right!important;
  white-space:nowrap!important;
}
@media (min-width:761px) and (max-width:1200px){
  .orders-table-modern{min-width:1500px!important;}
  .orders-table-modern th:nth-child(4),.orders-table-modern td:nth-child(4){width:76px!important;}
  .orders-table-modern th:nth-child(5),.orders-table-modern td:nth-child(5){width:116px!important;}
  .orders-table-modern th:nth-child(6),.orders-table-modern td:nth-child(6){width:140px!important;}
}

/* Ajuste final ÓRDENES: el estado queda dentro de ACCIÓN para ganar espacio horizontal */
.orders-table-modern th:nth-child(1),.orders-table-modern td:nth-child(1){width:118px!important;}
.orders-table-modern th:nth-child(2),.orders-table-modern td:nth-child(2){width:112px!important;}
.orders-table-modern th:nth-child(3),.orders-table-modern td:nth-child(3){width:310px!important;}
.orders-table-modern th:nth-child(4),.orders-table-modern td:nth-child(4){width:72px!important;text-align:center!important;}
.orders-table-modern th:nth-child(5),.orders-table-modern td:nth-child(5){width:115px!important;text-align:right!important;}
.orders-table-modern th:nth-child(6),.orders-table-modern td:nth-child(6){width:130px!important;text-align:right!important;}
.orders-table-modern th:nth-child(7),.orders-table-modern td:nth-child(7){width:140px!important;text-align:center!important;}
.orders-table-modern th:nth-child(8),.orders-table-modern td:nth-child(8){width:215px!important;}
.orders-table-modern th:nth-child(9),.orders-table-modern td:nth-child(9){width:345px!important;}
.orders-table-modern .order-unit-price-cell,
.orders-table-modern .order-total-cell{ text-align:right!important; }
.orders-table-modern .order-price-line{ text-align:right!important; justify-content:flex-end!important; }
.orders-table-modern .order-current-status{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #e6e8f2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.orders-table-modern .order-current-status .order-current-label{
  font-size:11px;
  line-height:1;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#8b91ad;
}
.orders-table-modern .order-current-status .badge{
  min-width:116px;
  text-align:center;
  justify-content:center;
  white-space:normal;
}
@media (max-width:1180px){
  .orders-table-modern{min-width:1320px!important;}
  .orders-table-modern th:nth-child(3),.orders-table-modern td:nth-child(3){width:290px!important;}
  .orders-table-modern th:nth-child(8),.orders-table-modern td:nth-child(8){width:200px!important;}
  .orders-table-modern th:nth-child(9),.orders-table-modern td:nth-child(9){width:330px!important;}
}

/* =========================================================
   AJUSTE FINAL ORDENES - ACCION COMPACTA
   Mantiene estado dentro de ACCION, pero reduce el ancho
   para que escritorio y tablet aprovechen mejor el espacio.
========================================================= */
.orders-table-modern th:nth-child(9),
.orders-table-modern td:nth-child(9){
  width:265px!important;
  min-width:265px!important;
  max-width:265px!important;
  text-align:center!important;
}

.orders-table-modern td.order-actions,
td.order-actions{
  width:265px!important;
  min-width:265px!important;
  max-width:265px!important;
  padding-left:10px!important;
  padding-right:10px!important;
}

.orders-table-modern td.order-actions .order-action-icons,
td.order-actions .order-action-icons{
  justify-content:center!important;
  gap:7px!important;
  width:100%!important;
  max-width:245px!important;
  margin:0 auto!important;
}

.orders-table-modern td.order-actions .status-change-form,
td.order-actions .status-change-form{
  width:100%!important;
  max-width:245px!important;
  margin:10px auto 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}

.orders-table-modern td.order-actions .status-change-form select,
td.order-actions .status-change-form select{
  flex:1 1 auto!important;
  min-width:0!important;
  width:190px!important;
  max-width:190px!important;
  height:42px!important;
}

.orders-table-modern td.order-actions .status-change-form .btn,
td.order-actions .status-change-form .btn{
  flex:0 0 46px!important;
  width:46px!important;
  min-width:46px!important;
  max-width:46px!important;
  height:42px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.orders-table-modern .order-current-status{
  width:100%!important;
  max-width:245px!important;
  margin:10px auto 0 auto!important;
  padding-top:8px!important;
  border-top:1px dashed #e6e8f2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}

.orders-table-modern .order-current-status .order-current-label{
  flex:0 0 auto!important;
  font-size:10px!important;
  letter-spacing:.07em!important;
  white-space:nowrap!important;
}

.orders-table-modern .order-current-status .badge{
  flex:0 1 auto!important;
  min-width:96px!important;
  max-width:142px!important;
  padding:7px 10px!important;
  font-size:12px!important;
  line-height:1.1!important;
  text-align:center!important;
  justify-content:center!important;
  white-space:normal!important;
}

@media (min-width:761px) and (max-width:1200px){
  .orders-table-modern th:nth-child(9),
  .orders-table-modern td:nth-child(9),
  .orders-table-modern td.order-actions,
  td.order-actions{
    width:255px!important;
    min-width:255px!important;
    max-width:255px!important;
  }
  .orders-table-modern td.order-actions .order-action-icons,
  td.order-actions .order-action-icons,
  .orders-table-modern td.order-actions .status-change-form,
  td.order-actions .status-change-form,
  .orders-table-modern .order-current-status{
    max-width:235px!important;
  }
  .orders-table-modern td.order-actions .status-change-form select,
  td.order-actions .status-change-form select{
    width:180px!important;
    max-width:180px!important;
  }
}

/* =========================================================
   Ajuste ORDENES: Método de pago y dirección en líneas limpias
   - Mantiene columna UND.
   - Solo mejora lectura de cuentas y direcciones largas.
========================================================= */
.orders-table-modern .payment-method-cell{
  text-align:center!important;
  vertical-align:middle!important;
  line-height:1.18!important;
}
.orders-table-modern .payment-clean{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:100%!important;
}
.orders-table-modern .payment-clean > strong{
  display:block!important;
  color:#667792!important;
  font-weight:950!important;
  line-height:1.12!important;
  text-align:center!important;
}
.orders-table-modern .payment-clean > small{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  color:#667792!important;
  font-weight:850!important;
  line-height:1.14!important;
  text-align:center!important;
}
.orders-table-modern .payment-account-lines span{
  display:block!important;
  white-space:normal!important;
}
.orders-table-modern .order-address-cell{
  text-align:left!important;
  vertical-align:middle!important;
}
.orders-table-modern .address-clean span,
.orders-table-modern .address-clean strong{
  display:block!important;
}
.orders-table-modern .address-clean span{
  line-height:1.12!important;
}
.orders-table-modern .address-clean strong{
  margin-top:8px!important;
  margin-bottom:1px!important;
  color:#243052!important;
  font-weight:950!important;
}
.orders-table-modern .order-qty-cell,
.orders-table-modern .order-qty-line{
  text-align:center!important;
}
.orders-table-modern .order-qty-line{
  align-items:center!important;
  justify-content:center!important;
}

/* ===== ORDENES: tabla más compacta SOLO en iPad / tablet ===== */
@media (min-width: 768px) and (max-width: 1180px){
  .orders-card-modern{
    padding:12px!important;
  }

  .orders-card-modern .table-wrap{
    overflow-x:auto!important;
  }

  .orders-table-modern{
    min-width:1148px!important;
    table-layout:fixed!important;
  }

  .orders-table-modern th{
    padding:13px 6px!important;
    font-size:11px!important;
    letter-spacing:.04em!important;
  }

  .orders-table-modern td{
    padding:17px 6px!important;
    font-size:13px!important;
    line-height:1.18!important;
  }

  .orders-table-modern th:nth-child(1),
  .orders-table-modern td:nth-child(1){width:92px!important;}

  .orders-table-modern th:nth-child(2),
  .orders-table-modern td:nth-child(2){width:88px!important;}

  .orders-table-modern th:nth-child(3),
  .orders-table-modern td:nth-child(3){width:274px!important;}

  .orders-table-modern th:nth-child(4),
  .orders-table-modern td:nth-child(4){width:44px!important;text-align:center!important;}

  .orders-table-modern th:nth-child(5),
  .orders-table-modern td:nth-child(5){width:82px!important;text-align:right!important;}

  .orders-table-modern th:nth-child(6),
  .orders-table-modern td:nth-child(6){width:100px!important;text-align:center!important;}

  .orders-table-modern th:nth-child(7),
  .orders-table-modern td:nth-child(7){width:106px!important;text-align:center!important;}

  .orders-table-modern th:nth-child(8),
  .orders-table-modern td:nth-child(8){width:166px!important;}

  .orders-table-modern th:nth-child(9),
  .orders-table-modern td:nth-child(9){width:196px!important;}

  .orders-table-modern .order-products-cell{
    padding-right:4px!important;
  }

  .orders-table-modern .order-qty-cell{
    padding-left:2px!important;
    padding-right:2px!important;
  }

  .orders-table-modern .order-unit-price-cell{
    padding-left:4px!important;
    padding-right:8px!important;
  }

  .orders-table-modern .order-price-line{
    text-align:right!important;
    justify-content:flex-end!important;
  }

  .orders-table-modern .order-product-line,
  .orders-table-modern .order-qty-line,
  .orders-table-modern .order-price-line{
    min-height:30px!important;
  }

  .orders-table-modern .order-action-icons{
    gap:5px!important;
  }

  .orders-table-modern .btn-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
  }

  .orders-table-modern .status-change-form{
    gap:6px!important;
    margin-top:8px!important;
  }

  .orders-table-modern .status-change-form select{
    height:38px!important;
    font-size:13px!important;
  }

  .orders-table-modern .status-change-form .btn{
    height:38px!important;
    min-width:40px!important;
    padding:0 10px!important;
  }

  .orders-table-modern .order-current-status{
    margin-top:8px!important;
  }
}

/* =========================================================
   FIX REAL iPad/tablet - ÓRDENES 9 columnas con menú cerrado
   Aplica solo en tablet/iPad y solo cuando el sidebar está contraído.
   ========================================================= */
@media (min-width:761px) and (max-width:1400px){
  html.sidebar-collapsed .main{
    margin-left:82px!important;
    width:calc(100% - 82px)!important;
  }

  html.sidebar-collapsed .content{
    padding-left:14px!important;
    padding-right:14px!important;
  }

  html.sidebar-collapsed .orders-card-modern{
    padding:10px!important;
    overflow:hidden!important;
  }

  html.sidebar-collapsed .orders-card-modern .table-wrap{
    overflow-x:hidden!important;
    width:100%!important;
    max-width:100%!important;
  }

  html.sidebar-collapsed .orders-table-modern{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }

  html.sidebar-collapsed .orders-table-modern th,
  html.sidebar-collapsed .orders-table-modern td{
    padding:10px 4px!important;
    font-size:10.5px!important;
    line-height:1.12!important;
    vertical-align:middle!important;
    overflow:visible!important;
  }

  html.sidebar-collapsed .orders-table-modern th{
    font-size:9.5px!important;
    letter-spacing:.03em!important;
    line-height:1.1!important;
    text-align:center!important;
  }

  html.sidebar-collapsed .orders-table-modern th:nth-child(1),
  html.sidebar-collapsed .orders-table-modern td:nth-child(1){width:8%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(2),
  html.sidebar-collapsed .orders-table-modern td:nth-child(2){width:8%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(3),
  html.sidebar-collapsed .orders-table-modern td:nth-child(3){width:23%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(4),
  html.sidebar-collapsed .orders-table-modern td:nth-child(4){width:5%!important;text-align:center!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(5),
  html.sidebar-collapsed .orders-table-modern td:nth-child(5){width:8%!important;text-align:right!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(6),
  html.sidebar-collapsed .orders-table-modern td:nth-child(6){width:10%!important;text-align:right!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(7),
  html.sidebar-collapsed .orders-table-modern td:nth-child(7){width:10%!important;text-align:center!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(8),
  html.sidebar-collapsed .orders-table-modern td:nth-child(8){width:12%!important;text-align:left!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(9),
  html.sidebar-collapsed .orders-table-modern td:nth-child(9){width:16%!important;text-align:center!important;}

  html.sidebar-collapsed .orders-date-clean span,
  html.sidebar-collapsed .orders-date-clean em,
  html.sidebar-collapsed .customer-clean small,
  html.sidebar-collapsed .address-clean,
  html.sidebar-collapsed .payment-method-cell,
  html.sidebar-collapsed .order-total-cell small{
    font-size:10px!important;
    line-height:1.1!important;
  }

  html.sidebar-collapsed .orders-date-clean b{font-size:18px!important;}
  html.sidebar-collapsed .customer-clean .client-link,
  html.sidebar-collapsed .customer-clean strong{font-size:12px!important;}

  html.sidebar-collapsed .order-product-line,
  html.sidebar-collapsed .order-qty-line,
  html.sidebar-collapsed .order-price-line{
    min-height:26px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

  html.sidebar-collapsed .order-product-line span,
  html.sidebar-collapsed .general-note-row,
  html.sidebar-collapsed .order-qty-line,
  html.sidebar-collapsed .order-price-line,
  html.sidebar-collapsed .order-total-cell,
  html.sidebar-collapsed .payment-method-cell strong{
    font-size:10.5px!important;
    line-height:1.12!important;
  }

  html.sidebar-collapsed .item-note{
    font-size:9px!important;
    padding:2px 5px!important;
  }

  html.sidebar-collapsed .orders-table-modern .order-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    max-width:none!important;
    width:100%!important;
  }

  html.sidebar-collapsed .orders-table-modern .order-action-icons{
    justify-content:center!important;
    gap:4px!important;
    flex-wrap:wrap!important;
    max-width:160px!important;
    margin:0 auto!important;
  }

  html.sidebar-collapsed .orders-table-modern .btn-icon,
  html.sidebar-collapsed .orders-table-modern a.btn-icon,
  html.sidebar-collapsed .orders-table-modern button.btn-icon{
    width:27px!important;
    height:27px!important;
    min-width:27px!important;
    flex:0 0 27px!important;
    font-size:14px!important;
  }

  html.sidebar-collapsed .orders-table-modern .status-change-form{
    margin-top:4px!important;
    gap:4px!important;
    justify-content:center!important;
    width:100%!important;
  }

  html.sidebar-collapsed .orders-table-modern .status-change-form select{
    height:31px!important;
    min-width:0!important;
    width:105px!important;
    max-width:105px!important;
    padding:4px 5px!important;
    font-size:10px!important;
  }

  html.sidebar-collapsed .orders-table-modern .status-change-form .btn{
    height:31px!important;
    min-width:32px!important;
    padding:0 7px!important;
    font-size:10px!important;
    border-radius:8px!important;
  }

  html.sidebar-collapsed .orders-table-modern .order-current-status{
    margin-top:3px!important;
    gap:4px!important;
  }

  html.sidebar-collapsed .orders-table-modern .order-current-label{
    font-size:8px!important;
    letter-spacing:.06em!important;
  }

  html.sidebar-collapsed .orders-table-modern .order-current-status .badge{
    padding:4px 6px!important;
    font-size:9px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }
}

/* =========================================================
   CORRECCION iPad/tablet: ACCION compacta SIN botones verticales
   Mantiene 9 columnas con sidebar cerrado, pero reserva ancho suficiente
   para que los iconos queden en fila y el selector/estado debajo.
========================================================= */
@media (min-width:761px) and (max-width:1400px){
  html.sidebar-collapsed .orders-table-modern th:nth-child(1),
  html.sidebar-collapsed .orders-table-modern td:nth-child(1){width:8%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(2),
  html.sidebar-collapsed .orders-table-modern td:nth-child(2){width:8%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(3),
  html.sidebar-collapsed .orders-table-modern td:nth-child(3){width:21%!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(4),
  html.sidebar-collapsed .orders-table-modern td:nth-child(4){width:5%!important;text-align:center!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(5),
  html.sidebar-collapsed .orders-table-modern td:nth-child(5){width:8%!important;text-align:right!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(6),
  html.sidebar-collapsed .orders-table-modern td:nth-child(6){width:10%!important;text-align:right!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(7),
  html.sidebar-collapsed .orders-table-modern td:nth-child(7){width:9%!important;text-align:center!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(8),
  html.sidebar-collapsed .orders-table-modern td:nth-child(8){width:11%!important;text-align:left!important;}
  html.sidebar-collapsed .orders-table-modern th:nth-child(9),
  html.sidebar-collapsed .orders-table-modern td:nth-child(9){width:20%!important;text-align:center!important;}

  html.sidebar-collapsed .orders-table-modern td.order-actions,
  html.sidebar-collapsed td.order-actions{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
    padding-left:4px!important;
    padding-right:4px!important;
    overflow:visible!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons,
  html.sidebar-collapsed td.order-actions .order-action-icons{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:3px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 auto!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > .btn-icon,
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > a.btn-icon,
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > button.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > .btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > a.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > button.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > a[href*="take-order.php?edit_order"],
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle,
  html.sidebar-collapsed td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle{
    width:25px!important;
    height:25px!important;
    min-width:25px!important;
    min-height:25px!important;
    max-width:25px!important;
    max-height:25px!important;
    flex:0 0 25px!important;
    padding:0!important;
    margin:0!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons i,
  html.sidebar-collapsed td.order-actions .order-action-icons i{
    font-size:13px!important;
    width:13px!important;
    height:13px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form,
  html.sidebar-collapsed td.order-actions .status-change-form{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    width:100%!important;
    max-width:100%!important;
    margin:6px auto 0 auto!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form select,
  html.sidebar-collapsed td.order-actions .status-change-form select{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:118px!important;
    height:30px!important;
    padding:3px 5px!important;
    font-size:9.5px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form .btn,
  html.sidebar-collapsed td.order-actions .status-change-form .btn{
    flex:0 0 30px!important;
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    padding:0!important;
    font-size:9.5px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-current-status,
  html.sidebar-collapsed td.order-actions .order-current-status{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:100%!important;
    margin:5px auto 0 auto!important;
    padding-top:5px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-current-status .badge,
  html.sidebar-collapsed td.order-actions .order-current-status .badge{
    min-width:0!important;
    max-width:95px!important;
    padding:4px 6px!important;
    font-size:8.5px!important;
    line-height:1.05!important;
  }
}

/* Ajuste carrito manual: edición estable de observaciones */
.manual-cart-note-view{
  display:grid;
  gap:6px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px 10px;
  color:var(--text);
  font-size:12px;
  line-height:1.25;
}
.manual-cart-note-empty{color:#8b95aa;font-style:italic;font-weight:700}
.manual-cart-edit-note{
  border:0;
  background:var(--primary);
  color:#fff;
  border-radius:10px;
  padding:7px 10px;
  font-weight:900;
  cursor:pointer;
  width:max-content;
  max-width:100%;
}
.manual-cart-edit-note:hover{filter:brightness(.95)}
.manual-note-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.55);
  padding:18px;
}
.manual-note-modal-box{
  width:min(520px,100%);
  background:var(--card,#fff);
  border-radius:22px;
  box-shadow:0 22px 70px rgba(0,0,0,.28);
  padding:22px;
  border:1px solid var(--line,#e5e7eb);
}
.manual-note-modal-box h3{margin:0 0 6px;color:var(--text);font-size:22px}
.manual-note-modal-box p{margin:0 0 12px;color:#65728c;font-weight:800}
.manual-note-modal-box textarea{
  width:100%;
  min-height:130px;
  resize:vertical;
  border:1px solid var(--line,#d9deea);
  border-radius:14px;
  padding:12px;
  font:inherit;
  color:var(--text);
  background:#fff;
}
.manual-note-modal-box textarea:focus{outline:2px solid rgba(108,60,255,.18);border-color:var(--primary)}
.manual-note-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}
.manual-note-modal-actions .btn{width:auto;margin-top:0}
@media(max-width:640px){.manual-note-modal-actions .btn{width:100%}}

/* =========================================================
   FIX DEFINITIVO iPad/tablet - ORDENES: estado visible
   Fecha: 2026-07-04
   Objetivo: solo tablet/iPad con menú contraído. El estado actual
   queda dentro de ACCIÓN, sin quedar cortado al borde derecho.
========================================================= */
@media (min-width:761px) and (max-width:1400px){
  html.sidebar-collapsed .orders-card-modern,
  html.sidebar-collapsed .orders-card-modern .table-wrap{
    overflow:hidden!important;
  }

  html.sidebar-collapsed .orders-table-modern{
    table-layout:fixed!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  /* Redistribución tablet/iPad: se gana espacio para ACCIÓN sin afectar móvil/escritorio */
  html.sidebar-collapsed .orders-table-modern th:nth-child(1),
  html.sidebar-collapsed .orders-table-modern td:nth-child(1){width:8%!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(2),
  html.sidebar-collapsed .orders-table-modern td:nth-child(2){width:8%!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(3),
  html.sidebar-collapsed .orders-table-modern td:nth-child(3){width:20%!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(4),
  html.sidebar-collapsed .orders-table-modern td:nth-child(4){width:5%!important;text-align:center!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(5),
  html.sidebar-collapsed .orders-table-modern td:nth-child(5){width:8%!important;text-align:right!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(6),
  html.sidebar-collapsed .orders-table-modern td:nth-child(6){width:9%!important;text-align:right!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(7),
  html.sidebar-collapsed .orders-table-modern td:nth-child(7){width:8%!important;text-align:center!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(8),
  html.sidebar-collapsed .orders-table-modern td:nth-child(8){width:11%!important;text-align:left!important;}

  html.sidebar-collapsed .orders-table-modern th:nth-child(9),
  html.sidebar-collapsed .orders-table-modern td:nth-child(9){width:23%!important;text-align:center!important;}

  html.sidebar-collapsed .orders-table-modern td.order-actions,
  html.sidebar-collapsed td.order-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    overflow:visible!important;
    padding-left:6px!important;
    padding-right:6px!important;
    box-sizing:border-box!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons,
  html.sidebar-collapsed td.order-actions .order-action-icons{
    width:100%!important;
    max-width:168px!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    margin:0 auto!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > .btn-icon,
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > a.btn-icon,
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > button.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > .btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > a.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > button.btn-icon,
  html.sidebar-collapsed td.order-actions .order-action-icons > a[href*="take-order.php?edit_order"],
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle,
  html.sidebar-collapsed td.order-actions .order-action-icons > .delivery-wait-bar.delivery-wait-circle{
    width:27px!important;
    height:27px!important;
    min-width:27px!important;
    min-height:27px!important;
    max-width:27px!important;
    max-height:27px!important;
    flex:0 0 27px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form,
  html.sidebar-collapsed td.order-actions .status-change-form{
    width:100%!important;
    max-width:170px!important;
    margin:7px auto 0 auto!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form select,
  html.sidebar-collapsed td.order-actions .status-change-form select{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:32px!important;
    padding:4px 7px!important;
    font-size:10.5px!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .status-change-form .btn,
  html.sidebar-collapsed td.order-actions .status-change-form .btn{
    flex:0 0 34px!important;
    width:34px!important;
    min-width:34px!important;
    height:32px!important;
    padding:0!important;
    font-size:10px!important;
    border-radius:9px!important;
  }

  /* Estado actual en bloque vertical y 100% visible */
  html.sidebar-collapsed .orders-table-modern td.order-actions .order-current-status,
  html.sidebar-collapsed td.order-actions .order-current-status{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:170px!important;
    margin:7px auto 0 auto!important;
    padding-top:7px!important;
    border-top:1px dashed #e6e8f2!important;
    overflow:visible!important;
    text-align:center!important;
    box-sizing:border-box!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-current-status .order-current-label,
  html.sidebar-collapsed td.order-actions .order-current-status .order-current-label{
    display:block!important;
    width:100%!important;
    font-size:8.8px!important;
    line-height:1!important;
    letter-spacing:.07em!important;
    white-space:nowrap!important;
    text-align:center!important;
  }

  html.sidebar-collapsed .orders-table-modern td.order-actions .order-current-status .badge,
  html.sidebar-collapsed td.order-actions .order-current-status .badge{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:5px 6px!important;
    font-size:9.5px!important;
    line-height:1.08!important;
    white-space:normal!important;
    overflow:visible!important;
    text-align:center!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
    box-sizing:border-box!important;
  }
}

/* ===== TAZ ANDES 2026-07-22: presentación elegante de productos y totales ===== */
.orders-table-modern tbody > tr > td{
  vertical-align:middle!important;
}
.orders-table-modern .order-products-cell,
.orders-table-modern .order-qty-cell,
.orders-table-modern .order-unit-price-cell{
  padding-top:18px!important;
  padding-bottom:18px!important;
}
.orders-table-modern .order-products-stack,
.orders-table-modern .order-qty-stack,
.orders-table-modern .order-price-stack{
  width:100%!important;
  align-self:center!important;
}
.orders-table-modern .order-product-line,
.orders-table-modern .order-qty-line,
.orders-table-modern .order-price-line{
  box-sizing:border-box!important;
  min-height:48px!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid #dfe4ee!important;
}
.orders-table-modern .order-product-line{
  padding-left:0!important;
  padding-right:14px!important;
}
.orders-table-modern .order-qty-line{
  padding-left:8px!important;
  padding-right:8px!important;
}
.orders-table-modern .order-price-line{
  padding-left:12px!important;
  padding-right:0!important;
}
.orders-table-modern .order-product-line:last-child,
.orders-table-modern .order-qty-line:last-child,
.orders-table-modern .order-price-line:last-child{
  border-bottom:0!important;
}
.orders-table-modern .order-product-line .item-note{
  display:inline-block!important;
  margin-top:5px!important;
  padding:3px 8px!important;
  border-radius:7px!important;
  line-height:1.2!important;
}
.orders-table-modern .general-note-row{
  margin-top:12px!important;
  padding-top:12px!important;
  border-top:1px solid #dfe4ee!important;
  line-height:1.25!important;
}
.orders-table-modern .order-total-cell{
  padding-left:14px!important;
  padding-right:14px!important;
  text-align:right!important;
}
.orders-table-modern .order-total-summary{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:7px!important;
  width:100%!important;
  min-width:132px!important;
  margin-left:auto!important;
}
.orders-table-modern .order-total-row{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  justify-content:center!important;
  gap:2px!important;
  text-align:right!important;
}
.orders-table-modern .order-total-row span{
  display:block!important;
  width:100%!important;
  color:#7d89a3!important;
  font-size:11px!important;
  line-height:1.05!important;
  font-weight:800!important;
  text-align:right!important;
}
.orders-table-modern .order-total-row strong{
  display:block!important;
  width:100%!important;
  color:#62728e!important;
  font-size:14px!important;
  line-height:1.1!important;
  font-weight:900!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.orders-table-modern .order-total-grand{
  margin-top:2px!important;
  padding-top:7px!important;
  border-top:1px solid #dfe4ee!important;
}
.orders-table-modern .order-total-grand span,
.orders-table-modern .order-total-grand strong{
  color:#273653!important;
}
.orders-table-modern .order-total-grand strong{
  font-size:16px!important;
}

/* ===== 2026-07-22: nota general fuera de la cuadrícula Artículo / UND. / Precio ===== */
.orders-table-modern .order-general-note-tr > td{
  border-top:0!important;
}
.orders-table-modern .order-general-note-cell{
  padding:0 18px 18px 18px!important;
  vertical-align:top!important;
  background:inherit!important;
}
.orders-table-modern .order-general-note-cell .general-note-row{
  margin:0!important;
  padding:12px 14px!important;
  border-top:1px solid #dfe4ee!important;
  border-radius:0 0 10px 10px!important;
  background:#f8f9fc!important;
  color:#243250!important;
  font-weight:700!important;
  line-height:1.3!important;
  text-align:left!important;
}
.orders-table-modern .order-general-note-cell .general-note-row b{
  font-weight:900!important;
}
/* La nota ya no forma parte de la celda de artículos. */
.orders-table-modern .order-products-cell > .general-note-row{
  display:none!important;
}


/* =========================================================
   TAZ ANDES ERP · EXPERIENCIA TIPO APP EN MÓVILES
   ========================================================= */
html,body{min-height:100%;}
@supports (height:100dvh){html,body{min-height:100dvh;}}

@media (max-width:760px){
  html{
    width:100%;
    height:100%;
    overflow:hidden;
    background:var(--body-bg,#f4f5f9);
    overscroll-behavior:none;
  }
  body.erp-app-shell{
    width:100%;
    height:100%;
    min-height:100%;
    margin:0;
    overflow:hidden;
    background:var(--body-bg,#f4f5f9);
    -webkit-text-size-adjust:100%;
    overscroll-behavior:none;
  }
  body.erp-app-shell .layout{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
    background:var(--body-bg,#f4f5f9);
  }
  @supports (height:100dvh){body.erp-app-shell .layout{height:100dvh!important;}}

  body.erp-app-shell .sidebar{
    position:relative!important;
    inset:auto!important;
    flex:0 0 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    z-index:300!important;
    border:0!important;
    border-bottom:1px solid rgba(125,135,168,.16)!important;
    box-shadow:0 8px 24px rgba(16,24,40,.08)!important;
    padding-top:env(safe-area-inset-top)!important;
    background:var(--card-bg,#fff)!important;
  }
  body.erp-app-shell .sidebar-collapse-btn,
  body.erp-app-shell .icon-rail{display:none!important;}
  body.erp-app-shell .menu-panel{
    display:block!important;
    width:100%!important;
    max-height:none!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.erp-app-shell .brand{
    min-height:58px!important;
    padding:8px 16px!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    border-bottom:1px solid rgba(125,135,168,.12)!important;
  }
  body.erp-app-shell .brand img{width:42px!important;height:42px!important;object-fit:contain!important;}
  body.erp-app-shell .brand strong{font-size:14px!important;letter-spacing:.08em!important;}
  body.erp-app-shell .brand small{font-size:10px!important;}
  body.erp-app-shell .erp-mobile-module-nav{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    padding:8px 12px 10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.erp-app-shell .erp-mobile-module-nav::-webkit-scrollbar{display:none!important;}
  body.erp-app-shell .erp-mobile-module-nav a{
    flex:0 0 auto!important;
    min-height:40px!important;
    margin:0!important;
    padding:9px 13px!important;
    border-radius:14px!important;
    white-space:nowrap!important;
    font-size:12px!important;
    font-weight:900!important;
    scroll-snap-align:center!important;
    background:rgba(109,53,255,.055)!important;
    border:1px solid rgba(109,53,255,.08)!important;
  }
  body.erp-app-shell .erp-mobile-module-nav a.active{
    color:#fff!important;
    background:linear-gradient(135deg,#7a43ff,#5c2df4)!important;
    border-color:transparent!important;
    box-shadow:0 8px 20px rgba(109,53,255,.28)!important;
  }

  body.erp-app-shell .main{
    position:relative!important;
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    min-width:0!important;
    min-height:0!important;
    width:100%!important;
    height:auto!important;
    margin:0!important;
    overflow:hidden!important;
  }
  body.erp-app-shell .topbar{
    position:relative!important;
    inset:auto!important;
    z-index:250!important;
    flex:0 0 auto!important;
    min-height:58px!important;
    padding:8px 12px!important;
    gap:8px!important;
    border-bottom:1px solid rgba(125,135,168,.12)!important;
    box-shadow:0 5px 18px rgba(16,24,40,.05)!important;
    background:rgba(255,255,255,.96)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
  }
  [data-theme="dark"] body.erp-app-shell .topbar{background:rgba(17,24,39,.96)!important;}
  body.erp-app-shell .topbar-user-block{min-width:0!important;flex:1 1 auto!important;line-height:1.15!important;}
  body.erp-app-shell .topbar-user-block strong{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;}
  body.erp-app-shell .topbar-user-block small{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;}
  body.erp-app-shell .topbar-colombia-clock{display:none!important;}
  body.erp-app-shell .top-actions{display:flex!important;flex:0 0 auto!important;gap:6px!important;}
  body.erp-app-shell .theme-toggle,
  body.erp-app-shell .top-actions .btn{min-height:40px!important;padding:8px 11px!important;border-radius:13px!important;font-size:11px!important;}
  body.erp-app-shell .theme-toggle span{display:none!important;}

  body.erp-app-shell .content{
    flex:1 1 auto!important;
    min-height:0!important;
    width:100%!important;
    padding:14px 12px calc(18px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
    scroll-behavior:smooth!important;
  }
  body.erp-app-shell .card{border-radius:18px!important;box-shadow:0 8px 25px rgba(23,31,70,.06)!important;}
  body.erp-app-shell input,
  body.erp-app-shell select,
  body.erp-app-shell textarea,
  body.erp-app-shell button{font-size:16px;}
  body.erp-app-shell .btn{min-height:42px;border-radius:13px;}
  body.erp-app-shell .table-wrap{border-radius:16px!important;-webkit-overflow-scrolling:touch!important;}
}

/* Login móvil a pantalla completa y compatible con modo standalone */
@media (max-width:760px){
  body.erp-app-login{
    width:100%;
    min-height:100vh!important;
    margin:0!important;
    padding:calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom))!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:auto!important;
    background:linear-gradient(135deg,#29155c 0%,#6d3cff 48%,#20d6b0 100%)!important;
  }
  @supports (min-height:100dvh){body.erp-app-login{min-height:100dvh!important;}}
  body.erp-app-login .login-card{
    width:min(100%,420px)!important;
    margin:0!important;
    padding:28px 22px!important;
    border-radius:28px!important;
    box-shadow:0 24px 65px rgba(38,31,83,.16)!important;
  }
  body.erp-app-login .login-card img{width:86px!important;height:86px!important;object-fit:contain!important;}
  body.erp-app-login .login-card input{min-height:52px!important;border-radius:15px!important;font-size:16px!important;}
  body.erp-app-login .login-card .btn{min-height:52px!important;border-radius:15px!important;font-size:15px!important;}
}

@media (display-mode:standalone){
  body.erp-app-shell .sidebar{padding-top:max(8px,env(safe-area-inset-top))!important;}
  body.erp-app-shell .content{padding-bottom:calc(24px + env(safe-area-inset-bottom))!important;}
}
