/* Centrar el botón en la tarjeta de cancelación */
.feature-card.cancel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#cancel-service-card .auth-btn {
    margin: 24px auto 0 auto;
    display: block;
    width: auto;
    max-width: 300px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Deshabilitar zoom y pinch-to-zoom en móviles */
html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f4ff 0%, #e8f2ff 100%);
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Modern Navigation */
.modern-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.nav-brand:hover {
    opacity: 0.8;
}

/* Menú contextual para el botón de inicio */
.home-menu {
    position: fixed;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 180px;
}

.home-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.home-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    font-size: 0.9rem;
}

.home-menu-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(2px);
}

.home-menu-item i {
    width: 16px;
    text-align: center;
}

.nav-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.12));
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #222;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.10), 0 0px 1px #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Información del usuario */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.user-welcome-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-welcome {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    white-space: nowrap;
}

.admin-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: pulse-admin 2s infinite;
}

@keyframes pulse-admin {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    }
}

.session-timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #64748b;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Chat context in navigation */
.chat-context {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
    max-width: none;
}

/* Cuando estamos en modo chat, el nav-container se centra completamente */
.nav-container.chat-mode {
    justify-content: center;
    position: relative;
}

.back-btn-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: absolute;
    left: 1rem;
}

.back-btn-nav:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.chat-context-text {
    text-align: center;
    max-width: 600px;
}

.chat-context-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4f46e5;
    margin: 0 0 0.25rem 0;
}

.chat-context-text p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.session-timer.warning {
    color: #dc2626;
    background: rgba(254, 242, 242, 0.9);
    border-color: rgba(220, 38, 38, 0.2);
}

.session-timer i {
    font-size: 0.7rem;
}

/* Botón de logout */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn i {
    font-size: 0.9rem;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 90px 0.5rem 0.5rem; /* Reducido padding lateral para más espacio */
}

/* Hero Section */
.hero-header {
    text-align: center;
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,244,255,0.6));
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.03);
}

