/* ══════════════════════════════════════════════════════════════
   ONE INSIDER v1 — Components
   Covers: nav, buttons, cards, badges, tabs, inputs, footer,
           bottom-nav, ads, toast, maintenance, hero grid
══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   NAV
───────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 62px;
  background: rgba(8,8,10,0.75);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

/* On scroll: darken + subtle glow line */
.nav.scrolled {
  background: rgba(8,8,10,0.96);
  border-color: var(--border-2);
  box-shadow: 0 0 0 1px var(--border), 0 8px 32px rgba(0,0,0,0.45);
}

.nav__inner {
  width: 100%; max-width: 1240px; margin: 0 auto; height: 100%;
  padding: 0 var(--s5);
  display: flex; align-items: center; gap: var(--s4);
}

/* ── Logo ── */
.nav__logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.025em; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; text-decoration: none;
  transition: opacity 0.2s;
}
.nav__logo:hover { opacity: 0.82; }

.nav__logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(245,200,66,0.5);
  animation: logoDotPulse 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes logoDotPulse {
  0%,100% { box-shadow: 0 0 6px rgba(245,200,66,0.35); }
  50%      { box-shadow: 0 0 16px rgba(245,200,66,0.7); }
}

/* ── Centre links (desktop) ── */
.nav__links {
  display: flex; align-items: center; gap: 2px;
  flex: 1; justify-content: center;
}
.nav__link {
  position: relative;
  font-size: 0.78rem; font-weight: 500; color: var(--text-3);
  padding: 6px 11px; border-radius: var(--r2);
  text-decoration: none; white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}
.nav__link:hover  { color: var(--text-2); background: rgba(255,255,255,0.05); }
.nav__link.active { color: var(--accent); background: rgba(245,200,66,0.09); }

/* Underline indicator */
.nav__link.active::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 2px;
  background: var(--accent); border-radius: 99px;
  box-shadow: 0 0 8px rgba(245,200,66,0.6);
}

/* ── Right actions ── */
.nav__actions { display: flex; align-items: center; gap: var(--s3); flex-shrink: 0; margin-left: auto; }

/* ── Hamburger ── */
.nav__hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; cursor: pointer;
  border-radius: var(--r2); transition: background 0.2s; flex-shrink: 0;
}
.nav__hamburger:hover { background: var(--surface); }
.nav__hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-2); border-radius: 99px;
  transition: transform 0.28s cubic-bezier(0.23,1,0.32,1),
              opacity 0.2s, width 0.2s;
  margin: 0 auto;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile dropdown ── */
.nav__mobile {
  display: none;
  position: fixed; top: 62px; left: 0; right: 0; z-index: 99;
  background: rgba(8,8,10,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-2);
  padding: var(--s4) var(--s5);
  flex-direction: column; gap: 3px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.nav__mobile.open { display: flex; animation: fadeDown 0.22s ease; }

.nav__mobile-link {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s3); border-radius: var(--r2);
  font-size: 0.88rem; font-weight: 500; color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
}
.nav__mobile-link:hover  { color: var(--text); background: var(--surface); }
.nav__mobile-link.active { color: var(--accent); background: rgba(245,200,66,0.09); }
.nav__mobile-link__icon  { font-size: 1rem; width: 24px; text-align: center; opacity: 0.8; }

/* ── Version tag (reusable) ── */
.vtag {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: rgba(245,200,66,0.1);
  border: 1px solid rgba(245,200,66,0.22); border-radius: var(--r5);
  padding: 2px 7px; line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 10px 22px; border-radius: var(--r5);
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 500;
  cursor: pointer; border: none;
  transition: all 0.2s cubic-bezier(0.23,1,0.32,1);
  white-space: nowrap; text-decoration: none;
  letter-spacing: 0.01em; position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.96) !important; }

