@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #4db6ac;
    --primary-dark: #00867d;
    --primary-light: #82e9de;
    --secondary: #1a2a33;
    --accent: #ffab40;
    --text-main: #37474f;
    --text-muted: #78909c;
    --bg-light: #f4f9f9;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.75);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --z-chat: 3000;

    /* Dynamic Brand Styles */
    --nav-bg: rgba(255, 255, 255, 0.75);
    --nav-text: #1a2a33;
    --nav-font-size: 0.95rem;
    --nav-font-family: 'Outfit', sans-serif;
    --nav-dot-color: #4db6ac;
    --nav-btn-bg: #4db6ac;
    --nav-btn-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Glassmorphism Generic */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-soft);
}

/* Navbar Shared Layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    transition: var(--transition);
}

/* Landing Page Specific Navbar */
nav#navbar {
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    width: 90%;
    z-index: 1000;
    border-radius: 50px;
    background: var(--nav-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav#navbar.scrolled {
    background: var(--nav-bg) !important;
    top: 12px;
    left: 5%;
    right: 5%;
    width: 90%;
    border-radius: 50px;
    box-shadow: var(--shadow);
    padding: 12px 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 48px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
}

.nav-links li {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav-links li:not(:first-child)::before {
    content: '•';
    margin-right: 20px;
    color: var(--nav-dot-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.nav-links li:hover:not(:first-child)::before {
    transform: scale(1.4);
    color: var(--nav-text);
    text-shadow: 0 0 10px var(--nav-dot-color);
}

.nav-links a {
    font-weight: 600;
    color: var(--nav-text);
    font-size: var(--nav-font-size);
    font-family: var(--nav-font-family);
    position: relative;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.nav-links a:hover {
    transform: translateY(-2px) scale(1.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    color: var(--white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Specific button hover */
#nav-booking-btn {
    transition: var(--transition);
}

#nav-booking-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(77, 182, 172, 0.4);
    filter: brightness(1.1);
}

/* Hero Section with Video */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 42, 51, 0.8) 0%, rgba(77, 182, 172, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    padding: 20px;
    animation: fadeInUp 1.2s ease-out;
}

.hero-content h1 {
    font-size: 5rem;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(77, 182, 172, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(77, 182, 172, 0.5);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Sections */
section {
    padding: 120px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 25px;
    display: block;
}

/* Gallery / Transformations Section */
.gallery-section {
    background: var(--secondary);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item video,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover video,
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Custom Widgets */
.chat-bubble {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    position: fixed;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(77, 182, 172, 0.5);
    z-index: 2000;
}

.chat-bubble:hover {
    transform: scale(1.1) rotate(15deg);
}

/* Chat Window Logic */
.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    z-index: var(--z-chat);
    display: none !important;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    flex-direction: column;
}

.chat-window.active {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}

.chat-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px 25px 0 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-input-area {
    padding: 15px;
    background: white;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #eee;
}

.chat-input-area input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.chat-input-area button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-input-area button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.bot-message {
    background: #f0f4f4;
    color: var(--text-main);
    align-self: flex-start;
    border-radius: 15px 15px 15px 2px;
    padding: 12px 18px;
    font-size: 0.95rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-radius: 15px 15px 2px 15px;
    padding: 12px 18px;
    font-size: 0.95rem;
    box-shadow: 2px 2px 10px rgba(77, 182, 172, 0.2);
}

.chat-link {
    color: var(--primary-dark);
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 700;
    margin-top: 5px;
    display: inline-block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HAMBURGER (mobile only) ===== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 42px;
    height: 42px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    z-index: 1100;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--nav-text);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.25s ease;
    transform-origin: center;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    nav#navbar {
        top: 12px;
        left: 3%;
        right: 3%;
        width: 94%;
        padding: 10px 18px;
    }

    nav#navbar.scrolled {
        top: 8px;
        left: 3%;
        right: 3%;
        width: 94%;
        padding: 10px 18px;
    }

    /* Hide the "RESERVAR CITA" button in navbar on mobile to save space */
    nav#navbar > a.btn-primary {
        display: none;
    }

    /* Mobile drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 90px 30px 30px;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 1050;
        overflow-y: auto;
    }

    body.nav-open .nav-links {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        padding: 16px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-links li:not(:first-child)::before {
        display: none;
    }

    .nav-links li a {
        font-size: 1.1rem;
        color: var(--secondary) !important;
    }

    /* Mobile-only CTA at bottom of drawer */
    .nav-links::after {
        content: '';
        flex: 1;
    }

    .mobile-nav-cta {
        display: flex !important;
        margin-top: 24px;
        width: 100%;
        background: #25D366 !important;
        color: white !important;
        padding: 14px !important;
        border-radius: 14px !important;
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-weight: 600;
        text-decoration: none;
        font-size: 0.95rem;
    }

    /* Backdrop */
    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1040;
        animation: fadeIn 0.25s ease;
    }

    /* Hero */
    .hero-content {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 2.4rem;
        line-height: 1.15;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-content .btn {
        padding: 12px 22px !important;
        font-size: 0.85rem !important;
    }

    /* Generic section padding */
    section {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    /* Services / Galleries: single col on small phones */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* About section stack */
    #nosotros > div {
        gap: 30px !important;
    }

    /* Floating WhatsApp button */
    #whatsapp-fab {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        font-size: 1.7rem !important;
    }
}

.nav-links li.mobile-nav-cta-li {
    display: none !important;
}
@media (max-width: 900px) {
    .nav-links li.mobile-nav-cta-li {
        display: block !important;
        width: 100%;
        border-bottom: none !important;
        padding-top: 24px !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.65rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ======================================= */
/* ADMIN PANEL STYLES */
/* ======================================= */

/* Admin Container */
.admin-container {
    margin-top: 100px;
    padding: 2rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th,
td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--secondary);
    color: var(--white);
}

/* Tag Input Styles */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: text;
}

.tag-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(77, 182, 172, 0.2);
}

