
:root {
    --pharma-blue: #304f9e;
    --pharma-yellow: #f3e02e;
    --pharma-light-blue: #e3f2fd;
    --pharma-dark-blue: #1a2d5f;
    --pharma-gradient: linear-gradient(135deg, var(--pharma-blue) 0%, #4a6bb8 100%);
    --pharma-yellow-gradient: linear-gradient(135deg, var(--pharma-yellow) 0%, #ffe066 100%);
    --shadow-light: 0 2px 10px rgba(48, 79, 158, 0.08);
    --shadow-medium: 0 4px 20px rgba(48, 79, 158, 0.12);
    --shadow-heavy: 0 8px 30px rgba(48, 79, 158, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
.modern-pharma-profile {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* Hero Section */
.hero-section {
    background: var(--pharma-gradient);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::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 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="25" cy="75" r="0.5" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="25" r="0.5" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.welcome-badge i {
    margin-right: 0.5rem;
    color: var(--pharma-yellow);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-username {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .highlight,
.hero-username .highlight {
    color: var(--pharma-yellow);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 500px;
}

.hero-avatar {
    text-align: center;
}

.hero-content {
    text-align: center;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid var(--pharma-yellow);
    font-size: 3rem;
    color: white;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.avatar-circle .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    border-radius: 50%;
    cursor: pointer;
}

.avatar-overlay i {
    color: white;
    font-size: 1.5rem;
}

.avatar-circle:hover .avatar-overlay {
    opacity: 1;
}

.avatar-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.user-name h4 {
    color: white;
    font-weight: 900;
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.btn-edit-profile {
    background: var(--pharma-yellow-gradient);
    color: var(--pharma-blue);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(243, 224, 46, 0.3);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-edit-profile i {
    margin-right: 0.5rem;
}

.btn-edit-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 224, 46, 0.4);
    color: var(--pharma-blue);
}

/* Stats Section */
.stats-section .row {
    --bs-gutter-x: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 140px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--pharma-blue);
}

.stat-card-recetas::before { background: var(--pharma-blue); }
.stat-card-compras::before { background: var(--pharma-yellow); }
.stat-card-conversaciones::before { background: #10b981; }

.clickable-card {
    cursor: pointer;
    user-select: none;
}

.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.stat-content {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
    color: var(--pharma-blue);
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-card-compras .stat-icon { 
    color: var(--pharma-yellow);
}

.stat-card-conversaciones .stat-icon { 
    color: #10b981;
}

/* Animación que se activa por clic */
.stat-card.animate-click .stat-icon {
    animation: clickFloat 1.5s ease-in-out;
}

@keyframes clickFloat {
    0% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-15px) scale(1.1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    75% {
        transform: translateY(-15px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pharma-blue);
    margin: 0;
    line-height: 1;
}

.stat-label {
    color: #6c757d;
    font-weight: 600;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

/* User Info Section */
.info-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
}

.info-header {
    background: var(--pharma-gradient);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.info-header i {
    color: var(--pharma-yellow);
    margin-right: 0.5rem;
}

.btn-edit-info {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: auto;
    height: auto;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.btn-edit-info:hover {
    color: var(--pharma-yellow);
    transform: translateY(-2px) scale(1.1);
    text-shadow: 0 4px 8px rgba(243, 224, 46, 0.3);
}

.btn-edit-info:focus {
    outline: none;
    color: var(--pharma-yellow);
}

.btn-edit-info i {
    font-size: 1.2rem;
    transition: var(--transition);
}

/* Botón de Editar Perfil en Header */
.btn-edit-profile-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.btn-edit-profile-header:hover {
    background: var(--pharma-yellow);
    color: var(--pharma-blue);
    border-color: var(--pharma-yellow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 224, 46, 0.4);
}

.btn-edit-profile-header:focus {
    outline: none;
    background: var(--pharma-yellow);
    color: var(--pharma-blue);
}

.btn-edit-profile-header span {
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.info-body {
    padding: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--pharma-light-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--pharma-blue);
    font-size: 1.2rem;
}

.info-details label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-details span {
    font-size: 1.1rem;
    color: var(--pharma-dark-blue);
    font-weight: 600;
}

/* Modern Modal */
.modern-modal {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: none;
}

.modern-modal .modal-header {
    background: var(--pharma-gradient);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modern-modal .modal-title {
    font-weight: 700;
}

.modern-modal .input-group-text {
    background: var(--pharma-light-blue);
    border: 1px solid #e3f2fd;
    color: var(--pharma-blue);
}

.modern-modal .form-control {
    border: 1px solid #e3f2fd;
    border-radius: 8px;
}

.modern-modal .form-control:focus {
    border-color: var(--pharma-blue);
    box-shadow: 0 0 0 0.2rem rgba(48, 79, 158, 0.25);
}

.btn-pharma-primary {
    background: var(--pharma-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-secondary {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
}

/* Regla específica adicional para Bootstrap */
.btn.btn-secondary {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

/* Regla global para todos los botones en modal-footer */
.modal-footer .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.modal-footer .btn:last-child {
    margin-right: 0;
}

/* Reglas súper específicas para sobrescribir Bootstrap */
.modal .modal-dialog .modal-content .modal-footer .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
}

.modal .modal-dialog .modal-content .modal-footer .btn.btn-secondary {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

.modal .modal-dialog .modal-content .modal-footer .btn.btn-pharma-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

.btn-pharma-primary:hover {
    background: linear-gradient(135deg, var(--pharma-dark-blue) 0%, var(--pharma-blue) 100%);
    color: white;
    transform: translateY(-1px);
}

/* Estilos específicos para modal de editar perfil */
#editarPerfilModal .modal-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

#editarPerfilModal .form-label {
    color: var(--pharma-dark-blue);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

#editarPerfilModal .form-label i {
    color: var(--pharma-blue);
    margin-right: 0.5rem;
    font-size: 1rem;
}

#editarPerfilModal .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

#editarPerfilModal .input-group-text {
    background: var(--pharma-light-blue);
    border: 1px solid #e3f2fd;
    color: var(--pharma-blue);
    font-weight: 500;
    border-right: none;
}

#editarPerfilModal .input-group-text.bg-light {
    background: #f1f3f5 !important;
    color: #6c757d !important;
}

#editarPerfilModal .form-control {
    border: 1px solid #e3f2fd;
    border-left: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#editarPerfilModal .form-control:focus {
    border-color: var(--pharma-blue);
    box-shadow: 0 0 0 0.2rem rgba(48, 79, 158, 0.15);
    transform: translateY(-1px);
}

#editarPerfilModal .form-control.bg-light {
    background-color: #f8f9fa !important;
    color: #6c757d;
    border-color: #dee2e6;
}

#editarPerfilModal .form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

#editarPerfilModal .form-text i {
    color: #17a2b8;
    margin-right: 0.25rem;
}

#editarPerfilModal .modal-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid #e3f2fd;
}

/* Estilos específicos para botones del modal footer */
#editarPerfilModal .modal-footer .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border-radius: 6px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

#editarPerfilModal .modal-footer .btn i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

#editarPerfilModal .modal-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    margin-right: 0.75rem;
}

#editarPerfilModal .modal-footer .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

#editarPerfilModal .modal-footer .btn-pharma-primary {
    background: var(--pharma-gradient);
    border: none;
    color: white;
}

#editarPerfilModal .modal-footer .btn-pharma-primary:hover {
    background: linear-gradient(135deg, var(--pharma-dark-blue) 0%, var(--pharma-blue) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(48, 79, 158, 0.3);
}

/* Estilos consistentes para todos los modales */
.modern-modal .modal-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.modern-modal .modal-footer .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.modern-modal .modal-footer .btn i {
    font-size: 0.85rem;
}

.modern-modal .modal-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    margin-right: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
}

.modern-modal .modal-footer .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-pharma-primary-dark {
    background: linear-gradient(135deg, #1a2d5f 0%, #2a4080 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-pharma-primary-dark:hover {
    background: linear-gradient(135deg, #0f1a3f 0%, #1a2d5f 100%);
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-secondary-dark {
    background: #4a5568;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-secondary-dark:hover {
    background: #2d3748;
    color: white;
    transform: translateY(-1px);
}

/* Modern Tabs */
.modern-tabs {
    margin-top: 2rem;
}

.modern-tabs .nav-pills {
    background: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.modern-tabs .nav-link {
    background: transparent;
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    margin: 0 0.25rem;
}

.modern-tabs .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.modern-tabs .nav-link:hover {
    background: var(--pharma-light-blue);
    color: var(--pharma-blue);
}

.modern-tabs .nav-link.active {
    background: var(--pharma-gradient);
    color: white;
    box-shadow: var(--shadow-medium);
}

.modern-tab-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 2rem;
    margin-top: 1rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid #f1f3f4;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.card-badge.primary { background: var(--pharma-blue); color: white; }
.card-badge.warning { background: var(--pharma-yellow); color: var(--pharma-blue); }
.card-badge.success { background: #10b981; color: white; }

.card-status {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.card-status.approved { background: #e6f7e1; color: #2d5016; }
.card-status.rejected { background: #fee2e2; color: #991b1b; }
.card-status.pending { background: #e5e7eb; color: #374151; }
.card-status.active { background: #dbeafe; color: #1e40af; }

.card-body-modern {
    padding: 1.5rem;
}

.card-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #6c757d;
}

.card-info-row:last-child {
    margin-bottom: 0;
}

.card-info-row i {
    width: 20px;
    margin-right: 0.75rem;
    color: var(--pharma-blue);
}

.card-footer-modern {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-modern {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
}

.btn-modern i {
    margin-right: 0.5rem;
}

.btn-view {
    background: #f1f5f9;
    color: var(--pharma-blue);
    border: 1px solid #e2e8f0;
}

.btn-view:hover {
    background: var(--pharma-blue);
    color: white;
    text-decoration: none;
}

.btn-pay {
    background: var(--pharma-yellow-gradient);
    color: var(--pharma-blue);
}

.btn-pay:hover {
    background: linear-gradient(135deg, #ffe066 0%, var(--pharma-yellow) 100%);
    color: var(--pharma-blue);
    text-decoration: none;
    transform: translateY(-1px);
}

.rejection-notice {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-top: 1px solid #fecaca;
    font-size: 0.9rem;
}

.rejection-notice i {
    margin-right: 0.5rem;
}

.rejection-notice small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Avatar Modal Styles */
.avatar-grid-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    background: #f8f9fa;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--pharma-blue) #e3f2fd;
}

.avatar-grid-container::-webkit-scrollbar {
    width: 8px;
}

.avatar-grid-container::-webkit-scrollbar-track {
    background: #e3f2fd;
    border-radius: 4px;
}

.avatar-grid-container::-webkit-scrollbar-thumb {
    background: var(--pharma-blue);
    border-radius: 4px;
    border: 2px solid #e3f2fd;
}

.avatar-grid-container::-webkit-scrollbar-thumb:hover {
    background: var(--pharma-dark-blue);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.avatar-option {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    aspect-ratio: 1;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: var(--transition);
}

.avatar-option:hover {
    border-color: var(--pharma-blue);
    transform: scale(1.08);
    box-shadow: var(--shadow-medium);
    z-index: 2;
}

.avatar-option.selected {
    border-color: var(--pharma-yellow);
    box-shadow: 0 0 0 3px var(--pharma-blue);
    transform: scale(1.12);
    z-index: 3;
}

.avatar-check {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--pharma-yellow);
    color: var(--pharma-blue);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    opacity: 0;
    transition: var(--transition);
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.avatar-option.selected .avatar-check {
    opacity: 1;
    transform: scale(1);
}

.avatar-option:hover .avatar-check {
    opacity: 0.8;
}

#avatarModal .modal-body {
    text-align: center;
    padding: 1.5rem;
}

#avatarModal .modal-body p {
    color: #6c757d;
    font-weight: 500;
}

/* Estilos para Modal de Detalles de Receta */
#recetaModal .modal-dialog {
    max-width: 900px;
}

.receta-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.info-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.info-group.full-width {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.info-group label {
    color: var(--pharma-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.info-group label i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.info-group span {
    color: var(--pharma-dark-blue);
    font-weight: 500;
    font-size: 1rem;
}

.price-highlight {
    color: var(--pharma-yellow) !important;
    background: var(--pharma-blue);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700 !important;
    display: inline-block;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.approved { background: #e6f7e1; color: #2d5016; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.status-badge.pending { background: #e5e7eb; color: #374151; }
.status-badge.cotizado { background: #dbeafe; color: #1e40af; }
.status-badge.ingresado { background: #fef3c7; color: #92400e; }

.mensaje-box {
    background: white;
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    color: var(--pharma-dark-blue);
    font-style: italic;
    min-height: 60px;
    margin-top: 0.5rem;
}

.receta-imagen-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    height: fit-content;
}

.receta-imagen-container h6 {
    color: var(--pharma-blue);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.receta-imagen-container h6 i {
    margin-right: 0.5rem;
    color: var(--pharma-yellow);
}

.imagen-preview {
    border: 2px dashed #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagen-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.imagen-preview .no-imagen {
    color: #6c757d;
    font-style: italic;
}

.imagen-preview .pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--pharma-blue);
}

.imagen-preview .pdf-preview i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #dc3545;
}

.imagen-preview .pdf-preview .btn {
    margin-top: 1rem;
}

/* Estilos específicos para el modal de compra */
.compra-info .info-group {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.compra-info .info-group:nth-child(odd) {
    background-color: #e9ecef;
}

.compra-info .info-group:nth-child(even) {
    background-color: #ffffff;
}

.compra-info .info-group:hover {
    background-color: var(--pharma-light-blue);
}

.compra-info .info-group:last-child {
    margin-bottom: 0;
}

.compra-info .info-group label {
    color: var(--pharma-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

.compra-info .info-group label i,
.receta-info .info-group label i {
    color: var(--pharma-blue);
}

.compra-info .info-group span {
    color: var(--pharma-dark-blue);
    font-weight: 500;
    font-size: 1rem;
}

.compra-info .info-group.full-width {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.productos-list {
    background: white;
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.producto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.producto-item:last-child {
    border-bottom: none;
}

.producto-info {
    flex: 1;
}

.producto-nombre {
    font-weight: 600;
    color: var(--pharma-dark-blue);
    margin-bottom: 0.25rem;
}

.producto-cantidad {
    color: #6c757d;
    font-size: 0.9rem;
}

.producto-precio {
    color: var(--pharma-blue);
    font-weight: 700;
    font-size: 1.1rem;
}

.compra-resumen-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
}

.compra-resumen-container h6 {
    color: var(--pharma-blue);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.compra-resumen-container h6 i {
    margin-right: 0.5rem;
    color: var(--pharma-yellow);
}

.compra-resumen {
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.resumen-item:last-child {
    margin-bottom: 0;
}

.resumen-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--pharma-blue);
    padding-top: 0.5rem;
}

.resumen-label {
    color: #6c757d;
    font-weight: 500;
}

.resumen-value {
    color: var(--pharma-dark-blue);
    font-weight: 600;
}

.resumen-value.total-price {
    color: var(--pharma-blue);
    font-weight: 700;
}

.resumen-divider {
    margin: 0.75rem 0;
    border-color: #e3f2fd;
}

/* Estilos específicos para el modal de conversaciones */
.conversacion-info .info-group {
    margin-bottom: 0.75rem;
}

.conversacion-info .info-group:last-child {
    margin-bottom: 0;
}

.conversacion-info .info-group label {
    color: var(--pharma-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

.conversacion-info .info-group label i {
    color: var(--pharma-blue);
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.conversacion-info .info-group span {
    color: var(--pharma-dark-blue);
    font-weight: 500;
    font-size: 1rem;
}

.comentario-box {
    background: white;
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    color: var(--pharma-dark-blue);
    line-height: 1.6;
    min-height: 60px;
    margin-top: 0.5rem;
    font-style: italic;
}

.conversacion-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
}

.conversacion-container h6 {
    color: var(--pharma-blue);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.conversacion-container h6 i {
    margin-right: 0.5rem;
    color: var(--pharma-yellow);
}

.conversacion-list {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.conversacion-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.conversacion-item:last-child {
    border-bottom: none;
}

.conversacion-autor {
    font-weight: 600;
    color: var(--pharma-blue);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.conversacion-autor i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.conversacion-autor.cliente {
    color: var(--pharma-dark-blue);
}

.conversacion-autor.soporte {
    color: var(--pharma-yellow);
    background: var(--pharma-blue);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.conversacion-mensaje {
    color: var(--pharma-dark-blue);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.conversacion-fecha {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .row {
        text-align: center;
    }
    
    .hero-section .col-md-3:first-child {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-section .col-md-6 {
        order: 2;
        margin-bottom: 2rem;
    }
    
    .hero-section .col-md-3:last-child {
        order: 3;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-username {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .avatar-circle {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .avatar-edit-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
        top: -3px;
        right: -3px;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .avatar-grid-container {
        max-height: 350px;
    }
    
    .avatar-check {
        width: 20px;
        height: 20px;
        font-size: 9px;
        top: -3px;
        right: -3px;
    }
    
    .user-name h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        font-weight: 900;
    }
    
    .btn-edit-profile {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .stats-section .row {
        --bs-gutter-x: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        height: auto;
    }
    
    .stat-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modern-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .modern-tabs .nav-link span {
        display: none;
    }
    
    .modern-tab-content {
        padding: 1rem;
    }
    
    /* Estilos responsive para header actions */
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-edit-profile-header {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .btn-edit-profile-header span {
        display: none;
    }
    
    .btn-edit-info {
        padding: 6px;
    }
}

/* Media Query para dispositivos muy pequeños */
@media (max-width: 480px) {
    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        padding: 0.6rem;
    }
    
    .avatar-grid-container {
        max-height: 300px;
    }
    
    #avatarModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #avatarModal .modal-body {
        padding: 1rem;
    }
    
    .avatar-check {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-username {
        font-size: 1.8rem;
    }
    
    .stats-section .row {
        --bs-gutter-x: 1rem;
    }
}

/* ===== REGLA FINAL SÚPER ESPECÍFICA PARA BOTONES ===== */
/* Esta regla tiene máxima especificidad para sobrescribir Bootstrap */
.modern-pharma-profile .modal .modal-dialog .modal-content .modal-footer .btn,
.modern-pharma-profile .modal-footer .btn,
#editarPerfilModal .modal-footer .btn,
#avatarModal .modal-footer .btn,
#recetaModal .modal-footer .btn,
#compraModal .modal-footer .btn,
#reclamoModal .modal-footer .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    box-sizing: border-box !important;
}