/* Estilos para os modais de autenticação */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 2rem 2rem 1rem;
}

.modal-body {
    padding: 0 2rem 1rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
}

.modal-title {
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-outline-secondary {
    border-color: #000000 !important;
    color: #6c757d;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.toggle-password {
    border-left: none;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.text-decoration-none {
    color: #667eea;
    font-weight: 500;
}

.text-decoration-none:hover {
    color: #5a6fd8;
    text-decoration: underline !important;
}

.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.invalid-feedback {
    font-size: 0.875rem;
}

/* Loading states */
.login-btn-loading, 
.register-btn-loading, 
.forgot-btn-loading,
.profile-btn-loading {
    display: none;
}

.loading .login-btn-text,
.loading .register-btn-text,
.loading .forgot-btn-text,
.loading .profile-btn-text {
    display: none;
}

.loading .login-btn-loading,
.loading .register-btn-loading,
.loading .forgot-btn-loading,
.loading .profile-btn-loading {
    display: inline;
}

/* User menu dropdown styles */
.user-dropdown-menu {
    min-width: 280px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.user-dropdown-menu .dropdown-header {
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid #f8f9fa;
    margin-bottom: 0.5rem;
}

.user-dropdown-menu .user-info strong {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.user-dropdown-menu .user-info small {
    font-size: 0.8rem;
    color: #6c757d;
}

.user-dropdown-menu .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.user-dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    color: #6c757d;
}

.user-dropdown-menu .dropdown-item:hover i {
    color: #667eea;
}

.user-dropdown-menu .logout-link:hover {
    background-color: #fee;
    color: #dc3545;
}

.user-dropdown-menu .logout-link:hover i {
    color: #dc3545;
}

.user-dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
}

/* User avatar and menu toggle */
.user-menu-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: none;
    box-shadow: none;
}

.user-menu-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.user-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #667eea;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown toggle sem seta padrão */
.dropdown-toggle-none::after {
    display: none;
}

/* Dashboard e Profile specific styles */
.dashboard-header,
.profile-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.dashboard-title,
.profile-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle,
.profile-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e3e6f0;
}

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.dashboard-card-title i {
    color: #667eea;
}

.dashboard-nav,
.profile-nav {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    border: 1px solid #e3e6f0;
}

.dashboard-nav-link,
.profile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active,
.profile-nav-link:hover,
.profile-nav-link.active {
    background-color: #667eea;
    color: white;
    text-decoration: none;
}

.dashboard-nav-link.logout-btn:hover,
.profile-nav-link.logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

.dashboard-nav-link i,
.profile-nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
}

/* Profile tabs */
.profile-tab {
    display: none;
}

.profile-tab.active {
    display: block;
}

/* Subscription status styles */
.subscription-status {
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.subscription-status.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.subscription-status.inactive {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
}

.subscription-status .btn-outline-light {
    border-color: rgba(255,255,255,0.5);
    color: white;
}

.subscription-status .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: white;
}

