﻿/* ════════════════════════════════════════
   BENCHMARK — COMPONENTS
   Shared UI components: modals, forms,
   toasts, admin, check-ins, profile,
   shop items, streak, achievements.
════════════════════════════════════════ */


/* ── ACHIEVEMENT POPUP ───────────────── */

.achievement-popup-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  z-index: var(--z-popup);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.achievement-popup-overlay.open,
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.achievement-popup {
  background: var(--white);
  border-radius: var(--ui-modal-radius);
  padding: var(--space-8) var(--space-6) var(--space-6);
  max-width: 320px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.achievement-popup-overlay.open .achievement-popup {
  transform: scale(1);
}

.achievement-popup-x {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--parchment);
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  color: var(--bark);
}

.achievement-popup-x:hover {
  background: var(--danger-hover-bg);
  color: white;
}

.achievement-popup-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.achievement-popup-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.achievement-popup-status {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.achievement-popup-status.earned {
  background: rgba(31,125,62,0.1);
  color: var(--moss);
  border: 1px solid var(--moss-b30);
}

.achievement-popup-status.locked {
  background: rgba(196,180,154,0.2);
  color: var(--stone-dark);
  border: 1px solid var(--parchment);
}

.achievement-popup-desc {
  font-size: var(--text-base);
  color: var(--stone-dark);
  line-height: 1.5;
}


/* ── ACHIEVEMENT UNLOCK TOAST ────────── */

@keyframes achSlideIn {
  0%   { transform: translateX(120%) scale(0.9); opacity: 0; }
  65%  { transform: translateX(-6%) scale(1.01); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes achSlideOut {
  0%   { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(120%) scale(0.9); opacity: 0; }
}

@keyframes achShine {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes achConfetti {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60px) rotate(720deg); opacity: 0; }
}

.ach-unlock-popup {
  position: fixed;
  top: 70px;
  right: var(--space-6);
  z-index: var(--z-max);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-width: 240px;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 2px solid var(--gold);
  animation: achSlideIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  pointer-events: none;
}

.ach-unlock-popup.hiding {
  animation: achSlideOut 0.4s ease-in both;
}

.ach-unlock-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
  animation: achShine 1s linear infinite;
}

.ach-unlock-content {
  flex: 1;
}

.ach-unlock-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold);
  margin-bottom: 2px;
}

.ach-unlock-name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--bark);
  margin-bottom: 1px;
}

.ach-unlock-desc,
.admin-report-email {
  font-size: var(--text-sm);
  color: var(--stone-dark);
}

.ach-confetti {
  position: fixed;
  pointer-events: none;
  z-index: calc(var(--z-max) - 1);
  font-size: var(--text-xl);
  animation: achConfetti 1.2s ease-out both;
}


/* ── MODAL SYSTEM ────────────────────── */

.welcome-modal {
  max-width: 420px;
}

@media (max-width: 1024px) {
  #welcomeModal,
  #addModal {
    align-items: flex-end !important;
  }

  #welcomeModal .welcome-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    padding-bottom: calc(env(safe-area-inset-bottom) + var(--space-6)) !important;
    animation: sheetUp 0.4s cubic-bezier(0.34,1.56,0.64,1) both !important;
  }

  @keyframes sheetUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  @keyframes benchCardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
  }

  #addModal .modal {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100dvh - 56px) !important;
    max-height: calc(100dvh - 56px) !important;
    overflow-y: auto !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: var(--space-4) var(--space-4) calc(env(safe-area-inset-bottom, 0px) + var(--space-4)) !important;
    animation: sheetUp 0.35s cubic-bezier(0.34,1.56,0.64,1) both !important;
  }

  #addModal .modal-title {
    font-size: var(--text-md) !important;
    margin-bottom: var(--space-3) !important;
  }

  #addModal .modal-sub {
    font-size: var(--text-base) !important;
    margin-bottom: var(--space-3) !important;
  }

  #addModal .form-group {
    margin-bottom: var(--space-3) !important;
  }

  #addModal .form-label {
    font-size: var(--text-sm) !important;
    margin-bottom: var(--space-1) !important;
  }

  #addModal .form-input {
    padding: var(--space-2) var(--space-3) !important;
    font-size: var(--text-base) !important;
  }

  #addModal textarea.form-input {
    min-height: 52px !important;
  }

  #addModal .upload-area {
    padding: var(--space-3) !important;
  }

  #addModal .star-inp {
    font-size: var(--text-2xl) !important;
  }
}

.welcome-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  text-align: center;
}

.welcome-body {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--bark);
  line-height: 1.75;
  text-align: center;
  margin-bottom: var(--space-6);
}

.welcome-features {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.welcome-feat {
  text-align: center;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--bark);
}

