﻿@import url('site.css');
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.businesslogo {
    width: 200px;
    height: 100px;
}

.btn-selectable {
    transition: background-color .2s ease;
}

    .btn-selectable.active {
        background-color: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
    }

/* ============================================================
   site.css  –  Estilos globales de layout (Booking Bendel)
   ============================================================ */


/* ── Reset base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    font-size: 14px;
    overflow: hidden; /* el scroll va en .content de cada vista */
}
/* Reset de enlaces – fuerza herencia para anular el azul por defecto del navegador */
a,
a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none;
    color: inherit;
}

/* ══════════════════════════════════════════
   SHELL  –  contenedor flex principal
══════════════════════════════════════════ */
.shell {
    display: flex;
    height: 100dvh;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   SIDEBAR  (panel izquierdo, desktop)
══════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 16px 16px 0 16px;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 50;
    overflow-y: auto;
}


.sb-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    padding: 0 20px 0px;
}
    .sb-logo em {
        color: var(--accent);
        font-style: italic;
    }
.sb-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.sb-logo-text {
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    color: var(--accent);
}

.sb-business-logo {
    padding: 20px 22px 10px;
    text-align: center;
}

    .sb-business-logo img {
        max-width: 60px;
        max-height: 60px;
        border-radius: 12px;
        object-fit: cover;
    }

.sb-section {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink2);
    padding: 0 22px;
    margin-bottom: 6px;
    margin-top: 8px;
}

.sb-sep {
    height: 1.5px;
    background: var(--border);
    margin: 12px 10px;
}

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.sb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    /* color explícito en todos los estados para que <a> no tome el azul del navegador */
    color: var(--ink2) !important;
    text-decoration: none !important;
    transition: background .15s, color .15s;
    user-select: none;
}

    .sb-item:hover {
        background: var(--accent-soft);
        color: var(--accent) !important;
    }

    .sb-item.active {
        background: var(--accent);
        color: #fff !important;
    }

    .sb-item svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

/* ══════════════════════════════════════════
   MAIN  –  área de contenido
══════════════════════════════════════════ */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    min-width: 0;
    min-height: 0;
}
    
/* ══════════════════════════════════════════
   TOPBAR BASE  (cada vista puede extenderlo)
══════════════════════════════════════════ */
.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1.5px solid var(--border);
    flex-shrink: 0;
}

.topbar-title {
    font-family: 'DM Serif Display', serif;
    font-size: 18px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .topbar-title em {
        color: var(--accent);
        font-style: italic;
    }

/* Botón hamburguesa – oculto en desktop, visible en tablet/móvil */
.ham-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: none; /* se activa vía media query */
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

    .ham-btn:hover {
        background: var(--accent-soft);
    }

    .ham-btn svg {
        width: 16px;
        height: 16px;
        stroke: var(--ink);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
    }

/* ══════════════════════════════════════════
   BOTONES GLOBALES
══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    transition: border-color .15s, background .15s, transform .12s;
    white-space: nowrap;
}

    .btn:hover {
        border-color: var(--accent);
        background: var(--accent-soft);
        transform: translateY(-1px);
    }

    .btn.primary {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

        .btn.primary:hover {
            background: var(--accent2);
            
        }

    .btn.danger {
        border-color: var(--red);
        color: #c0392b;
    }

        .btn.danger:hover {
            background: #FDEAEA;
            border-color: #c0392b;
        }

    .btn svg {
        width: 13px;
        height: 13px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

/* ── Área de contenido de cada vista ── */
.content {
    flex: 1;
    overflow: auto;
    /**/ padding: 16px 20px;
    min-height: 0;
}

/* ══════════════════════════════════════════
   BOTTOM NAV  (visible sólo en móvil)
══════════════════════════════════════════ */
.bottom-nav {
    display: none; /* activado con media query */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottomnav-h);
    background: var(--surface);
    border-top: 1.5px solid var(--border);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
}

.bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 6px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    /* ídem: forzar color para <a> */
    color: var(--ink2) !important;
    text-decoration: none !important;
    transition: color .15s;
    user-select: none;
    flex: 1;
    text-align: center;
}

    .bn-item.active {
        color: var(--accent) !important;
    }

    .bn-item svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8px;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* ══════════════════════════════════════════
   SIDEBAR OVERLAY  (fondo oscuro móvil)
══════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,23,20,.35);
    z-index: 49;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET  (< 900 px)
══════════════════════════════════════════ */
@media (max-width: 900px) {
    /* Sidebar oculto por defecto, se convierte en panel deslizante */
    .sidebar {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 50;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .sidebar-overlay {
        display: block;
    }

    /* Mostrar hamburguesa */
    .ham-btn {
        display: flex;
    }

    /* Ocultar las view-tabs del topbar en tablet
       (la navegación queda en el sidebar) */
    .view-tabs {
        display: none;
    }

    .topbar-title {
        font-size: 16px;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MÓVIL  (< 600 px)
══════════════════════════════════════════ */
@media (max-width: 600px) {
    /* Espacio inferior para la bottom-nav + topbar de 2 filas */
    .content {
        padding: 8px 10px calc(var(--bottomnav-h) + 10px);
    }

    /* Activar bottom nav */
    .bottom-nav {
        display: flex;
    }

    /* ── Topbar: 2 filas en lugar de desbordarse ── */
    .topbar {
        flex-wrap: wrap;
        height: auto !important;
        padding: 8px 12px !important;
        gap: 6px;
        row-gap: 4px;
    }

    /* Fila 1: hamburguesa (order 0) + título (order 1) + btn nueva (order 2) */
    .ham-btn {
        order: 0;
        flex-shrink: 0;
    }

    .topbar-title {
        order: 1;
        flex: 1;
        min-width: 0;
        font-size: 15px;
    }

    .btn-nueva-top {
        order: 2;
        display: inline-flex !important; /* visible en móvil como texto corto */
        padding: 6px 10px;
        font-size: 11px;
    }
        /* Ocultar texto "Nueva reserva", dejar solo el icono */
        .btn-nueva-top span.btn-label {
            display: none;
        }

    /* Fila 2: date-nav al ancho completo, centrado */
    .date-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 4px;
        border-top: 1px solid var(--border);
    }

    .dn-label {
        min-width: 0;
        flex: 1;
        text-align: center;
        font-size: 11px;
    }

    .dn-today {
        display: inline-flex;
        font-size: 10px;
        padding: 4px 8px;
    }

    /* Ocultar view-tabs (se navega desde bottom-nav) */
    .view-tabs {
        display: none !important;
    }

    /* Sin FAB – el btn del topbar lo sustituye */
    .fab {
        display: none !important;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MÓVIL XS  (< 400 px)
══════════════════════════════════════════ */
@media (max-width: 400px) {
    .topbar-title {
        font-size: 14px;
    }
}

/* ══════════════════════════════════════════
   SIDEBAR — tarjeta de usuario
══════════════════════════════════════════ */
.sb-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: var(--bg);
    padding-left: 0;
    padding-right: 0;
}

.sb-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .03em;
}

.sb-user-info {
    min-width: 0;
}

.sb-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sb-user-role {
    font-size: 10px;
    color: var(--ink2);
    margin-top: 1px;
}

/* Botón logout como sb-item pero tipo button */
.sb-logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    color: var(--ink2) !important;
}

    .sb-logout-btn:hover {
        color: #c0392b !important;
        background: #FDEAEA;
    }
/* ══════════════════════════════════════════
   GUEST TOPBAR — usuarios no autenticados
══════════════════════════════════════════ */
.guest-topbar {
    height: 56px;
    background: var(--surface);
    border-bottom: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    box-shadow: 0 1px 8px rgba(26,23,20,.05);
    width: 100%;
    background: var(--bg);
    border-bottom: none;
    box-shadow: none;
}

.guest-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-style: italic;
    color: var(--ink);
    letter-spacing: -.2px;
    text-decoration: none;
}

    .guest-logo em {
        color: var(--accent);
        font-style: italic;
    }

