/* ── DESIGN TOKENS USED ────────────────────────────────────────────────────
   teal-50  #e0f2f1   teal-100 #b2dfdb   teal-500 #00a19d   teal-700 #004b46
   ink-900  #141d2e   ink-500  #5a6880   ink-300  #9aa5bb
   bg       #f8f9fb   panel    #ffffff   border   #e1e6ef
   gold     #c8a44a   green    #4caf50   bronze   #cd7f32
*/

/* ════════════════════════════════════════════════════════════════════════
   AUTH SHELL — login + setup
   ═══════════════════════════════════════════════════════════════════════ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  background: #f8f9fb;
  position: relative;
  overflow: hidden;
}

.auth-canvas {
  position: relative;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 161, 157, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(0, 75, 70, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, #003633 0%, #00a19d 100%);
  color: #fff;
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/brand/asset-rings.svg') no-repeat center right / 110% auto;
  opacity: 0.08;
  pointer-events: none;
}

.auth-canvas-inner { position: relative; z-index: 1; max-width: 520px; }

.auth-canvas .brand-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 56px;
}

.auth-canvas .brand-pill {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.85);
}

.auth-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #a8e8e5;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.auth-eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: #a8e8e5; border-radius: 2px;
}

.auth-canvas h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 18px;
}
.auth-canvas h1 em { font-style: italic; color: #a8e8e5; }

.auth-canvas .lede {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 460px;
}

.auth-canvas .pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
  position: relative;
  z-index: 1;
}
.auth-canvas .pillar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
}
.auth-canvas .pillar .num {
  font-family: 'DM Mono', monospace;
  font-size: 22px; font-weight: 600;
  color: #fff;
}
.auth-canvas .pillar .lbl {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.auth-canvas .footnote {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.55);
  position: relative; z-index: 1;
}

.auth-form-pane {
  display: flex; align-items: center; justify-content: center;
  padding: 56px 48px;
  background: #fff;
}

.auth-card {
  width: 100%; max-width: 420px;
  animation: riseIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #004b46;
  margin-bottom: 6px;
}

.auth-card .auth-sub {
  color: #5a6880;
  font-size: 13.5px;
  margin-bottom: 32px;
}

.auth-field { margin-bottom: 18px; }

.auth-field label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #5a6880;
  margin-bottom: 8px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #141d2e;
  background: #f8f9fb;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  outline: none;
  background: #fff;
  border-color: #00a19d;
  box-shadow: 0 0 0 3px rgba(0, 161, 157, 0.12);
}

.auth-error {
  background: #fff3f0;
  border: 1px solid #ffd6cc;
  color: #b3261e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  background: #00a19d;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: none; border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.auth-submit:hover:not(:disabled) {
  background: #008e8a;
  box-shadow: 0 4px 14px rgba(0, 161, 157, 0.32);
}
.auth-submit:active:not(:disabled) { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-meta {
  margin-top: 24px;
  font-size: 12px;
  color: #9aa5bb;
  text-align: center;
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-canvas { padding: 36px 32px 24px; }
  .auth-canvas h1 { font-size: 32px; }
  .auth-canvas .pillars { margin-top: 32px; }
  .auth-form-pane { padding: 32px 20px; }
}

/* ════════════════════════════════════════════════════════════════════════
   AUTHENTICATED APP HEADER
   ═══════════════════════════════════════════════════════════════════════ */

.app-shell {
  background: #f8f9fb;
  min-height: 100vh;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.app-nav a {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.app-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.app-nav a.is-active {
  background: #fff;
  color: #004b46;
  box-shadow: 0 2px 6px rgba(0, 75, 70, 0.18);
}

.app-user {
  display: flex; align-items: center; gap: 12px;
  margin-left: 18px;
}

.app-user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  color: #004b46;
}

.app-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #00a19d, #004b46);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 12px; font-weight: 600;
}

