/*
  CeyPay Leaderboard admin (login + review board)
  ===============================================
  Loaded after leaderboard.css; reuses its tokens, nav, buttons, dialogs.
  The review board follows Droppy's Trench: one column per status, pill
  column heads with counts, solid cards, resolved cards collapse compact.
*/

/* ---------------------------------------------------------------------- */
/* Login                                                                  */
/* ---------------------------------------------------------------------- */

.auth {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 104px var(--pad) 48px;
}
.auth__card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 28px;
  background: var(--well);
  box-shadow: var(--well-shadow), var(--shadow-card);
}
.auth__mark { width: 44px; height: 44px; margin-bottom: 20px; }
.auth__title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; }
.auth__sub { margin-top: 8px; font-size: 0.925rem; color: var(--text-3); }
.auth__form { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.auth__label { display: block; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; }
.auth__otp {
  height: 60px;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
}
.auth__otp::placeholder { letter-spacing: 0.3em; }
.auth__links { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.link-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue-text);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

.msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--blue-soft);
  font-size: 0.875rem;
  color: var(--blue-text);
}
.msg--error { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.msg--ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.msg:empty { display: none; }

.auth__foot { margin-top: 22px; text-align: center; font-size: 0.8rem; color: var(--text-4); }

/* ---------------------------------------------------------------------- */
/* Nav extras                                                             */
/* ---------------------------------------------------------------------- */

.nav__badge {
  margin: 0 6px 0 -4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(28, 110, 245, 0.22);
  color: #8fb6ff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav__user { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.nav__avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
@media (max-width: 720px) {
  .nav__badge { order: 0; margin-right: auto; }
  .nav__logo { margin-right: 8px; }
  .nav__user, .nav__signout { display: none; }
}

/* ---------------------------------------------------------------------- */
/* Review board                                                           */
/* ---------------------------------------------------------------------- */

.dash { padding-block: 112px 72px; }
.dash__head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.dash__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1.05; }
.dash__sub { max-width: 560px; color: var(--text-3); }
.dash__meta { font-size: 0.85rem; color: var(--text-4); font-variant-numeric: tabular-nums; }

.dash__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}
.dash__controls .btn { height: 44px; border-radius: 22px; }
.dash__summary { min-height: 20px; margin: 10px 0 18px; text-align: center; font-size: 0.85rem; color: var(--text-4); }

/* Column tabs replace the column heads on phones. */
.col-tabs {
  display: none;
  gap: 3px;
  margin: 0 auto 14px;
  padding: 3px;
  width: fit-content;
  max-width: 100%;
  border-radius: 22px;
  background: var(--glass-strong);
}
.col-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 19px;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
}
.col-tab.is-active { background: var(--well); color: var(--text); box-shadow: var(--well-shadow); }
.col-tab .cdot { width: 7px; height: 7px; border-radius: var(--r-full); background: var(--c); }
.col-tab .count { font-size: 0.75rem; color: var(--text-4); font-variant-numeric: tabular-nums; }

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.col { min-width: 0; }
.col--pending { --c: var(--gold); }
.col--approved { --c: var(--success); }
.col--rejected { --c: var(--error); }
.col-tab[data-col="pending"] { --c: var(--gold); }
.col-tab[data-col="approved"] { --c: var(--success); }
.col-tab[data-col="rejected"] { --c: var(--error); }