.welcome-feat .feat-icon {
  font-size: var(--text-2xl);
  display: block;
  margin-bottom: var(--space-2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bark-overlay);
  backdrop-filter: blur(5px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal {
  background: var(--white);
  border-radius: var(--ui-modal-radius);
  padding: var(--ui-modal-padding);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--ui-modal-shadow);
  transform: translateY(18px) scale(0.97);
  transition: transform var(--transition-base);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal::-webkit-scrollbar {
  width: 4px;
}

.modal::-webkit-scrollbar-thumb {
  background: var(--stone);
  border-radius: 4px;
}

.modal-x {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--parchment);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  cursor: pointer;
  color: var(--bark);
  transition: background var(--transition-base), color var(--transition-base);
  flex-shrink: 0;
  line-height: 1;
}

.modal-x:hover {
  background: var(--danger-hover-bg);
  color: #fff;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.modal-sub {
  font-size: var(--text-base);
  color: var(--stone-dark);
  margin-bottom: var(--space-6);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.confirm-modal {
  max-width: 360px;
  text-align: center;
}

.confirm-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.confirm-msg {
  font-size: var(--text-md);
  color: var(--bark-light);
  line-height: 1.5;
  margin-bottom: var(--space-5);
}

.report-reasons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.report-reason {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--parchment);
  background: var(--cream);
  cursor: pointer;
  font-size: var(--text-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.report-reason:hover {
  border-color: var(--amber);
  background: var(--reason-hover-bg);
}

.report-reason.selected {
  border-color: var(--amber);
  background: var(--reason-selected-bg);
  color: var(--amber);
  font-weight: var(--weight-semibold);
}

.admin-modal {
  max-width: 520px;
}

.modal-overlay-front {
  z-index: var(--z-popup);
}

.modal-compact {
  max-width: 400px;
}

.modal-sm {
  max-width: 360px;
}

.modal-sm-center {
  max-width: 340px;
  text-align: center;
}

.modal-relative {
  position: relative;
}


/* ── FORM SYSTEM ─────────────────────── */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--bark-light);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: var(--space-3);
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  color: var(--bark);
  background: var(--cream);
  outline: none;
  transition: border-color var(--transition-base);
}

.form-input:focus {
  border-color: var(--moss);
  background: var(--white);
}

.form-input::placeholder {
  color: var(--stone);
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

.form-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.form-tag {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  border: 1.5px solid var(--parchment);
  background: var(--cream);
  color: var(--stone-dark);
  transition: all var(--transition-fast);
  user-select: none;
}

.form-tag.selected {
  background: var(--moss);
  color: var(--white);
  border-color: var(--moss);
}

.form-tag:hover:not(.selected) {
  border-color: var(--moss);
  color: var(--moss);
}

.tags-details {
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.edit-picker-details {
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 0;
}

.edit-picker-details summary {
  transition: background var(--transition-base);
}

.edit-picker-details summary:hover {
  background: var(--parchment) !important;
  border-radius: var(--radius-md);
}

.edit-picker-details summary .picker-arrow {
  display: inline-block;
  transition: transform var(--transition-slow);
  font-style: normal;
}

.edit-picker-details[open] summary .picker-arrow {
  transform: rotate(-180deg);
}

.edit-picker-details > :not(summary) {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease;
  opacity: 0;
}

.edit-picker-details[open] > :not(summary) {
  max-height: 600px;
  opacity: 1;
}

.tags-summary {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  color: var(--bark);
  background: var(--cream);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
}

.tags-summary::-webkit-details-marker,
.my-profile-summary::-webkit-details-marker,
.my-benches-summary::-webkit-details-marker,
.profile-section-summary::-webkit-details-marker {
  display: none;
}

.tags-summary::after {
  content: '▾';
  margin-left: auto;
  font-size: var(--text-sm);
  transition: transform var(--transition-slow);
}

.tags-details[open] .tags-summary::after {
  transform: rotate(-180deg);
}

.tags-details .form-tags {
  overflow: hidden;
}

.tags-count {
  font-size: var(--text-sm);
  color: var(--moss);
  font-weight: var(--weight-bold);
}

.upload-area {
  border: 2px dashed var(--stone);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--cream);
  position: relative;
}

.upload-area:hover {
  border-color: var(--moss);
  background: var(--moss-t04);
}

.upload-area input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.upload-text,
.admin-overview-report-sub {
  font-size: var(--text-base);
  color: var(--stone-dark);
}

.upload-text strong {
  color: var(--moss);
}

.img-preview-box {
  position: relative;
  margin-top: var(--space-3);
}

.img-preview-box img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.img-remove {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--bark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-input-row {
  display: flex;
  gap: var(--space-1);
}

.star-inp {
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--stone);
  transition: all var(--transition-fast);
  user-select: none;
}

.star-inp.filled {
  color: var(--gold);
}

.star-inp:hover {
  transform: scale(1.2);
}

.form-label-inline {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-label-inline-between {
  display: flex;
  align-items: center;
}

.form-help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--stone-dark);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  color: var(--stone-dark);
  flex-shrink: 0;
  user-select: none;
}

.form-optional-note {
  font-weight: var(--weight-normal);
  color: var(--stone-dark);
  font-size: var(--text-base);
}

.form-tags-scroll {
  margin-top: var(--space-2);
  max-height: 160px;
  overflow-y: auto;
}

.password-row,
.checkin-star-row {
  display: flex;
  gap: var(--space-2);
}

.password-row .form-input {
  flex: 1;
}

.tos-error {
  margin-bottom: var(--space-2);
  margin-top: 0;
}

.signup-tos-row {
  margin: var(--space-3) 0 var(--space-1);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.signup-tos-check {
  margin-top: var(--space-1);
  accent-color: var(--moss);
  cursor: pointer;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.signup-tos-label {
  font-size: var(--text-base);
  color: var(--stone-dark);
  cursor: pointer;
  line-height: 1.5;
}

.no-resize {
  resize: none;
}


/* ── TOAST ───────────────────────────── */

.toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bark);
  color: var(--cream);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  z-index: var(--z-toast);
  transition: transform var(--transition-spring);
  pointer-events: none;
  box-shadow: 0 6px 24px var(--shadow-deep);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}


/* ── LEAFLET POPUP ───────────────────── */

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 20px var(--shadow-deep) !important;
  font-family: var(--font-primary) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
}

.leaflet-popup-tip-container,
.checkin-photo-input {
  display: none;
}

