/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
    --navy-base:       #0A192F;
    --navy-light:      #112B4F;
    --navy-hover:      #1A3E70;
    --highlight:       #64FFDA;
    --bg-content:      #ffffff;
    --text-dark:       #333333;
    --box-light:       #f3f4f6;
    --footer-bg:       #f5f5f5;
    --transition-pane: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Quita el estilo nativo del navegador de TODOS los <select> del
   proyecto — sin esto, el navegador dibuja su propio borde/franja por
   encima de nuestro CSS, aunque le pongamos border:none. Los select
   que ya tienen su propia clase con estilo (.input-wrapper select,
   .admin-role-select, etc.) siguen viéndose igual que antes — esto
   solo les quita el "de más" que agregaba el navegador. Los select
   sueltos que no tenían ningún estilo propio (algunos ya existían
   así) reciben aquí un aspecto básico y consistente, en vez de
   quedarse con el estilo feo por defecto del sistema operativo.
   Un select con una clase más específica (mayor prioridad en CSS)
   sobrescribe estos valores de respaldo sin problema. */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 2rem 0.5rem 0.7rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.6rem center/16px;
    background-size: 16px;
    cursor: pointer;
}

/* El ícono de calendario dentro de un <input type="date"> es dibujado
   por el navegador — esto lo deja del mismo tono gris que el resto de
   íconos del proyecto, en vez de la cajita oscura por defecto. */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
    filter: invert(0.4);
}
input[type="date"] { font-family: inherit; }

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-content);
    color: var(--text-dark);
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 var(--bg-content);
}
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--bg-content); }
body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.app-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: 38%;
    max-width: 550px;
    min-width: 350px;
    height: 100vh;
    background-color: var(--navy-base);
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
    z-index: 100;
    overflow: hidden;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
    flex-shrink: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}
.logo-icon {
    display: flex;
    align-items: center;
    color: var(--highlight);
}

/* --- Acciones de la cabecera --- */
.brand-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- Selector de idioma --- */
.lang-selector { position: relative; }
.lang-btn {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: border-color 0.2s;
}
.lang-btn:hover { border-color: rgba(255,255,255,0.5); }
.flag-emoji {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.flag-emoji img { border-radius: 2px; display: block; }
.phone-code-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.phone-flag-preview { border-radius: 2px; flex-shrink: 0; }
.lang-menu {
    position: absolute;
    top: 115%;
    right: 0;
    background-color: var(--navy-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    list-style: none;
    width: 160px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 200;
}
.lang-menu.show { display: flex; }
.lang-menu li {
    padding: 0.8rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    transition: background-color 0.2s;
}
.lang-menu li:hover { background-color: var(--navy-hover); color: white; }

/* --- Botón login --- */
.btn-login {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}
.btn-login:hover { background-color: rgba(255,255,255,0.1); }

/* --- Botón menú móvil --- */
.mobile-only {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}

/* ============================================================
   SIDEBAR CONTENT & TRANSICIONES DE VISTAS
   ============================================================ */
.sidebar-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}
.sidebar-state-block {
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform var(--transition-pane), opacity var(--transition-pane);
}

/* Vista HOME activa */
.app-container[data-view="home"] .state-home-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
}
.app-container[data-view="home"] .state-negocios-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Vista NEGOCIOS o PERFIL activa */
.app-container[data-view="negocios"] .state-home-only,
.app-container[data-view="profile"]  .state-home-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}
.app-container[data-view="negocios"] .state-negocios-only,
.app-container[data-view="profile"]  .state-negocios-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
}

/* Vista AUTH activa (login / registro) */
.app-container[data-view="auth"] .state-home-only,
.app-container[data-view="auth"] .state-negocios-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}
.app-container[data-view="auth"] .state-auth-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
}
.state-auth-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Vista LEGAL activa (Términos / Privacidad) */
.app-container[data-view="legal"] .state-home-only,
.app-container[data-view="legal"] .state-negocios-only,
.app-container[data-view="legal"] .state-auth-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}
.app-container[data-view="legal"] .state-legal-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
}
.state-legal-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Vista CUENTA (Perfil de Usuario) activa */
.app-container[data-view="cuenta"] .state-home-only,
.app-container[data-view="cuenta"] .state-negocios-only,
.app-container[data-view="cuenta"] .state-auth-only,
.app-container[data-view="cuenta"] .state-legal-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}
.app-container[data-view="cuenta"] .state-cuenta-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
}
.state-cuenta-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* Vista PANEL DE NEGOCIO (Perfil de Negocio) activa */
.app-container[data-view="panel-negocio"] .state-home-only,
.app-container[data-view="panel-negocio"] .state-negocios-only,
.app-container[data-view="panel-negocio"] .state-auth-only,
.app-container[data-view="panel-negocio"] .state-legal-only,
.app-container[data-view="panel-negocio"] .state-cuenta-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}
.app-container[data-view="panel-negocio"] .state-panel-negocio-only {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    position: relative;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 255, 218, 0.35) transparent;
}
.app-container[data-view="panel-negocio"] .state-panel-negocio-only::-webkit-scrollbar {
    width: 4px;
}
.app-container[data-view="panel-negocio"] .state-panel-negocio-only::-webkit-scrollbar-track {
    background: transparent;
}
.app-container[data-view="panel-negocio"] .state-panel-negocio-only::-webkit-scrollbar-thumb {
    background-color: rgba(100, 255, 218, 0.3);
    border-radius: 999px;
}
.app-container[data-view="panel-negocio"] .state-panel-negocio-only::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 255, 218, 0.6);
}
.state-panel-negocio-only {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

/* ============================================================
   SIDEBAR HERO & CATEGORÍAS
   ============================================================ */
.sidebar-hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.sidebar-hero .highlight { color: var(--highlight); font-weight: 600; }
.sidebar-hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}
.categories-title {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cuadrícula 2x2 (vista home) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.category-card {
    background-color: var(--navy-light);
    text-decoration: none;
    color: white;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    aspect-ratio: 4/3;
    transition: background-color 0.3s, transform 0.3s;
}
.category-card:hover,
.category-card.active { background-color: var(--navy-hover); transform: translateY(-2px); }
.category-card .icon {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}
.category-card:hover .icon,
.category-card.active .icon { color: var(--highlight); }

/* Lista rectangular (vista negocios) */
.categories-list-rects {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.rect-card {
    background-color: var(--navy-light);
    border: none;
    color: white;
    padding: 1.1rem 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
    font-size: 0.95rem;
    font-weight: 500;
}
.rect-card:hover,
.rect-card.active { background-color: var(--navy-hover); transform: translateX(5px); }
.rect-icon { display: flex; align-items: center; color: rgba(255,255,255,0.7); }
.rect-card.active .rect-icon { color: var(--highlight); }
.rect-card:hover .rect-icon { color: var(--highlight); }
.rect-external-icon { margin-left: auto; opacity: 0.6; font-size: 0.9rem; }
.btn-back-landing {
    background-color: transparent;
    border: 1px dashed rgba(255,255,255,0.2);
    margin-top: 1rem;
}

/* Footer de links del sidebar */
.sidebar-footer-links {
    margin-top: auto;
    display: flex;
    gap: 1.5rem;
    padding-top: 2rem;
}
.sidebar-footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}
.sidebar-footer-links a:hover { color: rgba(255,255,255,0.9); }

/* ============================================================
   ÁREA DE CONTENIDO (DERECHA)
   ============================================================ */
.content-area {
    margin-left: 38%;
    width: 62%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ============================================================
   SISTEMA DE VISTAS (wrappers)
   ============================================================ */
.view-wrapper {
    width: 100%;
    transition: opacity var(--transition-pane), transform var(--transition-pane);
}

/* HOME */
.app-container[data-view="home"] .wrapper-landing {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="home"] .wrapper-directory,
.app-container[data-view="home"] .wrapper-profile {
    display: none; opacity: 0; transform: translateY(20px);
}

/* NEGOCIOS */
.app-container[data-view="negocios"] .wrapper-directory {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="negocios"] .wrapper-landing,
.app-container[data-view="negocios"] .wrapper-profile {
    display: none; opacity: 0; transform: translateY(20px);
}

/* PERFIL */
.app-container[data-view="profile"] .wrapper-profile {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="profile"] .wrapper-landing,
.app-container[data-view="profile"] .wrapper-directory {
    display: none; opacity: 0; transform: translateY(-20px);
}

/* AUTH (LOGIN / REGISTRO) */
.app-container[data-view="auth"] .wrapper-auth {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="auth"] .wrapper-landing,
.app-container[data-view="auth"] .wrapper-directory,
.app-container[data-view="auth"] .wrapper-profile {
    display: none; opacity: 0; transform: translateY(20px);
}
.wrapper-auth { display: none; opacity: 0; }

/* LEGAL (TÉRMINOS / PRIVACIDAD) */
.app-container[data-view="legal"] .wrapper-legal {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="legal"] .wrapper-landing,
.app-container[data-view="legal"] .wrapper-directory,
.app-container[data-view="legal"] .wrapper-profile,
.app-container[data-view="legal"] .wrapper-auth {
    display: none; opacity: 0; transform: translateY(20px);
}
.wrapper-legal { display: none; opacity: 0; }

/* CUENTA (PERFIL DE USUARIO) */
.app-container[data-view="cuenta"] .wrapper-cuenta {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="cuenta"] .wrapper-landing,
.app-container[data-view="cuenta"] .wrapper-directory,
.app-container[data-view="cuenta"] .wrapper-profile,
.app-container[data-view="cuenta"] .wrapper-auth,
.app-container[data-view="cuenta"] .wrapper-legal {
    display: none; opacity: 0; transform: translateY(20px);
}
.wrapper-cuenta { display: none; opacity: 0; }

/* PANEL DE NEGOCIO (PERFIL DE NEGOCIO) */
.app-container[data-view="panel-negocio"] .wrapper-panel-negocio {
    display: block; opacity: 1; transform: translateY(0);
}
.app-container[data-view="panel-negocio"] .wrapper-landing,
.app-container[data-view="panel-negocio"] .wrapper-directory,
.app-container[data-view="panel-negocio"] .wrapper-profile,
.app-container[data-view="panel-negocio"] .wrapper-auth,
.app-container[data-view="panel-negocio"] .wrapper-legal,
.app-container[data-view="panel-negocio"] .wrapper-cuenta {
    display: none; opacity: 0; transform: translateY(20px);
}
.wrapper-panel-negocio { display: none; opacity: 0; }

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.directory-container,
.profile-container,
.cuenta-container,
.panelneg-container {
    padding: 4rem 4rem 2rem 4rem;
    min-height: 100vh;
}
.section {
    padding: 4rem 4rem 2rem 4rem;
    min-height: auto;
}
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   VISTA: LANDING
   ============================================================ */
.hero-image-placeholder {
    width: 100%;
    min-height: 460px;
    background-color: var(--navy-base);
    border-radius: 24px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 1.5rem;
    padding: 3rem 2rem;
    margin-bottom: 2.2rem;
    overflow: hidden;
}
.placeholder-text {
    color: rgba(255,255,255,0.4);
    font-size: 1.3rem;
    font-weight: bold;
}

/* ---- Splash inicial: nombre y logo de Atempo (animado y reactivable) ---- */
.atempo-intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.atempo-intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    position: relative;
    z-index: 3;
    will-change: transform, opacity;
}
.atempo-intro.in-view .atempo-intro-content {
    animation: atempoIntroReveal 1s cubic-bezier(0.16,1,0.3,1) 0.1s forwards;
}
.atempo-intro-logo {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    background: var(--navy-base);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 45px rgba(10,25,47,0.18);
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
}
.atempo-intro.in-view .atempo-intro-logo {
    animation: atempoLogoPop 0.8s cubic-bezier(0.16,1,0.3,1) 0.05s forwards, atempoLogoGlow 3s ease-in-out 0.9s infinite;
}
.atempo-intro-name {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(100deg, var(--navy-base) 35%, var(--highlight) 50%, var(--navy-base) 65%);
    background-size: 250% 100%;
    background-position: 200% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.atempo-intro.in-view .atempo-intro-name {
    animation: atempoNameShimmer 3.6s ease-in-out 0.6s infinite;
}
.atempo-intro-tagline {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 420px;
}
.pulse-attention { animation: pulseAttention 0.5s ease-in-out 3; }
@keyframes pulseAttention {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes atempoIntroReveal {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes atempoLogoPop {
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes atempoLogoGlow {
    0%, 100% { box-shadow: 0 20px 45px rgba(10,25,47,0.18); }
    50%      { box-shadow: 0 20px 45px rgba(10,25,47,0.18), 0 0 0 10px rgba(100,255,218,0.18); }
}
@keyframes atempoNameShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -100% 0; }
}
@media (max-width: 640px) {
    .atempo-intro-logo { width: 76px; height: 76px; border-radius: 20px; }
}

/* Notificaciones tipo "toast": aparecen una por una en distintas esquinas, se van, y aparece la siguiente (en bucle) */
.atempo-intro-pill {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid #eef2f7;
    padding: 0.65rem 1.1rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy-base);
    box-shadow: 0 12px 25px rgba(10,25,47,0.08);
    white-space: nowrap;
    opacity: 0;
    z-index: 2;
}
.atempo-intro.in-view .atempo-intro-pill {
    animation-duration: 9.6s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
.atempo-pill-1 { top: 15%; left: 7%; animation-name: atempoPillNotifyFromLeft; animation-delay: 0s; }
.atempo-pill-2 { bottom: 17%; left: 9%; animation-name: atempoPillNotifyFromLeft; animation-delay: 2.4s; }
.atempo-pill-3 { top: 17%; right: 8%; animation-name: atempoPillNotifyFromRight; animation-delay: 4.8s; }
.atempo-pill-4 { bottom: 19%; right: 10%; animation-name: atempoPillNotifyFromRight; animation-delay: 7.2s; }
@keyframes atempoPillNotifyFromLeft {
    0%   { opacity: 0; transform: translateX(-16px) scale(0.95); }
    4%   { opacity: 1; transform: translateX(0) scale(1); }
    20%  { opacity: 1; transform: translateX(0) scale(1); }
    26%  { opacity: 0; transform: translateX(-16px) scale(0.95); }
    100% { opacity: 0; }
}
@keyframes atempoPillNotifyFromRight {
    0%   { opacity: 0; transform: translateX(16px) scale(0.95); }
    4%   { opacity: 1; transform: translateX(0) scale(1); }
    20%  { opacity: 1; transform: translateX(0) scale(1); }
    26%  { opacity: 0; transform: translateX(16px) scale(0.95); }
    100% { opacity: 0; }
}
@media (max-width: 900px) {
    .atempo-intro-pill { display: none; }
}
.text-center-block { text-align: center; margin-bottom: 3rem; }
.text-center-block h2 { font-size: 2.1rem; font-weight: 400; line-height: 1.2; }

/* ---- Hero: mini-demo animada del flujo de reserva (usuario) ---- */
.hero-demo-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.8rem 2rem;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: heroCardIn 0.8s cubic-bezier(0.16,1,0.3,1);
}
@keyframes heroCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-demo-card-top { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.4rem; }
.hero-demo-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--box-light);
    color: var(--navy-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}
.hero-demo-avatar svg { display: block; }
.hero-demo-card-top strong { display: block; font-size: 1rem; color: var(--navy-base); }
.hero-demo-card-top span:not(.hero-demo-avatar) { display: block; font-size: 0.78rem; color: #94a3b8; margin-top: 0.1rem; }
.hero-demo-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.4rem; flex: 1; align-content: center; }
.hero-demo-slot {
    padding: 0.6rem 0.5rem;
    text-align: center;
    border-radius: 10px;
    background: var(--box-light);
    color: var(--navy-base);
    font-size: 0.85rem;
    font-weight: 700;
    animation: heroSlotCycle 5.6s ease-in-out infinite;
}
.hero-demo-slot:nth-child(1) { animation-delay: 0s; }
.hero-demo-slot:nth-child(2) { animation-delay: 1.4s; }
.hero-demo-slot:nth-child(3) { animation-delay: 2.8s; }
.hero-demo-slot:nth-child(4) { animation-delay: 4.2s; }
@keyframes heroSlotCycle {
    0%, 17%  { background: var(--highlight); transform: scale(1.06); box-shadow: 0 6px 16px rgba(100,255,218,0.35); }
    25%, 100% { background: var(--box-light); transform: scale(1); box-shadow: none; }
}
.hero-demo-cta {
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    border: none;
    background: var(--navy-base);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: default;
    position: relative;
    overflow: hidden;
}
.hero-demo-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(100,255,218,0.35), transparent);
    transform: translateX(-100%);
    animation: heroCtaShine 3.2s ease-in-out infinite;
}
@keyframes heroCtaShine {
    0%, 55% { transform: translateX(-100%); }
    100%    { transform: translateX(100%); }
}
.hero-demo-card-secondary { animation-delay: 0.2s; }
.hero-demo-services { display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; margin-bottom: 1.4rem; flex: 1; }
.hero-demo-service-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: var(--box-light);
    color: var(--navy-base);
    font-size: 0.85rem;
    font-weight: 600;
    animation: heroServiceCycle 4.2s ease-in-out infinite;
}
.hero-demo-service-item:nth-child(1) { animation-delay: 0s; }
.hero-demo-service-item:nth-child(2) { animation-delay: 1.4s; }
.hero-demo-service-item:nth-child(3) { animation-delay: 2.8s; }
@keyframes heroServiceCycle {
    0%, 22.67%  { background: var(--highlight); transform: scale(1.03); box-shadow: 0 6px 16px rgba(100,255,218,0.35); }
    33.33%, 100% { background: var(--box-light); transform: scale(1); box-shadow: none; }
}

