/* ─── SHARED RESPONSIVE UTILITIES ────────────────────────────────────────
   Linked by every page. Only adds utility classes and nav-avatar styles.
   Existing inline styles take precedence via cascade order.
   ─────────────────────────────────────────────────────────────────────── */

/* Two-column layout helper */
.two-column {
  display: flex;
  gap: 1rem;
}
.two-column > div {
  flex: 1;
  min-width: 0;
}

/* Images never overflow their container */
img {
  max-width: 100%;
}

/* ─── NAV USER DISPLAY (avatar + name + badge) ─────────────────────────── */
#nav-user-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

#nav-user-wrap > a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  display: block;
}

.nav-avatar-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(33, 166, 223, 0.3);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}

.nav-user-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* ─── MOBILE: hide name text in top bar, keep avatar + sign out ─────────── */
@media (max-width: 991px) {
  .nav-user-name,
  #nav-user-wrap .nav-badge {
    display: none;
  }
}

/* ─── MOBILE: responsive layout helpers ─────────────────────────────────── */
@media (max-width: 767px) {
  .two-column {
    flex-direction: column;
  }

  h1 {
    font-size: clamp(1.6rem, 5vw, 1.8rem);
  }

  /* Full-width buttons inside content areas only, not nav controls */
  .content-btn,
  form .btn,
  .form-submit {
    width: 100%;
    justify-content: center;
  }
}
