/* Pantalla de mesa y carta lateral para el mozo. */
.mozo-mesa-page {
    max-width: 1440px;
    margin: 0 auto;
}

.mozo-mesa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 12px 0 28px;
}

.mozo-mesa-header h1 {
    margin: 4px 0 6px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 850;
}

.mozo-mesa-header p { margin: 0; color: var(--muted); }
.mozo-cuenta-section h2 { font-size: 1.55rem; font-weight: 800; margin: 0 0 14px; }
.mozo-cuenta-list { padding: 4px 20px; }
.mozo-cuenta-pedido { padding: 16px 0; border-bottom: 1px solid var(--line); }
.mozo-cuenta-pedido:last-child { border-bottom: 0; }
.mozo-cuenta-pedido-head, .mozo-cuenta-line { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.mozo-cuenta-line { padding-top: 7px; color: var(--ink); }
.mozo-cuenta-vacia { padding: 22px; color: var(--muted); }
.mozo-add-section { padding: 28px 0 20px; text-align: right; }

.mozo-drawer { position: fixed; inset: 0; z-index: 1100; visibility: hidden; pointer-events: none; }
.mozo-drawer.abierto { visibility: visible; pointer-events: auto; }
.mozo-drawer-backdrop { position: absolute; inset: 0; background: rgba(18, 22, 31, .52); opacity: 0; transition: opacity .2s ease; }
.mozo-drawer.abierto .mozo-drawer-backdrop { opacity: 1; }
.mozo-drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(980px, 100%); height: 100dvh; max-height: 100dvh; background: #fff; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; overflow: hidden; box-shadow: -12px 0 35px rgba(0,0,0,.16); }
.mozo-drawer.abierto .mozo-drawer-panel { transform: translateX(0); }
.mozo-pedido-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.mozo-drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.mozo-drawer-header h2 { margin: 4px 0 0; font-weight: 850; }
.mozo-drawer-close { border: 0; background: transparent; font-size: 2rem; line-height: 1; color: var(--muted); }
.mozo-drawer-body { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); grid-template-rows: minmax(0, 1fr); gap: 24px; padding: 24px 28px; overflow: hidden; flex: 1; min-height: 0; }
.mozo-drawer-body h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 10px; }
.mozo-panel-help { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.mozo-nuevo-pedido { background: #fffaf3; border: 1px solid #f0e0ce; border-radius: 14px; padding: 18px; align-self: stretch; min-height: 0; height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9b8a8 #f5f0ea; }
.mozo-nuevo-pedido::-webkit-scrollbar { width: 9px; }
.mozo-nuevo-pedido::-webkit-scrollbar-track { background: #f5f0ea; border-radius: 10px; }
.mozo-nuevo-pedido::-webkit-scrollbar-thumb { background: #c9b8a8; border-radius: 10px; }
.mozo-nuevo-vacio { color: var(--muted); font-size: .9rem; padding: 22px 4px; text-align: center; }
.mozo-nuevo-item { border-bottom: 1px solid #eadcca; padding: 12px 0; }
.mozo-nuevo-item:last-child { border-bottom: 0; }
.mozo-nuevo-item-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 750; }
.mozo-nuevo-item-price { color: var(--brand); white-space: nowrap; }
.mozo-nuevo-item-controls { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.mozo-nuevo-item-controls button, .mozo-cantidad-btn { width: 30px; height: 30px; border: 1px solid #dbcfc2; border-radius: 7px; background: #fff; font-weight: 800; }
.mozo-nuevo-item-controls input { width: 42px; text-align: center; border: 1px solid #dbcfc2; border-radius: 7px; height: 30px; }
.mozo-nuevo-item-controls .mozo-eliminar { margin-left: auto; color: #ad352e; border-color: #e7b9b5; }
.mozo-carta-lista { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; scrollbar-color: #c9b8a8 #f5f0ea; }
.mozo-carta-lista::-webkit-scrollbar { width: 9px; }
.mozo-carta-lista::-webkit-scrollbar-track { background: #f5f0ea; border-radius: 10px; }
.mozo-carta-lista::-webkit-scrollbar-thumb { background: #c9b8a8; border-radius: 10px; }
.mozo-categoria-lista { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.mozo-categoria-lista summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--brand); font-size: 1rem; font-weight: 800; padding: 11px 4px; }
.mozo-categoria-lista summary::-webkit-details-marker { display: none; }
.mozo-categoria-lista summary .mozo-categoria-flecha { color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.mozo-categoria-lista[open] summary .mozo-categoria-flecha { transform: rotate(180deg); }
.mozo-categoria-lista[open] summary { border-bottom: 1px solid #f1ede7; margin-bottom: 4px; }
.mozo-producto-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1ede7; }
.mozo-producto-fila:last-child { border-bottom: 0; }
.mozo-producto-info { min-width: 0; }
.mozo-producto-info strong, .mozo-producto-info small { display: block; }
.mozo-producto-info strong { font-size: .94rem; }
.mozo-producto-info small { color: var(--muted); margin-top: 2px; }
.mozo-producto-precio { color: var(--brand); font-weight: 800; white-space: nowrap; }
.mozo-cantidad-control { display: flex; align-items: center; gap: 7px; }
.mozo-cantidad { min-width: 20px; text-align: center; font-weight: 700; }
.mozo-drawer-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px; border-top: 1px solid var(--line); background: #fff; flex: 0 0 auto; min-height: 72px; position: relative; z-index: 3; }
.mozo-drawer-footer strong { font-size: 1.05rem; }
.mozo-drawer-footer strong span { color: var(--brand); }

@media (max-width: 700px) {
    .mozo-mesa-header { flex-direction: column; }
    .mozo-drawer-body { grid-template-columns: 1fr; padding: 18px; }
    .mozo-drawer-body { grid-template-rows: auto auto; overflow-y: auto; }
    .mozo-carta-lista { height: auto; overflow: visible; padding-right: 0; }
    .mozo-nuevo-pedido { position: static; order: -1; height: auto; overflow: visible; }
    .mozo-drawer-header, .mozo-drawer-footer { padding-left: 18px; padding-right: 18px; }
    .mozo-producto-fila { grid-template-columns: minmax(0, 1fr) auto; }
    .mozo-producto-precio { grid-column: 1; }
    .mozo-cantidad-control { grid-column: 2; grid-row: 1 / span 2; }
}