.guest-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Botón login flotante (guest-login-btn / h-login-fab) ── */
.guest-login-btn,
.h-login-fab {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 7px 10px;
    border-radius: 20px;
    background: rgba(253,252,251,.88);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--border, #E2DDD8);
    color: var(--ink2, #6B6560);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    box-shadow: 0 2px 12px rgba(26,23,20,.08);
}

    .guest-login-btn:hover,
    .h-login-fab:hover {
        background: var(--surface, #FDFCFB);
        border-color: var(--accent, #C8763A);
        color: var(--accent, #C8763A);
        box-shadow: 0 4px 18px rgba(26,23,20,.12);
    }

    .guest-login-btn svg,
    .h-login-fab svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

@media (max-width: 420px) {
    .guest-login-btn span,
    .h-login-fab span {
        display: none;
    }

    .guest-login-btn,
    .h-login-fab {
        padding: 9px;
        border-radius: 50%;
    }
}


.shell:not(:has(.sidebar)) .main {
    margin-left: 0;
    width: 100%;
}

@media (max-width: 600px) {
    .guest-badge {
        display: none;
    }

    .guest-topbar {
        padding: 0 14px;
    }
}

/* Reemplaza el azul de Bootstrap en selects */
select.form-control,
select.fv-select {
    background-color: var(--surface);
    color: var(--ink);
    border-color: var(--border);
}

/* La opción seleccionada y el hover en el dropdown nativo */
select option {
    background-color: var(--surface);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
}

    select option:checked,
    select option:hover {
        background-color: var(--accent-soft, #F5EDE4);
        color: var(--ink);
    }

/*  LOGIN*/
/* ── Spacer: empuja la ficha al fondo ── */
.sb-spacer {
    flex: 1;
}

/* ── Contenedor ficha + menú ── */
.sb-user-wrap {
    flex-shrink: 0;
    position: relative;
}

/* Menú desplegable — oculto por defecto */
.sb-user-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .28s cubic-bezier(.22,1,.36,1), opacity .2s ease;
    border-bottom: 1.5px solid var(--border);
    padding: 0 8px;
}

.sb-user-wrap.open .sb-user-menu {
    max-height: 200px;
    opacity: 1;
    padding: 6px 8px 4px;
}

/* Separador dentro del menú */
.sb-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 3px 2px;
}

/* ── Ficha clicable ── */
.sb-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: 'DM Sans', sans-serif;
    transition: background .13s;
    user-select: none;
    padding-left: 0;
    padding-right: 0;
}

    .sb-user-card:hover {
        background: var(--bg);
    }

/* Chevron animado */
.sb-user-chevron {
    width: 14px;
    height: 14px;
    stroke: var(--ink3);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
    margin-left: auto;
    transition: transform .25s cubic-bezier(.22,1,.36,1), stroke .15s;
}

.sb-user-wrap.open .sb-user-chevron {
    transform: rotate(180deg);
    stroke: var(--accent);
}

/* Logout en rojo al hover */
.sb-logout-btn:hover {
    background: #FDEAEA !important;
    color: #C0392B !important;
}

@media (max-width: 600px) {
    .sb-user-wrap {
        padding-bottom: var(--bottomnav-h, 60px);
    }
}

@media (max-width: 600px) {
    .sidebar {
        height: 100dvh;
        padding: 16px 16px 0 16px;
        padding-bottom: 0;
        padding-left: 0;
        padding-right: 0;
    }


    .sb-user-wrap .sb-sep {
        margin-bottom: 0;
    }
}


/* ══════════════════════════════════════════
   HOME PÚBLICO (Index) — lista de negocios
══════════════════════════════════════════ */
/* ════════════════════════════════════════════
   HOME PÚBLICO — lista de negocios
   Paleta: DM Serif Display + DM Sans, beige/acento naranja
════════════════════════════════════════════ */




/* ── Wrapper página ── */
.h-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px 60px;
}
.main:has(.h-page) {
    display: flex;
    flex-direction: column;
}
/* ── Hero ── */
.h-hero {
    text-align: center;
    max-width: 500px;
    margin-bottom: 40px;
    animation: hRise .5s cubic-bezier(.22,1,.36,1) both;
}

@keyframes hRise {
    from {
        opacity: 0;
        transform: translateY(14px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.h-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-soft, #F5EDE4);
    border: 1.5px solid rgba(200,118,58,.2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent, #C8763A);
    margin-bottom: 16px;
}

    .h-eyebrow svg {
        width: 11px;
        height: 11px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
    }

.h-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(26px, 5vw, 36px);
    line-height: 1.15;
    color: var(--ink, #1A1714);
    margin-bottom: 12px;
}

    .h-title em {
        color: var(--accent, #C8763A);
        font-style: italic;
    }

.h-sub {
    font-size: 14px;
    color: var(--ink2, #6B6560);
    line-height: 1.6;
}

/* ── Grid de negocios ── */
.h-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 680px;
    animation: hRise .55s .1s cubic-bezier(.22,1,.36,1) both;
}

.h-card {
    background: var(--surface, #FDFCFB);
    border: 1.5px solid var(--border, #E2DDD8);
    border-radius: 18px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    cursor: pointer;
}

    .h-card:hover {
        border-color: var(--accent, #C8763A);
        box-shadow: 0 8px 32px rgba(200,118,58,.14);
        transform: translateY(-3px);
    }

    .h-card:active {
        transform: translateY(-1px);
    }

/* Logo del negocio */
.h-card-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--accent-soft, #F5EDE4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(200,118,58,.12);
}

    .h-card-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.h-card-logo-initials {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-style: italic;
    color: var(--accent, #C8763A);
}

/* Nombre */
.h-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #1A1714);
    text-align: center;
    line-height: 1.3;
}

/* CTA inline */
.h-card-cta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent, #C8763A);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s, transform .18s;
}

.h-card:hover .h-card-cta {
    opacity: 1;
    transform: none;
}

.h-card-cta svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* ── Estado vacío ── */
.h-empty {
    text-align: center;
    color: var(--ink2, #6B6560);
    padding: 40px 20px;
    max-width: 340px;
}

.h-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg, #F0EDE8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--ink3, #A8A39E);
}

    .h-empty-icon svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.5;
        stroke-linecap: round;
    }

.h-empty-title {
    font-family: 'DM Serif Display', serif;
    font-size: 16px;
    color: var(--ink, #1A1714);
    margin-bottom: 6px;
}

/* ── Footer discreto ── */
.h-footer {
    margin-top: 48px;
    font-size: 11px;
    color: var(--ink3, #A8A39E);
    text-align: center;
}

    .h-footer a {
        color: var(--ink3, #A8A39E);
        text-decoration: none;
    }

        .h-footer a:hover {
            color: var(--ink2, #6B6560);
        }

@media (max-width: 480px) {
    .h-page {
        padding: 36px 14px 50px;
    }

    .h-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .h-card {
        padding: 18px 14px 16px;
    }

    .h-card-logo {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .h-card-logo-initials {
        font-size: 18px;
    }
}
/* SPINNER */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(237,234,228,.7);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

    #loading-overlay.active {
        display: flex;
    }

.loading-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--border, #E2DDD8);
    border-top-color: var(--accent, #C8763A);
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Botón deshabilitado visualmente durante la carga */
.btn-loading {
    opacity: .6;
    pointer-events: none;
}