.popup-inner {
  padding: var(--space-3) var(--space-4);
  min-width: 170px;
}

.popup-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  margin-bottom: var(--space-1);
}

.popup-loc {
  font-size: var(--text-sm);
  color: var(--stone-dark);
  margin-bottom: var(--space-2);
}

.popup-stars {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

.popup-star {
  color: #c4b49a;
}

.popup-star.is-filled {
  color: #c8a94a;
}

.popup-stars-count {
  color: #9a8a74;
  font-size: var(--text-sm);
}


/* ── UTILITY CLASSES ─────────────────── */

.welcome-overlay {
  z-index: calc(var(--z-nav) + 10);
}

.welcome-modal-surface {
  background: var(--white);
}

.welcome-pretitle {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--bark);
  display: block;
  margin-bottom: var(--space-2);
}

.welcome-logo-img {
  height: 2.2rem;
  margin: 0 auto;
}


/* ── ADMIN UI ────────────────────────── */

.admin-section-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin: var(--space-4) 0 var(--space-3);
  color: var(--bark);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admin-section-heading.tight {
  margin-bottom: var(--space-2);
}

.admin-section-heading.spaced {
  margin: var(--space-4) 0 var(--space-2);
}

.admin-bench-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--parchment);
  margin-bottom: var(--space-2);
  background: var(--cream);
  transition: all var(--transition-fast);
}

.admin-bench-row.flagged {
  border-color: var(--btn-danger-border);
  background: var(--danger-surface-soft);
}

.admin-bench-info,
.profile-bench-main,
.checkin-item-body {
  flex: 1;
  min-width: 0;
}

.admin-bench-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-bench-meta {
  font-size: var(--text-sm);
  color: var(--stone-dark);
  margin-top: 2px;
}

.admin-flag-badge {
  background: var(--btn-danger-bg);
  color: var(--red);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.admin-count-pill {
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-family: var(--font-primary);
}

.admin-count-pill.warn {
  background: var(--warn-pill-bg);
  color: var(--warn-pill-text);
}

.admin-count-pill.danger {
  background: var(--btn-danger-bg);
  color: var(--red);
}

.admin-list-spaced {
  margin-bottom: var(--space-4);
}

.admin-btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-base);
}

.admin-empty-note {
  font-size: var(--text-base);
  color: var(--stone-dark);
  padding: var(--space-2) 0;
}

.admin-row-clickable {
  cursor: pointer;
}

.admin-pending-row {
  border-left: 3px solid #ffc107;
}

.admin-new-user-pill {
  background: var(--warn-pill-bg);
  color: var(--warn-pill-text);
  font-size: var(--text-xs);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  font-weight: var(--weight-bold);
}

.admin-owner-pill {
  color: var(--moss);
  font-size: var(--text-sm);
}

.admin-new-modal-surface {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: min(700px, 96vw);
  padding: var(--space-6);
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}

.admin-new-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-popup);
  background: var(--overlay-scrim-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: var(--space-5) 0;
}

.admin-new-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  color: var(--bark);
}

.admin-new-modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--bark);
  margin-bottom: var(--space-4);
}

.admin-tab-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.admin-tab-btn {
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  transition: all var(--transition-fast);
  background: var(--parchment);
  color: var(--bark);
}

.admin-tab-btn.is-active {
  background: var(--moss);
  color: var(--white);
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.admin-overview-stat {
  padding: var(--space-4);
  text-align: center;
}

.admin-overview-stat-val {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--moss);
}

.admin-overview-stat-label {
  font-size: var(--text-sm);
  color: var(--stone-dark);
}

.admin-overview-reports {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
}

.admin-overview-report-title,
.admin-review-title,
.admin-report-name {
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
}

.admin-coins-btn {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-accent-deep));
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  cursor: pointer;
  font-family: var(--font-primary);
}

.admin-review-card {
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.admin-review-main {
  flex: 1;
  cursor: pointer;
}

.admin-review-location {
  font-size: var(--text-base);
  color: var(--stone-dark);
}

.admin-review-owner {
  font-size: var(--text-sm);
  color: var(--stone);
}

.admin-review-reports {
  font-size: var(--text-sm);
  color: var(--danger-accent);
  margin-top: var(--space-1);
}

.admin-review-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-empty-center {
  padding: var(--space-4);
  font-size: var(--text-base);
}

.admin-empty-center-lg {
  padding: var(--space-6);
}

.admin-sort-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.admin-sort-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
}

.admin-sort-btn.active {
  border: none;
  background: var(--moss);
  color: var(--white);
}

.admin-sort-btn.inactive {
  border: 1.5px solid var(--parchment);
  background: transparent;
  color: var(--bark);
}

.admin-user-search {
  width: 100%;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  background: var(--cream);
  color: var(--bark);
  outline: none;
  box-sizing: border-box;
}

.admin-test-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.admin-test-card {
  padding: var(--space-4);
}

.admin-test-card-danger {
  background: var(--btn-danger-bg);
}

.admin-test-title {
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  margin-bottom: var(--space-2);
}

.admin-test-title-danger,
.admin-test-copy-danger {
  color: var(--danger-ink);
}

.admin-test-copy {
  font-size: var(--text-base);
  color: var(--stone-dark);
  margin-bottom: var(--space-3);
}

