:root {
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --navy: #0f172a;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}
.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--navy);
}
.logo span { color: var(--primary); }
.nav { display: flex; gap: 1.25rem; }
.nav a { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
.btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 1.5px solid var(--border);
}
.text-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem 0 2rem;
}
.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0.4rem 0 1rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.hint { color: var(--muted); font-size: 0.9rem; }

.phone {
  background: linear-gradient(160deg, #1e3a8a, #2563eb);
  border-radius: 28px;
  padding: 1rem;
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 320px;
}
.phone-bar { opacity: 0.85; font-weight: 700; margin-bottom: 1rem; }
.phone-body {
  background: rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pill {
  align-self: flex-start;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.mini-row { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.mini-row span {
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: 1.8rem; margin: 0 0 1.25rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.section-head h2 { margin: 0; }
.muted { color: var(--muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.event-card {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.event-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.event-poster {
  width: 100%;
  height: 160px;
  background: var(--bg-alt);
  overflow: hidden;
}
.event-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-poster-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.event-body { padding: 1rem 1.15rem 1.2rem; }
.event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.event-card .sport {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}
.event-card h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
}
.event-meta {
  margin: 0.2rem 0 !important;
  font-size: 0.9rem !important;
}
.event-fee {
  margin-top: 0.65rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  font-size: 0.95rem !important;
}
.badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-open { background: #dcfce7; color: #166534; }
.badge-live { background: #fee2e2; color: #991b1b; }
.badge-done { background: #e2e8f0; color: #475569; }
.badge-cancel { background: #fee2e2; color: #b91c1c; }

.detail-poster {
  margin: 1rem 0 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  max-height: 360px;
}
.detail-poster img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 360px;
}

.steps {
  padding-left: 1.2rem;
  max-width: 40rem;
}
.steps li { margin-bottom: 0.75rem; }

.legal-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.event-detail, .legal-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}
.legal-body {
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.6;
}
.link-back {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.5rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
  background: #fff;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.copy {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.tabs-live {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin: 1.25rem 0 1rem;
  flex-wrap: wrap;
}
.tabs-live button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.tabs-live button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.live-content .match-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  background: #fff;
}
.live-content .match-row .round {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}
.winner-name { color: #16a34a; font-weight: 700; }

.tag { color: #2563EB; font-weight: 600; font-size: 0.85em; }
.match-row { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; margin-bottom: 8px; background: #fff; }

/* —— Panel organizatora (web) —— */
.org-header { margin-bottom: 1.25rem; }
.org-login { max-width: 420px; margin: 1rem 0; }
.org-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.org-toolbar-actions { display: flex; gap: 0.5rem; }
.org-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}
.stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}
.stat-lbl {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.2rem;
}
.org-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0.5rem 0 0.25rem;
}
.field {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--bg-alt);
  color: var(--navy);
}
.plan-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.plan-chip {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--navy);
}
.plan-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.org-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.org-event-card h3 { margin: 0.35rem 0; }
.org-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.org-actions select {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.org-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.error { color: #dc2626; font-size: 0.9rem; margin-top: 0.5rem; }

@media (max-width: 800px) {
  .org-stats { grid-template-columns: 1fr 1fr; }
  .org-grid, .org-create-grid { grid-template-columns: 1fr; }
}


.org-manage { border: 2px solid var(--primary-soft); }
.org-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.org-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--muted);
}
.org-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.org-poster-preview {
  margin-top: 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  max-width: 320px;
  background: var(--bg-alt);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.org-poster-preview img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: cover;
}
.staff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.upload-row input[type="file"] {
  font-size: 0.9rem;
  max-width: 100%;
}


/* ——— Public event hero (mockup 1:1) ——— */
.ev-kicker { color: var(--primary); font-weight: 800; letter-spacing: .12em; font-size: 0.75rem; text-transform: uppercase; margin: 0 0 0.35rem; }
.event-detail h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 0.6rem; }
.ev-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: start; margin-bottom: 1.75rem; }
.ev-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 20px; background: #e2e8f0; box-shadow: var(--shadow); }
.ev-cover-ph { background: linear-gradient(135deg,#1d4ed8,#0f172a); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1.4rem; }
.ev-chips { display:flex; flex-wrap:wrap; gap:0.45rem; margin: 0.35rem 0 1rem; }
.ev-chip { background: #EFF6FF; color: #1D4ED8; border-radius: 999px; padding: 0.32rem 0.8rem; font-size: 0.8rem; font-weight: 700; }
.ev-params { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.7rem; margin: 0.4rem 0 1rem; }
.ev-param { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 0.85rem 1rem; display:flex; gap: 0.7rem; align-items:flex-start; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.ev-ico { width: 36px; height: 36px; border-radius: 10px; background: #EFF6FF; color: #2563EB; display:flex; align-items:center; justify-content:center; font-size: 1rem; flex-shrink: 0; }
.ev-param span { display:block; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ev-param strong { font-size: 0.98rem; }
.ev-actions { display:flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.4rem; }
.ev-section { margin-top: 1.75rem; }
.ev-section h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }

/* Live header */
.live-header { margin-bottom: 1rem; }
.live-badge { display:inline-flex; align-items:center; gap:0.4rem; background:#0D9488; color:#fff; font-size:0.72rem; font-weight:800; letter-spacing:.08em; padding:0.28rem 0.7rem; border-radius:999px; }
.live-badge:before { content:''; width:8px; height:8px; border-radius:50%; background:#fff; box-shadow:0 0 0 4px rgba(255,255,255,.25); }
.tabs-live { display:flex; gap:1.25rem; border-bottom:1px solid var(--border); margin: 1rem 0 1.25rem; }
.tabs-live button { background:none; border:none; padding:0.6rem 0; font-weight:700; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; }
.tabs-live button.active { color: var(--primary); border-bottom-color: var(--primary); }

@media (max-width: 800px) { .ev-hero, .ev-params { grid-template-columns: 1fr; } }

/* ——— Bracket tree 1:1 ——— */
.bt-wrap { margin-top: 0.25rem; }
.bt-heading { margin: 0 0 0.75rem; }
.bt-side { margin-bottom: 2rem; }
.bt-side-title { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.bt-tree { display: flex; gap: 0; overflow-x: auto; padding: 0.35rem 0 1.5rem; align-items: stretch; }
.bt-col { min-width: 250px; display: flex; flex-direction: column; }
.bt-col-title { font-size: 0.78rem; font-weight: 800; color: #94A3B8; text-align: center; margin-bottom: 0.85rem; }
.bt-col-stack { display: flex; flex-direction: column; justify-content: space-around; gap: 1.6rem; flex: 1; padding-right: 28px; }
.bt-slot { position: relative; }
.bt-slot:after {
  content: '';
  position: absolute;
  right: -28px;
  top: 50%;
  width: 28px;
  height: 2px;
  background: #CBD5E1;
}
.bt-col:last-child .bt-slot:after { display: none; }
.bt-slot.join:before {
  content: '';
  position: absolute;
  right: -28px;
  width: 2px;
  background: #CBD5E1;
  top: 50%;
  height: calc(50% + 0.8rem);
}
.bt-slot.join-top:before { top: 50%; }
.bt-slot.join-bot:before { bottom: 50%; top: auto; height: calc(50% + 0.8rem); }

.bt-match {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15,23,42,.07);
  position: relative;
  min-width: 222px;
}
.bt-meta { font-size: 0.7rem; color: #94A3B8; padding: 0.4rem 0.7rem 0.15rem; font-weight: 600; }
.bt-player { display: flex; align-items: center; padding: 0.48rem 0.55rem 0.48rem 0.55rem; gap: 0.45rem; background: #F8FAFC; }
.bt-player + .bt-player { border-top: 1px solid #E2E8F0; }
.bt-seed {
  width: 20px; height: 20px; border-radius: 50%;
  background: #E2E8F0; color: #64748B;
  font-size: 0.68rem; font-weight: 800;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.bt-name { font-weight: 700; font-size: 0.88rem; color: #475569; flex: 1; min-width: 0; }
.bt-score { min-width: 28px; text-align: center; font-weight: 800; background: #E2E8F0; color: #334155; border-radius: 7px; padding: 0.12rem 0.38rem; }
.bt-player.win { background: #FBBF24; }
.bt-player.win .bt-name { color: #0F172A; }
.bt-player.win .bt-seed { background: #F59E0B; color: #fff; }
.bt-player.win .bt-score { background: #0D9488; color: #fff; }
.bt-player.lose .bt-name { color: #94A3B8; }
.bt-player.tbd .bt-name { color: #CBD5E1; font-weight: 600; }
.bt-place {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  background: #F59E0B; color: #fff; font-size: 0.65rem; font-weight: 800;
  padding: 0.18rem 0.42rem; border-radius: 6px; z-index: 2;
}
.bt-place.p3 { background: #B45309; }

.bt-champ {
  min-width: 180px; align-self: center; margin: auto 0 auto 8px;
  border: 1px solid #E2E8F0; border-radius: 16px; padding: 1.1rem 1rem;
  text-align: center; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.07);
}
.bt-champ .cup { font-size: 1.6rem; }
.bt-champ strong { display:block; margin-top: 0.35rem; font-size: 1.05rem; }
.bt-champ span { color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.ml-list { display: flex; flex-direction: column; gap: 0.55rem; }
.ml-row { border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.9rem; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.ml-row.done { background: #F8FAFC; }
.ml-when { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.2rem; }
.ml-vs { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-weight: 700; }
.ml-score { color: var(--primary); font-variant-numeric: tabular-nums; }
.ml-vs .win { color: #0D9488; }

.org-adv { display:grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 700px) { .org-adv { grid-template-columns: 1fr; } }
