.profile-view {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeInUp 0.5s ease-out;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--glass-shadow);
}

.profile-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary-faint);
  color: var(--primary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-info h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.profile-role {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-pill {
  color: var(--primary);
  font-weight: 600;
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--glass-shadow);
}

.profile-section h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-section-sub {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.profile-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.profile-field input {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}

.profile-field input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.profile-field input:disabled {
  opacity: 0.6;
}

.profile-field-row {
  display: flex;
  gap: 0.85rem;
}

.profile-helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-btn-secondary {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.profile-btn-secondary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.profile-feedback {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.profile-feedback--ok {
  background: var(--primary-faint);
  color: var(--primary);
  border: 1px solid var(--primary-ring);
}

.profile-feedback--err {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.2rem;
}

.profile-btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s, opacity 0.15s;
}

.profile-btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.profile-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-link-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.8rem 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: background 0.12s ease;
}

.profile-link-row:last-child {
  border-bottom: none;
}

.profile-link-row:hover {
  background: var(--surface-muted);
}

.profile-link-row-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

.profile-link-row-label {
  flex: 1;
  font-weight: 500;
}

.profile-link-row-chevron {
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
}

.profile-link-row--danger {
  color: #b91c1c;
}

.profile-link-row--danger:hover {
  background: rgba(185, 28, 28, 0.06);
}

@media (max-width: 540px) {
  .profile-field-row {
    flex-direction: column;
    gap: 0.95rem;
  }

  .profile-header {
    padding: 1.1rem 1.1rem;
  }

  .profile-section {
    padding: 1.1rem 1.1rem;
  }
}