.admin-avatar-36 {
  width: var(--avatar-md);
  height: var(--avatar-md);
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.admin-avatar-fill-36 {
  width: var(--avatar-md);
  height: var(--avatar-md);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.admin-report-card {
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.admin-report-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.admin-report-reasons {
  font-size: var(--text-base);
  color: var(--bark);
  margin-bottom: var(--space-2);
}

.admin-report-pill {
  background: var(--btn-danger-bg);
  color: var(--danger-accent);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-right: var(--space-1);
  font-size: var(--text-sm);
}

.admin-report-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.admin-avatar-32 {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.admin-avatar-fill-32 {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.admin-user-card {
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.admin-user-main {
  flex: 1;
  min-width: 100px;
}

.admin-user-name {
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
}

.admin-user-email {
  font-size: var(--text-sm);
  color: var(--stone-dark);
}

.admin-user-id-fade {
  opacity: 0.5;
}

.admin-user-actions {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}


/* ── PROFILE SYSTEM ──────────────────── */

.global-stats-shell {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.global-stats-header {
  padding: var(--space-5) var(--space-5) 0;
  border-bottom: 1px solid var(--parchment);
}

.global-stats-title {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.edit-avatar-group {
  text-align: center;
  margin-bottom: var(--space-3);
}

.edit-avatar-preview {
  width: var(--avatar-xl);
  height: var(--avatar-xl);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin: 0 auto var(--space-2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.edit-avatar-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.edit-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

#editAvatarPreview:hover .edit-avatar-overlay {
  opacity: 1;
}

.edit-avatar-note {
  font-size: var(--text-xs);
  color: var(--stone-dark);
}

.username-change-info {
  font-size: var(--text-sm);
  color: var(--stone-dark);
  float: right;
}

.edit-picker {
  margin-bottom: var(--space-2);
}

.edit-picker-last {
  margin-bottom: var(--space-3);
}

.edit-picker-summary {
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid var(--parchment);
  user-select: none;
}

.picker-arrow-muted {
  font-size: var(--text-base);
  color: var(--stone-dark);
}

.profile-tags-hint {
  font-weight: var(--weight-normal);
  text-transform: none;
  font-size: var(--text-sm);
}

.edit-picker-panel {
  display: flex;
  flex-wrap: wrap;
  margin-top: var(--space-2);
  background: var(--cream);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-3);
  border: 1px solid var(--parchment);
  border-top: none;
}

.edit-picker-panel.tight {
  gap: var(--space-2);
}

.edit-picker-panel.wide {
  gap: var(--space-3);
}

.tnc-scroll-modal {
  position: relative;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
}

.tnc-meta {
  font-size: var(--text-sm);
  color: var(--stone-dark);
  margin-bottom: var(--space-4);
}

.tnc-body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--bark);
}

.tnc-section-title {
  font-weight: var(--weight-bold);
  margin: var(--space-4) 0 var(--space-1);
}

.tnc-paragraph-top {
  margin-top: var(--space-2);
}

.level-section.level-section-plain {
  border-bottom: 1px solid var(--parchment);
}

.level-section.level-section-special {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.level-badge.level-badge-blue {
  color: rgba(71,206,255,0.8);
}

.level-badge.level-badge-green {
  color: rgba(31,125,62,0.9);
}

.level-badge.level-badge-orange {
  color: rgba(232,168,130,0.8);
}

.level-next.level-next-plain {
  color: var(--bark);
  font-weight: var(--weight-semibold);
  opacity: 1;
}

.level-next.level-next-special {
  color: rgba(255,255,255,0.9);
  font-weight: var(--weight-bold);
  opacity: 1;
}

.level-bar-wrap.level-bar-wrap-plain {
  background: var(--parchment);
}

.level-bar-wrap.level-bar-wrap-special {
  background: rgba(255,255,255,0.08);
}

.profile-tag-pill {
  display: inline-block;
  margin: 2px var(--space-1);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  letter-spacing: 0.6px;
  background: var(--profile-pill-bg, rgba(31,125,62,0.1));
  border: 1px solid var(--profile-pill-border, rgba(31,125,62,0.25));
  color: var(--profile-pill-color, var(--moss));
  font-weight: var(--profile-pill-weight, inherit);
}

.profile-tag-pill-claude {
  --profile-pill-bg: rgba(204,120,92,0.18);
  --profile-pill-border: rgba(204,120,92,0.35);
  --profile-pill-color: rgba(232,168,130,0.9);
}

.profile-tag-pill-my {
  --profile-pill-bg: rgba(71,206,255,0.12);
  --profile-pill-border: rgba(71,206,255,0.3);
  --profile-pill-color: rgba(200,240,255,0.9);
}

.profile-tag-pill-default {
  --profile-pill-bg: rgba(31,125,62,0.1);
  --profile-pill-border: rgba(31,125,62,0.25);
  --profile-pill-color: var(--moss);
  --profile-pill-weight: var(--weight-semibold);
}

.my-profile-empty-note,
.profile-empty-note {
  font-size: var(--text-base);
  text-align: center;
  padding: var(--space-4) 0;
  color: var(--profile-empty-note-color, var(--stone-dark));
}

.my-profile-empty-note {
  --profile-empty-note-color: rgba(71,206,255,0.4);
}

.my-signout-btn {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: rgba(220,53,69,0.25);
  border: 1.5px solid rgba(220,53,69,0.5);
  color: #ff8a8a;
  font-size: var(--text-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: var(--z-sidebar);
}

.my-signout-btn:hover {
  background: rgba(220,53,69,0.5);
  color: white;
}

.my-header-actions {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: flex;
  gap: var(--space-2);
  z-index: var(--z-sidebar);
}

.my-edit-btn {
  height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(71,206,255,0.8);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: all var(--transition-base);
  font-family: var(--font-primary);
}

.my-edit-btn:hover {
  background: rgba(71,206,255,0.25);
  color: white;
}

.my-close-btn-inline {
  position: static;
}

.my-avatar-wrap-clickable {
  cursor: pointer;
  position: relative;
}

.my-avatar-img,
.profile-modal-avatar-img,
.checkin-avatar-img {
  border-radius: var(--radius-full);
  object-fit: cover;
}

.my-avatar-img {
  width: var(--avatar-2xl);
  height: var(--avatar-2xl);
  border: 3px solid rgba(255,255,255,0.3);
}

.my-profile-bio {
  font-size: var(--text-base);
  color: rgba(180,235,255,0.8);
  text-align: center;
  padding: var(--space-2) var(--space-5) 0;
  line-height: 1.5;
}

.my-profile-tags {
  text-align: center;
  padding: var(--space-2) 0 0;
}

.my-profile-details {
  padding: 0 var(--space-5);
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.my-profile-summary,
.my-benches-summary,
.profile-section-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  background: var(--profile-summary-bg, var(--cream));
  border: 1.5px solid var(--profile-summary-border, var(--parchment));
}

.my-profile-summary,
.my-benches-summary {
  --profile-summary-bg: rgba(71,206,255,0.08);
  --profile-summary-border: rgba(71,206,255,0.2);
}

.my-profile-summary {
  margin-bottom: 2px;
}

.my-profile-summary-text,
.my-benches-summary-text,
.profile-section-text {
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--profile-summary-text-color, var(--bark));
}

.my-profile-summary-text,
.my-benches-summary-text {
  --profile-summary-text-color: rgba(255,255,255,0.9);
}

.my-profile-summary-arrow,
.my-benches-summary-arrow,
.profile-section-arrow {
  font-size: var(--text-sm);
  color: var(--profile-summary-arrow-color, var(--stone-dark));
  opacity: var(--profile-summary-arrow-opacity, 1);
}

.my-profile-summary-arrow,
.my-benches-summary-arrow {
  --profile-summary-arrow-color: rgba(255,255,255,0.9);
  --profile-summary-arrow-opacity: 0.7;
}

.my-benches-summary-count {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  opacity: 0.6;
}

.my-benches-summary-arrow {
  transition: transform var(--transition-base);
}

.my-benches-list,
.profile-bench-list-spaced {
  margin-top: var(--space-1);
  max-height: 60vh;
  overflow-y: auto;
  padding-right: var(--space-2);
  padding-bottom: var(--space-4);
}

.my-profile-actions,
.profile-self-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.my-profile-actions {
  padding: 0 var(--space-5) var(--space-4);
}

.profile-self-actions {
  margin-top: var(--space-4);
  padding: 0 var(--space-3);
}

.my-darkmode-row,
.profile-darkmode-row {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--profile-row-bg, var(--cream));
  border: 1.5px solid var(--profile-row-border, var(--parchment));
}

.my-darkmode-row {
  --profile-row-bg: rgba(71,206,255,0.07);
  --profile-row-border: rgba(71,206,255,0.18);
}

.my-darkmode-label,
.profile-darkmode-label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: var(--font-primary);
  color: var(--profile-row-label-color, var(--bark));
}

.my-darkmode-label {
  --profile-row-label-color: rgba(255,255,255,0.85);
}

.my-admin-btn,
.profile-admin-btn,
.profile-logout-btn {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  cursor: pointer;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  border: 1.5px solid var(--profile-action-border, var(--parchment));
  background: var(--profile-action-bg, transparent);
  color: var(--profile-action-color, var(--bark));
}

.my-admin-btn {
  --profile-action-border: rgba(255,193,7,0.4);
  --profile-action-bg: rgba(255,193,7,0.08);
  --profile-action-color: rgba(255,220,80,0.9);
}

.profile-admin-btn {
  --profile-action-border: rgba(255,193,7,0.35);
  --profile-action-bg: rgba(255,193,7,0.06);
  --profile-action-color: #a07800;
}

.profile-logout-btn {
  --profile-action-border: rgba(220,53,69,0.3);
  --profile-action-color: #e0513a;
}

.my-admin-btn:hover {
  background: rgba(255,193,7,0.2);
}

.profile-modal-avatar-shell,
.checkin-avatar-btn {
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.profile-modal-avatar-shell {
  width: var(--avatar-xl);
  height: var(--avatar-xl);
  margin: 0 auto var(--space-3);
}

.profile-modal-avatar-img,
.checkin-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-edit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--parchment);
  background: var(--cream);
  color: var(--bark);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  cursor: pointer;
  margin-bottom: var(--space-2);
  font-family: var(--font-primary);
  text-align: left;
}

.profile-tagline-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: center;
  margin: var(--space-1) 0;
}

.profile-section-details {
  margin: var(--space-3) 0 0;
}

.profile-section-count {
  font-size: var(--text-sm);
  color: var(--stone-dark);
  font-weight: var(--weight-medium);
}

.profile-report-btn {
  margin-top: var(--space-4);
  width: 100%;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  border: 1.5px solid #e0513a;
  background: transparent;
  color: #e0513a;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  font-family: var(--font-primary);
}


/* ── CHECK-IN SYSTEM ─────────────────── */

.checkin-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--parchment);
}

.checkin-avatar-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  overflow: hidden;
  flex-shrink: 0;
}