/* Payment history styles */
.payment-header {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.payment-item {
    padding: 1rem;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.payment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.payment-status {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.payment-status.paid {
    background-color: #d4edda;
    color: #155724;
}

.payment-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.payment-status.failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Stats cards */
.stat-card .card {
    transition: transform 0.3s ease;
    border: 1px solid #e3e6f0;
}

.stat-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    opacity: 0.8;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* Subscription features list */
.subscription-features ul {
    margin-bottom: 0;
}

.subscription-features li {
    padding: 0.25rem 0;
    color: #495057;
}

.subscription-features .fa-check {
    color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-dropdown-menu {
        min-width: 250px;
        right: 0 !important;
        left: auto !important;
    }
    
    .dashboard-title,
    .profile-title {
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle,
    .profile-subtitle {
        font-size: 1rem;
    }
    
    .dashboard-card,
    .profile-nav {
        margin-bottom: 1rem;
    }
    
    .subscription-status {
        padding: 1.5rem;
    }
    
    .payment-item .row > div {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .user-avatar,
    .user-initial {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-dropdown-menu {
        min-width: 220px;
    }
}

/* Correções específicas para o dropdown do usuário logado */

/* User menu toggle - botão do dropdown */
.user-menu-toggle {
    display: flex !important;
    align-items: center !important;
    background: none !important;
    border: none !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.user-menu-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.user-menu-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
}

.user-menu-toggle:active {
    transform: scale(0.98) !important;
}

/* Remover seta padrão do Bootstrap */
.user-menu-toggle::after {
    display: none !important;
}

/* Avatar do usuário */
.user-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #667eea !important;
    margin-right: 0.5rem !important;
}

/* Inicial do usuário (quando não tem foto) */
.user-initial {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border: 2px solid #667eea !important;
    margin-right: 0.5rem !important;
}

/* Seta do dropdown customizada */
.dropdown-arrow {
    font-size: 0.75rem !important;
    color: #6c757d !important;
    transition: transform 0.3s ease !important;
    margin-left: 0.25rem !important;
}

/* Rotação da seta quando dropdown está aberto */
.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg) !important;
}

/* Menu dropdown do usuário */
/* CSS Simplificado para corrigir dropdown do usuário */

/* Botão do dropdown - remover conflitos */
.user-menu-toggle {
    background: none !important;
    border: none !important;
    padding: 0.5rem !important;
    border-radius: 50px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.user-menu-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.user-menu-toggle:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25) !important;
}

/* Remover seta padrão do Bootstrap */
.user-menu-toggle::after {
    display: none !important;
}

/* Avatar */
.user-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid #667eea !important;
    margin-right: 0.5rem !important;
}

.user-initial {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border: 2px solid #667eea !important;
    margin-right: 0.5rem !important;
}

/* Seta customizada */
.dropdown-arrow {
    font-size: 0.75rem !important;
    color: #6c757d !important;
    transition: transform 0.3s ease !important;
}

.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg) !important;
}

/* Menu dropdown */
.user-dropdown-menu {
    min-width: 280px !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    background: white !important;
    z-index: 1050 !important;
    
    /* Posicionamento */
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    
    /* Estado inicial */
    opacity: 0 !important;
    transform: scale(0.95) translateY(-10px) !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    pointer-events: none !important;
}

/* Menu dropdown quando aberto */
.user-dropdown-menu.show {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    visibility: visible !important;
    pointer-events: all !important;
}

/* Items do dropdown */
.user-dropdown-menu .dropdown-header {
    padding: 1rem 1.5rem 0.5rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin-bottom: 0.5rem !important;
}

.user-dropdown-menu .user-info strong {
    font-weight: 600 !important;
    color: #2c3e50 !important;
    font-size: 0.95rem !important;
}

.user-dropdown-menu .user-info small {
    font-size: 0.8rem !important;
    color: #6c757d !important;
}

.user-dropdown-menu .dropdown-item {
    padding: 0.75rem 1.5rem !important;
    color: #495057 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    transition: background-color 0.2s ease !important;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #667eea !important;
    text-decoration: none !important;
}

.user-dropdown-menu .dropdown-item i {
    width: 20px !important;
    text-align: center !important;
    margin-right: 0.75rem !important;
    color: #6c757d !important;
}

.user-dropdown-menu .dropdown-item:hover i {
    color: #667eea !important;
}

.user-dropdown-menu .logout-link:hover {
    background-color: #fff5f5 !important;
    color: #dc3545 !important;
}

.user-dropdown-menu .logout-link:hover i {
    color: #dc3545 !important;
}

.user-dropdown-menu .dropdown-divider {
    margin: 0.5rem 0 !important;
    border-color: #f0f0f0 !important;
}

/* Container do dropdown */
.dropdown {
    position: relative !important;
}

/* Responsive */
@media (max-width: 768px) {
    .user-dropdown-menu {
        min-width: 250px !important;
        margin-right: 1rem !important;
    }
    
    .user-avatar,
    .user-initial {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
}