.btn--primary {
  background: var(--accent); color: #000; font-weight: 600;
  box-shadow: 0 2px 12px rgba(245,200,66,0.22),
              inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn--primary:hover {
  background: #ffd84d;
  box-shadow: 0 4px 22px rgba(245,200,66,0.38),
              inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn--ghost:hover { border-color: var(--border-3); color: var(--text); background: var(--surface); }

.btn--surface { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn--surface:hover { background: var(--surface-2); border-color: var(--border-2); }

.btn--accent-outline {
  background: transparent; color: var(--accent);
  border: 1px solid rgba(245,200,66,0.35);
}
.btn--accent-outline:hover { background: var(--accent-glow); border-color: rgba(245,200,66,0.55); }

.btn--danger  { background: var(--danger);  color: #fff; box-shadow: 0 2px 10px rgba(224,82,82,0.22); }
.btn--danger:hover  { background: #c94343; transform: translateY(-1px); }
.btn--success { background: var(--success); color: #000; font-weight: 600; }
.btn--success:hover { background: #60c994;  transform: translateY(-1px); }

.btn--sm  { padding: 6px 14px; font-size: 0.76rem; }
.btn--lg  { padding: 13px 32px; font-size: 0.92rem; font-weight: 600; }
.btn--xl  { padding: 17px 44px; font-size: 1rem; font-weight: 700; }
.btn--icon { padding: 9px; border-radius: var(--r2); }

/* ─────────────────────────────────────────────────────────────
   CARDS
───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r3); padding: var(--s5);
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  position: relative; overflow: hidden;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card--flat:hover { transform: none; box-shadow: none; }

.card--accent-top::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(245,200,66,0.3), transparent);
}
.card--glow:hover { box-shadow: var(--glow-accent), var(--shadow-md); border-color: rgba(245,200,66,0.2); }
.card--elevated   { background: var(--surface-2); box-shadow: var(--shadow-sm); }

/* ─────────────────────────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--s6); padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}
.section-header__label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2);
}
.section-header__title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; }

/* ─────────────────────────────────────────────────────────────
   BADGE
───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r5);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.05em; white-space: nowrap;
}
.badge--accent  { background: var(--accent-glow);   color: var(--accent);  border: 1px solid rgba(245,200,66,0.22); }
.badge--surface { background: var(--surface-2);      color: var(--text-2);  border: 1px solid var(--border); }
.badge--success { background: var(--success-glow);   color: var(--success); border: 1px solid rgba(82,183,136,0.22); }
.badge--danger  { background: var(--danger-glow);    color: var(--danger);  border: 1px solid rgba(224,82,82,0.22); }
.badge--info    { background: var(--info-glow);      color: var(--info);    border: 1px solid rgba(107,163,224,0.22); }
.badge--live {
  background: rgba(224,82,82,0.12); color: var(--danger);
  border: 1px solid rgba(224,82,82,0.2);
}
.badge--live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--danger); animation: pulse 1.4s infinite;
}

/* ─────────────────────────────────────────────────────────────
   PILL TABS
───────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r5); padding: 3px; width: fit-content;
}
.tab {
  padding: 6px 18px; border-radius: var(--r5);
  font-size: 0.79rem; font-weight: 500; color: var(--text-3);
  cursor: pointer; border: none; background: transparent;
  transition: all 0.18s; white-space: nowrap;
}
.tab.active { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-xs); }
.tab:hover:not(.active) { color: var(--text-2); background: rgba(255,255,255,0.04); }

/* ─────────────────────────────────────────────────────────────
   INPUTS
───────────────────────────────────────────────────────────── */
.input, .textarea, .select {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r2);
  padding: 10px 14px; font-family: var(--font-body); font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.select   { cursor: pointer; appearance: none; }
.field    { display: flex; flex-direction: column; gap: var(--s2); }
.field__label { font-size: 0.77rem; font-weight: 500; color: var(--text-2); letter-spacing: 0.03em; }

/* ─────────────────────────────────────────────────────────────
   STAT CHIP
───────────────────────────────────────────────────────────── */
.stat-chip {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r3); padding: var(--s4) var(--s5);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-chip:hover { border-color: rgba(245,200,66,0.2); box-shadow: 0 0 18px rgba(245,200,66,0.06); }
.stat-chip__icon  { font-size: 1.4rem; opacity: 0.75; }
.stat-chip__value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.stat-chip__label { font-size: 0.7rem; color: var(--text-3); letter-spacing: 0.05em; margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────
   AVATAR
───────────────────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   PROGRESS
───────────────────────────────────────────────────────────── */
.progress { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.6s ease; }

/* ─────────────────────────────────────────────────────────────
   TOAST
───────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 76px; right: var(--s5);
  z-index: 9999; display: flex; flex-direction: column; gap: var(--s2);
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border-2);
  padding: var(--s3) var(--s5); border-radius: var(--r3);
  font-size: 0.84rem; color: var(--text);
  box-shadow: var(--shadow-lg); max-width: 300px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
.toast.success { border-color: rgba(82,183,136,0.35); }
.toast.error   { border-color: rgba(224,82,82,0.35); }

/* ─────────────────────────────────────────────────────────────
   AD SLOTS
───────────────────────────────────────────────────────────── */
.ad-slot {
  background: var(--bg-2); border: 1px dashed rgba(255,255,255,0.05);
  border-radius: var(--r2); padding: var(--s4);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px;
  color: var(--text-4); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.ad-slot--banner { height: 90px; width: 100%; }
.ad-slot--rect   { height: 250px; }

/* ─────────────────────────────────────────────────────────────
   MAINTENANCE
───────────────────────────────────────────────────────────── */
#maintenance-screen {
  position: fixed; inset: 0; z-index: 99999; background: var(--bg);
  display: none; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: var(--s5);
}
#maintenance-screen.active { display: flex; }
.maintenance__icon  { font-size: 3rem; }
.maintenance__title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.maintenance__text  { color: var(--text-2); max-width: 400px; }

/* ─────────────────────────────────────────────────────────────
   FOOTER  (scrollable — used in index.html)
───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s8) 0 var(--s6);
  margin-top: var(--s8);
  background: var(--bg-2);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,200,66,0.15), transparent);
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s7); margin-bottom: var(--s7);
}
.footer__brand-name {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 800;
  display: flex; align-items: center; gap: var(--s2);
}
.footer__brand-desc {
  color: var(--text-3); font-size: 0.8rem; margin-top: var(--s3); line-height: 1.7;
}
.footer__heading {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s4);
}
.footer__links { display: flex; flex-direction: column; gap: var(--s2); }
.footer__link  { font-size: 0.81rem; color: var(--text-3); transition: color 0.2s; padding: 2px 0; }
.footer__link:hover { color: var(--text-2); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s5); border-top: 1px solid var(--border);
}
.footer__copy { font-size: 0.74rem; color: var(--text-3); }

/* ─────────────────────────────────────────────────────────────
   BOTTOM NAV  (fixed — used in inner pages)
───────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  height: 60px;
  background: rgba(8,8,10,0.95);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid var(--border);
}
.bottom-nav__inner {
  max-width: 1240px; margin: 0 auto; height: 100%;
  padding: 0 var(--s5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.bottom-nav__brand {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 800;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.bottom-nav__brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px rgba(245,200,66,0.5);
}
.bnav {
  display: flex; align-items: center; gap: 2px;
  flex: 1; justify-content: center;
  overflow-x: auto; scrollbar-width: none;
}
.bnav::-webkit-scrollbar { display: none; }
.bnav-link {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 10px; border-radius: var(--r2); color: var(--text-3);
  text-decoration: none; font-size: 0.57rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  transition: color 0.18s, background 0.18s; flex-shrink: 0;
}
.bnav-link:hover  { color: var(--text-2); background: var(--surface); }
.bnav-link.active { color: var(--accent); }
.bnav-link__icon  { font-size: 1.05rem; line-height: 1; }
.bnav-copy { font-size: 0.57rem; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }

/* ─────────────────────────────────────────────────────────────
   MISC HELPERS
───────────────────────────────────────────────────────────── */
.hero-grid {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, black 0%, transparent 80%);
}
.accent-line {
  width: 32px; height: 2px; background: var(--accent);
  border-radius: 99px; margin-bottom: var(--s4);
  box-shadow: 0 0 10px rgba(245,200,66,0.45);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav__links   { display: none; }
  .nav__hamburger { display: flex; }
  .nav__actions .btn { display: none; }   /* hide "Are you Admin?" on mobile */
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .section-header { flex-direction: column; align-items: flex-start; gap: var(--s3); }
  .bnav-link { padding: 5px 7px; }
}
@media (max-width: 480px) {
  .footer__grid   { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--s3); text-align: center; }
  .bottom-nav__brand, .bnav-copy { display: none; }
  .bnav { justify-content: space-around; width: 100%; }
  .bnav-link { padding: 5px 6px; }
}