.checkin-avatar-fallback {
  background: var(--moss);
  color: var(--white);
}

.checkin-item-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.checkin-user-name {
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  cursor: pointer;
}

.checkin-condition-pill {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--checkin-condition-color, var(--stone-dark));
}

.checkin-condition-excellent { --checkin-condition-color: #1f7d3e; }
.checkin-condition-good      { --checkin-condition-color: #2a9e50; }
.checkin-condition-fair      { --checkin-condition-color: #cc7a00; }
.checkin-condition-poor      { --checkin-condition-color: #c0392b; }

.checkin-time {
  font-size: var(--text-xs);
  color: var(--stone-dark);
  margin-left: auto;
}

.checkin-delete-btn {
  font-size: var(--text-sm);
  color: #aaa;
  cursor: pointer;
}

.checkin-rating-row {
  margin: 2px 0;
}

.checkin-rating-star {
  color: #ddd;
  font-size: var(--text-base);
}

.checkin-rating-star.is-filled,
.checkin-input-star.is-filled {
  color: #f5a623;
}

.checkin-note {
  font-size: var(--text-base);
  color: var(--bark);
  margin-top: 2px;
  line-height: 1.45;
}

.checkin-empty {
  font-size: var(--text-base);
  padding: var(--space-3) 0;
}

.checkin-modal-head {
  margin-bottom: var(--space-4);
}

.checkin-modal-title {
  font-family: var(--font-primary);
  font-size: var(--text-lg);
}

.checkin-modal-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--parchment);
  cursor: pointer;
  font-size: var(--text-base);
}

.checkin-modal-sub {
  font-size: var(--text-base);
  color: var(--stone-dark);
  margin-bottom: var(--space-4);
}

.checkin-field {
  margin-bottom: var(--space-4);
}

.checkin-field.checkin-field-wide {
  margin-bottom: var(--space-5);
}

.checkin-field-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--stone-dark);
  margin-bottom: var(--space-2);
}