/* Media queries para navegación */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 50px;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .nav-brand {
        order: 1;
        flex: 1;
        min-width: auto;
        gap: 8px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .nav-logo {
        width: 30px;
        height: 30px;
    }
    
    .hero-banner {
        border-radius: 15px;
        margin: 0 10px;
        max-height: 200px;
    }
    
    .hero-brand {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
        min-width: auto;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .hero-bot-image {
        max-width: 250px;
        max-height: 180px;
    }
    
    .hero-content {
        max-width: 95%;
        padding: 0 10px;
    }
    
    .nav-actions {
        order: 2;
        gap: 0.25rem;
        margin-left: auto;
    }
    
    .chat-context {
        order: 2;
        flex: 1 1 100%;
        margin: 0.5rem 0 0 0;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        gap: 0.75rem;
        justify-content: center;
        position: relative;
    }
    
    .back-btn-nav {
        padding: 6px 12px;
        font-size: 0.8rem;
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .back-btn-nav span {
        display: none;
    }
    
    .chat-context-text {
        max-width: none;
    }
    
    .chat-context-text h3 {
        font-size: 1rem;
    }
    
    .chat-context-text p {
        font-size: 0.8rem;
    }
    
    .user-info {
        order: 3;
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin: 0.5rem 0 0 0;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .user-welcome-container {
        gap: 0.375rem;
    }
    
    .user-welcome {
        font-size: 0.85rem;
    }
    
    .admin-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .session-timer {
        font-size: 0.8rem;
        padding: 4px 8px;
        min-width: auto;
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .logout-btn span {
        display: none; /* Solo mostrar icono en tablets */
    }
    
    .theme-toggle {
        padding: 8px;
        font-size: 14px;
        width: 36px;
        height: 36px;
    }
    
    .container {
        padding-top: 70px; /* Ajustado para que no quede por debajo del header fijo */
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .hero-header {
        padding: 1rem 0 0.75rem; /* Reducido padding vertical */
        border-radius: 16px;
        margin-top: 0;
    }
    
    /* Optimización del chat para tablets */
    .chat-container {
        padding: 0.75rem 0.5rem;
        height: calc(100vh - 140px);
    }
    
    .chat-messages {
        padding: 0.75rem 0.5rem;
        max-height: calc(100vh - 200px);
    }
    
    .chat-input-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.75rem;
        height: auto;
        min-height: 50px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .nav-logo {
        width: 28px;
        height: 28px;
    }
    
    .chat-context {
        margin: 0.25rem 0 0 0;
        padding: 0.375rem;
        gap: 0.5rem;
        position: relative;
        align-items: center;
        justify-content: center;
    }
    
    .back-btn-nav {
        padding: 4px 8px;
        font-size: 0.75rem;
        position: absolute;
        left: 0.375rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .chat-context-text h3 {
        font-size: 0.9rem;
    }
    
    .chat-context-text p {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.3;
    }
    
    .user-info {
        margin: 0.25rem 0 0 0;
        padding: 0.375rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .user-welcome-container {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .user-welcome {
        font-size: 0.8rem;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .session-timer {
        align-self: stretch;
        text-align: center;
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .nav-actions {
        gap: 0.125rem;
    }
    
    .logout-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .theme-toggle {
        padding: 6px;
        font-size: 12px;
        width: 32px;
        height: 32px;
    }
    
    .container {
        padding-top: 65px; /* Ajustado para que no quede por debajo del header fijo en móviles */
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .hero-header {
        padding: 1rem 0 0.75rem; /* Reducido padding vertical */
        border-radius: 16px;
        margin-top: 0;
    }
    
    /* Optimización del chat para móviles */
    .chat-container {
        padding: 0.5rem 0.25rem;
        height: calc(100vh - 150px);
    }
    
    .chat-messages {
        padding: 0.5rem 0.25rem;
        max-height: calc(100vh - 210px);
    }
    
    .chat-input-container {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .chat-input {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* Media query para pantallas extra pequeñas */
@media (max-width: 360px) {
    .nav-container {
        padding: 0.375rem 0.5rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .nav-logo {
        width: 24px;
        height: 24px;
    }
    
    .chat-context {
        padding: 0.25rem;
        gap: 0.375rem;
        position: relative;
        justify-content: center;
    }
    
    .back-btn-nav {
        padding: 3px 6px;
        font-size: 0.7rem;
        position: absolute;
        left: 0.25rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .chat-context-text h3 {
        font-size: 0.85rem;
    }
    
    .chat-context-text p {
        font-size: 0.7rem;
    }
    
    .user-welcome {
        font-size: 0.75rem;
        max-width: 150px;
    }
    
    .admin-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .session-timer {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .theme-toggle {
        padding: 4px;
        font-size: 10px;
        width: 28px;
        height: 28px;
    }
    
    .logout-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .container {
        padding: 20px 0.125rem 0.5rem; /* Reducido de 70px a 20px para que quede muy cerca del header */
    }
    
    .hero-header {
        padding: 1rem 0 0.75rem; /* Reducido aún más el padding vertical */
        border-radius: 16px;
        margin-top: 0; /* Sin margen superior adicional */
    }
    
    /* Optimización del chat para móviles */
    .chat-container {
        padding: 0.5rem 0.25rem;
        height: calc(100vh - 160px);
    }
    
    .chat-messages {
        padding: 0.5rem 0.25rem;
        max-height: calc(100vh - 220px);
    }
    
    .chat-input-container {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .chat-input {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* ===== ESTILOS DE AUTENTICACIÓN ===== */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f4ff 0%, #e8f2ff 100%);
    position: relative;
}

.auth-header {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 100;
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.home-btn:hover {
    background: rgba(79, 70, 229, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.home-btn i {
    font-size: 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-card-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-card-header p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}

/* Información de Precios */
.service-pricing-info {
    margin-bottom: 2rem;
    padding: 0;
}

.pricing-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-card i {
    font-size: 1.5rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.pricing-content {
    flex: 1;
}

.pricing-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
}

.pricing-content .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.pricing-content .price-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0;
}

/* Formularios de autenticación */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-row .form-group {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #6366f1;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-group input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: #6366f1;
}

/* Checkbox styles */
.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.checkmark::after {
    content: '✓';
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
    color: #4f46e5;
}

.terms-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3cd;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.terms-info p {
    margin: 0;
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.4;
}

.terms-info i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

.terms-info strong {
    color: #dc2626;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-bar.strength-weak {
    background: #ef4444;
}

.strength-bar.strength-medium {
    background: #f59e0b;
}

.strength-bar.strength-strong {
    background: #10b981;
}

.strength-bar.strength-very-strong {
    background: #059669;
}

.strength-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: block;
}

/* Checkbox personalizado */
.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #6366f1;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #6366f1;
    border-color: #6366f1;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label a {
    color: #6366f1;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Enlace de olvidaste tu contraseña */
.forgot-password-link {
    text-align: right;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.forgot-password-link a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.forgot-password-link a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Botones de autenticación */
.auth-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links p {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-links a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    width: 100%;
    max-width: 520px;
}

/* Mensajes de error */
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
    margin-top: 0.25rem;
}

/* Alertas */
.alert {
    display: none;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    justify-content: center;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    justify-content: center;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0.25rem;
}

.alert-close:hover {
    opacity: 1;
}

.alert-message {
    display: block;
    width: 100%;
}

.alert-warning .alert-message,
.alert-info .alert-message {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para auth */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-header {
        top: 1rem;
        right: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .auth-card-header h1 {
        font-size: 1.75rem;
    }
    
    /* Responsive para sección de precios */
    .pricing-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .pricing-card i {
        align-self: center;
        font-size: 1.25rem;
        padding: 0.6rem;
    }
    
    .pricing-content .price {
        font-size: 1.2rem;
    }
    
    .pricing-content h3 {
        font-size: 1rem;
    }
    
    .pricing-content .price-description {
        font-size: 0.8rem;
    }
    
    .auth-footer {
        bottom: 1rem;
        font-size: 0.75rem;
        max-width: calc(100% - 2rem);
        padding: 0 1rem;
    }
}

/* Para tablets y pantallas medianas */
@media (max-width: 900px) and (min-width: 769px) {
    .auth-card {
        max-width: 90%;
        padding: 2.5rem;
    }
    
    .form-row {
        gap: 1.25rem;
    }
    
    .auth-footer {
        max-width: 90%;
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-bot-image {
    max-width: 300px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hero-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.hero-main-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.hero-tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #718096;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4a5568;
    font-weight: 400;
    opacity: 0.9;
}

.chat-container {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 1rem;
    box-shadow: none;
    border: none;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    position: relative;
    width: 100%;
    max-width: none;
}

/* Animaciones globales del chat */
.chat-container {
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 360ms cubic-bezier(.2,.9,.2,1), opacity 360ms ease;
}

.chat-container.chat-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chat-container.chat-hidden {
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
}

/* Centrar chat en pantallas grandes (escritorio) */
@media (min-width: 769px) {
    .chat-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 1rem 2rem;
    }
    
    .chat-messages {
        padding: 1.5rem 1rem;
    }
    
    .chat-input-container {
        padding: 1rem 1rem 0.5rem 1rem;
    }
    
    .message {
        max-width: 85%;
    }
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.chat-header-text {
    flex: 1;
    text-align: center;
}

.chat-header h2 {
    color: #1a202c;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chat-header p {
    color: #4a5568;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Utilidades */
.hidden { 
    display: none !important; 
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 200px);
}

.message {
    padding: 14px 18px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.95rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.message.user {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.message.bot {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.message-text {
    flex: 1;
    line-height: 1.4;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.message.typing {
    opacity: 0.8;
    font-style: italic;
}

/* Indicador de escritura: puntos animados */
.typing-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-right: 8px;
}

.typing-dots .dot {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #6366f1, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(99,102,241,0.2);
    transform: translateY(0);
    opacity: 0.9;
    animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dots .dot:nth-child(2) { 
    animation-delay: 0.12s; 
}

.typing-dots .dot:nth-child(3) { 
    animation-delay: 0.24s; 
}

.typing-text {
    color: #4a5568;
    font-style: normal;
}

@keyframes typing-bounce {
    0% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-6px); opacity: 1; }
    60% { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 0.6; }
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background: transparent;
    position: sticky;
    bottom: 0;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 25px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    resize: none;
    min-height: 45px;
    max-height: 120px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(99,102,241,0.1);
}

/* Asegurar que el icono SVG herede el color del botón */
.send-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    color: white;
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-btn {
    background: linear-gradient(45deg, #ff8a65, #d7263d);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

/* Asegurar que el icono SVG herede el color del botón */
.send-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    color: white;
}

.send-btn:focus { outline: 2px solid rgba(255,150,120,0.25); outline-offset: 2px; }

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Animación sutil para el icono cuando está procesando */
.send-btn:disabled {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Landing inicial */
.landing-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #1a202c;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.landing-sub {
    text-align: center;
    color: #4a5568;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(.2,.9,.2,1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card[data-action="enter-chat"] {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(139,92,246,0.05));
}

.feature-card[data-action="enter-chat"]:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
}

/* Tarjetas clickeables */
.feature-card.beck-card,
.feature-card.plutchik-card,
.feature-card.appointment-card,
.feature-card.location-card,
.feature-card.therapy-tools-card {
    cursor: pointer;
}

.feature-card.beck-card:hover,
.feature-card.plutchik-card:hover,
.feature-card.appointment-card:hover,
.feature-card.location-card:hover,
.feature-card.therapy-tools-card:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(139,92,246,0.03));
}

/* Estilo específico para la tarjeta de progreso clickeable */
.progress-card {
    cursor: pointer;
    transition: all 0.3s ease !important;
}

.progress-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(59,130,246,0.08)) !important;
}

/* Estilo específico para la tarjeta de admin (control de pagos) */
.admin-only {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255,193,7,0.05), rgba(255,152,0,0.05));
    border-left: 4px solid #ff9800;
}

.admin-only:hover {
    background: linear-gradient(135deg, rgba(255,193,7,0.08), rgba(255,152,0,0.08));
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(255,152,0,0.15) !important;
}

/* Estilos específicos para las tarjetas de formularios */
.form-card {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(139,69,19,0.05), rgba(160,82,45,0.05));
    border-left: 4px solid #8b4513;
    transition: all 0.3s ease;
}

.form-card:hover {
    background: linear-gradient(135deg, rgba(139,69,19,0.08), rgba(160,82,45,0.08));
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(139,69,19,0.15) !important;
}

#depression-form-card {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, rgba(220,38,38,0.05), rgba(239,68,68,0.05));
}

#depression-form-card:hover {
    background: linear-gradient(135deg, rgba(220,38,38,0.08), rgba(239,68,68,0.08));
    box-shadow: 0 20px 40px rgba(220,38,38,0.15) !important;
}

#anxiety-form-card {
    border-left-color: #7c3aed;
    background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(139,92,246,0.05));
}

#anxiety-form-card:hover {
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(139,92,246,0.08));
    box-shadow: 0 20px 40px rgba(124,58,237,0.15) !important;
}

/* Estilos específicos para la tarjeta del calendario */
.calendar-card {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(34,197,94,0.05), rgba(16,185,129,0.05));
    border-left: 4px solid #10b981;
    transition: all 0.3s ease;
}

.calendar-card:hover {
    background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(16,185,129,0.08));
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(16,185,129,0.15) !important;
}

/* Estilos específicos para la tarjeta de ubicación */
.location-card {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(239,68,68,0.05), rgba(220,38,38,0.05));
    border-left: 4px solid #ef4444;
    transition: all 0.3s ease;
}

.location-card:hover {
    background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(220,38,38,0.08));
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(239,68,68,0.15) !important;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    color: #1a202c;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-card p {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* === FOOTER PRINCIPAL === */
.main-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Ocultar footer cuando el chat está visible */
.chat-container.chat-visible ~ .main-footer,
body.chat-active .main-footer {
    display: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.footer-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

/* (El bloque de reseñas de Google fue removido) */

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #c62828;
    display: none;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #2e7d32;
    display: none;
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    /* sin bloque de reseñas */
    
    .chat-header h2 {
        font-size: 1.5rem;
    }

    .message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .features {
        gap: 1rem;
    }
    /* sin bloque de reseñas */
}
/* (Se usaron los estilos originales cálidos; no hay reglas de forced-colors) */

/* Dark mode styles */
body[data-theme="dark"] {
    background: linear-gradient(135deg, #1a1b23 0%, #2d2b3a 100%);
    color: #e2e8f0;
}

body[data-theme="dark"] .modern-nav {
    background: rgba(30, 32, 42, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .user-welcome {
    color: #8b5cf6;
}

body[data-theme="dark"] .admin-badge {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #f1f5f9;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

body[data-theme="dark"] .session-timer {
    background: rgba(42, 44, 55, 0.8);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .brand-name {
    color: #8b5cf6;
}

body[data-theme="dark"] .theme-toggle {
    background: rgba(42, 44, 55, 0.9);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .hero-header {
    background: linear-gradient(135deg, rgba(42, 44, 55, 0.9), rgba(30, 32, 42, 0.8));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .hero-main-title {
    color: #f1f5f9;
}

body[data-theme="dark"] .hero-subtitle {
    color: #cbd5e1;
}

body[data-theme="dark"] .hero-tagline {
    color: #94a3b8;
}

body[data-theme="dark"] .hero-bot-image {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

body[data-theme="dark"] .hero-title {
    color: #f1f5f9;
}

body[data-theme="dark"] .hero-subtitle {
    color: #cbd5e1;
}

body[data-theme="dark"] .landing-title {
    color: #f1f5f9;
}

body[data-theme="dark"] .landing-sub {
    color: #cbd5e1;
}

body[data-theme="dark"] .feature-card {
    background: rgba(42, 44, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .feature-card h3 {
    color: #f1f5f9;
}

body[data-theme="dark"] .feature-card p {
    color: #cbd5e1;
}

/* Dark mode para tarjetas de formularios */
body[data-theme="dark"] .form-card {
    background: rgba(42, 44, 55, 0.9);
    border-left-color: #8b4513;
}

body[data-theme="dark"] #depression-form-card {
    border-left-color: #ef4444;
    background: rgba(42, 44, 55, 0.9);
}

body[data-theme="dark"] #anxiety-form-card {
    border-left-color: #a855f7;
    background: rgba(42, 44, 55, 0.9);
}

/* Dark mode para tarjeta del calendario */
body[data-theme="dark"] .calendar-card {
    background: rgba(42, 44, 55, 0.9);
    border-left-color: #10b981;
}

/* Dark mode para tarjeta de ubicación */
body[data-theme="dark"] .location-card {
    background: rgba(42, 44, 55, 0.9);
    border-left-color: #ef4444;
}

body[data-theme="dark"] .main-footer {
    background: #1e293b;
    border-top-color: #334155;
}

/* Dark mode para botón de inicio en auth */
body[data-theme="dark"] .home-btn {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

body[data-theme="dark"] .home-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

body[data-theme="dark"] .auth-card {
    background: rgba(42, 44, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .footer-content p {
    color: #94a3b8;
}

body[data-theme="dark"] .chat-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

body[data-theme="dark"] .chat-header h2 {
    color: #f1f5f9;
}

body[data-theme="dark"] .chat-header p {
    color: #cbd5e1;
}

body[data-theme="dark"] .back-btn {
    background: rgba(42, 44, 55, 0.9);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .message.bot {
    background: rgba(42, 44, 55, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .bot-avatar {
    border-color: rgba(102, 126, 234, 0.4);
}

body[data-theme="dark"] .chat-input {
    background: rgba(42, 44, 55, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Auth Pages Dark Mode */
body[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Panel de Control de Pagos - Dark Mode */
body[data-theme="dark"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
body[data-theme="dark"] .payments-container {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
}
body[data-theme="dark"] .payments-header {
    background: transparent;
    color: #f1f5f9;
}
body[data-theme="dark"] .payments-title {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #f1f5f9;
}
body[data-theme="dark"] .payments-subtitle {
    color: #cbd5e1;
}
body[data-theme="dark"] .payments-tabs {
    background: rgba(42, 44, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .tab-button {
    color: #cbd5e1;
}
body[data-theme="dark"] .tab-button.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}
body[data-theme="dark"] .user-card {
    background: rgba(42, 44, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body[data-theme="dark"] .user-name {
    color: #f1f5f9;
}
body[data-theme="dark"] .user-email {
    color: #cbd5e1;
}
body[data-theme="dark"] .user-phone {
    color: #94a3b8;
}
body[data-theme="dark"] .detail-label {
    color: #cbd5e1;
}
body[data-theme="dark"] .detail-value {
    color: #f1f5f9;
}
body[data-theme="dark"] .action-btn {
    background: rgba(42, 44, 55, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .approve-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
body[data-theme="dark"] .reject-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
body[data-theme="dark"] .back-button {
    background: rgba(42, 44, 55, 0.9);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .back-button:hover {
    background: rgba(51, 65, 85, 0.9);
}
body[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.8);
}
body[data-theme="dark"] .modal-content {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
body[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .modal-title {
    color: #f1f5f9;
}
body[data-theme="dark"] .modal-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .modal-btn {
    background: rgba(42, 44, 55, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .modal-btn.btn-primary {
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
}
body[data-theme="dark"] .modal-btn.btn-secondary {
    background: rgba(71, 85, 105, 0.9);
    color: #cbd5e1;
}
body[data-theme="dark"] #payments-content {
    color: #f1f5f9;
}
body[data-theme="dark"] #payments-content h4 {
    color: #f1f5f9 !important;
}
body[data-theme="dark"] #payments-content div[style*="background: #e8f5e8"] {
    background: rgba(42, 44, 55, 0.9) !important;
}
body[data-theme="dark"] #payments-content div[style*="color: #2d5a2d"] {
    color: #22c55e !important;
}
body[data-theme="dark"] #payments-content h4[style*="color: #2d5a2d"] {
    color: #22c55e !important;
}
body[data-theme="dark"] #payments-content strong {
    color: #e2e8f0;
}
body[data-theme="dark"] #payments-content div[style*="border-left: 3px solid"] {
    background: rgba(42, 44, 55, 0.6) !important;
    color: #cbd5e1 !important;
}
body[data-theme="dark"] #payments-content .extend-btn {
    background: rgba(99, 102, 241, 0.9) !important;
    color: #fff !important;
}
body[data-theme="dark"] .empty-state {
    color: #cbd5e1;
}
body[data-theme="dark"] .empty-state i {
    color: #64748b;
}
body[data-theme="dark"] .empty-state h3 {
    color: #f1f5f9;
}
body[data-theme="dark"] .form-label {
    color: #e2e8f0;
}
body[data-theme="dark"] .form-input {
    background: rgba(51, 65, 85, 0.8);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}
body[data-theme="dark"] .form-input:focus {
    border-color: #6366f1;
    background: rgba(51, 65, 85, 0.9);
}
body[data-theme="dark"] .form-input::placeholder {
    color: #94a3b8;
}
body[data-theme="dark"] .form-input option {
    background: rgba(51, 65, 85, 0.9);
    color: #f1f5f9;
}
body[data-theme="dark"] #current-time-remaining {
    background: rgba(42, 44, 55, 0.9) !important;
    color: #cbd5e1 !important;
}
body[data-theme="dark"] #extend-user-name {
    color: #cbd5e1 !important;
}
body[data-theme="dark"] #payments-user-name {
    color: #cbd5e1 !important;
}
body[data-theme="dark"] #approve-user-name {
    color: #cbd5e1 !important;
}
body[data-theme="dark"] #reject-user-name {
    color: #cbd5e1 !important;
}

body[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

body[data-theme="dark"] .auth-card-header h1 {
    color: #f8fafc;
}

body[data-theme="dark"] .auth-card-header p {
    color: #cbd5e1;
}

/* Información de Precios - Modo Oscuro */
body[data-theme="dark"] .pricing-card {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(76, 29, 149, 0.3);
}

body[data-theme="dark"] .pricing-card i {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body[data-theme="dark"] .pricing-content h3,
body[data-theme="dark"] .pricing-content .price {
    color: #f8fafc;
}

body[data-theme="dark"] .pricing-content .price-description {
    color: rgba(248, 250, 252, 0.9);
}

body[data-theme="dark"] .form-group label {
    color: #e2e8f0;
}

body[data-theme="dark"] .form-group input {
    background: rgba(15, 23, 42, 0.8);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body[data-theme="dark"] .form-group input::placeholder {
    color: #64748b;
}

body[data-theme="dark"] .password-toggle {
    color: #94a3b8;
}

body[data-theme="dark"] .password-toggle:hover {
    color: #e2e8f0;
}

body[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

body[data-theme="dark"] .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

body[data-theme="dark"] .auth-link {
    color: #94a3b8;
}

body[data-theme="dark"] .auth-link a {
    color: #6366f1;
}

body[data-theme="dark"] .auth-link a:hover {
    color: #818cf8;
}

body[data-theme="dark"] .auth-footer p {
    color: #64748b;
}

body[data-theme="dark"] .alert {
    background: rgba(15, 23, 42, 0.9);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .alert.error,
body[data-theme="dark"] .alert-error {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #fca5a5;
}

body[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #86efac;
}

body[data-theme="dark"] .alert-warning {
    background: rgba(251, 146, 60, 0.2);
    border-color: #fb923c;
    color: #fdba74;
}

body[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #93c5fd;
}

body[data-theme="dark"] .alert.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #86efac;
}

body[data-theme="dark"] .error-message {
    color: #fca5a5;
}

body[data-theme="dark"] .password-strength {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .strength-indicator.weak {
    background: #dc2626;
}

body[data-theme="dark"] .strength-indicator.fair {
    background: #f59e0b;
}

body[data-theme="dark"] .strength-indicator.good {
    background: #10b981;
}

body[data-theme="dark"] .strength-indicator.strong {
    background: #059669;
}

/* === TÉRMINOS Y CONDICIONES === */

.terms-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f4ff 0%, #e8f2ff 100%);
    position: relative;
}

.terms-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}

.terms-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
}

.terms-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.terms-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.terms-content {
    line-height: 1.6;
}

.terms-section {
    margin-bottom: 2rem;
}

.terms-section h2 {
    color: #6366f1;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
}

.terms-section p {
    color: #374151;
    margin-bottom: 1rem;
    text-align: justify;
}

.terms-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.terms-section li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.terms-section strong {
    color: #dc2626;
    font-weight: 600;
}

.contact-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.contact-info p {
    margin: 0;
    color: #475569;
}

.contact-info i {
    color: #6366f1;
    margin-right: 0.5rem;
}

.terms-footer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.terms-footer p {
    margin: 0.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.terms-footer p:first-child {
    font-weight: 600;
    color: #475569;
}

.terms-footer p:last-child {
    font-style: italic;
    color: #94a3b8;
}

.terms-actions {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.terms-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.terms-actions .btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.terms-actions .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.terms-actions .btn-secondary i {
    font-size: 0.9rem;
}

/* Dark mode para términos */
body[data-theme="dark"] .terms-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body[data-theme="dark"] .terms-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

body[data-theme="dark"] .terms-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .terms-header h1 {
    color: #f8fafc;
}

body[data-theme="dark"] .terms-header p {
    color: #cbd5e1;
}

body[data-theme="dark"] .terms-section h2 {
    color: #818cf8;
    border-left-color: #818cf8;
}

body[data-theme="dark"] .terms-section p,
body[data-theme="dark"] .terms-section li {
    color: #e2e8f0;
}

body[data-theme="dark"] .contact-info {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .contact-info p {
    color: #cbd5e1;
}

body[data-theme="dark"] .terms-footer {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body[data-theme="dark"] .terms-footer p {
    color: #94a3b8;
}

body[data-theme="dark"] .terms-footer p:first-child {
    color: #cbd5e1;
}

body[data-theme="dark"] .terms-footer p:last-child {
    color: #64748b;
}

body[data-theme="dark"] .terms-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .terms-actions .btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .terms-actions .btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Dark mode para checkboxes */
body[data-theme="dark"] .checkmark {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

body[data-theme="dark"] .checkbox-label a {
    color: #818cf8;
}

body[data-theme="dark"] .checkbox-label a:hover {
    color: #a5b4fc;
}

body[data-theme="dark"] .terms-info {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

body[data-theme="dark"] .terms-info p {
    color: #fbbf24;
}

body[data-theme="dark"] .terms-info strong {
    color: #fca5a5;
}

/* Responsive para términos */
@media (max-width: 768px) {
    .terms-card {
        padding: 2rem;
        max-height: 85vh;
    }
    
    .terms-header h1 {
        font-size: 1.6rem;
    }
    
    .terms-section h2 {
        font-size: 1.2rem;
    }
}

/* ========================================
   PÁGINA DE PROGRESO
======================================== */

/* Header de progreso */
.progress-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-indicator {
    background: #2563eb; /* Azul oscuro fijo para buen contraste */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-indicator i {
    opacity: 0.8;
}

.user-indicator strong {
    font-weight: 600;
}

.user-indicator span {
    color: white; /* Asegurar texto blanco visible */
}

/* Badge de suscripción (compacto en header) */
.subscription-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.subscription-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.subscription-badge i {
    font-size: 0.9rem;
}

/* Suscripción activa (verde) */
.subscription-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Suscripción expirada (rojo) */
.subscription-expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Sin suscripción (gris) */
.subscription-inactive {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* Responsive para badge de suscripción */
@media (max-width: 768px) {
    .subscription-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        margin-left: 0.5rem;
    }
    
    .subscription-badge i {
        font-size: 0.8rem;
    }
}


.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: translateX(-2px);
}

/* Main content */
.progress-main {
    margin-top: 100px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Summary cards */
.progress-summary {
    margin-bottom: 3rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-gradient));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.streak-card {
    --card-gradient: #ff6b6b, #ffa500;
}

.streak-card .card-icon {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.conversations-card {
    --card-gradient: #4ecdc4, #44a08d;
}

.conversations-card .card-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.time-card {
    --card-gradient: #a8e6cf, #7fcdcd;
}

.time-card .card-icon {
    background: linear-gradient(135deg, #a8e6cf, #7fcdcd);
}

.mood-card {
    --card-gradient: #ff9a9e, #fecfef;
}

.mood-card .card-icon {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.card-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Mood bar específica */
.mood-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.mood-fill {
    height: 100%;
    border-radius: 3px;
    transition: all 0.5s ease;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 50%, #4ecdc4 100%);
}

/* Chart section */
.progress-chart-section {
    margin-bottom: 3rem;
}

.chart-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color: #374151;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.chart-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-btn.active,
.chart-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Emotions section */
.emotions-section {
    margin-bottom: 3rem;
}

.emotions-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.emotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.emotion-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.emotion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--emotion-bg);
    opacity: 0.1;
    z-index: 0;
}

.emotion-card > * {
    position: relative;
    z-index: 1;
}

.joy-card { --emotion-bg: #ffd93d; }
.love-card { --emotion-bg: #ff6b9d; }
.optimism-card { --emotion-bg: #4ecdc4; }
.surprise-card { --emotion-bg: #a8e6cf; }
.sadness-card { --emotion-bg: #74b9ff; }
.fear-card { --emotion-bg: #fd79a8; }
.anger-card { --emotion-bg: #ff7675; }

.emotion-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.emotion-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151 !important;
    margin-bottom: 1rem;
}

.emotion-percentage,
.emotion-value {
    color: #374151 !important;
    font-weight: 600;
}

.emotion-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emotion-bar {
    flex: 1;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.emotion-fill {
    height: 100%;
    background: var(--emotion-bg);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.emotion-percent {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 35px;
}

/* Achievements section */
.achievements-section {
    margin-bottom: 3rem;
}

.achievements-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.achievement-badge {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.achievement-badge.earned {
    background: linear-gradient(135deg, #ffd93d, #ff6b9d);
    color: white;
    transform: scale(1.02);
}

.achievement-badge.locked {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    opacity: 0.7;
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.achievement-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.achievement-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Motivation section */
.motivation-section {
    margin-bottom: 2rem;
}

.motivation-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.motivation-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%"><stop offset="0%" stop-color="%23fff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle fill="url(%23a)" cx="10" cy="10" r="10"/><circle fill="url(%23a)" cx="30" cy="5" r="8"/><circle fill="url(%23a)" cx="60" cy="15" r="6"/><circle fill="url(%23a)" cx="80" cy="8" r="12"/></svg>');
    opacity: 0.3;
}

.motivation-container .section-title {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.motivation-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.motivation-content {
    margin-bottom: 1.5rem;
}

.motivation-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.continue-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Dark theme para progreso */
[data-theme="dark"] .progress-header {
    background: rgba(30, 41, 59, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-title,
[data-theme="dark"] .back-btn {
    color: #f1f5f9;
}

[data-theme="dark"] .back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .chart-container,
[data-theme="dark"] .emotions-container,
[data-theme="dark"] .achievements-container {
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] .emotion-card {
    background: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .emotion-name,
[data-theme="dark"] .emotion-percentage,
[data-theme="dark"] .emotion-value {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .card-value,
[data-theme="dark"] .section-title {
    color: #f1f5f9;
}

[data-theme="dark"] .chart-btn {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

[data-theme="dark"] .achievement-badge.locked {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

/* Responsive para progreso */
@media (max-width: 768px) {
    .progress-main {
        margin-top: 100px; /* Espacio normal para pacientes */
        padding: 1rem;
    }
    
    /* Solo aumentar espacio cuando admin ve a otro usuario */
    body.admin-viewing .progress-main {
        margin-top: 200px; /* Espacio extra para badges apilados */
    }
    
    .progress-header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .user-indicator,
    .subscription-badge {
        flex-basis: 100%;
        margin-left: 0;
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .emotions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .progress-main {
        margin-top: 90px; /* Espacio reducido para pacientes en móviles pequeños */
        padding: 0.75rem;
    }
    
    /* Solo aumentar espacio cuando admin ve a otro usuario */
    body.admin-viewing .progress-main {
        margin-top: 220px; /* Espacio extra para badges en móviles pequeños */
    }
    
    .progress-title {
        font-size: 1.25rem;
    }
    
    .card-value {
        font-size: 1.5rem;
    }
}

/* === ESTILOS PARA ADMIN - MODAL PACIENTES === */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.admin-patients-modal {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .admin-patients-modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.patients-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.patients-list {
    padding: 20px;
}

.patient-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.patient-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.patient-status {
    margin-right: 16px;
    font-size: 1.2rem;
}

.patient-info {
    flex: 1;
}

.patient-name {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.patient-email {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.patient-stats-mini {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

.patient-stats-mini .stat {
    font-size: 0.85rem;
    color: #667eea;
    background: #f0f3ff;
    padding: 2px 8px;
    border-radius: 12px;
}

.patient-last-active {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
}

.patient-actions {
    margin-left: 16px;
}

.view-progress-btn {
    color: #667eea;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.patient-card:hover .view-progress-btn {
    background: #667eea;
    color: white;
}

/* Estados de pacientes */
.status-active .status-indicator { opacity: 1; }
.status-recent .status-indicator { opacity: 0.8; }
.status-warning .status-indicator { opacity: 0.7; animation: pulse 2s infinite; }
.status-inactive .status-indicator { opacity: 0.6; animation: pulse 2s infinite; }
.status-never .status-indicator { opacity: 0.4; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === DARK MODE PARA MODAL DE PACIENTES === */
body[data-theme="dark"] .admin-patients-modal {
    background: #2a2d3a;
    color: #e1e5e9;
}

body[data-theme="dark"] .modal-header {
    border-bottom: 1px solid #404350;
}

body[data-theme="dark"] .patients-stats {
    background: #1f222a;
    border-bottom: 1px solid #404350;
}

body[data-theme="dark"] .stat-label {
    color: #a0a3aa;
}

body[data-theme="dark"] .patients-list {
    background: #2a2d3a;
}

body[data-theme="dark"] .patient-card {
    background: #343741;
    border-color: #404350;
    color: #e1e5e9;
}

body[data-theme="dark"] .patient-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

body[data-theme="dark"] .patient-name {
    color: #e1e5e9;
}

body[data-theme="dark"] .patient-email {
    color: #a0a3aa;
}

body[data-theme="dark"] .patient-stats-mini .stat {
    background: #1f222a;
    color: #667eea;
}

body[data-theme="dark"] .patient-last-active {
    color: #888a94;
}

body[data-theme="dark"] .view-progress-btn {
    border-color: #667eea;
    color: #667eea;
    background: transparent;
}

body[data-theme="dark"] .patient-card:hover .view-progress-btn {
    background: #667eea;
    color: white;
}

/* Responsive para modal de pacientes */
@media (max-width: 768px) {
    .admin-patients-modal {
        width: 95%;
        margin: 10px;
    }
    
    .patients-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .patient-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .patient-actions {
        margin-left: 0;
    }
}

/* Reglas adicionales para deshabilitar zoom en móviles */
input, textarea, select, button {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    touch-action: manipulation;
}

/* Prevenir double-tap zoom */
a, button, input, textarea {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Asegurar que los elementos interactivos mantengan funcionalidad */
.chat-input, 
.modern-input,
.modern-textarea,
.message,
.message-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Deshabilitar zoom en contenido no interactivo */
.modern-nav,
.welcome-section,
.feature-card {
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* ========================================
