
/* ═══════════════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f5f0;
  --bg-mid: #ece9e0;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --muted: #666666;
  --line: #ddd8cc;
  --success: #0a6e3c;
  --warn: #a36500;
  --danger: #8b2020;
  --shadow: 0 8px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.18);
  --rec-verde: #B8FF3C;
  --rec-verde-claro: #D4FF7A;
  --rec-negro: #0A0A0A;

  /* Tipografía */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Archivo Black', sans-serif;

  /* Paleta dorada */
  --gold: #C9A84C;
  --gold-light: #E8CC7A;
  --gold-dark: #8B6914;
  --gold-subtle: rgba(201, 168, 76, .12);
  --gold-glow: 0 0 28px rgba(201, 168, 76, .35);
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}
body {
  background-image: repeating-linear-gradient(
    45deg, transparent 0 30px, rgba(201,168,76,.018) 30px 31px
  );
}

/* ═══════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════ */
.topbar {
  background: var(--ink);
  color: var(--bg);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow), 0 2px 0 var(--gold);
  border-bottom: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 46px; height: 46px;
  background: var(--ink); color: var(--gold);
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 16px; letter-spacing: -.5px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 14px rgba(201,168,76,.3);
}
.brand-text { line-height: 1.1; }
.brand-text .company {
  font-family: var(--font-display);
  letter-spacing: 2px; font-size: 17px; color: var(--gold);
}
.brand-text .product {
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: .5px;
}
.nav { display: flex; gap: 2px; }
.nav button {
  background: transparent; color: var(--bg);
  border: none; padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .2s;
}
.nav button:hover { background: rgba(201,168,76,.12); color: var(--gold-light); }
.nav button.active { background: var(--gold); color: #0a0a0a; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(201,168,76,.08);
  padding: 6px 14px 6px 6px;
  border-radius: 30px;
  border: 1px solid rgba(201,168,76,.25);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold); color: #0a0a0a;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
}
.user-chip .name { font-size: 13px; font-weight: 600; }
.user-chip .client { font-size: 10px; opacity: .6; text-transform: uppercase; letter-spacing: 1px; }
.logout-btn {
  background: transparent;
  border: 1px solid rgba(201,168,76,.35);
  color: var(--gold-light);
  padding: 6px 12px; border-radius: 6px;
  font-size: 11px; cursor: pointer;
  font-weight: 600; margin-left: 8px;
  transition: all .2s;
}
.logout-btn:hover { background: rgba(201,168,76,.15); border-color: var(--gold); }

/* ═══════════════════════════════════════════════════
   LAYOUT & CARDS
═══════════════════════════════════════════════════ */
main { max-width: 1400px; margin: 0 auto; padding: 32px 28px 80px; }
.view { display: none; animation: fadeUp .4s ease; }
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 32px; }
.card {
  background: var(--bg);
  border-radius: 16px; padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card h2 {
  font-family: var(--font-display);
  font-size: 18px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: 1px;
}
.card h2::before {
  content: '';
  width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════ */
.hero {
  background: var(--ink);
  border-radius: 20px; padding: 44px 48px;
  color: var(--bg); position: relative;
  overflow: hidden; margin-bottom: 32px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,168,76,.2);
}
.hero::before {
  content: '2026';
  position: absolute; right: -20px; bottom: -60px;
  font-family: var(--font-display);
  font-size: 240px; color: rgba(201,168,76,.06);
  letter-spacing: -10px; line-height: .8;
}
.hero::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0, var(--gold) 20%, var(--gold-light) 50%, var(--gold) 80%, transparent 100%);
}
.hero-content {
  position: relative;
  display: flex; justify-content: space-between;
  gap: 30px; align-items: center; flex-wrap: wrap;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 48px; line-height: 1; letter-spacing: -1.5px;
}
.hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--gold); }
.hero .sub { margin-top: 14px; font-size: 16px; opacity: .75; max-width: 520px; line-height: 1.5; }
.hero-stats { display: flex; gap: 14px; }
.stat-card {
  background: rgba(201,168,76,.06);
  backdrop-filter: blur(8px);
  padding: 18px 22px; border-radius: 12px;
  border: 1px solid rgba(201,168,76,.2);
  min-width: 110px;
}
.stat-card .n {
  font-family: var(--font-display);
  font-size: 32px; color: var(--gold-light); line-height: 1;
}
.stat-card .l { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; opacity: .6; margin-top: 8px; }