.checkin-field-optional {
  font-weight: var(--weight-normal);
  text-transform: none;
}

.checkin-input-star {
  font-size: var(--text-2xl);
  cursor: pointer;
  transition: transform var(--transition-fast), color var(--transition-fast);
  color: #ddd;
}

.checkin-input-star.is-popped {
  transform: scale(1.3);
}

.checkin-condition-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.checkin-condition-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 2px solid var(--parchment);
  background: var(--cream);
  color: var(--stone-dark);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  --checkin-condition-color: var(--stone-dark);
  --checkin-condition-bg: var(--cream);
}

.checkin-condition-btn[data-condition="excellent"] {
  --checkin-condition-color: #1f7d3e;
  --checkin-condition-bg: rgba(31,125,62,0.13);
}

.checkin-condition-btn[data-condition="good"] {
  --checkin-condition-color: #2a9e50;
  --checkin-condition-bg: rgba(42,158,80,0.13);
}

.checkin-condition-btn[data-condition="fair"] {
  --checkin-condition-color: #cc7a00;
  --checkin-condition-bg: rgba(204,122,0,0.13);
}

.checkin-condition-btn[data-condition="poor"] {
  --checkin-condition-color: #c0392b;
  --checkin-condition-bg: rgba(192,57,43,0.13);
}

.checkin-condition-btn.is-active {
  border-color: var(--checkin-condition-color);
  background: var(--checkin-condition-bg);
  color: var(--checkin-condition-color);
}

.checkin-note-input {
  width: 100%;
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  resize: none;
  box-sizing: border-box;
  outline: none;
}

.checkin-note-input.is-focused,
.checkin-photo-label:hover {
  border-color: var(--moss);
}

.checkin-photo-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px dashed var(--parchment);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background: var(--cream);
}

.checkin-photo-preview-wrap {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.checkin-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkin-photo-text {
  font-size: var(--text-base);
  color: var(--stone-dark);
}

.bench-reaction-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin: var(--space-1) 0 var(--space-2);
}

.bench-reaction-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--parchment);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--white);
  color: var(--stone-dark);
}

.bench-reaction-btn-like.is-active {
  background: rgba(245,166,35,0.12);
  color: #c47d00;
  border-color: #f5a623;
}

.bench-reaction-btn-fav.is-active {
  background: rgba(231,76,122,0.08);
  color: #e74c7a;
}


/* ── ACHIEVEMENTS ────────────────────── */

.achievements-title-blue {
  color: rgba(71,206,255,0.5);
}

.achievements-title-orange {
  color: rgba(204,120,92,0.5);
}

.achievement-clickable,
.profile-achievement-clickable {
  cursor: pointer;
}

.achievements-grid .achievement.locked.achievement-theme-blue,
.achievements-grid .achievement.locked.achievement-theme-orange {
  opacity: 1;
  filter: none;
}

.achievements-grid .achievement.earned.achievement-theme-blue {
  background: rgba(71,206,255,0.1);
  border-color: rgba(71,206,255,0.4);
  color: rgba(71,206,255,0.9);
}

.achievements-grid .achievement.earned.achievement-theme-orange {
  background: rgba(204,120,92,0.1);
  border-color: rgba(204,120,92,0.4);
  color: rgba(204,120,92,0.9);
}

.achievements-grid .achievement.locked.achievement-theme-blue {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
}

.achievements-grid .achievement.locked.achievement-theme-orange {
  background: transparent;
  border-color: rgba(196,180,154,0.3);
  color: rgba(196,180,154,0.5);
}


/* ── LEADERBOARD ─────────────────────── */

.lb-panel-section-spaced {
  padding-top: var(--space-5);
}

.challenge-icon-animated {
  display: inline-flex;
}

.lb-period-tabs {
  display: flex;
  border-bottom: 1px solid var(--parchment);
}

.lb-period-tab {
  flex: 1;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--stone-dark);
  border-bottom: 2px solid transparent;
}

.lb-period-tab.active-period {
  color: var(--moss);
  border-bottom-color: var(--moss);
}