.tag {
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.2s ease;
}

.tag i {
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
}

.tag i:hover {
    opacity: 1;
}

.tag-input {
    border: none;
    outline: none;
    padding: 5px;
    flex: 1;
    min-width: 120px;
    font-family: inherit;
    font-size: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary);
    background: #e0f2f1;
}

.tab-btn.active {
    color: var(--primary-dark);
    background: #b2dfdb;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Captcha Modal */
#captcha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.captcha-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 350px;
    border: 1px solid #eee;
}

.captcha-img {
    background: #f0f0f0;
    border-radius: 10px;
    margin: 15px 0;
    padding: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Summary Card for Admin */
.summary-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    border-left: 8px solid var(--primary);
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(77, 182, 172, 0.2);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Small button variant */
.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #e53935;
    color: white;
}

.btn-danger:hover {
    background: #c62828;
}

/* ========== Admin Responsive ========== */
@media (max-width: 900px) {

    /* Admin top nav */
    body > nav {
        flex-wrap: wrap;
        padding: 10px 16px !important;
        gap: 10px;
    }

    body > nav .logo-container {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    body > nav .logo-container img {
        height: 36px !important;
    }

    body > nav .logo-container span {
        font-size: 0.85rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body > nav > div:last-child {
        gap: 6px !important;
        flex-wrap: wrap;
    }

    body > nav #welcome-user {
        display: none;
    }

    body > nav .btn {
        padding: 8px 12px !important;
        font-size: 0.78rem !important;
    }

    /* Container */
    .admin-container {
        margin-top: 90px !important;
        padding: 1rem !important;
    }

    /* Tabs: horizontal scroll with snap, sticky on top */
    .tabs {
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem 20px;
        padding: 0 1rem 12px;
        border-bottom: 2px solid #eee;
        scrollbar-width: thin;
    }

    .tabs::-webkit-scrollbar { height: 4px; }
    .tabs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

    .tab-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
    }

    .tab-btn i {
        margin-right: 4px;
    }

    /* Section titles */
    .section-title {
        flex-wrap: wrap !important;
    }

    .section-title h2 {
        font-size: 1.4rem !important;
    }

    /* Summary cards */
    .summary-card {
        padding: 18px !important;
        border-radius: 14px !important;
        margin-bottom: 20px !important;
        border-left-width: 5px !important;
    }

    /* Stats grid */
    .summary-card[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Forms inside admin: stack 2-col grids */
    form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    form input[type="text"],
    form input[type="email"],
    form input[type="number"],
    form input[type="tel"],
    form input[type="password"],
    form input[type="date"],
    form input[type="time"],
    form select,
    form textarea {
        font-size: 16px !important; /* prevent iOS zoom */
    }

    /* History tab: stack patient list and timeline */
    #tab-history > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 14px !important;
    }
    #tab-history .summary-card {
        max-width: 100% !important;
    }

    /* WhatsApp + Calendar tab: stack 2-column grid */
    #tab-whatsapp > div[style*="grid-template-columns"],
    #tab-calendar > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Tables: card-style rows */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #eee;
        margin-bottom: 12px;
        border-radius: 12px;
        overflow: hidden;
        background: white;
    }

    td {
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 10px 14px;
        text-align: left;
        font-size: 0.88rem;
    }

    td:last-child {
        border-bottom: none;
        background: #fafafa;
    }

    /* Modals on mobile */
    div[style*="position:fixed"][style*="z-index:"][style*="background:rgba(0,0,0"] > div,
    div[style*="position: fixed"][style*="z-index:"][style*="background:rgba(0,0,0"] > div {
        max-width: 96% !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
    }

    /* Service / product card lists in admin */
    #services-list,
    #products-list {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 0.75rem !important;
    }
    .summary-card {
        padding: 14px !important;
    }
    .summary-card[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    body > nav .logo-container span {
        font-size: 0.75rem !important;
    }
    body > nav .btn {
        padding: 7px 10px !important;
        font-size: 0.72rem !important;
    }
}