.hero-demo-card-register {
    grid-column: 1 / -1;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.2rem;
    animation-delay: 0.35s;
}
.hero-demo-register-content h3 { font-size: 1.15rem; color: var(--navy-base); margin-bottom: 0.3rem; }
.hero-demo-register-content p { font-size: 0.85rem; color: #64748b; margin: 0; }
.hero-demo-register-btn {
    width: auto;
    flex-shrink: 0;
    padding: 0.85rem 2.2rem;
    cursor: pointer;
}
.hero-demo-register-btn:hover { background: var(--navy-hover); }
@media (max-width: 640px) {
    .hero-demo-card-register { flex-direction: column; text-align: center; }
    .hero-demo-register-btn { width: 100%; }
}

/* ---- Qué hacemos: explicación ilustrada para usuarios y negocios ---- */
.explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.explain-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 20px;
    padding: 2.4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(10,25,47,0.05);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.section.visible .explain-card { opacity: 1; transform: translateY(0); }
.section.visible .explain-card:nth-child(1) { transition-delay: 0.1s; }
.section.visible .explain-card:nth-child(2) { transition-delay: 0.25s; }
.explain-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(10,25,47,0.09); }
.explain-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--navy-base);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
}
.explain-card h3 { font-size: 1.35rem; color: var(--navy-base); margin-bottom: 0.7rem; }
.explain-card > p { color: #64748b; font-size: 0.95rem; line-height: 1.5; margin-bottom: 1.4rem; flex: 1 0 auto; }
.explain-list { list-style: none; padding: 0; margin: 0; text-align: left; display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.explain-list li { position: relative; padding-left: 1.7rem; font-size: 0.9rem; color: #334155; font-weight: 500; }
.explain-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--highlight);
    color: var(--navy-base);
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Banner CTA de registro (dentro de "Estadísticas") ---- */
.cta-banner {
    margin-top: 5rem;
    text-align: center;
    background: var(--box-light);
    border-radius: 20px;
    padding: 3rem 2rem;
}
.cta-banner h3 { font-size: 1.6rem; color: var(--navy-base); margin-bottom: 0.6rem; }
.cta-banner p { font-size: 1rem; color: #64748b; margin-bottom: 1.6rem; }
.cta-banner-btn {
    border: none;
    background: var(--navy-base);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.95rem 2.4rem;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}
.cta-banner-btn:hover { background: var(--navy-hover); transform: translateY(-2px); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.stat-box {
    background-color: var(--box-light);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s;
}
.stat-box:hover { transform: translateY(-4px); }
.stat-box h3 {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--navy-base);
    margin-bottom: 0.5rem;
}
.chart-placeholder {
    font-size: 1rem;
    color: #999;
    margin-bottom: 1rem;
}

/* ============================================================
   VISTA: DIRECTORIO
   ============================================================ */
.directory-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.directory-header h2 {
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--navy-base);
    margin-bottom: 3rem;
}
.directory-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #64748b;
}
.directory-sort-wrapper select {
    padding: 0.5rem 1.8rem 0.5rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #dbe2ea;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.6rem center/16px;
    font-size: 0.9rem;
    color: var(--navy-base);
    cursor: pointer;
}
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 1rem;
}
.directory-empty-hint {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
    font-size: 1.05rem;
    background: var(--box-light);
    border: 1px dashed #dbe2ea;
    border-radius: 16px;
    margin-top: 1rem;
}

/* Tarjetas de negocio */
.business-directory-card {
    /* Antes tenía una altura fija (480px) con un ancho flexible según
       la cuadrícula — eso significa que la proporción real variaba
       según el tamaño de pantalla, y casi nunca coincidía exactamente
       con el recorte 3:4 que se hace al subir la foto. Por eso la
       misma foto se veía distinta (más o menos recortada) en la vista
       previa chica que en la tarjeta real. Con "aspect-ratio" en vez
       de una altura fija, siempre queda exactamente 3:4 sin importar
       el ancho — igual que el recorte.
    */
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition:
        opacity    0.4s cubic-bezier(0.25, 1, 0.5, 1),
        transform  0.4s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.4s ease;
    cursor: pointer;
}
.business-directory-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.business-directory-card.directory-card-mini {
    width: 220px;
    aspect-ratio: 3 / 4;
    height: auto;
    opacity: 1;
    transform: none;
    cursor: default;
}
.business-directory-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 2;
}
.biz-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    align-items: center;
}
.btn-cloud-availability {
    margin-top: auto;
    margin-bottom: auto;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.35);
    color: #ffffff;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    letter-spacing: 0.2px;
    transform: scale(1);
    transition:
        transform          0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color   0.3s,
        box-shadow         0.3s;
    z-index: 5;
}
.business-directory-card:hover .btn-cloud-availability {
    transform: scale(1.08);
    background: rgba(255,255,255,0.28);
    box-shadow: 0 12px 36px rgba(0,0,0,0.25);
}
/* La vista previa tiene pointer-events:none a propósito (no se puede
   hacer clic ahí) — eso significa que el :hover de arriba nunca se
   puede disparar, así que el botón se quedaba siempre en su tamaño
   base, más chico que en la tarjeta real. Se deja fijo con el mismo
   tamaño "agrandado" aquí, para que se vea idéntico. */
#profile-card-preview .btn-cloud-availability {
    transform: scale(1.08);
    background: rgba(255,255,255,0.28);
    box-shadow: 0 12px 36px rgba(0,0,0,0.25);
}
.biz-card-info-pane {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.biz-card-info-pane h3 {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.biz-card-info-pane .rating { font-size: 0.9rem; font-weight: 600; color: #fcd34d; }
.biz-card-info-pane .desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
    font-weight: 400;
}

/* ============================================================
   VISTA: PERFIL
   ============================================================ */
.btn-back-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-base);
    margin-bottom: 2rem;
    cursor: pointer;
    transition: opacity 0.3s;
    padding: 0;
}
.btn-back-profile::before { content: "\2190"; } /* flecha izquierda ASCII */
.btn-back-profile:hover { opacity: 0.7; }

.profile-header {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
}
.profile-cover {
    /* Antes tenía una altura fija (250px) con un ancho que se estiraba
       sin límite según la pantalla — eso significa que la proporción
       real casi nunca coincidía con el recorte 3:1 que se hace al
       subir la foto (ancho x alto). Con "aspect-ratio" en vez de una
       altura fija, siempre queda exactamente 3:1 sin importar el
       ancho — igual que el recorte, para que lo que se ajusta sea
       exactamente lo que se ve, en cualquier tamaño de pantalla.
    */
    aspect-ratio: 3 / 1;
    background-size: cover;
    background-position: center;
}
.profile-info-block {
    padding: 0 2.5rem 2.5rem 2.5rem;
    position: relative;
    text-align: center;
}
.profile-circle-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #fff;
    padding: 6px;
    margin: -65px auto 1rem auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.profile-circle-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-titles h1 { font-size: 2.2rem; color: var(--navy-base); font-weight: 600; margin-bottom: 0.3rem; }
.profile-titles .rating { font-size: 1.1rem; color: #d97706; font-weight: bold; margin-bottom: 1rem; }
.profile-titles .desc { font-size: 1.05rem; color: #555; max-width: 650px; margin: 0 auto; line-height: 1.5; }

/* REDES SOCIALES EN PERFIL PARA TODOS LOS NEGOCIOS */
.social-links-profile {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}
.profile-share-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.9rem;
}
.social-links-profile a,
.social-links-profile button,
.profile-share-actions button {
    color: #0284c7; /* Color estilo app */
    background: #f0f9ff;
    padding: 0.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s, color 0.3s;
    border: 2px solid #bae6fd;
    cursor: pointer;
}
.social-links-profile a svg,
.social-links-profile button svg,
.profile-share-actions button svg {
    width: 22px;
    height: 22px;
}
.social-links-profile a:hover,
.social-links-profile button:hover,
.profile-share-actions button:hover {
    transform: translateY(-4px);
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.3);
}

