*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f5f7fb;color:#182230}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.topbar{height:68px;background:#fff;border-bottom:1px solid #e7eaf0;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#1f2937;color:#fff;font-weight:800}.brand strong{display:block;font-size:15px}.brand small{display:block;color:#8a94a6;font-size:11px}.top-user{display:flex;gap:18px;align-items:center;font-size:13px}.top-user a{color:#d14a4a}.layout{display:flex;min-height:calc(100vh - 68px)}.sidebar{width:245px;background:#fff;border-right:1px solid #e7eaf0;padding:18px 12px;flex-shrink:0}.sidebar a{display:flex;justify-content:space-between;padding:11px 13px;border-radius:9px;font-size:13px;margin:2px 0}.sidebar a:hover{background:#f1f4f8}.sidebar .disabled{color:#a1a9b6;cursor:not-allowed}.sidebar small{font-size:9px}.nav-title{font-size:10px;color:#9aa3b1;font-weight:800;letter-spacing:.08em;padding:18px 13px 6px}.content{padding:28px;flex:1;max-width:1500px;margin:auto;width:100%}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.page-head h1{margin:0;font-size:27px}.page-head p{margin:5px 0 0;color:#7a8495;font-size:13px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stat,.panel{background:#fff;border:1px solid #e7eaf0;border-radius:14px;box-shadow:0 3px 12px rgba(22,34,51,.03)}.stat{padding:20px}.stat span,.stat small{display:block;color:#7c8797;font-size:12px}.stat strong{display:block;font-size:29px;margin:8px 0}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{padding:20px;margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.panel h2{font-size:16px;margin:0}.panel h3{font-size:14px;margin:22px 0 10px}.panel-head a{font-size:12px;color:#5167d8}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{text-align:left;padding:11px 9px;border-bottom:1px solid #eef0f4;vertical-align:middle}th{color:#7c8797;font-size:10px;text-transform:uppercase;letter-spacing:.05em}.stock-danger{color:#c23f3f;font-weight:700}.badge{padding:6px 9px;border-radius:20px;background:#eef1f6;color:#5e6877;font-size:10px;font-weight:700}.alert{padding:12px 15px;border-radius:10px;margin-bottom:16px;font-size:13px}.alert.success{background:#e9f7ee;color:#287b4a}.alert.error{background:#fdecec;color:#a33b3b}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}label{display:block;font-size:11px;font-weight:700;color:#5d6878;margin-bottom:12px}input,select,textarea{display:block;width:100%;margin-top:6px;border:1px solid #dce1e8;border-radius:9px;padding:10px 11px;background:#fff;color:#1d2735;font:inherit;font-size:13px;outline:none}textarea{min-height:78px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#7485df;box-shadow:0 0 0 3px rgba(116,133,223,.12)}button,.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:11px 15px;background:#27364d;color:#fff;font-weight:700;font-size:12px;cursor:pointer;text-decoration:none}.button.secondary,.btn.secondary,.secondary{background:#eef1f6;color:#344257}.button.full{width:100%;margin-top:12px}.button:disabled,button:disabled{opacity:.5;cursor:not-allowed}.inline-form{display:flex;gap:8px;margin:0}.inline-form input,.inline-form select{margin:0;min-width:150px}.compact-form{display:flex;gap:5px}.compact-form select{margin:0;width:auto;min-width:80px;padding:7px}.small{padding:7px 9px;font-size:10px}.narrow{max-width:700px}.empty{padding:25px;text-align:center;color:#7f8998;font-size:13px}.flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.flow div{background:#f4f6fa;border:1px solid #e7eaf0;padding:10px;border-radius:9px;font-size:11px}.muted{color:#7c8797;font-size:12px}.block{display:block}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f4f6fa,#e9edf5)}.login-card{width:min(410px,92vw);background:#fff;padding:32px;border-radius:18px;box-shadow:0 15px 50px rgba(20,32,50,.12)}.center{justify-content:center;margin-bottom:28px}.login-card h1{margin:0 0 5px}.hint{font-size:11px;color:#8b94a2;text-align:center;margin:18px 0 0}
.table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.table-card{background:#fff;border:1px solid #e7eaf0;border-radius:15px;padding:18px;box-shadow:0 3px 12px rgba(22,34,51,.03)}.table-card h2{font-size:18px;margin:12px 0 5px}.table-card p{margin:4px 0}.table-top,.kitchen-head{display:flex;justify-content:space-between;align-items:center}.table-number{font-size:24px}.status-pill{display:inline-flex;padding:5px 8px;border-radius:20px;background:#eef1f6;color:#586477;font-size:10px;font-weight:700}.state-libre .status-pill{background:#e9f7ee;color:#287b4a}.state-ocupada .status-pill,.status-llego{background:#fff2d9;color:#95630b}.state-cuenta .status-pill{background:#fcebea;color:#a33b3b}.state-reservada .status-pill,.status-confirmada{background:#e9edff;color:#4858a5}.reservation-mini{margin-top:10px;padding:9px;border-radius:8px;background:#f6f7fa;font-size:11px}.mini-tables{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}.mini-table{border:1px solid #e1e5eb;border-radius:10px;padding:10px;background:#fff;display:flex;justify-content:space-between;font-size:11px}.mini-table.selected{border-color:#6475db;box-shadow:0 0 0 3px rgba(100,117,219,.1)}.mini-table.state-ocupada{background:#fff9f3}.order-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.product-picker{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.product-btn{background:#fff;color:#1d2735;border:1px solid #e0e4eb;text-align:left;display:flex;justify-content:space-between;gap:8px;min-height:55px}.product-btn:hover{border-color:#7585db;background:#f8f9ff}.product-btn span{white-space:nowrap;color:#596579}.cart{min-height:100px}.cart-row{display:grid;grid-template-columns:1fr 65px 85px 32px;gap:8px;align-items:center;border-bottom:1px solid #eef0f4;padding:9px 0;font-size:12px}.cart-row input{margin:0;padding:7px}.remove{background:#fcebea;color:#a33b3b;padding:6px 8px}.cart-total{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e7eaf0;margin-top:15px;padding-top:14px;font-size:13px}.cart-total strong{font-size:18px}.kitchen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.kitchen-card{background:#fff;border:1px solid #e7eaf0;border-radius:15px;padding:17px;box-shadow:0 3px 12px rgba(22,34,51,.03)}.kitchen-card.estado-pendiente{border-left:4px solid #d89a2b}.kitchen-card.estado-en_preparacion{border-left:4px solid #5a72cf}.kitchen-card.estado-listo{border-left:4px solid #3d9860}.kitchen-head span{font-size:11px;color:#7c8797}.kitchen-product{padding:20px 0 10px;font-size:15px}.kitchen-product small{display:block;color:#7c8797;margin-top:6px}.kitchen-actions{margin-top:14px}.kitchen-actions form{margin:0}.kitchen-actions button{width:100%}
@media(max-width:1000px){.sidebar{width:210px}.cards{grid-template-columns:1fr 1fr}.order-layout{grid-template-columns:1fr}}@media(max-width:720px){.topbar{padding:0 14px}.top-user span{display:none}.layout{display:block}.sidebar{width:100%;border-right:0;border-bottom:1px solid #e7eaf0;display:flex;overflow:auto;padding:8px}.sidebar .nav-title{display:none}.sidebar a{white-space:nowrap}.content{padding:18px}.grid-2{grid-template-columns:1fr}.cards{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.page-head{align-items:flex-start;gap:10px;flex-wrap:wrap}.page-head h1{font-size:22px}.mini-tables{grid-template-columns:repeat(2,1fr)}.product-picker{grid-template-columns:1fr}.inline-form{width:100%}.inline-form input{min-width:0}.cart-row{grid-template-columns:1fr 55px 75px 32px}}
.active-order-box{margin:16px 0;padding:14px 15px;border:1px solid #dfe4ec;border-radius:12px;background:#f8faff}.active-order-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.active-order-head strong{display:block;font-size:14px}.active-order-head small{display:block;color:#748198;margin-top:4px}.active-order-head a{font-size:12px}.active-order-items>div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #e8ecf2;font-size:12px}.active-order-total{display:flex;justify-content:space-between;padding-top:10px;font-size:13px}.small-note{margin:10px 0 0;font-size:11px;line-height:1.45}.info-box{margin:16px 0;padding:12px 14px;border-radius:10px;background:#eef4ff;color:#52627a;font-size:12px}.kitchen-head div{min-width:0}.kitchen-head small{display:block;color:#748198;margin-top:4px;font-weight:500}.kitchen-time{margin:8px 0 12px;color:#748198;font-size:12px}.kitchen-items{border-top:1px solid #edf0f4}.kitchen-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #edf0f4}.kitchen-item strong{font-size:14px}.kitchen-item small{display:block;color:#748198;margin-top:4px}.kitchen-item .status-pill{white-space:nowrap}.status-pendiente{background:#fff4dc;color:#9b6a0d}.status-en_preparacion{background:#edf0ff;color:#4e61ae}.status-listo{background:#e9f7ee;color:#287b4a}.kitchen-note{margin-top:12px;padding:10px 12px;border-radius:9px;background:#f7f8fa;font-size:12px;line-height:1.45}.kitchen-card.estado-entregado{opacity:.75}

.cash-closed-alert{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cash-closed-alert a{font-weight:800;text-decoration:underline;margin-left:4px}
.legend{display:flex;gap:8px;flex-wrap:wrap;margin:-8px 0 18px}.legend .status-pill{background:#eef1f6}.state-libre-pill{background:#e9f7ee!important;color:#287b4a!important}.state-ocupada-pill{background:#fff2d9!important;color:#95630b!important}.state-cuenta-pill{background:#fcebea!important;color:#a33b3b!important}.account-mini{margin-top:10px;padding:9px;border-radius:8px;background:#fff5e8;color:#8d5e16;font-size:11px}.badge-active{background:#e9f7ee;color:#287b4a}.badge-inactive{background:#fcebea;color:#a33b3b}.row-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.inline-action{display:inline-flex;margin:0}.danger{background:#fcebea!important;color:#a33b3b!important}.success-btn{background:#e9f7ee!important;color:#287b4a!important}.edit-panel{border-left:4px solid #6576db}.span-2{grid-column:span 2}.block{display:block}.cancel-form{margin:0}.cancel-form button{white-space:nowrap}.panel table{min-width:620px}@media(max-width:720px){.span-2{grid-column:auto}.panel table{min-width:560px}}
.smart-search{display:flex;align-items:center;gap:7px;border:1px solid #dce1e8;border-radius:10px;background:#fff;padding:0 10px;min-width:270px}.smart-search:focus-within{border-color:#7485df;box-shadow:0 0 0 3px rgba(116,133,223,.12)}.smart-search span{color:#7c8797;font-size:18px}.smart-search input{border:0;box-shadow:none;margin:0;padding:10px 2px;background:transparent}.smart-search input:focus{border:0;box-shadow:none}.smart-client{position:relative}.smart-client-input{padding-right:35px}.smart-client-results{position:absolute;left:0;right:0;top:100%;z-index:20;background:#fff;border:1px solid #dce1e8;border-radius:10px;box-shadow:0 12px 28px rgba(22,34,51,.12);margin-top:4px;overflow:hidden;display:none}.smart-client-results.show{display:block}.smart-client-result{display:block;width:100%;border:0;border-radius:0;background:#fff;color:#1d2735;text-align:left;padding:10px 12px;border-bottom:1px solid #eef0f4;font-weight:500}.smart-client-result:hover{background:#f5f7fb}.smart-client-result strong{display:block}.smart-client-result small{display:block;color:#7c8797;margin-top:3px}.quick-add-client{margin:6px 0 0;background:#eef1f6;color:#344257;padding:8px 11px;font-size:11px}.smart-client-selected{margin-top:6px;padding:8px 10px;border-radius:8px;background:#eef4ff;color:#40538e;font-size:11px}.smart-client-selected button{float:right;padding:3px 6px;background:transparent;color:#40538e}.modal-backdrop{position:fixed;inset:0;background:rgba(20,30,45,.45);display:grid;place-items:center;padding:20px;z-index:100}.modal-backdrop[hidden]{display:none}.modal-card{width:min(460px,100%);background:#fff;border-radius:16px;box-shadow:0 24px 70px rgba(20,30,45,.25);padding:22px}.modal-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:18px}.modal-head h2{margin:0;font-size:19px}.modal-head p{margin:5px 0 0;color:#7a8495;font-size:12px}.modal-close{width:34px;height:34px;padding:0;background:#eef1f6;color:#344257;font-size:22px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.modal-error{background:#fdecec;color:#a33b3b;border-radius:9px;padding:9px 11px;font-size:12px;margin-top:8px}.field-hint{display:block;color:#8a94a6;font-size:10px;font-weight:500;margin-top:-7px}.product-search{margin-bottom:10px;min-width:0;width:100%}.product-search input{width:100%}.product-btn.is-hidden{display:none}@media(max-width:720px){.smart-search{min-width:0;width:100%}.panel-head{align-items:flex-start;flex-wrap:wrap}}

/* Fase 7-10: caja, división, auditoría y personal */
.cash-work-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start}
.cash-accounts-panel,.cash-movement-panel{min-width:0}
.movement-form{display:grid;grid-template-columns:150px minmax(120px,1fr) 130px auto;gap:8px;align-items:center}
.type-picker{position:relative}.type-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;background:#fff;color:#26364d;border:1px solid #dce1e8}.type-options{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:50;background:#fff;border:1px solid #dce1e8;border-radius:10px;box-shadow:0 14px 35px rgba(20,30,45,.14);overflow:hidden}.type-options button{display:block;width:100%;text-align:left;border:0;border-radius:0;background:#fff;color:#26364d;padding:10px 12px}.type-options button:hover{background:#f3f6fa}
.cash-close-summary{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:12px 14px;background:#f6f8fb;border-radius:10px;margin-bottom:12px;color:#66748a;font-size:12px}.cash-close-summary strong{color:#172942;font-size:16px}.close-form{display:grid;grid-template-columns:240px minmax(180px,1fr) auto;gap:8px}.split-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,.85fr);gap:18px}.split-mode{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0 18px}.split-mode .mode{background:#f0f3f7;color:#44546a;border:1px solid #e2e6ec;font-size:11px;padding:9px 6px}.split-mode .mode.active{background:#26364d;color:#fff;border-color:#26364d}.allocation-box{padding:12px;border:1px solid #e3e7ed;border-radius:10px;background:#f8fafc;margin:12px 0}.allocation-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #e6eaf0}.allocation-row:last-child{border-bottom:0}.allocation-row input{max-width:120px}.pay-balance{display:flex;justify-content:space-between;padding:13px 0;margin:12px 0;border-top:1px solid #e5e9ef;border-bottom:1px solid #e5e9ef}.pay-balance strong{font-size:18px}.audit-filters{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr)) auto auto;gap:8px;align-items:end}.role-list{display:grid;gap:8px}.role-list>div{padding:10px 12px;background:#f7f9fb;border-radius:9px}.role-list small{display:block;color:#788499;margin-top:3px}.compact{margin:10px 0 4px}.cash-accounts-panel .table-wrap{overflow-x:auto}
@media(max-width:950px){.cash-work-grid,.split-layout{grid-template-columns:1fr}.movement-form{grid-template-columns:1fr 1fr}.close-form{grid-template-columns:1fr}.audit-filters{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.movement-form,.split-mode{grid-template-columns:1fr 1fr}.split-mode .mode{font-size:10px}.audit-filters{grid-template-columns:1fr}.cash-close-summary{display:block}.cash-close-summary span{display:block;margin-bottom:5px}}


/* =========================================================
   AJUSTE VISUAL ACTUAL — RESTAURANTE
   No modifica la lógica ni los flujos del sistema.
   ========================================================= */
:root{
  --rest-ink:#1f2d3d;
  --rest-primary:#8f4f3f;
  --rest-primary-dark:#713b30;
  --rest-accent:#c98a4a;
  --rest-soft:#fbf5ef;
  --rest-green:#3f7f5d;
  --rest-border:#eadfd6;
  --rest-bg:#f7f7f5;
}

html,body{max-width:100%;overflow-x:hidden}
body{background:var(--rest-bg);color:var(--rest-ink)}
.topbar{background:#fffdfb;border-bottom-color:var(--rest-border)}
.brand-mark{background:var(--rest-primary)}
.top-user a{color:var(--rest-primary)}
.sidebar{background:#fffdfb;border-right-color:var(--rest-border)}
.sidebar a:hover{background:var(--rest-soft)}
.sidebar a.active{background:var(--rest-soft);color:var(--rest-primary-dark)}
.nav-title{color:#a87968}
.content{max-width:1500px}
.stat,.panel,.table-card,.kitchen-card{
  border-color:var(--rest-border);
  box-shadow:0 4px 16px rgba(75,48,38,.045);
}
.stat strong,.panel h2,.page-head h1{color:#172638}
.button,button{background:var(--rest-ink)}
.button:hover,button:hover{background:#2b3b4e}
.button.secondary,.btn.secondary,.secondary{background:#f2eee9;color:#5d473e}
.button.secondary:hover,.secondary:hover{background:#e8e0d9}
input:focus,select:focus,textarea:focus{
  border-color:var(--rest-primary);
  box-shadow:0 0 0 3px rgba(143,79,63,.12)
}
.panel-head a,.page-head a{color:var(--rest-primary)}
.flow div{background:#fcf7f2;border-color:var(--rest-border)}
.alert.success{background:#eaf6ee;color:#2f7550}
.alert.error{background:#fdeeed;color:#a33b3b}

/* Caja: sin scroll horizontal en las dos áreas operativas */
.cash-work-grid{
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  gap:16px;
}
.cash-accounts-panel,.cash-movement-panel{min-width:0}
.cash-accounts-panel .table-wrap,
.cash-movement-panel .table-wrap{
  overflow-x:hidden;
}
.cash-work-grid table{
  min-width:0 !important;
  width:100%;
  table-layout:fixed;
}
.cash-accounts-panel th:nth-child(1){width:34%}
.cash-accounts-panel th:nth-child(2){width:18%}
.cash-accounts-panel th:nth-child(3){width:23%}
.cash-accounts-panel th:nth-child(4){width:25%}
.cash-accounts-panel td:last-child{text-align:right}
.cash-accounts-panel td,.cash-accounts-panel th,
.cash-movement-panel td,.cash-movement-panel th{
  white-space:normal;
  overflow-wrap:anywhere;
}
.cash-movement-panel th:nth-child(1){width:16%}
.cash-movement-panel th:nth-child(2){width:18%}
.cash-movement-panel th:nth-child(3){width:42%}
.cash-movement-panel th:nth-child(4){width:24%}

/* Movimiento manual: compacto y alineado */
.movement-form{
  grid-template-columns:minmax(125px,.7fr) minmax(150px,1.35fr) minmax(105px,.75fr) auto;
}
.movement-form .type-picker{min-width:0}
.movement-form input{min-width:0}
.type-toggle{
  border-color:var(--rest-border);
}
.type-toggle:hover{background:#faf5f0;color:var(--rest-primary-dark)}
.type-options{border-color:var(--rest-border)}
.type-options button:hover{background:var(--rest-soft)}
.cash-close-summary{background:#faf6f1;border:1px solid var(--rest-border)}
.cash-close-summary strong{color:var(--rest-primary-dark)}

/* Caja: jerarquía visual más clara */
.cash-work-grid .panel-head h2,
.cash-movement-panel>h2{font-size:17px}
.cash-accounts-panel .button.small{padding:8px 12px}
.cash-accounts-panel table tbody tr:hover,
.cash-movement-panel table tbody tr:hover{background:#fcfaf8}
.cash-accounts-panel .empty,
.cash-movement-panel .empty{background:#fcfaf8;border-radius:10px}

/* Estados del restaurante */
.state-libre .status-pill,.state-libre-pill{
  background:#eaf6ee!important;color:#2f7550!important
}
.state-cuenta .status-pill,.state-cuenta-pill{
  background:#fceeea!important;color:#a34d3e!important
}
.state-ocupada .status-pill,.state-ocupada-pill{
  background:#fff3df!important;color:#99651c!important
}
.badge-active,.success-btn{
  background:#eaf6ee!important;color:#2f7550!important
}
.badge-inactive,.danger{
  background:#fceeea!important;color:#a34d3e!important
}

/* Tarjetas y buscadores */
.smart-search:focus-within{border-color:var(--rest-primary);box-shadow:0 0 0 3px rgba(143,79,63,.11)}
.smart-client-results{border-color:var(--rest-border)}
.smart-client-result:hover{background:var(--rest-soft)}
.quick-add-client{background:#f2eee9;color:#5d473e}.quick-add-client:hover{background:var(--rest-primary)!important;color:#fff!important;border-color:var(--rest-primary)!important}
.modal-card{border:1px solid var(--rest-border)}
.modal-close{background:#f2eee9;color:#5d473e}

/* Cocina / comandero con el mismo lenguaje visual */
.kitchen-card.estado-pendiente{border-left-color:#c98a4a}
.kitchen-card.estado-en_preparacion{border-left-color:#6978bd}
.kitchen-card.estado-listo{border-left-color:#3f8a61}

/* Evita que controles grandes provoquen ancho extra */
.panel,.stat,.cash-work-grid>*{min-width:0}
img,video,canvas,iframe{max-width:100%}

@media(max-width:950px){
  .cash-work-grid{grid-template-columns:1fr}
  .movement-form{grid-template-columns:1fr 1.35fr .8fr auto}
}
@media(max-width:720px){
  .content{padding:18px 14px}
  .cash-work-grid{gap:12px}
  .cash-accounts-panel .table-wrap,
  .cash-movement-panel .table-wrap{overflow-x:hidden}
  .cash-work-grid table{font-size:11px}
  .cash-work-grid th,.cash-work-grid td{padding:9px 6px}
  .cash-accounts-panel th:nth-child(1){width:31%}
  .cash-accounts-panel th:nth-child(2){width:17%}
  .cash-accounts-panel th:nth-child(3){width:27%}
  .cash-accounts-panel th:nth-child(4){width:25%}
  .movement-form{grid-template-columns:1fr 1fr}
  .movement-form .type-picker{grid-column:1}
  .movement-form input[name="concepto"]{grid-column:2}
  .movement-form input[name="monto"]{grid-column:1}
  .movement-form>button{grid-column:2}
}
@media(max-width:430px){
  .cards{grid-template-columns:1fr}
  .movement-form{grid-template-columns:1fr}
  .movement-form .type-picker,
  .movement-form input[name="concepto"],
  .movement-form input[name="monto"],
  .movement-form>button{grid-column:auto}
  .cash-work-grid table{font-size:10px}
  .cash-work-grid th,.cash-work-grid td{padding:8px 4px}
}

/* =========================================================
   KUANTIKA FOOD — refinamiento visual y responsive
   ========================================================= */
.restaurant-primary{background:var(--rest-primary)!important;color:#fff!important}
.restaurant-primary:hover{background:var(--rest-primary-dark)!important}
.page-head .button,.page-head button{color:#fff!important}
.page-head .button.secondary{color:#5d473e!important}
.new-product-panel{border-top:3px solid var(--rest-primary)}
.new-product-panel[hidden]{display:none}
.section-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.09em;color:var(--rest-primary);font-weight:800;margin-bottom:5px}
.cash-status-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid var(--rest-border);background:#fff}
.cash-status-chip.is-open{color:#2f7550;background:#eaf6ee;border-color:#d7ecdf}
.cash-status-chip.is-closed{color:#a33b3b;background:#fcebea;border-color:#f1d8d5}
.status-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#b63f3f;box-shadow:0 0 0 3px rgba(182,63,63,.10);vertical-align:middle}
.status-dot.dot-green{background:#3f8a61;box-shadow:0 0 0 3px rgba(63,138,97,.12)}
.status-dot.dot-red{background:#b63f3f;box-shadow:0 0 0 3px rgba(182,63,63,.12)}
.cash-history-status{display:inline-flex;align-items:center;gap:7px;font-weight:700}
.cash-summary-cards .stat:first-child{border-top:3px solid #3f8a61}
.cash-open-panel{border-top:3px solid var(--rest-primary)}

/* Pickers de búsqueda inteligente */
.smart-picker{position:relative}
.smart-picker-input{padding-right:12px}
.smart-picker-results{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:60;background:#fff;border:1px solid var(--rest-border);border-radius:11px;box-shadow:0 16px 38px rgba(55,39,31,.15);overflow:hidden;display:none}
.smart-picker-results.show{display:block}
.smart-picker-result{display:block;width:100%;border:0;border-radius:0;background:#fff;color:#26364d;text-align:left;padding:11px 13px;border-bottom:1px solid #f0ebe7;font-weight:500}
.smart-picker-result:last-child{border-bottom:0}
.smart-picker-result:hover{background:var(--rest-soft);color:var(--rest-primary-dark)}
.smart-picker-result strong{display:block}
.smart-picker-result small{display:block;margin-top:3px;color:#7c8797;font-size:10px}
.smart-picker-selected{margin-top:6px;padding:8px 10px;border-radius:8px;background:var(--rest-soft);color:#5d473e;font-size:11px}
.wide-modal{width:min(620px,100%)}

/* Tablas: no forzar ancho que provoque scroll horizontal */
.table-wrap{overflow-x:hidden}
.table-wrap table,.panel table{min-width:0!important;width:100%;table-layout:fixed}
td,th{overflow-wrap:anywhere}

/* Identidad de restaurante */
.brand-mark{background:linear-gradient(145deg,var(--rest-primary),var(--rest-primary-dark));border-radius:12px}
.topbar{box-shadow:0 2px 12px rgba(75,48,38,.04)}
.sidebar a{transition:background .18s ease,color .18s ease,transform .18s ease}
.sidebar a:hover{transform:translateX(1px)}
.panel,.stat{transition:box-shadow .18s ease,border-color .18s ease}
.panel:hover,.stat:hover{box-shadow:0 7px 22px rgba(75,48,38,.07)}

@media(max-width:900px){
  .layout{display:block}
  .sidebar{width:100%;border-right:0;border-bottom:1px solid var(--rest-border);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;padding:10px}
  .sidebar .nav-title{grid-column:1/-1;padding:10px 9px 4px}
  .sidebar>a{margin:0}
  .content{max-width:none;padding:22px 16px}
  .grid-2,.cards{grid-template-columns:1fr 1fr}
  .page-head{gap:14px}
}
@media(max-width:620px){
  .topbar{height:auto;min-height:64px;padding:10px 14px;gap:10px}
  .brand strong{font-size:13px}.brand small{font-size:10px}
  .top-user{font-size:11px;gap:8px}.top-user span{display:none}
  .sidebar{grid-template-columns:1fr 1fr}
  .content{padding:16px 12px}
  .page-head{align-items:flex-start;flex-direction:column;margin-bottom:16px}
  .page-head button,.page-head .button{width:100%}
  .grid-2,.cards,.form-grid{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .smart-search{width:100%;min-width:0}
  .panel{padding:15px}
  .table-wrap{overflow-x:hidden}
  .table-wrap table,.panel table{font-size:11px}
  .table-wrap th,.table-wrap td,.panel th,.panel td{padding:8px 5px}
  .cash-status-chip{width:100%;justify-content:center}
  .cash-work-grid{grid-template-columns:1fr}
  .movement-form{grid-template-columns:1fr 1fr}
  .movement-form .type-picker{grid-column:1}
  .movement-form input[name="concepto"]{grid-column:2}
  .movement-form input[name="monto"]{grid-column:1}
  .movement-form>button{grid-column:2}
  .close-form{grid-template-columns:1fr}
}
@media(max-width:430px){
  .sidebar{grid-template-columns:1fr}
  .sidebar .nav-title{grid-column:1}
  .movement-form{grid-template-columns:1fr}
  .movement-form .type-picker,.movement-form input[name="concepto"],.movement-form input[name="monto"],.movement-form>button{grid-column:auto}
  /* En móvil dejamos solo lo esencial en tablas operativas */
  #productsTable th:nth-child(2),#productsTable td:nth-child(2),
  #productsTable th:nth-child(4),#productsTable td:nth-child(4),
  #suppliersTable th:nth-child(3),#suppliersTable td:nth-child(3),
  #clientsTable th:nth-child(3),#clientsTable td:nth-child(3){display:none}
}
\n/* Dashboard analítico y módulo de inventario */
.dashboard-head{align-items:flex-end}.dashboard-date{display:flex;align-items:flex-end}.dashboard-date label{margin:0}.dashboard-date input{min-width:170px}.dashboard-stats .stat-sales{border-top:3px solid var(--rest-primary)}.dashboard-grid{display:grid;grid-template-columns:1.25fr .9fr .9fr;gap:18px}.dashboard-grid .panel:nth-child(1){grid-row:span 2}.dashboard-bottom{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dashboard-date-label{font-size:11px;color:#8a94a6}.bar-chart{height:260px;display:flex;align-items:stretch;gap:8px;padding:20px 4px 0}.bar-item{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.bar-track{height:190px;width:100%;max-width:42px;background:#f2eee9;border-radius:8px 8px 3px 3px;display:flex;align-items:flex-end;overflow:hidden}.bar-fill{width:100%;background:linear-gradient(180deg,var(--rest-primary),var(--rest-primary-dark));border-radius:8px 8px 3px 3px}.bar-item small{font-size:9px;color:#7c8797}.bar-value{font-size:9px;color:#66748a;white-space:nowrap}.ranking-list{display:grid;gap:2px}.ranking-row{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #f0ebe7}.ranking-row:last-child{border-bottom:0}.ranking-row strong{display:block;font-size:12px}.ranking-row small{display:block;color:#8a94a6;font-size:10px;margin-top:3px}.ranking-row b{font-size:11px}.rank{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:var(--rest-soft);color:var(--rest-primary-dark);font-size:10px;font-weight:800}.mini-bars{height:180px;display:flex;align-items:flex-end;gap:12px;padding:10px 5px 0}.mini-bars>div{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}.mini-bar-track{height:120px;width:100%;max-width:34px;background:#f2eee9;border-radius:7px 7px 3px 3px;display:flex;align-items:flex-end;overflow:hidden}.mini-bar-fill{width:100%;background:var(--rest-primary);border-radius:7px 7px 3px 3px}.mini-bars strong{font-size:9px}.mini-bars small{font-size:9px;color:#7c8797}.payment-list{display:grid;gap:4px}.payment-list div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f0ebe7;font-size:12px}.inventory-stats{margin-bottom:18px}.inventory-search{width:360px}.stock-low{background:#fcebea;color:#a33b3b}.stock-ok{background:#e9f7ee;color:#287b4a}
@media(max-width:1100px){.dashboard-grid{grid-template-columns:1fr 1fr}.dashboard-grid .panel:nth-child(1){grid-row:auto}.dashboard-bottom{grid-template-columns:1fr}}@media(max-width:720px){.dashboard-head{align-items:stretch}.dashboard-date input{width:100%}.dashboard-date{width:100%}.dashboard-grid{grid-template-columns:1fr}.inventory-search{width:100%}.bar-chart{gap:4px}.bar-value{font-size:8px}.mini-bars{gap:6px}}

/* =========================================================
   KUANTIKA FOOD — UI moderna 2026
   Bootstrap 5.3 + Bootstrap Icons + Flatpickr
   ========================================================= */
.nav-icon{width:22px;display:inline-flex;justify-content:center;margin-right:9px;font-size:15px;color:var(--rest-primary)}
.sidebar a{align-items:center;justify-content:flex-start;gap:0}
.sidebar a span{flex:1}
.brand-mark{display:grid;place-items:center;background:linear-gradient(145deg,var(--rest-primary),var(--rest-primary-dark));box-shadow:0 7px 18px rgba(143,79,63,.20)}
.brand-mark i{font-size:18px}
.stat{position:relative;overflow:hidden}
.stat-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--rest-soft);color:var(--rest-primary);margin-bottom:12px;font-size:17px}
.dashboard-date-field>span{display:flex;align-items:center;gap:6px}
.date-control{position:relative;min-width:190px}
.date-control>i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--rest-primary);z-index:2;pointer-events:none}
.date-control input{padding-left:37px!important;margin-top:6px!important;min-width:190px!important;cursor:pointer;background:#fffdfb}
.flatpickr-calendar{border:1px solid var(--rest-border)!important;border-radius:16px!important;box-shadow:0 18px 45px rgba(55,39,31,.16)!important;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif!important;overflow:hidden}
.flatpickr-months,.flatpickr-weekdays{background:#fffaf6!important}
.flatpickr-current-month,.flatpickr-weekday{color:var(--rest-ink)!important}
.flatpickr-day.selected,.flatpickr-day.selected:hover{background:var(--rest-primary)!important;border-color:var(--rest-primary)!important}
.flatpickr-day.today{border-color:var(--rest-accent)!important}
.flatpickr-day:hover{background:var(--rest-soft)!important;border-color:var(--rest-soft)!important}
.dashboard-grid .panel,.dashboard-bottom .panel{border-radius:16px}
.panel-head h2{display:flex;align-items:center;gap:8px}
.panel-head h2:before{content:'';width:5px;height:18px;border-radius:99px;background:var(--rest-accent);display:inline-block}
@media(max-width:620px){.date-control,.date-control input{width:100%;min-width:0!important}.dashboard-date-field{width:100%}.stat-icon{width:34px;height:34px}}

/* =========================================================
   KUANTIKA FOOD — UI 2026 / cabecera, acciones y kardex
   ========================================================= */
.top-user{gap:10px}
.top-user>a,.top-user>.top-account{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  color:var(--rest-ink);text-decoration:none
}
.top-account{font-weight:600}
.top-account i{font-size:19px;color:var(--rest-primary)}
.top-notification{
  position:relative;width:38px;height:38px;border-radius:11px;
  background:#fff7f2;border:1px solid var(--rest-border);
  color:var(--rest-primary)!important;font-size:18px
}
.top-notification:hover{background:var(--rest-soft)}
.top-notification b{
  position:absolute;right:-4px;top:-5px;min-width:17px;height:17px;padding:0 4px;
  display:grid;place-items:center;border-radius:999px;background:#b63f3f;color:#fff;
  font-size:9px;line-height:1;border:2px solid #fff
}
.top-notification:not(.has-alerts){color:#7f8998!important;background:#fafafa}
.top-logout{
  width:38px;height:38px;border-radius:11px;color:var(--rest-primary)!important;
  font-size:18px
}
.top-logout:hover{background:var(--rest-soft)}
.button,button{background:var(--rest-primary);color:#fff}
.button:hover,button:hover{background:var(--rest-primary-dark)}
.button.secondary,.btn.secondary,.secondary{background:#f2eee9;color:#5d473e}
.button.secondary:hover,.secondary:hover{background:#e8e0d9}
.remove{background:#fcebea!important;color:#a33b3b!important}
.danger{background:#fcebea!important;color:#a33b3b!important}
.success-btn{background:#eaf6ee!important;color:#2f7550!important}
.kitchen-actions button,.table-card .button.full{background:var(--rest-primary)}
.kitchen-actions button:hover,.table-card .button.full:hover{background:var(--rest-primary-dark)}
.page-head{margin-bottom:20px}
.content{padding-top:30px}
.panel-head h2 i{color:var(--rest-primary);font-size:.9em}

/* Dashboard date: modern Flatpickr appearance */
.flatpickr-calendar{
  border:1px solid var(--rest-border)!important;border-radius:14px!important;
  box-shadow:0 18px 45px rgba(55,39,31,.16)!important;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif!important
}
.flatpickr-months .flatpickr-month,.flatpickr-current-month{height:44px}
.flatpickr-current-month{font-size:13px;font-weight:800}
.flatpickr-weekdays{background:#fffaf7}
.flatpickr-weekday{color:#7a8495!important;font-size:10px;font-weight:700}
.flatpickr-day{border-radius:9px!important}
.flatpickr-day.selected,.flatpickr-day.selected:hover{
  background:var(--rest-primary)!important;border-color:var(--rest-primary)!important
}
.flatpickr-day.today{border-color:var(--rest-primary)!important}
.flatpickr-day:hover{background:var(--rest-soft)!important;border-color:var(--rest-soft)!important}
.date-control{border-color:var(--rest-border)!important;border-radius:11px!important}
.date-control>i{color:var(--rest-primary)!important}

/* Kardex */
.kardex-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:18px;align-items:stretch}
.kardex-register,.kardex-summary-panel{margin-bottom:18px}
.kardex-register{border-top:3px solid var(--rest-primary)}
.kardex-summary-panel{border-top:3px solid #d9c0a6}
.kardex-product-input,.filter-input{
  display:flex;align-items:center;gap:8px;
  border:1px solid #dce1e8;border-radius:10px;background:#fff;
  margin-top:6px;padding:0 11px
}
.kardex-product-input:focus-within,.filter-input:focus-within{
  border-color:var(--rest-primary);box-shadow:0 0 0 3px rgba(143,79,63,.11)
}
.kardex-product-input>i,.filter-input>i{color:#8a94a6}
.kardex-product-input input,.filter-input input{
  border:0!important;box-shadow:none!important;margin:0!important;padding:10px 2px
}
.kardex-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.kardex-summary>div{
  display:flex;align-items:center;gap:9px;padding:11px 8px;border:1px solid #f0e8e2;
  border-radius:11px;background:#fffaf7
}
.kardex-summary small{display:block;color:#8a94a6;font-size:9px}
.kardex-summary strong{display:block;font-size:15px;margin-top:2px}
.summary-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;flex:0 0 auto}
.summary-icon.in{background:#eaf6ee;color:#2f7550}
.summary-icon.out{background:#fcebea;color:#a33b3b}
.summary-icon.stock{background:#f2eee9;color:var(--rest-primary)}
.kardex-legend{display:flex;gap:15px;flex-wrap:wrap;margin-top:13px;color:#718095;font-size:10px}
.movement-dot{font-size:7px;margin-right:5px}
.dot-in{color:#3f8a61}.dot-out{color:#b63f3f}
.kardex-history{padding-bottom:10px}
.kardex-history-head{margin-bottom:12px}
.kardex-count{padding:6px 9px;border-radius:999px;background:var(--rest-soft);color:var(--rest-primary-dark);font-size:10px;font-weight:800}
.kardex-filters{
  display:grid;grid-template-columns:145px 145px 175px minmax(210px,1fr) auto;
  gap:10px;align-items:end;padding:13px;margin-bottom:14px;border:1px solid #f0e8e2;
  border-radius:12px;background:#fffaf7
}
.kardex-filters label{margin:0}
.kardex-filter-search{min-width:0}
.kardex-filter-actions{display:flex;gap:7px}
.kardex-filter-actions .button,.kardex-filter-actions button{height:39px;white-space:nowrap}
.kardex-table-wrap{overflow-x:auto!important}
.kardex-table{min-width:1060px!important;table-layout:auto!important}
.kardex-table th,.kardex-table td{padding:11px 9px}
.kardex-table tbody tr:hover{background:#fffaf7}
.kardex-date strong,.kardex-date small,.kardex-product strong,.kardex-product small{display:block}
.kardex-date strong{font-size:11px;color:#334257}
.kardex-date small,.kardex-product small{font-size:9px;color:#8a94a6;margin-top:2px}
.kardex-product strong{font-size:11px}
.movement-badge{
  display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border-radius:999px;
  font-size:9px;font-weight:800;white-space:nowrap
}
.movement-in{background:#eaf6ee;color:#2f7550}
.movement-out{background:#fcebea;color:#a33b3b}
.kardex-qty{font-size:11px}
.stock-before{color:#7a8495;font-variant-numeric:tabular-nums}
.movement-value{font-weight:900;font-size:12px;font-variant-numeric:tabular-nums}
.value-in{color:#2f7550}.value-out{color:#b63f3f}
.stock-after{font-size:12px;color:#172638;font-variant-numeric:tabular-nums}
.kardex-reason{color:#5d6878;font-size:10px}
.kardex-user{display:inline-flex;align-items:center;gap:5px;color:#5d6878;font-size:10px;white-space:nowrap}
.kardex-user i{color:var(--rest-primary);font-size:13px}
.kardex-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:45px 15px;color:#7f8998}
.kardex-empty i{font-size:28px;color:#c8b2a3;margin-bottom:3px}
.kardex-empty strong{font-size:12px;color:#5d6878}.kardex-empty span{font-size:10px}
@media(max-width:1100px){
  .kardex-layout{grid-template-columns:1fr}
  .kardex-filters{grid-template-columns:1fr 1fr}
  .kardex-filter-search{grid-column:1/-1}
  .kardex-filter-actions{grid-column:1/-1}
}
@media(max-width:720px){
  .content{padding-top:20px}
  .top-user{gap:4px}.top-account span{display:none}
  .top-account,.top-notification,.top-logout{width:34px;height:34px}
  .kardex-filters{grid-template-columns:1fr}
  .kardex-filter-search,.kardex-filter-actions{grid-column:auto}
  .kardex-filter-actions>*{flex:1}
  .kardex-summary{grid-template-columns:1fr}
  .kardex-layout{gap:0}
}


/* Fase 11 — Tesorería separada de Caja */
.cash-movement-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;background:#faf6f1;border:1px solid var(--rest-border);border-radius:10px;margin-bottom:14px}.cash-movement-note strong{display:block;color:var(--rest-primary-dark);font-size:12px}.cash-movement-note small{display:block;color:#788499;font-size:11px;margin-top:3px}.treasury-status-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid var(--rest-border);border-radius:999px;background:#fffdfb;color:#4a5a6f;font-weight:700;font-size:12px}.treasury-work-grid{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);align-items:start}.treasury-manual-panel,.treasury-movements-panel,.treasury-history-panel{min-width:0}.treasury-examples{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:13px;color:#8791a1;font-size:10px}.treasury-examples b{padding:5px 8px;background:#f7f2ed;color:#715548;border-radius:999px;font-weight:600}.treasury-history-panel{margin-top:16px}.treasury-summary-cards .stat small{display:block;margin-top:5px;color:#8993a3}.treasury-closed-panel{margin-bottom:16px}.treasury-movements-panel table{min-width:0!important;width:100%;table-layout:fixed}.treasury-movements-panel th:nth-child(1){width:16%}.treasury-movements-panel th:nth-child(2){width:18%}.treasury-movements-panel th:nth-child(3){width:42%}.treasury-movements-panel th:nth-child(4){width:24%}@media(max-width:950px){.treasury-work-grid{grid-template-columns:1fr}}

/* =========================================================
   Fase 11.1 — Administración profesional de mesas
   ========================================================= */
.content{padding-top:30px!important;margin-top:0!important}
.page-head{margin-top:0!important}
.eyebrow{font-size:10px;color:var(--rest-primary);font-weight:800;letter-spacing:.09em;margin-bottom:7px}
.table-admin-summary{margin-bottom:18px}
.table-admin-summary .stat strong{display:flex;align-items:center;min-height:35px}
.admin-table-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);gap:18px;align-items:stretch}
.table-editor-panel,.table-admin-info,.table-admin-list{min-width:0}
.table-editor-panel .panel-head,.table-admin-info .panel-head{margin-bottom:18px}
.table-editor-panel label{margin-bottom:0}
.table-form-help{display:flex;align-items:center;gap:9px;min-height:43px;padding:0 4px;color:#7b8797;font-size:11px}
.table-form-help i{color:var(--rest-primary);font-size:16px}
.table-form-actions{justify-content:flex-start!important;margin-top:4px}
.table-form-actions button{min-width:150px}
.admin-info-list{display:grid;gap:0}
.admin-info-list>div{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #f0ebe7}
.admin-info-list>div:last-child{border-bottom:0}
.admin-info-list>div>i{flex:0 0 30px;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--rest-soft);color:var(--rest-primary);font-size:14px}
.admin-info-list strong,.admin-info-list span{display:block}
.admin-info-list strong{font-size:12px;color:#27374a;margin-bottom:3px}
.admin-info-list span{font-size:11px;line-height:1.45;color:#7d8796}
.table-admin-list{margin-top:18px}
.admin-count{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--rest-border);border-radius:999px;background:#fffaf7;color:#7a5c50;font-size:10px;font-weight:700}
.admin-tables-table{min-width:760px!important}
.admin-tables-table td:first-child strong,.admin-tables-table td:first-child small{display:block}
.admin-tables-table td:first-child small{font-size:9px;color:#8a94a6;margin-top:3px}
.admin-tables-table tr.is-inactive{opacity:.72}
.table-admin-flag{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:700;padding:5px 8px;border-radius:999px}
.table-admin-flag.warning{background:#fff3df;color:#94611b}
.table-admin-flag.info{background:#edf0ff;color:#4d60ad}
.table-admin-flag.quiet{background:#f1f5f2;color:#54715e}
.button.small,button.small{padding:8px 11px;font-size:11px}
.table-admin-footer-note{display:flex;gap:10px;align-items:flex-start;margin:14px 2px 0;color:#788494;font-size:10px;line-height:1.45}
.table-admin-footer-note>i{color:var(--rest-primary);font-size:15px;margin-top:1px}
.table-admin-footer-note strong,.table-admin-footer-note span{display:block}
.table-admin-footer-note strong{color:#596879;font-size:11px;margin-bottom:2px}
@media(max-width:950px){.admin-table-layout{grid-template-columns:1fr}}
@media(max-width:720px){.content{padding-top:18px!important}.table-form-help{padding:8px 0;min-height:0}.admin-count{width:100%;justify-content:center}.table-admin-list .panel-head{width:100%}.table-admin-list .panel-head>div{width:100%}}


/* Fase 11.1 — gestión profesional y creación masiva de mesas */
.table-admin-bulk{border-top:3px solid var(--rest-accent)}
.table-bulk-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(170px,.55fr) minmax(170px,.55fr) auto;gap:12px;align-items:end}
.table-bulk-grid label{margin:0}
.table-sequence-note{display:flex;gap:9px;align-items:flex-start;padding:11px 13px;margin-top:13px;background:#fffaf7;border:1px solid #f0e8e2;border-radius:10px;color:#748094;font-size:10px}
.table-sequence-note i{color:var(--rest-primary);font-size:15px}
.table-sequence-note strong{display:block;color:#4f5e71;font-size:11px;margin-bottom:2px}
.table-bulk-preview{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.table-bulk-preview span{padding:5px 8px;border-radius:999px;background:var(--rest-soft);color:var(--rest-primary-dark);font-size:10px;font-weight:700}
.table-bulk-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:1000px){.table-bulk-grid{grid-template-columns:1fr 1fr}.table-bulk-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:620px){.table-bulk-grid{grid-template-columns:1fr}.table-bulk-actions{grid-column:auto}.table-bulk-actions>*{width:100%}}
/* Kardex: filtros automáticos + exportación */
.kardex-filters{grid-template-columns:145px 145px 175px minmax(210px,1fr) auto}
.kardex-auto-note{font-size:10px;color:#7a8495;margin-top:8px}
.kardex-export{display:inline-flex;align-items:center;gap:7px}

/* Personal: listado principal + roles, con alta de usuario colapsada. */
.personal-page-head{margin-bottom:18px}.personal-page-head .button{white-space:nowrap}.new-user-panel{border-left:4px solid #9b5543}.new-user-panel[hidden]{display:none}.personal-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(280px,1fr);gap:18px;align-items:start}.personal-users-panel,.roles-panel{min-width:0}.personal-list-head{align-items:flex-start}.personal-list-head .muted{margin:5px 0 0}.count-pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:20px;background:#f8efe9;color:#8f4e3d;font-size:10px;font-weight:800;white-space:nowrap}.personal-table th:last-child,.personal-table td:last-child{white-space:nowrap}.role-chip{display:inline-flex;padding:5px 9px;border-radius:20px;background:#f2f4f7;color:#344257;font-size:10px;font-weight:700}.personal-traceability{display:flex;align-items:center;gap:9px;margin-top:14px;padding:10px 12px;border-radius:10px;background:#f7f8fa;color:#7c8797;font-size:11px}.personal-traceability i{color:#9b5543;font-size:15px}.professional-role-list{display:flex;flex-direction:column;gap:9px}.professional-role-list .role-item{display:flex;align-items:center;gap:11px;padding:11px 12px;background:#f8f9fb;border:1px solid #eef0f4;border-radius:11px}.professional-role-list .role-icon{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border-radius:9px;background:#fff4ed;color:#9b5543}.professional-role-list strong{display:block;font-size:12px;color:#182230}.professional-role-list small{display:block;margin-top:3px;color:#7c8797;font-size:10px;line-height:1.35}@media(max-width:1000px){.personal-layout{grid-template-columns:minmax(0,2.2fr) minmax(250px,1fr)}}@media(max-width:720px){.personal-layout{grid-template-columns:1fr}.roles-panel{order:2}.personal-users-panel{order:1}.personal-page-head{align-items:flex-start}.personal-list-head{gap:10px;flex-wrap:wrap}}

/* Fase 11.2 — navegación plegable, kardex y microinteracciones profesionales */
/* Acordeón del menú: los estados iniciales se aplican antes del primer repintado, evitando desplazamientos al navegar. */
.sidebar .nav-group-items{will-change:max-height,opacity}

.nav-group{margin:0}.nav-toggle{width:100%;border:0;background:transparent;color:#a87968;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:12px 14px 7px;font-size:12px;font-weight:800;letter-spacing:.04em}.nav-toggle:hover{background:transparent!important;color:#8f4f3f}.nav-toggle i{font-size:11px;transition:transform .2s ease;color:#b68a78}.nav-group-items{overflow:hidden;max-height:700px;transition:max-height .24s ease,opacity .18s ease}.nav-group.is-collapsed .nav-group-items{max-height:0;opacity:0}.nav-group.is-collapsed .nav-toggle i{transform:rotate(-90deg)}
.page-head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.kardex-summary-first{border-top:3px solid #d9c0a6;margin-bottom:18px}.kardex-summary-expanded{grid-template-columns:repeat(5,1fr)}.kardex-summary-expanded>div{min-height:76px}.kardex-summary-expanded em{display:block;font-style:normal;color:#8a94a6;font-size:9px;margin-top:3px}.summary-alert .summary-icon{background:#f5f1ed;color:#9b654e}.summary-alert.has-alert .summary-icon{background:#fdebea;color:#b33d3d}.summary-alert.has-warning .summary-icon{background:#fff3df;color:#9a681c}.kardex-near-stock{margin-top:14px;padding:11px 13px;border:1px solid #eadfd7;border-radius:10px;background:#fffaf6;display:flex;gap:12px;align-items:flex-start}.kardex-near-stock>strong{white-space:nowrap;color:#8f4f3f;font-size:11px}.kardex-near-stock>div{display:flex;flex-wrap:wrap;gap:6px}.kardex-near-stock span{padding:5px 8px;border-radius:999px;background:#fff;border:1px solid #eee1d8;color:#667285;font-size:9px}.kardex-near-stock b{color:#8f4f3f;margin-left:3px}.kardex-modal{width:min(620px,100%)}
.mini-table{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;min-height:58px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}.mini-table:hover{transform:translateY(-3px) scale(1.025);border-color:var(--rest-primary);box-shadow:0 10px 22px rgba(75,48,38,.12);background:#fffaf7;z-index:2}.mini-table.selected{transform:translateY(-2px) scale(1.02)}.mini-table-icon{width:30px;height:30px;border-radius:9px;background:var(--rest-soft);display:grid;place-items:center;color:var(--rest-primary);font-size:14px}.mini-table-state{display:inline-flex;align-items:center;gap:4px;font-size:9px}.mini-table-state i{font-size:10px}.mini-table strong{font-size:11px}
@media(max-width:1000px){.kardex-summary-expanded{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.page-head-actions{width:100%}.page-head-actions>*{flex:1;justify-content:center}.kardex-summary-expanded{grid-template-columns:1fr 1fr}.kardex-near-stock{flex-direction:column}.nav-toggle{padding-left:9px;padding-right:9px}}


/* Fase 11.3 — Reportes y Auditoría profesionales */
.report-page-head,.audit-page-head{margin-bottom:18px}.report-live-badge,.audit-live-badge{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--rest-border);border-radius:999px;background:#fff;color:#6f7a8c;font-size:10px;font-weight:800}.report-live-badge i{color:#3f8a61}.audit-live-badge i{color:var(--rest-primary)}
.report-filter-panel{background:linear-gradient(180deg,#fff,#fffcfa);border-top:3px solid var(--rest-accent)}.report-filters{display:grid;grid-template-columns:220px 220px 1fr;gap:12px;align-items:end}.report-filters label,.audit-filters label{margin:0}.report-filters label>span,.audit-filters label>span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#7b8797}.report-filters input{margin-top:6px}.report-filter-status{display:flex;align-items:center;gap:9px;min-height:41px;padding:0 13px;border:1px solid #efe4dd;border-radius:10px;background:#fffaf6;color:#7b8797;font-size:11px}.report-filter-status i{color:var(--rest-primary);font-size:15px}.report-summary-cards{margin-bottom:18px}.report-stat{position:relative;overflow:hidden;padding:18px 20px 17px}.report-stat-icon,.audit-stat-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--rest-soft);color:var(--rest-primary);font-size:16px;margin-bottom:8px}.report-stat-primary{border-top:3px solid var(--rest-primary)}.report-stat strong{margin:4px 0;font-size:27px}.report-stat small{display:block;color:#8a94a6;font-size:10px}.report-period-stat strong{font-size:17px;line-height:1.3}.report-main-grid{margin-bottom:0}.report-panel{padding:18px 20px}.report-panel .panel-head{align-items:center}.report-section-icon{color:var(--rest-primary);margin-right:7px}.report-subtitle,.audit-subtitle{display:block;margin-top:4px;color:#8792a3;font-size:10px}.count-pill{display:inline-flex;align-items:center;gap:6px}.report-table th{padding-top:8px}.report-table td{padding:12px 9px}.report-number-badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:4px 7px;border-radius:999px;background:#f5f1ed;color:#73584c;font-size:10px;font-weight:800}.money-cell{font-weight:800;color:#35465b}.method-chip{display:inline-flex;align-items:center;gap:6px;color:#44546a}.method-chip i{color:var(--rest-primary)}.compact-empty{padding:20px}.compact-empty i{display:block;margin-bottom:5px;font-size:18px;color:#b9a395}.product-rank{display:flex;align-items:center;gap:9px}.product-rank>span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#f5f1ed;color:#8f4f3f;font-size:10px;font-weight:800}.report-products-panel{margin-top:18px}

.audit-summary-cards{margin-bottom:18px}.audit-stat{padding:18px 20px}.audit-stat-primary{border-top:3px solid var(--rest-primary)}.audit-stat strong{margin:4px 0;font-size:27px}.audit-stat small{display:block;color:#8a94a6;font-size:10px}.audit-sensitive-stat{border-top:3px solid #c98a4a}.audit-sensitive-stat .audit-stat-icon{background:#fff3df;color:#9a681c}.audit-filter-panel{border-top:3px solid var(--rest-primary);background:linear-gradient(180deg,#fff,#fffcfa)}.audit-filter-live{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;background:#eaf6ee;color:#2f7550;font-size:9px;font-weight:800}.audit-section-icon{color:var(--rest-primary);margin-right:7px}.audit-filters{display:grid;grid-template-columns:1fr 1fr 1.15fr 1.15fr;gap:12px;align-items:end}.audit-filters input,.audit-filters select{margin-top:6px}.audit-module-strip{display:flex;flex-wrap:wrap;gap:7px;margin:-5px 0 18px;padding:0 2px}.audit-module-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #eee5df;border-radius:999px;background:#fffaf7;color:#6d7889;font-size:10px;font-weight:700}.audit-module-chip i{color:var(--rest-primary)}.audit-module-chip b{color:#8f4f3f}.audit-history-panel{padding:18px 20px}.audit-table{table-layout:auto!important;min-width:1050px!important}.audit-table th,.audit-table td{padding:11px 9px}.audit-date strong,.audit-date small{display:block}.audit-date strong{font-size:11px;color:#33445a}.audit-date small{margin-top:3px;color:#8b95a4;font-size:9px}.audit-user,.audit-ip{display:inline-flex;align-items:center;gap:6px;color:#526175;font-size:10px}.audit-user i,.audit-ip i{color:#9a5c4a;font-size:13px}.audit-module-tag,.audit-action{display:inline-flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;font-size:9px;font-weight:800;white-space:nowrap}.audit-module-tag{background:#f5f1ed;color:#75594c}.audit-module-tag i{color:#9a5c4a}.audit-action{background:#eef1f6;color:#536174}.audit-action-login{background:#edf0ff;color:#4f60a7}.audit-action-crear{background:#eaf6ee;color:#2f7550}.audit-action-editar{background:#fff3df;color:#91651c}.audit-action-anular{background:#fcebea;color:#a33b3b}.audit-action-cambiar-estado{background:#fff3df;color:#91651c}.audit-action-cobro-completo{background:#eaf6ee;color:#2f7550}.audit-action-abrir-caja{background:#edf0ff;color:#4f60a7}.audit-action-cierre{background:#fcebea;color:#a33b3b}.audit-reference{display:inline-flex;padding:5px 7px;border-radius:7px;background:#f7f8fa;color:#667386;font-size:9px;font-weight:800}.audit-dash{color:#a1a9b6;font-size:10px}.audit-detail{display:flex;flex-direction:column;gap:3px;max-width:340px;color:#6d7888;font-size:9px;line-height:1.35}.audit-detail span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audit-detail b{color:#596779}.audit-empty{display:flex;flex-direction:column;align-items:center;gap:5px;padding:35px 15px}.audit-empty i{font-size:26px;color:#b99f91}.audit-empty strong{color:#536174;font-size:12px}.audit-empty span{color:#8b95a4;font-size:10px}

@media(max-width:950px){.report-filters{grid-template-columns:1fr 1fr}.report-filter-status{grid-column:1/-1}.audit-filters{grid-template-columns:1fr 1fr}.audit-table{min-width:980px!important}}
@media(max-width:620px){.report-page-head,.audit-page-head{align-items:flex-start}.report-live-badge,.audit-live-badge{width:100%;justify-content:center}.report-filters,.audit-filters{grid-template-columns:1fr}.report-filter-status{grid-column:auto}.report-panel,.audit-history-panel{padding:15px}.report-period-stat strong{font-size:15px}.audit-module-strip{margin-top:0}.audit-table{min-width:900px!important}}

/* =========================================================
   FASE 12 — estado de sincronización en vivo
   ========================================================= */
.system-live-indicator{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #dcefe4;border-radius:999px;background:#f0faf4;color:#2f7550;font-size:10px;font-weight:800;letter-spacing:.02em;transition:.2s ease}
.system-live-indicator i{font-size:12px}.system-live-indicator.is-offline{background:#fff4f1;border-color:#f0d6cf;color:#a34d3e}
.system-live-indicator.is-offline i{animation:kfPulse 1.1s infinite}@keyframes kfPulse{50%{opacity:.35}}
#liveTablesGrid .table-card,.kitchen-card{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
#liveTablesGrid .table-card:hover,.kitchen-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(75,48,38,.08)}
#inventoryLiveBody tr,#cashLiveMovements tr,#treasuryLiveMovements tr{transition:background .25s ease}
#inventoryLiveBody tr:not([hidden]):hover,#cashLiveMovements tr:hover,#treasuryLiveMovements tr:hover{background:#fffaf7}
@media(max-width:720px){.system-live-indicator span{display:none}.system-live-indicator{padding:7px 8px}}
/* Fase 12.5 — estado del canal SSE */
.system-live-indicator.is-fallback{opacity:.9}.system-live-indicator.is-fallback i{animation:pulse-live 1.4s ease-in-out infinite}.system-live-indicator.is-offline{opacity:.8}@keyframes pulse-live{0%,100%{transform:scale(1)}50%{transform:scale(1.16)}}

/* Fase producción manual — separación de inventario físico y platos preparados */
.page-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.production-mode-badge{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #d7eadf;border-radius:999px;background:#eff9f3;color:#287b4a;font-size:11px;font-weight:800}.production-mode-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:3px solid var(--rest-accent)}.production-mode-copy{display:flex;align-items:flex-start;gap:13px}.production-mode-copy h2{margin:0;font-size:16px}.production-mode-copy p{margin:5px 0 0;color:#7a8495;font-size:12px}.production-mode-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--rest-soft);color:var(--rest-primary);font-size:18px;flex:none}.production-modes{display:flex;gap:8px;flex-wrap:wrap}.production-mode{min-width:112px;padding:10px 12px;border:1px solid #e7eaf0;border-radius:11px;background:#fff;display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center}.production-mode i{grid-row:span 2}.production-mode strong{font-size:11px}.production-mode small{font-size:9px;color:#7c8797}.production-mode.active{border-color:#cfe8d9;background:#f3fbf6;color:#287b4a}.production-mode.locked{color:#8a94a6;background:#f8f9fb}.production-mode.locked i{color:#aeb6c2}.production-form{display:grid;grid-template-columns:1.35fr .55fr 1fr auto;gap:12px;align-items:end}.production-form label{margin:0}.production-form button{height:42px;white-space:nowrap}.production-dish-field{min-width:0}.production-stats .stat-icon{color:var(--rest-primary);font-size:17px;margin-bottom:4px}.production-warning{background:#fff3df;color:#94611b}.production-stock{font-variant-numeric:tabular-nums}.production-type{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800;text-transform:capitalize}.production-in{background:#e9f7ee;color:#287b4a}.production-out{background:#fcebea;color:#a33b3b}.inventory-production-link{display:flex;align-items:center;gap:14px}.production-link-icon{width:42px;height:42px;border-radius:12px;background:var(--rest-soft);color:var(--rest-primary);display:grid;place-items:center;font-size:18px;flex:none}.inventory-production-link h2{font-size:15px;margin:0}.inventory-production-link p{margin:4px 0 0;font-size:11px}.inventory-production-link>a{margin-left:auto;white-space:nowrap}.type-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}.type-product{background:#eef3fb;color:#4b6489}.type-dish{background:#fff2e8;color:#9a5a32}
@media(max-width:1000px){.production-form{grid-template-columns:1fr 1fr}.production-form button{width:100%}.production-mode-panel{align-items:flex-start;flex-direction:column}.inventory-production-link{align-items:flex-start;flex-wrap:wrap}.inventory-production-link>a{margin-left:56px}}
@media(max-width:720px){.production-form{grid-template-columns:1fr}.production-modes{width:100%}.production-mode{flex:1}.inventory-production-link>a{margin-left:0;width:100%;justify-content:center}}

/* Fase 14.1 — Producción: selección inteligente y cantidades enteras */
.production-form{display:grid;grid-template-columns:minmax(260px,1.25fr) minmax(150px,.45fr) minmax(260px,1fr) auto;gap:12px;align-items:end}
.production-form label{margin:0;position:relative}
.field-hint{display:block;margin-top:5px;color:#8a94a6;font-size:10px;font-weight:500}
.field-hint i{color:var(--rest-primary);margin-right:4px}
.smart-combobox{position:relative;margin-top:6px}
.smart-combobox-control{height:42px;display:flex;align-items:center;gap:9px;border:1px solid #dce1e8;border-radius:9px;background:#fff;padding:0 11px;transition:border-color .18s,box-shadow .18s}
.smart-combobox-control:focus-within{border-color:#7485df;box-shadow:0 0 0 3px rgba(116,133,223,.12)}
.smart-combobox-control>i{color:var(--rest-primary);font-size:15px;flex:0 0 auto}
.smart-combobox-control input{border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;height:100%;font-size:13px;background:transparent}
.smart-combobox-options{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 5px);max-height:230px;overflow:auto;background:#fff;border:1px solid #e1e5eb;border-radius:10px;box-shadow:0 14px 35px rgba(22,34,51,.14);padding:5px}
.smart-option{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;background:#fff;color:#182230;border-radius:7px;padding:10px 11px;text-align:left;font-size:12px;font-weight:700}
.smart-option:hover,.smart-option:focus{background:#f8f3ef;color:var(--rest-primary-dark);outline:none}
.smart-option span{font-size:10px;color:#7c8797;font-weight:600;white-space:nowrap}
.smart-combobox-options.no-match:after{content:'No se encontraron platos';display:block;padding:12px;color:#8a94a6;text-align:center;font-size:11px}
.production-modes{display:flex;gap:8px;flex-wrap:wrap}
.production-mode{min-width:120px;display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center;padding:10px 12px;border:1px solid #e4e8ee;border-radius:11px;background:#fff}
.production-mode strong{font-size:11px}.production-mode small{grid-column:2;color:#7c8797;font-size:9px}.production-mode i{grid-row:1 / span 2;font-size:15px}
.production-mode.active{border-color:#cce7d6;background:#f2fbf5;color:#1f7a47}.production-mode.locked{color:#8a94a6;background:#f7f8fa}.production-mode.locked i{color:#9ca6b4}
@media(max-width:1050px){.production-form{grid-template-columns:1fr 1fr}.production-form .production-dish-field{grid-column:span 2}.production-form button{width:100%}}
@media(max-width:650px){.production-form{grid-template-columns:1fr}.production-form .production-dish-field{grid-column:auto}}

/* Estados del salón: semáforo visual, sobrio y de alto contraste */
.status-pill{font-weight:800;letter-spacing:.01em;border:1px solid transparent;transition:transform .18s ease,box-shadow .18s ease}
.state-libre .status-pill,.state-libre-pill{background:#dcf5e7!important;color:#176b3e!important;border-color:#bde7cf!important}
.state-ocupada .status-pill,.state-ocupada-pill{background:#fde2e0!important;color:#a92f2f!important;border-color:#f5c3c0!important}
.state-cuenta .status-pill,.state-cuenta-pill{background:#fff0c9!important;color:#8a5a00!important;border-color:#f2d99a!important}
#liveTablesGrid .table-card:hover .status-pill{transform:translateY(-1px)}

/* Fase 14.3 — Ajustes finos de UX: comandero y movimiento de inventario */
.order-product-group-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px;line-height:1.25}
.order-product-group-head>div{min-width:0}
.order-product-group-head strong{display:block;font-size:15px;line-height:1.3;margin:0}
.order-product-group-head small{display:block;margin-top:4px;color:#7a8495;font-size:11px;line-height:1.45}
.order-product-group-head .group-icon{flex:0 0 auto;margin-top:1px}
.kardex-modal .form-grid{align-items:start}
.kardex-modal .form-grid>label{margin-bottom:0}
.kardex-modal .form-grid>label:not(.span-2)>input,
.kardex-modal .form-grid>label:not(.span-2)>select{margin-top:7px}

/* Fase 15 — Delivery profesional */
.delivery-live-badge{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #d9eee3;border-radius:999px;background:#eff9f3;color:#287b4a;font-size:10px;font-weight:800}.delivery-live-badge i{font-size:13px}
.delivery-create{border-top:3px solid var(--rest-accent)}
.delivery-form{display:grid;grid-template-columns:minmax(310px,.8fr) minmax(500px,1.2fr);gap:18px}.delivery-customer-card,.delivery-products-card{background:#fffaf7;border:1px solid #eee3dc;border-radius:13px;padding:16px}.delivery-customer-card h3,.delivery-products-card h3{margin:0 0 14px;font-size:15px}.delivery-customer-card h3 i,.delivery-products-card h3 i{color:var(--rest-primary);margin-right:6px}.delivery-customer-card label{display:block;margin-bottom:12px}.delivery-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.delivery-client{margin-top:6px}.delivery-products-card>.smart-search{margin-bottom:13px}.delivery-product-section{margin-top:13px}.delivery-section-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:8px}.delivery-section-title strong{font-size:12px}.delivery-section-title small{color:#7a8495;font-size:10px}.delivery-section-title i{color:var(--rest-primary);margin-right:4px}.delivery-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.delivery-product-btn{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:10px 11px;border:1px solid #e0e5ec;border-radius:9px;background:#fff;text-align:left;transition:transform .15s,box-shadow .15s,border-color .15s}.delivery-product-btn:hover{transform:translateY(-1px);border-color:#d3b6a9;box-shadow:0 7px 18px rgba(75,48,38,.08)}.delivery-product-btn strong{font-size:11px}.delivery-product-btn span{font-size:10px;color:#6f7c8d;font-weight:700;white-space:nowrap}.delivery-product-btn.is-unavailable{opacity:.5}.delivery-cart{margin-top:15px;border-top:1px solid #eadfd8}.delivery-cart-row{display:grid;grid-template-columns:minmax(0,1fr) 106px 82px 30px;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #eee7e2}.delivery-cart-row strong{font-size:11px}.delivery-cart-row small{display:block;color:#8992a0;font-size:9px;margin-top:2px}.delivery-qty{display:flex;align-items:center;border:1px solid #dce2e9;border-radius:8px;overflow:hidden;background:#fff}.delivery-qty button{width:29px;height:32px;border:0;background:#f8f5f2;color:var(--rest-primary);font-weight:800}.delivery-qty input{width:48px;height:32px;border:0!important;border-left:1px solid #eee!important;border-right:1px solid #eee!important;border-radius:0!important;text-align:center!important;padding:0!important}.delivery-remove{border:0;background:transparent;color:#a84b42}.delivery-total{display:flex;justify-content:space-between;align-items:center;margin:13px 0;padding-top:11px;border-top:1px solid #e8ded7}.delivery-total span{font-size:12px;color:#6f7c8d}.delivery-total strong{font-size:18px;color:#152a42}.delivery-board-panel{margin-top:18px}.delivery-board{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:12px}.delivery-card{border:1px solid #e5e1df;border-radius:13px;padding:14px;background:#fff;box-shadow:0 4px 15px rgba(27,36,48,.035);transition:.18s}.delivery-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(27,36,48,.07)}.delivery-card.state-en_reparto{border-top:3px solid #d69b24}.delivery-card.state-entregado{border-top:3px solid #4c9669;opacity:.92}.delivery-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.delivery-order-number{font-weight:900;font-size:14px;color:#162a42;margin-right:7px}.delivery-origin{font-size:9px;font-weight:800;color:var(--rest-primary);background:#fff3eb;border-radius:999px;padding:5px 7px}.delivery-status{font-size:9px;font-weight:800;border-radius:999px;padding:6px 8px}.status-pendiente{background:#fff0c9;color:#8a5a00}.status-en_reparto{background:#eaf0ff;color:#405f9a}.status-entregado{background:#e1f4e9;color:#287b4a}.delivery-card-customer{display:grid;gap:5px;margin-top:13px}.delivery-card-customer strong{font-size:13px}.delivery-card-customer span,.delivery-card-customer small{font-size:10px;color:#657388;line-height:1.35}.delivery-card-customer i,.delivery-card-meta i,.delivery-driver-row i{color:var(--rest-primary);margin-right:4px}.delivery-card-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px solid #eee7e2;font-size:9px;color:#758196}.delivery-card-meta strong{font-size:13px;color:#152a42;margin-left:auto}.delivery-payment{padding:4px 7px;border-radius:999px;font-weight:800}.delivery-payment.is-paid{background:#e8f6ed;color:#287b4a}.delivery-payment.is-pending{background:#fff3df;color:#956116}.delivery-driver-row{margin-top:10px;font-size:10px;color:#5f6d80}.delivery-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:12px}.delivery-inline-form{display:flex;gap:6px;flex:1;min-width:190px}.delivery-inline-form select{height:36px;min-width:0;flex:1}.delivery-waiting{font-size:10px;color:#8a6a28;background:#fff8e9;border-radius:8px;padding:8px 9px}.success-button{background:#438b63!important;color:#fff!important}.delivery-charge-panel{max-width:1050px;border-top:3px solid var(--rest-accent)}.delivery-charge-summary{display:grid;grid-template-columns:1fr 1.5fr .7fr .8fr;gap:10px;margin-bottom:18px}.delivery-charge-summary>div{padding:12px;background:#fffaf7;border:1px solid #eee3dc;border-radius:10px}.delivery-charge-summary span{display:block;color:#7b8797;font-size:10px;margin-bottom:5px}.delivery-charge-summary strong{font-size:12px}.delivery-charge-form{display:grid;grid-template-columns:1fr 1fr 1.2fr auto;gap:10px;align-items:end}.delivery-charge-form label{margin:0}.delivery-charge-form button{height:42px;white-space:nowrap}.delivery-charge-details{margin-top:22px}.delivery-charge-details h2{font-size:15px}
@media(max-width:1100px){.delivery-form{grid-template-columns:1fr}.delivery-board{grid-template-columns:repeat(2,minmax(260px,1fr))}.delivery-charge-summary{grid-template-columns:1fr 1fr}.delivery-charge-form{grid-template-columns:1fr 1fr}.delivery-charge-form button{width:100%}}
@media(max-width:700px){.delivery-board{grid-template-columns:1fr}.delivery-picker{grid-template-columns:1fr}.delivery-two,.delivery-charge-summary,.delivery-charge-form{grid-template-columns:1fr}.delivery-cart-row{grid-template-columns:1fr 106px 70px 25px}.delivery-inline-form{width:100%}}

/* FASE 15.2 — navegación sin salto visual y contraste Delivery */
.nav-preload .nav-group-items{transition:none!important}
.nav-preload .nav-group.is-collapsed .nav-group-items{transition:none!important}
.delivery-product-btn{color:#182230!important}
.delivery-product-btn strong{color:#182230!important}
.delivery-product-btn span{color:#68768a!important}
.delivery-product-btn:hover strong,.delivery-product-btn:hover span{color:#182230!important}
.delivery-product-btn.is-unavailable,.delivery-product-btn.is-unavailable strong,.delivery-product-btn.is-unavailable span{color:#7f8792!important}


/* =========================================================
   FASE 15.3 — KUANTIKA FOOD · PULIDO UX/UI PREMIUM
   Capa exclusivamente visual/interactiva. No cambia reglas
   de negocio, base de datos, permisos ni SSE.
   ========================================================= */
:root{
  --kf-bg:#f3f0ec;
  --kf-surface:#fffdfb;
  --kf-surface-soft:#faf6f2;
  --kf-ink:#13263c;
  --kf-muted:#66758a;
  --kf-primary:#985743;
  --kf-primary-dark:#753e31;
  --kf-accent:#c98a4a;
  --kf-border:#e7d9cf;
  --kf-green:#23784c;
  --kf-green-bg:#e5f5eb;
  --kf-red:#b83232;
  --kf-red-bg:#fde6e4;
  --kf-amber:#8d6208;
  --kf-amber-bg:#fff1cc;
}

html{scroll-behavior:smooth}
body{background:var(--kf-bg);color:var(--kf-ink);font-size:14px;line-height:1.45}
.topbar{background:rgba(255,253,251,.97);border-bottom-color:var(--kf-border);box-shadow:0 2px 18px rgba(55,39,31,.055)}
.brand-mark{background:linear-gradient(145deg,var(--kf-primary),var(--kf-primary-dark));box-shadow:0 6px 16px rgba(117,62,49,.16)}
.brand strong{font-size:16px;color:var(--kf-ink)}
.brand small{font-size:11px}
.sidebar{background:#fcfaf8;border-right-color:var(--kf-border)}
.sidebar a{font-size:14px;color:#17304a;padding:11px 13px;border:1px solid transparent}
.sidebar a:hover{background:#f7eee8;color:var(--kf-primary-dark);transform:translateX(2px)}
.sidebar a.active{background:#f7ebe4!important;color:var(--kf-primary-dark)!important;border-color:#eed9cc}
.sidebar a.active .nav-icon{color:var(--kf-primary)}
.nav-title{font-size:11px;color:#9a6c5b}
.nav-toggle{font-size:11px;color:#9a6c5b}
.nav-toggle:hover{color:var(--kf-primary-dark)}
.content{padding:30px;max-width:1560px}
.page-head{margin-bottom:24px}
.page-head h1{font-size:30px;letter-spacing:-.02em;color:var(--kf-ink)}
.page-head p{font-size:14px;color:var(--kf-muted)}
.section-kicker{font-size:11px;letter-spacing:.1em;color:var(--kf-primary);font-weight:900}
.stat,.panel,.table-card,.kitchen-card{background:var(--kf-surface);border-color:var(--kf-border);box-shadow:0 6px 22px rgba(55,39,31,.055)}
.stat{border-radius:16px;padding:21px}
.stat:hover,.panel:hover,.table-card:hover,.kitchen-card:hover{box-shadow:0 12px 30px rgba(55,39,31,.085)}
.stat span,.stat small,.muted{color:var(--kf-muted)}
.stat strong{color:var(--kf-ink);font-size:31px}
.stat-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#f7eee8;color:var(--kf-primary);font-size:18px;margin-bottom:11px}
.panel{border-radius:16px;padding:21px}
.panel h2{font-size:18px;color:var(--kf-ink)}
.panel h3{font-size:15px}
.panel-head{margin-bottom:17px}
.panel-head a,.page-head a{color:var(--kf-primary);font-weight:700}
input,select,textarea{font-size:14px;padding:11px 12px;border-radius:10px;border-color:#d8dee6;background:#fff;color:var(--kf-ink)}
label{font-size:12px;color:#42536a}
button,.button{font-size:13px;min-height:42px;border-radius:10px;background:var(--kf-ink)}
.button:hover,button:hover{background:#22364e}
.button.secondary,.btn.secondary,.secondary{background:#f0ebe6;color:#59483f}
.button.secondary:hover,.secondary:hover{background:#e7ded7;color:#4b3a33}
.restaurant-primary,.page-head .button:not(.secondary){background:var(--kf-primary)!important;color:#fff!important}
.restaurant-primary:hover,.page-head .button:not(.secondary):hover{background:var(--kf-primary-dark)!important}

/* Semáforo: estados consistentes en todo el sistema */
.state-libre .status-pill,.state-libre-pill{background:var(--kf-green-bg)!important;color:var(--kf-green)!important;border-color:#c7e8d4!important}
.state-ocupada .status-pill,.state-ocupada-pill{background:var(--kf-red-bg)!important;color:var(--kf-red)!important;border-color:#f2c8c4!important}
.state-cuenta .status-pill,.state-cuenta-pill{background:var(--kf-amber-bg)!important;color:var(--kf-amber)!important;border-color:#efdba7!important}
.status-pill{font-size:11px;padding:6px 10px;font-weight:800;border:1px solid transparent}

/* Mesas: icono visible y protagonista, sin añadir texto redundante */
.table-card{padding:20px;position:relative}
.table-number{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#f8eee8;color:var(--kf-primary);font-size:22px;box-shadow:inset 0 0 0 1px #eeded4}
.table-card h2{font-size:20px;margin:14px 0 6px}
.table-card p{font-size:14px}
.table-card:hover .table-number{background:#f2e1d8;transform:scale(1.04)}
.table-number i{font-size:22px}

/* Comandero: selección inequívoca y lectura rápida */
.mini-table{min-height:68px;padding:10px 12px;border-radius:12px;background:#fff;border-color:#dce3eb;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease,color .16s ease}
.mini-table:hover{transform:translateY(-2px) scale(1.015);border-color:#c79d8d;background:#fbf4ef;box-shadow:0 8px 20px rgba(55,39,31,.10)}
.mini-table.selected{border-color:var(--kf-primary)!important;background:var(--kf-primary)!important;color:#fff!important;box-shadow:0 8px 22px rgba(152,87,67,.22),0 0 0 3px rgba(152,87,67,.12)!important;transform:translateY(-1px)}
.mini-table.selected .mini-table-icon,.mini-table.selected .mini-table-state,.mini-table.selected strong{color:#fff!important}
.mini-table-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#f8eee8;color:var(--kf-primary);font-size:18px;flex:0 0 auto}
.mini-table.selected .mini-table-icon{background:rgba(255,255,255,.16)}
.mini-table strong{font-size:15px}
.mini-table-state{font-size:11px;font-weight:800;color:#617188}
.mini-table-state i{margin-right:4px}
.order-product-group-head strong{font-size:16px}
.order-product-group-head small{font-size:12px;color:var(--kf-muted)}
.group-icon{width:30px;height:30px;border-radius:9px;background:#f8eee8;color:var(--kf-primary);display:grid;place-items:center;flex:0 0 auto}
.product-picker{gap:10px}
.product-btn{min-height:64px;padding:12px 14px;border-radius:11px;border-color:#dbe2ea;background:#fff;color:var(--kf-ink)!important;font-size:15px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease,color .16s ease}
.product-btn strong{font-size:15px;color:inherit!important}
.product-btn span{font-size:13px;color:#607086!important}
.product-btn:hover{transform:translateY(-2px);border-color:#c79d8d;background:#fbf4ef;color:var(--kf-ink)!important;box-shadow:0 8px 20px rgba(55,39,31,.08)}
.product-btn.is-selected{background:var(--kf-primary)!important;border-color:var(--kf-primary-dark)!important;color:#fff!important;box-shadow:0 9px 24px rgba(152,87,67,.22),0 0 0 3px rgba(152,87,67,.10)}
.product-btn.is-selected strong,.product-btn.is-selected span{color:#fff!important}
.product-btn.is-unavailable{opacity:.48}
.product-btn.is-unavailable:hover{transform:none;box-shadow:none}
.dish-stock-low{color:#8d6208!important;font-weight:800}
.product-btn.is-selected .dish-stock-low{color:#fff!important}
.cart{min-height:110px}
.cart-row{padding:13px 0;font-size:14px;grid-template-columns:1fr 72px 90px 38px}
.cart-row strong{font-size:15px}
.cart-row input{font-size:14px}
.cart-total{font-size:15px;padding-top:16px}
.cart-total strong{font-size:24px;color:var(--kf-ink)}
.active-order-box,.info-box{border-color:#e5d8d0}

/* Delivery: tarjetas legibles y selección consistente */
.delivery-product-btn{min-height:58px;padding:12px 13px;border-radius:11px;font-size:14px;color:var(--kf-ink)!important;background:#fff}
.delivery-product-btn strong{font-size:14px;color:var(--kf-ink)!important}
.delivery-product-btn span{font-size:12px;color:#617188!important}
.delivery-product-btn:hover{background:#fbf4ef}
.delivery-product-btn.is-selected{background:var(--kf-primary)!important;border-color:var(--kf-primary-dark)!important;color:#fff!important;box-shadow:0 8px 22px rgba(152,87,67,.20)}
.delivery-product-btn.is-selected strong,.delivery-product-btn.is-selected span{color:#fff!important}
.delivery-product-btn.is-unavailable,.delivery-product-btn.is-unavailable strong,.delivery-product-btn.is-unavailable span{color:#8c929a!important}
.delivery-cart-row{padding:13px 0}
.delivery-cart-row strong{font-size:14px}
.delivery-total strong{font-size:23px}

/* Tablas administrativas: más respiración y mejor lectura */
table{font-size:13px}
th{font-size:11px;color:#718097;padding-top:13px;padding-bottom:13px}
td{padding-top:13px;padding-bottom:13px}
tbody tr:hover{background:#fbf7f4}

/* Formularios y controles */
.form-grid{gap:14px}
.smart-search{min-height:44px;border-color:#d7dee7;background:#fff}
.smart-search input{font-size:14px}
.alert{font-size:13px;border:1px solid transparent}
.alert.success{border-color:#cde7d7}.alert.error{border-color:#f1cbc7}

/* Navegación: flecha y estado activos más claros */
.nav-group-items{will-change:max-height,opacity}
.nav-toggle i{font-size:12px}
.nav-group.is-collapsed .nav-toggle{opacity:.92}

/* Dashboard: apariencia de centro de operaciones */
.dashboard-stats .stat{position:relative;overflow:hidden}
.dashboard-stats .stat:after{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:#eadfd8}
.dashboard-stats .stat-sales:after{background:var(--kf-primary)}
.dashboard-grid .panel,.dashboard-bottom .panel{min-height:100%}
.ranking-row strong{font-size:13px}
.ranking-row small{font-size:11px}
.bar-track,.mini-bar-track{background:#eee8e2}
.bar-fill,.mini-bar-fill{background:linear-gradient(180deg,var(--kf-primary),var(--kf-primary-dark))}

/* Cocina / producción: colores semánticos sin saturar */
.kitchen-card{border-radius:16px}
.kitchen-product{font-size:16px}
.production-mode.active{border-color:#c7e6d3;background:#eff9f2;color:#217646}
.production-mode.locked{background:#f3f4f6}

/* Focus accesible y consistente */
button:focus-visible,.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(152,87,67,.24);outline-offset:2px}

@media(max-width:1100px){
  .content{padding:24px}
  .table-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
}
@media(max-width:720px){
  body{font-size:13px}
  .content{padding:18px 14px}
  .page-head h1{font-size:25px}
  .panel{padding:16px}
  .product-btn{min-height:60px}
  .cart-row{grid-template-columns:1fr 66px 82px 34px}
  .table-number{width:40px;height:40px}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* =========================================================
   FASE 16 — IDENTIDAD VISUAL KUANTIKA + COCINA PRO
   Capa visual y UX. Mantiene negocio, BD, permisos y SSE.
   ========================================================= */
:root{
  --kf-side:#69090d;
  --kf-side-2:#8b1117;
  --kf-side-active:#ff6a00;
  --kf-side-text:#fff7f3;
  --kf-side-muted:#f2c9bd;
}

/* Sidebar inspirado en la identidad gastronómica: sobrio, cálido y de alto contraste. */
.sidebar{
  background:linear-gradient(180deg,var(--kf-side) 0%,#760b10 58%,#5d080c 100%);
  border-right-color:rgba(255,255,255,.08);
  color:var(--kf-side-text);
  box-shadow:6px 0 24px rgba(69,8,10,.08);
}
.sidebar a{color:#fff7f3;border-color:transparent;transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.sidebar a:hover{background:rgba(255,255,255,.075);color:#fff;transform:translateX(2px);box-shadow:none}
.sidebar a.active{background:linear-gradient(90deg,#ff6a00,#f15b00)!important;color:#fff!important;border-color:rgba(255,255,255,.08)!important;box-shadow:0 7px 18px rgba(255,106,0,.18)}
.sidebar a.active .nav-icon,.sidebar .nav-icon{color:inherit}
.sidebar .nav-title,.sidebar .nav-toggle{color:#f1c1b5}
.sidebar .nav-toggle:hover{color:#fff}
.sidebar .nav-toggle i{color:#f0b2a4}
.sidebar .nav-group.is-collapsed .nav-toggle{color:#e8aa9c}

/* La cabecera conserva la superficie clara para no cansar la vista. */
.topbar{background:rgba(255,253,251,.985);box-shadow:0 3px 18px rgba(67,17,13,.07)}
.brand-mark{background:linear-gradient(145deg,#9d5945,#6f2118);color:#fff}

/* Cabeceras importantes con el degradado de la identidad Kuantika. */
.dashboard-head,.page-head{position:relative}
.dashboard-head .section-kicker{color:var(--kf-primary)}

/* Cocina: lectura tipo KDS, sin saturación de color. */
.kitchen-page-head-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#fff0e8;color:var(--kf-primary);font-size:20px;flex:0 0 auto;box-shadow:inset 0 0 0 1px #efd9cd}
.kitchen-page-title{display:flex;align-items:center;gap:12px}
.kitchen-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.kitchen-filter{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #e4dcd6;background:#fff;color:#536176;border-radius:10px;font-size:11px;font-weight:800}
.kitchen-filter.active{background:var(--kf-primary);border-color:var(--kf-primary);color:#fff;box-shadow:0 6px 16px rgba(152,87,67,.16)}
.kitchen-filter b{font-size:10px;opacity:.82}
.kitchen-grid{gap:18px}
.kitchen-card{position:relative;overflow:hidden;padding:18px;border-radius:16px;background:linear-gradient(180deg,#fffdfb 0%,#fff 100%);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.kitchen-card:hover{transform:translateY(-2px);box-shadow:0 13px 30px rgba(55,39,31,.10)}
.kitchen-card.estado-pendiente{border-left:4px solid #d89a2b}
.kitchen-card.estado-en_preparacion{border-left:4px solid #6475bd}
.kitchen-card.estado-listo{border-left:4px solid #3d9860}
.kitchen-head{min-height:46px}
.kitchen-origin-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#f8eee8;color:var(--kf-primary);font-size:17px;flex:0 0 auto}
.kitchen-origin-icon.delivery{background:#f0edff;color:#5b4aa0}
.kitchen-order-title{display:flex;align-items:center;gap:9px;min-width:0}
.kitchen-order-title strong{font-size:16px;line-height:1.2;color:var(--kf-ink)}
.kitchen-order-title small{display:block;color:var(--kf-muted);font-size:11px;margin-top:3px}
.kitchen-order-meta{display:flex;align-items:center;gap:8px;color:#738096;font-size:11px;margin-top:10px}
.kitchen-order-meta .order-id{font-weight:900;color:var(--kf-primary)}
.kitchen-time{margin:8px 0 12px;color:#748198;font-size:11px}
.kitchen-items{border-top:1px solid #eee7e2}
.kitchen-item{padding:12px 0}
.kitchen-item strong{font-size:14px;line-height:1.35;color:var(--kf-ink)}
.kitchen-item small{font-size:11px;color:var(--kf-muted);line-height:1.4}
.kitchen-item .status-pill{font-size:10px;min-width:80px;justify-content:center}
.kitchen-actions button{font-size:13px;min-height:44px;box-shadow:0 5px 14px rgba(117,62,49,.12)}
.delivery-kitchen-note{background:#f6f3ff!important;border-color:#e5def9!important;color:#514a69!important}
.kitchen-empty-icon{display:block;font-size:28px;color:#b98269;margin-bottom:7px}

/* Mejora global de iconografía en encabezados y botones, manteniendo un solo color dominante. */
.panel-head h2 i,.page-head h1 i{color:var(--kf-primary)}
.button i,button i{margin-right:6px}

/* Responsive: la barra lateral pasa a superficie completa en móvil. */
@media(max-width:720px){
  .sidebar{box-shadow:none}
  .sidebar a.active{box-shadow:none}
  .kitchen-grid{grid-template-columns:1fr}
  .kitchen-toolbar{width:100%}
  .kitchen-filter{flex:1;justify-content:center}
}

/* =========================================================
   KUANTIKA FOOD — FASE 16.1 · DASHBOARD VISUAL DEFINITIVO
   Inspirado en la referencia aprobada: información existente
   + identidad cálida, iconografía y fondo gastronómico.
   Solo presentación; no altera negocio, permisos ni SSE.
   ========================================================= */
:root{
  --kfd-bg:#f4f1ed;
  --kfd-surface:#fffdfb;
  --kfd-border:#e7d9cf;
  --kfd-ink:#13263c;
  --kfd-muted:#66758a;
  --kfd-brown:#8f4f3f;
  --kfd-brown-dark:#713b30;
  --kfd-green:#27804f;
  --kfd-green-bg:#e9f6ed;
  --kfd-orange:#d97835;
  --kfd-orange-bg:#fff0e5;
  --kfd-red:#c43838;
  --kfd-red-bg:#fde9e8;
  --kfd-amber:#a66b00;
  --kfd-amber-bg:#fff3d8;
  --kfd-purple:#654da1;
}
body{background:var(--kfd-bg)}
.topbar{height:74px;background:rgba(255,253,251,.98);border-bottom:1px solid var(--kfd-border);box-shadow:0 3px 18px rgba(68,42,33,.055)}
.brand-mark{width:44px;height:44px;border-radius:13px;background:linear-gradient(145deg,#9b5946,#733c30);box-shadow:0 7px 18px rgba(113,59,48,.18);font-size:0}
.brand-mark:before{content:'\f63b';font-family:'bootstrap-icons';font-size:22px;color:#fff}
.brand strong{font-size:17px}.brand small{font-size:11px;color:#8a94a6}
.sidebar{width:267px;background:linear-gradient(180deg,#6d241b 0%,#542018 58%,#461a14 100%);border-right:0;box-shadow:6px 0 24px rgba(65,25,19,.09);padding:20px 14px}
.sidebar a{color:#fff8f5;font-size:14px;padding:11px 14px;border-radius:10px;margin:3px 0}
.sidebar a:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}
.sidebar a.active{background:linear-gradient(90deg,#a95d45,#8d4938)!important;color:#fff!important;border-color:rgba(255,255,255,.08)!important;box-shadow:0 8px 18px rgba(40,10,5,.14)}
.sidebar a.active .nav-icon,.sidebar .nav-icon{color:inherit}
.sidebar .nav-title,.sidebar .nav-toggle{color:#f1c5b8}.sidebar .nav-toggle i{color:#f0b2a4}
.nav-title{padding-left:14px}.layout{min-height:calc(100vh - 74px)}
.content{padding:28px 30px 34px;max-width:1600px}
.kf-dashboard{width:100%}.kf-hero{position:relative;min-height:150px;border:1px solid var(--kfd-border);border-radius:18px;background:#fffaf6 url('../img/dashboard-food-hero.jpg') right center/auto 100% no-repeat;overflow:hidden;padding:27px 30px;margin-bottom:18px;box-shadow:0 7px 24px rgba(65,38,29,.055)}
.kf-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,250,246,.98) 0%,rgba(255,250,246,.92) 42%,rgba(255,250,246,.35) 78%,rgba(255,250,246,.05) 100%);pointer-events:none}
.kf-hero-copy,.kf-dashboard-date{position:relative;z-index:1}.kf-hero h1{margin:3px 0 5px;font-size:32px;letter-spacing:-.025em;color:var(--kfd-ink)}.kf-hero p{margin:0;color:var(--kfd-muted);font-size:14px}.kf-dashboard-date{position:absolute;right:24px;top:24px}.kf-dashboard-date label{margin:0}.kf-dashboard-date label>span{display:none}.kf-dashboard-date .date-control{background:rgba(255,253,251,.94);border:1px solid var(--kfd-border);border-radius:11px;padding:9px 12px;display:flex;align-items:center;gap:8px;box-shadow:0 4px 12px rgba(55,39,31,.05)}.kf-dashboard-date .date-control>i{color:var(--kfd-brown)}.kf-dashboard-date input{margin:0;border:0;padding:0;background:transparent;width:150px;font-weight:700;color:var(--kfd-ink);box-shadow:none}
.kf-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.kf-stat{background:var(--kfd-surface);border:1px solid var(--kfd-border);border-radius:16px;padding:18px;display:flex;gap:13px;align-items:center;min-width:0;box-shadow:0 6px 20px rgba(65,38,29,.045);position:relative;overflow:hidden}.kf-stat:before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:#eaded6}.kf-stat.stat-sales:before{background:var(--kfd-brown)}.kf-stat-icon{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;flex:0 0 auto;font-size:20px}.kf-stat-icon.green{background:var(--kfd-green-bg);color:var(--kfd-green)}.kf-stat-icon.orange{background:var(--kfd-orange-bg);color:var(--kfd-orange)}.kf-stat-icon.brown{background:#f4e9e3;color:var(--kfd-brown)}.kf-stat-icon.red{background:var(--kfd-red-bg);color:var(--kfd-red)}.kf-stat span,.kf-stat small{display:block;color:var(--kfd-muted)}.kf-stat span{font-size:11px;font-weight:700}.kf-stat strong{display:block;color:var(--kfd-ink);font-size:25px;line-height:1.1;margin:4px 0}.kf-stat small{font-size:10px}
.kf-main-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:16px;margin-bottom:16px}.kf-secondary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}.kf-bottom-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:16px;margin-bottom:16px}.kf-card{background:var(--kfd-surface);border:1px solid var(--kfd-border);border-radius:16px;padding:20px;box-shadow:0 6px 20px rgba(65,38,29,.045);min-width:0}.kf-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:15px}.kf-card-head h2{font-size:17px;margin:0;color:var(--kfd-ink);display:flex;align-items:center;gap:8px}.kf-card-head h2 i{color:var(--kfd-brown)}.kf-card-head small{display:block;margin-top:3px;color:var(--kfd-muted);font-size:11px}.kf-card-head a{font-size:11px;font-weight:800;color:var(--kfd-brown);white-space:nowrap}.kf-card-head a i{margin-left:3px}
.kf-table-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.kf-table{border:1px solid #e5ddd7;border-radius:12px;padding:11px 10px;display:flex;align-items:center;gap:9px;background:#fff;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}.kf-table:hover{transform:translateY(-2px);box-shadow:0 7px 16px rgba(65,38,29,.08)}.kf-table-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#f7eee8;color:var(--kfd-brown);font-size:17px;flex:0 0 auto}.kf-table strong{display:block;font-size:12px;color:var(--kfd-ink)}.kf-table small{display:block;font-size:9px;font-weight:800;margin-top:2px}.kf-table.state-libre{background:#fbfdfb;border-color:#dcecdf}.kf-table.state-libre .kf-table-icon{background:var(--kfd-green-bg);color:var(--kfd-green)}.kf-table.state-libre small{color:var(--kfd-green)}.kf-table.state-ocupada{background:#fffafa;border-color:#f0cecb}.kf-table.state-ocupada .kf-table-icon{background:var(--kfd-red-bg);color:var(--kfd-red)}.kf-table.state-ocupada small{color:var(--kfd-red)}.kf-table.state-cuenta{background:#fffdf7;border-color:#f0dfb9}.kf-table.state-cuenta .kf-table-icon{background:var(--kfd-amber-bg);color:var(--kfd-amber)}.kf-table.state-cuenta small{color:var(--kfd-amber)}
.kf-table-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #eee6e0;color:var(--kfd-muted);font-size:10px;font-weight:700}.kf-table-legend span{display:inline-flex;align-items:center;gap:6px}.kf-table-legend i{width:8px;height:8px;border-radius:50%;display:inline-block}.legend-free i{background:#3c9860}.legend-pending i{background:#d79a27}.legend-busy i{background:#c43838}
.kf-hour-chart{height:205px;display:flex;align-items:end;gap:10px;padding:12px 2px 0;border-top:1px solid #eee6e0}.kf-hour{height:100%;flex:1;display:flex;flex-direction:column;justify-content:end;align-items:center;min-width:0}.kf-hour-value{font-size:9px;color:var(--kfd-muted);margin-bottom:5px;white-space:nowrap}.kf-hour-track{height:145px;width:100%;max-width:28px;background:#f1ebe6;border-radius:8px 8px 3px 3px;display:flex;align-items:end;overflow:hidden}.kf-hour-track>div{width:100%;background:linear-gradient(180deg,#ad6b55,var(--kfd-brown));border-radius:8px 8px 3px 3px}.kf-hour small{font-size:9px;color:#7b8798;margin-top:6px}
.kf-ranking{display:grid}.kf-ranking-row{display:grid;grid-template-columns:31px 1fr auto;align-items:center;gap:9px;padding:11px 0;border-bottom:1px solid #eee7e2}.kf-ranking-row:last-child{border-bottom:0}.kf-rank{font-size:11px;font-weight:900;color:#a56a57}.kf-ranking-row strong{display:block;font-size:12px;color:var(--kfd-ink)}.kf-ranking-row small{display:block;color:var(--kfd-muted);font-size:10px;margin-top:2px}.kf-ranking-row b{font-size:12px;color:var(--kfd-brown-dark)}
.kf-days-chart{height:190px;display:flex;align-items:end;justify-content:space-around;gap:8px;padding-top:8px}.kf-days-chart>div{height:100%;flex:1;display:flex;flex-direction:column;justify-content:end;align-items:center}.kf-day-track{height:125px;width:24px;background:#f0ebe7;border-radius:8px 8px 3px 3px;display:flex;align-items:end;overflow:hidden}.kf-day-track>div{width:100%;background:linear-gradient(180deg,#b16a53,var(--kfd-brown));border-radius:8px 8px 3px 3px}.kf-days-chart strong{font-size:9px;color:var(--kfd-ink);margin-top:5px}.kf-days-chart small{font-size:9px;color:var(--kfd-muted);margin-top:2px}
.kf-payments>div{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #eee7e2}.kf-payments>div:last-child{border-bottom:0}.kf-payments span{font-size:12px;color:var(--kfd-ink);display:flex;align-items:center;gap:8px}.kf-payments span i{font-size:7px;color:var(--kfd-brown)}.kf-payments b{font-size:13px;color:var(--kfd-brown-dark)}.kf-stock-list>div{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eee7e2}.kf-stock-list>div:last-child{border-bottom:0}.kf-stock-icon{width:34px;height:34px;border-radius:10px;background:var(--kfd-red-bg);color:var(--kfd-red);display:grid;place-items:center;flex:0 0 auto}.kf-stock-list strong{display:block;font-size:12px;color:var(--kfd-ink)}.kf-stock-list small{display:block;font-size:10px;color:var(--kfd-muted);margin-top:2px}.kf-critical{margin-left:auto;background:var(--kfd-red-bg);color:var(--kfd-red);border:1px solid #f3c9c6;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900}.kf-stock-ok{display:flex;gap:10px;align-items:center;padding:18px;background:var(--kfd-green-bg);border:1px solid #d4eadb;border-radius:12px;color:var(--kfd-green)}.kf-stock-ok i{font-size:23px}.kf-stock-ok strong{display:block;font-size:12px}.kf-stock-ok small{display:block;color:#5e7867;font-size:10px;margin-top:2px}.kf-empty{min-height:140px;display:grid;place-items:center;text-align:center;color:var(--kfd-muted);font-size:12px}.kf-live-note{display:flex;align-items:center;gap:12px;background:#f0f4f7;border:1px solid #dfe5ea;border-radius:13px;padding:13px 15px;color:var(--kfd-ink)}.kf-live-note>span{width:35px;height:35px;border-radius:10px;background:#e6edf3;display:grid;place-items:center;color:#55718a}.kf-live-note strong{display:block;font-size:12px}.kf-live-note small{display:block;color:var(--kfd-muted);font-size:10px;margin-top:2px}.kf-live-note>b{margin-left:auto;background:#e8f6ed;color:var(--kfd-green);border:1px solid #d1eadb;padding:6px 10px;border-radius:999px;font-size:10px}.kf-live-note>b i{font-size:7px;margin-right:4px}
@media(max-width:1150px){.kf-main-grid,.kf-bottom-grid{grid-template-columns:1fr}.kf-secondary-grid{grid-template-columns:1fr 1fr}.kf-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.content{padding:18px 14px}.kf-hero{min-height:170px;padding:22px}.kf-hero:after{background:linear-gradient(90deg,rgba(255,250,246,.99),rgba(255,250,246,.82),rgba(255,250,246,.3))}.kf-dashboard-date{position:relative;right:auto;top:auto;margin-top:20px}.kf-dashboard-date .date-control{width:max-content}.kf-stats,.kf-secondary-grid{grid-template-columns:1fr}.kf-table-grid{grid-template-columns:repeat(2,1fr)}.kf-hour-chart{overflow-x:auto}.kf-hour{min-width:35px}}
@media(max-width:560px){.topbar{height:68px}.sidebar{width:100%}.layout{min-height:calc(100vh - 68px)}.kf-hero h1{font-size:27px}.kf-table-grid{grid-template-columns:1fr 1fr}.kf-card{padding:16px}.kf-stat{padding:15px}.kf-stat strong{font-size:23px}.kf-live-note{align-items:flex-start}.kf-live-note>b{display:none}}
.brand-mark:before{content:none!important}
.brand-mark i{font-size:22px;color:#fff}


/* =========================================================
   FASE 16.3 — KUANTIKA FOOD · CONSISTENCIA DE ACCIONES Y LECTURA
   Ajustes exclusivamente visuales. No altera lógica, BD, permisos,
   CSRF, autenticación, SSE ni rutas.
   ========================================================= */

/* Acciones principales: un único lenguaje visual para todo el sistema. */
button:not(.secondary):not(.modal-close):not(.nav-toggle),
.button:not(.secondary),
.restaurant-primary,
.modal-actions button:not(.secondary) {
  background:var(--kf-primary)!important;
  color:#fff!important;
  border-color:transparent!important;
}

button:not(.secondary):not(.modal-close):not(.nav-toggle):hover,
.button:not(.secondary):hover,
.restaurant-primary:hover,
.modal-actions button:not(.secondary):hover {
  background:var(--kf-primary-dark)!important;
  color:#fff!important;
}

/* Controles pequeños con función propia conservan su semántica. */
.delivery-qty button,
.delivery-remove,
.remove,
.danger,
.success-btn,
.success-button {
  /* Las clases específicas existentes tienen prioridad semántica. */
}

/* Mesas: CTA más claro y exactamente como acción principal. */
.page-head .button:not(.secondary) {
  background:var(--kf-primary)!important;
  color:#fff!important;
}

/* Cocina: mejor jerarquía visual en las tarjetas. */
.kitchen-order-title strong {font-size:16px;color:var(--kf-ink)}
.kitchen-order-title small {font-size:12px;color:var(--kf-muted)}
.kitchen-item strong {font-size:15px;color:var(--kf-ink)}
.kitchen-item .status-pill {font-size:11px}

/* Kardex / Movimientos: lectura más cómoda en escritorio. */
.kardex-history table,
.kardex-table {
  font-size:13px;
}
.kardex-table th {
  font-size:11px;
}
.kardex-table td {
  font-size:13px;
  padding-top:13px;
  padding-bottom:13px;
}
.kardex-product strong,
.kardex-qty,
.stock-after,
.stock-before,
.movement-value,
.kardex-reason,
.kardex-user {
  font-size:13px;
}
.kardex-date strong {font-size:13px}
.kardex-date small,
.kardex-product small {font-size:11px}
.kardex-filters label {font-size:12px}

/* Formularios: los CTA de guardar/agregar/registrar usan el mismo marrón. */
form > button:not(.secondary):not(.modal-close),
.form-grid > button:not(.secondary):not(.modal-close),
.page-head > button:not(.secondary) {
  background:var(--kf-primary)!important;
  color:#fff!important;
}

@media(max-width:800px){
  .kardex-table td {font-size:12.5px}
  .kardex-table th {font-size:10px}
}

/* Preservar semántica de controles de cantidad/eliminación. */
.delivery-qty button {
  background:#f8f5f2!important;
  color:var(--rest-primary)!important;
  border-color:transparent!important;
}
.delivery-qty button:hover {
  background:#efe7e1!important;
  color:var(--rest-primary)!important;
}
button.delivery-remove,
button.remove {
  background:#fcebea!important;
  color:#a33b3b!important;
}
button.delivery-remove:hover,
button.remove:hover {
  background:#f8dedd!important;
  color:#922f2f!important;
}

/* =========================================================
   FASE 16.4 — PULIDO VISUAL · CONTRASTE Y CONTROLES
   Objetivo: superficies limpias, foco fino y acciones sobrias.
   El marrón queda como color de identidad/acento; las acciones
   principales pasan a azul marino para mejorar jerarquía y lectura.
   ========================================================= */

/* Campos: un solo borde fino, sin doble contorno ni halo grueso. */
input, select, textarea {
  border:1px solid #d7dce3 !important;
  outline:none !important;
  box-shadow:none !important;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--kf-primary) !important;
  outline:none !important;
  box-shadow:none !important;
}
.smart-search {
  border:1px solid #d7dce3 !important;
  box-shadow:none !important;
}
.smart-search:focus-within {
  border-color:var(--kf-primary) !important;
  box-shadow:none !important;
}
.smart-search input,
.smart-search input:focus,
.product-search input,
.product-search input:focus {
  border:0 !important;
  outline:none !important;
  box-shadow:none !important;
}
.smart-client-input:focus {
  border-color:var(--kf-primary) !important;
  box-shadow:none !important;
}

/* Acciones: azul marino como color funcional principal. */
button:not(.secondary):not(.modal-close):not(.nav-toggle),
.button:not(.secondary),
.restaurant-primary,
.modal-actions button:not(.secondary),
form > button:not(.secondary):not(.modal-close),
.form-grid > button:not(.secondary):not(.modal-close),
.page-head > button:not(.secondary) {
  background:var(--kf-ink) !important;
  color:#fff !important;
  border-color:transparent !important;
}
button:not(.secondary):not(.modal-close):not(.nav-toggle):hover,
.button:not(.secondary):hover,
.restaurant-primary:hover,
.modal-actions button:not(.secondary):hover,
form > button:not(.secondary):not(.modal-close):hover,
.form-grid > button:not(.secondary):not(.modal-close):hover,
.page-head > button:not(.secondary):hover {
  background:#0d1d30 !important;
  color:#fff !important;
}

/* Estados destructivos conservan su significado. */
button.danger,
.button.danger,
.danger,
button.btn-danger {
  background:#fcebea !important;
  color:#a33b3b !important;
  border-color:#f3d0cd !important;
}
button.danger:hover,
.button.danger:hover,
.danger:hover,
button.btn-danger:hover {
  background:#f8dedd !important;
  color:#922f2f !important;
}

/* Productos del comandero/delivery: no deben heredar el color de CTA. */
.product-btn,
.product-btn:not(.secondary),
.delivery-product-btn,
.delivery-product-btn:not(.secondary) {
  background:#fff !important;
  color:var(--kf-ink) !important;
  border:1px solid #dfe3e8 !important;
}
.product-btn strong,
.product-btn span,
.delivery-product-btn strong,
.delivery-product-btn span {
  color:var(--kf-ink) !important;
}
.product-btn:hover,
.delivery-product-btn:hover {
  background:#fbf7f4 !important;
  color:var(--kf-ink) !important;
  border-color:#cda18f !important;
}
.product-btn.is-unavailable,
.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable,
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span {
  background:#faf8f6 !important;
  color:#a8adb4 !important;
}

/* Los botones de cantidad/remoción siguen siendo controles secundarios. */
.delivery-qty button,
button.delivery-remove,
button.remove {
  box-shadow:none !important;
}

/* Dashboard: tarjetas de últimos pedidos. */
.kf-latest-orders {
  display:grid;
}
.kf-latest-order {
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #eee7e2;
}
.kf-latest-order:last-child {border-bottom:0}
.kf-latest-icon {
  width:34px;height:34px;border-radius:10px;
  display:grid;place-items:center;
  background:#f7eee8;color:var(--kfd-brown);
}
.kf-latest-order strong {
  display:block;font-size:12px;color:var(--kfd-ink);
}
.kf-latest-order small {
  display:block;font-size:10px;color:var(--kfd-muted);margin-top:2px;
}
.kf-latest-order-right {text-align:right}
.kf-latest-order-right b {
  display:block;font-size:12px;color:var(--kfd-ink);
}
.kf-latest-order-right small {white-space:nowrap}

/* Un poco más de aire para lectura del Kardex. */
.kardex-table td {font-size:13.5px}
.kardex-table th {font-size:11px}
.kardex-table td {padding-top:14px;padding-bottom:14px}

@media(max-width:720px){
  .kf-latest-order {grid-template-columns:34px minmax(0,1fr) auto}
  .kf-latest-order strong {font-size:12px}
  .kf-latest-order-right b {font-size:11px}
}

/* =========================================================
   FASE 16.5 — CORRECCIÓN DE CONTRASTE Y BOTONES
   ========================================================= */
:root{
  --kf-action-brown:#9b5946;
  --kf-action-brown-hover:#844735;
  --kf-action-brown-dark:#733c30;
}

/* Todas las acciones principales de Kuantika usan el marrón de identidad. */
button:not(.secondary):not(.modal-close):not(.nav-toggle),
.button:not(.secondary),
.restaurant-primary,
.modal-actions button:not(.secondary),
form > button:not(.secondary):not(.modal-close),
.form-grid > button:not(.secondary):not(.modal-close),
.page-head > button:not(.secondary),
.page-head .button:not(.secondary),
.kitchen-actions button,
.table-card .button.full,
.success-button {
  background:var(--kf-action-brown) !important;
  color:#fff !important;
  border-color:var(--kf-action-brown) !important;
  text-shadow:none !important;
}
button:not(.secondary):not(.modal-close):not(.nav-toggle):hover,
.button:not(.secondary):hover,
.restaurant-primary:hover,
.modal-actions button:not(.secondary):hover,
form > button:not(.secondary):not(.modal-close):hover,
.form-grid > button:not(.secondary):not(.modal-close):hover,
.page-head > button:not(.secondary):hover,
.page-head .button:not(.secondary):hover,
.kitchen-actions button:hover,
.table-card .button.full:hover,
.success-button:hover {
  background:var(--kf-action-brown-hover) !important;
  color:#fff !important;
  border-color:var(--kf-action-brown-hover) !important;
}

/* Los productos son tarjetas seleccionables, no CTA: superficie clara y
   texto oscuro para que nunca aparezca texto negro sobre fondo oscuro. */
.product-btn,
.product-btn:not(.secondary),
.delivery-product-btn,
.delivery-product-btn:not(.secondary) {
  background:#fff !important;
  color:var(--kf-ink) !important;
  border:1px solid #dfe3e8 !important;
  text-shadow:none !important;
}
.product-btn strong,
.product-btn span,
.delivery-product-btn strong,
.delivery-product-btn span {
  color:inherit !important;
  text-shadow:none !important;
}
.product-btn span,
.delivery-product-btn span { color:#607086 !important; }
.product-btn:hover,
.delivery-product-btn:hover {
  background:#fbf4ef !important;
  color:var(--kf-ink) !important;
  border-color:#c79d8d !important;
}
.product-btn.is-selected,
.delivery-product-btn.is-selected {
  background:var(--kf-action-brown) !important;
  border-color:var(--kf-action-brown-dark) !important;
  color:#fff !important;
}
.product-btn.is-selected strong,
.product-btn.is-selected span,
.delivery-product-btn.is-selected strong,
.delivery-product-btn.is-selected span {
  color:#fff !important;
}
.product-btn.is-unavailable,
.delivery-product-btn.is-unavailable,
.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span {
  background:#f1f2f4 !important;
  color:#9aa1aa !important;
  border-color:#e0e2e5 !important;
  text-shadow:none !important;
}

/* Botón de alta rápida: marrón y controlado por JS según resultados. */
.quick-add-client {
  background:var(--kf-action-brown) !important;
  color:#fff !important;
  border-color:var(--kf-action-brown) !important;
}
.quick-add-client:hover {
  background:var(--kf-action-brown-hover) !important;
  color:#fff !important;
}

/* Foco fino y único en todos los campos, incluidos componentes inteligentes. */
input, select, textarea,
.smart-search,
.smart-client-input {
  outline:none !important;
  box-shadow:none !important;
}
input:focus, select:focus, textarea:focus,
.smart-search:focus-within,
.smart-client-input:focus {
  outline:none !important;
  box-shadow:0 0 0 1px var(--kf-action-brown) !important;
  border-color:var(--kf-action-brown) !important;
}
.smart-search input:focus,
.product-search input:focus {
  box-shadow:none !important;
  border-color:transparent !important;
}

/* =========================================================
   KUANTIKA FOOD — FASE 16.6 · PULIDO FINAL PROFESIONAL
   Capa final y aislada: no modifica lógica, BD, permisos ni SSE.
   ========================================================= */

/* 1) Botones principales: identidad marrón, contraste AA y texto siempre visible. */
:root{
  --kf-action-brown:#985743;
  --kf-action-brown-hover:#7f4637;
  --kf-action-brown-dark:#6f392d;
}

button:not(.secondary):not(.modal-close):not(.nav-toggle),
.button:not(.secondary),
.restaurant-primary,
.modal-actions button:not(.secondary),
form > button:not(.secondary):not(.modal-close),
.form-grid > button:not(.secondary):not(.modal-close),
.page-head > button:not(.secondary),
.page-head .button:not(.secondary),
.kitchen-actions button,
.table-card .button.full,
.success-button {
  background:var(--kf-action-brown) !important;
  color:#fff !important;
  border:1px solid var(--kf-action-brown) !important;
  text-shadow:none !important;
}

button:not(.secondary):not(.modal-close):not(.nav-toggle):hover,
.button:not(.secondary):hover,
.restaurant-primary:hover,
.modal-actions button:not(.secondary):hover,
form > button:not(.secondary):not(.modal-close):hover,
.form-grid > button:not(.secondary):not(.modal-close):hover,
.page-head > button:not(.secondary):hover,
.page-head .button:not(.secondary):hover,
.kitchen-actions button:hover,
.table-card .button.full:hover,
.success-button:hover {
  background:var(--kf-action-brown-hover) !important;
  color:#fff !important;
  border-color:var(--kf-action-brown-hover) !important;
}

/* 2) Comandero y Delivery: tarjetas de producto marrones con contraste claro. */
.product-btn,
.product-btn:not(.secondary),
.delivery-product-btn,
.delivery-product-btn:not(.secondary) {
  background:var(--kf-action-brown) !important;
  color:#fff !important;
  border:1px solid var(--kf-action-brown) !important;
  text-shadow:none !important;
  opacity:1 !important;
}
.product-btn strong,
.product-btn span,
.delivery-product-btn strong,
.delivery-product-btn span {
  background:transparent !important;
  color:#fff !important;
  text-shadow:none !important;
  -webkit-text-fill-color:#fff !important;
}
.product-btn:hover,
.delivery-product-btn:hover {
  background:var(--kf-action-brown-hover) !important;
  color:#fff !important;
  border-color:var(--kf-action-brown-dark) !important;
}
.product-btn.is-selected,
.delivery-product-btn.is-selected {
  background:var(--kf-action-brown-dark) !important;
  border-color:#5f3027 !important;
  color:#fff !important;
}
.product-btn.is-selected strong,
.product-btn.is-selected span,
.delivery-product-btn.is-selected strong,
.delivery-product-btn.is-selected span {
  background:transparent !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* Agotados: sin opacidad heredada ni fondos blancos/franjas sobre los textos. */
.product-btn.is-unavailable,
.delivery-product-btn.is-unavailable {
  background:#eee9e6 !important;
  color:#747a80 !important;
  border-color:#ddd5d0 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  transform:none !important;
}
.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span,
.product-btn.is-unavailable .dish-stock-out,
.delivery-product-btn.is-unavailable .dish-stock-out {
  background:transparent !important;
  color:#747a80 !important;
  -webkit-text-fill-color:#747a80 !important;
}

/* 3) Encabezado de platos preparados: más aire y enlace integrado. */
.order-product-group + .order-product-group,
.delivery-product-section + .delivery-product-section {
  margin-top:20px !important;
}
.order-product-group-head,
.delivery-section-title {
  margin-bottom:14px !important;
}
.order-product-group-head .small-link,
.delivery-section-title .small-link {
  margin-left:auto;
  color:var(--kf-action-brown) !important;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  padding:5px 8px;
  border:1px solid #ead8cf;
  border-radius:8px;
  background:#fffaf7;
}
.order-product-group-head .small-link:hover,
.delivery-section-title .small-link:hover {
  background:#f7eee9;
  border-color:#d9b7a8;
}

/* 4) Buscadores y campos: un único borde fino, también en componentes anidados. */
input, select, textarea {
  border-width:1px !important;
  outline:none !important;
  box-shadow:none !important;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--kf-action-brown) !important;
  outline:none !important;
  box-shadow:0 0 0 1px rgba(152,87,67,.35) !important;
}
.smart-search,
.smart-client-input {
  border-width:1px !important;
  outline:none !important;
  box-shadow:none !important;
}
.smart-search:focus-within {
  border-color:var(--kf-action-brown) !important;
  box-shadow:0 0 0 1px rgba(152,87,67,.28) !important;
}
.smart-search input,
.smart-search input:focus,
.product-search input,
.product-search input:focus {
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
}
.smart-client-input:focus {
  border-color:var(--kf-action-brown) !important;
  box-shadow:0 0 0 1px rgba(152,87,67,.28) !important;
}

/* 5) Tabla de clientes: datos un poco mayores sin perder densidad profesional. */
#clientsTable {
  font-size:14px;
}
#clientsTable th {
  font-size:11px;
}
#clientsTable td {
  font-size:14px;
  padding-top:15px;
  padding-bottom:15px;
}
#clientsTable td:first-child strong {
  font-size:15px;
}
#clientsTable .badge {
  font-size:11px;
}
#clientsTable .button.small,
#clientsTable button.small {
  font-size:11px;
  min-height:40px;
}

/* 6) Dashboard: imagen gastronómica cubre todo el hero sin franja blanca. */
.kf-hero {
  background-size:cover !important;
  background-position:center right !important;
  background-repeat:no-repeat !important;
}
.kf-dashboard-date .date-control {
  min-height:44px;
}
.kf-dashboard-date .date-control > i {
  position:absolute;
  left:16px !important;
  width:18px;
  text-align:center;
  margin:0;
}
.kf-dashboard-date .date-control input {
  padding-left:31px !important;
}

/* 7) Kardex: un pequeño incremento adicional para lectura en escritorio. */
.kardex-table th {font-size:11.5px;}
.kardex-table td {font-size:14px; padding-top:14px; padding-bottom:14px;}
.kardex-product strong,
.kardex-qty,
.stock-after,
.stock-before,
.movement-value,
.kardex-reason,
.kardex-user {font-size:14px;}

/* 8) Cierre del modal: acción coherente con la identidad. */
.modal-close {
  background:var(--kf-action-brown) !important;
  color:#fff !important;
  border:1px solid var(--kf-action-brown) !important;
}
.modal-close:hover {
  background:var(--kf-action-brown-hover) !important;
  color:#fff !important;
}

/* 9) El enlace de Producción conserva su función, pero deja de parecer un texto suelto. */
.small-link:focus-visible,
.delivery-section-title .small-link:focus-visible {
  outline:2px solid rgba(152,87,67,.28);
  outline-offset:2px;
}

@media(max-width:720px){
  #clientsTable td {font-size:13.5px;}
  #clientsTable td:first-child strong {font-size:14px;}
  .order-product-group-head .small-link {margin-left:0;}
  .kf-hero {background-position:62% center !important;}
}

/* FASE 16.7 — Comandero: semáforo de mesas coherente con el Dashboard.
   La selección no cambia el color semántico del estado; solo añade énfasis. */
.mini-table.state-libre{
  background:#fbfdfb !important;
  border-color:#d8eadf !important;
}
.mini-table.state-libre .mini-table-icon{
  background:#eaf7ef !important;
  color:#25834e !important;
}
.mini-table.state-libre .mini-table-state{
  color:#25834e !important;
}
.mini-table.state-ocupada{
  background:#fffafa !important;
  border-color:#f0cbc7 !important;
}
.mini-table.state-ocupada .mini-table-icon{
  background:#fdeceb !important;
  color:#c43838 !important;
}
.mini-table.state-ocupada .mini-table-state{
  color:#c43838 !important;
}
.mini-table.state-cuenta{
  background:#fffdf7 !important;
  border-color:#eedcae !important;
}
.mini-table.state-cuenta .mini-table-icon{
  background:#fff3d8 !important;
  color:#b47716 !important;
}
.mini-table.state-cuenta .mini-table-state{
  color:#a66b0d !important;
}
.mini-table.state-libre.selected,
.mini-table.state-ocupada.selected,
.mini-table.state-cuenta.selected{
  color:var(--kf-ink) !important;
  box-shadow:0 0 0 2px currentColor,0 8px 22px rgba(55,39,31,.10) !important;
  transform:translateY(-1px);
}
.mini-table.state-libre.selected{background:#fbfdfb !important;}
.mini-table.state-ocupada.selected{background:#fffafa !important;}
.mini-table.state-cuenta.selected{background:#fffdf7 !important;}
.mini-table.state-libre.selected{color:#25834e !important;border-color:#25834e !important;}
.mini-table.state-ocupada.selected{color:#c43838 !important;border-color:#c43838 !important;}
.mini-table.state-cuenta.selected{color:#b47716 !important;border-color:#b47716 !important;}
.mini-table.selected strong{color:var(--kf-ink) !important;}
.mini-table.selected .mini-table-state{font-weight:900 !important;}

/* FASE 16.7 — Productos/platos agotados: visibles, pero claramente no seleccionables.
   Evita grises débiles y cualquier franja blanca sobre el texto. */
.product-btn.is-unavailable,
.delivery-product-btn.is-unavailable{
  background:#ead8d0 !important;
  border-color:#d5b5a7 !important;
  color:#68483d !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span,
.product-btn.is-unavailable .dish-stock-out,
.delivery-product-btn.is-unavailable .dish-stock-out{
  background:transparent !important;
  color:#68483d !important;
  -webkit-text-fill-color:#68483d !important;
  text-shadow:none !important;
  opacity:1 !important;
}
.product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable strong{font-weight:800 !important;}
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable span{font-weight:800 !important;}
.product-btn.is-unavailable .dish-stock-out i,
.delivery-product-btn.is-unavailable .dish-stock-out i{color:#9b5f4d !important;}
.product-btn.is-unavailable:hover,
.delivery-product-btn.is-unavailable:hover{
  background:#ead8d0 !important;
  border-color:#d5b5a7 !important;
  transform:none !important;
}

/* El enlace de Producción mantiene su función y queda visualmente secundario. */
.order-product-group-head .small-link,
.delivery-section-title .small-link{
  flex:0 0 auto;
}



/* =========================================================
   FASE 17 — CARTA DIARIA + CONTRASTE FINAL + CONTROLES
   ========================================================= */
/* Controles: un solo borde fino al enfocar, sin doble halo grueso. */
input,select,textarea{border:1px solid #d5dce5!important;outline:none!important}
input:focus,select:focus,textarea:focus{border-color:var(--kf-primary)!important;box-shadow:0 0 0 1px rgba(152,87,67,.16)!important;outline:none!important}
button:focus-visible,.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:1px solid rgba(152,87,67,.42)!important;outline-offset:1px!important}
.smart-search:focus-within,.smart-combobox-control:focus-within{border-color:var(--kf-primary)!important;box-shadow:0 0 0 1px rgba(152,87,67,.14)!important}
.smart-combobox-control{border-width:1px!important}
.smart-combobox-control input:focus{box-shadow:none!important;border:0!important}
/* Todos los botones de acción siguen el marrón de marca; secundarios quedan beige. */
button:not(.secondary):not(.modal-close):not(.nav-toggle),.button:not(.secondary),.restaurant-primary{background:var(--kf-primary)!important;color:#fff!important;border-color:transparent!important}
button:not(.secondary):not(.modal-close):not(.nav-toggle):hover,.button:not(.secondary):hover,.restaurant-primary:hover{background:var(--kf-primary-dark)!important;color:#fff!important}
/* Estados agotados: beige sólido y texto marrón, nunca gris ni translúcido. */
.product-btn.is-unavailable,.delivery-product-btn.is-unavailable{opacity:1!important;background:#eadfd6!important;border:1px solid #dcc9bc!important;color:#6f4336!important;cursor:not-allowed!important;box-shadow:none!important}
.product-btn.is-unavailable strong,.product-btn.is-unavailable span,.delivery-product-btn.is-unavailable strong,.delivery-product-btn.is-unavailable span{color:#6f4336!important;opacity:1!important;text-shadow:none!important}
.product-btn.is-unavailable:hover,.delivery-product-btn.is-unavailable:hover{background:#eadfd6!important;color:#6f4336!important;transform:none!important;box-shadow:none!important}
.product-btn.is-unavailable .dish-stock-out{color:#6f4336!important}
/* Separación visual entre encabezado de platos y sus botones. */
.order-product-group + .order-product-group{margin-top:22px}
.order-product-group-head{margin-bottom:12px!important;gap:10px!important}
.order-product-group-head .small-link{margin-left:auto;padding:7px 10px;border:1px solid #e5cfc3;border-radius:9px;background:#fff8f4;color:var(--kf-primary)!important;font-size:11px;font-weight:800}
/* Delivery: misma jerarquía visual que Comandero. */
.delivery-product-section{margin-top:20px!important}
.delivery-section-title{margin-bottom:12px!important;gap:9px!important}
.delivery-section-title strong{font-size:13px!important;color:var(--kf-ink)}
.delivery-section-title small{font-size:11px!important}
.delivery-product-btn{min-height:58px!important}
/* Clientes: datos un poco más grandes y fáciles de leer. */
#clientsTable{font-size:14px!important}
#clientsTable td{padding-top:16px!important;padding-bottom:16px!important}
#clientsTable td strong{font-size:15px!important;color:var(--kf-ink)}
#clientsTable td:nth-child(2),#clientsTable td:nth-child(3){font-size:14px!important;color:#344b65}
#clientsTable th{font-size:11px!important}
/* Selector de fecha del dashboard: calendario a la derecha del campo. */
.kf-dashboard-date .date-control{min-width:238px!important;justify-content:space-between!important;padding:8px 11px!important}
.kf-dashboard-date .date-control>i{order:2!important;margin-left:auto!important;font-size:15px!important}
.kf-dashboard-date .date-control input{order:1!important;flex:1!important;width:auto!important;min-width:0!important;text-align:left!important}
.kf-dashboard-date .date-control .flatpickr-input{border:0!important;box-shadow:none!important;outline:none!important}
/* Hero: la fotografía cubre completamente el área del banner, sin franja blanca inferior. */
.kf-hero{background-size:cover!important;background-position:center!important}
.kf-hero:after{background:linear-gradient(90deg,rgba(255,250,246,.98) 0%,rgba(255,250,246,.91) 42%,rgba(255,250,246,.45) 70%,rgba(255,250,246,.10) 100%)!important}
/* Ventas por platos. */
.kf-dish-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.kf-dish-summary>div{padding:11px 12px;background:#fff8f4;border:1px solid #eee0d8;border-radius:11px}
.kf-dish-summary span{display:block;color:var(--kfd-muted);font-size:10px}
.kf-dish-summary strong{display:block;color:var(--kfd-ink);font-size:18px;margin-top:3px}
.kf-dish-sales{display:grid}
.kf-dish-sale-row{display:grid;grid-template-columns:minmax(125px,1fr) minmax(90px,1.2fr) auto;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid #eee7e2}
.kf-dish-sale-row:last-child{border-bottom:0}
.kf-dish-sale-row strong{display:block;font-size:11px;color:var(--kfd-ink)}
.kf-dish-sale-row small{display:block;font-size:9px;color:var(--kfd-muted);margin-top:2px}
.kf-dish-sale-row>b{font-size:11px;color:var(--kfd-brown-dark);white-space:nowrap}
.kf-dish-bar{height:7px;background:#eee6e0;border-radius:999px;overflow:hidden}
.kf-dish-bar span{display:block;height:100%;background:var(--kfd-brown);border-radius:999px}
/* Carta diaria. */
.daily-menu-panel{padding:22px!important}
.daily-menu-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.daily-menu-toolbar h2{margin:0;color:var(--kf-ink);font-size:20px}
.daily-menu-toolbar h2 i{color:var(--kf-primary);margin-right:7px}
.daily-menu-toolbar p{margin:5px 0 0}
.daily-menu-date{min-width:175px;margin:0!important}
.daily-menu-date label{margin:0!important}
.daily-menu-date input{margin-top:6px!important}
.daily-menu-info{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;background:#faf3ee;border:1px solid #ecddd4;border-radius:11px;margin-bottom:14px;color:#6e5a50;font-size:11px}
.daily-menu-info i{color:var(--kf-primary);margin-right:5px}
.daily-menu-info strong{color:var(--kf-primary-dark);font-size:11px}
.daily-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.daily-dish-card{position:relative;display:flex;align-items:center;gap:11px;padding:13px 14px;margin:0!important;background:#fff;border:1px solid #e5ddd7;border-radius:12px;cursor:pointer;transition:.15s ease}
.daily-dish-card:hover{border-color:#d5b5a7;background:#fffaf7}
.daily-dish-card.is-in-menu{border-color:#c9dfd0;background:#fbfdfb}
.daily-dish-check{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:0 0 auto;background:#f5eee9;color:#9a624e}
.daily-dish-card.is-in-menu .daily-dish-check{background:var(--kf-green-bg);color:var(--kf-green)}
.daily-dish-content{min-width:0;flex:1}
.daily-dish-content strong{display:block;color:var(--kf-ink);font-size:13px}
.daily-dish-content small{display:block;color:var(--kf-muted);font-size:10px;margin-top:3px}
.daily-dish-status{padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}
.daily-dish-status.ok{background:var(--kf-green-bg);color:var(--kf-green)}
.daily-dish-status.low{background:var(--kf-amber-bg);color:var(--kf-amber)}
.daily-dish-status.out{background:var(--kf-red-bg);color:var(--kf-red)}
.daily-menu-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;padding-top:15px;border-top:1px solid #eee6e0}
.daily-menu-footer button{white-space:nowrap}
@media(max-width:800px){.daily-menu-toolbar{align-items:stretch;flex-direction:column}.daily-menu-date{min-width:0}.daily-menu-grid{grid-template-columns:1fr}.daily-menu-footer{align-items:stretch;flex-direction:column}.kf-dish-summary{grid-template-columns:1fr}.kf-dish-sale-row{grid-template-columns:1fr auto}.kf-dish-bar{grid-column:1/-1;grid-row:2}.kf-dashboard-date .date-control{min-width:220px!important}}

/* =========================================================
   FASE 17.2 — SEMÁFORO VISUAL FINAL DE PRODUCTOS / PLATOS
   Disponible = verde claro · Agotado = mismo estado visual de mesa ocupada
   Solo presentación: no modifica lógica, stock, carrito ni producción.
   ========================================================= */
.product-btn:not(.is-unavailable),
.delivery-product-btn:not(.is-unavailable){
  background:#f3fbf6 !important;
  border:1px solid #d3e9da !important;
  color:#183a29 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

.product-btn:not(.is-unavailable) strong,
.delivery-product-btn:not(.is-unavailable) strong{
  background:transparent !important;
  color:#183a29 !important;
  -webkit-text-fill-color:#183a29 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

.product-btn:not(.is-unavailable) span,
.delivery-product-btn:not(.is-unavailable) span{
  background:transparent !important;
  color:#28784b !important;
  -webkit-text-fill-color:#28784b !important;
  opacity:1 !important;
  text-shadow:none !important;
}

.product-btn:not(.is-unavailable):hover,
.delivery-product-btn:not(.is-unavailable):hover{
  background:#eaf7ef !important;
  border-color:#bcdcc7 !important;
  color:#173a28 !important;
}

.product-btn:not(.is-unavailable).is-selected,
.delivery-product-btn:not(.is-unavailable).is-selected{
  background:#e4f4e9 !important;
  border-color:#4d9867 !important;
  color:#163b27 !important;
  box-shadow:0 0 0 1px rgba(77,152,103,.14) !important;
}

.product-btn:not(.is-unavailable).is-selected strong,
.delivery-product-btn:not(.is-unavailable).is-selected strong{
  color:#163b27 !important;
  -webkit-text-fill-color:#163b27 !important;
}

.product-btn:not(.is-unavailable).is-selected span,
.delivery-product-btn:not(.is-unavailable).is-selected span{
  color:#28784b !important;
  -webkit-text-fill-color:#28784b !important;
}

/* Agotado = exactamente la misma familia cromática de Mesa Ocupada.
   Mantiene contraste alto y evita letras grises/franjas blancas. */
.product-btn.is-unavailable,
.delivery-product-btn.is-unavailable{
  background:#fffafa !important;
  border:1px solid #f0cbc7 !important;
  color:#c43838 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  transform:none !important;
  text-shadow:none !important;
}

.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span,
.product-btn.is-unavailable .dish-stock-out,
.delivery-product-btn.is-unavailable .dish-stock-out{
  background:transparent !important;
  color:#c43838 !important;
  -webkit-text-fill-color:#c43838 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

.product-btn.is-unavailable:hover,
.delivery-product-btn.is-unavailable:hover{
  background:#fffafa !important;
  border-color:#f0cbc7 !important;
  color:#c43838 !important;
  box-shadow:none !important;
  transform:none !important;
}

.product-btn.is-unavailable .dish-stock-out i,
.delivery-product-btn.is-unavailable .dish-stock-out i{
  color:#c43838 !important;
}

/* =========================================================
   FASE 17.3 — CARTA VISUAL + COMPRAS: PICKERS FUNCIONALES
   ========================================================= */
/* Productos/platos: superficies claras, nunca marrón en estado normal. */
.product-btn,
.delivery-product-btn {
  background:#f4faef !important;
  border:1px solid #d8ead3 !important;
  color:#172b20 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
.product-btn strong,
.delivery-product-btn strong { color:#172b20 !important; }
.product-btn span,
.delivery-product-btn span { color:#2f8a4f !important; font-weight:800 !important; }
.product-btn:hover,
.delivery-product-btn:hover {
  background:#edf7e9 !important;
  border-color:#c5dfbf !important;
  color:#172b20 !important;
}
/* Agotados: beige como el diseño de referencia, con contraste firme. */
.product-btn.is-unavailable,
.delivery-product-btn.is-unavailable,
.product-btn.is-unavailable:hover,
.delivery-product-btn.is-unavailable:hover {
  background:#f8eadf !important;
  border-color:#ead4c5 !important;
  color:#765243 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  transform:none !important;
}
.product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.delivery-product-btn.is-unavailable span,
.product-btn.is-unavailable .dish-stock-out,
.delivery-product-btn.is-unavailable .dish-stock-out {
  color:#765243 !important;
  -webkit-text-fill-color:#765243 !important;
  opacity:1 !important;
  background:transparent !important;
}
.product-btn.is-unavailable .dish-stock-out i,
.delivery-product-btn.is-unavailable .dish-stock-out i { color:#9b684f !important; }
/* Seleccionado: mantiene una señal clara de que ya fue agregado al pedido. */
.product-btn.is-selected,
.delivery-product-btn.is-selected {
  background:var(--kf-action-brown) !important;
  border-color:var(--kf-action-brown-dark) !important;
  color:#fff !important;
}
.product-btn.is-selected strong,
.product-btn.is-selected span,
.delivery-product-btn.is-selected strong,
.delivery-product-btn.is-selected span { color:#fff !important; }

/* Pickers de Compras: resultados limpios y visibles por encima de otros controles. */
.smart-picker-with-action { position:relative; display:flex; align-items:flex-start; gap:8px; }
.smart-picker-with-action .smart-picker { flex:1 1 auto; min-width:0; }
.quick-add-supplier {
  flex:0 0 auto;
  margin-top:0;
  min-height:46px;
  white-space:nowrap;
  border:1px solid #e2d2c8 !important;
  background:#f8eee8 !important;
  color:#765243 !important;
}
.quick-add-supplier:hover {
  background:var(--rest-primary) !important;
  border-color:var(--rest-primary) !important;
  color:#fff !important;
}
.smart-picker-results { z-index:200 !important; }
.smart-picker-result {
  background:#fff !important;
  color:#24364c !important;
  border:0 !important;
  border-bottom:1px solid #f0e8e3 !important;
  min-height:48px;
  cursor:pointer;
}
.smart-picker-result:hover {
  background:#f7f1ed !important;
  color:#713b30 !important;
}
.smart-picker-result strong { color:inherit !important; }
.smart-picker-result small { color:#7b8796 !important; }
.smart-picker-empty,
.smart-picker-error { padding:12px 13px; font-size:12px; }
.smart-picker-empty { color:#6d7888; background:#fff; }
.smart-picker-error { color:#a33b3b; background:#fff7f6; }
@media(max-width:720px){
  .smart-picker-with-action { flex-direction:column; }
  .quick-add-supplier { width:100%; }
}

/* =========================================================
   FASE 17.4 — SEMÁFORO DEFINITIVO COMANDERO / DELIVERY
   Referencia visual: mesas del salón.
   Disponible = verde muy claro / Agotado = rojo muy claro.
   Este bloque es deliberadamente final para neutralizar estilos
   antiguos, estados disabled del navegador y reglas heredadas.
   ========================================================= */
html body button.product-btn:not(.is-unavailable),
html body button.delivery-product-btn:not(.is-unavailable){
  -webkit-appearance:none !important;
  appearance:none !important;
  background:#fbfdfb !important;
  background-image:none !important;
  border:1px solid #d8eadf !important;
  color:#13263c !important;
  opacity:1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  -webkit-text-fill-color:#13263c !important;
  cursor:pointer !important;
}

html body button.product-btn:not(.is-unavailable) strong,
html body button.delivery-product-btn:not(.is-unavailable) strong{
  color:#13263c !important;
  -webkit-text-fill-color:#13263c !important;
  opacity:1 !important;
  background:transparent !important;
}

html body button.product-btn:not(.is-unavailable) span,
html body button.delivery-product-btn:not(.is-unavailable) span{
  color:#287b4a !important;
  -webkit-text-fill-color:#287b4a !important;
  opacity:1 !important;
  background:transparent !important;
}

html body button.product-btn:not(.is-unavailable):hover,
html body button.delivery-product-btn:not(.is-unavailable):hover{
  background:#f3faf5 !important;
  border-color:#bde0ca !important;
  color:#13263c !important;
  box-shadow:0 5px 14px rgba(40,123,74,.08) !important;
  transform:translateY(-1px) !important;
}

/* Agotado: exactamente la familia visual de Mesa Ocupada. */
html body button.product-btn.is-unavailable,
html body button.delivery-product-btn.is-unavailable,
html body button.product-btn.is-unavailable:hover,
html body button.delivery-product-btn.is-unavailable:hover,
html body button.product-btn.is-unavailable:disabled,
html body button.delivery-product-btn.is-unavailable:disabled{
  -webkit-appearance:none !important;
  appearance:none !important;
  background:#fffafa !important;
  background-image:none !important;
  border:1px solid #f0cbc7 !important;
  color:#c43838 !important;
  opacity:1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  -webkit-text-fill-color:#c43838 !important;
  cursor:not-allowed !important;
  transform:none !important;
  filter:none !important;
}

html body button.product-btn.is-unavailable strong,
html body button.product-btn.is-unavailable span,
html body button.delivery-product-btn.is-unavailable strong,
html body button.delivery-product-btn.is-unavailable span,
html body button.product-btn.is-unavailable .dish-stock-out,
html body button.delivery-product-btn.is-unavailable .dish-stock-out{
  background:transparent !important;
  color:#c43838 !important;
  -webkit-text-fill-color:#c43838 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html body button.product-btn.is-unavailable .dish-stock-out i,
html body button.delivery-product-btn.is-unavailable .dish-stock-out i{
  color:#c43838 !important;
}

/* La selección es una interacción posterior; no altera el estado inicial. */
html body button.product-btn.is-selected:not(.is-unavailable),
html body button.delivery-product-btn.is-selected:not(.is-unavailable){
  background:#e5f5eb !important;
  border-color:#8bc49e !important;
  color:#163b27 !important;
  box-shadow:0 0 0 2px rgba(77,152,103,.12) !important;
}
html body button.product-btn.is-selected:not(.is-unavailable) strong,
html body button.delivery-product-btn.is-selected:not(.is-unavailable) strong{
  color:#163b27 !important;
  -webkit-text-fill-color:#163b27 !important;
}
html body button.product-btn.is-selected:not(.is-unavailable) span,
html body button.delivery-product-btn.is-selected:not(.is-unavailable) span{
  color:#287b4a !important;
  -webkit-text-fill-color:#287b4a !important;
}


/* =========================================================
   FASE 17.5 — SEMÁFORO VISUAL REAL: ÚLTIMA REGLA
   Disponible  = verde muy claro (igual familia Mesa Libre)
   Agotado     = rojo muy claro (igual familia Mesa Ocupada)
   Los botones agotados son inmutables al pasar el cursor.
   ========================================================= */
html body .product-picker button.product-btn,
html body .delivery-picker button.delivery-product-btn {
  background-color:#f4fbf6 !important;
  background:#f4fbf6 !important;
  background-image:none !important;
  border:1px solid #cfe8d7 !important;
  color:#13263c !important;
  -webkit-text-fill-color:#13263c !important;
  opacity:1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  transform:none !important;
}

html body .product-picker button.product-btn:hover:not(.is-unavailable):not(:disabled),
html body .delivery-picker button.delivery-product-btn:hover:not(.is-unavailable):not(:disabled) {
  background-color:#edf8f1 !important;
  background:#edf8f1 !important;
  border-color:#b8dcc4 !important;
  color:#13263c !important;
  -webkit-text-fill-color:#13263c !important;
  box-shadow:0 4px 12px rgba(40,123,74,.07) !important;
  transform:translateY(-1px) !important;
}

html body .product-picker button.product-btn strong,
html body .delivery-picker button.delivery-product-btn strong {
  color:#13263c !important;
  -webkit-text-fill-color:#13263c !important;
  opacity:1 !important;
}

html body .product-picker button.product-btn span,
html body .delivery-picker button.delivery-product-btn span {
  color:#287b4a !important;
  -webkit-text-fill-color:#287b4a !important;
  opacity:1 !important;
}

/* AGOTADO: mismo lenguaje visual que Mesa Ocupada. */
html body .product-picker button.product-btn.is-unavailable,
html body .product-picker button.product-btn.is-unavailable:hover,
html body .product-picker button.product-btn.is-unavailable:focus,
html body .product-picker button.product-btn.is-unavailable:active,
html body .product-picker button.product-btn.is-unavailable:disabled,
html body .delivery-picker button.delivery-product-btn.is-unavailable,
html body .delivery-picker button.delivery-product-btn.is-unavailable:hover,
html body .delivery-picker button.delivery-product-btn.is-unavailable:focus,
html body .delivery-picker button.delivery-product-btn.is-unavailable:active,
html body .delivery-picker button.delivery-product-btn.is-unavailable:disabled {
  background-color:#fff1f0 !important;
  background:#fff1f0 !important;
  background-image:none !important;
  border:1px solid #f2c9c5 !important;
  color:#c43838 !important;
  -webkit-text-fill-color:#c43838 !important;
  opacity:1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  transform:none !important;
  filter:none !important;
  cursor:not-allowed !important;
  transition:none !important;
  outline:none !important;
}

html body .product-picker button.product-btn.is-unavailable strong,
html body .product-picker button.product-btn.is-unavailable span,
html body .delivery-picker button.delivery-product-btn.is-unavailable strong,
html body .delivery-picker button.delivery-product-btn.is-unavailable span,
html body .product-picker button.product-btn.is-unavailable .dish-stock-out,
html body .delivery-picker button.delivery-product-btn.is-unavailable .dish-stock-out {
  color:#c43838 !important;
  -webkit-text-fill-color:#c43838 !important;
  background:transparent !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html body .product-picker button.product-btn.is-unavailable .dish-stock-out i,
html body .delivery-picker button.delivery-product-btn.is-unavailable .dish-stock-out i {
  color:#c43838 !important;
  -webkit-text-fill-color:#c43838 !important;
}

/* Un agotado no puede recibir el estado visual de selección. */
html body .product-picker button.product-btn.is-unavailable.is-selected,
html body .product-picker button.product-btn.is-unavailable.is-selected:hover,
html body .delivery-picker button.delivery-product-btn.is-unavailable.is-selected,
html body .delivery-picker button.delivery-product-btn.is-unavailable.is-selected:hover {
  background:#fff1f0 !important;
  background-color:#fff1f0 !important;
  border-color:#f2c9c5 !important;
  color:#c43838 !important;
  box-shadow:none !important;
  transform:none !important;
}

/* =========================================================
   FASE 17.6 — SEMÁFORO DEFINITIVO: DISPONIBLE / HOVER
   Corrección de cascada: elimina visualmente cualquier estado
   marrón heredado de reglas antiguas, incluido .is-selected.
   Disponible: verde muy claro.
   Hover/focus/active disponible: verde un poco más intenso.
   Agotado: rojo claro, completamente inmóvil al pasar el cursor.
   ========================================================= */
html body .product-picker button.product-btn:not(.is-unavailable),
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable),
html body .product-picker button.product-btn:not(.is-unavailable).is-selected,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable).is-selected {
  background: #f4fbf6 !important;
  background-color: #f4fbf6 !important;
  background-image: none !important;
  border: 1px solid #cfe8d7 !important;
  color: #13263c !important;
  -webkit-text-fill-color: #13263c !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

html body .product-picker button.product-btn:not(.is-unavailable):hover,
html body .product-picker button.product-btn:not(.is-unavailable):focus,
html body .product-picker button.product-btn:not(.is-unavailable):focus-visible,
html body .product-picker button.product-btn:not(.is-unavailable):active,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable):hover,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable):focus,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable):focus-visible,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable):active {
  background: #e6f6ec !important;
  background-color: #e6f6ec !important;
  background-image: none !important;
  border-color: #a9d5b7 !important;
  color: #123b25 !important;
  -webkit-text-fill-color: #123b25 !important;
  box-shadow: 0 4px 12px rgba(47, 138, 79, .10) !important;
  transform: translateY(-1px) !important;
  filter: none !important;
}

html body .product-picker button.product-btn:not(.is-unavailable) strong,
html body .product-picker button.product-btn:not(.is-unavailable) span,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable) strong,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable) span,
html body .product-picker button.product-btn:not(.is-unavailable).is-selected strong,
html body .product-picker button.product-btn:not(.is-unavailable).is-selected span,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable).is-selected strong,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable).is-selected span {
  background: transparent !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html body .product-picker button.product-btn:not(.is-unavailable) strong,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable) strong {
  color: #13263c !important;
  -webkit-text-fill-color: #13263c !important;
}

html body .product-picker button.product-btn:not(.is-unavailable) span,
html body .delivery-picker button.delivery-product-btn:not(.is-unavailable) span {
  color: #2f8a4f !important;
  -webkit-text-fill-color: #2f8a4f !important;
  font-weight: 800 !important;
}

/* Agotado: no hereda hover/selected/disabled del tema marrón. */
html body .product-picker button.product-btn.is-unavailable,
html body .product-picker button.product-btn.is-unavailable:hover,
html body .product-picker button.product-btn.is-unavailable:focus,
html body .product-picker button.product-btn.is-unavailable:focus-visible,
html body .product-picker button.product-btn.is-unavailable:active,
html body .product-picker button.product-btn.is-unavailable:disabled,
html body .product-picker button.product-btn.is-unavailable.is-selected,
html body .product-picker button.product-btn.is-unavailable.is-selected:hover,
html body .delivery-picker button.delivery-product-btn.is-unavailable,
html body .delivery-picker button.delivery-product-btn.is-unavailable:hover,
html body .delivery-picker button.delivery-product-btn.is-unavailable:focus,
html body .delivery-picker button.delivery-product-btn.is-unavailable:focus-visible,
html body .delivery-picker button.delivery-product-btn.is-unavailable:active,
html body .delivery-picker button.delivery-product-btn.is-unavailable:disabled,
html body .delivery-picker button.delivery-product-btn.is-unavailable.is-selected,
html body .delivery-picker button.delivery-product-btn.is-unavailable.is-selected:hover {
  background: #fff1f0 !important;
  background-color: #fff1f0 !important;
  background-image: none !important;
  border: 1px solid #f2c9c5 !important;
  color: #c43838 !important;
  -webkit-text-fill-color: #c43838 !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  cursor: not-allowed !important;
  transition: none !important;
  outline: none !important;
}

html body .product-picker button.product-btn.is-unavailable strong,
html body .product-picker button.product-btn.is-unavailable span,
html body .delivery-picker button.delivery-product-btn.is-unavailable strong,
html body .delivery-picker button.delivery-product-btn.is-unavailable span,
html body .product-picker button.product-btn.is-unavailable .dish-stock-out,
html body .delivery-picker button.delivery-product-btn.is-unavailable .dish-stock-out {
  background: transparent !important;
  color: #c43838 !important;
  -webkit-text-fill-color: #c43838 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}


/* FASE 17.8 — legibilidad de códigos en interfaces de selección.
   Si un selector heredado utiliza fondo marrón, el código secundario debe
   conservar contraste blanco; en los selectores blancos se mantiene oscuro. */
html body .smart-picker-results .smart-picker-result[style*="background"],
html body .smart-picker-results .smart-picker-result.is-brown,
html body .smart-picker-results .smart-picker-result.brown {
  background: var(--rest-primary) !important;
  color: #fff !important;
}
html body .smart-picker-results .smart-picker-result[style*="background"] small,
html body .smart-picker-results .smart-picker-result.is-brown small,
html body .smart-picker-results .smart-picker-result.brown small {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
}
/* Compatibilidad con posibles reglas antiguas que coloreen resultados en marrón. */
html body .smart-picker-result { color: #26364d !important; background: #fff !important; }
html body .smart-picker-result small { color: #7b8796 !important; -webkit-text-fill-color: #7b8796 !important; opacity: 1 !important; }
html body .smart-picker-result:hover,
html body .smart-picker-result:focus { background: var(--rest-soft) !important; color: var(--rest-primary-dark) !important; }

/* FASE 17.8 — la cuenta pendiente del comandero es una acción de caja,
   no una selección de mesa normal. */
html body .mini-table.state-cuenta { cursor: pointer; }

/* Estado no incluido de la carta: neutro, sin confundirse con disponibilidad. */
html body .daily-dish-status.muted {
  background: #f2eee9;
  color: #75685f;
}


/* FASE 17.8 — ajustes de operación y legibilidad
   Cocina: contadores por comanda; Delivery: etiquetas más legibles;
   Producción: ayuda de referencia y botón alineado con los controles. */
html body .kitchen-filter { font-size: 12px !important; }
html body .kitchen-filter b { font-size: 11px !important; }
html body .delivery-origin,
html body .delivery-status,
html body .delivery-payment { font-size: 11px !important; }
html body .delivery-inline-form select { font-size: 13px !important; font-weight: 700 !important; }
html body .production-motive-hint { display:block; margin-top:6px; }
html body .production-submit { align-self:start !important; margin-top:24px !important; }
@media (max-width:1050px) { html body .production-submit { align-self:stretch !important; margin-top:0 !important; } }


/* =========================================================
   FASE 17.9 — PULIDO RESERVAS + SEGUIMIENTO DE DELIVERY
   Componentes interactivos propios, legibilidad y agenda completa.
   ========================================================= */

/* Seguimiento: etiquetas y datos con tamaño de lectura cómodo. */
html body .delivery-origin,
html body .delivery-status,
html body .delivery-payment { font-size:12px !important; }
html body .delivery-order-number { font-size:15px !important; }
html body .delivery-card-customer strong { font-size:14px !important; }
html body .delivery-card-customer span,
html body .delivery-card-customer small,
html body .delivery-card-meta,
html body .delivery-driver-row { font-size:12px !important; }
html body .delivery-driver-row { font-weight:600; }

/* Selector profesional de repartidor: botón + lista desplegable. */
.delivery-driver-picker { position:relative; flex:1 1 auto; min-width:190px; }
.delivery-driver-trigger {
  width:100%; min-height:40px; margin:0; padding:9px 12px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:#fff !important; color:#24364c !important;
  border:1px solid #d9dfe7 !important; border-radius:10px;
  font-size:13px !important; font-weight:700 !important;
  text-align:left; box-shadow:none !important;
}
.delivery-driver-trigger:hover,
.delivery-driver-trigger:focus-visible {
  background:#f8fbf8 !important; border-color:#9bc8a8 !important;
  color:#236b3d !important; outline:none !important;
  box-shadow:0 0 0 2px rgba(61,152,96,.10) !important;
}
.delivery-driver-trigger i { color:#6d7888; font-size:11px; }
.delivery-driver-menu {
  position:absolute; left:0; right:0; top:calc(100% + 5px); z-index:80;
  display:none; max-height:220px; overflow:auto;
  padding:5px; background:#fff; border:1px solid #ddd7d2;
  border-radius:11px; box-shadow:0 14px 32px rgba(55,39,31,.16);
}
.delivery-driver-menu.is-open { display:block; }
.delivery-driver-option {
  width:100%; display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 11px; border:0; border-radius:8px;
  background:#fff !important; color:#24364c !important;
  font-size:13px !important; font-weight:600 !important; text-align:left;
}
.delivery-driver-option:hover,
.delivery-driver-option:focus-visible {
  background:#eaf7ee !important; color:#236b3d !important; outline:none !important;
}
.delivery-driver-option.is-selected { background:#f0f8f2 !important; color:#236b3d !important; }
.delivery-driver-option i { opacity:.8; }
.delivery-inline-form { align-items:flex-start; }
.delivery-inline-form .delivery-driver-picker + .button { min-height:40px; }

/* Reservas: cabecera con acción y agenda a todo el ancho. */
.reservas-page .page-head { align-items:flex-start; }
.reservas-page .page-head-actions { display:flex; align-items:center; gap:10px; }
.reservas-page .agenda-panel { width:100%; }
.reservas-page .agenda-panel .panel-head { align-items:center; }
.reservas-page .agenda-date-form { display:flex; align-items:center; gap:8px; margin:0; }
.reservas-page .agenda-date-form input { margin:0; min-width:165px; }
.reservas-page .agenda-date-form button { white-space:nowrap; }
.reservas-page .agenda-table { min-width:860px; }
.reservas-page .agenda-table th { font-size:11px; }
.reservas-page .agenda-table td { font-size:13px; padding:14px 10px; }
.reservas-page .agenda-table td:first-child strong { font-size:14px; }

/* Cliente/DNI en resultados: alto contraste sobre el resultado marrón. */
.reservas-page .smart-client-results { border-color:#caa18f; }
.reservas-page .smart-client-result {
  background:var(--rest-primary) !important;
  color:#fff !important;
}
.reservas-page .smart-client-result strong,
.reservas-page .smart-client-result small {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  opacity:1 !important;
}
.reservas-page .smart-client-result small { font-size:11px !important; }
.reservas-page .smart-client-result:hover,
.reservas-page .smart-client-result:focus-visible {
  background:var(--rest-primary-dark) !important;
  color:#fff !important; outline:none !important;
}

/* Modal de nueva reserva. */
.reserva-modal-card { width:min(760px,100%); }
.reserva-modal-card .form-grid { grid-template-columns:1fr 1fr; }
.reserva-modal-card textarea { min-height:92px; }
.reserva-modal-card .modal-actions { margin-top:20px; }
@media(max-width:720px){
  .reserva-modal-card .form-grid { grid-template-columns:1fr; }
  .reservas-page .panel-head { align-items:flex-start; flex-wrap:wrap; }
  .reservas-page .agenda-date-form { width:100%; }
  .reservas-page .agenda-date-form input { flex:1; min-width:0; }
  .delivery-inline-form { width:100%; }
  .delivery-driver-picker { min-width:0; }
}

/* ===== FASE 18 · RESERVAS + SALÓN + COMANDERO =====
   Estados operativos integrados. Estas reglas van al final para evitar
   que estilos antiguos de botones/selectores vuelvan a imponerse. */
.reservas-page .agenda-date-form{
  display:flex; align-items:center; gap:0; margin:0;
}
.reservas-page .agenda-date-form input{
  min-width:210px; font-size:14px; font-weight:600;
}
.reservas-page .agenda-table{
  width:100%; table-layout:auto;
}
.reservas-page .agenda-table th:nth-child(1){width:11%}
.reservas-page .agenda-table th:nth-child(2){width:27%}
.reservas-page .agenda-table th:nth-child(3){width:12%}
.reservas-page .agenda-table th:nth-child(4){width:15%}
.reservas-page .agenda-table th:nth-child(5){width:35%}
.reservation-action-cell{
  display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:330px;
}
.reservation-table-label{min-width:110px}
.reservation-table-label strong{display:block;font-size:13px;color:#17304c}
.reservation-table-label small{display:block;margin-top:3px;color:#748198;font-size:11px}
.reservation-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.reservation-actions form{margin:0}
.status-atendida{background:#e8f6ed;color:#287b4a;border-color:#cce8d7}.status-cerrada{background:#e8f6ed;color:#20683f;border-color:#cce8d7}.reservation-closed-note{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;border-radius:9px;background:#f3f7f4;color:#287b4a;font-size:11px;font-weight:700}
.reservation-actions select{min-width:145px;font-size:13px}
.reservation-actions .small,.reservation-actions a.small{font-size:12px;padding:9px 12px}
.field-help{display:block;margin-top:6px;color:#748198;font-size:11px;line-height:1.4}
.reserva-modal-card select{width:100%;min-height:44px}
.reserva-modal-card .form-grid{grid-template-columns:1fr 1fr}

/* Comandero: la reserva es un estado real de la mesa, no una decoración. */
.mini-table.state-reservada{
  background:#fff9e9 !important;
  border-color:#efd38c !important;
  color:#17304c !important;
}
.mini-table.state-reservada .mini-table-icon{
  background:#fff0c9 !important;
  color:#bd7b00 !important;
}
.mini-table.state-reservada .mini-table-state{
  color:#a86d00 !important;
}
.mini-table.state-cuenta{
  background:#fff9e9 !important;
  border-color:#efd38c !important;
}
.mini-table.state-cuenta .mini-table-state{color:#a86d00 !important}
.reservation-context-box{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin:16px 0 10px;padding:13px 15px;border:1px solid #efd38c;
  border-radius:12px;background:#fff9e9;
}
.reservation-context-box strong{display:block;color:#7d5200;font-size:13px}
.reservation-context-box span{display:block;color:#7b6a4b;font-size:12px;margin-top:4px}
.warning-box{background:#fff9e9;border:1px solid #efd38c;color:#7d6538}

/* Cuando un producto/plato está agotado, el botón no debe reaccionar al hover. */
.product-btn.is-unavailable,
.product-btn.is-unavailable:hover,
.product-btn.is-unavailable:focus,
.product-btn.is-unavailable:active{
  background:#fff1f0 !important;
  border-color:#f0c7c3 !important;
  color:#c93636 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  transform:none !important;
}
.product-btn.is-unavailable strong,
.product-btn.is-unavailable span,
.product-btn.is-unavailable .dish-stock-out{
  color:#c93636 !important;
}
.product-btn:not(.is-unavailable){
  background:#f3faf4 !important;
  border-color:#cfe8d4 !important;
}
.product-btn:not(.is-unavailable):hover,
.product-btn:not(.is-unavailable):focus-visible{
  background:#e8f6ea !important;
  border-color:#a9d6b1 !important;
  color:#153e25 !important;
}
.product-btn:not(.is-unavailable) span{color:#21833a !important}

/* Códigos secundarios dentro de resultados marrones: legibles. */
.smart-picker-result small,.smart-client-result small{font-size:11px}
.smart-picker-result{font-size:13px}

/* Mejor legibilidad del seguimiento. */
.delivery-tracking .delivery-card,
.delivery-tracking .delivery-card *{font-size:inherit}
.delivery-tracking .delivery-card{font-size:14px}
.delivery-tracking .status-pill,.delivery-tracking .delivery-type{font-size:13px}

/* En pantallas estrechas la columna Acción conserva espacio para los botones. */
@media(max-width:900px){
  .reservas-page .agenda-table{min-width:900px}
  .reservation-action-cell{min-width:320px}
}
@media(max-width:620px){
  .reservas-page .agenda-date-form{width:100%}
  .reservas-page .agenda-date-form input{width:100%;min-width:0}
  .reservation-context-box{align-items:flex-start;flex-direction:column}
  .reserva-modal-card .form-grid{grid-template-columns:1fr}
}

/* Delivery uses the same availability language as Comandero. */
.delivery-product-btn:not(.is-unavailable){
  background:#f3faf4 !important;border-color:#cfe8d4 !important;color:#17304c !important;
}
.delivery-product-btn:not(.is-unavailable):hover,
.delivery-product-btn:not(.is-unavailable):focus-visible{
  background:#e8f6ea !important;border-color:#a9d6b1 !important;color:#153e25 !important;
}
.delivery-product-btn:not(.is-unavailable) span{color:#21833a !important}
.delivery-product-btn.is-unavailable,
.delivery-product-btn.is-unavailable:hover,
.delivery-product-btn.is-unavailable:focus,
.delivery-product-btn.is-unavailable:active{
  background:#fff1f0 !important;border-color:#f0c7c3 !important;color:#c93636 !important;
  opacity:1 !important;transform:none !important;box-shadow:none !important;cursor:not-allowed !important;
}
.delivery-product-btn.is-unavailable strong,
.delivery-product-btn.is-unavailable span{color:#c93636 !important}


/* =========================================================
   FASE 18.2 — PICKERS / COMBOS PROFESIONALES
   Capa final: los resultados de búsqueda NO son botones CTA.
   Evita que las reglas globales de button les impongan marrón.
   ========================================================= */
html body .smart-combobox-options {
  background:#ffffff !important;
  border:1px solid #dfe6e1 !important;
  border-radius:12px !important;
  box-shadow:0 18px 42px rgba(23,43,32,.14) !important;
  padding:6px !important;
}
html body .smart-combobox-options .smart-option,
html body button.smart-option {
  -webkit-appearance:none !important;
  appearance:none !important;
  width:100% !important;
  min-height:44px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:8px !important;
  background:#ffffff !important;
  color:#13263c !important;
  -webkit-text-fill-color:#13263c !important;
  box-shadow:none !important;
  transform:none !important;
  text-shadow:none !important;
  cursor:pointer !important;
  font-size:13px !important;
}
html body .smart-combobox-options .smart-option:hover,
html body .smart-combobox-options .smart-option:focus,
html body .smart-combobox-options .smart-option:focus-visible {
  background:#eef8f1 !important;
  color:#176b3b !important;
  -webkit-text-fill-color:#176b3b !important;
  outline:none !important;
}
html body .smart-combobox-options .smart-option span {
  color:#5f7180 !important;
  -webkit-text-fill-color:#5f7180 !important;
  font-size:11px !important;
  font-weight:700 !important;
}

/* Buscadores de catálogo: blanco, limpio y sin herencia marrón. */
html body .smart-picker-results .smart-picker-result,
html body button.smart-picker-result {
  -webkit-appearance:none !important;
  appearance:none !important;
  background:#ffffff !important;
  background-image:none !important;
  border:0 !important;
  border-bottom:1px solid #edf0f2 !important;
  border-radius:0 !important;
  color:#26364d !important;
  -webkit-text-fill-color:#26364d !important;
  box-shadow:none !important;
  transform:none !important;
  text-shadow:none !important;
}
html body .smart-picker-results .smart-picker-result:hover,
html body .smart-picker-results .smart-picker-result:focus,
html body button.smart-picker-result:hover,
html body button.smart-picker-result:focus {
  background:#eef8f1 !important;
  color:#176b3b !important;
  -webkit-text-fill-color:#176b3b !important;
  outline:none !important;
}
html body .smart-picker-result strong { color:inherit !important; -webkit-text-fill-color:inherit !important; }
html body .smart-picker-result small { color:#617284 !important; -webkit-text-fill-color:#617284 !important; opacity:1 !important; }

/* Cliente: el DNI/RUC se mantiene blanco sobre una superficie azul profesional,
   evitando el gris de las reglas heredadas y garantizando contraste. */
html body .smart-client-results .smart-client-result,
html body button.smart-client-result {
  -webkit-appearance:none !important;
  appearance:none !important;
  background:#29415b !important;
  background-image:none !important;
  border:0 !important;
  border-bottom:1px solid rgba(255,255,255,.10) !important;
  border-radius:0 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  box-shadow:none !important;
  transform:none !important;
  text-shadow:none !important;
}
html body .smart-client-results .smart-client-result:hover,
html body .smart-client-results .smart-client-result:focus,
html body button.smart-client-result:hover,
html body button.smart-client-result:focus {
  background:#35546f !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  outline:none !important;
}
html body .smart-client-result strong,
html body .smart-client-result small {
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}
html body .smart-client-result small { font-size:11px !important; font-weight:600 !important; }

/* La caja de cliente seleccionada también evita texto gris tenue. */
html body .smart-client-selected { color:#29415b !important; }
html body .smart-client-selected strong { color:#29415b !important; }

/* La Carta es la única fuente de platos publicados para venta. */
html body .order-product-group .group-icon.dish { background:#eef8f1 !important; color:#2f8a57 !important; }


/* =========================================================
   FASE 18.4 — CIERRE OPERATIVO DEFINITIVO · CAPA VISUAL FINAL
   Esta capa neutraliza herencias antiguas de botones/pickers sin
   cambiar la semántica de los estados ni la lógica de negocio.
   ========================================================= */
:root{
  --kf-picker-bg:#ffffff;
  --kf-picker-border:#d9dfe6;
  --kf-picker-hover:#f3f8f5;
  --kf-picker-green:#23814b;
  --kf-picker-ink:#102a43;
}

/* Pickers inteligentes: nunca marrón sólido ni doble borde. */
html body .smart-client-results,
html body .smart-client-results.show{
  background:#fff !important;
  border:1px solid var(--kf-picker-border) !important;
  border-radius:12px !important;
  box-shadow:0 14px 30px rgba(28,43,59,.14) !important;
  overflow:hidden !important;
}
html body .smart-client-results .smart-client-result{
  display:block !important;
  width:100% !important;
  min-height:58px !important;
  padding:11px 14px !important;
  background:#fff !important;
  color:var(--kf-picker-ink) !important;
  border:0 !important;
  border-bottom:1px solid #edf0f3 !important;
  border-radius:0 !important;
  text-align:left !important;
  box-shadow:none !important;
}
html body .smart-client-results .smart-client-result:last-child{border-bottom:0 !important}
html body .smart-client-results .smart-client-result:hover,
html body .smart-client-results .smart-client-result:focus{
  background:var(--kf-picker-hover) !important;
  color:var(--kf-picker-ink) !important;
}
html body .smart-client-results .smart-client-result strong{
  display:block !important;
  color:var(--kf-picker-ink) !important;
  font-size:13px !important;
  font-weight:800 !important;
}
html body .smart-client-results .smart-client-result small{
  display:block !important;
  margin-top:4px !important;
  color:#5e7185 !important;
  font-size:12px !important;
  font-weight:700 !important;
}

/* Si un picker de cliente usa una superficie de identidad oscura en otra pantalla,
   el documento debe seguir siendo blanco y legible. */
html body .smart-client-result.kf-dark-result small,
html body .smart-client-result[data-dark='1'] small{color:#fff !important}

/* Campo contextual de una reserva ya convertida en atención. */
html body .locked-context-field{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid #cfe6d8 !important;
  border-radius:10px;
  background:#f1f9f4 !important;
  color:#237548 !important;
  font-size:13px;
  font-weight:800;
  box-shadow:none !important;
}
html body .locked-context-field i{color:#23814b !important}
html body .reservation-attended-note{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:9px;
  background:#f1f8f4;
  color:#287b4a;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

/* Agenda: acción suficientemente ancha para que nunca se compriman botones. */
.reservas-page .agenda-table th:nth-child(1){width:9%}
.reservas-page .agenda-table th:nth-child(2){width:24%}
.reservas-page .agenda-table th:nth-child(3){width:9%}
.reservas-page .agenda-table th:nth-child(4){width:16%}
.reservas-page .agenda-table th:nth-child(5){width:42%}
.reservas-page .reservation-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.reservas-page .reservation-actions .small{font-size:12px;min-height:38px;padding:8px 11px}

/* Producción: picker limpio, sin doble borde heredado. */
html body .production-picker,
html body .production-picker-results{
  background:#fff !important;
  border:1px solid var(--kf-picker-border) !important;
  border-radius:10px !important;
  box-shadow:0 12px 26px rgba(28,43,59,.12) !important;
}
html body .production-picker button,
html body .production-picker-results button{
  background:#fff !important;
  color:var(--kf-picker-ink) !important;
  border:0 !important;
  border-bottom:1px solid #edf0f3 !important;
  box-shadow:none !important;
}
html body .production-picker button:hover,
html body .production-picker-results button:hover{background:var(--kf-picker-hover) !important}

/* Controles de formulario: un único borde y valores siempre oscuros/legibles. */
html body input:not([type='hidden']),
html body select,
html body textarea{
  color:#102a43 !important;
  background:#fff !important;
}
html body input::placeholder,
html body textarea::placeholder{color:#718096 !important;opacity:1 !important}

/* Botones de carta/productos siguen siendo tarjetas, no botones marrones. */
html body .product-picker .product-btn,
html body .delivery-picker .delivery-product-btn{
  min-height:50px !important;
  padding:10px 12px !important;
  border:1px solid #d5e7da !important;
  border-radius:11px !important;
  background:#f7fcf8 !important;
  color:#102a43 !important;
  box-shadow:none !important;
}
html body .product-picker .product-btn:not(.is-unavailable):hover,
html body .delivery-picker .delivery-product-btn:not(.is-unavailable):hover{
  background:#eef8f1 !important;
  border-color:#b9d9c3 !important;
}

@media(max-width:720px){
  .reservas-page .agenda-table{min-width:920px}
  .reservas-page .reservation-action-cell{min-width:360px}
}
\n\n/* =========================================================\n   FASE 18.4 — CIERRE OPERATIVO / PULIDO FINAL\n   ========================================================= */\nhtml body [hidden]{display:none !important}\n.smart-client-input,.smart-picker-input{background:#fff !important;color:#102a43 !important}\n.smart-client-input::placeholder,.smart-picker-input::placeholder{color:#718096 !important;opacity:1 !important}\n.quick-add-client{display:inline-flex !important;align-items:center;gap:6px;margin-top:7px;padding:8px 12px;border-radius:9px;font-weight:800}\n.order-submit-row{display:flex;justify-content:flex-end;margin-top:12px}\n.order-submit-row button{min-width:260px}\n.active-order-box{padding:18px 18px}.active-order-head strong{font-size:18px}.active-order-head small{font-size:13px}.active-order-items>div{font-size:14px;padding:10px 0}.active-order-total{font-size:15px}.active-order-total strong{font-size:21px}\n.qty-stepper{display:flex;align-items:center;border:1px solid #dbe2e8;border-radius:9px;overflow:hidden;background:#fff;width:max-content}.qty-stepper button{width:34px;height:36px;border:0!important;border-radius:0!important;background:#f7f3ef!important;color:var(--kf-primary)!important;font-size:18px;font-weight:900;padding:0}.qty-stepper input{width:48px;height:36px;border:0!important;border-left:1px solid #edf0f3!important;border-right:1px solid #edf0f3!important;border-radius:0!important;text-align:center!important;padding:0!important;background:#fff!important;color:#102a43!important}\n.cart-row{grid-template-columns:minmax(0,1fr) auto 85px 32px}\n.reservation-go-comandero{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border-radius:9px;background:#e9f7ee;color:#287b4a;font-size:12px;font-weight:800;text-decoration:none}.reservation-go-comandero:hover{background:#dff1e6;color:#1f6b3e}\n.reservation-closed-note,.reservation-attended-note{white-space:nowrap}\n.daily-dish-card{display:flex;flex-direction:column;gap:10px;padding:0!important;overflow:hidden}.daily-dish-main{display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:12px;padding:14px 16px;cursor:pointer}.daily-stock-mode{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;gap:10px;padding:10px 16px 13px;border-top:1px solid #eee6e0;font-size:10px;font-weight:800;color:#6c7787}.daily-stock-mode select{margin:0;min-height:36px;font-size:11px}.daily-stock-mode.is-disabled{opacity:.55}.daily-dish-card:not(.is-in-menu) .daily-stock-mode select{pointer-events:none}.kitchen-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.kitchen-history-link{font-size:11px;min-height:38px}\n.kitchen-history-list{display:grid;gap:12px}.kitchen-history-card{background:#fff;border:1px solid #e5ddd8;border-radius:14px;padding:16px}.kitchen-history-head{display:flex;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #eee7e2}.kitchen-history-head strong{display:block;font-size:15px}.kitchen-history-head small{display:block;color:#788497;margin-top:4px;font-size:11px}.kitchen-history-head>div:last-child{text-align:right}.kitchen-history-items>div{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #f0ece9;font-size:13px}.kitchen-history-items>div:last-child{border-bottom:0}.status-entregado{background:#e8f6ed;color:#287b4a}\n/* Selectores y dropdowns: blanco limpio, un solo borde, sin fondos marrones. */\nhtml body select,html body input,html body textarea{background:#fff !important;color:#102a43 !important;border-color:#d8e0e8 !important}\nhtml body select option{background:#fff !important;color:#102a43 !important}\nhtml body .production-picker,html body .production-picker-results,html body .smart-picker-results,html body .smart-client-results,html body .type-options{background:#fff !important;border:1px solid #d8e0e8 !important;box-shadow:0 14px 34px rgba(28,43,59,.13) !important}\nhtml body .production-picker button,html body .production-picker-results button,html body .smart-picker-results button,html body .smart-client-results button,html body .type-options button{background:#fff !important;color:#102a43 !important;border:0 !important;border-bottom:1px solid #edf0f3 !important;box-shadow:none !important}\nhtml body .production-picker button:hover,html body .production-picker-results button:hover,html body .smart-picker-results button:hover,html body .smart-client-results button:hover,html body .type-options button:hover{background:#f5f8fa !important;color:#102a43 !important}\n@media(max-width:720px){.order-submit-row{justify-content:stretch}.order-submit-row button{width:100%;min-width:0}.daily-stock-mode{grid-template-columns:1fr}.cart-row{grid-template-columns:minmax(0,1fr) auto 70px 32px}.qty-stepper input{width:42px}}\n
.dish-stock-unlimited{color:#287b4a!important;font-weight:800}.daily-stock-mode select{cursor:pointer}.daily-dish-card:not(.is-in-menu) .daily-stock-mode{opacity:.45}.kitchen-history-panel .panel-head{align-items:flex-start}


/* F18.4.1 — estado operativo de comanda y alta rápida de clientes */
.active-order-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.active-order-actions .button{margin:0}
.active-order-waiting{display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:10px;background:#f7f1eb;color:#76584b;font-size:.9rem;font-weight:700}
.quick-add-client[hidden]{display:none!important}


/* =========================================================
   FASE 18.4.2 — PULIDO FINAL COMANDERO / COCINA
   - Stepper horizontal compacto, nunca vertical.
   - Delivery despachado (en_reparto) deja de aparecer en Cocina.
   ========================================================= */
html body .cart-row{
  grid-template-columns:minmax(0,1fr) auto 85px 32px !important;
  column-gap:10px !important;
  align-items:center !important;
}
html body .qty-stepper{
  display:inline-flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:center !important;
  width:112px !important;
  height:34px !important;
  min-width:112px !important;
  border:1px solid #dbe2e8 !important;
  border-radius:8px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:none !important;
}
html body .qty-stepper button{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 32px !important;
  width:32px !important;
  min-width:32px !important;
  height:34px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:#f6f2ef !important;
  color:var(--kf-primary) !important;
  font-size:16px !important;
  line-height:1 !important;
  font-weight:900 !important;
}
html body .qty-stepper button:hover{
  background:#eee5df !important;
  color:var(--kf-primary-dark) !important;
}
html body .qty-stepper input{
  flex:1 1 auto !important;
  width:46px !important;
  min-width:46px !important;
  max-width:48px !important;
  height:34px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-left:1px solid #edf0f3 !important;
  border-right:1px solid #edf0f3 !important;
  border-radius:0 !important;
  background:#fff !important;
  color:#102a43 !important;
  text-align:center !important;
  font-size:13px !important;
  font-weight:700 !important;
  appearance:textfield !important;
}
html body .qty-stepper input::-webkit-outer-spin-button,
html body .qty-stepper input::-webkit-inner-spin-button{margin:0;appearance:none}
@media(max-width:720px){
  html body .cart-row{grid-template-columns:minmax(0,1fr) 112px 70px 32px !important;gap:7px !important}
  html body .qty-stepper{width:104px !important;min-width:104px !important}
  html body .qty-stepper button{flex-basis:30px !important;width:30px !important;min-width:30px !important}
  html body .qty-stepper input{min-width:42px !important;width:42px !important}
}


/* =========================================================
   FASE 18.4.3 — STOCK CONCEPTUAL + CARRITO FINAL
   - El stock de almacén pertenece únicamente a productos físicos.
   - La disponibilidad de platos se gestiona en Producción/Carta.
   - Stepper del carrito siempre horizontal y compacto.
   ========================================================= */
html body .cart-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 112px 82px 32px !important;
  align-items:center !important;
  gap:8px !important;
  min-height:50px !important;
}
html body .cart-row .qty-stepper{
  display:inline-flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  width:112px !important;
  min-width:112px !important;
  height:34px !important;
  max-height:34px !important;
  align-items:center !important;
  justify-content:center !important;
}
html body .cart-row .qty-stepper > button{
  display:flex !important;
  flex:0 0 32px !important;
  width:32px !important;
  min-width:32px !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 !important;
  margin:0 !important;
}
html body .cart-row .qty-stepper > input{
  flex:1 1 46px !important;
  width:46px !important;
  min-width:46px !important;
  max-width:48px !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 !important;
}
html body .cart-row .remove{
  width:32px !important;
  min-width:32px !important;
  height:32px !important;
  padding:0 !important;
}
html body #productsTable td .muted{
  font-weight:700;
}
@media(max-width:720px){
  html body .cart-row{
    grid-template-columns:minmax(0,1fr) 104px 70px 32px !important;
    gap:7px !important;
  }
  html body .cart-row .qty-stepper{
    width:104px !important;
    min-width:104px !important;
  }
  html body .cart-row .qty-stepper > button{
    flex-basis:30px !important;
    width:30px !important;
    min-width:30px !important;
  }
  html body .cart-row .qty-stepper > input{
    min-width:42px !important;
    width:42px !important;
  }
}

/* Fase 18.4.4 — Resumen de mesas y alineación definitiva del calendario del Dashboard. */
.mesa-status-summary{align-items:center;gap:9px!important}
.mesa-status-summary .status-pill{display:inline-flex;align-items:center;gap:6px;line-height:1.1}
.mesa-status-summary .status-pill strong{font-size:12px;font-weight:800;line-height:1}
.kf-dashboard-date .date-control>i{position:static!important;left:auto!important;top:auto!important;transform:none!important;width:auto!important;flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;height:18px!important;line-height:18px!important}
.kf-dashboard-date .date-control{align-items:center!important}
.kf-dashboard-date .date-control input{line-height:24px!important;height:24px!important;display:block!important}


/* =========================================================
   FASE 18.4.5 — PRODUCCIÓN COMPACTA + CALENDARIO UNIFICADO
   ========================================================= */
/* Producción: los tres modos siempre quedan en una sola fila en escritorio. */
html body .production-mode-panel{padding:16px 20px!important;gap:18px!important}
html body .production-modes{display:flex!important;flex-wrap:nowrap!important;gap:7px!important;align-items:stretch!important}
html body .production-mode{min-width:104px!important;width:104px!important;padding:8px 9px!important;border-radius:10px!important}
html body .production-mode strong{font-size:10.5px!important;white-space:nowrap!important}
html body .production-mode small{font-size:8.5px!important}
html body .production-mode i{font-size:14px!important}
html body .production-stats{gap:12px!important;margin-bottom:16px!important}
html body .production-stats .stat{padding:14px 16px!important;min-height:112px!important}
html body .production-stats .stat strong{font-size:25px!important;margin:5px 0!important}
html body .production-stats .stat span{font-size:11px!important}
html body .production-stats .stat small{font-size:9px!important}
html body .production-stats .stat-icon{width:34px!important;height:34px!important;font-size:15px!important;margin-bottom:3px!important}

/* Un solo diseño de calendario para Dashboard, Reservas, Carta e Historial. */
html body .unified-date-field{min-height:44px!important;display:flex!important;align-items:center!important;gap:8px!important;background:#fff!important;border:1px solid #d8e0e8!important;border-radius:11px!important;padding:8px 11px!important;box-shadow:none!important}
html body .unified-date-field>i{color:var(--kf-primary)!important;font-size:15px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;height:18px!important;line-height:18px!important}
html body .unified-date-field input.flatpickr-input,html body .unified-date-field input:not([type="hidden"]){border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;color:#102a43!important;font-weight:700!important;padding:0!important;margin:0!important;height:24px!important;line-height:24px!important;width:150px!important;min-width:150px!important}
html body .unified-date-field input[type="hidden"]{display:none!important}
html body .unified-date-form label{margin:0!important}
html body .unified-date-form .flatpickr-input:focus,html body .unified-date-form input:not([type="hidden"]):focus{border:0!important;box-shadow:none!important}
html body .unified-date-form .flatpickr-calendar{z-index:100!important}
html body .daily-menu-date .unified-date-field{min-width:220px!important}
html body .agenda-date-form .unified-date-field{min-width:220px!important}

/* El calendario debe verse igual independientemente del módulo que lo abra. */
html body .flatpickr-calendar{border:1px solid var(--rest-border)!important;border-radius:16px!important;box-shadow:0 18px 45px rgba(55,39,31,.16)!important;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif!important;overflow:hidden!important}
html body .flatpickr-months,html body .flatpickr-weekdays{background:#fffaf6!important}
html body .flatpickr-current-month,html body .flatpickr-weekday{color:var(--rest-ink)!important}
html body .flatpickr-day.selected,html body .flatpickr-day.selected:hover{background:var(--rest-primary)!important;border-color:var(--rest-primary)!important}
html body .flatpickr-day.today{border-color:var(--rest-primary)!important}
html body .flatpickr-day:hover{background:var(--rest-soft)!important;border-color:var(--rest-soft)!important}
html body .flatpickr-day{border-radius:9px!important}

@media(max-width:1000px){
  html body .production-mode-panel{align-items:center!important}
  html body .production-modes{width:auto!important}
}
@media(max-width:720px){
  html body .production-mode-panel{align-items:flex-start!important;flex-direction:column!important}
  html body .production-modes{width:100%!important;overflow-x:auto!important;padding-bottom:2px!important}
  html body .production-mode{flex:0 0 104px!important}
  html body .production-stats .stat{min-height:100px!important}
  html body .unified-date-field,html body .daily-menu-date .unified-date-field,html body .agenda-date-form .unified-date-field{width:100%!important;min-width:0!important}
  html body .unified-date-field input.flatpickr-input{width:auto!important;min-width:0!important;flex:1!important}
}

/* Fase 18.4.6 — Fechas unificadas también en Reportes, Auditoría y Kardex. */
html body .report-filters .unified-date-field,
html body .audit-filters .unified-date-field,
html body .kardex-filters .unified-date-field{
  min-height:44px!important;
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 11px!important;
  margin-top:6px!important;
  background:#fff!important;
  border:1px solid #d8e0e8!important;
  border-radius:11px!important;
  box-shadow:none!important;
  position:relative!important;
}
html body .report-filters .unified-date-field>i,
html body .audit-filters .unified-date-field>i,
html body .kardex-filters .unified-date-field>i{
  position:static!important;
  transform:none!important;
  left:auto!important;
  top:auto!important;
  margin:0!important;
  width:auto!important;
  height:18px!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:var(--rest-primary)!important;
  font-size:15px!important;
  pointer-events:none!important;
}
html body .report-filters .unified-date-field input:not([type="hidden"]),
html body .audit-filters .unified-date-field input:not([type="hidden"]),
html body .kardex-filters .unified-date-field input:not([type="hidden"]){
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
  height:24px!important;
  min-height:24px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#102a43!important;
  font-weight:700!important;
  line-height:24px!important;
  cursor:pointer!important;
}
html body .report-filters .unified-date-field input[type="hidden"],
html body .audit-filters .unified-date-field input[type="hidden"],
html body .kardex-filters .unified-date-field input[type="hidden"]{display:none!important}
html body .report-filters .unified-date-field .flatpickr-input,
html body .audit-filters .unified-date-field .flatpickr-input,
html body .kardex-filters .unified-date-field .flatpickr-input{border:0!important;box-shadow:none!important;outline:0!important}
html body .kardex-filters .unified-date-field{margin-top:6px!important}
html body .report-filters .unified-date-field:focus-within,
html body .audit-filters .unified-date-field:focus-within,
html body .kardex-filters .unified-date-field:focus-within{border-color:#b9c9d8!important}

@media(max-width:950px){
  html body .report-filters .unified-date-field,
  html body .audit-filters .unified-date-field,
  html body .kardex-filters .unified-date-field{min-width:0!important}
}

/* Fase 18.4.8 — Auditoría: fechas visibles por defecto y alineación final. */
html body .audit-filters .unified-date-field input.flatpickr-input[type="hidden"]{display:none!important}
html body .audit-filters .unified-date-field input.flatpickr-alt-input,
html body .audit-filters .unified-date-field input:not([type="hidden"]){
  color:#102a43!important;
  opacity:1!important;
  visibility:visible!important;
}
html body .audit-filters .unified-date-field>i{
  position:static!important;
  transform:none!important;
  margin:0!important;
}

/* Fase 18.4.7 — Corrección definitiva de campos de fecha + login renovado. */
html body .unified-date-field{
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:8px!important;
  position:relative!important;
}
html body .unified-date-field>i{
  grid-column:1!important;
  grid-row:1!important;
  position:static!important;
  width:20px!important;
  height:20px!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  justify-self:center!important;
  align-self:center!important;
  z-index:1!important;
}
html body .unified-date-field input.flatpickr-alt-input,
html body .unified-date-field input:not([type="hidden"]){
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
  background:transparent!important;
  position:static!important;
}
html body .unified-date-field input.flatpickr-input[type="hidden"],
html body .unified-date-field input[type="hidden"]{display:none!important}

/* El Dashboard conserva su composición actual, pero comparte la misma alineación. */
html body .kf-dashboard-date .date-control{display:flex!important;align-items:center!important}

/* Login profesional Kuantika Food */
html body.login-page{
  min-height:100vh;
  margin:0;
  display:grid;
  place-items:center;
  padding:28px;
  overflow:auto;
  background:
    radial-gradient(circle at 12% 18%,rgba(201,138,74,.18),transparent 30%),
    radial-gradient(circle at 88% 82%,rgba(143,79,63,.15),transparent 32%),
    linear-gradient(135deg,#f8f4ef 0%,#eef2f5 100%);
}
html body.login-page::before{
  content:"";
  position:fixed;
  width:360px;height:360px;
  border-radius:50%;
  border:1px solid rgba(143,79,63,.08);
  right:-130px;top:-130px;
  pointer-events:none;
}
html body.login-page::after{
  content:"";
  position:fixed;
  width:260px;height:260px;
  border-radius:50%;
  border:1px solid rgba(201,138,74,.10);
  left:-110px;bottom:-100px;
  pointer-events:none;
}
html body.login-page .login-card{
  width:min(900px,100%);
  min-height:520px;
  padding:0;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  overflow:hidden;
  background:#fffdfb;
  border:1px solid rgba(234,223,214,.95);
  border-radius:26px;
  box-shadow:0 28px 80px rgba(55,39,31,.16);
  position:relative;
  z-index:1;
}
html body.login-page .login-brand-panel{
  padding:44px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:
    radial-gradient(circle at 78% 20%,rgba(255,255,255,.13),transparent 28%),
    linear-gradient(145deg,var(--rest-primary-dark),var(--rest-primary));
  color:#fff;
  position:relative;
  overflow:hidden;
}
html body.login-page .login-brand-panel::before,
html body.login-page .login-brand-panel::after{
  content:"";
  position:absolute;
  border:1px solid rgba(255,255,255,.13);
  border-radius:50%;
  pointer-events:none;
}
html body.login-page .login-brand-panel::before{width:330px;height:330px;right:-180px;bottom:-150px}
html body.login-page .login-brand-panel::after{width:190px;height:190px;left:-100px;top:35px}
html body.login-page .login-brand-panel .brand{position:relative;z-index:1;justify-content:flex-start;margin:0}
html body.login-page .login-brand-panel .brand-mark{
  width:52px;height:52px;border-radius:16px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
html body.login-page .login-brand-panel .brand-mark i{font-size:24px}
html body.login-page .login-brand-panel .brand strong{font-size:19px;color:#fff}
html body.login-page .login-brand-panel .brand small{font-size:12px;color:rgba(255,255,255,.72)}
html body.login-page .login-copy{position:relative;z-index:1;max-width:360px}
html body.login-page .login-copy .eyebrow{
  display:inline-flex;align-items:center;gap:7px;
  font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:#ffe6cf;margin-bottom:15px
}
html body.login-page .login-copy h2{font-size:34px;line-height:1.08;margin:0 0 13px;color:#fff;letter-spacing:-.02em}
html body.login-page .login-copy p{font-size:13px;line-height:1.65;color:rgba(255,255,255,.78);margin:0}
html body.login-page .login-feature-list{display:grid;gap:10px;position:relative;z-index:1;margin-top:30px}
html body.login-page .login-feature-list span{display:flex;align-items:center;gap:9px;font-size:11px;color:rgba(255,255,255,.84)}
html body.login-page .login-feature-list i{font-size:14px;color:#ffe1bd}
html body.login-page .login-form-panel{padding:48px 52px;display:flex;align-items:center}
html body.login-page .login-form-inner{width:100%;max-width:370px;margin:0 auto}
html body.login-page .login-form-inner .login-heading{margin-bottom:26px}
html body.login-page .login-form-inner h1{font-size:28px;line-height:1.15;margin:0 0 7px;color:#102a43;letter-spacing:-.02em}
html body.login-page .login-form-inner .muted{font-size:12px;margin:0;color:#718096}
html body.login-page .login-form-inner label{font-size:11px;color:#3f5063;margin-bottom:17px}
html body.login-page .login-input-wrap{position:relative}
html body.login-page .login-input-wrap i{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:15px;color:var(--rest-primary);pointer-events:none;z-index:1}
html body.login-page .login-form-inner input{
  height:48px;margin-top:7px;padding:0 13px 0 40px;border-radius:12px;
  border:1px solid #d9e0e7;background:#fff;color:#17283b;font-size:13px;
  transition:border-color .18s,box-shadow .18s,background .18s
}
html body.login-page .login-form-inner input:focus{border-color:var(--rest-primary);box-shadow:0 0 0 4px rgba(143,79,63,.10);background:#fff}
html body.login-page .login-submit{
  width:100%;height:48px;margin-top:5px;border-radius:12px;
  background:linear-gradient(135deg,var(--rest-primary),var(--rest-primary-dark));
  box-shadow:0 10px 22px rgba(143,79,63,.22);
  font-size:13px
}
html body.login-page .login-submit:hover{transform:translateY(-1px);box-shadow:0 13px 26px rgba(143,79,63,.25)}
html body.login-page .login-security{display:flex;align-items:center;justify-content:center;gap:7px;margin:20px 0 0;color:#8993a0;font-size:10px}
html body.login-page .login-security i{color:var(--rest-green);font-size:13px}
html body.login-page .login-demo{margin:13px 0 0;padding-top:13px;border-top:1px solid #eee7e1;text-align:center;color:#9aa3af;font-size:10px}
html body.login-page .login-demo b{color:#6b7480}
html body.login-page .alert{border-radius:11px;font-size:11px}
@media(max-width:760px){
  html body.login-page{padding:16px;place-items:center}
  html body.login-page .login-card{grid-template-columns:1fr;min-height:0;max-width:470px;border-radius:22px}
  html body.login-page .login-brand-panel{padding:28px 28px 24px;gap:24px}
  html body.login-page .login-copy h2{font-size:28px}
  html body.login-page .login-feature-list{display:none}
  html body.login-page .login-form-panel{padding:30px 28px 32px}
}
@media(max-width:420px){
  html body.login-page{padding:10px}
  html body.login-page .login-brand-panel{padding:24px 22px}
  html body.login-page .login-form-panel{padding:26px 22px 28px}
  html body.login-page .login-form-inner h1{font-size:25px}
}

/* Fase 19.1 — Comprobantes: gestión local, trazable y responsive. */
.comprobantes-hero{display:grid;grid-template-columns:repeat(2,minmax(150px,.55fr)) 1.8fr;gap:14px;margin-bottom:18px;border-top:3px solid var(--kf-primary)}
.comprobantes-hero>div{padding:8px 10px}.comprobantes-hero strong{display:block;font-size:30px;line-height:1.1;color:var(--kf-ink);margin:5px 0}.comprobantes-hero small{display:block;color:var(--kf-muted);font-size:10px}.comprobante-kpi-label{font-size:11px;color:var(--kf-muted);font-weight:700}.comprobante-note{display:flex;align-items:center;gap:12px;border:1px solid var(--kf-border);background:#fffaf6;border-radius:12px;padding:12px 14px!important}.comprobante-note>i{font-size:22px;color:var(--kf-primary)}.comprobante-note strong{font-size:13px;margin:0 0 3px}.comprobante-note span{display:block;font-size:10px;color:var(--kf-muted);line-height:1.45}.comprobante-emit-form{display:flex;gap:6px;align-items:center;min-width:230px}.comprobante-emit-form select{margin:0;min-width:105px;height:38px;padding:7px 10px}.comprobante-emit-form button{white-space:nowrap}.series-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.series-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;border:1px solid var(--kf-border);border-radius:12px;padding:11px 13px;background:#fffdfa}.series-card strong{font-size:17px;color:var(--kf-ink)}.series-card>span:last-child{font-size:10px;color:var(--kf-muted)}.series-card b{color:var(--kf-primary)}.comprobante-sheet{width:min(900px,calc(100% - 32px));margin:32px auto;padding:28px;background:#fff;border:1px solid var(--kf-border);border-radius:16px;box-shadow:0 12px 35px rgba(55,39,31,.08);color:var(--kf-ink)}.print-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:22px}.comprobante-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:18px;border-bottom:2px solid var(--kf-primary)}.brand-print{font-size:25px;font-weight:800}.document-box{min-width:205px;text-align:center;border:1px solid var(--kf-border);border-radius:12px;padding:10px}.document-box strong,.document-box span{display:block}.document-box strong{font-size:12px;color:var(--kf-primary)}.document-box span{font-size:17px;font-weight:800;margin-top:3px}.comprobante-business{padding:15px 0}.comprobante-business strong,.comprobante-business span{display:block}.comprobante-business span{font-size:10px;color:var(--kf-muted);margin-top:3px}.comprobante-client{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:12px;margin:10px 0 20px;padding:13px;border:1px solid var(--kf-border);border-radius:12px;background:#fffaf6}.comprobante-client small,.comprobante-client strong{display:block}.comprobante-client small{font-size:9px;text-transform:uppercase;color:var(--kf-muted);font-weight:800}.comprobante-client strong{font-size:12px;margin-top:4px}.comprobante-totals{margin:18px 0 0 auto;width:min(330px,100%)}.comprobante-totals>div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--kf-border);font-size:12px}.comprobante-totals .total{font-size:17px;border-bottom:0;padding-top:12px}.comprobante-footer{display:flex;justify-content:space-between;gap:15px;margin-top:24px;padding-top:12px;border-top:1px solid var(--kf-border);font-size:9px;color:var(--kf-muted)}
@media(max-width:900px){.comprobantes-hero{grid-template-columns:1fr 1fr}.comprobante-note{grid-column:1/-1}.series-grid{grid-template-columns:1fr}.comprobante-client{grid-template-columns:1fr 1fr}.comprobante-client>div:first-child{grid-column:1/-1}}
@media(max-width:620px){.comprobantes-hero{grid-template-columns:1fr}.comprobante-note{grid-column:auto}.comprobante-emit-form{flex-direction:column;align-items:stretch;min-width:0}.comprobante-emit-form select,.comprobante-emit-form button{width:100%}.comprobante-header{flex-direction:column}.document-box{width:100%}.comprobante-client{grid-template-columns:1fr}.comprobante-client>div:first-child{grid-column:auto}.comprobante-footer{flex-direction:column}.comprobante-sheet{width:calc(100% - 18px);padding:16px;margin:9px auto}}

/* Fase 19.1.1 — Correlativo de mesas protegido. */
.field-lock-note{display:inline-flex;align-items:center;gap:4px;margin-left:8px;font-size:.78rem;font-weight:700;color:#8a756d;}
#bulkTableStart[readonly]{background:#f7f3ef;color:#53677f;font-weight:700;cursor:not-allowed;box-shadow:none;}
#bulkTableStart[readonly]:focus{outline:none;border-color:#d8cfc8;box-shadow:none;}

/* Caja: cuentas y arqueo en columna izquierda; movimientos a la derecha */
.cash-work-grid{align-items:start}
.cash-left-stack{display:grid;gap:16px;min-width:0}
.cash-left-stack .close-cash-panel{margin:0}

/* Registro de pago: dos columnas en escritorio, una en móvil */
.payment-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;align-items:start}
.payment-fields>label,.payment-fields>#discountWrap{min-width:0}
.payment-fields .field-hint{margin-top:5px}
#discountWrap .muted{display:block;margin-top:-4px;font-size:10px}
@media(max-width:720px){.payment-fields{grid-template-columns:1fr}}


/* =========================================================
   Fase 19.1.5 — Comprobantes: tabla de emisión optimizada
   Ajuste visual: Venta/Origen/Total más compactos para
   liberar espacio a Tipo de comprobante y Acción.
   No modifica lógica ni correlativos.
   ========================================================= */
#salesToInvoice{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
#salesToInvoice th,
#salesToInvoice td{
  vertical-align:middle;
}
#salesToInvoice th:nth-child(1),
#salesToInvoice td:nth-child(1){width:7%}
#salesToInvoice th:nth-child(2),
#salesToInvoice td:nth-child(2){width:14%}
#salesToInvoice th:nth-child(3),
#salesToInvoice td:nth-child(3){width:10%}
#salesToInvoice th:nth-child(4),
#salesToInvoice td:nth-child(4){width:17%}
#salesToInvoice th:nth-child(5),
#salesToInvoice td:nth-child(5){width:9%}
#salesToInvoice th:nth-child(6),
#salesToInvoice td:nth-child(6){width:15%}
#salesToInvoice th:nth-child(7),
#salesToInvoice td:nth-child(7){width:28%}

#salesToInvoice td:nth-child(2),
#salesToInvoice td:nth-child(5){
  white-space:nowrap;
}
#salesToInvoice td:nth-child(3){
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#salesToInvoice .comprobante-emit-form{
  width:100%;
  min-width:0;
  display:flex;
  gap:6px;
}
#salesToInvoice .comprobante-emit-form select{
  flex:0 0 105px;
  min-width:0;
}
#salesToInvoice .comprobante-emit-form button{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:1100px) and (min-width:761px){
  #salesToInvoice th:nth-child(1),
  #salesToInvoice td:nth-child(1){width:7%}
  #salesToInvoice th:nth-child(2),
  #salesToInvoice td:nth-child(2){width:14%}
  #salesToInvoice th:nth-child(3),
  #salesToInvoice td:nth-child(3){width:9%}
  #salesToInvoice th:nth-child(4),
  #salesToInvoice td:nth-child(4){width:16%}
  #salesToInvoice th:nth-child(5),
  #salesToInvoice td:nth-child(5){width:9%}
  #salesToInvoice th:nth-child(6),
  #salesToInvoice td:nth-child(6){width:15%}
  #salesToInvoice th:nth-child(7),
  #salesToInvoice td:nth-child(7){width:30%}
  #salesToInvoice .comprobante-emit-form select{flex-basis:96px}
  #salesToInvoice .comprobante-emit-form button{font-size:11px}
}

@media(max-width:760px){
  #salesToInvoice{
    min-width:920px!important;
    table-layout:fixed!important;
  }
  .comprobantes-hero,
  .series-grid{overflow:visible}
  #salesToInvoice th,
  #salesToInvoice td{white-space:nowrap}
  #salesToInvoice .comprobante-emit-form{width:auto}
}

/* FASE 19.2 · Historial de comprobantes */
.comprobantes-history td:first-child{min-width:150px}.comprobantes-history td{vertical-align:middle}.history-type{display:block;margin-top:3px;font-size:12px;color:#6d83a0}.comprobantes-history .small{padding:9px 12px;white-space:nowrap}.comprobantes-history-wrap{overflow-x:auto}
@media(max-width:900px){.comprobantes-history{min-width:900px}}

/* Fase 20 · configuración tributaria */
.tributary-hero{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;border-top:3px solid var(--kf-primary)}
.tributary-status{display:flex;align-items:center;gap:14px;padding:8px}.tributary-status>i{font-size:27px;color:var(--kf-primary);background:#fff6ef;border:1px solid var(--kf-border);border-radius:12px;padding:10px}.tributary-status strong,.tributary-status span{display:block}.tributary-status strong{font-size:14px}.tributary-status span{font-size:11px;color:var(--kf-muted);margin-top:3px}.tributary-badge{min-width:170px;border:1px solid var(--kf-border);border-radius:12px;padding:12px 15px;background:#fffaf6}.tributary-badge span,.tributary-badge small{display:block;color:var(--kf-muted);font-size:10px}.tributary-badge strong{display:block;font-size:14px;margin:3px 0}.tributary-form{margin-top:18px}.form-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.form-grid-3 label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:var(--kf-ink)}.form-grid-3 input,.form-grid-3 select{width:100%;margin:0}.form-grid-3 .span-2{grid-column:span 2}.tributary-subhead{margin-top:28px;padding-top:20px;border-top:1px solid var(--kf-border)}.tributary-warning{display:flex;gap:11px;align-items:flex-start;margin-top:20px;padding:13px 15px;border:1px solid var(--kf-border);background:#fffaf6;border-radius:12px;color:var(--kf-muted)}.tributary-warning i{color:var(--kf-primary);font-size:18px}.tributary-warning strong,.tributary-warning span{display:block}.tributary-warning strong{font-size:12px;color:var(--kf-ink)}.tributary-warning span{font-size:10px;line-height:1.5;margin-top:3px}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid var(--kf-border)}
@media(max-width:800px){.tributary-hero{grid-template-columns:1fr}.form-grid-3{grid-template-columns:1fr 1fr}.form-grid-3 .span-2{grid-column:1/-1}}
@media(max-width:560px){.form-grid-3{grid-template-columns:1fr}.form-grid-3 .span-2{grid-column:auto}.form-actions{flex-direction:column}.form-actions .button{width:100%}}

/* FASE 21 · Base de emisión electrónica */
.electronic-panel{margin-top:18px}.electronic-status-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:6px 0 14px}.electronic-status-row small{color:#6d83a0}.electronic-panel .button{white-space:nowrap}


/* =========================================================
   FASE 21.1 — NAVEGACIÓN MÓVIL KUANTIKA FOOD
   En escritorio conserva la barra lateral existente.
   En móvil se convierte en menú lateral off-canvas para que
   el contenido del módulo comience inmediatamente debajo de la cabecera.
   ========================================================= */
.mobile-menu-toggle{display:none;align-items:center;justify-content:center;gap:7px;height:40px;min-width:42px;padding:8px 10px;border:1px solid var(--kfd-border,#e5ddd7);border-radius:11px;background:#fffaf7;color:#7d4637;font-size:12px;font-weight:800;box-shadow:0 3px 10px rgba(65,38,29,.05)}
.mobile-menu-toggle i{font-size:20px;line-height:1}
.mobile-menu-backdrop{display:none}

@media(max-width:720px){
  body.mobile-nav-open{overflow:hidden}
  .topbar{position:sticky;top:0;z-index:1003;display:flex;align-items:center;gap:10px}
  .mobile-menu-toggle{display:inline-flex;flex:0 0 auto}
  .brand{min-width:0;flex:1}
  .brand>div:last-child{min-width:0}
  .brand strong,.brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .layout{display:block;min-height:calc(100vh - 68px)}
  .sidebar#kuantikaSidebar{
    position:fixed;
    z-index:1002;
    top:68px;
    left:0;
    bottom:0;
    width:min(320px,88vw);
    height:auto;
    margin:0;
    padding:14px 12px 24px;
    display:block;
    overflow-y:auto;
    overflow-x:hidden;
    border:0;
    border-radius:0 18px 18px 0;
    box-shadow:14px 0 35px rgba(50,17,12,.24);
    transform:translateX(-105%);
    transition:transform .22s ease;
    -webkit-overflow-scrolling:touch;
  }
  .sidebar#kuantikaSidebar.mobile-open{transform:translateX(0)}
  .sidebar#kuantikaSidebar .nav-title,
  .sidebar#kuantikaSidebar .nav-toggle{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    padding:13px 12px 7px;
    margin:0;
  }
  .sidebar#kuantikaSidebar .nav-group-items{display:block}
  .sidebar#kuantikaSidebar .nav-group.is-collapsed .nav-group-items{display:none}
  .sidebar#kuantikaSidebar a{
    display:flex;
    width:100%;
    min-height:44px;
    align-items:center;
    white-space:normal;
    margin:2px 0;
    padding:11px 13px;
  }
  .sidebar#kuantikaSidebar .nav-icon{width:25px;flex:0 0 25px;text-align:center}
  .mobile-menu-backdrop:not([hidden]){
    display:block;
    position:fixed;
    z-index:1001;
    top:68px;
    right:0;
    bottom:0;
    left:0;
    background:rgba(22,12,9,.46);
    backdrop-filter:blur(1px);
  }
  .content{position:relative;z-index:1}
}

@media(max-width:560px){
  .topbar{height:68px;min-height:68px;padding:10px 12px}
  .mobile-menu-toggle{height:40px;min-width:40px;padding:7px 9px}
  .mobile-menu-toggle span{display:none}
  .sidebar#kuantikaSidebar{top:68px;width:min(310px,88vw)}
  .mobile-menu-backdrop:not([hidden]){top:68px}
}

@media(prefers-reduced-motion:reduce){
  .sidebar#kuantikaSidebar{transition:none}
}


/* =========================================================
   KUANTIKA FOOD — PULIDO RESPONSIVE PRE-SUNAT
   Carta + Caja + Salón/Mesas
   ========================================================= */
html body .daily-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
html body .daily-dish-card{min-width:0;width:100%;max-width:100%;overflow:hidden;border:1px solid #e7ddd6;border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(55,39,31,.05)}
html body .daily-dish-main{min-width:0;grid-template-columns:58px 36px minmax(0,1fr) auto;gap:11px;padding:13px 14px;overflow:hidden}
html body .daily-dish-image{width:58px;height:58px;border-radius:12px;overflow:hidden;display:block;background:#eee7e1;flex:0 0 58px}
html body .daily-dish-image img{display:block;width:100%;height:100%;object-fit:cover}
html body .daily-dish-check{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#e9f7ee;color:#287b4a;font-size:16px;flex:0 0 36px}
html body .daily-dish-card:not(.is-in-menu) .daily-dish-check{background:#f4f6f8;color:#68778a}
html body .daily-dish-content{min-width:0;overflow:hidden;display:flex;flex-direction:column;gap:3px}
html body .daily-dish-content strong{font-size:14px;line-height:1.2;color:#14283d;overflow-wrap:anywhere;word-break:break-word}
html body .daily-dish-content small{font-size:12px;color:#8f4f3f;font-weight:800}
html body .daily-dish-content em{font-style:normal;font-size:9px;color:#7b8796;line-height:1.25;overflow-wrap:anywhere}
html body .daily-dish-status{white-space:nowrap;align-self:center;font-size:10px;font-weight:800}
html body .daily-stock-mode{min-width:0;grid-template-columns:minmax(0,150px) minmax(0,1fr);padding:10px 14px 13px}
html body .daily-stock-mode>span{min-width:0}
html body .daily-stock-mode select{min-width:0;width:100%;overflow:hidden;text-overflow:ellipsis}

html body .payment-client-box{margin:0 0 16px;padding:14px;border:1px solid #eadfd7;border-radius:14px;background:#fffaf6}
html body .payment-client-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
html body .payment-client-head strong{display:block;color:#18314a;font-size:13px}
html body .payment-client-head strong i{color:#287b4a;margin-right:5px}
html body .payment-client-head small{display:block;color:#7b8796;font-size:10px;margin-top:3px;line-height:1.4}
html body .payment-step-badge{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#8f4f3f;color:#fff;font-weight:900;font-size:11px}
html body .payment-client-picker{position:relative}
html body .payment-client-picker input{margin:0!important;width:100%;min-width:0}
html body .payment-client-results{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:20;background:#fff;border:1px solid #d8e0e8;border-radius:11px;box-shadow:0 14px 30px rgba(28,43,59,.13);overflow:hidden}
html body .payment-client-results button{display:flex!important;flex-direction:column!important;align-items:flex-start!important;width:100%!important;border:0!important;border-bottom:1px solid #edf0f3!important;background:#fff!important;color:#102a43!important;text-align:left!important;padding:10px 12px!important;border-radius:0!important}
html body .payment-client-results button:hover{background:#f5f8fa!important}
html body .payment-client-results button b{font-size:12px}.payment-client-results button small{font-size:10px;color:#7c8797;margin-top:2px}.payment-client-empty{padding:12px;color:#7c8797;font-size:11px}
html body .payment-client-selected{margin-top:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border:1px solid #cfe8d7;border-radius:10px;background:#f1faf4}
html body .payment-client-selected>span{display:flex;align-items:center;gap:7px;min-width:0}.payment-client-selected>span i{color:#287b4a}.payment-client-selected b{font-size:11px;color:#18314a;overflow-wrap:anywhere}.payment-client-selected small{font-size:10px;color:#68778a}.payment-client-selected button{width:28px;height:28px;padding:0;border-radius:8px;background:#fff!important;color:#8f4f3f!important;border:1px solid #eadfd7!important;flex:0 0 28px}
html body .payment-client-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
html body .payment-success-page{max-width:760px;margin:20px auto}.payment-success-card{text-align:center;padding:34px 24px}.payment-success-icon{width:78px;height:78px;margin:0 auto 15px;border-radius:50%;display:grid;place-items:center;background:#e9f7ee;color:#287b4a;font-size:42px;box-shadow:0 0 0 9px #f3faf5}.payment-success-card .section-kicker{font-size:10px;font-weight:900;letter-spacing:.08em;color:#287b4a}.payment-success-card h1{margin:8px 0 6px;font-size:30px;color:#18314a}.payment-success-card>p{margin:0 auto 20px;color:#7b8796;font-size:13px}.payment-success-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;text-align:left;margin:18px 0;padding:12px;border:1px solid #e7ddd6;border-radius:13px;background:#fffaf6}.payment-success-summary>div{min-width:0}.payment-success-summary span{display:block;color:#7c8797;font-size:9px;text-transform:uppercase;font-weight:800}.payment-success-summary strong{display:block;color:#18314a;font-size:12px;margin-top:4px;overflow-wrap:anywhere}.payment-success-summary strong small{display:block;color:#7c8797;font-size:10px;margin-top:2px;font-weight:500}.success-electronic-note{display:flex;align-items:center;gap:10px;text-align:left;padding:12px 14px;border:1px solid #d5eadc;border-radius:12px;background:#f4fbf6;color:#287b4a}.success-electronic-note>i{font-size:22px}.success-electronic-note span{display:flex;flex-direction:column;gap:2px}.success-electronic-note strong{font-size:11px}.success-electronic-note small{font-size:10px;color:#66748a}.payment-success-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:18px}

html body .admin-table-layout,.admin-table-layout{min-width:0}.admin-table-layout .panel{min-width:0}.admin-tables-table{min-width:760px!important}.admin-tables-table th,.admin-tables-table td{overflow-wrap:anywhere}.admin-tables-table .row-actions{min-width:0}.admin-tables-table .row-actions .button,.admin-tables-table .row-actions button{white-space:normal;line-height:1.15;min-width:0}
@media(max-width:800px){
  html body .daily-menu-grid{grid-template-columns:1fr}
  html body .daily-dish-main{grid-template-columns:52px 34px minmax(0,1fr) auto;gap:9px;padding:11px 12px}
  html body .daily-dish-image{width:52px;height:52px;flex-basis:52px;border-radius:10px}
  html body .daily-dish-check{width:34px;height:34px;flex-basis:34px}
  html body .daily-dish-status{font-size:9px}
  html body .daily-stock-mode{grid-template-columns:1fr;gap:6px}
  html body .payment-success-summary{grid-template-columns:1fr}
}
@media(max-width:620px){
  html body .daily-menu-panel{padding:14px!important}
  html body .daily-menu-info{align-items:flex-start}
  html body .daily-menu-info span{min-width:0}
  html body .daily-menu-info strong{white-space:nowrap}
  html body .daily-dish-main{grid-template-columns:48px 32px minmax(0,1fr);}
  html body .daily-dish-image{width:48px;height:48px;flex-basis:48px}
  html body .daily-dish-status{grid-column:3;justify-self:start;margin-top:-2px}
  html body .payment-client-actions .button{flex:1 1 145px}
  html body .payment-success-card{padding:28px 16px}
}
@media(max-width:460px){
  html body .daily-dish-content strong{font-size:13px}
  html body .daily-dish-content em{font-size:8px}
  html body .daily-dish-main{grid-template-columns:44px 30px minmax(0,1fr);gap:7px;padding:10px}
  html body .daily-dish-image{width:44px;height:44px;flex-basis:44px}
  html body .daily-dish-check{width:30px;height:30px;flex-basis:30px;font-size:14px}
  html body .payment-success-icon{width:68px;height:68px;font-size:36px}
  html body .payment-success-card h1{font-size:26px}
}

/* Mesas registradas: en móvil cada fila se convierte en una tarjeta, sin botones deformados. */
@media(max-width:760px){
  html body .admin-tables-wrap{overflow:visible!important}
  html body .admin-tables-table{display:block!important;min-width:0!important;width:100%!important}
  html body .admin-tables-table thead{display:none!important}
  html body .admin-tables-table tbody{display:grid;gap:10px}
  html body .admin-tables-table tr{display:grid;grid-template-columns:1fr 1fr;gap:0 10px;padding:12px;border:1px solid #e7ddd6;border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(55,39,31,.04)}
  html body .admin-tables-table td{display:block!important;width:auto!important;min-width:0!important;padding:5px 0!important;border:0!important;font-size:11px}
  html body .admin-tables-table td:nth-child(1){grid-column:1/-1;padding-top:0!important}
  html body .admin-tables-table td:nth-child(2),html body .admin-tables-table td:nth-child(3),html body .admin-tables-table td:nth-child(4){grid-column:span 1}
  html body .admin-tables-table td:nth-child(4){text-align:left}
  html body .admin-tables-table td:nth-child(5){grid-column:1/-1;padding-top:9px!important;margin-top:5px;border-top:1px solid #eee6e0!important}
  html body .admin-tables-table .row-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
  html body .admin-tables-table .row-actions .button,html body .admin-tables-table .row-actions button{width:100%!important;min-width:0!important;white-space:normal!important;padding:9px 7px!important;font-size:10px!important;text-align:center;line-height:1.15}
  html body .admin-tables-table .inline-action{display:block!important;width:100%!important}
}
@media(max-width:420px){
  html body .admin-tables-table tr{grid-template-columns:1fr}
  html body .admin-tables-table td:nth-child(2),html body .admin-tables-table td:nth-child(3),html body .admin-tables-table td:nth-child(4){grid-column:1}
  html body .admin-tables-table .row-actions{grid-template-columns:1fr}
}


/* FASE 22.3 — Ajustes finales de UX, cantidades y móvil. */
html body .daily-dish-main{grid-template-columns:38px minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important}
html body .daily-dish-content{min-width:0!important;max-width:none!important}
html body .daily-dish-content strong{font-size:15px!important;line-height:1.25!important;overflow-wrap:anywhere!important;word-break:normal!important}
html body .daily-dish-content em{font-size:10px!important;line-height:1.3!important}
html body .daily-stock-mode{grid-template-columns:minmax(0,180px) minmax(0,1fr)!important}
html body .daily-stock-mode select{min-width:0!important}
html body .payment-client-selected small{color:#18314a!important;font-weight:700!important;opacity:1!important}
html body .payment-client-results button small{color:#18314a!important;font-weight:600!important;opacity:1!important}
html body .admin-tables-table .row-actions{min-width:0!important}
html body .admin-tables-table .row-actions .button,html body .admin-tables-table .row-actions button{overflow-wrap:anywhere!important;word-break:normal!important}
@media(max-width:760px){
  html body .daily-dish-main{grid-template-columns:34px minmax(0,1fr)!important;gap:10px!important;padding:12px!important}
  html body .daily-dish-status{grid-column:2!important;justify-self:start!important;margin-top:2px!important}
  html body .daily-dish-card{overflow:hidden!important}
  html body .daily-stock-mode{grid-template-columns:1fr!important;padding:10px 12px 12px!important}
}
@media(max-width:420px){
  html body .daily-dish-main{grid-template-columns:32px minmax(0,1fr)!important;gap:9px!important}
  html body .daily-dish-check{width:30px!important;height:30px!important;flex-basis:30px!important}
  html body .daily-dish-content strong{font-size:14px!important}
  html body .daily-stock-mode select{font-size:12px!important}
}

/* FASE 22.4 — Cliente en Caja: identidad de alto contraste. */
html body .payment-client-results button,
html body .payment-client-results button:hover,
html body .payment-client-results button:focus{
  background:#8f4f3f !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .payment-client-results button b,
html body .payment-client-results button small{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}
html body .payment-client-results button small{
  font-size:11px !important;
  font-weight:800 !important;
}
html body .payment-client-selected{
  background:#8f4f3f !important;
  border-color:#8f4f3f !important;
  color:#ffffff !important;
}
html body .payment-client-selected b,
html body .payment-client-selected small,
html body .payment-client-selected i{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}
html body .payment-client-selected small{
  font-weight:800 !important;
  font-size:11px !important;
}
html body .payment-client-selected button{
  background:#ffffff !important;
  color:#8f4f3f !important;
  -webkit-text-fill-color:#8f4f3f !important;
}

/* =========================================================
   FASE 22.5 — RESPONSIVE MÓVIL: CLIENTES + RESERVAS
   En teléfonos las tablas se convierten en tarjetas apiladas.
   Evita columnas estrechas, texto partido y botones deformados.
   ========================================================= */
@media (max-width: 720px){
  /* ---------- CLIENTES ---------- */
  #clientsTable{display:block;width:100%;table-layout:auto;}
  #clientsTable thead{display:none;}
  #clientsTable tbody{display:grid;gap:10px;}
  #clientsTable tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px 14px;
    padding:14px;
    margin:0;
    border:1px solid #eadfd8;
    border-radius:14px;
    background:#fff;
    box-shadow:0 3px 12px rgba(55,39,31,.045);
  }
  #clientsTable td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    font-size:13px!important;
    overflow-wrap:anywhere;
  }
  #clientsTable td:nth-child(1){grid-column:1 / -1;}
  #clientsTable td:nth-child(1)::before,
  #clientsTable td:nth-child(2)::before,
  #clientsTable td:nth-child(3)::before,
  #clientsTable td:nth-child(4)::before{
    display:block;
    margin-bottom:3px;
    color:#8a756b;
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
  }
  #clientsTable td:nth-child(1)::before{content:'Nombre';}
  #clientsTable td:nth-child(2)::before{content:'Documento';}
  #clientsTable td:nth-child(3)::before{content:'Teléfono';}
  #clientsTable td:nth-child(4)::before{content:'Estado';}
  #clientsTable td:nth-child(1) strong{display:block;font-size:16px!important;line-height:1.25;color:#172b43;}
  #clientsTable td:nth-child(2),
  #clientsTable td:nth-child(3){color:#334a63;font-weight:600;}
  #clientsTable td:nth-child(5){grid-column:1 / -1;margin-top:4px;}
  #clientsTable .row-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%;}
  #clientsTable .row-actions a,
  #clientsTable .row-actions button{width:100%!important;min-width:0!important;min-height:42px!important;margin:0!important;white-space:normal!important;line-height:1.15!important;text-align:center;}
  #clientsTable .row-actions form{width:100%;margin:0;}

  /* ---------- RESERVAS ---------- */
  .reservas-page .agenda-panel .panel-head{gap:12px;}
  .reservas-page .agenda-date-form{width:100%!important;}
  .reservas-page .agenda-date-form .unified-date-field{width:100%;}
  .reservas-page .agenda-date-form input{width:100%!important;min-width:0!important;}
  .reservas-page .agenda-panel .table-wrap{overflow:visible!important;}
  .reservas-page .agenda-table{
    display:block;
    width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
  }
  .reservas-page .agenda-table thead{display:none;}
  .reservas-page .agenda-table tbody{display:grid;gap:10px;}
  .reservas-page .agenda-table tr{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px 14px;
    padding:14px;
    border:1px solid #eadfd8;
    border-radius:14px;
    background:#fff;
    box-shadow:0 3px 12px rgba(55,39,31,.045);
  }
  .reservas-page .agenda-table td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    font-size:13px!important;
    overflow-wrap:anywhere;
  }
  .reservas-page .agenda-table td:nth-child(1){grid-column:1 / -1;}
  .reservas-page .agenda-table td:nth-child(1)::before,
  .reservas-page .agenda-table td:nth-child(2)::before,
  .reservas-page .agenda-table td:nth-child(3)::before,
  .reservas-page .agenda-table td:nth-child(4)::before{
    display:block;
    margin-bottom:3px;
    color:#8a756b;
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
  }
  .reservas-page .agenda-table td:nth-child(1)::before{content:'Hora';}
  .reservas-page .agenda-table td:nth-child(2)::before{content:'Cliente';}
  .reservas-page .agenda-table td:nth-child(3)::before{content:'Personas';}
  .reservas-page .agenda-table td:nth-child(4)::before{content:'Estado';}
  .reservas-page .agenda-table td:nth-child(1) strong{font-size:16px!important;color:#172b43;}
  .reservas-page .agenda-table td:nth-child(2){grid-column:1 / -1;font-weight:700;color:#243b55;}
  .reservas-page .agenda-table td:nth-child(3),
  .reservas-page .agenda-table td:nth-child(4){align-self:start;}
  .reservas-page .agenda-table td:nth-child(5){grid-column:1 / -1;margin-top:3px;}
  .reservas-page .reservation-action-cell{
    display:grid!important;
    grid-template-columns:1fr;
    min-width:0!important;
    width:100%;
    gap:10px;
  }
  .reservas-page .reservation-table-label{min-width:0!important;}
  .reservas-page .reservation-table-label strong{font-size:13px;}
  .reservas-page .reservation-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    min-width:0;
    gap:8px;
    justify-content:stretch;
  }
  .reservas-page .reservation-actions form,
  .reservas-page .reservation-actions a.small,
  .reservas-page .reservation-actions .small,
  .reservas-page .reservation-go-comandero{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    box-sizing:border-box;
    margin:0!important;
    padding:9px 10px!important;
    white-space:normal!important;
    text-align:center;
    line-height:1.2!important;
    display:flex!important;
    align-items:center;
    justify-content:center;
  }
  .reservas-page .reservation-actions .compact-form{display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px;}
  .reservas-page .reservation-actions .compact-form select{width:100%;min-width:0!important;}
  .reservas-page .reservation-actions .compact-form button{width:100%;}
  .reservas-page .reservation-actions form:only-child,
  .reservas-page .reservation-actions a.small:only-child,
  .reservas-page .reservation-actions .reservation-go-comandero:only-child{grid-column:1 / -1;}
  .reservas-page .reservation-closed-note,
  .reservas-page .reservation-attended-note{width:100%;box-sizing:border-box;justify-content:center;text-align:center;}

  /* Modal de reserva cómodo en móvil. */
  .reserva-modal-card{width:100%!important;max-height:calc(100vh - 24px);overflow:auto;padding:18px!important;}
  .reserva-modal-card .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .reserva-modal-card .modal-actions button{width:100%;min-height:44px;}
}

@media (max-width: 430px){
  #clientsTable tr,
  .reservas-page .agenda-table tr{padding:12px;}
  #clientsTable .row-actions,
  .reservas-page .reservation-actions{grid-template-columns:1fr;}
  .reservas-page .reservation-actions .compact-form{grid-column:1 / -1;}
  .reservas-page .page-head-actions,
  .reservas-page .page-head-actions button{width:100%;}
}

/* FASE 22.6 · Resumen Diario de Boletas */
.summary-prep-form{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin:4px 0 18px}
.summary-prep-form label{display:flex;flex-direction:column;gap:7px;min-width:210px;font-weight:700}
.summary-prep-form input{min-height:44px;border:1px solid #dfd3ca;border-radius:12px;padding:0 12px;background:#fff}
.summary-actions form{display:inline}
@media(max-width:760px){.summary-prep-form{align-items:stretch}.summary-prep-form label{width:100%;min-width:0}.summary-prep-form .button{width:100%;justify-content:center}.resumenes-wrap{overflow:visible}.resumenes-wrap table,.resumenes-wrap thead,.resumenes-wrap tbody,.resumenes-wrap tr,.resumenes-wrap th,.resumenes-wrap td{display:block;width:100%}.resumenes-wrap thead{display:none}.resumenes-wrap tr{background:#fff;border:1px solid #eadfd8;border-radius:16px;margin-bottom:12px;padding:12px}.resumenes-wrap td{display:flex;justify-content:space-between;gap:12px;border:0;padding:7px 0;text-align:right}.resumenes-wrap td::before{content:attr(data-label);font-weight:700;text-align:left;color:#6f625b}.resumenes-wrap td:last-child{display:block;text-align:left}.resumenes-wrap td:last-child::before{display:none}.summary-actions form,.summary-actions .button{width:100%}.summary-actions .button{justify-content:center}}

/* FASE 22.7 · base comercial de facturación electrónica */
.installation-card{margin-top:18px}.installation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.installation-grid>div{border:1px solid var(--kf-border);background:#fffaf6;border-radius:12px;padding:13px}.installation-grid span,.installation-grid strong{display:block}.installation-grid span{font-size:10px;color:var(--kf-muted);margin-bottom:4px}.installation-grid strong{font-size:13px}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.05em}.installation-note{display:flex;gap:9px;margin-top:12px;padding:11px 13px;border-radius:10px;background:#f8f5ef;color:var(--kf-muted);font-size:11px}.electronic-checks{margin-top:18px}.check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.check-item{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--kf-border);border-radius:12px;padding:12px}.check-item i{font-size:18px}.check-item.ok i{color:#2f7d4a}.check-item.pending i{color:#b8791b}.check-item strong,.check-item span{display:block}.check-item strong{font-size:12px}.check-item span{font-size:10px;color:var(--kf-muted);margin-top:3px;line-height:1.4}.endpoint-box{margin-top:12px;border:1px dashed var(--kf-border);border-radius:10px;padding:10px 12px}.endpoint-box span,.endpoint-box strong{display:block}.endpoint-box span{font-size:10px;color:var(--kf-muted)}.endpoint-box strong{font-size:10px;word-break:break-all;margin-top:3px;font-weight:500}.tributary-warning code{font-size:10px}
@media(max-width:900px){.installation-grid{grid-template-columns:1fr 1fr}.check-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.installation-grid,.check-grid{grid-template-columns:1fr}.installation-grid>div{padding:11px}.endpoint-box strong{font-size:9px}}