.lb-stats-bar {
  display: flex;
  border-bottom: 1px solid var(--parchment);
  background: var(--cream);
}

.lb-stats-cell {
  flex: 1;
  text-align: center;
  padding: var(--space-3) var(--space-1);
}

.lb-stats-cell-divided {
  border-right: 1px solid var(--parchment);
}

.lb-stats-value {
  font-family: var(--font-primary);
  font-size: var(--text-lg);
  color: var(--bark);
}

.lb-stats-label {
  font-size: var(--text-xs);
  color: var(--stone-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.lb-list-shell {
  padding: var(--space-2) var(--space-4);
}

.lb-empty {
  text-align: center;
  color: var(--stone-dark);
  padding: var(--space-5);
}

[data-theme="dark"] .lb-period-tabs,
[data-theme="dark"] .lb-stats-bar {
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .lb-period-tab {
  color: rgba(255,255,255,0.45);
}

[data-theme="dark"] .lb-period-tab.active-period {
  color: rgba(255,255,255,0.95);
  border-bottom-color: rgba(255,255,255,0.9);
}

[data-theme="dark"] .lb-stats-bar {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .lb-stats-cell-divided {
  border-right-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .lb-stats-value {
  color: rgba(255,255,255,0.9);
}

[data-theme="dark"] .lb-empty {
  color: rgba(255,255,255,0.55);
}

.lb-notif-modal {
  max-width: 380px;
  text-align: center;
  padding: var(--space-8);
  background: var(--white);
  position: relative;
}

.lb-notif-modal.is-approved {
  border-top: 4px solid var(--moss);
}

.lb-notif-modal.is-rejected {
  border-top: 4px solid #e0513a;
}

.lb-notif-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: none;
  line-height: 1;
  font-size: var(--text-lg);
  cursor: pointer;
  color: var(--stone-dark);
}

.lb-notif-emoji {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.lb-notif-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
}

.lb-notif-modal.is-approved .lb-notif-title {
  color: var(--moss);
}

.lb-notif-modal.is-rejected .lb-notif-title {
  color: #e0513a;
}

.lb-notif-copy {
  margin: 0 0 var(--space-5);
  color: var(--ink-light);
  font-size: var(--text-md);
  line-height: 1.55;
}

.lb-notif-cta {
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  border: none;
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  cursor: pointer;
  font-family: var(--font-primary);
}

.lb-notif-cta.is-approved {
  background: var(--moss);
}

.lb-notif-cta.is-rejected {
  background: #e0513a;
}


/* ── REWARD PREVIEW ──────────────────── */

.reward-preview-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  max-width: 300px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  position: relative;
  animation: rewardPopIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.reward-preview-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  background: none;
  border: none;
  font-size: var(--text-lg);
  cursor: pointer;
  color: var(--stone-dark);
}

.reward-preview-emoji {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.reward-preview-name {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  color: var(--bark);
  margin-bottom: var(--space-1);
}

.reward-preview-type {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.reward-preview-type--daily {
  background: rgba(71,206,255,0.12);
  color: #0d9ec4;
}

.reward-preview-type--weekly {
  background: rgba(204,120,92,0.12);
  color: #cc785c;
}

.reward-preview-info {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--bark);
  line-height: 1.6;
  text-align: left;
}

.reward-preview-info-row {
  margin-bottom: var(--space-2);
}

.reward-preview-claimed {
  background: rgba(31,125,62,0.1);
  border: 1px solid var(--moss);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-5);
  color: var(--moss);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
}

.reward-preview-claim-btn {
  width: 100%;
}

.reward-preview-note {
  font-size: var(--text-base);
  color: var(--stone-dark);
}

.bench-awaiting-modal {
  max-width: 380px;
  text-align: center;
  padding: var(--space-6) var(--space-8);
}

.bench-awaiting-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.bench-awaiting-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
}

.bench-awaiting-copy {
  margin: 0 0 var(--space-4);
  color: var(--ink-light);
  font-size: var(--text-md);
  line-height: 1.5;
}

.bench-awaiting-btn {
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  border: none;
  background: var(--moss);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  cursor: pointer;
  font-family: var(--font-primary);
  transition: opacity var(--transition-fast);
}

.bench-awaiting-btn:hover {
  opacity: 0.85;
}


/* ── AVATAR BORDER VARIANTS ──────────── */

#editUsername:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--parchment);
}

.edit-border-pill {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  transition: transform var(--transition-base), outline var(--transition-base);
  background: var(--cream);
}

.edit-border-pill.is-selected {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
  transform: scale(1.18);
}

.edit-border-pill.is-locked {
  opacity: 0.45;
  filter: grayscale(0.5);
}

.edit-border-pill--none     { border: 2px solid var(--parchment); }
.edit-border-pill--gold     { border: 3px solid #ffd700; box-shadow: 0 0 8px  rgba(255,215,0,0.5); }
.edit-border-pill--silver   { border: 3px solid #c0c0c0; box-shadow: 0 0 6px  rgba(192,192,192,0.4); }
.edit-border-pill--fire     { border: 3px solid #ff6b35; box-shadow: 0 0 10px rgba(255,107,53,0.5); }
.edit-border-pill--ice      { border: 3px solid #47ceff; box-shadow: 0 0 10px rgba(71,206,255,0.4); }
.edit-border-pill--rainbow  { border: 3px solid #c77dff; box-shadow: 0 0 10px rgba(199,125,255,0.4); }
.edit-border-pill--nature   { border: 3px solid #6bcb77; box-shadow: 0 0 8px  rgba(107,203,119,0.5); }

.edit-bg-pill {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  transition: border-color var(--transition-fast);
}

.edit-bg-pill.is-selected {
  border-color: var(--moss);
}

.edit-bg-pill--none    { background: var(--cream); color: var(--bark); text-shadow: none; }
.edit-bg-pill--sunset  { background: linear-gradient(135deg, #ff9a56, #ff6b95); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.edit-bg-pill--ocean   { background: linear-gradient(135deg, #4d96ff, #00c9ff); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.edit-bg-pill--forest  { background: linear-gradient(135deg, #56ab2f, #a8e063); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.edit-bg-pill--galaxy  { background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

.avatar-html-shell {
  border-radius: var(--radius-full);
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-html-shell-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-html-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  display: block;
}

.avatar-html-fallback {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--moss);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  line-height: 1;
  text-transform: uppercase;
}


/* ── STREAK POPUP ────────────────────── */

.streak-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-popup);
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.streak-modal-inner {
  background: #1a1a2e;
  border-radius: var(--radius-xl);
  width: 340px;
  max-width: 94vw;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

.streak-modal-hero {
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  padding: var(--space-8) var(--space-5) var(--space-5);
  text-align: center;
  position: relative;
}

.streak-modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  background: rgba(0,0,0,0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--text-md);
}

.streak-modal-flame {
  font-size: var(--text-4xl);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.streak-modal-count {
  font-family: var(--font-primary);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-3xl);
  color: white;
  line-height: 1;
}

.streak-modal-label {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
  font-weight: var(--weight-semibold);
}

.streak-modal-stats {
  padding: var(--space-4) var(--space-5);
}

.streak-popup-shell {
  background: linear-gradient(160deg, #1a0a00 0%, #3d1a00 40%, #1a0a00 100%);
  border-radius: var(--radius-xl);
  width: 360px;
  max-width: 94vw;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: shopPopIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.streak-popup-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  z-index: var(--z-sidebar);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: var(--text-md);
  font-family: var(--font-primary);
}

.streak-popup-content {
  padding: var(--space-8) var(--space-6) var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.streak-popup-flame {
  font-size: var(--text-4xl);
  line-height: 1;
  animation: fireBob 1.2s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 8px 20px rgba(255,107,53,0.7));
}

.streak-popup-count {
  font-family: var(--font-primary);
  font-size: var(--text-4xl);
  color: var(--white);
  line-height: 1;
  text-shadow: 0 4px 20px rgba(255,107,53,0.6);
}

.streak-popup-label {
  font-size: var(--text-md);
  color: rgba(255,200,100,0.8);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.streak-popup-status {
  display: inline-block;
  padding: var(--space-1) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
}

.streak-popup-status.is-active {
  background: rgba(107,203,119,0.2);
  color: #6bcb77;
  border: 1px solid rgba(107,203,119,0.4);
}

.streak-popup-status.is-warning {
  background: rgba(224,81,58,0.2);
  color: #e0513a;
  border: 1px solid rgba(224,81,58,0.4);
}

.streak-rings-row {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}

.streak-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.streak-ring-icon {
  width: var(--avatar-md);
  height: var(--avatar-md);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  background: rgba(255,255,255,0.1);
}

.streak-ring-icon.is-active {
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  box-shadow: 0 3px 10px rgba(255,107,53,0.5);
}

.streak-ring-icon.is-active.is-today {
  animation: streakPulse 1.8s ease-in-out infinite;
}

.streak-ring-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
}

.streak-ring-label {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.streak-ring-label.is-active {
  color: rgba(255,255,255,0.9);
}

.streak-milestone-pill {
  padding: var(--space-2) var(--space-5);
  background: rgba(255,107,53,0.2);
  border: 1px solid rgba(255,107,53,0.4);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  color: rgba(255,220,100,0.9);
  font-weight: var(--weight-semibold);
}

.streak-reward-wrap {
  width: 100%;
}

.streak-reward-title {
  font-size: var(--text-2xs);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  color: rgba(255,200,100,0.55);
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.streak-reward-grid {
  display: flex;
  gap: var(--space-1);
}

.streak-reward {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-1);
}

.streak-reward.is-reached {
  background: rgba(255,200,80,0.18);
  border-color: rgba(255,200,80,0.45);
  animation: streakPulse 2.5s ease-in-out infinite;
}

.streak-reward-icon {
  font-size: var(--text-xl);
  filter: grayscale(1) opacity(0.3);
}

.streak-reward.is-reached .streak-reward-icon {
  filter: drop-shadow(0 2px 6px rgba(255,200,80,0.7));
}

.streak-reward-day {
  font-size: var(--text-2xs);
  font-weight: var(--weight-extrabold);
  color: rgba(255,255,255,0.28);
}

.streak-reward.is-reached .streak-reward-day {
  color: rgba(255,220,100,0.95);
}

.streak-reward-coins {
  font-size: var(--text-2xs);
  color: rgba(255,255,255,0.2);
  font-weight: var(--weight-bold);
}

.streak-reward.is-reached .streak-reward-coins {
  color: rgba(255,180,60,0.85);
}

.streak-shield-box {
  background: rgba(77,150,255,0.12);
  border: 1px solid rgba(77,150,255,0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.streak-shield-icon {
  font-size: var(--text-xl);
}

.streak-shield-title {
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: rgba(255,255,255,0.9);
}

.streak-shield-copy {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
}

.streak-howto-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  width: 100%;
}

.streak-howto-title {
  font-size: var(--text-2xs);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  color: rgba(255,200,100,0.7);
  letter-spacing: 1px;
  margin-bottom: var(--space-1);
}

.streak-howto-copy {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}