.col-head {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 7px 9px 7px 15px;
  border-radius: var(--r-full);
  background: var(--well);
  box-shadow: var(--well-shadow);
}
.col-head .cdot { width: 8px; height: 8px; flex: none; border-radius: var(--r-full); background: var(--c); }
.col-head h2 { font-size: 0.975rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.col-head .count {
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--glass-strong);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.col-list { display: flex; flex-direction: column; gap: 10px; }
.col-empty { padding: 48px 14px; text-align: center; font-size: 0.875rem; line-height: 1.6; color: var(--text-4); }
.col-more {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 0;
  border-radius: 14px;
  background: var(--glass);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
}
.col-more:hover { background: var(--glass-strong); color: var(--text); }

.rcard {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: 22px;
  background: var(--well);
  box-shadow: var(--well-shadow);
  transition: transform 180ms ease, background 180ms ease, opacity 280ms ease;
}
.rcard.is-entering { animation: cardRise 450ms cubic-bezier(0.21, 0.8, 0.3, 1) both; }
.rcard.is-leaving { animation: cardFall 280ms cubic-bezier(0.4, 0, 0.6, 1) both; pointer-events: none; }
.rcard.is-busy { opacity: 0.55; pointer-events: none; }
@keyframes cardRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cardFall { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

.rcard__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rcard__when { margin-left: auto; font-size: 0.75rem; color: var(--text-4); white-space: nowrap; font-variant-numeric: tabular-nums; }

.plink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 70%;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--blue-soft);
  color: var(--blue-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--fast) var(--ease);
}
.plink:hover { background: var(--blue-soft-strong); }
.plink span { overflow: hidden; text-overflow: ellipsis; }
.plink svg { width: 11px; height: 11px; flex: none; }
.plink--bad { background: var(--glass); color: var(--text-4); }

.rcard__biz { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rcard__logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--logo-tile);
  box-shadow: inset 0 0 0 1px rgba(15, 28, 52, 0.08);
  color: #1c6ef5;
  font-size: 0.85rem;
  font-weight: 600;
}
.rcard__logo img { width: 100%; height: 100%; object-fit: cover; }
.rcard__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.rcard__cat { margin-top: 8px; font-size: 0.85rem; line-height: 1.5; color: var(--text-3); }

.rcard__actions { display: flex; gap: 8px; margin-top: 14px; }
.rcard__actions .btn { flex: 1; height: 40px; border-radius: 14px; }
/* Dark theme's success green is light, so it carries dark ink; light theme's
   is deep enough for white. */
.btn--approve { background: var(--success); color: #03150c; }
:root[data-theme="light"] .btn--approve { color: #fff; }
.btn--approve:hover { background: color-mix(in srgb, var(--success) 85%, #fff); }
.btn--reject { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.btn--reject:hover { background: var(--error); color: #fff; }

/* "Claimed by" row from the Trench, here: who reviewed it and when. */
.claim-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
}
.claim-row img { width: 18px; height: 18px; flex: none; border-radius: var(--r-full); object-fit: cover; background: var(--glass-strong); }
.claim-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Resolved history collapses to a compact card. */
.rcard.is-compact { padding: 12px 15px 11px; border-radius: 16px; }
.rcard.is-compact .rcard__head { margin-bottom: 7px; }
.rcard.is-compact .rcard__logo { width: 26px; height: 26px; border-radius: 8px; font-size: 0.72rem; }
.rcard.is-compact .rcard__name { font-size: 0.875rem; -webkit-line-clamp: 1; line-clamp: 1; }
.rcard.is-compact .rcard__cat { display: none; }
.rcard.is-compact .claim-row { margin-top: 8px; padding-top: 8px; }

@media (max-width: 1020px) {
  .col-tabs { display: flex; width: 100%; max-width: 520px; }
  .col-tab { flex: 1; justify-content: center; min-width: 0; padding: 0 8px; gap: 5px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col { display: none; }
  .col.is-active { display: block; }
  .col-head { display: none; }
}

@media (max-width: 400px) {
  .col-tab .cdot { display: none; }
  .col-tab { font-size: 0.8rem; }
}

/* ---------------------------------------------------------------------- */
/* Toasts                                                                 */
/* ---------------------------------------------------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-float);
  font-size: 0.875rem;
  animation: toastIn 460ms var(--dock-curve) both;
}
.toast.closing { animation: toastOut 260ms var(--ease) both; }
.toast__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-full); background: rgba(255, 255, 255, 0.1); }
.toast__icon svg { width: 14px; height: 14px; }
.toast--success .toast__icon { background: #3fd08a; color: #04060a; }
.toast--error .toast__icon { background: #ff7a7a; color: #04060a; }
.toast strong { font-weight: 600; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.92); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.closing, .rcard.is-entering, .rcard.is-leaving { animation: none; }
}
