/* Profile Styles */
.profile-view {
  animation: fadeIn 0.3s ease-out;
}

.profile-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-info-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
  gap: 1rem !important;
}

.profile-info-row > * {
  min-width: 0;
  overflow: hidden;
}

/* Profile Card */
.profile-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 1100px) {
  .profile-info-row {
    grid-template-columns: 1fr !important;
  }
}

.profile-avatar {
  flex-shrink: 0;
}

.avatar-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-circle span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  border: 4px solid rgba(255, 255, 255, 0.3);
}

#userInitials {
  font-size: 2.5rem;
  font-weight: 700;
}

.profile-info {
  flex: 1;
  text-align: left;
}

.profile-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.profile-info p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  opacity: 0.9;
}

.profile-role {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

/* Profile Avatar Upload */
.profile-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.avatar-preview-profile {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid #e5e7eb;
}

.avatar-preview-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-profile span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.avatar-upload-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-upload-controls .form-control {
  max-width: 200px;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
}

.avatar-upload-controls .btn-sm {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.25rem;
}

.profile-avatar-upload small {
  font-size: 0.6875rem;
  text-align: center;
  line-height: 1.3;
}

/* Profile Details Card */
.profile-details-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-details-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.profile-field {
  margin-bottom: 1.25rem;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.profile-value {
  font-size: 1rem;
  color: #1f2937;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

/* Profile Stats Card */
.profile-stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-stats-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.profile-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.profile-stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.profile-stat-item .stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}

/* Preferences Card */
.profile-preferences-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-preferences-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.preference-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.preference-item:last-child {
  border-bottom: none;
}

.preference-info {
  flex: 1;
  margin-right: 1rem;
}

.preference-label {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.preference-desc {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #6366f1;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Profile Actions */
.profile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-actions button {
    width: 100%;
  }
}

