/*======================================================================
# MEU_PERFIL.CSS - Sidebar de Edição de Perfil
======================================================================*/

/*======================================================================
# OVERLAY E SIDEBAR BASE
======================================================================*/
.profile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.profile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.profile-sidebar {
  position: fixed;
  top: 0;
  right: -500px;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  background: white;
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.profile-sidebar.active {
  right: 0;
}

/*======================================================================
# HEADER
======================================================================*/
.profile-header {
  padding: 24px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-header-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.profile-header-info p {
  font-size: 13px;
  margin: 0;
  opacity: 0.9;
}

.profile-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.profile-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/*======================================================================
# CONTEÚDO
======================================================================*/
.profile-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.profile-content::-webkit-scrollbar {
  width: 8px;
}

.profile-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.profile-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.profile-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/*======================================================================
# SEÇÕES
======================================================================*/
.profile-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.profile-section-title i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.btn-edit-section {
  background: #f3f4f6;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-section:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.btn-edit-section.editing {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/*======================================================================
# FORMULÁRIOS
======================================================================*/
.profile-form-group {
  margin-bottom: 18px;
}

.profile-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.profile-form-label i {
  margin-right: 6px;
  color: #ec4899;
}

.profile-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.profile-form-input:focus {
  outline: none;
  border-color: #ec4899;
  background: white;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.profile-form-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.profile-form-input.error {
  border-color: #ef4444;
}

.profile-form-error {
  display: none;
  font-size: 12px;
  color: #ef4444;
  margin-top: 6px;
}

.profile-form-error.show {
  display: block;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/*======================================================================
# INFO DISPLAY (quando não está editando)
======================================================================*/
.profile-info-display {
  display: grid;
  gap: 12px;
}

.profile-info-item {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.profile-info-item i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.profile-info-content {
  flex: 1;
}

.profile-info-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.profile-info-value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.profile-info-empty {
  font-size: 14px;
  color: #9ca3af;
  font-style: italic;
}

/*======================================================================
# BOTÕES DE AÇÃO
======================================================================*/
.profile-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-profile-save,
.btn-profile-cancel {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}

.btn-profile-save {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-profile-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-profile-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-profile-cancel {
  background: #f3f4f6;
  color: #374151;
}

.btn-profile-cancel:hover {
  background: #e5e7eb;
}

/*======================================================================
# SEÇÃO DE SENHA
======================================================================*/
.password-toggle-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  transition: color 0.3s ease;
}

.password-toggle-btn:hover {
  color: #ec4899;
}

.password-input-wrapper {
  position: relative;
}

.password-strength {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-bar.weak {
  width: 33%;
  background: #ef4444;
}

.password-strength-bar.medium {
  width: 66%;
  background: #f59e0b;
}

.password-strength-bar.strong {
  width: 100%;
  background: #10b981;
}

.password-strength-text {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}

.password-strength-text.weak {
  color: #ef4444;
}

.password-strength-text.medium {
  color: #f59e0b;
}

.password-strength-text.strong {
  color: #10b981;
}

/*======================================================================
# ALERTS
======================================================================*/
.profile-alert {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-alert i {
  font-size: 18px;
}

.profile-alert.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.profile-alert.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.profile-alert.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

/*======================================================================
# LOADING
======================================================================*/
.profile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
}

.profile-loading i {
  font-size: 32px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/*======================================================================
# RESPONSIVE
======================================================================*/
@media (max-width: 768px) {
  .profile-sidebar {
    max-width: 100%;
    right: -100%;
  }
  
  .profile-content {
    padding: 16px;
  }
  
  .profile-section {
    padding: 16px;
  }
  
  .profile-form-row {
    grid-template-columns: 1fr;
  }
  
  .profile-header {
    padding: 16px;
  }
  
  .profile-avatar-large {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  
  .profile-header-info h3 {
    font-size: 16px;
  }
}