/* --- Pestañas: Mi Cuenta (Citas / Cuenta) --- */
.cuenta-tabs {
    display: inline-flex;
    gap: 0.4rem;
    background: var(--box-light);
    padding: 0.35rem;
    border-radius: 14px;
    margin-bottom: 2.2rem;
}
.cuenta-tab {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.65rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.cuenta-tab svg { flex-shrink: 0; opacity: 0.8; }
.invite-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 2px;
}
.expiry-soon { color: #b45309 !important; font-weight: 700; }
.expiry-expired { color: #ef4444 !important; font-weight: 700; }
.invite-actions { display: flex; gap: 8px; margin-top: 6px; }
.invite-accept-btn, .invite-decline-btn {
    border: none; border-radius: 8px; padding: 6px 14px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer;
}
.invite-accept-btn { background: var(--highlight); color: var(--navy-base); }
.invite-decline-btn { background: #f1f5f9; color: #64748b; }
.cuenta-tab:hover { color: var(--navy-base); }
.cuenta-tab.active {
    background: var(--navy-base);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(10,25,47,0.18);
}
.cuenta-tab.active svg { opacity: 1; color: var(--highlight); }

.cuenta-tab-panel { display: none; animation: cuentaTabFade 0.35s ease; }
.cuenta-tab-panel.active { display: block; }
@keyframes cuentaTabFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .cuenta-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 0.4rem; }
    .cuenta-tab { justify-content: center; padding: 0.65rem 0.5rem; font-size: 0.82rem; text-align: center; }
}

.profile-section { margin-bottom: 3.5rem; }
.section-title {
    font-size: 1.5rem;
    color: var(--navy-base);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.8rem;
}

/* ============================================================
   SOPORTE (Mi Cuenta y Panel de Negocio) — tarjeta con el botón
   real de WhatsApp
   ============================================================ */
.support-section .section-title { border-bottom: none; margin-bottom: 0.6rem; }
.support-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.support-card-logo {
    color: var(--highlight);
    background: var(--navy-base);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
}
.support-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
    background: #25D366;
    text-decoration: none;
}
.support-whatsapp-btn:hover { background: #1ebe5a; }

/* ============================================================
   INFO EXTRA COACH (HORARIOS Y ESPECIALIDADES)
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.info-card {
    background: #ffffff;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.info-card p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.5rem;
}
.info-card p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.tags-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.tag.medal-tag {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: var(--navy-base);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}
.tag.medal-tag svg {
    color: #0ea5e9;
    width: 22px;
    height: 22px;
}
.tag.medal-tag:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
    transform: translateX(5px);
}

/* ============================================================
   RESERVA: FECHAS
   ============================================================ */
.field-label { font-weight: 600; color: #444; margin-bottom: 1rem; font-size: 1rem; }
.prof-select-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mt-label { margin-top: 2rem; }

.days-selector {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}
.days-selector::-webkit-scrollbar { height: 4px; }
.days-selector::-webkit-scrollbar-track { background: transparent; }
.days-selector::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

@keyframes slideInLeftToRight {
    0%   { opacity: 0; transform: translateX(-35px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRightToLeft {
    0%   { opacity: 1; transform: translateX(0); min-width: 75px; margin-right: 1rem; padding: 1rem 0.5rem; }
    100% { opacity: 0; transform: translateX(-35px); min-width: 0; margin-right: 0; padding: 0; border-width: 0; overflow: hidden; }
}

.day-btn {
    min-width: 75px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    position: relative;
    opacity: 0;
    animation: slideInLeftToRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    flex-shrink: 0;
}
.day-btn small { font-size: 1.4rem; font-weight: 700; color: var(--navy-base); }
.day-btn.closed {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    cursor: not-allowed;
    opacity: 0.7;
}
.day-btn.closed small { color: #dc2626; }
.day-btn.closed:hover { background: #fef2f2; box-shadow: none; }
.day-btn:hover { border-color: var(--navy-base); }
.day-btn.active {
    background: var(--navy-base);
    border-color: var(--navy-base);
    color: #fff;
    box-shadow: 0 8px 15px rgba(10,25,47,0.2);
}
.day-btn.active small,
.day-btn.active .calendar-icon { color: #fff; }

.custom-date-wrapper {
    justify-content: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    overflow: hidden;
}
.calendar-icon {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    line-height: 1;
}
.hidden-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.day-btn.dynamic-removing {
    animation: slideOutRightToLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    white-space: nowrap;
}

/* ============================================================
   RESERVA: HORAS
   ============================================================ */
.times-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
}
.time-btn {
    background: #fff;
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.time-btn.available { border-color: #22c55e; color: #15803d; }
.time-btn.available:hover { background: #dcfce7; }
.time-btn.available.active {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 10px rgba(34,197,94,0.3);
}
.time-btn.taken {
    border-color: #ef4444;
    color: #ef4444;
    opacity: 0.55;
    text-decoration: line-through;
    pointer-events: none;
    background: #fef2f2;
}
.prof-select-card.slot-taken,
.table-item.slot-taken {
    border-color: #ef4444 !important;
    opacity: 0.5;
    pointer-events: none;
    background: #fef2f2 !important;
    position: relative;
}
.prof-select-card.slot-taken::after,
.table-item.slot-taken::after {
    content: 'Ocupado a esta hora';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(254, 242, 242, 0.9);
    border-radius: inherit;
    text-align: center;
    padding: 0 6px;
}
.time-btn.action-btn {
    border: 2px dashed #94a3b8;
    color: #64748b;
    font-size: 0.95rem;
}
.time-btn.action-btn:hover {
    background: #f1f5f9;
    border-color: var(--navy-base);
    color: var(--navy-base);
}
.time-btn-hour { display: block; }
.time-btn-cupos-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 0.25rem;
    opacity: 0.85;
}

/* ============================================================
   CONSTRUCTOR: EDITOR DE CUPOS POR HORA ("Arma tu reserva")
   ============================================================ */
.cupos-day-block { margin-bottom: 1.3rem; }
.cupos-day-block:last-child { margin-bottom: 0; }
.cupos-day-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy-base);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.55rem;
}
.cupos-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cupo-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: #fff;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    min-width: 90px;
}
.cupo-chip-active { background: #f0fdf4; }
.cupo-chip-time { font-size: 0.85rem; font-weight: 600; color: #15803d; }
.cupo-stepper { display: inline-flex; align-items: center; gap: 0.4rem; }
.cupo-stepper-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--navy-light);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.cupo-stepper-btn:hover { transform: scale(1.1); background: var(--navy-base); }
.cupo-stepper-value { font-size: 0.85rem; font-weight: 700; color: var(--navy-base); min-width: 14px; text-align: center; }

@keyframes slideUpFade {
    0%   { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes slideDownFade {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(15px); }
}
.time-btn.time-in {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.time-btn.time-out {
    animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}

/* ============================================================
   RESERVA: SERVICIOS DE SALUD & MEDICINA
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1rem;
}
.service-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    aspect-ratio: 1;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.service-card .icon {
    width: 34px;
    height: 34px;
    color: #94a3b8;
    transition: color 0.3s, transform 0.3s;
}
.service-card .icon svg { width: 100%; height: 100%; display: block; }
.prof-select-card {
    aspect-ratio: auto;
    width: 100%;
    height: 210px;
    justify-content: flex-start;
    padding-top: 1.3rem;
}
.prof-select-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy-base) center/cover no-repeat;
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.prof-select-avatar svg { width: 60%; height: 60%; }
.service-card.active .prof-select-avatar { box-shadow: 0 0 0 3px #38bdf8; transform: scale(1.15); }
.service-card .name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.service-card .service-price { font-size: 0.85rem; font-weight: 700; color: #94a3b8; margin-top: 0.2rem; }
.service-card:hover {
    transform: translateY(-5px);
    border-color: #38bdf8;
    box-shadow: 0 10px 20px rgba(56,189,248,0.15);
}
.service-card:hover .icon { color: #38bdf8; }
.service-card.active {
    background: #f0f9ff;
    border-color: #0ea5e9;
    box-shadow: 0 8px 15px rgba(14,165,233,0.2);
    transform: translateY(-3px);
}
.service-card.active .icon { color: #0284c7; transform: scale(1.08); }
.service-card.active .name { color: #0284c7; }
.service-card.action-card {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
}
.service-card.action-card .icon { color: #94a3b8; }
.service-card.action-card:hover { border-color: var(--navy-base); }
.service-card.action-card:hover .icon { color: var(--navy-base); }
.service-card.action-card .name { color: #64748b; }

.service-card.service-in {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.service-card.service-out {
    animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}

/* ============================================================
   RESERVA: PLANO DE MESAS 3D
   ============================================================ */
.restaurant-floor-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}
.floor-plan-3d {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 3rem 1.5rem;
    padding: 3rem 2rem;
    background: #f1f5f9;
    border-radius: 24px;
    transform: perspective(1000px) rotateX(40deg) scale(0.9);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), inset 0 5px 15px rgba(255,255,255,0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
    transform-origin: center top;
}
.floor-plan-3d:hover { transform: perspective(1000px) rotateX(25deg) scale(1); }

.floor-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.floor-arrow {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-base);
    font-size: 1.2rem;
    cursor: pointer;
    transition:
        transform    0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   0.2s,
        border-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.floor-arrow:hover:not(:disabled) {
    transform: scale(1.15);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: var(--navy-base);
}
.floor-arrow:active:not(:disabled) { transform: scale(0.95); }
.floor-arrow:disabled { opacity: 0.3; cursor: not-allowed; background: #f8fafc; }
.floor-label {
    font-weight: 700;
    color: var(--navy-base);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-align: center;
    min-width: 100px;
}

.table-item {
    position: relative;
    width: 75px;
    height: 75px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    padding: 0.25rem;
}
.table-item.available {
    background: #ffffff;
    border: 4px solid #22c55e;
    color: #15803d;
    box-shadow:
        0 -38px 0 -24px #86efac,
        0  38px 0 -24px #86efac,
       -38px 0 0 -24px #86efac,
        38px 0 0 -24px #86efac,
        0 10px 15px rgba(0,0,0,0.1);
}
.table-item.available:hover { transform: translateY(-8px); }
.table-item.available.active {
    background: #22c55e;
    color: white;
    transform: translateY(-5px);
    box-shadow:
        0 -38px 0 -24px #22c55e,
        0  38px 0 -24px #22c55e,
       -38px 0 0 -24px #22c55e,
        38px 0 0 -24px #22c55e,
        0 15px 25px rgba(34,197,94,0.4);
}
.table-item.taken {
    background: #fef2f2;
    border: 4px solid #ef4444;
    color: #dc2626;
    opacity: 0.6;
    pointer-events: none;
    box-shadow:
        0 -38px 0 -24px #fca5a5,
        0  38px 0 -24px #fca5a5,
       -38px 0 0 -24px #fca5a5,
        38px 0 0 -24px #fca5a5;
}

/* ============================================================
   RESERVA: CONTADOR DE PERSONAS
   ============================================================ */
.guest-counter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 2rem;
}
.guest-counter {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.guest-counter button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--navy-light);
    color: white;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition:
        transform          0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color   0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guest-counter button:hover { transform: scale(1.1); background: var(--navy-base); }
#guest-count-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy-base);
    min-width: 28px;
    text-align: center;
}

/* ============================================================
   RESERVA: ÁREA DE CONFIRMACIÓN
   ============================================================ */
.inline-confirm-area {
    display: none;
    margin-top: 2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.inline-confirm-area.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.booking-summary-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.booking-summary-inline span { color: #64748b; font-size: 0.95rem; }
.booking-summary-inline strong { color: var(--navy-base); font-size: 1.2rem; }

.btn-confirm-booking {
    background: linear-gradient(135deg, var(--navy-base) 0%, var(--navy-light) 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(10,25,47,0.2);
    transition:
        transform    0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   0.3s,
        background   0.3s;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-secondary-pill {
    background: #f1f5f9;
    color: var(--navy-base);
    border: none;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary-pill:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}
.btn-confirm-booking:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(10,25,47,0.3);
    background: linear-gradient(135deg, var(--navy-hover) 0%, var(--navy-base) 100%);
}

/* ============================================================
   GALERÍA DE FOTOS
   ============================================================ */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
    margin-top: 15px;
}

.cb-prof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
@media (max-width: 560px) {
    .cb-prof-grid { grid-template-columns: 1fr; }
}
.cb-prof-card {
    position: relative;
    background: var(--box-light);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    height: 100px;
}
.cb-prof-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy-base) center/cover no-repeat;
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cb-prof-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.cb-prof-info strong { font-size: 0.92rem; color: var(--navy-base); overflow-wrap: break-word; word-break: break-word; }
.cb-prof-info span {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}
.cb-prof-card .cb-remove-btn { position: absolute; top: 0.5rem; right: 0.5rem; }
.cb-photo-preview-wrap { position: relative; display: block; width: 100%; }
.cb-photo-preview-wrap .cb-remove-photo-btn { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; }
.cb-dimension-hint { display: block; font-size: 0.78rem; color: #94a3b8; margin: 0.2rem 0 0.5rem; }
.cb-card-image-preview {
    width: 160px;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--box-light);
    border: 1px solid #e5e7eb;
    margin-top: 0.8rem;
}

/* ============================================================
   MODAL DE RECORTE DE FOTOS — estilo WhatsApp (zoom + mover antes de
   subir), reutilizado para logo, banner, galería, y profesionales.
   ============================================================ */
/* ============================================================
   VISOR DE GALERÍA EN GRANDE — al hacer clic en cualquier foto de la
   galería (negocio, vista previa, o admin), se abre agrandada.
   ============================================================ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
    /* Empieza invisible y ligeramente encogido — display se queda en
       "flex" siempre; lo que se anima es la opacidad, para que la
       transición sí se vea (display no se puede animar). */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.gallery-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: default;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}
.gallery-lightbox.open img {
    transform: scale(1);
}
.gallery-lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,0.3); }
#profile-gallery-grid .gallery-img { cursor: zoom-in; }

.photo-crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.75);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.photo-crop-modal-inner {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.photo-crop-modal-inner h3 { color: var(--navy-base); margin-bottom: 1rem; font-size: 1.1rem; }
.photo-crop-instructions { color: #64748b; font-size: 0.85rem; margin: 0.8rem 0 0; line-height: 1.4; }
.photo-crop-canvas-wrap {
    width: 100%;
    height: 320px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
}
.photo-crop-canvas-wrap img { display: block; max-width: 100%; }
.photo-crop-zoom-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.2rem 0;
    color: #94a3b8;
}
.photo-crop-zoom-row input[type="range"] { flex: 1; accent-color: var(--navy-base); }
.photo-crop-actions { display: flex; justify-content: flex-end; gap: 0.8rem; }

/* La forma circular de recorte (para logo y fotos de profesional) — se
   activa agregando esta clase al contenedor mientras ese tipo de foto
   está en proceso de recorte. */
.photo-crop-canvas-wrap.crop-circular .cropper-view-box,
.photo-crop-canvas-wrap.crop-circular .cropper-face {
    border-radius: 50%;
}

/* Marco de recorte mucho más claro visualmente — un borde grueso y
   sólido (no punteado) alrededor de exactamente lo que se va a
   guardar, y sin las manijas de cambiar tamaño (el marco es fijo). */
.photo-crop-canvas-wrap .cropper-view-box {
    outline: 3px solid #64FFDA;
    outline-color: #64FFDA;
}
.photo-crop-canvas-wrap .cropper-line,
.photo-crop-canvas-wrap .cropper-point {
    display: none !important;
}
/* Oscurece con más fuerza la parte que NO se va a guardar, para que el
   contraste con el marco sea imposible de confundir. */
.photo-crop-canvas-wrap .cropper-modal {
    background-color: #000;
    opacity: 0.65;
}
.cb-char-counter { font-size: 0.72rem; color: #94a3b8; text-align: right; margin-top: -0.3rem; }
.gallery-img {
    height: 150px;
    width: 100%;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* ============================================================
   MAPA Y RESEÑAS
   ============================================================ */
.map-directions-links { display: flex; gap: 0.7rem; margin-top: 0.9rem; flex-wrap: wrap; }
.map-link-pill { display: inline-flex !important; align-items: center; gap: 0.45rem; }
.map-link-icon { flex-shrink: 0; }

.map-placeholder-box {
    width: 100%;
    height: 280px;
    background: #e5e7eb;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6b7280;
    font-weight: 600;
    border: 2px dashed #cbd5e1;
}
.profile-reviews-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.profile-reviews-header .section-title { margin-bottom: 0; }
.profile-reviews-nav { display: flex; align-items: center; gap: 0.7rem; }
.profile-reviews-nav span { font-size: 0.85rem; color: #64748b; font-weight: 600; min-width: 34px; text-align: center; }
.profile-reviews-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--navy-base);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.profile-reviews-arrow:hover:not(:disabled) { background: var(--box-light); transform: scale(1.05); }
.profile-reviews-arrow:disabled { opacity: 0.35; cursor: not-allowed; }
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.reviews-grid.slide-out-to-left { transform: translateX(-24px); opacity: 0; }
.reviews-grid.slide-out-to-right { transform: translateX(24px); opacity: 0; }
.review-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f1f1;
}
.rev-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
    font-size: 1.05rem;
}
/* Avatar del cliente: si más adelante hay foto de perfil real, agregar
   la clase "has-photo" + background-image inline y el logo se oculta solo. */
.rev-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy-base);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.rev-avatar.has-photo svg { display: none; }
.rev-header-info { display: flex; flex-direction: column; gap: 0.15rem; }
.rev-header-info strong { font-size: 0.95rem; }
.rev-stars { color: #fcd34d; font-size: 0.8rem; font-weight: 600; }
.review-card p { font-style: italic; color: #555; line-height: 1.5; font-size: 0.95rem; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10,25,47,0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.7);
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity   0.4s;
}
.lightbox.show .lightbox-content { transform: scale(1); opacity: 1; }
#lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    object-fit: contain;
    display: block;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
}
.lightbox-close:hover { transform: scale(1.2); }

/* ============================================================
   ACCIONES PÚBLICAS (COACH)
   ============================================================ */
.public-actions-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}
.btn-confirm-booking:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}
.public-actions-wrapper .btn-confirm-booking {
    width: 100%;
    max-width: 350px;
    padding: 1.2rem;
    font-size: 1.15rem;
}
.btn-simulate-student {
    background: transparent;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-simulate-student:hover {
    border-color: var(--navy-base);
    color: var(--navy-base);
    background: #f8fafc;
}

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
    background-color: #f4f4f4;
    width: 62%;
    margin-left: 38%;
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-sizing: border-box;
    gap: 2rem;
}
.logo-area { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon-dark { display: flex; align-items: center; color: var(--highlight); }
.footer-brand { font-size: 2rem; font-weight: 800; color: #000; }
.footer-credit { margin-top: 0.8rem; font-size: 0.85rem; color: #666; }
.footer-credit span { color: #666; }

/* Logo + nombre de la app (extremo izquierdo) */
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.6rem;
}
.footer-logo-big { color: var(--highlight); display: block; }
.footer-brand-big {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: #000 !important;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

/* Grupo derecho: contacto + legal, empujado al extremo derecho */
.footer-right-group {
    display: flex;
    align-items: flex-start;
    gap: 5rem;
    margin-left: auto;
}

.footer-col { display: flex; flex-direction: column; gap: 0.8rem; }

.footer-contact-col { align-items: flex-start; text-align: left; }
.footer-legal-col { align-items: flex-start; text-align: left; }

.footer-col h4 { font-size: 1rem; color: #666; margin-bottom: 0.5rem; font-weight: 500; }
.footer-col a { text-decoration: none; color: #000; font-size: 0.95rem; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 0.6; }

/* ============================================================
   AUTENTICACIÓN: LOGIN / REGISTRO
   ============================================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem 2.8rem;
    box-shadow: 0 20px 60px rgba(10,25,47,0.09);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    animation: authCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes authCardIn {
    0%   { opacity: 0; transform: translateY(30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Pestañas Login / Registro --- */
.auth-tabs {
    position: relative;
    display: flex;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 2.4rem;
}
.auth-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.85rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.35s;
}
.auth-tab-btn.active { color: #ffffff; }
.auth-tab-indicator {
    position: absolute;
    top: 5px; left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: linear-gradient(135deg, var(--navy-base) 0%, var(--navy-light) 100%);
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.auth-card[data-auth-mode="register"] .auth-tab-indicator {
    transform: translateX(100%);
}

/* --- Paneles de formulario --- */
.auth-panel {
    display: none;
    flex-direction: column;
    gap: 1.4rem;
}
.auth-card[data-auth-mode="login"] .auth-panel-login,
.auth-card[data-auth-mode="register"] .auth-panel-register {
    display: flex;
    animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.6rem; }
.cb-service-price-wrapper { display: flex; align-items: stretch; gap: 0; padding: 0; }
.cb-currency-toggle {
    flex-shrink: 0;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-right: 1px solid #e2e8f0;
    background: transparent;
    color: var(--navy-base);
    font-weight: 700;
    font-size: 1rem;
    padding: 0;
    transform: translateX(-15px);
    cursor: pointer;
    transition: color 0.2s;
}
.cb-currency-toggle:hover { color: var(--highlight); }
.cb-service-price-wrapper input { padding: 0.9rem 1rem 0.9rem 0.6rem; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-weight: 600; color: #444; font-size: 0.9rem; }

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 1rem;
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.input-wrapper:focus-within {
    border-color: var(--navy-base);
    box-shadow: 0 0 0 4px rgba(10,25,47,0.08);
}
.input-wrapper .input-icon { display: flex; color: #94a3b8; flex-shrink: 0; }
.input-wrapper .input-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0.45rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.input-wrapper .input-icon-btn:hover { color: var(--navy-base); background: var(--box-light); }
.cb-photo-add-row { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; }
.cb-photo-add-row .btn-confirm-booking { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) { .cb-photo-add-row { flex-direction: column; align-items: stretch; } }
.input-wrapper input,
.input-wrapper textarea {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    padding: 0.9rem 0;
    font-size: 0.98rem;
    color: var(--text-dark);
    background: transparent;
    font-family: inherit;
}
.input-wrapper input { text-overflow: ellipsis; }
.input-wrapper select {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.6rem 0.9rem 0;
    font-size: 0.98rem;
    color: var(--text-dark);
    font-family: inherit;
    background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right center/16px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.directory-sidebar-search {
    margin-bottom: 1.2rem;
    background: var(--navy-light);
    border-color: transparent;
}
.directory-sidebar-search:focus-within { border-color: rgba(255,255,255,0.5); box-shadow: none; }
.directory-sidebar-search .input-icon { color: rgba(255,255,255,0.55); }
.directory-sidebar-search input { color: #fff; }
.directory-sidebar-search input::placeholder { color: rgba(255,255,255,0.5); }
.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.2s;
}
.toggle-password:hover { color: var(--navy-base); }
.toggle-password .eye-closed { display: none; }
.toggle-password.showing .eye-open { display: none; }
.toggle-password.showing .eye-closed { display: flex; }

/* --- Checkbox personalizado --- */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}
.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-custom {
    width: 19px;
    height: 19px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--navy-base);
    border-color: var(--navy-base);
}
.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}
.terms-checkbox { align-items: flex-start; }
.terms-checkbox .checkbox-custom { margin-top: 2px; }
.terms-checkbox a { color: var(--navy-base); font-weight: 600; text-decoration: underline; }

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.link-muted { color: #64748b; font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.link-muted:hover { color: var(--navy-base); }

/* --- Selector de tipo de cuenta --- */
.account-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.account-type-option {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.3s;
}
.account-type-option .rect-icon { color: #94a3b8; transition: color 0.3s; }
.account-type-option .acc-type-title { font-weight: 700; color: var(--navy-base); font-size: 0.98rem; }
.account-type-option .acc-type-desc { font-size: 0.76rem; color: #94a3b8; line-height: 1.35; }
.account-type-option:hover { border-color: #94a3b8; transform: translateY(-2px); }
.account-type-option.active {
    border-color: var(--navy-base);
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(10,25,47,0.08);
    transform: translateY(-2px);
}
.account-type-option.active .rect-icon { color: var(--navy-base); }

.fields-group {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Botón de envío con estado de carga --- */
.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 0.4rem 0;
}
.cf-turnstile.shake {
    animation: shake-error 0.4s;
}
@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.auth-submit-btn {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.4rem;
}
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}
.auth-submit-btn.loading { opacity: 0.85; pointer-events: none; }
.auth-submit-btn.loading .btn-spinner { display: inline-block; }
.btn-confirm-booking.loading { opacity: 0.85; pointer-events: none; }
.btn-confirm-booking.loading .btn-spinner { display: inline-block; }
.btn-confirm-booking .btn-spinner { margin-left: 0.5rem; }
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-switch-text {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 0.2rem;
}
.link-strong {
    background: none;
    border: none;
    color: var(--navy-base);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.88rem;
    padding: 0;
}

/* --- Overlay de éxito animado --- */
.auth-success-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    border-radius: 24px;
    text-align: center;
    padding: 2rem;
}
.auth-success-overlay.show { opacity: 1; pointer-events: all; transform: scale(1); }
.success-check-circle { width: 90px; height: 90px; }
.success-check-icon { width: 100%; height: 100%; }
.success-check-circle-bg {
    stroke: #22c55e;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
}
.auth-success-overlay.show .success-check-circle-bg { animation: circleDraw 0.5s ease forwards; }
.success-check-mark {
    stroke: #22c55e;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}
.auth-success-overlay.show .success-check-mark { animation: checkDraw 0.35s 0.4s ease forwards; }
@keyframes circleDraw { to { stroke-dashoffset: 0; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
.auth-success-overlay p { font-weight: 600; color: var(--navy-base); font-size: 1.05rem; }
.email-sent-icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
}
.email-sent-icon-circle.pop-in { animation: emailIconPop 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes emailIconPop {
    0% { transform: scale(0.4); opacity: 0; }
    65% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}
.email-sent-desc { font-weight: 400 !important; color: #64748b; font-size: 0.9rem; max-width: 280px; line-height: 1.5; }
#email-sent-close-btn { margin-top: 0.5rem; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1000px) {
    .app-container { flex-direction: column; }
    .sidebar {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        height: auto;
        position: sticky;
        top: 0;
        padding: 1.5rem 2rem;
        overflow: visible;
    }
    .sidebar-content { overflow: visible; }
    .content-area { margin-left: 0; width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
    .inline-confirm-area.show { flex-direction: column; gap: 1.5rem; text-align: center; }
    .hero-image-placeholder { padding: 2.5rem 1.25rem 4rem; grid-template-columns: 1fr; min-height: auto; }
    .hero-demo-card { width: min(380px, 100%); }
    .section,
    .directory-container,
    .profile-container,
    .cuenta-container { padding: 3rem 1.5rem; }
    .restaurant-floor-wrapper { flex-direction: column; }
    .floor-plan-3d.custom-layout { width: 100%; }
    .floor-controls { flex-direction: row; }
    .floor-plan-3d {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        transform: none;
        padding: 1.5rem;
    }
    .floor-plan-3d:hover { transform: none; }
    .mobile-only { display: flex; }
    .sidebar-content {
        display: flex;
        position: fixed;
        inset: 0;
        top: 76px; /* debajo del header, que se queda fijo y visible */
        z-index: 500;
        background: var(--navy-base);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1.5rem 2rem 3rem;
        -webkit-overflow-scrolling: touch;
        /* display:none/flex no se puede animar — en su lugar, se usa
           visibility+opacity+transform, con un pequeño truco: la
           visibilidad cambia sin transición al ABRIR (aparece de
           una), pero con demora al CERRAR (espera a que termine la
           animación antes de desaparecer del todo). */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-16px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
        pointer-events: none;
    }
    .sidebar-content.show {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
        pointer-events: auto;
    }
    .stats-grid { grid-template-columns: 1fr; }
    .explain-grid { grid-template-columns: 1fr; }
    .footer-right-group { flex-direction: column; align-items: center; gap: 2rem; width: 100%; margin-left: 0; }
    .main-footer { flex-direction: column; align-items: center; gap: 2.5rem; padding: 2rem; width: 100%; margin-left: 0; }
    .footer-contact-col,
    .footer-legal-col { align-items: center; text-align: center; }
    .footer-left { align-items: center; text-align: center; gap: 1.5rem; }
    .footer-brand-big { font-size: 2.5rem; }
    .guest-counter-wrapper { flex-direction: column; gap: 1rem; text-align: center; }
    .auth-container { padding: 2rem 1rem; min-height: auto; }
    .auth-card { padding: 2.2rem 1.6rem; }
}

@media (max-width: 600px) {
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .directory-grid { grid-template-columns: 1fr; }
    .sidebar-hero h1 { font-size: 2rem; }
    .profile-titles h1 { font-size: 1.6rem; }
    .btn-confirm-booking { width: 100%; text-align: center; white-space: normal; }
    .account-type-toggle { grid-template-columns: 1fr; }
    .profile-circle-container { width: 92px; height: 92px; margin: -46px auto 1rem auto; }
}

/* ============================================================
   BOTÓN "CONTINUAR CON GOOGLE" Y DIVISOR
   ============================================================ */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-google:hover { border-color: #cbd5e1; box-shadow: 0 6px 16px rgba(10,25,47,0.08); transform: translateY(-1px); }
.btn-google:active { transform: translateY(0); }
.btn-google.loading { opacity: 0.7; pointer-events: none; }

.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    gap: 0.8rem;
    margin: -0.4rem 0 0.2rem;
}
.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ============================================================
   INDICADOR DE FORTALEZA DE CONTRASEÑA
   ============================================================ */
.pwd-strength { margin-top: 0.3rem; }
.pwd-strength-bars {
    display: flex;
    gap: 5px;
    margin-bottom: 0.45rem;
}
.pwd-bar {
    flex: 1;
    height: 5px;
    border-radius: 4px;
    background: #e5e7eb;
    transition: background-color 0.3s ease;
}
.pwd-strength[data-level="1"] .pwd-bar[data-bar="1"] { background: #ef4444; }
.pwd-strength[data-level="2"] .pwd-bar[data-bar="1"],
.pwd-strength[data-level="2"] .pwd-bar[data-bar="2"] { background: #f59e0b; }
.pwd-strength[data-level="3"] .pwd-bar[data-bar="1"],
.pwd-strength[data-level="3"] .pwd-bar[data-bar="2"],
.pwd-strength[data-level="3"] .pwd-bar[data-bar="3"] { background: #3b82f6; }
.pwd-strength[data-level="4"] .pwd-bar { background: #22c55e; }
.pwd-strength-label {
    font-size: 0.76rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}
.pwd-strength[data-level="1"] .pwd-strength-label { color: #ef4444; }
.pwd-strength[data-level="2"] .pwd-strength-label { color: #f59e0b; }
.pwd-strength[data-level="3"] .pwd-strength-label { color: #3b82f6; }
.pwd-strength[data-level="4"] .pwd-strength-label { color: #22c55e; }

/* ============================================================
   VERIFICACIÓN "NO SOY UN ROBOT"
   ============================================================ */
.bot-check-wrapper {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.25s, background-color 0.25s;
    text-align: left;
}
.bot-check-wrapper:hover { border-color: #cbd5e1; }
.bot-check-box {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: background-color 0.25s, border-color 0.25s;
}
.bot-check-icon-loading { display: none; animation: authSpin 0.8s linear infinite; color: #94a3b8; }
.bot-check-icon-done { display: none; }
.bot-check-wrapper.verifying .bot-check-icon-loading { display: block; }
.bot-check-wrapper.verified .bot-check-box { background: #22c55e; border-color: #22c55e; }
.bot-check-wrapper.verified .bot-check-icon-done { display: block; color: #ffffff; }
.bot-check-wrapper.shake { animation: botShake 0.4s; border-color: #ef4444; }
@keyframes botShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.bot-check-text { font-weight: 600; font-size: 0.9rem; color: #333; flex: 1; }
.bot-check-wrapper.verifying .bot-check-text::after { content: attr(data-verifying-text); }
.bot-check-brand { font-size: 0.68rem; color: #b0b8c4; letter-spacing: 0.3px; }

/* ============================================================
   VISTA: LEGAL (TÉRMINOS Y CONDICIONES / PRIVACIDAD)
   ============================================================ */
.legal-container {
    padding: 4rem 4rem 3rem 4rem;
    min-height: 100vh;
    max-width: 780px;
}
.legal-tabs {
    position: relative;
    display: flex;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 2.6rem;
    max-width: 640px;
}
.legal-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.35s;
}
.legal-tab-btn.active { color: #ffffff; }
.legal-tab-indicator {
    position: absolute;
    top: 5px; left: 5px;
    width: calc((100% - 10px) / 3);
    height: calc(100% - 10px);
    background: linear-gradient(135deg, var(--navy-base) 0%, var(--navy-light) 100%);
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.legal-tabs[data-active="privacidad"] .legal-tab-indicator { transform: translateX(100%); }
.legal-tabs[data-active="preguntas"] .legal-tab-indicator { transform: translateX(200%); }

.legal-panel { animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.legal-panel h2 { font-size: 1.9rem; color: var(--navy-base); margin-bottom: 0.4rem; }
.legal-updated { color: #94a3b8; font-size: 0.85rem; margin-bottom: 2.2rem; }
.legal-panel h3 { font-size: 1.08rem; color: var(--navy-base); margin: 1.8rem 0 0.6rem; }
.legal-panel p { color: #4b5563; line-height: 1.7; font-size: 0.95rem; }

/* Acordeón de Preguntas Frecuentes — el <details> nativo abre y cierra
   de golpe por su cuenta; este bloque anima el alto y la opacidad de
   la respuesta suavemente (el JS que abre/cierra está en script.js,
   buscá "faq-item" ahí). */
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    flex-shrink: 0;
    width: 10px; height: 10px;
    border-right: 2px solid var(--navy-base, #0A192F);
    border-bottom: 2px solid var(--navy-base, #0A192F);
    transform: rotate(45deg);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-answer { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease; }
.faq-item[open] .faq-answer { opacity: 1; }
.legal-panel a { color: var(--navy-base); font-weight: 600; text-decoration: underline; }

@media (max-width: 1000px) {
    .legal-container { padding: 3rem 1.5rem; max-width: 100%; }
}

/* ============================================================
   TELÉFONO CON CÓDIGO DE PAÍS
   ============================================================ */
.phone-input-group {
    display: flex;
    gap: 0.6rem;
}
.phone-code-wrapper {
    flex: 0 0 112px;
    padding: 0 0.5rem;
}
.phone-code-wrapper select {
    border: none;
    outline: none;
    background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right center/14px;
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 0;
    font-size: 0.92rem;
    color: var(--text-dark);
    cursor: pointer;
}
.phone-number-wrapper { flex: 1; min-width: 0; }

@media (max-width: 420px) {
    .phone-input-group { flex-wrap: wrap; }
    .phone-code-wrapper { flex: 0 0 100%; }
}

/* ============================================================
   VISTA: CUENTA (PERFIL DE USUARIO)
   ============================================================ */
.account-greeting {
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}
.account-greeting strong { color: var(--navy-base); }

.account-datos-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.account-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--navy-base);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Panel rápido: Mis Citas --- */
.appt-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 1.8rem 0 0.9rem;
}
.appt-group-title:first-of-type { margin-top: 0; }

.appt-list { display: flex; flex-direction: column; gap: 1rem; }
.appt-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.3rem;
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    box-shadow: 0 2px 8px rgba(10,25,47,0.04);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    overflow: hidden;
}
.appt-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--highlight);
}
/* La franja también cambia de color según el estado de la cita —
   verde confirmada, rojo cancelada, ámbar pendiente, etc. */
.appt-card.appt-stripe-confirmed::before { background: #22c55e; }
.appt-card.appt-stripe-completed::before { background: #0ea5e9; }
.appt-card.appt-stripe-cancelled::before { background: #ef4444; }
.appt-card.appt-stripe-noshow::before { background: #94a3b8; }
.appt-card.appt-stripe-pending::before { background: #f59e0b; }
.appt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(10,25,47,0.1);
    border-color: #e0e6ee;
}
.appt-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f1f5f9;
}
.appt-cancel-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s, color 0.2s;
}
.appt-cancel-btn:hover { background: #dc2626; color: #ffffff; transform: scale(1.08) rotate(90deg); }
.appt-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--navy-base);
    background: linear-gradient(160deg, var(--navy-base), var(--navy-light));
    color: white;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    min-width: 88px;
    text-align: center;
    line-height: 1.35;
    flex-shrink: 0;
}
.appt-day { font-size: 0.75rem; text-transform: capitalize; opacity: 0.8; letter-spacing: 0.2px; }
.appt-time { font-size: 1rem; font-weight: 700; color: var(--highlight); }
.appt-card-info { display: flex; flex-direction: column; gap: 0.3rem; flex-grow: 1; min-width: 0; }
.appt-biz-link { cursor: pointer; }
.appt-biz-link:hover { color: var(--navy-hover); text-decoration: underline; }
.cita-client-link { cursor: pointer; }
.cita-client-link:hover { color: var(--navy-hover); text-decoration: underline; }
.appt-card-info strong {
    font-size: 1.02rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.appt-card-info > span:not(.appt-status-badge) { font-size: 0.88rem; color: #64748b; }
.appt-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
    background: #ffffff;
    border: 1px solid #e2e5ea;
    color: #16a34a;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-top: 0.15rem;
}
.appt-status-badge svg { flex-shrink: 0; }
.appt-status-badge.appt-status-completed { background: #ffffff; border: 1px solid #e2e5ea; color: #0369a1; }
.appt-status-badge.appt-status-cancelled { background: #ffffff; border: 1px solid #e2e5ea; color: #dc2626; }
.appt-card-past { opacity: 0.75; }
.appt-empty {
    display: none;
    color: #94a3b8;
    font-size: 0.9rem;
    background: var(--box-light);
    border: 1px dashed #dbe2ea;
    border-radius: 14px;
    padding: 1.4rem;
    text-align: center;
    margin-top: 0.4rem;
}

@media (max-width: 560px) {
    .appt-card { flex-wrap: wrap; padding: 1rem; gap: 0.9rem; }
    .appt-card-info { order: 3; flex-basis: 100%; }
}

/* --- Nota de extensibilidad en Mis Datos --- */
.account-extra-note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--box-light);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 1.2rem;
}

.notif-pref-row { display: flex; gap: 1.8rem; flex-wrap: wrap; margin-top: 0.3rem; }

/* --- Mini toast de confirmación --- */
.mini-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    max-width: 380px;
    background: var(--navy-base);
    color: white;
    padding: 0.9rem 1.4rem;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 999;
}
.mini-toast.show { transform: translateY(0); opacity: 1; }
.mini-toast::before { content: "✓"; color: var(--highlight); font-weight: 700; }
.mini-toast.toast-error::before { content: "✕"; color: #ef4444; }
.mini-toast.toast-error { border-left: 3px solid #ef4444; }

@media (max-width: 900px) {
    .account-datos-header { flex-wrap: wrap; }
    .mini-toast {
        right: 16px;
        left: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        max-width: none;
        font-size: 0.85rem;
        padding: 0.8rem 1.1rem;
    }
}
@media (max-width: 480px) {
    .mini-toast {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        padding: 0.65rem 0.9rem;
        font-size: 0.78rem;
        gap: 0.4rem;
        border-radius: 8px;
    }
}

/* ============================================================
   VISTA: PANEL DE NEGOCIO (PERFIL DE NEGOCIO - FASE 2)
   ============================================================ */
.panelneg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
@media (max-width: 560px) {
    .panelneg-form-row { grid-template-columns: 1fr; }
    .panelneg-form-row .form-group,
    #cb-prof-name, #cb-prof-photo { width: 100%; }
    .form-group + .btn-confirm-booking,
    .panelneg-form-row + .btn-confirm-booking { margin-top: 0.6rem; }
}

/* --- Método de pago --- */
.panelneg-card-list { margin-bottom: 1.8rem; }
.panelneg-payment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--navy-base), var(--navy-light));
    color: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    font-size: 0.92rem;
}
.panelneg-card-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--highlight);
}
.panelneg-card-number { flex: 1; letter-spacing: 1px; }
.panelneg-card-exp { opacity: 0.75; }
.panelneg-empty-hint {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.8rem;
}

/* --- Administración de Negocio (grid grande) --- */
.activity-filter-row { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.activity-filter-row select {
    padding: 0.6rem 2rem 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid #e2e5ea;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.7rem center/16px;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
}
.activity-filter-row input[type="date"] {
    padding: 0.6rem 1rem;
    border-radius: 50px;
    border: 1px solid #e2e5ea;
    background: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-dark);
    cursor: pointer;
}

.panelneg-admin-intro {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}
.panelneg-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}
.panelneg-admin-card {
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(10,25,47,0.04);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.panelneg-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(10,25,47,0.1);
    border-color: #e0e6ee;
}
.panelneg-admin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--box-light);
    color: var(--navy-base);
    margin-bottom: 1rem;
}
.panelneg-admin-card h4 {
    font-size: 1.02rem;
    color: var(--navy-base);
    margin-bottom: 0.4rem;
}
.panelneg-admin-card p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}
.panelneg-admin-note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--box-light);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 1.8rem;
}

/* --- Acceso de administradores --- */
.panelneg-admins-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}
.panelneg-admin-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
}
.panelneg-admin-info { display: flex; flex-direction: column; gap: 0.15rem; }
.panelneg-admin-info strong { font-size: 0.95rem; color: var(--text-dark); }
.panelneg-admin-info span { font-size: 0.8rem; color: #94a3b8; }
.panelneg-invite-form { border-top: 1px solid #edf1f6; padding-top: 1.8rem; }

@media (max-width: 900px) {
    .panelneg-admin-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================================
   FASE 3: CONSTRUCTOR DE PERFIL PÚBLICO (ACCORDION DE BLOQUES)
   ============================================================ */
.cblock-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.cblock {
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.cblock:hover { border-color: #e0e6ee; }
.cblock-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: none;
    border: none;
    padding: 1.1rem 1.3rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.cblock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--box-light);
    color: var(--navy-base);
    flex-shrink: 0;
}
.cblock-title {
    flex: 1 1 70px;
    min-width: 70px;
    overflow-wrap: break-word;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--navy-base);
}
.cblock-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.cblock-badge.required { background: #fef3c7; color: #b45309; }
.cblock-badge.auto { background: #dbeafe; color: #1d4ed8; }
@media (max-width: 480px) {
    .cblock-header { gap: 0.6rem; padding: 1rem 1rem; }
    .cblock-icon { width: 32px; height: 32px; }
    .cblock-badge { font-size: 0.6rem; padding: 0.2rem 0.45rem; letter-spacing: 0.2px; }
}
.cblock-chevron {
    color: #94a3b8;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
    flex-shrink: 0;
}
.cblock.cblock-open .cblock-chevron { transform: rotate(180deg); }
.cblock-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 1.3rem;
    padding-right: 1.3rem;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 0px solid #f1f5f9;
    transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease, padding-top 0.45s cubic-bezier(0.16,1,0.3,1), padding-bottom 0.45s cubic-bezier(0.16,1,0.3,1);
}
.cblock.cblock-open .cblock-body {
    opacity: 1;
    padding-top: 1.3rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid #f1f5f9;
}
.cblock.cblock-disabled { opacity: 0.55; }
.cblock.cblock-disabled .cblock-body { pointer-events: none; }

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.25s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--navy-base); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.toggle-switch-sm { width: 34px; height: 20px; }
.toggle-switch-sm .toggle-slider::before { width: 14px; height: 14px; left: 3px; top: 3px; }
.toggle-switch-sm input:checked + .toggle-slider::before { transform: translateX(14px); }

.cb-field-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}
.cb-field-row-header label:first-child { margin: 0; }

/* Banner y logo preview */
.cb-banner-preview {
    width: 100%;
    aspect-ratio: 3 / 1;
    height: auto;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 1px solid #e5e7eb;
}
.cb-logo-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-top: 0.8rem;
}

/* Nombre y descripción: mini preview en vivo */
.cb-hint { color: #64748b; font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.5; }
.cb-hint-example {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-weight: 500;
}
.cb-live-preview {
    background: var(--box-light);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}
.cb-live-preview strong { display: block; color: var(--navy-base); font-size: 1.05rem; margin-bottom: 0.3rem; }
.cb-live-preview p { color: #64748b; font-size: 0.9rem; line-height: 1.5; }

/* Tabla de horarios */
.hours-table { display: flex; flex-direction: column; gap: 0.7rem; }
.hours-duration-custom-group {
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.4rem;
}
.hours-duration-unit {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.hours-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.hours-row .checkbox-wrapper { flex: 0 0 130px; }
.hours-row input[type="time"] {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-family: inherit;
}
.hours-sep { color: #94a3b8; }

/* Filtro de categorías de íconos */
.icon-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}
.icon-filter-btn {
    background: var(--box-light);
    border: none;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.icon-filter-btn:hover { background: #e2e8f0; }
.icon-filter-btn.active { background: var(--navy-base); color: #fff; }

/* Grid de íconos para servicios (reutiliza .service-card) */
.cb-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.2rem;
}
.cb-icon-grid .service-card { aspect-ratio: auto; padding: 1rem 0.6rem; }
.cb-icon-grid .service-card .name { font-size: 0.78rem; }

/* Tag de servicio agregado con botón remover */
.tag.cb-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}
.tag.cb-service-tag .cb-remove-btn {
    background: none;
    border: none;
    color: #0284c7;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

/* Galería del constructor con botón de eliminar */
.cb-gallery-item { position: relative; height: 160px; }
.cb-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(10,25,47,0.75);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cb-remove-btn:hover { background: #dc2626; }

/* ============================================================
   PASARELA DE PAGO LATERAL: PUBLICAR NEGOCIO
   ============================================================ */
.payment-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 999;
    display: flex;
    justify-content: flex-end;
}
.payment-drawer-overlay.open { opacity: 1; pointer-events: all; }

.fixed-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.fixed-success-overlay.show { opacity: 1; pointer-events: all; }
.fixed-success-overlay.show .success-check-circle-bg { animation: circleDraw 0.5s ease forwards; }
.fixed-success-overlay.show .success-check-mark { animation: checkDraw 0.35s 0.4s ease forwards; }
.fixed-success-overlay .success-check-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-width: 320px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.35s ease;
}
.fixed-success-overlay.show .success-check-card { transform: scale(1); }
.fixed-success-overlay p { font-weight: 600; color: var(--navy-base); font-size: 1.05rem; margin: 0; }

.coach-renew-date-wrapper { position: relative; display: inline-flex; }
.coach-renew-date-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: none;
    pointer-events: none;
}

.role-sim-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--navy-base);
    color: #fff;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(10,25,47,0.35);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 500;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: min(90vw, 420px);
}
.unsaved-banner-stacked {
    flex-direction: column;
    align-items: flex-start;
    max-width: min(90vw, 300px);
}
.unsaved-banner-stacked .unsaved-banner-btns {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.3rem;
}
.unsaved-banner-stacked .unsaved-banner-btns button { width: 100%; margin: 0; }
@media (max-width: 480px) {
    .role-sim-banner {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        max-width: none;
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
    }
    .unsaved-banner-stacked { max-width: none; }
}

.review-star-picker {
    font-size: 2rem;
    color: #e2e8f0;
    letter-spacing: 0.2rem;
    cursor: pointer;
    user-select: none;
}
.review-star-picker span { transition: color 0.15s; }
.review-star-picker span.filled { color: #f59e0b; }

.custom-dialog-card {
    max-width: 320px;
    width: 90vw;
    gap: 1rem;
}
.custom-dialog-actions {
    display: flex;
    gap: 0.6rem;
    width: 100%;
}
.custom-dialog-actions button {
    flex: 1;
    margin: 0;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}
#custom-prompt-input { text-align: center; }

/* Spinner de "Eliminando..." — mismo círculo (90px) y misma técnica
   SVG que el check de éxito de arriba, solo que en vez de "dibujarse"
   una sola vez, gira sin parar mientras se está procesando. */
.admin-delete-spinner-icon { animation: adminSpinnerRotate 1s linear infinite; transform-origin: center; }
.admin-delete-spinner-track { stroke: #e2e8f0; stroke-width: 4; }
.admin-delete-spinner-arc {
    stroke: var(--navy-base);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 113 151;
}
@keyframes adminSpinnerRotate { to { transform: rotate(360deg); } }

.fixed-success-overlay .client-profile-card {
    position: relative;
    padding-top: 2.8rem;
    max-width: 340px;
    width: 90vw;
}
.client-profile-card #client-profile-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    background: #f1f5f9;
    color: var(--navy-base);
}
.client-profile-card #client-profile-close:hover { background: #e2e8f0; }
.client-visits-badge {
    background: var(--highlight);
    color: var(--navy-base);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
}
.client-profile-filters {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}
.client-profile-filters select {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.4rem 1.6rem 0.4rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--navy-base);
}
.client-profile-bookings {
    width: 100%;
    max-height: 160px;
    overflow-y: auto;
    text-align: left;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.6rem;
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.client-profile-booking-row {
    font-size: 0.8rem;
    color: #475569;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.payment-drawer {
    width: 460px;
    max-width: 92vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -18px 0 50px rgba(10, 25, 47, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.payment-drawer-overlay.open .payment-drawer { transform: translateX(0); }

.payment-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.8rem 1.8rem 1.4rem;
    background: linear-gradient(135deg, var(--navy-base) 0%, var(--navy-light) 100%);
    color: #fff;
    flex-shrink: 0;
}
.payment-drawer-header h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.payment-drawer-header p { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin: 0; }
.payment-drawer-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.payment-drawer-close:hover { background: rgba(255,255,255,0.28); }

.payment-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.pd-summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--box-light);
    border-radius: 14px;
    padding: 1rem 1.2rem;
}
.pd-summary-card img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pd-summary-card div { display: flex; flex-direction: column; gap: 0.15rem; }
.pd-summary-card strong { font-size: 1rem; color: var(--navy-base); }
.pd-summary-card span { font-size: 0.8rem; color: #64748b; }

.pd-free-update-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1.2rem;
}
.pd-free-update-banner svg { flex-shrink: 0; }
.pd-rereview-banner { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.pd-cost-breakdown h4,
.pd-payment-method h4 {
    font-size: 1rem;
    color: var(--navy-base);
    margin-bottom: 0.6rem;
}
.pd-cost-copy { font-size: 0.85rem; color: #64748b; line-height: 1.55; margin-bottom: 1rem; }
.pd-cost-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.pd-cost-list li,
.pd-cost-row {
    font-size: 0.87rem;
    color: #475569;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #e5e7eb;
}
.pd-cost-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.pd-cost-label { flex: 1; }
.pd-cost-row-main span:last-child,
.pd-cost-amount { font-weight: 700; color: var(--navy-base); white-space: nowrap; }
.pd-cost-detail-toggle {
    background: none;
    border: none;
    padding: 0.15rem;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.pd-cost-detail-toggle .pd-cost-arrow { transition: transform 0.35s cubic-bezier(0.16,1,0.3,1); }
.pd-cost-detail-toggle.open .pd-cost-arrow { transform: rotate(90deg); color: var(--navy-base); }
.pd-cost-arrow-spacer { display: inline-block; width: 14px; flex-shrink: 0; }
.pd-cost-row-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    font-size: 0.8rem;
    color: #64748b;
    background: var(--box-light);
    border-radius: 8px;
    line-height: 1.5;
    transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease, margin-top 0.45s cubic-bezier(0.16,1,0.3,1), padding-top 0.45s cubic-bezier(0.16,1,0.3,1), padding-bottom 0.45s cubic-bezier(0.16,1,0.3,1);
}
.pd-cost-row-detail.open {
    opacity: 1;
    margin-top: 0.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}
.pd-cost-item-paid span:first-child,
.pd-cost-item-paid .pd-cost-label { text-decoration: line-through; color: #94a3b8; }
.pd-cost-item-paid span:last-child,
.pd-cost-item-paid .pd-cost-amount { text-decoration: line-through; color: #94a3b8; font-weight: 600; }

/* ============================================================
   Nota: las tarjetas de Actividad ahora reutilizan las mismas clases
   que el feed general de Admin (admin-card, admin-activity-*), para
   que se vean idénticas en todas partes — ver renderActivityCards()
   en script.js.
   ============================================================ */

/* Paginación por números de página (en vez de "Cargar más" o scroll
   infinito) */
.pagination-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}
.pagination-row button {
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border-radius: 8px;
    border: 1px solid #e2e5ea;
    background: #fff;
    color: var(--navy-base);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pagination-row button:hover:not(:disabled) { background: var(--box-light); }
.pagination-row button.active { background: var(--navy-base); color: #fff; border-color: var(--navy-base); }
.pagination-row button:disabled { opacity: 0.4; cursor: default; }


.billing-status-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(135deg, var(--navy-base) 0%, var(--navy-hover) 100%);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
    color: #fff;
}
.billing-status-header { display: flex; }
.billing-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(100, 255, 218, 0.15);
    color: var(--highlight);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}
.billing-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.billing-status-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}
.billing-status-item-next {
    background: rgba(100, 255, 218, 0.12);
    border: 1px solid rgba(100, 255, 218, 0.35);
}
.billing-status-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.billing-status-value { font-size: 1.15rem; font-weight: 700; color: #fff; }
.billing-status-value-highlight { color: var(--highlight); }
.billing-status-sub { font-size: 0.78rem; color: rgba(255,255,255,0.65); }
.billing-cancel-link {
    margin-top: 0.5rem;
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s;
}
.billing-cancel-link:hover { color: #ffffff; }
.billing-status-badge-pending { background: rgba(251, 191, 36, 0.2) !important; color: #fbbf24 !important; }
.billing-status-card-pending {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: var(--box-light);
    color: var(--navy-base);
}
.billing-status-card-pending .billing-status-badge-pending { background: #fef3c7 !important; color: #b45309 !important; }
.billing-pending-copy { margin: 0; font-size: 0.88rem; color: #475569; line-height: 1.5; }
@media (max-width: 720px) {
    .billing-status-grid { grid-template-columns: 1fr; }
    .billing-status-card-pending { flex-direction: column; align-items: flex-start; }
}
.btn-cancel-plan {
    align-self: flex-start;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fca5a5;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-cancel-plan:hover { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.7); }

.billing-subtitle { font-size: 1rem; color: var(--navy-base); margin: 1.4rem 0 0.4rem; }
.billing-invoice-history { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.6rem; }
.billing-invoice-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 12px;
    padding: 0.9rem 1rem;
}
.billing-invoice-main { flex: 1; }
.billing-invoice-summary {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.billing-invoice-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f766e;
    background: #ccfbf1;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
}
.billing-invoice-amount { margin-left: auto; font-weight: 700; color: var(--navy-base); }
.billing-invoice-detail { margin-top: 0.6rem; }
.billing-invoice-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.2rem 0;
}
.billing-invoice-line:not(:last-child) { border-bottom: 1px dashed #e2e8f0; }

/* ============================================================
   RESEÑAS DENTRO DEL PANEL DE NEGOCIO (solo lectura)
   ============================================================ */
.panelneg-reviews-grid { grid-template-columns: 1fr 1fr; margin-top: 0.6rem; }
.panelneg-review-card .rev-header { flex-wrap: wrap; }
.panelneg-review-date { margin-left: auto; font-size: 0.75rem; color: #94a3b8; font-weight: 500; }
.panelneg-review-actions { margin-top: 1rem; display: flex; justify-content: flex-end; }
.btn-report-review {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem !important;
    font-size: 0.8rem !important;
    color: #b91c1c;
    background: #fef2f2;
}
.btn-report-review:hover { background: #fee2e2; }
.panelneg-review-reported-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
}
.panelneg-review-locked-badge { color: #64748b; background: var(--box-light); }
@media (max-width: 640px) {
    .panelneg-reviews-grid { grid-template-columns: 1fr; }
    .billing-invoice-summary { gap: 0.5rem; }
    .billing-invoice-amount { margin-left: 0; }
}
.pd-already-paid-note {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
}
.pd-cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--box-light);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy-base);
}
.pd-cost-total strong { font-size: 1.3rem; color: #0f766e; }

.pd-saved-card { margin-bottom: 1rem; }
.pd-card-visual {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, var(--navy-base) 55%, var(--navy-light) 100%);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    color: #fff;
    box-shadow: 0 14px 30px rgba(10,25,47,0.28);
    overflow: hidden;
}
.pd-card-visual::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(100,255,218,0.25), transparent 70%);
}
.pd-card-chip {
    display: block;
    width: 36px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    margin-bottom: 1.6rem;
}
.pd-card-number { display: block; font-size: 1.1rem; letter-spacing: 2px; font-weight: 600; margin-bottom: 1.2rem; }
.pd-card-bottom { display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.85); }

.pd-new-card-form { margin-top: 0.4rem; animation: cuentaTabFade 0.3s ease; }

.pd-secure-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 1rem;
}

.pd-card-brands {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.pd-brand-chip {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    color: #fff;
}
.pd-brand-visa { background: #1a1f71; }
.pd-brand-mc { background: linear-gradient(90deg, #eb001b, #f79e1b); }
.pd-brand-amex { background: #2e77bc; }

.pd-coupon-row { display: flex; gap: 0.6rem; margin-bottom: 0.4rem; }
.pd-coupon-row .input-wrapper { flex: 1; }
.pd-coupon-row .btn-secondary-pill { padding: 0.6rem 1.1rem; font-size: 0.82rem; white-space: nowrap; }
.pd-coupon-applied-msg { font-size: 0.82rem; color: #15803d; font-weight: 600; margin: 0 0 1rem; }
.pd-coupon-applied-msg.error { color: #dc2626; }

.pd-terms-row {
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.5;
    padding-top: 0.4rem;
    border-top: 1px solid #eef1f6;
}
.pd-terms-row a { color: var(--navy-base); font-weight: 700; text-decoration: underline; }

.payment-drawer-footer {
    display: flex;
    gap: 0.8rem;
    padding: 1.4rem 1.8rem;
    border-top: 1px solid #eef1f6;
    flex-shrink: 0;
}
.payment-drawer-footer .rect-card {
    flex: 1;
    max-width: none;
    margin: 0;
    justify-content: center;
    background: var(--box-light);
    color: var(--navy-base);
}
.payment-drawer-footer .btn-confirm-booking {
    flex: 2;
    margin: 0;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
}

@media (max-width: 560px) {
    .payment-drawer { width: 100vw; }
    .hours-row .checkbox-wrapper { flex-basis: 100%; }
}

/* ============================================================
   SISTEMA DE ROLES Y PERMISOS
   ============================================================ */
.cb-role-simulator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin: 1.6rem 0 2rem;
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
    flex-wrap: wrap;
}
.cb-role-simulator select {
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 0.4rem 1.8rem 0.4rem 0.7rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: #92400e;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392400e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center/16px;
    cursor: pointer;
}

.role-lock-banner {
    display: none;
    align-items: center;
    gap: 0.6rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    margin-bottom: 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.role-locked-content { position: relative; }
.role-locked-content .role-lock-banner { display: flex; }
.role-locked-content > *:not(.role-lock-banner) {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.25);
}

.panelneg-admin-row { flex-wrap: wrap; }
.panelneg-admin-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}
.panelneg-admin-role-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 1.6rem 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text-dark);
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center/14px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.admin-role-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 1.8rem 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-dark);
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center/16px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.admin-role-select:disabled { cursor: not-allowed; opacity: 0.6; }
.panelneg-transfer-btn,
.panelneg-remove-admin-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.panelneg-transfer-btn { background: #fef3c7; }
.panelneg-transfer-btn:hover { background: #fde68a; }
.panelneg-remove-admin-btn { background: #fee2e2; color: #dc2626; }
.panelneg-remove-admin-btn:hover { background: #fecaca; }

/* ============================================================
   VALIDACIÓN DE CAMPOS REQUERIDOS (VISTA PREVIA)
   ============================================================ */
.input-wrapper.field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220,38,38,0.12) !important;
    animation: fieldErrorShake 0.4s ease;
}
@keyframes fieldErrorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.cb-section-error {
    outline: 2px solid #dc2626 !important;
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(220,38,38,0.12) !important;
    border-radius: 12px;
    animation: fieldErrorShake 0.4s ease;
}

/* ============================================================
   PANEL: CITAS
   ============================================================ */
.citas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}
.citas-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.citas-sort-wrapper { padding: 0 0.9rem; min-width: 180px; }
.citas-sort-wrapper select { padding: 0.7rem 1.6rem 0.7rem 0; width: 100%; }

.citas-section-label {
    font-size: 0.95rem;
    color: var(--navy-base);
    margin: 1.6rem 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #edf1f6;
}
.citas-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.6rem 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #edf1f6;
}
.citas-month-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy-base);
}
.citas-month-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--box-light);
    color: var(--navy-base);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.citas-month-arrow:hover { background: #e2e8f0; }
.citas-month-arrow:disabled { opacity: 0.4; cursor: not-allowed; }
.citas-list { display: flex; flex-direction: column; gap: 0.8rem; }
.citas-empty-hint { color: #94a3b8; font-size: 0.85rem; padding: 0.6rem 0; }

.cita-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.3rem;
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    box-shadow: 0 2px 8px rgba(10,25,47,0.04);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    overflow: hidden;
}
.cita-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--highlight);
}
.cita-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(10,25,47,0.1);
    border-color: #e0e6ee;
}
.cita-card.cita-hoy::before { background: #0f766e; }
/* La franja y el medallón de fecha reflejan el estado real de la cita
   — mismos colores que ya usa "Mis Citas", para que se sientan como
   parte del mismo diseño. */
.cita-card.cita-status-confirmada::before { background: #22c55e; }
.cita-card.cita-status-confirmada .cita-date-badge { background: linear-gradient(160deg, #16a34a, #22c55e); }
.cita-card.cita-status-completada::before { background: #0ea5e9; }
.cita-card.cita-status-completada .cita-date-badge { background: linear-gradient(160deg, #0369a1, #0ea5e9); }
.cita-card.cita-status-cancelada::before { background: #ef4444; }
.cita-card.cita-status-cancelada .cita-date-badge { background: linear-gradient(160deg, #b91c1c, #ef4444); }
.cita-card.cita-status-noasistio::before { background: #94a3b8; }
.cita-card.cita-status-noasistio .cita-date-badge { background: linear-gradient(160deg, #475569, #94a3b8); }
.cita-card.cita-status-pendiente::before { background: #f59e0b; }
.cita-card.cita-status-pendiente .cita-date-badge { background: linear-gradient(160deg, #b45309, #f59e0b); }
.cita-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy-base), var(--navy-light));
    color: white;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    min-width: 66px;
    text-align: center;
    line-height: 1.35;
    flex-shrink: 0;
}
.cita-date-badge span:first-child { font-size: 1.1rem; font-weight: 700; }
.cita-date-badge span:last-child { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.2px; opacity: 0.8; }
.cita-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.cita-info strong { font-size: 1.02rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cita-client-email { font-size: 0.8rem; color: #94a3b8; overflow-wrap: break-word; word-break: break-word; }
.cita-info span { font-size: 0.88rem; color: #64748b; overflow-wrap: break-word; word-break: break-word; }
.cita-card-meta { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.cita-time-chip {
    background: var(--box-light);
    color: var(--navy-base);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    flex-shrink: 0;
}
@media (max-width: 560px) {
    .cita-card { flex-wrap: wrap; align-items: flex-start; gap: 0.8rem; padding: 1rem 1.1rem; }
    .cita-info { flex-basis: 140px; }
    .cita-card-meta { flex-basis: 100%; justify-content: flex-end; }
}
.cita-delete-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s, color 0.2s;
}
.cita-delete-btn:hover { background: #dc2626; color: #fff; transform: scale(1.08) rotate(90deg); }

.nueva-cita-form {
    background: var(--box-light);
    border-radius: 14px;
    padding: 1.4rem;
    margin-bottom: 1.8rem;
    animation: cuentaTabFade 0.3s ease;
}
.nueva-cita-form-actions { display: flex; gap: 0.8rem; margin-top: 0.6rem; }
.nueva-cita-form-actions .rect-card { max-width: 160px; margin: 0; }
.nueva-cita-form-actions .btn-confirm-booking { margin: 0; }

@media (max-width: 700px) {
    .citas-header { flex-direction: column; }
    .citas-header-actions { width: 100%; }
    .citas-sort-wrapper { flex: 1; }
}

/* Horas ocupadas al crear una cita manual */
.cita-ocupadas-wrapper {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.2rem;
}
.cita-ocupadas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.cita-ocupada-chip {
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}
.cita-ocupada-chip.is-conflict {
    background: #dc2626;
    color: #fff;
}

.cita-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--box-light);
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-top: 0.3rem;
    width: fit-content;
}
.cita-status-badge svg { flex-shrink: 0; }
/* Selector compuesto (.cita-status-badge.cita-status-xxx) a propósito:
   así el color de cada estado siempre gana sobre el color gris base,
   sin depender del orden en que aparezcan las reglas en este archivo. */
.cita-status-badge.cita-status-pendiente { background: #ffffff; border: 1px solid #e2e5ea; color: #b45309; }
.cita-status-badge.cita-status-confirmada { background: #ffffff; border: 1px solid #e2e5ea; color: #16a34a; }
.cita-status-badge.cita-status-cancelada { background: #ffffff; border: 1px solid #e2e5ea; color: #dc2626; }
.cita-status-badge.cita-status-completada { background: #ffffff; border: 1px solid #e2e5ea; color: #0369a1; }
.cita-status-badge.cita-status-noasistio { background: #ffffff; border: 1px solid #e2e5ea; color: #64748b; }
.cita-confirm-btn {
    background: none; border: none; color: #15803d; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
}
.cita-confirm-btn:hover { background: #dcfce7; }
.cita-attend-btn, .cita-noattend-btn {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
}
.cita-attend-btn { color: #15803d; }
.cita-attend-btn:hover { background: #dcfce7; }
.cita-noattend-btn { color: #dc2626; }
.cita-noattend-btn:hover { background: #fee2e2; }

/* Cuadrito verde para citas ya confirmadas y próximas, en "Mis Citas" */
.appt-card-date-confirmed {
    background: linear-gradient(160deg, #15803d, #22c55e) !important;
}
.appt-card-date-confirmed .appt-time { color: #dcfce7; }
.appt-card-date-completed {
    background: linear-gradient(160deg, #0369a1, #0ea5e9) !important;
}
.appt-card-date-completed .appt-time { color: #e0f2fe; }
.appt-card-date-cancelled {
    background: linear-gradient(160deg, #b91c1c, #ef4444) !important;
}
.appt-card-date-cancelled .appt-time { color: #fee2e2; }
.appt-card-date-noshow {
    background: linear-gradient(160deg, #475569, #64748b) !important;
}
.appt-card-date-noshow .appt-time { color: #e2e8f0; }
.appt-status-badge.appt-status-noshow { background: #ffffff; border: 1px solid #e2e5ea; color: #64748b; }
.appt-card-date-pending {
    background: linear-gradient(160deg, #b45309, #f59e0b) !important;
}
.appt-card-date-pending .appt-time { color: #fef3c7; }
.appt-status-badge.appt-status-pending { background: #ffffff; border: 1px solid #e2e5ea; color: #b45309; }

.appt-share-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.appt-share-btn:hover { background: var(--box-light); color: var(--navy-base); }

/* Botones de icono (exportar / imprimir) */
.citas-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--box-light);
    color: var(--navy-base);
    border: none;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.citas-icon-btn:hover { background: #e2e8f0; }

/* Estadísticas de citas */
.citas-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.citas-stat-card {
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 2px 8px rgba(10,25,47,0.04);
}
.citas-stat-card .citas-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.citas-stat-card .citas-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy-base);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.citas-stat-card .citas-stat-delta {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.citas-stat-delta.up { background: #dcfce7; color: #16a34a; }
.citas-stat-delta.down { background: #fee2e2; color: #dc2626; }
.citas-stat-delta.flat { background: var(--box-light); color: #64748b; }
.citas-stat-card .citas-stat-sub {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.4rem;
}
.citas-stat-card .citas-stat-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-base);
}


/* ============================================================
   IMPRESIÓN (solo Citas)
   ============================================================ */
@media print {
    .sidebar, .mobile-menu-btn, .citas-header-actions, .cita-delete-btn,
    .nueva-cita-form, .panelneg-tabs, .cb-role-simulator, .role-lock-banner,
    .citas-month-controls button, .mini-toast, .payment-drawer-overlay {
        display: none !important;
    }
    .panelneg-tab-panel { display: block !important; }
    body { background: #fff !important; }
    .cita-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* Barra de vista previa (constructor -> perfil público) */
.constructor-preview-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    flex-wrap: wrap;
    background: var(--navy-base);
    color: #fff;
    padding: 1rem 1.4rem;
    border-radius: 14px;
    margin-bottom: 2rem;
    position: sticky;
    top: 10px;
    z-index: 1200;
    box-shadow: 0 10px 24px rgba(10,25,47,0.25);
}
@media (max-width: 1000px) {
    .constructor-preview-bar { top: 120px; }
}
.constructor-preview-bar span { font-size: 0.9rem; font-weight: 600; }
.constructor-preview-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-left: auto; }
.constructor-preview-actions .btn-confirm-booking {
    margin: 0;
    padding: 0.75rem 1.6rem;
    width: 190px;
    flex: 0 0 190px;
    text-align: center;
    background: var(--highlight);
    color: var(--navy-base);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.constructor-preview-actions .btn-confirm-booking:hover { filter: brightness(0.95); }
.constructor-preview-actions .rect-card {
    max-width: none;
    margin: 0;
    padding: 0.75rem 1.6rem;
    width: 190px;
    flex: 0 0 190px;
    border-radius: 50px;
    text-align: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
}

/* Más espacio para la galería dentro del constructor */
#cb-gallery-grid {
    gap: 22px;
    margin-top: 20px;
}
.cb-upload-divider {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 1.1rem 0;
    position: relative;
}
.cb-upload-divider::before,
.cb-upload-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: #e5e7eb;
}
.cb-upload-divider::before { left: 0; }
.cb-upload-divider::after { right: 0; }
.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--box-light);
    color: var(--navy-base);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.8rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.file-upload-btn:hover { background: #e2e8f0; border-color: var(--navy-base); }

/* ============================================================
   FASE 3 (v2): PESTAÑAS MI NEGOCIO / ADMINISTRACIÓN
   ============================================================ */
.coach-students-tab-panel { display: none; }
.coach-students-tab-panel.active { display: block; }
.coach-students-tabs { margin-bottom: 1rem; }

.panelneg-tabs {
    display: inline-flex;
    gap: 0.4rem;
    background: var(--box-light);
    padding: 0.35rem;
    border-radius: 14px;
    margin-bottom: 2.2rem;
    flex-wrap: wrap;
}
.panelneg-tab {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.65rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.panelneg-tab svg { flex-shrink: 0; opacity: 0.8; }
.panelneg-tab:hover { color: var(--navy-base); }
.panelneg-tab.active {
    background: var(--navy-base);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(10,25,47,0.18);
}
.panelneg-tab.active svg { opacity: 1; color: var(--highlight); }
.panelneg-tab-panel { display: none; animation: cuentaTabFade 0.35s ease; }
.panelneg-tab-panel.active { display: block; }

.coach-tab {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.65rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.coach-tab:hover { color: var(--navy-base); }
.coach-tab.active {
    background: var(--navy-base);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(10,25,47,0.18);
}
.coach-students-tabs {
    display: inline-flex;
    gap: 0.4rem;
    background: var(--box-light);
    padding: 0.35rem;
    border-radius: 14px;
}

@media (max-width: 640px) {
    .panelneg-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding: 0.6rem; gap: 0.5rem; }
    .panelneg-tab { justify-content: center; padding: 0.65rem 0.6rem; font-size: 0.86rem; }
}

/* ============================================================
   BLOQUE: MESAS Y DISTRIBUCIÓN DEL LOCAL (CONSTRUCTOR)
   ============================================================ */
.mesas-floor-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mesas-floor-actions .rect-card {
    max-width: 220px;
    margin: 0;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}
.mesas-floor-actions-top {
    flex-direction: row;
    flex-wrap: wrap;
}
.mesas-floor-actions-top .rect-card { max-width: none; }

/* Barra unificada: pestañas de piso + agregar/eliminar piso, todo en un mismo lugar */
.mesas-floor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--box-light);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.4rem;
}
.mesas-floor-bar .mesas-floor-tabs { margin: 0; flex: 1 1 auto; }
.mesas-floor-bar .mesas-floor-actions-top { flex: 0 0 auto; display: flex; gap: 0.6rem; }
.mesas-floor-bar .mesas-floor-actions-top .btn-secondary-pill {
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .mesas-floor-bar { flex-direction: column; align-items: stretch; }
    .mesas-floor-bar .mesas-floor-actions-top { flex-direction: column; align-items: stretch; }
    .mesas-floor-bar .mesas-floor-actions-top .btn-secondary-pill {
        width: 100%;
        white-space: normal;
        padding: 0.7rem 0.9rem;
    }
}

/* Grid de íconos de mobiliario (reutiliza .cb-icon-grid / .service-card) */
.mesa-icon-grid {
    max-height: 360px;
    margin-bottom: 1.4rem;
}

.mesas-add-form-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.6rem;
}
#mesa-seats-group.mesa-seats-hidden { display: none; }
@media (max-width: 720px) {
    .mesas-add-form-row { grid-template-columns: 1fr; }
}

/* En móvil el lienzo de mesas es mucho más angosto, pero las mesas
   seguían midiendo lo mismo en píxeles que en computadora — se veían
   amontonadas/pegadas unas con otras. Se achican de forma proporcional
   solo en pantallas chicas, para que la misma distribución respire. */
@media (max-width: 600px) {
    .mesa-item { width: 48px; height: 48px; font-size: 0.58rem; }
    .mesa-item.mesa-type-barra { min-width: 78px; height: 32px; padding: 0 0.5rem; }
    .mesa-item.mesa-type-marker { min-width: 46px; height: 40px; font-size: 0.54rem; padding: 0 0.4rem; }
    .mesa-item.mesa-type-chair { width: 40px; height: 40px; font-size: 0.5rem; }
    .mesa-chair-svg { width: 20px; height: 20px; }
    .mesa-chair-name { font-size: 0.48rem; }
    .mesa-item.mesa-shape-cuadrada { width: 42px; height: 42px; }
    .mesa-item.mesa-shape-rectangular { width: 84px; height: 44px; }
    .mesa-item.mesa-shape-rectangularGrande { width: 106px; height: 48px; }
    .mesa-item.mesa-shape-ovalada { width: 92px; height: 46px; }
    .mesa-item .mesa-actions { top: -7px; right: -7px; gap: 2px; }
    .mesa-item .mesa-rename,
    .mesa-item .mesa-color-btn,
    .mesa-item .mesa-rotate,
    .mesa-item .mesa-remove { width: 14px; height: 14px; font-size: 0.52rem; }
    .mesa-item .mesa-resize-handle { width: 15px; height: 15px; right: -7px; bottom: -7px; font-size: 0.55rem; }
}

.mesas-floor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 1.2rem;
}
.mesas-floor-tab-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--box-light);
    border-radius: 999px;
    padding: 0.2rem;
}
.mesas-floor-tab-group.active { background: var(--navy-base); }
.mesas-floor-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 0.9rem 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
}
.mesas-floor-tab-group.active .mesas-floor-tab { color: #fff; }
.mesas-floor-rename {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem 0.4rem 0.2rem;
    line-height: 1;
}
.mesas-floor-tab-group.active .mesas-floor-rename { color: rgba(255,255,255,0.7); }
.mesas-floor-rename:hover { color: var(--highlight); }
.mesas-canvas {
    position: relative;
    width: 100%;
    height: 420px;
    background:
        linear-gradient(90deg, #eef2f7 1px, transparent 1px),
        linear-gradient(180deg, #eef2f7 1px, transparent 1px),
        #fafbfc;
    background-size: 30px 30px;
    border: 2px solid #dbe2ea;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 8px #ffffff, inset 0 0 0 9px #dbe2ea, 0 10px 30px rgba(10,25,47,0.06);
}
.mesas-canvas::before {
    content: "PLANO DE PISO";
    position: absolute;
    bottom: 10px;
    right: 16px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #cbd5e1;
    pointer-events: none;
}
.mesa-item {
    position: absolute;
    width: 70px;
    height: 70px;
    background: #ffffff;
    border: 4px solid #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #15803d;
    cursor: grab;
    box-shadow:
        0 -34px 0 -22px #86efac,
        0  34px 0 -22px #86efac,
       -34px 0 0 -22px #86efac,
        34px 0 0 -22px #86efac,
        0 8px 14px rgba(0,0,0,0.12);
    user-select: none;
    touch-action: none;
    transform: translate(-50%, -50%);
}
.mesa-item:active { cursor: grabbing; }
.mesa-item.mesa-type-barra {
    width: auto;
    min-width: 110px;
    height: 44px;
    border-radius: 14px;
    background: #f0f9ff;
    border: 3px solid #0284c7;
    color: #0284c7;
    box-shadow: 0 8px 14px rgba(2,132,199,0.15);
    padding: 0 0.8rem;
}
.mesa-item .mesa-label { line-height: 1.25; text-align: center; }
.mesa-item .mesa-seats { display: block; font-size: 0.6rem; opacity: 0.8; font-weight: 600; }
.mesa-item.mesa-type-marker {
    width: auto;
    min-width: 66px;
    height: 56px;
    border-radius: 12px;
    background: #fefce8;
    border: 3px solid #ca8a04;
    color: #854d0e;
    box-shadow: 0 8px 14px rgba(202,138,4,0.15);
    padding: 0 0.6rem;
    font-size: 0.62rem;
}
/* Tipos adicionales: escalera, ascensor, ventana */
.mesa-item.mesa-marker-escalera {
    background: #f3e8ff;
    border-color: #9333ea;
    color: #6b21a8;
    box-shadow: 0 8px 14px rgba(147,51,234,0.15);
}
.mesa-item.mesa-marker-ascensor {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #3730a3;
    box-shadow: 0 8px 14px rgba(79,70,229,0.15);
}
.mesa-item.mesa-marker-ventana {
    background: repeating-linear-gradient(135deg, #e0f2fe, #e0f2fe 6px, #f0f9ff 6px, #f0f9ff 12px);
    border: 3px dashed #0ea5e9;
    color: #0369a1;
    box-shadow: 0 8px 14px rgba(14,165,233,0.15);
    border-radius: 8px;
}
.mesa-item.mesa-marker-salida-emergencia {
    background: #16a34a;
    border: 2px solid #15803d;
    color: #ffffff;
    box-shadow: 0 6px 10px rgba(22,163,74,0.3);
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    width: 58px;
    height: 26px;
    font-size: 0.5rem;
    line-height: 1.1;
    padding: 0 0.2rem;
}
.mesa-item.mesa-marker-salida-emergencia .mesa-label { line-height: 1.1; }
/* Sillas: se muestra el mismo ícono SVG del selector, agrandado, sobre una placa simple */
.mesa-item.mesa-type-chair {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    box-shadow: 0 8px 14px rgba(0,0,0,0.12);
    font-size: 0.56rem;
    flex-direction: column;
    gap: 2px;
}
.mesa-item.mesa-type-chair .mesa-label,
.floor-plan-3d.custom-layout .table-item.table-item-chair span.mesa-chair-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.1;
}
.mesa-chair-svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}
.mesa-chair-name {
    font-size: 0.56rem;
    font-weight: 700;
    text-align: center;
}
.mesa-item.mesa-marker-silla-barbero {
    background: #fff1f2;
    border: 3px solid #e11d48;
    color: #9f1239;
}
.mesa-item.mesa-marker-silla-belleza {
    background: #fdf4ff;
    border: 3px solid #c026d3;
    color: #86198f;
}

/* Estilos/formas de mesa seleccionables */
.mesa-item.mesa-shape-redonda { border-radius: 50%; }
.mesa-item.mesa-shape-cuadrada {
    border-radius: 14px;
    width: 60px;
    height: 60px;
}
.mesa-item.mesa-shape-rectangular {
    border-radius: 16px;
    width: 118px;
    height: 62px;
}
.mesa-item.mesa-shape-rectangularGrande {
    border-radius: 16px;
    width: 150px;
    height: 66px;
}
.mesa-item.mesa-shape-ovalada {
    border-radius: 50%;
    width: 132px;
    height: 64px;
}
/* Mesa alta / cocktail: tablero angosto sobre pedestal central con aro reposapiés, para leerse como mesa "de pie" */
.mesa-item.mesa-shape-alta {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 35% 30%, #fffbea 0%, #fde68a 55%, #f2b90c 100%);
    border: 3px solid #b45309;
    color: #78350f;
    box-shadow:
        0 16px 0 -13px #92400e,
        0 26px 0 -15px #78350f,
        0 8px 14px rgba(180,83,9,0.2);
}
.mesa-item.mesa-shape-alta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 6px;
    height: 22px;
    background: linear-gradient(#92400e, #78350f);
    transform: translateX(-50%);
    border-radius: 0 0 2px 2px;
    pointer-events: none;
}
.mesa-item.mesa-shape-alta::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 18px);
    width: 26px;
    height: 8px;
    border: 3px solid #94a3b8;
    border-radius: 50%;
    background: transparent;
    transform: translateX(-50%);
    box-shadow: 0 2px 3px rgba(0,0,0,0.15);
    pointer-events: none;
}
/* Mesa alta rectangular: tablero rectangular angosto sobre pedestal central y base rectangular tipo bar */
.mesa-item.mesa-shape-altaRectangular {
    border-radius: 10px;
    width: 96px;
    height: 34px;
    background: radial-gradient(circle at 30% 30%, #fffbea 0%, #fde68a 55%, #f2b90c 100%);
    border: 3px solid #b45309;
    color: #78350f;
    box-shadow: 0 8px 14px rgba(180,83,9,0.2);
}
.mesa-item.mesa-shape-altaRectangular::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 6px;
    height: 20px;
    background: linear-gradient(#92400e, #78350f);
    transform: translateX(-50%);
    pointer-events: none;
}
.mesa-item.mesa-shape-altaRectangular::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 16px);
    width: 46px;
    height: 8px;
    background: linear-gradient(#78350f, #92400e);
    border-radius: 4px;
    transform: translateX(-50%);
    box-shadow: 0 2px 3px rgba(0,0,0,0.15);
    pointer-events: none;
}
.mesa-item.mesa-shape-rectangular .mesa-seats,
.mesa-item.mesa-shape-rectangularGrande .mesa-seats,
.mesa-item.mesa-shape-ovalada .mesa-seats { display: inline; margin-left: 4px; }

.mesa-item .mesa-actions {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}
.mesa-item .mesa-rename,
.mesa-item .mesa-color-btn,
.mesa-item .mesa-rotate,
.mesa-item .mesa-remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    font-size: 0.68rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mesa-item .mesa-rename {
    background: #0284c7;
    color: #fff;
}
.mesa-item .mesa-rename:hover { background: #0369a1; }
.mesa-item .mesa-color-btn {
    background: #ffffff;
    border: 1px solid #e5e7eb !important;
    font-size: 0.6rem;
}
.mesa-item .mesa-color-btn:hover { background: #f8fafc; }
.mesa-item .mesa-color-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.mesa-item .mesa-rotate {
    background: var(--navy-base);
    color: #fff;
    font-size: 0.76rem;
}
.mesa-item .mesa-rotate:hover { background: var(--navy-light); }
/* Esquina de redimensionado libre: se arrastra en vez de hacer clic para cambiar tamaños fijos */
.mesa-item .mesa-resize-handle {
    position: absolute;
    right: -9px;
    bottom: -9px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #64748b;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: nwse-resize;
    z-index: 2;
    touch-action: none;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.mesa-item .mesa-resize-handle:hover,
.mesa-item .mesa-resize-handle:active { background: #475569; }
.mesa-item .mesa-remove {
    background: #dc2626;
    color: #fff;
}

/* Vista del cliente: mismo diseño de mesas, pero dentro del plano 3D con perspectiva */
.floor-plan-3d.custom-layout {
    display: block;
    position: relative;
    height: 420px;
    padding: 0;
}
.floor-plan-3d.custom-layout .table-item {
    position: absolute;
    margin: 0;
    transform: translate(-50%, -50%);
}
.floor-plan-3d.custom-layout .table-item.table-item-bar {
    width: auto;
    min-width: 120px;
    height: 46px;
    border-radius: 14px;
    padding: 0 0.9rem;
    box-shadow: 0 8px 14px rgba(2,132,199,0.2);
}
.floor-plan-3d.custom-layout .table-item.table-item-bar.available {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
}
.floor-plan-3d.custom-layout .table-item.table-item-bar.available.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    box-shadow: 0 15px 25px rgba(34,197,94,0.4);
}
.floor-marker-item {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 70px;
    padding: 0.5rem 0.7rem;
    background: #fefce8;
    border: 3px solid #ca8a04;
    color: #854d0e;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 8px 14px rgba(202,138,4,0.18);
    pointer-events: none;
}
.floor-marker-item.floor-marker-escalera {
    background: #f3e8ff;
    border-color: #9333ea;
    color: #6b21a8;
}
.floor-marker-item.floor-marker-ascensor {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #3730a3;
}
.floor-marker-item.floor-marker-ventana {
    background: repeating-linear-gradient(135deg, #e0f2fe, #e0f2fe 6px, #f0f9ff 6px, #f0f9ff 12px);
    border: 3px dashed #0ea5e9;
    color: #0369a1;
}
.floor-marker-item.floor-marker-salida-emergencia {
    background: #16a34a;
    border-color: #15803d;
    border-width: 2px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 800;
    min-width: 0;
    width: 58px;
    height: 26px;
    padding: 0 0.2rem;
    font-size: 0.5rem;
    line-height: 1.1;
    border-radius: 4px;
}

/* Sillas seleccionables (barbería/belleza) en la vista del cliente: mismo ícono SVG que en Administración */
.floor-plan-3d.custom-layout .table-item.table-item-chair {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 0.56rem;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 14px rgba(0,0,0,0.12) !important;
}
.floor-plan-3d.custom-layout .table-item.mesa-marker-silla-barbero.available {
    background: #fff1f2;
    border-color: #e11d48;
    color: #9f1239;
}
.floor-plan-3d.custom-layout .table-item.mesa-marker-silla-belleza.available {
    background: #fdf4ff;
    border-color: #c026d3;
    color: #86198f;
}
.floor-plan-3d.custom-layout .table-item.table-item-chair.available.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    box-shadow: 0 15px 25px rgba(34,197,94,0.4) !important;
}

/* Formas de mesa en la vista del cliente */
.floor-plan-3d.custom-layout .table-item.mesa-shape-cuadrada {
    border-radius: 14px;
    width: 60px;
    height: 60px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-rectangular {
    border-radius: 16px;
    width: 118px;
    height: 62px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-rectangularGrande {
    border-radius: 16px;
    width: 150px;
    height: 66px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-ovalada {
    border-radius: 50%;
    width: 132px;
    height: 64px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-alta {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-alta.available {
    background: radial-gradient(circle at 35% 30%, #fffbea 0%, #fde68a 55%, #f2b90c 100%);
    border: 3px solid #b45309;
    color: #78350f;
    box-shadow:
        0 16px 0 -13px #92400e,
        0 26px 0 -15px #78350f,
        0 8px 14px rgba(180,83,9,0.2);
}
/* Al seleccionarla debe ponerse verde igual que el resto de mesas y barras */
.floor-plan-3d.custom-layout .table-item.mesa-shape-alta.available.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    box-shadow:
        0 16px 0 -13px #15803d,
        0 26px 0 -15px #166534,
        0 15px 25px rgba(34,197,94,0.4);
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-altaRectangular {
    border-radius: 10px;
    width: 96px;
    height: 34px;
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-altaRectangular.available {
    background: radial-gradient(circle at 30% 30%, #fffbea 0%, #fde68a 55%, #f2b90c 100%);
    border: 3px solid #b45309;
    color: #78350f;
    box-shadow: 0 8px 14px rgba(180,83,9,0.2);
}
.floor-plan-3d.custom-layout .table-item.mesa-shape-altaRectangular.available.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    box-shadow: 0 15px 25px rgba(34,197,94,0.4);
}
/* ============================================================
   PANEL DE NEGOCIO: ESTADÍSTICAS (KPIs + GRÁFICOS ANIMADOS)
   ============================================================ */
#estadisticas.section { padding-top: 3rem; }
#estadisticas .text-center-block { margin-bottom: 2rem; }

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0 2.2rem;
}
#admin-resumen-kpi-grid { grid-template-columns: repeat(5, 1fr); }
#admin-facturacion-kpi-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    #admin-resumen-kpi-grid, #admin-facturacion-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    #admin-resumen-kpi-grid, #admin-facturacion-kpi-grid { grid-template-columns: 1fr; }
    .stats-kpi-grid { grid-template-columns: 1fr; }
    .reviews-grid { gap: 0.7rem; }
    .review-card { padding: 1rem; }
}
.stats-kpi-card {
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 18px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 4px 15px rgba(10,25,47,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(14px);
    animation: statsKpiIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes statsKpiIn { to { opacity: 1; transform: translateY(0); } }
/* El panel de Admin usa cajas fijas — nunca aparecen/desaparecen,
   solo cambian sus números y colores, para que no exista ningún
   "parpadeo" sin importar cuántas veces se recarguen los datos. */
.admin-kpi-static { opacity: 1 !important; transform: none !important; animation: none !important; }
.stats-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--box-light);
    color: var(--navy-base);
    margin-bottom: 0.3rem;
}
.stats-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy-base);
    line-height: 1;
}
.stats-kpi-value-negative { color: #ef4444; }
.stats-kpi-label { font-size: 0.85rem; color: #64748b; font-weight: 600; }
.stats-kpi-trend {
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.2rem;
}
.stats-kpi-trend.up { background: #dcfce7; color: #16a34a; }
.stats-kpi-trend.down { background: #fee2e2; color: #dc2626; }

.stats-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}
@media (max-width: 480px) {
    .stats-charts-grid { grid-template-columns: 1fr; }
}
.stats-chart-card {
    background: #ffffff;
    border: 1px solid #edf1f6;
    border-radius: 18px;
    padding: 1.5rem 1.6rem 1.8rem;
    box-shadow: 0 4px 15px rgba(10,25,47,0.04);
    opacity: 0;
    transform: translateY(14px);
    animation: statsKpiIn 0.55s 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}
/* Dentro del Panel de Admin, las tarjetas de gráficas también quedan
   fijas — mismo criterio que las tarjetas KPI, arriba. */
#admin-root .stats-chart-card { opacity: 1; transform: none; animation: none; }
.stats-chart-card-wide { grid-column: 1 / -1; }
.stats-chart-header { margin-bottom: 1.2rem; }
.stats-chart-header h4 { font-size: 1rem; color: var(--navy-base); font-weight: 700; }

/* Barras verticales */
.stats-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 180px;
    padding-top: 0.5rem;
}
.admin-month-day-chart {
    margin-top: 1rem;
    overflow-x: auto;
    gap: 6px;
    justify-content: flex-start;
}
.admin-month-day-chart .stats-bar-col { flex: 0 0 22px; }
.admin-month-day-chart .stats-bar-label { font-size: 0.62rem; }
.admin-month-day-chart .stats-bar-value { font-size: 0.65rem; }
.stats-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    height: 100%;
}
.stats-bar-track {
    width: 100%;
    max-width: 34px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 8px;
    overflow: hidden;
    background: var(--box-light);
}
.stats-bar-fill {
    width: 100%;
    height: 0%;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--highlight), var(--navy-base));
    transition: height 1s cubic-bezier(0.16,1,0.3,1);
}
#stats-bar-chart .stats-bar-fill:not(.stats-bar-fill-cancelled) {
    background: var(--navy-base);
}
.stats-bar-fill:first-child { border-radius: 8px 8px 0 0; }
.stats-bar-fill-cancelled {
    background: #ef4444;
}
.stats-bar-value { font-size: 0.72rem; font-weight: 700; color: var(--navy-base); }
.stats-bar-label { font-size: 0.72rem; color: #94a3b8; font-weight: 600; }

/* Donut chart */
.stats-donut-wrapper { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.stats-donut { width: 130px; height: 130px; flex-shrink: 0; }
.stats-donut circle {
    transition: stroke-dashoffset 1.1s cubic-bezier(0.16,1,0.3,1);
}
.stats-donut-legend { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; min-width: 140px; }
.stats-donut-legend-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: #475569; }
.stats-donut-legend-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.stats-donut-legend-pct { margin-left: auto; font-weight: 700; color: var(--navy-base); }

/* Línea de tendencia */
.stats-line-chart-wrapper { width: 100%; overflow: hidden; }
.stats-line-chart { width: 100%; height: 220px; display: block; }
.stats-line-path {
    fill: none;
    stroke: var(--navy-base);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: statsLineDraw 1.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes statsLineDraw { to { stroke-dashoffset: 0; } }
.stats-line-area { opacity: 0; animation: statsFadeIn 0.8s ease 0.6s forwards; }
@keyframes statsFadeIn { to { opacity: 1; } }
.stats-line-dot {
    opacity: 0;
    animation: statsFadeIn 0.4s ease forwards;
}

/* Barras horizontales de ingresos por servicio */
.stats-hbar-list { display: flex; flex-direction: column; gap: 1rem; }
.stats-hbar-row { display: flex; flex-direction: column; gap: 0.35rem; }
.stats-hbar-top { display: flex; justify-content: space-between; font-size: 0.85rem; }
.stats-hbar-top strong { color: var(--navy-base); }
.stats-hbar-top span { color: #94a3b8; font-weight: 700; }
.stats-hbar-track { width: 100%; height: 10px; border-radius: 6px; background: var(--box-light); overflow: hidden; }
.stats-hbar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--navy-light), var(--navy-base));
    transition: width 1s cubic-bezier(0.16,1,0.3,1);
}

@media (max-width: 640px) {
    .stats-donut-wrapper { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   PANEL DE ADMINISTRACIÓN DE LA PLATAFORMA
   Vive fuera del sistema normal de vistas (.app-container) a
   propósito — es más simple mostrarlo/ocultarlo con una sola clase
   en <body> que arrastrar las reglas [data-view] de cada vista.
   ============================================================ */
body.admin-mode .app-container { display: none; }
body.admin-mode #admin-root { display: block; }

/* Mientras se confirma acceso al Panel de Admin, se tapa todo lo
   demás con la pantalla de carga (evita el "parpadeo" de la página
   normal antes de llegar al panel). */
#admin-loading-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--navy-base);
    color: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}
html.admin-loading body > *:not(#admin-loading-screen) { display: none !important; }
html.admin-loading #admin-loading-screen { display: flex; }

/* === "Esqueleto" de contenido, estilo Cloudflare === El diseño real
   de la página (menú, pestañas) se ve de inmediato — no se tapa nada.
   Son solo las listas que cargan datos (Actividad, Mis Citas, etc.)
   las que empiezan mostrando esta sombra gris con brillo animado, en
   el mismo lugar y tamaño donde va a aparecer el contenido real, y se
   reemplazan solas en cuanto ese contenido llega — sin "pantalla en
   blanco y luego pum, aparece todo". */
.skeleton-block {
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(100deg, #eef1f5 30%, #f7f9fb 50%, #eef1f5 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    margin-bottom: 0.7rem;
}
.skeleton-block:last-child { margin-bottom: 0; }
.skeleton-block-circle { border-radius: 50%; margin-bottom: 0; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mismo esqueleto, pero para TEXTO en línea (ej. el nombre del
   negocio en el encabezado del panel) — en vez de mostrar el texto de
   ejemplo del HTML ("Mi Negocio") y que después salte al nombre real
   ("Ejemplo"), el texto queda oculto detrás de esta sombra con brillo
   hasta que el dato real está listo, y ahí se revela directamente con
   el valor correcto — nunca se ve el texto de ejemplo. */
#panelneg-business-name, #account-greeting-name, #prof-name, #prof-desc, #booking-biz-name,
#stats-kpi-val-0, #stats-kpi-val-1, #stats-kpi-val-2,
#admin-kpi-val-0, #admin-kpi-val-1, #admin-kpi-val-2, #admin-kpi-val-3, #admin-kpi-val-4,
#admin-fact-kpi-val-0, #admin-fact-kpi-val-1, #admin-fact-kpi-val-2, #admin-fact-kpi-val-3,
#account-avatar-initials {
    transition: color 0.35s ease, background-color 0.35s ease;
}
.text-skeleton {
    color: transparent !important;
    background-color: #e2e8f0;
    border-radius: 6px;
    animation: text-skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes text-skeleton-pulse {
    0%, 100% { background-color: #e2e8f0; }
    50% { background-color: #eef2f7; }
}

/* El botón de cuenta, mientras espera a que se confirme el negocio
   real (ver setLoggedInState en script.js) — se ve apagado y con
   cursor de "espera", para que además de estar bloqueado al clic, se
   sienta bloqueado a simple vista. */
.btn-pending-load {
    opacity: 0.6;
    cursor: wait;
}

#account-avatar-initials.text-skeleton { border-radius: 50%; }
#cb-banner-preview.text-skeleton { border-radius: 12px; }
#cb-logo-preview.text-skeleton { border-radius: 50%; }
#cb-banner-preview, #cb-logo-preview { transition: background-color 0.35s ease; }

.admin-loading-logo-icon {
    color: var(--highlight);
    margin-bottom: 0.6rem;
    animation: adminLoadingPulse 1.6s ease-in-out infinite;
}
.admin-loading-logo {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 1.6rem;
    animation: adminLoadingPulse 1.6s ease-in-out infinite;
}
@keyframes adminLoadingPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

#admin-verify-stage-steps { display: flex; flex-direction: column; align-items: center; }
.admin-loading-title { margin: 0 0 0.4rem; font-size: 1.15rem; }
.admin-loading-subtitle { margin: 0 0 2rem; font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.55); max-width: 320px; }

/* --- Cajitas OTP: se voltean (flip 3D) al completarse cada verificación real --- */
.admin-otp-row { display: flex; gap: 0.9rem; perspective: 600px; }
.admin-otp-box { width: 52px; height: 60px; }
.admin-otp-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.34,1.56,0.64,1);
}
.admin-otp-box.done .admin-otp-box-inner { transform: rotateY(180deg); }
.admin-otp-face {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}
.admin-otp-face-front { background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.22); }
.admin-otp-box.failed .admin-otp-face-front {
    border-color: #dc2626;
    background: rgba(220,38,38,0.18);
    animation: fieldErrorShake 0.4s ease;
}
.admin-verify-current-label.is-error { color: #f87171; }
.admin-otp-box.active .admin-otp-face-front {
    border-color: var(--highlight);
    animation: adminOtpPulse 1s ease-in-out infinite;
}
@keyframes adminOtpPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100,255,218,0.35); }
    50% { box-shadow: 0 0 0 6px rgba(100,255,218,0); }
}
.admin-otp-face-back {
    background: var(--highlight);
    transform: rotateY(180deg);
}
.admin-otp-face-back svg { width: 20px; height: 20px; color: var(--navy-base); }
.admin-verify-checkmark { stroke-dasharray: 24; stroke-dashoffset: 24; }
.admin-otp-box.done .admin-verify-checkmark { animation: adminVerifyCheckDraw 0.3s 0.3s ease forwards; }
@keyframes adminVerifyCheckDraw { to { stroke-dashoffset: 0; } }

.admin-verify-current-label {
    margin: 1.6rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--highlight);
    min-height: 1.2em;
}

/* --- Etapa final: anillo pulsante + check grande, tras completarse todo --- */
#admin-verify-stage-success { display: flex; flex-direction: column; align-items: center; animation: adminGateIn 0.4s cubic-bezier(0.16,1,0.3,1) both; }
.admin-verify-success-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.6rem;
}
.admin-verify-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--highlight);
    animation: adminVerifyRingPulse 1.8s cubic-bezier(0.16,1,0.3,1) infinite;
}
.admin-verify-ring-2 { animation-delay: 0.5s; }
@keyframes adminVerifyRingPulse {
    0% { transform: scale(0.7); opacity: 0.9; }
    100% { transform: scale(1.9); opacity: 0; }
}
.admin-verify-badge {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(100,255,218,0.5);
    animation: adminGateIn 0.4s 0.1s cubic-bezier(0.34,1.56,0.64,1) both;
}
.admin-verify-badge svg { width: 32px; height: 32px; color: var(--navy-base); }
.admin-verify-badge-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: adminVerifyCheckDraw 0.4s 0.35s ease forwards; }
.admin-verify-secured-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--highlight);
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.3rem 0 0;
}

#admin-root {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: var(--bg-content);
    overflow-y: auto;
}

/* --- Puerta de acceso --- */
.admin-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-base);
    padding: 2rem;
}
.admin-gate-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2.2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    animation: adminGateIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes adminGateIn { to { opacity: 1; transform: translateY(0) scale(1); } }
.admin-gate-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-align: left;
}
.admin-gate-alt-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
}
.admin-gate-alt-link a { color: var(--navy-hover); font-weight: 700; }
.admin-gate-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy-base);
    display: block;
}
.admin-gate-badge {
    background: var(--navy-base);
    color: var(--highlight);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.admin-gate-card h2 { font-size: 1.3rem; color: var(--navy-base); }

/* --- MFA de Administradores (TOTP) --- reusa la misma tarjeta blanca
   del admin-gate, sobre el fondo oscuro del overlay de verificación */
.admin-mfa-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.2rem 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    color: var(--navy-base);
}
.admin-mfa-title { font-size: 1.15rem; color: var(--navy-base); margin: 0; }
.admin-mfa-qr-wrap {
    display: flex;
    justify-content: center;
    padding: 0.8rem;
    background: #f3f5f8;
    border-radius: 14px;
}
.admin-mfa-qr-wrap img { width: 160px; height: 160px; }
.admin-mfa-secret-code {
    display: block;
    background: #f3f5f8;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    letter-spacing: 1px;
    word-break: break-all;
    color: var(--navy-base);
}
.admin-mfa-error {
    color: #d9534f;
    font-size: 0.85rem;
    font-weight: 600;
    margin: -0.3rem 0 0;
    text-align: left;
}

/* --- Layout general del panel --- */
.admin-panel { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--navy-base);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.3rem;
    position: sticky;
    top: 0;
    height: 100vh;
    animation: adminSidebarIn 0.5s cubic-bezier(0.16,1,0.3,1);
}
@keyframes adminSidebarIn { from { transform: translateX(-24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.admin-sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 2rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.admin-sidebar-header .admin-gate-logo { color: #fff; }
.admin-sidebar-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.6rem;
}
.admin-sidebar-header-top .lang-btn { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
.admin-sidebar-header-top .lang-menu { width: 130px; }
.admin-role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(100,255,218,0.15);
    color: var(--highlight);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}
.admin-nav-item:not(.active):hover { background: rgba(255,255,255,0.06); color: #fff; transition: background 0.15s ease, color 0.15s ease; }
.admin-nav-item.active { background: var(--navy-hover); color: #fff; }
.admin-nav-item svg { flex-shrink: 0; }
.admin-nav-item span:not(.admin-nav-badge) { flex: 1; }
.admin-nav-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
}
.admin-nav-item.admin-nav-locked {
    opacity: 0.35;
    filter: grayscale(1);
    cursor: not-allowed;
    position: relative;
}
.admin-nav-item.admin-nav-locked:hover { background: none; color: rgba(255,255,255,0.75); }
.admin-nav-item.admin-nav-locked::after {
    content: "";
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.6);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.admin-exit-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}
.admin-exit-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.admin-main { flex: 1; padding: 2.5rem 3rem; max-width: 980px; animation: adminMainIn 0.55s 0.1s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes adminMainIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.admin-main h2 { font-size: 1.5rem; color: var(--navy-base); margin-bottom: 0.4rem; }
.admin-main .cb-hint { margin-bottom: 1.5rem; }

/* Panel de administración en móvil: la barra lateral de 280px no
   cabe al lado del contenido, así que pasa a ser un menú deslizante
   (mismo patrón ☰ que el resto del sitio), oculto por defecto. */
.admin-sidebar-backdrop { display: none; }
#admin-mobile-menu-btn { display: none; }
@media (max-width: 900px) {
    .admin-panel { position: relative; overflow-x: hidden; }
    .admin-sidebar {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: none;
        z-index: 2000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-16px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    }
    .admin-sidebar.show {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
    }
    #admin-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 1.1rem;
        left: 1.1rem;
        z-index: 2100;
        width: 40px;
        height: 40px;
        background: var(--navy-base);
        border: none;
        border-radius: 10px;
        color: #fff;
        cursor: pointer;
    }
    .admin-main { padding: 4.5rem 1.3rem 2.5rem; max-width: 100%; }
}

.admin-tab-panel { display: none; }
.admin-tab-panel.active {
    display: block;
    animation: adminTabFadeIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes adminTabFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-search-row { display: flex; gap: 0.7rem; margin-bottom: 1.5rem; align-items: center; flex-wrap: wrap; }
.admin-search-row .input-wrapper { flex: 1; min-width: 180px; }

/* --- Tarjetas de resultados / cola de revisión --- */
.admin-card {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(10,25,47,0.05);
}
.admin-activity-card .admin-card-header { cursor: pointer; }
.admin-activity-chevron { flex-shrink: 0; color: #94a3b8; transition: transform 0.35s cubic-bezier(0.16,1,0.3,1); }
.admin-activity-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    border-top: 0px solid #eef0f3;
    transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease, margin-top 0.45s cubic-bezier(0.16,1,0.3,1), padding-top 0.45s cubic-bezier(0.16,1,0.3,1);
}
.admin-activity-detail.expanded {
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eef0f3;
}
.admin-activity-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy-base);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}
.admin-activity-avatar.action-positive { background: #dcfce7; color: #15803d; }
.admin-activity-avatar.action-negative { background: #fee2e2; color: #b91c1c; }
.admin-activity-avatar.action-attention { background: #dbeafe; color: var(--navy-base); }
.admin-activity-header-row { display: flex; align-items: center; gap: 0.9rem; }

.admin-activity-note-box {
    background: var(--box-light);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    color: var(--navy-base);
    margin-top: 0.9rem;
}
.admin-activity-note-box strong { color: #64748b; font-weight: 700; }
.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-card-title { font-weight: 700; color: var(--navy-base); font-size: 1rem; overflow-wrap: break-word; word-break: break-word; }
.admin-card-sub { font-size: 0.8rem; color: #64748b; overflow-wrap: break-word; word-break: break-word; }
.admin-card-actions { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.admin-card-actions .btn-secondary-pill,
.admin-card-actions .btn-confirm-booking { padding: 0.55rem 1.1rem; font-size: 0.82rem; }
.admin-danger-btn { color: #dc2626 !important; background: #fef2f2 !important; }
.admin-danger-btn:hover { background: #fee2e2 !important; }

.admin-badge-pending {
    font-size: 0.72rem;
    font-weight: 700;
    background: #fef3c7;
    color: #b45309;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.admin-badge-status { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 20px; white-space: nowrap; }
.admin-badge-status-green { background: #dcfce7; color: #15803d; }
.admin-badge-status-amber { background: #fef3c7; color: #b45309; }
.admin-badge-status-red { background: #fee2e2; color: #b91c1c; }
.admin-badge-status-gray { background: var(--box-light); color: #64748b; }
.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
    margin-top: 0.9rem;
    font-size: 0.85rem;
}
.admin-detail-grid div {
    background: var(--box-light);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}
.admin-detail-grid div strong { display: block; color: #64748b; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 0.25rem; }
.admin-detail-grid div span { color: var(--navy-base); font-weight: 600; }

.admin-top-biz-row {
    display: grid;
    grid-template-columns: 32px 160px 1fr 90px;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eef0f3;
    font-size: 0.85rem;
}
.admin-top-biz-row:last-child { border-bottom: none; }
.admin-top-biz-rank { color: #94a3b8; font-weight: 700; }
.admin-top-biz-name { color: var(--navy-base); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-top-biz-track { background: var(--box-light); border-radius: 20px; height: 8px; overflow: hidden; }
.admin-top-biz-fill { height: 100%; background: linear-gradient(90deg, var(--navy-base), var(--highlight)); border-radius: 20px; transition: width 1s cubic-bezier(0.16,1,0.3,1); }
.admin-top-biz-amount { font-weight: 700; color: var(--navy-base); text-align: right; }
@media (max-width: 640px) {
    .admin-top-biz-row { grid-template-columns: 24px 1fr 70px; }
    .admin-top-biz-track { display: none; }
}

.admin-role-legend { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; background: var(--box-light); border-radius: 12px; padding: 1rem 1.2rem; }
.admin-role-legend-item { font-size: 0.82rem; color: #475569; }
.admin-role-legend-item strong { color: var(--navy-base); }

.admin-invite-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #eef0f3; max-width: 480px; }

.admin-label-with-btn { display: flex; align-items: center; justify-content: space-between; }
.admin-generate-link-btn {
    background: none;
    border: none;
    color: var(--navy-hover);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.2rem 0;
}
.admin-generate-link-btn:hover { text-decoration: underline; }

.admin-subtabs {
    display: inline-flex;
    gap: 0.4rem;
    background: var(--box-light);
    padding: 0.35rem;
    border-radius: 14px;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}
.admin-subtab {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.65rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.admin-subtab:hover { color: var(--navy-base); }
.admin-subtab.active {
    background: var(--navy-base);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(10,25,47,0.18);
}
.admin-subtab-badge {
    background: #fff;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}
.admin-subtab.active .admin-subtab-badge { background: rgba(255,255,255,0.18); color: #fff; }

.admin-coupons-fade { animation: cuentaTabFade 0.35s ease; }

.admin-checkbox-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.admin-booking-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
@media (max-width: 480px) {
    .admin-booking-grid { grid-template-columns: 1fr; }
}
.admin-booking-card {
    background: var(--box-light);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.admin-booking-card-date {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.admin-booking-card-info { display: flex; flex-direction: column; gap: 0.35rem; }
.admin-booking-card-info strong { font-size: 0.9rem; color: var(--navy-base); }
.admin-booking-card .btn-secondary-pill { padding: 0.4rem 0.9rem; font-size: 0.75rem; align-self: flex-start; }

/* Banner que ve el DUEÑO del negocio si el admin le pide corregir algo */
.admin-sort-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}
.admin-sort-row select {
    padding: 0.5rem 2rem 0.5rem 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-base);
    min-width: 170px;
}

.admin-month-picker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eef0f3;
    flex-wrap: wrap;
}
.admin-month-picker-label { font-size: 0.82rem; color: #64748b; font-weight: 600; }
.admin-month-picker-row select {
    padding: 0.5rem 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-base);
}
.admin-month-picker-result {
    margin-top: 1rem;
    background: var(--box-light);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-base);
}
.admin-month-picker-result strong { color: var(--navy-hover); font-size: 1.1rem; }

.admin-risk-banner {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.8rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
}
.admin-risk-medium { background: #fef3c7; color: #b45309; }
.admin-risk-high { background: #fee2e2; color: #b91c1c; }

.admin-feedback-banner {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
}
.admin-feedback-banner svg { flex-shrink: 0; margin-top: 0.15rem; }
.admin-feedback-banner strong { display: block; font-size: 0.85rem; margin-bottom: 0.3rem; }
.admin-feedback-banner p { font-size: 0.88rem; line-height: 1.5; margin: 0 0 0.3rem; }
.admin-feedback-banner .billing-feedback-date { font-size: 0.72rem; opacity: 0.75; }

/* ============================================================
   Header en pantallas chicas (celular Y tablet, hasta 1000px —
   el mismo ancho donde ya se muestra el ☰ en general) — ☰ a la
   izquierda, logo+Atempo centrado de verdad en el espacio libre,
   botón de Mi Negocio/perfil a la derecha del todo. Ahora que el
   idioma vive dentro del menú ☰ (ver más abajo), ya no hay riesgo
   de que el logo centrado choque con nada — solo quedan 2
   elementos a los costados. No toca nada de la versión de
   escritorio — solo aplica dentro de este @media.
   ============================================================ */
@media (max-width: 1000px) {
    header.sidebar-header {
        display: grid;
        width: 100%;
        grid-template-columns: 130px 1fr 130px;
        align-items: center;
        column-gap: 0.5rem;
    }
    /* .brand-actions ya no se ve como una "caja" propia — sus hijos
       (botón, ☰) pasan a comportarse como si fueran hijos directos
       del header, para poder ubicar cada uno en su propia columna. */
    header.sidebar-header .brand-actions {
        display: contents;
    }
    header.sidebar-header #mobile-menu-btn {
        grid-column: 1;
        justify-self: start;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        padding: 0;
    }
    header.sidebar-header #mobile-menu-btn:active {
        transform: scale(0.82);
    }
    header.sidebar-header #mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    /* Cada línea gira sobre SU PROPIO centro real (no un punto
       compartido) — la de arriba está en y=6, la del medio en y=12,
       la de abajo en y=18. Girarlas sobre un punto que no es el suyo
       las hacía "arquearse" en vez de simplemente inclinarse en su
       lugar, y por eso se veía torcida. */
    .hamburger-line {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }
    .hamburger-line-top { transform-origin: 12px 6px; }
    .hamburger-line-mid { transform-origin: 12px 12px; }
    .hamburger-line-bot { transform-origin: 12px 18px; }
    #mobile-menu-btn[aria-expanded="true"] .hamburger-line-top,
    #admin-mobile-menu-btn[aria-expanded="true"] .hamburger-line-top {
        transform: translateY(6px) rotate(45deg);
    }
    #mobile-menu-btn[aria-expanded="true"] .hamburger-line-mid,
    #admin-mobile-menu-btn[aria-expanded="true"] .hamburger-line-mid {
        opacity: 0;
    }
    #mobile-menu-btn[aria-expanded="true"] .hamburger-line-bot,
    #admin-mobile-menu-btn[aria-expanded="true"] .hamburger-line-bot {
        transform: translateY(-6px) rotate(-45deg);
    }
    header.sidebar-header .brand {
        grid-column: 2;
        justify-self: center;
        gap: 0.45rem;
        font-size: 1.15rem;
        min-width: 0;
        /* Corrección óptica: el ícono pesa visualmente más que el
           texto, así que aunque la caja esté centrada matemáticamente,
           el ojo la percibe corrida a la derecha. Este empujoncito
           chico compensa eso. */
        transform: translateX(-6px);
    }
    header.sidebar-header .brand .logo-icon svg {
        width: 21px;
        height: 21px;
    }
    header.sidebar-header .brand h2 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* El idioma ahora vive DENTRO del menú ☰ en móvil/tablet (ver
       #mobile-menu-lang-row) — el selector del header se esconde del
       todo acá, no hace falta mostrarlo 2 veces. */
    header.sidebar-header .lang-selector {
        display: none;
    }
    header.sidebar-header .btn-login {
        grid-column: 3;
        justify-self: end;
        padding: 0.45rem 0.7rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }
}

/* Idioma dentro del menú ☰ — visible solo en móvil/tablet (donde el
   selector del header de arriba está escondido); en escritorio se
   esconde acá, porque ahí sí se usa el selector normal del header. */
#mobile-menu-lang-row {
    display: none;
}
@media (max-width: 1000px) {
    #mobile-menu-lang-row {
        display: flex;
        gap: 0.6rem;
        margin-bottom: 1.6rem;
        padding-bottom: 1.6rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-menu-lang-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.15);
        color: #fff;
        padding: 0.6rem 0.8rem;
        border-radius: 10px;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
    }
    .mobile-menu-lang-btn:hover {
        background: rgba(255,255,255,0.12);
    }
}

/* En el rango más angosto de celular (320-374px, ej. iPhone SE),
   la bandera + "ES" + flecha del selector de idioma ocupan demasiado
   espacio — se deja solo la bandera, sin texto, para que todo siga
   entrando sin apretar el logo. */
@media (max-width: 425px) {
    header.sidebar-header {
        grid-template-columns: 105px 1fr 105px;
    }
    header.sidebar-header .brand h2 {
        font-size: 1.05rem;
    }
    header.sidebar-header .btn-login {
        padding: 0.35rem 0.5rem;
        font-size: 0.68rem;
    }
}