/* Estilos específicos de Gastronomía Web v2 (KDS, Mostrador, Reservas, Caja, Carta, Reportes) */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-right .operator { margin-left: 0; }
.shift-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid #c7d9fc; background: #eef4ff; color: #1e40af; font-size: 12px; font-weight: 650; }
.shift-pill i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.shift-pill.closed { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.shift-pill.closed i { background: #d97706; }

.rail-badge { position: absolute; top: 5px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; font-style: normal; font-size: 10px; font-weight: 750; display: grid; place-items: center; background: #2563eb; color: #fff; border: 2px solid #f8faff; }
.rail-badge.warn { background: #d97706; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Tercer estado de mesa: Pidiendo cuenta */
.legend .leg-ask i { border-color: #4f46e5; background: #e0e7ff; }
.mesa.asking { color: #312e81; border-color: #6366f1; background: #e0e7ff; box-shadow: 0 3px 0 #a5b4fc; }
.mesa.asking::before, .mesa.asking::after { background: #c7d2fe; border-color: #818cf8; }
.mesa .mesa-badge { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.mesa .mesa-res { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); background: #1e40af; color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }

/* Panel de cuenta de mesa */
.account-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 10px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.item-note { font-size: 11px; color: #92400e; background: #fef3c7; padding: 1px 6px; border-radius: 5px; display: inline-block; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 650; background: #eef2f7; color: #475569; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.info { background: #dbeafe; color: #1d4ed8; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.danger { background: #fee2e2; color: #991b1b; }
.pill.barra { background: #e0e7ff; color: #3730a3; }
.pill.cocina { background: #ffedd5; color: #9a3412; }

.comanda-btn { margin-bottom: 10px; background: #0f766e; color: #fff; }
.comanda-btn:hover { background: #115e59; }
.action-stack { display: grid; gap: 7px; }
.action-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

/* Modales nuevos */
.menu-top-inputs { display: grid; gap: 8px; margin-bottom: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start; }
.panel { padding: 17px; }
.panel h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.025em; }
.sub-h3 { font-size: 14px; margin: 14px 0 8px; color: #334155; }
.tip-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.final-total strong { font-size: 23px; color: #1d4ed8; }
.split-box { padding: 12px; border-radius: 10px; background: #f4f7fb; border: 1px solid var(--line); }
.split-result { display: grid; gap: 2px; margin-top: 6px; }
.split-result strong { font-size: 24px; color: #1d4ed8; }
.split-items { max-height: 220px; overflow-y: auto; display: grid; gap: 6px; margin-bottom: 10px; }
.split-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; }
.split-row input { width: auto; margin: 0 6px 0 0; }
.transfer-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.transfer-block:last-child { border-bottom: 0; padding-bottom: 0; }

/* KDS Monitor Cocina y Barra */
.kds-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.kds-card { background: #fff; border: 1.5px solid #dbe4f0; border-radius: 14px; overflow: hidden; box-shadow: 0 3px 12px #0f172a0d; }
.kds-card.late { border-color: #f59e0b; }
.kds-card.urgent { border-color: #ef4444; }
.kds-head { padding: 12px 14px; background: #eef4ff; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.kds-card.late .kds-head { background: #fffbeb; }
.kds-card.urgent .kds-head { background: #fef2f2; }
.kds-head strong { font-size: 16px; display: block; }
.kds-head small { color: var(--muted); font-size: 12px; }
.kds-timer { font-weight: 780; font-size: 13px; padding: 4px 9px; border-radius: 999px; background: #fff; color: #1d4ed8; border: 1px solid #cfe0ff; }
.kds-card.late .kds-timer { color: #b45309; border-color: #fcd34d; }
.kds-card.urgent .kds-timer { color: #dc2626; border-color: #fecaca; }
.kds-items { padding: 10px 14px; display: grid; gap: 8px; }
.kds-item { display: flex; justify-content: space-between; align-items: start; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7; }
.kds-item:last-child { border-bottom: 0; padding-bottom: 0; }
.kds-foot { padding: 10px 14px; background: #f8fafc; border-top: 1px solid var(--line); display: flex; gap: 6px; }

/* Mostrador / Take Away / Delivery */
.pos-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 15px; align-items: start; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.dish-btn { display: grid; gap: 4px; text-align: left; padding: 10px; border-radius: 10px; border: 1px solid #dbe4f0; background: #f8fbff; color: var(--ink); }
.dish-btn:hover { background: #edf3ff; border-color: #93b4f5; }
.dish-btn strong { font-size: 13px; }
.dish-btn b { color: #1d4ed8; font-size: 13.5px; }
.order-card { border: 1px solid #dbe4f0; border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.order-card-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin-bottom: 8px; }
.order-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; margin-top: 8px; border-top: 1px solid #eef2f7; }

/* QR Card */
.qr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.qr-poster { text-align: center; padding: 24px; border: 2px dashed #93c5fd; border-radius: 16px; background: #f8fbff; }
.qr-poster h3 { margin: 0 0 6px; font-size: 22px; color: #1d4ed8; }
.qr-svg-box { width: 170px; height: 170px; margin: 14px auto; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid #dbe4f0; display: grid; place-items: center; }

/* Barras horarias y reportes */
.hour-bars { display: grid; gap: 8px; }
.hour-row { display: grid; grid-template-columns: 52px 1fr auto 42px; align-items: center; gap: 10px; font-size: 13px; }
.hour-track { height: 11px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.hour-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filter-row label { margin: 0; font-size: 13px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.text-ok { color: #15803d; }
.text-danger { color: #dc2626; }
.section-title { font-size: 18px; margin: 20px 0 10px; }

@media (max-width: 980px) {
    .pair, .pos-grid, .qr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 670px) {
    .shift-pill { display: none; }
    .field-grid { grid-template-columns: 1fr; }
}