.app-user-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.app-user-name { font-size: 12.5px; font-weight: 600; }
.app-user-role {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px; letter-spacing: 1.2px; color: #5a6880;
  text-transform: uppercase;
}

.app-signout {
  font-family: inherit;
  font-size: 12.5px; font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px; border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.app-signout:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════ */

.dash {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 29, 46, 0.04);
  animation: riseIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: url('/brand/asset-rings.svg') no-repeat center / contain;
  opacity: 0.05;
  pointer-events: none;
}

.dash-hero-meta { display: flex; flex-direction: column; gap: 8px; position: relative; }

.dash-hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #00a19d;
  display: flex; align-items: center; gap: 8px;
}
.dash-hero-eyebrow::before {
  content: ''; width: 3px; height: 12px; background: #00a19d; border-radius: 2px;
}

.dash-hero h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: #004b46;
  line-height: 1.15;
}

.dash-hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 6px;
}
.dash-hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #004b46;
  background: #e0f2f1;
  padding: 5px 12px;
  border-radius: 999px;
}

.dash-hero-empty {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff8e5;
  border: 1px dashed #d8b14a;
  border-radius: 10px;
  font-size: 13px;
  color: #6b5314;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.dash-hero-empty .cta {
  font-weight: 600;
  color: #004b46;
  text-decoration: none;
  white-space: nowrap;
}
.dash-hero-empty .cta:hover { color: #00a19d; }

.dash-hero-snapshot {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dash-snap {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid #e1e6ef;
}
.dash-snap.tier-platinum { border-color: #b8a3d6; }
.dash-snap.tier-gold     { border-color: #c8a44a; }
.dash-snap.tier-silver   { border-color: #9aa5bb; }
.dash-snap.tier-bronze   { border-color: #cd7f32; }
.dash-snap-label {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9aa5bb;
}
.dash-snap-value {
  font-size: 22px;
  font-weight: 600;
  color: #141d2e;
  font-variant-numeric: tabular-nums;
}
.dash-snap-suffix {
  font-size: 11px;
  color: #9aa5bb;
}

.dash-hero-ring { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dash-hero-ring .when {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #9aa5bb;
}

/* ── Section header ────────────────────────────────────────────────────── */
.dash-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 40px 0 18px;
  gap: 20px;
}
.dash-section-head h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #004b46;
}
.dash-section-head .sub {
  font-size: 13px; color: #5a6880; margin-top: 2px;
}

/* ── Scope tabs ────────────────────────────────────────────────────────── */
.scope-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 999px;
}
.scope-tab {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #5a6880;
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.scope-tab:hover:not(.is-active):not(:disabled) { color: #004b46; background: #f0f4f8; }
.scope-tab.is-active {
  background: #004b46;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 75, 70, 0.25);
}
.scope-tab:disabled { opacity: 0.45; cursor: not-allowed; }
.scope-tab select {
  background: transparent; border: none; color: inherit; font: inherit;
  cursor: pointer;
  margin-left: 4px;
}
.scope-tab select:focus { outline: none; }

/* ── Ranking panel ─────────────────────────────────────────────────────── */
.rank-panel {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 29, 46, 0.04);
}

.rank-headline {
  padding: 32px 28px;
  background: linear-gradient(180deg, #f0fbfb 0%, #ffffff 100%);
  border-right: 1px solid #e1e6ef;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}

.rank-gauge {
  position: relative;
  width: 220px; height: 220px;
}
.rank-gauge-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.rank-gauge-num .rank {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  color: #004b46;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rank-gauge-num .of {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  color: #5a6880;
  text-transform: uppercase;
  margin-top: 6px;
}

.rank-pct-bar {
  width: 100%;
  height: 10px;
  background: #e1e6ef;
  border-radius: 999px;
  overflow: hidden;
}
.rank-pct-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00a19d 0%, #004b46 100%);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-pct-caption {
  display: flex; justify-content: space-between; width: 100%;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  color: #9aa5bb;
  text-transform: uppercase;
}
.rank-pct-caption strong { color: #00a19d; }

.rank-leaderboard {
  padding: 28px 28px;
}
.rank-leader-empty {
  color: #5a6880; font-size: 13.5px; padding: 20px;
}
.rank-leader-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 110px 80px;
  gap: 12px; align-items: center;
  padding: 14px 14px;
  border-radius: 10px;
  transition: background 0.15s;
}
.rank-leader-row + .rank-leader-row { margin-top: 4px; }
.rank-leader-row:hover { background: #f8f9fb; }
.rank-leader-row.is-caller {
  background: linear-gradient(90deg, #e0f2f1 0%, #fff 100%);
  border-left: 3px solid #00a19d;
  padding-left: 11px;
}

.rank-leader-rank {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #5a6880;
  font-variant-numeric: tabular-nums;
}
.rank-leader-row.is-caller .rank-leader-rank { color: #004b46; }

.rank-leader-name {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.rank-leader-name .name {
  font-size: 13.5px;
  font-weight: 500;
  color: #141d2e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-leader-name .ticker {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #9aa5bb;
}
.rank-leader-row.is-caller .name::after {
  content: 'YOU';
  display: inline-block;
  margin-left: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: #00a19d;
  background: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #00a19d;
  vertical-align: 2px;
}

.rank-leader-bar {
  height: 8px;
  background: #f0f4f8;
  border-radius: 999px;
  overflow: hidden;
}
.rank-leader-bar-fill {
  height: 100%;
  background: #9aa5bb;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.rank-leader-row.is-caller .rank-leader-bar-fill {
  background: linear-gradient(90deg, #00a19d, #004b46);
}

.rank-leader-score {
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: #141d2e;
  font-variant-numeric: tabular-nums;
}

.rank-loading, .rank-error {
  padding: 56px;
  text-align: center;
  color: #5a6880;
  font-size: 13.5px;
}
.rank-error { color: #b3261e; }

/* ── Quick links / KPIs ──────────────────────────────────────────────── */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.dash-quick {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.dash-quick:hover {
  border-color: #00a19d;
  box-shadow: 0 4px 16px rgba(0, 161, 157, 0.12);
  transform: translateY(-1px);
}
.dash-quick-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: #00a19d;
}
.dash-quick-title { font-size: 15px; font-weight: 600; color: #141d2e; }
.dash-quick-sub { font-size: 12.5px; color: #5a6880; }

@media (max-width: 1080px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero-snapshot { grid-template-columns: repeat(2, 1fr); }
  .rank-panel { grid-template-columns: 1fr; }
  .rank-headline { border-right: none; border-bottom: 1px solid #e1e6ef; }
}

/* ════════════════════════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════════════════════ */

.admin {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 40px 80px;
}

.admin-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; gap: 20px;
}
.admin-head h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: #004b46;
}
.admin-head .sub {
  font-size: 13.5px; color: #5a6880; margin-top: 4px;
}
.admin-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-btn {
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.admin-btn-primary {
  background: #00a19d; color: #fff; border-color: #00a19d;
}
.admin-btn-primary:hover:not(:disabled) {
  background: #008e8a; box-shadow: 0 4px 12px rgba(0, 161, 157, 0.32);
}
.admin-btn-secondary {
  background: #fff; color: #004b46; border-color: #e1e6ef;
}
.admin-btn-secondary:hover:not(:disabled) { border-color: #00a19d; color: #00a19d; }
.admin-btn-ghost {
  background: transparent; color: #5a6880; border-color: transparent;
  padding: 6px 12px;
}
.admin-btn-ghost:hover:not(:disabled) { color: #b3261e; }
.admin-btn-danger {
  background: #fff; color: #b3261e; border-color: #ffd6cc;
}
.admin-btn-danger:hover:not(:disabled) { background: #fff3f0; }
.admin-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.admin-card {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  animation: riseIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.admin-card-head h3 {
  font-size: 17px; font-weight: 600; color: #004b46;
}
.admin-card-head .meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.4px; color: #9aa5bb;
  text-transform: uppercase;
}

.admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: stretch;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 13.5px;
  font-family: inherit;
  color: #141d2e;
  background: #f8f9fb;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none; background: #fff; border-color: #00a19d;
  box-shadow: 0 0 0 3px rgba(0, 161, 157, 0.12);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-table th {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9aa5bb;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e1e6ef;
}
.admin-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f0f4f8;
  font-size: 13.5px;
  color: #141d2e;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8f9fb; }

.admin-pill {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  background: #e0f2f1;
  color: #004b46;
  padding: 4px 10px;
  border-radius: 999px;
}
.admin-pill-dim {
  background: #f0f4f8; color: #5a6880;
}

.admin-empty {
  padding: 36px 18px;
  text-align: center;
  color: #5a6880;
  font-size: 13.5px;
  background: #f8f9fb;
  border-radius: 10px;
  border: 1px dashed #e1e6ef;
}

/* invite result */
.invite-result {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(90deg, #f0fbfb 0%, #ffffff 100%);
  border: 1px solid #b2dfdb;
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.invite-result .head {
  display: flex; align-items: center; gap: 10px;
  color: #004b46; font-weight: 600; font-size: 13.5px;
}
.invite-result .head::before {
  content: '✓';
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #00a19d; color: #fff;
  font-size: 12px; font-weight: 600;
}
.invite-result .url {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: #141d2e;
  background: #fff;
  padding: 10px 12px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  word-break: break-all;
  display: flex; gap: 12px; align-items: center;
}
.invite-result .url-text { flex: 1; min-width: 0; word-break: break-all; }
.invite-copy {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; letter-spacing: 1.4px;
  text-transform: uppercase;
  background: #00a19d;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.invite-copy:hover { background: #008e8a; }
.invite-copy.copied { background: #4caf50; }
.invite-result .expires {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #5a6880;
}

/* peer group cards */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.pg-card {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-card:hover { border-color: #b2dfdb; }
.pg-card h4 {
  font-size: 16px; font-weight: 600; color: #004b46; margin-bottom: 4px;
}
.pg-card-desc { font-size: 12.5px; color: #5a6880; margin-bottom: 12px; }

.pg-members {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
  max-height: 140px; overflow-y: auto;
}
.pg-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.8px;
  background: #f0f4f8;
  color: #141d2e;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
}
.pg-chip-x {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: transparent; border: none;
  border-radius: 50%;
  color: #9aa5bb; cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 14px; line-height: 1;
}
.pg-chip-x:hover { background: #ffd6cc; color: #b3261e; }

.pg-add {
  width: 100%;
  padding: 9px 12px;
  font-size: 12.5px; font-family: inherit;
  background: #f8f9fb; color: #141d2e;
  border: 1px dashed #b2dfdb;
  border-radius: 8px;
  cursor: pointer;
}
.pg-add:focus { outline: none; border-color: #00a19d; background: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   ADMIN DASHBOARD — system overview
   ═══════════════════════════════════════════════════════════════════════ */

.admin-dash {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 40px 80px;
}

.admin-hero {
  background: linear-gradient(135deg, #003633 0%, #00a19d 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  animation: riseIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 280px; height: 280px;
  background: url('/brand/asset-rings.svg') no-repeat center / contain;
  opacity: 0.13;
  pointer-events: none;
}
.admin-hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 2.4px;
  color: #a8e8e5;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.admin-hero-eyebrow::before {
  content: ''; width: 28px; height: 2px;
  background: #a8e8e5; border-radius: 2px;
}
.admin-hero h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 32px; line-height: 1.15;
  font-weight: 700; margin-bottom: 10px;
}
.admin-hero h1 em { font-style: italic; color: #a8e8e5; }
.admin-hero .lede {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 540px;
  line-height: 1.6;
}

.admin-hero-actions {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.admin-hero-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.admin-hero-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}
.admin-hero-action:active:not(:disabled) { transform: translateY(1px); }
.admin-hero-action:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.admin-hero-action .a-title {
  font-size: 13.5px; font-weight: 600;
}
.admin-hero-action .a-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}
.admin-hero-action .a-cta {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #a8e8e5;
  white-space: nowrap;
}

/* KPI grid */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.admin-kpi {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-kpi:hover { border-color: #b2dfdb; box-shadow: 0 4px 14px rgba(0, 161, 157, 0.1); }

.admin-kpi-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #9aa5bb;
}
.admin-kpi-value {
  font-size: 28px;
  font-weight: 600;
  color: #141d2e;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.admin-kpi-sub {
  font-size: 11.5px;
  color: #5a6880;
}
.admin-kpi-sub .warn { color: #b75317; font-weight: 600; }
.admin-kpi-sub .ok   { color: #2e7d32; font-weight: 600; }

/* Two-column: sector chart + activity */
.admin-grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 1080px) {
  .admin-hero { grid-template-columns: 1fr; }
  .admin-grid-2col { grid-template-columns: 1fr; }
}

/* Sector breakdown chart */
.sector-chart {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 22px 24px;
}
.sector-chart h3 {
  font-size: 16px; font-weight: 600; color: #004b46;
  margin-bottom: 4px;
}
.sector-chart .sub {
  font-size: 12.5px; color: #5a6880;
  margin-bottom: 18px;
}
.sector-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 60px 60px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f8;
}
.sector-row:last-child { border-bottom: none; }
.sector-row .nm { font-size: 13px; color: #141d2e; font-weight: 500; }
.sector-row .bar { height: 8px; background: #f0f4f8; border-radius: 999px; overflow: hidden; }
.sector-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00a19d, #004b46);
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.sector-row .ct {
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: #5a6880;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sector-row .avg {
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: #00a19d;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
}

/* Tier distribution mini-bar */
.tier-strip {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f4f8;
  margin-top: 14px;
}
.tier-seg { height: 100%; transition: width 0.7s; }
.tier-seg.platinum { background: #b8a3d6; }
.tier-seg.gold     { background: #c8a44a; }
.tier-seg.silver   { background: #9aa5bb; }
.tier-seg.bronze   { background: #cd7f32; }
.tier-strip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #5a6880;
}
.tier-strip-legend .dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  vertical-align: -1px;
  margin-right: 5px;
}

/* Activity feed */
.activity {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column;
  max-height: 600px;
}
.activity h3 {
  font-size: 16px; font-weight: 600; color: #004b46; margin-bottom: 4px;
}
.activity .sub {
  font-size: 12.5px; color: #5a6880;
  margin-bottom: 16px;
}
.activity-list { flex: 1; overflow-y: auto; }
.activity-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f8;
}
.activity-row:last-child { border-bottom: none; }
.activity-icon {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e0f2f1;
  color: #004b46;
  font-size: 13px; font-weight: 600;
  font-family: 'DM Mono', monospace;
}
.activity-icon.auth { background: #e0f2f1; color: #004b46; }
.activity-icon.admin { background: #fff3d9; color: #6b5314; }
.activity-icon.danger { background: #ffe0d6; color: #b3261e; }

.activity-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-action {
  font-size: 13px; color: #141d2e;
  font-weight: 500;
}
.activity-detail {
  font-size: 11.5px; color: #5a6880;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-time {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; letter-spacing: 1px;
  color: #9aa5bb;
  align-self: center;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  max-width: 360px;
}
.toast {
  background: #004b46;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 75, 70, 0.32);
  font-size: 13px;
  animation: riseIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.success { background: #2e7d32; }
.toast.error   { background: #b3261e; }