/* ═══════════════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════════════ */
.progress-big {
  background: var(--bg-soft);
  border-radius: 10px; height: 32px;
  overflow: hidden; border: 2px solid var(--gold-dark);
}
.progress-big .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
  width: 0%; position: relative;
  transition: width 1s cubic-bezier(.2,.8,.2,1);
}
.progress-big .fill::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent 0 12px, rgba(255,255,255,.12) 12px 14px
  );
}
.progress-label {
  display: flex; justify-content: space-between;
  margin-top: 10px; font-size: 13px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   PACKS (SOBRES)
═══════════════════════════════════════════════════ */
.packs-row { display: flex; gap: 14px; margin-top: 16px; }
.pack {
  flex: 1; aspect-ratio: 5/7;
  background: var(--ink);
  border-radius: 12px; cursor: pointer;
  position: relative; transition: all .3s cubic-bezier(.2,.8,.2,1);
  display: grid; place-items: center;
  color: var(--bg); overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid rgba(201,168,76,.4);
}
.pack::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 25%, rgba(201,168,76,.12) 0, transparent 55%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(201,168,76,.03) 14px 15px);
}
.pack::after {
  content: ''; position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px dashed rgba(201,168,76,.3);
  border-radius: 6px; pointer-events: none;
}
.pack-inner { position: relative; text-align: center; padding: 14px; z-index: 1; }
.pack-inner .bolt { font-family: var(--font-display); font-size: 36px; line-height: 1; color: var(--gold); }
.pack-inner .t { font-family: var(--font-display); font-size: 14px; margin-top: 6px; }
.pack-inner .s { font-size: 10px; opacity: .6; margin-top: 4px; text-transform: uppercase; letter-spacing: 1.5px; }
.pack:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 16px 32px rgba(0,0,0,.3), var(--gold-glow); border-color: var(--gold); }
.pack.opened {
  background: var(--bg-mid); color: var(--muted);
  border-color: var(--line); cursor: default;
  box-shadow: none; opacity: .55;
}
.pack.opened:hover { transform: none; box-shadow: none; }
.pack-info {
  background: var(--bg-soft); padding: 14px 18px;
  border-radius: 10px; margin-top: 18px;
  font-size: 13px; display: flex; align-items: center;
  gap: 10px; border: 1px solid var(--line);
}
.pack-info .clock {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0a0a0a;
  padding: 4px 10px; border-radius: 6px;
  font-family: var(--font-display);
  letter-spacing: .5px;
}

