/* ═══════════════════════════════════════════════════
   auth-ui.css — Profile avatar, dropdown & stats
   Matches OpenPrep's Instrument Serif + DM Sans theme
═══════════════════════════════════════════════════ */

/* ── NAV AUTH AREA ─────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
}

/* ── PROFILE BUTTON ────────────────────────────── */
.profile-wrap {
  position: relative;
}

.profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

/* ── AVATAR CIRCLE ─────────────────────────────── */
.avatar,
.dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #e5e5e5;
  transition: border-color 0.2s;
  /* user-select: none; */
  flex-shrink: 0;
}

.profile-btn:hover .avatar {
  border-color: #111;
}

.avatar img,
.dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── DROPDOWN ──────────────────────────────────── */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 220px;
  z-index: 999;
  overflow: hidden;

  /* hidden by default */
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── DROPDOWN USER HEADER ──────────────────────── */
.dropdown-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.dropdown-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── DROPDOWN DIVIDER ──────────────────────────── */
.dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 0;
}

/* ── DROPDOWN ITEMS ────────────────────────────── */
.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: #f7f7f7;
  color: #111;
}

.dropdown-logout {
  color: #c0392b;
}

.dropdown-logout:hover {
  background: #fff5f5;
  color: #c0392b;
}

/* ═══════════════════════════════════════════════════
   STATS SECTION
═══════════════════════════════════════════════════ */
.stats-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 0;
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stats-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ── STAT CARD ─────────────────────────────────── */
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 18px 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

/* ── STAT ICON ─────────────────────────────────── */
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.stat-icon--green {
  background: #f0fdf4;
  color: #16a34a;
}

.stat-icon--red {
  background: #fef2f2;
  color: #dc2626;
}

/* ── STAT BODY ─────────────────────────────────── */
.stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  color: #111;
  line-height: 1;
}

.stat-label-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #888;
  font-weight: 400;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-dropdown {
    right: -8px;
    min-width: 200px;
  }
}