﻿/* =====================================================================
   Tema oscuro elegante — Motel
   ===================================================================== */
:root {
    --bg: #111318;
    --bg-2: #171a21;
    --surface: #1d212a;
    --surface-2: #252a35;
    --border: #2e3440;
    --text: #e6e8ec;
    --muted: #9aa3b2;
    --accent: #c9a86a;          /* dorado suave */
    --accent-2: #a88a52;

    /* Estados (poco saturados) */
    --st-disponible: #4fae7f;
    --st-ocupada: #d0645f;
    --st-limpieza: #d7b04f;
    --st-reservada: #5b8fd6;
    --st-mantenimiento: #6c7383;

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--muted);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: #e0c48d;
    --bs-success: #4fae7f;
    --bs-success-rgb: 79, 174, 127;
    --bs-danger: #d0645f;
    --bs-danger-rgb: 208, 100, 95;
    --bs-warning: #d7b04f;
    --bs-warning-rgb: 215, 176, 79;
    --bs-primary: #5b8fd6;
    --bs-primary-rgb: 91, 143, 214;
    --bs-secondary-rgb: 108, 115, 131;
}

body { background: var(--bg); color: var(--text); }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #1a1a1a; font-weight: 600; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-2); border-color: var(--accent-2); color: #111; }
.text-accent { color: var(--accent) !important; }

.card, .modal-content, .dropdown-menu, .offcanvas, .list-group-item {
    background: var(--surface);
    border-color: var(--border);
}
.card-header { background: var(--surface-2); border-color: var(--border); }
.table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(255,255,255,.035); }
.table > :not(caption) > * > * { border-color: var(--border); }
.table thead th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.form-control, .form-select { background-color: var(--bg-2); border-color: var(--border); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(201,168,106,.2); background-color: var(--bg-2); }