/* ═══════════════════════════════════════════════════
   LEADERBOARD
═══════════════════════════════════════════════════ */
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.lb-row.me {
  background: linear-gradient(135deg, #111008, #1a1500);
  color: var(--bg); border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(201,168,76,.2);
}
.lb-row.me .lb-pct { background: var(--gold); color: #0a0a0a; }
.lb-row.me .lb-rank { color: var(--gold); }
.lb-rank { font-family: var(--font-display); width: 32px; text-align: center; font-size: 16px; }
.lb-name { flex: 1; font-weight: 600; font-size: 14px; }
.lb-pct {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0a0a0a;
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  font-family: var(--font-display);
  min-width: 56px; text-align: center;
}

/* ═══════════════════════════════════════════════════
   RANKING COMPLETO
═══════════════════════════════════════════════════ */
.rank-full {
  background: var(--bg); border-radius: 16px;
  padding: 32px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.rank-full h2 { font-family: var(--font-display); font-size: 26px; text-transform: uppercase; margin-bottom: 6px; }
.rank-full .intro { color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.podium-spot {
  border-radius: 12px; padding: 22px 16px;
  text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 8px;
  border: 2px solid var(--line);
}
.podium-spot .medal { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.podium-spot .pn { font-family: var(--font-display); font-size: 14px; }
.podium-spot .pp { font-family: var(--font-display); font-size: 22px; padding: 4px 14px; border-radius: 20px; }
/* 1er lugar: dorado */
.p1 {
  background: linear-gradient(160deg, #111008 0%, #1e1800 100%);
  color: var(--gold-light);
  order: 2; padding-top: 34px;
  border-color: var(--gold);
  box-shadow: var(--gold-glow);
}
.p1 .medal { color: var(--gold); }
.p1 .pn { color: var(--gold-light); }
.p1 .pp { background: var(--gold); color: #0a0a0a; }
/* 2do: plata */
.p2 { background: var(--bg); color: var(--ink); order: 1; border-color: #bbb; }
.p2 .medal { color: #888; }
.p2 .pp { background: var(--ink); color: var(--bg); }
/* 3ro: bronce */
.p3 { background: var(--bg-soft); color: var(--ink); order: 3; border-color: #c08040; }
.p3 .medal { color: #a0602a; }
.p3 .pp { background: var(--ink); color: var(--bg); }
/* Banner del premio */
.prize-banner {
  background: linear-gradient(135deg, #0a0a0a 0%, #120e00 100%);
  color: var(--bg);
  border-radius: 16px; padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(201,168,76,.35);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(201,168,76,.15);
}
.prize-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}
.prize-banner .icon {
  font-family: var(--font-display); font-size: 44px;
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  color: #0a0a0a;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: var(--gold-glow);
}
.prize-banner .tit { font-family: var(--font-display); font-size: 18px; letter-spacing: -.3px; line-height: 1.2; color: var(--gold-light); }
.prize-banner .desc { font-size: 13px; margin-top: 4px; max-width: 500px; opacity: .8; }

/* ── Tabs ranking ── */
.rank-tab-btn {
  padding: 9px 20px; border: 2px solid var(--gold-dark);
  border-radius: 8px; font-weight: 700; font-size: 12px;
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  background: var(--bg); color: var(--ink); transition: all .2s;
}
.rank-tab-btn.active { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.rank-tab-btn:hover:not(.active) { background: var(--gold-subtle); border-color: var(--gold); }

/* ── Filas ranking universidades ── */
.uni-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  margin-bottom: 8px;
}
.uni-row.top1 {
  background: linear-gradient(135deg, #111008, #1a1500);
  color: var(--gold-light);
  border-color: var(--gold);
  box-shadow: 0 2px 16px rgba(201,168,76,.2);
}
.uni-row.top1 .uni-rank { color: var(--gold); }
.uni-rank { font-family: var(--font-display); width: 32px; text-align: center; font-size: 16px; }
.uni-name { flex: 1; font-weight: 600; font-size: 14px; }
.uni-meta { font-size: 11px; opacity: .6; margin-top: 2px; }
.uni-pct {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0a0a0a; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  font-family: var(--font-display); min-width: 48px; text-align: center;
}

/* ═══════════════════════════════════════════════════
   PERFIL
═══════════════════════════════════════════════════ */
.integration-card {
  background: var(--bg); border-radius: 14px;
  padding: 28px; border: 2px solid var(--gold-dark);
}
.integration-card h3 {
  font-family: var(--font-display);
  font-size: 18px; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 1px;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.data-row {
  display: flex; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
  font-size: 14px; gap: 12px;
}
.data-row:last-child { border: none; }
.data-row .k { color: var(--muted); font-weight: 600; }
.data-row .v { color: var(--ink); font-weight: 700; text-align: right; }

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 300; background: var(--ink); color: var(--bg);
  padding: 16px 22px; border-radius: 10px;
  box-shadow: var(--shadow-lg), var(--gold-glow);
  border-left: 4px solid var(--gold);
  transform: translateX(130%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  max-width: 340px;
}
.toast.show { transform: translateX(0); }
.toast .tt { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--gold-light); }
.toast .td { font-size: 12px; opacity: .75; margin-top: 3px; }

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn {
  padding: 12px 28px; border-radius: 8px;
  border: none; cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700; font-size: 13px;
  transition: all .2s;
  letter-spacing: 1px; text-transform: uppercase;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--gold-dark); }
.btn-ghost:hover { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }

/* ═══════════════════════════════════════════════════
   LOADING
═══════════════════════════════════════════════════ */
.loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; color: var(--muted); font-size: 14px;
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════
   MODAL BASE
═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn .3s ease; }
.modal {
  background: var(--bg); border-radius: 16px; padding: 36px;
  max-width: 760px; width: 100%;
  box-shadow: var(--shadow-lg), var(--gold-glow);
  border: 2px solid var(--gold-dark);
  position: relative; overflow: hidden;
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 28px; text-align: center;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.modal .modal-sub {
  text-align: center; font-size: 13px;
  color: var(--muted); margin-bottom: 24px;
  text-transform: uppercase; letter-spacing: 2px;
}
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ═══════════════════════════════════════════════════
   ADMIN
═══════════════════════════════════════════════════ */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 18px; border: 2px solid var(--gold-dark);
  border-radius: 8px; font-weight: 700; font-size: 12px;
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  background: var(--bg); color: var(--ink); transition: all .2s;
}
.admin-tab:hover { background: var(--gold-subtle); }
.admin-tab.active { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp .3s ease; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--gold-dark);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted);
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:hover td { background: var(--gold-subtle); }
.admin-table tr { cursor: pointer; }
.admin-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.admin-badge.green { background: #e1f5ee; color: var(--success); }
.admin-badge.amber { background: #fff3dc; color: var(--warn); }
.user-detail-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 250; display: none; align-items: center; justify-content: center; padding: 20px;
}
.user-detail-overlay.show { display: flex; animation: fadeIn .2s ease; }
.user-detail {
  background: var(--bg); border-radius: 16px; padding: 32px;
  max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto;
  border: 2px solid var(--gold-dark);
  box-shadow: var(--shadow-lg), var(--gold-glow);
}
.user-detail h3 {
  font-family: var(--font-display); font-size: 20px;
  margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center;
}
.user-detail .close-btn {
  background: var(--ink); color: var(--bg);
  border: none; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 16px; font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .nav button { padding: 8px 10px; font-size: 12px; }
  .user-chip .client { display: none; }
  main { padding: 20px 16px 60px; }
  .hero { padding: 28px 24px; }
  .hero h1 { font-size: 32px; }
  .podium { grid-template-columns: 1fr; }
  .p1, .p2, .p3 { order: unset; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .hero-content { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════
   CHECKLIST
═══════════════════════════════════════════════════ */
.cl-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 20px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.cl-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-filter-btns { display: flex; gap: 4px; }
.cl-filter {
  padding: 8px 14px; border: 2px solid var(--gold-dark);
  border-radius: 8px; font-weight: 700; font-size: 12px;
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  background: var(--bg); color: var(--ink); transition: all .2s;
}
.cl-filter.active { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.cl-body { display: flex; flex-direction: column; gap: 16px; }
.cl-team {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.cl-team-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.cl-code {
  font-family: var(--font-display); font-size: 14px; font-weight: 900;
  background: var(--ink); color: var(--gold);
  padding: 2px 8px; border-radius: 4px; letter-spacing: 1px;
}
.cl-name { flex: 1; font-weight: 700; font-size: 14px; }
.cl-count {
  font-family: var(--font-display); font-size: 12px;
  color: var(--muted); letter-spacing: .5px;
}
.cl-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  padding: 12px;  gap: 6px;
}
.cl-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px; font-size: 12px;
  border: 1px solid var(--line); transition: background .15s;
}
.cl-item.owned {
  background: linear-gradient(135deg, #f0eddf, #e8e3d0);
  border-color: var(--gold-dark); text-decoration: line-through;
  color: var(--muted);
}
.cl-item.missing { background: var(--bg); }
.cl-check {
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9px;
  flex-shrink: 0;
}
.cl-item.owned .cl-check {
  background: var(--gold); color: #0a0a0a; font-weight: 900;
}
.cl-item.missing .cl-check {
  background: var(--bg-soft); border: 1.5px dashed var(--line);
}
.cl-label { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-sub { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   TRADES
═══════════════════════════════════════════════════ */
.trade-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.trade-panel { background: var(--bg); border-radius: 16px; padding: 24px; border: 1px solid var(--line); }
.trade-panel h3 { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.dup-list { display: flex; flex-direction: column; gap: 6px; max-height: 480px; overflow-y: auto; }
.dup-chip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 13px; transition: all .15s;
}
.dup-chip:hover { border-color: var(--gold); background: var(--gold-subtle); }
.dup-id { font-weight: 600; }
.dup-qty {
  background: var(--ink); color: var(--gold);
  font-family: var(--font-display); font-size: 11px;
  padding: 2px 8px; border-radius: 10px;
}
.trade-match-card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.trade-match-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.trade-match-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: #0a0a0a;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 900;
  flex-shrink: 0;
}
.trade-match-name { font-weight: 700; font-size: 14px; }
.trade-match-uni { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.trade-match-pills { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.trade-pill {
  padding: 8px 10px; border-radius: 8px; font-size: 11px;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.trade-pill.have { background: rgba(10,110,60,.08); border: 1px solid rgba(10,110,60,.2); }
.trade-pill.need { background: rgba(139,105,20,.08); border: 1px solid rgba(139,105,20,.25); }
.trade-pill .pill-label { font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; width: 100%; margin-bottom: 2px; }
.trade-pill.have .pill-label { color: var(--success); }
.trade-pill.need .pill-label { color: var(--gold-dark); }
.trade-pill span:not(.pill-label) {
  background: rgba(255,255,255,.7); padding: 2px 7px;
  border-radius: 4px; font-size: 10px; font-weight: 600;
}
.trade-contact-btn {
  display: block; text-align: center; padding: 9px 14px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; border-radius: 8px;
  font-weight: 700; font-size: 12px; text-decoration: none;
  text-transform: uppercase; letter-spacing: .5px;
  transition: opacity .2s;
}
.trade-contact-btn:hover { opacity: .88; }
.ts-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.ts-row:last-child { border: none; }
@media (max-width: 768px) {
  .trade-layout { grid-template-columns: 1fr; }
  .cl-items { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cl-controls { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════
   DASHBOARD REDESIGN
═══════════════════════════════════════════════════ */
#view-dashboard { margin: -32px -28px -80px; background: #0a0a0a; color: #fff; }

.dash-hero {
  position: relative; overflow: hidden;
  padding: 72px 48px 44px; text-align: center;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E"),
    linear-gradient(180deg,#151515 0%,#0a0a0a 100%);
}
.dash-title {
  font-family: var(--font-display);
  font-size: clamp(64px,11vw,148px);
  line-height: .86; letter-spacing: -3px;
  color: #fff; text-transform: uppercase; position: relative; z-index: 1;
}
.dash-brand-line {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 20px;
  font-family: var(--font-display); font-size: 19px; letter-spacing: 5px; color: #fff;
  position: relative; z-index: 1;
}
.dash-stars { color: var(--gold); letter-spacing: 5px; }

.dash-stats-row {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 28px 48px 30px; border-top: 1px solid #1c1c1c;
}
.dash-desc { max-width: 320px; font-size: 15px; line-height: 1.5; color: #fff; flex-shrink: 0; font-family: var(--font-display); letter-spacing: -.3px; }
.dash-stats { display: flex; gap: 10px; flex-shrink: 0; }
.dash-stat { background: #111; border-radius: 18px; padding: 16px 22px 14px; min-width: 106px; text-align: center; }
.dash-stat.muted { background: #1a1a1a; }
.dash-stat-n { font-family: var(--font-display); font-size: 42px; line-height: 1; letter-spacing: -1px; color: #fff; }
.dash-stat-l { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: #555; margin-top: 6px; }

.dash-marquee { overflow: hidden; padding: 12px 0; border-top: 1px solid #1c1c1c; border-bottom: 1px solid #1c1c1c; }
.dash-marquee-track {
  display: inline-flex; align-items: center; gap: 32px;
  white-space: nowrap;
  font-family: var(--font-display); font-size: 42px; letter-spacing: -1px; text-transform: uppercase; color: #fff;
  animation: dash-marquee 14s linear infinite;
}
.dash-burst { color: var(--gold); font-size: 28px; }
@keyframes dash-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.dash-packs { padding: 44px 48px 60px; border-top: 1px solid #1c1c1c; }
.dash-packs-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 32px; }
.dash-packs-title {
  font-family: var(--font-display);
  font-size: clamp(44px,7vw,80px); line-height: .88;
  letter-spacing: -2px; text-transform: uppercase; color: #fff; margin-bottom: 14px;
}
.dash-packs-deco { display: flex; justify-content: space-between; color: var(--gold); font-size: 14px; letter-spacing: 4px; margin: 8px 0 14px; }
.dash-packs-info { font-size: 11px; color: #777; letter-spacing: .5px; text-transform: uppercase; line-height: 2.2; }
.dash-packs-info strong { color: #fff; }
.dash-countdown-box { background: #161616; border-radius: 20px; padding: 20px 40px; text-align: center; }
.dash-countdown-box .clock { font-family: var(--font-display); font-size: 54px; letter-spacing: 4px; color: #fff; line-height: 1; }
.dash-countdown-label { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: #444; text-align: center; margin-top: 10px; }
#view-dashboard .packs-row { display: flex; gap: 20px; margin-top: 0; }
#view-dashboard .pack { flex: 1; aspect-ratio: 3/4; background: #fff; border-radius: 18px; border: none; max-height: 300px; }
#view-dashboard .pack::before { background-image: none; }
#view-dashboard .pack .pack-inner .bolt,
#view-dashboard .pack .pack-inner .t,
#view-dashboard .pack .pack-inner .s { color: #0a0a0a; }
#view-dashboard .pack.opened { background: #222; border: 2px solid #333; color: #666; box-shadow: none; opacity: 1; }
#view-dashboard .pack.opened:hover { transform: none; }
#view-dashboard #dashboard-ads { padding: 0 48px 60px; }
#view-dashboard .ads-highlight { margin: 0 0 24px; }

@media (max-width: 768px) {
  #view-dashboard { margin: -32px -16px -80px; }
  .dash-hero { padding: 48px 24px 32px; }
  .dash-stats-row { flex-direction: column; align-items: flex-start; padding: 20px 24px; }
  .dash-packs-header { flex-direction: column; align-items: flex-start; }
  .dash-packs { padding: 32px 24px 48px; }
  .dash-marquee-track { font-size: 28px; }
}
