/* profile.css - Estilos específicos para a página de perfil */

/* Hero do perfil */
.profile-hero .trophy-container {
    background: linear-gradient(135deg, #070738 0%, #1E40AF 100%);
}

/* Grid de informações do perfil */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.profile-info-item {
    background: #F9FAFB;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.profile-info-item:hover {
    border-color: #DC2626;
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #070738;
}

/* Cards de estatísticas */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(7, 7, 56, 0.1);
    border-color: #070738;
}

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

.stat-details {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #070738;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6B7280;
}

/* Gráficos de progresso */
.progress-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.chart-container {
    text-align: center;
}

.chart-container h4 {
    color: #070738;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.progress-circle-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-circle {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    stroke: #E5E7EB;
}

.progress-circle-fill {
    transition: stroke-dashoffset 1s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #070738;
}

/* Timeline de atividades */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.activity-item.correct {
    border-left-color: #4CAF50;
}

.activity-item.incorrect {
    border-left-color: #DC2626;
}

.activity-item.watched {
    border-left-color: #2196F3;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-icon.question {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.activity-icon.video {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.activity-icon.redacao {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: #070738;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.activity-time {
    color: #6B7280;
    font-size: 0.85rem;
}

/* Avatar no sidebar */
.profile-avatar-large {
    position: relative;
    margin: -2rem auto 1rem;
    width: 100px;
    height: 100px;
}

.avatar-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #DC2626;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
    position: relative;
    z-index: 2;
}

.avatar-glow {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 2s infinite;
}

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

.profile-name {
    font-size: 1.3rem;
    color: #070738;
    margin: 0.5rem 0 0.25rem;
}

.profile-email {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-badges .badge {
    padding: 0.4rem 1rem;
    background: #F3F4F6;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #070738;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
}

/* Cursos na sidebar */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.course-item-small {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    border-left: 4px solid #DC2626;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-item-small:hover {
    background: #FFFFFF;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.course-icon-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.course-icon-small.psc {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
}

.course-icon-small.sis {
    background: rgba(7, 7, 56, 0.1);
    color: #070738;
}

.course-icon-small.enem {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(7, 7, 56, 0.1));
    color: #6B21A8;
}

.course-info-small {
    flex: 1;
}

.course-info-small h4 {
    color: #070738;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.course-info-small p {
    color: #6B7280;
    font-size: 0.75rem;
}

/* Informações do sistema */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.system-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
}

.system-item i {
    font-size: 1.3rem;
}

.system-item div {
    flex: 1;
}

.system-label {
    display: block;
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.25rem;
}

.system-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #070738;
}

/* Formulários no modal */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #070738;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input:disabled {
    background: #F3F4F6;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6B7280;
}

/* Ver todos os cursos */
.ver-todos-btn {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

/* Responsivo */
@media (max-width: 768px) {
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .progress-charts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .activity-item {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-details {
        text-align: center;
    }
    
    .profile-badges {
        flex-direction: column;
    }
    
    .profile-badges .badge {
        width: 100%;
        justify-content: center;
    }
}

/* Modal de Edição e Alterar Senha */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #070738 0%, #1E40AF 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: #DC2626;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

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

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    padding: 1.5rem;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Tabs dentro do modal */
.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 0.5rem;
}

.modal-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-tab i {
    font-size: 1rem;
}

.modal-tab:hover {
    color: #070738;
    background: #F3F4F6;
}

.modal-tab.active {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.1);
    position: relative;
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: #DC2626;
}

/* Conteúdo das tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #070738;
    font-size: 0.9rem;
}

.form-label i {
    color: #DC2626;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: #F9FAFB;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #DC2626;
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input:disabled {
    background: #F3F4F6;
    cursor: not-allowed;
    color: #9CA3AF;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6B7280;
}

.form-hint i {
    color: #DC2626;
    font-size: 0.7rem;
    margin-right: 0.25rem;
}

/* Campos de senha */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #DC2626;
}

/* Validação de senha */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-progress {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-progress.weak {
    width: 33.33%;
    background: #DC2626;
}

.strength-progress.medium {
    width: 66.66%;
    background: #F59E0B;
}

.strength-progress.strong {
    width: 100%;
    background: #10B981;
}

.strength-text {
    font-size: 0.75rem;
    color: #6B7280;
}

.strength-text span {
    font-weight: 600;
}

/* Requisitos de senha */
.password-requirements {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    padding: 1rem;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #6B7280;
}

.password-requirements li i {
    font-size: 0.8rem;
    width: 16px;
}

.password-requirements li.valid {
    color: #10B981;
}

.password-requirements li.valid i {
    color: #10B981;
}

.password-requirements li.invalid {
    color: #DC2626;
}

.password-requirements li.invalid i {
    color: #DC2626;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-accent {
    background: #DC2626;
    color: white;
}

.btn-accent:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.3);
}

.btn-outline {
    background: transparent;
    color: #070738;
    border: 2px solid #E5E7EB;
}

.btn-outline:hover {
    border-color: #DC2626;
    background: rgba(220, 38, 38, 0.05);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Informações do CPF na sidebar */
.system-item .cpf-value {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsivo */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
    }
    
    .modal-tabs {
        flex-direction: column;
    }
    
    .modal-tab.active::after {
        display: none;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}