/* ---------------------------------------------------------------------
   Panel administrativo
   --------------------------------------------------------------------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--border); }
@media (min-width: 992px) {
    .admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
/* Celular / tableta: el menú (☰) se abre como panel lateral; su contenido se desliza (debajo del encabezado "Menú") */
@media (max-width: 991.98px) {
    .admin-sidebar .sidebar-cuerpo { flex: 1 1 auto; height: auto !important; min-height: 0; overflow-y: auto;
        -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important; }
    .admin-sidebar .sidebar-cuerpo > .nav { flex-grow: 0 !important; }
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { background: var(--bg-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1020; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.brand-name { color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.admin-sidebar .nav-link { color: var(--muted); border-radius: .5rem; padding: .55rem .75rem; }
.admin-sidebar .nav-link:hover { color: var(--text); background: var(--surface); }
.admin-sidebar .nav-link.active { color: #16181d; background: var(--accent); font-weight: 600; }
.nav-section { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin: 1rem .75rem .25rem; }
.page-title { font-weight: 600; }
/* Usuario que está trabajando (arriba a la derecha) */
.usuario-chip-btn { background: var(--surface); border: 1px solid var(--accent); color: var(--text); border-radius: 2rem;
    padding: .25rem .75rem .25rem .25rem; max-width: 260px; }
.usuario-chip-btn:hover, .usuario-chip-btn:focus, .usuario-chip-btn.show { background: var(--surface); color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(255, 46, 147, .25); }
.usuario-avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #16181d;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.usuario-rol { color: var(--muted); font-size: .75rem; }
.admin-topbar .usuario-chip-btn { padding: .15rem .55rem .15rem .15rem; max-width: 160px; font-size: .85rem; }
.admin-topbar .usuario-chip { flex-shrink: 0; }
.admin-topbar .usuario-avatar { width: 28px; height: 28px; font-size: .75rem; }

/* Tarjetas de estadísticas */
.stat-card { border-radius: 1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); height: 100%; }
.stat-card .stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.stat-card .stat-icon { font-size: 1.4rem; opacity: .55; }

/* Estados de habitación */
.st-disponible    { --st: var(--st-disponible); }
.st-ocupada       { --st: var(--st-ocupada); }
.st-limpieza      { --st: var(--st-limpieza); }
.st-reservada     { --st: var(--st-reservada); }
.st-mantenimiento { --st: var(--st-mantenimiento); }
.badge-estado { background: color-mix(in srgb, var(--st) 20%, transparent); color: var(--st); border: 1px solid color-mix(in srgb, var(--st) 45%, transparent); font-weight: 600; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 25%, transparent); }

.room-card { border-radius: 1rem; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--st); height: 100%; transition: transform .15s; }
.room-card:hover { transform: translateY(-2px); }
.room-card .room-num { font-size: 1.6rem; font-weight: 700; }
.room-card .room-meta { color: var(--muted); font-size: .82rem; }
.room-card .btn { font-size: .82rem; }

/* Dashboard y Estadías: tarjetas de habitación más compactas (y de conteo, abajo) */
:is(#grid, #gridActivas) .room-card { border-radius: .8rem; border-top-width: 3px; padding: .6rem .7rem; }
:is(#grid, #gridActivas) .room-card .room-num { font-size: 1.25rem; line-height: 1.15; }
:is(#grid, #gridActivas) .room-card .room-meta { font-size: .75rem; }
:is(#grid, #gridActivas) .room-card :is(.my-2, .mt-2) { margin-top: .35rem !important; }
#grid .room-card .my-2 { margin-bottom: .35rem !important; }
#gridActivas .room-card .pt-2 { padding-top: .35rem !important; }
:is(#grid, #gridActivas) .room-card .small { font-size: .78rem; }
:is(#grid, #gridActivas) .room-card .btn { font-size: .76rem; padding: .2rem .4rem; }
.dash-stats .stat-card { padding: .55rem .8rem; border-radius: .8rem; }
.dash-stats .stat-label { font-size: .68rem; }
.dash-stats .stat-value { font-size: 1.3rem; }
.dash-stats .stat-icon { font-size: 1rem; }

.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: .5rem; background: var(--surface-2); }
.thumb-ph { width: 48px; height: 48px; border-radius: .5rem; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.img-preview { max-height: 140px; border-radius: .5rem; }
/* Fotos del producto (hasta 3) */
.foto-slot { border: 1px solid var(--border); border-radius: .6rem; padding: .5rem; height: 100%; }
.foto-slot-vista { aspect-ratio: 4/3; border-radius: .4rem; background: rgba(255,255,255,.04); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.foto-slot-vista img { width: 100%; height: 100%; object-fit: cover; }
.foto-slot-vista > i { font-size: 1.6rem; opacity: .3; }
.foto-slot-vista.quitada img { opacity: .25; filter: grayscale(1); }

/* Campos en portugués (página /pt/) */
.badge-pt { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .04em; padding: .1rem .35rem; margin-right: .35rem;
    border-radius: .3rem; background: #009c3b; color: #fff; vertical-align: .1em; }
.bloque-pt { border: 1px dashed rgba(0, 156, 59, .55); border-radius: .75rem; padding: .75rem; }

/* Sin permiso de editar o borrar en el módulo de la página (body[data-sin], includes/header.php): se ocultan esos botones.
   La API igual lo rechaza; esto solo evita mostrar lo que no se puede usar. */
body[data-sin~="reabrir"] :is([data-reabrir], .req-reabrir) { display: none !important; }
body[data-sin~="cambiar"] :is([data-cambiar], .req-cambiar) { display: none !important; }
body[data-sin~="historial"] .req-historial { display: none !important; }
body[data-sin~="adelanto"] :is([data-adelanto], .req-adelanto) { display: none !important; }
body[data-sin~="borrar"] :is([data-del], [data-quitar]:not(.req-editar), [data-cancel], [data-lote-accion="eliminar"], .req-borrar) { display: none !important; }
body[data-sin~="editar"] :is([data-edit], [data-mover], [data-destacar], [data-ajuste], [data-entrada], [data-marcar],
    #btnNuevo, #btnNueva, #btnTodosLeidos, #formSeparar, .req-editar) { display: none !important; }
body[data-sin~="editar"] :is([data-toggle], [data-quick], [data-minimo], [data-lote]) { pointer-events: none; opacity: .55; }

/* Permisos de un rol (Roles y permisos) */
.permisos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.permiso-item { border: 1px solid var(--border); border-radius: .6rem; padding: .55rem .7rem; }
.permiso-item:has(.permiso-main input:checked) { border-color: var(--accent); background: rgba(201, 168, 106, .08); }
.permiso-main { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; margin: 0; }
.permiso-item .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.permiso-item small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
/* Acciones del módulo: Editar / Borrar (solo con el módulo marcado) */
.permiso-acciones { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0 0 1.6rem; }
.permiso-accion { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; border: 1px solid var(--border);
    border-radius: 999px; padding: .1rem .55rem; cursor: pointer; margin: 0; }
.permiso-accion .form-check-input { margin: 0; }
.permiso-accion:has(input:checked) { border-color: var(--accent); }
.permiso-accion:has(input:disabled) { opacity: .45; cursor: not-allowed; }

/* Tarifas de la página principal (formulario del tipo de habitación) */
.tarifas-box { border: 1px solid var(--border); border-radius: .75rem; padding: .75rem; }
.tarifa-fila { display: grid; grid-template-columns: 1fr 1fr 150px auto; gap: .5rem; margin-bottom: .5rem; }
@media (max-width: 575.98px) {
    .tarifa-fila { grid-template-columns: 1fr auto; padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
    .tarifa-fila > input { grid-column: 1 / -1; }
}
/* En una columna angosta (Tipos de habitación): nombre y nombre PT arriba, precio y quitar abajo */
.tarifa-fila-compacta { grid-template-columns: 1fr 1fr auto; padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
.tarifa-fila-compacta > .input-group { grid-column: 1 / 3; }
@media (max-width: 575.98px) { .tarifa-fila-compacta > .input-group { grid-column: auto; } }

.table-responsive { border-radius: .75rem; }
.total-box { background: var(--surface-2); border-radius: .75rem; padding: 1rem; }
.total-box .total { font-size: 1.8rem; font-weight: 700; color: var(--accent); }

.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }

/* Impresión (tickets y reportes) */
@media print {
    .admin-sidebar, .admin-topbar, .no-print, .toast-container { display: none !important; }
    body, .card { background: #fff !important; color: #000 !important; }
    .table { color: #000 !important; }
}

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: radial-gradient(ellipse at top, #2a2230 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 400px; border-radius: 1.25rem; }

.list-group-item.active { background: var(--accent); border-color: var(--accent); color: #16181d; }
.list-group-item.active .text-secondary { color: #3a3326 !important; }
.nav-pills .nav-link.active { background: var(--accent); color: #16181d; }
.nav-pills .nav-link { color: var(--muted); }
.btn-check:checked + .btn-outline-secondary { background: var(--accent); border-color: var(--accent); color: #16181d; font-weight: 600; }

/* Editor de pasos (Guía de uso) */
.pasos-editor { display: flex; flex-direction: column; gap: .5rem; }
.paso-fila { display: flex; gap: .5rem; align-items: flex-start; padding: .5rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--bg-2); }
.paso-num { flex-shrink: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: .85rem; margin-top: .15rem; }
.paso-campos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.paso-campos input { font-weight: 600; }
.paso-pt summary { font-size: .8rem; cursor: pointer; color: var(--muted); list-style-position: inside; }
.paso-pt[open] { border-left: 2px solid rgba(0, 156, 59, .6); padding-left: .5rem; }
.paso-botones { display: flex; flex-direction: column; gap: .25rem; }
.paso-botones .btn { padding: .1rem .4rem; }
.paso-foto { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.paso-foto-img { width: 64px; height: 48px; object-fit: cover; border-radius: .4rem; border: 1px solid var(--border); }
.video-editor { padding: .6rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--bg-2); }
.video-preview { width: 100%; max-height: 220px; border-radius: .5rem; background: #000; }

/* Vista previa de diapositivas (panel Slider) */
.slide-preview { position: relative; aspect-ratio: 16/7; overflow: hidden; border-radius: .6rem .6rem 0 0; background: #000; }
.modal .slide-preview { border-radius: .6rem; }
.slide-preview img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; inset: auto 0 0 0; padding: .6rem .8rem; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; }
.slide-caption .t { font-weight: 700; }
.slide-caption .x { font-size: .8rem; opacity: .9; }

/* Logo completo del motel (panel y login) */
.brand-logo-completo { display: block; width: 100%; max-width: 210px; height: auto; margin: 0 auto; }
.login-logo { display: inline-block; width: auto; height: 64px; max-width: 100%; object-fit: contain; }
.login-logo[src$=".webp"], .login-logo[src$=".png"], .login-logo[src$=".jpg"] { height: auto; width: 100%; max-width: 280px; }

/* Modo de generación de cupones */
.modo-cupon { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 575.98px) { .modo-cupon { grid-template-columns: 1fr; } }
.modo-opcion { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: .7rem;
    background: var(--bg-2); cursor: pointer; margin: 0; }
.modo-opcion > i { color: var(--muted); font-size: 1.2rem; margin-top: .15rem; }
.modo-opcion small { display: block; color: var(--muted); font-size: .78rem; }
.btn-check:checked + .modo-opcion { border-color: var(--accent); background: rgba(201,168,106,.1); }
.btn-check:checked + .modo-opcion > i { color: var(--accent); }
.btn-check:focus-visible + .modo-opcion { box-shadow: 0 0 0 .2rem rgba(201,168,106,.25); }

/* Buzón de sugerencias (panel) */
.sug-nueva { border-left: 3px solid var(--accent); }
.sug-leida { opacity: .75; }
.sug-mensaje { white-space: pre-line; overflow-wrap: anywhere; }

/* Pedidos web (panel) */
.pedido-card.pedido-nuevo { border-color: var(--st-limpieza); box-shadow: 0 0 0 1px var(--st-limpieza); }
.pedido-card.pedido-entregado, .pedido-card.pedido-cancelado { opacity: .7; }
.pedido-motivo { white-space: pre-line; overflow-wrap: anywhere; }
.pedido-items td, .pedido-items th { padding: .2rem .25rem; }

/* Inventario */
.inv-minimo { width: 5rem; text-align: center; }
/* Aviso para instalar el panel como aplicación (app.js) */
.aviso-app { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1080; width: min(560px, calc(100vw - 2rem));
    display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: .8rem; background: #22142a;
    border: 1px solid rgba(201,168,106,.55); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.aviso-app-icono { font-size: 1.5rem; color: #c9a86a; }
/* En la app instalada en iPhone: respeta la zona de la barra de estado */
@media (display-mode: standalone) { body.admin-body { padding-top: env(safe-area-inset-top); } }

/* Producto abierto desde Productos (inventario?producto=ID): se resalta unos segundos */
.fila-elegida > td { background: rgba(201, 168, 106, .18) !important; transition: background .6s; }
.fila-elegida > td:first-child { box-shadow: inset 4px 0 0 #c9a86a; }

/* Cobro en varias monedas y caja */
.cobro-moneda { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: .45rem .25rem; }
.cobro-moneda strong { font-size: 1.05rem; }
.cobro-moneda small { font-size: .72rem; opacity: .85; }
.cobro-equivalente { padding: .6rem .8rem; border-radius: .6rem; background: var(--surface-2); border: 1px solid var(--border); }
.cobro-equivalente strong { font-size: 1.25rem; color: var(--accent); }
.cobro-medios { padding: .6rem .8rem; border-radius: .6rem; background: var(--bg-2); border: 1px dashed var(--border); color: var(--muted); }
.cobro-linea { padding: .5rem; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--bg-2); }
.cobro-balance { padding: .55rem .8rem; border-radius: .6rem; background: var(--surface-2); border: 1px solid var(--border); font-size: .92rem; }

/* Cantidad de personas: botones − / + en la tarjeta del dashboard */
.btn-personas { width: 1.6rem; height: 1.6rem; padding: 0; line-height: 1; font-weight: 700; border-radius: .4rem;
    color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.btn-personas:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-personas:disabled { opacity: .35; }

/* Cantidad de personas (entrada y salida) */
.personas-control { width: auto; max-width: 150px; flex-wrap: nowrap; }
.personas-control input { min-width: 3.2rem; }

/* Consumos: selección rápida por categoría */
.cat-rapidas { display: flex; flex-wrap: wrap; gap: .3rem; }
.cat-rapidas .btn { font-size: .78rem; padding: .2rem .5rem; }
.prod-rapidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .35rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.prod-rapido { display: flex; flex-direction: column; justify-content: space-between; gap: .15rem; min-height: 48px; padding: .35rem .5rem; text-align: left;
    font-size: .8rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: .5rem; transition: border-color .15s, transform .1s; }
.prod-rapido:hover:not(:disabled) { border-color: var(--accent); }
.prod-rapido:active:not(:disabled) { transform: scale(.97); }
.prod-rapido:disabled { opacity: .45; cursor: not-allowed; }
.prod-rapido .nombre { font-weight: 600; line-height: 1.15; }
.prod-rapido .small { font-size: .72rem; flex-wrap: wrap; column-gap: .3rem !important; }
.prod-rapido .small > span { white-space: nowrap; }
.prod-rapido .precio { color: var(--accent); font-weight: 700; }
@media (max-width: 575.98px) { .prod-rapidos { grid-template-columns: repeat(3, 1fr); } }

/* Estadías: eventos de una estadía (línea de tiempo) */
.eventos { list-style: none; margin: 0; padding: 0; position: relative; }
.eventos::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.eventos li { display: flex; gap: .7rem; padding: .4rem 0; position: relative; }
.eventos-icono { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
    background: var(--surface-2, var(--surface)); border: 1px solid var(--border); font-size: .85rem; z-index: 1; }

/* Consumos: tabla de lo consumido, compacta */
.tabla-consumos { font-size: .82rem; }
.tabla-consumos > :not(caption) > * > * { padding: .3rem .5rem; }
.tabla-consumos thead th { font-size: .7rem; }
.tabla-consumos .btn, .tabla-consumos .input-group-text { font-size: .75rem; padding: .1rem .45rem; }
.tabla-consumos tfoot th { font-size: .85rem; }
.tabla-consumos #total { font-size: 1rem; }
.tabla-consumos .text-end { white-space: nowrap; }
@media (max-width: 575.98px) { .tabla-consumos > :not(caption) > * > * { padding: .3rem .2rem; } }

/* Venta directa (clientes y personal) */
.personal-productos { max-height: 62vh; overflow-y: auto; }
.personal-productos thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.forma-pago { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.forma-opcion { display: flex; align-items: center; gap: .6rem; padding: .65rem .75rem; margin: 0; cursor: pointer;
    border: 1px solid var(--border); border-radius: .6rem; line-height: 1.2; }
.forma-opcion > i { font-size: 1.3rem; color: var(--muted); }
.forma-opcion small { display: block; color: var(--muted); font-size: .75rem; }
.btn-check:checked + .forma-opcion { border-color: var(--accent); background: rgba(201, 168, 106, .1); }
.btn-check:checked + .forma-opcion > i { color: var(--accent); }
.btn-check:focus-visible + .forma-opcion { outline: 2px solid var(--accent); outline-offset: 2px; }
.carrito-linea { display: grid; grid-template-columns: 1fr 76px auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--border); }
.carrito-linea .sub { min-width: 78px; text-align: right; font-weight: 600; }
@media (max-width: 400px) { .forma-pago { grid-template-columns: 1fr; } }

/* Buzón: calificaciones con caritas */
.sug-cal { font-size: .85rem; }
.sug-emoji { font-size: 1.1rem; margin-right: .3rem; vertical-align: -.1em; }
.sug-promedio { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: .25rem 0; }
.sug-promedio small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.sug-barra { display: flex; align-items: center; gap: .6rem; margin: .2rem 0; }
.sug-barra-emoji { font-size: 1.25rem; width: 1.6rem; text-align: center; }
.sug-barra .progress { height: .6rem; background: var(--bg-2); }
.sug-barra-n { width: 2.5rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Pago adelantado: línea en las tarjetas (verde / ámbar faltando 10 min / rojo cumplido) y aviso flotante del panel */
.adelanto-linea { font-size: .78rem; border-radius: .35rem; padding: .1rem .35rem; margin-top: .2rem; }
.adelanto-ok { color: #6EE7A8; background: rgba(110, 231, 168, .1); }
.adelanto-pronto { color: #FFC857; background: rgba(255, 200, 87, .14); }
.adelanto-cumplido { color: #fff; background: rgba(220, 53, 69, .55); animation: adelanto-latido 1.2s ease-in-out infinite; }
@keyframes adelanto-latido { 50% { background: rgba(220, 53, 69, .85); } }
.aviso-adelanto { position: fixed; right: 16px; bottom: 16px; z-index: 1085; max-width: min(420px, calc(100vw - 32px));
    background: #8a5a00; color: #fff; border: 1px solid #FFC857; border-radius: .6rem; padding: .6rem .75rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .5); font-size: .9rem; }
.aviso-adelanto.cumplido { background: #9b1c2c; border-color: #ff6b7d; }
.aviso-adelanto a { color: #fff; }
@media (prefers-reduced-motion: reduce) { .adelanto-cumplido { animation: none; } }
.adelanto-opciones .btn { flex: 1 1 8.5rem; max-width: 12rem; line-height: 1.25; }
.adelanto-icono-ok { color: #6EE7A8; } .adelanto-icono-pronto { color: #FFC857; } .adelanto-icono-cumplido { color: #ff6b7d; }

/* Temporizador de habitación (Dashboard): botón con el tiempo que queda y aviso flotante al terminar */
.btn-temporizador { font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .15rem; min-height: 1.6rem; min-width: 1.6rem; justify-content: center; }
.btn-temporizador small { font-size: .72rem; font-weight: 600; }
.btn-temporizador.activo { color: #FFC857 !important; }
.btn-temporizador.terminado { color: #fff !important; background: #dc3545; border-radius: .3rem; padding: 0 .25rem !important; animation: adelanto-latido 1.2s ease-in-out infinite; }
.aviso-temporizador { position: fixed; left: 16px; bottom: 16px; z-index: 1085; max-width: min(380px, calc(100vw - 32px));
    background: #9b1c2c; color: #fff; border: 1px solid #ff6b7d; border-radius: .6rem; padding: .6rem .75rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .5); font-size: .9rem; }
@media (max-width: 575.98px) { .aviso-temporizador { bottom: auto; top: 64px; } }

/* Números del menú dentro del botón ☰ (celular): compactos para que entren en una línea */
.admin-topbar .btn .badge { font-size: .68rem; padding: .25em .45em; }
.admin-topbar .btn .badge i { margin-right: .2rem !important; }

/* Etiquetas y membresía de clientes (color elegido en Clientes → Etiquetas / Planes) */
.chip-etiqueta, .chip-membresia { color: #fff; font-weight: 600; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.etiqueta-opcion { cursor: pointer; user-select: none; }
.etiqueta-opcion input { display: none; }
.etiqueta-opcion span { opacity: .45; border: 2px solid transparent; }
.etiqueta-opcion input:checked + span { opacity: 1; border-color: #fff; }

/* Aviso de pedido web nuevo (en todo el panel, con sonido hasta "Entendido" o hasta que se tome) */
/* y de mensaje nuevo en el buzón; los dos van uno debajo del otro en .avisos-fijos */
.avisos-fijos { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1086; width: max-content;
    max-width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: .5rem; }
.aviso-pedido { background: #9b1c5a; color: #fff; border: 1px solid #FF2E93; border-radius: .6rem;
    padding: .6rem .75rem; box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .5); font-size: .9rem; }
.aviso-pedido.aviso-buzon { background: #4b2a7a; border-color: #b388ff; }
.aviso-pedido a { color: #fff; }
@media (max-width: 991.98px) { .avisos-fijos { top: 64px; } }

/* Banderas en SVG (WhatsApp con código de país: pais_bandera() en includes/i18n.php) */
.bandera { flex-shrink: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); vertical-align: -2px; }

/* Hora en 12 horas (App.hora12 en app.js): hora · minutos · a. m./p. m. */
.hora12 > .hora12-parte { flex: 1 1 0; min-width: 0; }
.hora12 > .hora12-parte:last-of-type { flex-basis: 4.5rem; }

/* Productos: importar desde Excel */
.paso-importar { background: var(--surface-2); border: 1px solid var(--border); border-radius: .5rem; padding: .75rem .9rem; }
.tabla-importar { max-height: 55vh; overflow: auto; }
.tabla-importar thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
