/* ============================================
   Profile page styles — profile#show, profile#edit
   Mobile-first, single breakpoint at 600px.
   Uses design tokens from application.css :root.
   ============================================ */

.profile-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* ============================================
   Profile header with avatar
   ============================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.profile-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  border-radius: 50%;
  letter-spacing: 0.02em;
}

.profile-identity h1 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  margin: 0;
  line-height: 1.3;
}

.profile-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--spacing-xs);
}

/* ============================================
   Flash notice
   ============================================ */
.profile-notice {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid var(--color-success);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium);
}

/* ============================================
   Profile card
   ============================================ */
.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.profile-card h2 {
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  margin: 0 0 var(--spacing-lg);
}

.profile-card-description {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0 0 var(--spacing-lg);
  line-height: 1.6;
}

.profile-card--danger {
  border-color: var(--color-danger-light);
}

.profile-card--danger h2 {
  color: var(--color-text);
}

/* ============================================
   Profile details (definition list)
   ============================================ */
.profile-details {
  margin: 0;
}

.profile-details dt {
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--spacing-xs);
}

.profile-details dd {
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
}

/* ============================================
   Profile actions
   ============================================ */
.profile-actions {
  margin-top: var(--spacing-lg);
}

/* Cancel link in edit form */
.btn-cancel {
  display: inline-block;
  margin-left: var(--spacing-md);
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-muted);
  text-decoration: none;
}

.btn-cancel:hover {
  color: var(--color-text);
}

/* Field hint text */
.field-hint {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: var(--spacing-xs) 0 0;
  line-height: 1.5;
}

/* ============================================
   Desktop breakpoint (600px+)
   ============================================ */
@media (min-width: 600px) {
  .profile-page {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }

  .profile-avatar {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 1.375rem;
  }

  .profile-identity h1 {
    font-size: 1.75rem;
  }

  .profile-details dt {
    flex: 0 0 8rem;
    margin-bottom: 0;
  }
}