/* Animation Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   CHAT WIDGET - WhatsApp Style
   ============================================ */

.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: var(--z-chat);
    font-size: 1.8rem;
    transition: var(--transition);
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.chat-window {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    z-index: calc(var(--z-chat) + 1);
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: #f0f0f0;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: #075E54;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header i.fa-times {
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.chat-header i.fa-times:hover {
    transform: rotate(90deg);
}

#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #e5ddd5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23e5ddd5" width="100" height="100"/><path d="M0 0 L100 100 M100 0 L0 100" stroke="%23d4ccc4" stroke-width="0.5" opacity="0.1"/></svg>');
}

#admin-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #e5ddd5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23e5ddd5" width="100" height="100"/><path d="M0 0 L100 100 M100 0 L0 100" stroke="%23d4ccc4" stroke-width="0.5" opacity="0.1"/></svg>');
}

.message {
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 75%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: white;
    align-self: flex-start;
    border-radius: 10px 10px 10px 2px;
    color: #303030;
}

.user-message {
    background: #DCF8C6;
    align-self: flex-end;
    border-radius: 10px 10px 2px 10px;
    color: #303030;
}

.chat-input-area {
    padding: 15px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    background: white;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.chat-input-area input::placeholder {
    color: #999;
}

.chat-input-area button {
    background: #25D366;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-input-area button:hover {
    background: #128C7E;
    transform: scale(1.05);
}

.chat-input-area button i {
    font-size: 1.1rem;
}

/* Scrollbar personalizado para el chat */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

#admin-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#admin-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#admin-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#admin-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Captcha Overlay */
#captcha-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--z-chat) + 2);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Responsive Chat */
@media (max-width: 768px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-bubble {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
}