:root {
  --bg: #05030c;
  --panel: rgba(15, 12, 32, 0.82);
  --panel-strong: rgba(20, 16, 45, 0.94);
  --border: rgba(157, 105, 255, 0.22);
  --text: #f7f4ff;
  --muted: #a99fca;
  --purple: #8b5cf6;
  --purple-2: #c084fc;
  --blue: #38bdf8;
  --danger: #fb7185;
  --success: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 30rem),
    linear-gradient(135deg, #04030a 0%, #09071a 52%, #04030a 100%);
  overflow-x: hidden;
}

button, input, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.7) 1px, transparent 1px),
    radial-gradient(circle, rgba(192,132,252,.6) 1px, transparent 1px),
    radial-gradient(circle, rgba(56,189,248,.45) 1px, transparent 1px);
  background-size: 110px 110px, 180px 180px, 260px 260px;
  opacity: .22;
  animation: drift 18s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-80px); }
}

.glow {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .32;
  pointer-events: none;
}

.glow-one { left: -8rem; top: 10%; background: var(--purple); }
.glow-two { right: -9rem; bottom: 4%; background: var(--blue); }

.pitch-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
}

.pitch-center-line {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1px;
  height: min(72vh, 720px);
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.38), transparent);
}

.pitch-center-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(18vw, 220px);
  height: min(18vw, 220px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
}

.pitch-center-circle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.5);
  border-radius: 50%;
}

.goal {
  position: absolute;
  top: 50%;
  width: 90px;
  height: 170px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.24);
  border-left: 0;
  border-radius: 0 22px 22px 0;
}

.goal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-left: 0;
  border-radius: 0 16px 16px 0;
}

.goal-left {
  left: 0;
  border-left: 1px solid rgba(255,255,255,.24);
  border-right: 0;
  border-radius: 22px 0 0 22px;
}

.goal-left::before {
  border-left: 1px solid rgba(255,255,255,.12);
  border-right: 0;
  border-radius: 16px 0 0 16px;
}

.goal-right { right: 0; }

.floating-balls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ball {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, #ffffff, #f5f6fb 45%, #cfd6e2 70%, #8f98aa 100%);
  box-shadow:
    inset -3px -4px 8px rgba(0,0,0,.16),
    0 0 20px rgba(255,255,255,.14);
  opacity: .72;
}

.ball::before,
.ball::after {
  content: "";
  position: absolute;
  background: rgba(20, 20, 25, .48);
  border-radius: 999px;
}

.ball::before {
  width: 7px;
  height: 7px;
  left: 7px;
  top: 7px;
}

.ball::after {
  width: 4px;
  height: 4px;
  right: 5px;
  bottom: 4px;
}

.ball-1 { left: -3vw; top: 12vh; animation: ballPathLeft 13s linear infinite; }
.ball-2 { right: -3vw; top: 18vh; width: 18px; height: 18px; animation: ballPathRight 12s linear infinite 2s; }
.ball-3 { left: 18vw; top: -4vh; width: 20px; height: 20px; animation: ballPathTop 14s linear infinite 1s; }
.ball-4 { right: 15vw; top: -6vh; width: 24px; height: 24px; animation: ballPathTopRight 16s linear infinite 4s; }
.ball-5 { left: -2vw; bottom: 18vh; width: 16px; height: 16px; animation: ballPathBottomLeft 15s linear infinite 6s; }
.ball-6 { right: -2vw; bottom: 12vh; width: 19px; height: 19px; animation: ballPathBottomRight 13s linear infinite 5s; }
.ball-7 { left: 50%; top: -5vh; width: 14px; height: 14px; animation: ballPathCenter 11s linear infinite 3s; }

@keyframes ballPathLeft {
  0% { transform: translate(0, 0) scale(.85); opacity: 0; }
  12% { opacity: .7; }
  70% { opacity: .7; }
  100% { transform: translate(56vw, 30vh) scale(1); opacity: 0; }
}

@keyframes ballPathRight {
  0% { transform: translate(0, 0) scale(.8); opacity: 0; }
  14% { opacity: .62; }
  100% { transform: translate(-52vw, 34vh) scale(1.05); opacity: 0; }
}

@keyframes ballPathTop {
  0% { transform: translate(0, 0) scale(.8); opacity: 0; }
  15% { opacity: .72; }
  100% { transform: translate(22vw, 62vh) scale(1.06); opacity: 0; }
}

@keyframes ballPathTopRight {
  0% { transform: translate(0, 0) scale(.75); opacity: 0; }
  15% { opacity: .68; }
  100% { transform: translate(-18vw, 65vh) scale(1.08); opacity: 0; }
}

@keyframes ballPathBottomLeft {
  0% { transform: translate(0, 0) scale(.8); opacity: 0; }
  15% { opacity: .55; }
  100% { transform: translate(48vw, -16vh) scale(1); opacity: 0; }
}

@keyframes ballPathBottomRight {
  0% { transform: translate(0, 0) scale(.8); opacity: 0; }
  15% { opacity: .55; }
  100% { transform: translate(-49vw, -22vh) scale(1.02); opacity: 0; }
}

@keyframes ballPathCenter {
  0% { transform: translate(-50%, 0) scale(.8); opacity: 0; }
  18% { opacity: .78; }
  100% { transform: translate(-50%, 48vh) scale(1.15); opacity: 0; }
}

.login-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: center;
  padding: 40px 0;
}

.hero-panel, .auth-panel, .welcome-card, .dash-card, .dash-topbar {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(17, 14, 36, .86), rgba(8, 7, 18, .82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-float {
  animation: panelFloat 5.8s ease-in-out infinite;
}

.delay-2 {
  animation-delay: .45s;
}

@keyframes panelFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border-radius: 34px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(56, 189, 248, .06) 38%, rgba(139, 92, 246, .08) 60%, transparent 100%);
  transform: translateX(-50%);
  animation: heroSweep 10s linear infinite;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -34% 20%;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 92, 246, .38), transparent 68%);
}

@keyframes heroSweep {
  from { transform: translateX(-55%); }
  to { transform: translateX(55%); }
}

.brand-row,
.hero-panel > div,
.hero-message-card,
.auth-panel > * {
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.brand-row.compact h1 { font-size: 22px; }

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 28px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  box-shadow: 0 0 34px rgba(139, 92, 246, .48);
  animation: pulseBadge 3.5s ease-in-out infinite;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-image {
  padding: 3px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .9), rgba(56, 189, 248, .85));
}

.brand-image img {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, .14);
}

.brand-title {
  max-width: 580px;
  color: transparent;
  background:
    linear-gradient(135deg, #ffffff 0%, #ece7ff 28%, #b78cff 58%, #45c6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 28px rgba(139, 92, 246, .18),
    0 0 52px rgba(56, 189, 248, .10);
}

@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 24px rgba(139, 92, 246, .4); }
  50% { box-shadow: 0 0 40px rgba(56, 189, 248, .26), 0 0 60px rgba(139, 92, 246, .34); }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: .92;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}

h3 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.hero-message-card h3 {
  max-width: 620px;
}

/* Texto intermediário removido a pedido; o destaque agora fica no card de entrada. */

.hero-message-card {
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(12, 10, 28, .74), rgba(8, 7, 18, .58));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 50px rgba(4, 5, 15, .28);
}

.hero-message-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
  color: #d9efff;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, .14);
  border: 1px solid rgba(56, 189, 248, .22);
}

.hero-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #e8e1ff;
  font-size: 13px;
  font-weight: 700;
}

.auth-panel {
  border-radius: 30px;
  padding: 32px;
}

.auth-header p { color: var(--muted); line-height: 1.6; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  margin: 24px 0;
}

.tab {
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.tab.active {
  color: var(--text);
  background: rgba(139, 92, 246, .3);
}

.tab:hover { transform: translateY(-1px); }

.auth-form { display: none; }
.auth-form.active { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 8px;
  color: #d9d2f2;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  outline: 0;
  border-radius: 16px;
  background: rgba(3, 2, 10, .72);
  color: var(--text);
  padding: 15px 16px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

input:focus {
  border-color: rgba(56, 189, 248, .7);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .1);
  transform: translateY(-1px);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  min-height: 50px;
  padding: 0 18px;
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.btn.primary {
  border: 0;
  margin-top: 6px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  box-shadow: 0 14px 34px rgba(124, 58, 237, .26);
}

.btn.discord {
  background: rgba(88, 101, 242, .18);
  border-color: rgba(88, 101, 242, .38);
  font-weight: 800;
}

.btn.ghost { background: rgba(255,255,255,.05); }

.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin: 22px 0;
}

.separator::before, .separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,.1);
}

.auth-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
}

.auth-message.error { color: var(--danger); }
.auth-message.success { color: var(--success); }

.dashboard-shell {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.dash-topbar, .welcome-card {
  border-radius: 26px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.welcome-card {
  margin: 20px 0;
  padding: 28px;
}

.welcome-card p { color: var(--muted); margin-bottom: 0; }

.avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 1000;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  overflow: hidden;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dash-card {
  min-height: 170px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .78), rgba(6, 5, 15, .78));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 18px;
}

.dash-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.dash-card strong {
  font-size: 18px;
}

.dash-card p { color: var(--muted); line-height: 1.55; }

.locked { opacity: .82; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .login-shell {
    width: min(100%, calc(100% - 20px));
    padding: 20px 0;
  }

  .hero-panel, .auth-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .brand-row {
    align-items: flex-start;
  }

  .dash-topbar, .welcome-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .goal {
    display: none;
  }
}

/* ===============================
   Dashboard do torneio - v0.2.4
   =============================== */
.tournament-shell {
  position: relative;
  z-index: 2;
  width: min(1320px, calc(100% - 42px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 54px;
}

.tournament-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(157, 105, 255, .22);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .84), rgba(8, 7, 18, .72));
  box-shadow: 0 20px 70px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bot-brand-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(56, 189, 248, .78));
  box-shadow: 0 0 32px rgba(139, 92, 246, .34);
  overflow: hidden;
  flex: 0 0 auto;
}

.bot-brand-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 15px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title .eyebrow {
  margin-bottom: 4px;
}

.topbar-title strong {
  display: block;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.small-logout {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
}

.user-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  min-height: 46px;
  padding: 5px 14px 5px 6px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.user-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, .28);
  background: rgba(255,255,255,.07);
}

.user-chip-avatar,
.user-dropdown-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(124, 58, 237, .92), rgba(56, 189, 248, .86));
}

.user-chip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.user-dropdown-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
}

.user-chip-avatar img,
.user-dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-chip-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 10;
  width: min(340px, calc(100vw - 42px));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(157, 105, 255, .24);
  border-radius: 22px;
  background: rgba(10, 8, 24, .96);
  box-shadow: 0 24px 80px rgba(0,0,0,.44);
  backdrop-filter: blur(18px);
}

.user-dropdown[hidden] {
  display: none;
}

.user-dropdown strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.user-dropdown p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
  word-break: break-word;
}

.bracket-stage {
  margin-top: 30px;
  border: 1px solid rgba(157, 105, 255, .20);
  border-radius: 34px;
  padding: 26px;
  background:
    radial-gradient(circle at center, rgba(201, 166, 72, .08), transparent 26rem),
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, .15), transparent 24rem),
    linear-gradient(145deg, rgba(12, 10, 25, .80), rgba(6, 5, 13, .74));
  box-shadow: 0 24px 90px rgba(0,0,0,.36);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.bracket-header {
  text-align: center;
  margin: 4px 0 22px;
}

.bracket-header h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -.04em;
  color: transparent;
  background: linear-gradient(135deg, #fff7cf 0%, #d8b95a 38%, #8b5cf6 72%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.bracket-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bracket-board {
  position: relative;
  width: 100%;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 260px minmax(360px, 1fr);
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at center, rgba(0,0,0,.52), transparent 18rem),
    repeating-radial-gradient(circle at center, rgba(216, 185, 90, .08) 0 2px, transparent 2px 8px),
    linear-gradient(90deg, rgba(216, 185, 90, .07), transparent 18%, transparent 82%, rgba(216, 185, 90, .07));
}

.bracket-side,
.bracket-center {
  position: relative;
  min-height: 510px;
}

.round-label,
.final-label-center {
  position: absolute;
  color: #f3d977;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 1000;
  opacity: .9;
}

.bracket-left .top-label { left: 8px; top: 0; }
.bracket-left .mid-label { left: 45%; top: 0; }
.bracket-left .final-label { right: 18px; top: 138px; }
.bracket-right .top-label { right: 8px; top: 0; }
.bracket-right .mid-label { right: 45%; top: 0; }
.bracket-right .final-label { left: 18px; top: 138px; }

.team-slot,
.advance-slot,
.final-slot {
  position: absolute;
  height: 26px;
  border: 1px solid rgba(216, 185, 90, .48);
  background: linear-gradient(135deg, rgba(216, 185, 90, .20), rgba(216, 185, 90, .07));
  box-shadow: 0 0 18px rgba(216, 185, 90, .12);
}

.team-slot {
  width: 132px;
  border-radius: 5px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff8d9;
}

.team-slot::before,
.advance-slot::before,
.final-slot::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8b95a;
  box-shadow: 0 0 14px rgba(216, 185, 90, .65);
}

.bracket-left .team-slot::before,
.bracket-left .advance-slot::before,
.final-left::before { right: -5px; top: 50%; transform: translateY(-50%); }
.bracket-right .team-slot::before,
.bracket-right .advance-slot::before,
.final-right::before { left: -5px; top: 50%; transform: translateY(-50%); }

.advance-slot {
  width: 92px;
  border-radius: 4px;
}

.final-slot {
  width: 96px;
  border-radius: 4px;
}

.bracket-left .team-slot { left: 0; }
.bracket-right .team-slot { right: 0; }

.slot-l-1, .slot-r-1 { top: 36px; }
.slot-l-2, .slot-r-2 { top: 76px; }
.slot-l-3, .slot-r-3 { top: 146px; }
.slot-l-4, .slot-r-4 { top: 186px; }
.slot-l-5, .slot-r-5 { top: 286px; }
.slot-l-6, .slot-r-6 { top: 326px; }
.slot-l-7, .slot-r-7 { top: 396px; }
.slot-l-8, .slot-r-8 { top: 436px; }

.bracket-left .adv-l-1,
.bracket-left .adv-l-2,
.bracket-left .adv-l-3,
.bracket-left .adv-l-4 { left: 185px; }
.bracket-right .adv-r-1,
.bracket-right .adv-r-2,
.bracket-right .adv-r-3,
.bracket-right .adv-r-4 { right: 185px; }

.adv-l-1, .adv-r-1 { top: 57px; }
.adv-l-2, .adv-r-2 { top: 167px; }
.adv-l-3, .adv-r-3 { top: 307px; }
.adv-l-4, .adv-r-4 { top: 417px; }

.bracket-left .semi-l-1,
.bracket-left .semi-l-2 { right: 30px; }
.bracket-right .semi-r-1,
.bracket-right .semi-r-2 { left: 30px; }
.semi-l-1, .semi-r-1 { top: 112px; }
.semi-l-2, .semi-r-2 { top: 362px; }

.connector {
  position: absolute;
  display: block;
  pointer-events: none;
}

.connector::before,
.connector::after {
  content: "";
  position: absolute;
  background: rgba(216, 185, 90, .52);
  box-shadow: 0 0 12px rgba(216, 185, 90, .18);
}

.c-l-1, .c-l-2, .c-l-3, .c-l-4,
.c-r-1, .c-r-2, .c-r-3, .c-r-4 {
  width: 56px;
  height: 66px;
}

.c-l-1 { left: 132px; top: 49px; }
.c-l-2 { left: 132px; top: 159px; }
.c-l-3 { left: 132px; top: 299px; }
.c-l-4 { left: 132px; top: 409px; }
.c-r-1 { right: 132px; top: 49px; }
.c-r-2 { right: 132px; top: 159px; }
.c-r-3 { right: 132px; top: 299px; }
.c-r-4 { right: 132px; top: 409px; }

.c-l-1::before, .c-l-2::before, .c-l-3::before, .c-l-4::before { left: 0; top: 0; width: 2px; height: 66px; }
.c-l-1::after, .c-l-2::after, .c-l-3::after, .c-l-4::after { left: 0; top: 32px; width: 56px; height: 2px; }
.c-r-1::before, .c-r-2::before, .c-r-3::before, .c-r-4::before { right: 0; top: 0; width: 2px; height: 66px; }
.c-r-1::after, .c-r-2::after, .c-r-3::after, .c-r-4::after { right: 0; top: 32px; width: 56px; height: 2px; }

.c-l-5, .c-l-6, .c-r-5, .c-r-6 {
  width: 70px;
  height: 166px;
}

.c-l-5 { left: 277px; top: 70px; }
.c-l-6 { left: 277px; top: 320px; }
.c-r-5 { right: 277px; top: 70px; }
.c-r-6 { right: 277px; top: 320px; }

.c-l-5::before, .c-l-6::before { left: 0; top: 0; width: 2px; height: 166px; }
.c-l-5::after, .c-l-6::after { left: 0; top: 82px; width: 70px; height: 2px; }
.c-r-5::before, .c-r-6::before { right: 0; top: 0; width: 2px; height: 166px; }
.c-r-5::after, .c-r-6::after { right: 0; top: 82px; width: 70px; height: 2px; }

.bracket-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.final-label-center {
  top: 156px;
  left: 50%;
  transform: translateX(-50%);
}

.final-left { left: 12px; top: 218px; }
.final-right { right: 12px; top: 218px; }

.trophy-core {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(216, 185, 90, .18), transparent 36%),
    radial-gradient(circle, rgba(0,0,0,.9), rgba(5,4,12,.88));
  border: 1px solid rgba(216, 185, 90, .32);
  box-shadow: inset 0 0 35px rgba(216,185,90,.08), 0 0 48px rgba(216,185,90,.08);
}

.trophy-core::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(216, 185, 90, .22);
}

.trophy-core span {
  position: absolute;
  top: 28px;
  font-weight: 1000;
  color: #d8b95a;
  opacity: .72;
}

.trophy-core strong {
  position: relative;
  z-index: 1;
  font-size: 28px;
  color: transparent;
  background: linear-gradient(135deg, #fff3ba, #d8b95a, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
}


@media (max-width: 980px) {
  .bracket-editor-modal {
    width: min(94vw, 100%);
  }

  .bracket-editor-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .bracket-editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-section-head {
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .bracket-board {
    grid-template-columns: 1fr;
    gap: 6px;
    overflow-x: auto;
  }

  .bracket-side,
  .bracket-center {
    width: 560px;
    margin: 0 auto;
  }

  .bracket-center {
    min-height: 210px;
  }

  .final-label-center { top: 18px; }
  .final-left { left: 120px; top: 88px; }
  .final-right { right: 120px; top: 88px; }
}

@media (max-width: 720px) {
  .tournament-shell {
    width: min(100%, calc(100% - 18px));
    padding-top: 14px;
  }

  .tournament-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-menu-wrap {
    width: 100%;
    justify-content: flex-start;
  }

  .user-chip {
    max-width: 100%;
  }

  .topbar-left {
    width: 100%;
    flex-wrap: wrap;
  }

  .bracket-stage {
    padding: 18px 10px;
  }

  .bracket-board {
    padding: 14px 10px;
  }
}

/* ===== v0.2.5 — painel com cadastro de times e chaveamento dinâmico ===== */
.tournament-topbar {
  max-width: 1320px;
  margin: 0 auto;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.topbar-right .small-logout {
  order: 2;
}

.topbar-right .user-menu-wrap {
  order: 1;
}

.tournament-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px auto 18px;
  padding: 16px;
  border: 1px solid rgba(157, 105, 255, .18);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .58), rgba(8, 7, 18, .46));
  backdrop-filter: blur(16px);
}

.action-btn {
  min-height: 46px;
  min-width: 170px;
  font-weight: 900;
}

.team-counter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #dceeff;
  border: 1px solid rgba(56, 189, 248, .18);
  background: rgba(56, 189, 248, .08);
  font-size: 13px;
  font-weight: 800;
}

.teams-panel {
  margin: 0 auto 20px;
  border: 1px solid rgba(157, 105, 255, .18);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .62), rgba(8, 7, 18, .48));
  backdrop-filter: blur(16px);
}

.teams-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.teams-panel-header h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
}

.teams-panel-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.teams-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.empty-teams {
  grid-column: 1 / -1;
  border: 1px dashed rgba(157, 105, 255, .24);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,.035);
}

.empty-teams p {
  margin: 6px 0 0;
  color: var(--muted);
}

.team-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255,255,255,.045);
}

.team-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, .9), rgba(56, 189, 248, .78));
  box-shadow: 0 0 22px rgba(139, 92, 246, .18);
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-logo span {
  font-weight: 1000;
  font-size: 13px;
}

.team-info {
  min-width: 0;
}

.team-info strong,
.team-info span,
.team-info p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-info strong {
  font-size: 15px;
}

.team-info span {
  margin-top: 3px;
  color: #b8d9ff;
  font-size: 12px;
  font-weight: 800;
}

.team-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.team-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.mini-btn {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  font-weight: 800;
}

.mini-btn:hover {
  border-color: rgba(56, 189, 248, .26);
}

.mini-btn.danger {
  color: #ffd4dc;
  border-color: rgba(251, 113, 133, .22);
  background: rgba(251, 113, 133, .08);
}

.bracket-stage {
  margin-top: 24px;
}

.bracket-header h1 {
  background: linear-gradient(135deg, #ffffff 0%, #dfe9ff 22%, #56d7ff 46%, #a78bfa 76%, #f0abfc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-align: center;
}

.bracket-header span {
  color: #c8c0e4;
}

.round-label,
.final-label-center {
  color: #67e8f9;
  text-shadow: 0 0 12px rgba(56, 189, 248, .28);
}

.team-slot,
.advance-slot,
.final-slot {
  border-color: rgba(103, 232, 249, .38);
  background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(139, 92, 246, .09));
  box-shadow: 0 0 18px rgba(56, 189, 248, .10);
  color: #eff8ff;
}

.team-slot {
  width: 142px;
  gap: 6px;
}

.team-slot span,
.advance-slot span,
.final-slot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-slot img {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.team-slot b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 18px;
  border-radius: 6px;
  background: rgba(139, 92, 246, .28);
  color: #e8ddff;
  font-size: 9px;
  flex: 0 0 auto;
}

.team-slot.is-empty {
  opacity: .62;
}

.empty-slot {
  color: rgba(239, 248, 255, .56);
}

.advance-slot,
.final-slot {
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(239, 248, 255, .64);
}

.team-slot::before,
.advance-slot::before,
.final-slot::before {
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(56, 189, 248, .65);
}

.connector::before,
.connector::after {
  background: rgba(103, 232, 249, .46);
  box-shadow: 0 0 12px rgba(56, 189, 248, .18);
}

.trophy-core {
  border-color: rgba(103, 232, 249, .28);
  box-shadow: inset 0 0 35px rgba(56,189,248,.08), 0 0 48px rgba(139,92,246,.10);
}

.trophy-core::before {
  border-color: rgba(139, 92, 246, .24);
}

.trophy-core span {
  color: #67e8f9;
}

.trophy-core strong {
  background: linear-gradient(135deg, #ffffff, #67e8f9, #a78bfa, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.team-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(157, 105, 255, .28);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(16, 13, 34, .98), rgba(7, 6, 18, .98));
  box-shadow: 0 30px 100px rgba(0,0,0,.62);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  font-size: 24px;
  cursor: pointer;
}

.team-form {
  display: grid;
  gap: 16px;
}

.form-grid.two-cols,
.players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-form small {
  color: var(--muted);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .tournament-actions {
    justify-content: stretch;
  }

  .action-btn {
    flex: 1 1 100%;
  }

  .teams-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid.two-cols,
  .players-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}

/* ===== v0.2.6 — ajuste de proporção/posição do painel ===== */
.tournament-shell {
  width: min(1340px, calc(100% - 34px));
  padding: 18px 0 40px;
}

.tournament-topbar {
  padding: 12px 16px;
  border-radius: 22px;
}

.bot-brand-avatar {
  width: 52px;
  height: 52px;
  border-radius: 17px;
}

.bot-brand-avatar img {
  border-radius: 14px;
}

.topbar-title strong {
  font-size: 17px;
}

.user-chip {
  min-height: 42px;
  padding: 4px 12px 4px 5px;
}

.user-chip-avatar {
  width: 32px;
  height: 32px;
}

.small-logout {
  min-height: 40px;
  padding: 0 15px;
}

.user-dropdown {
  z-index: 80;
  top: calc(100% + 10px);
}

.tournament-actions {
  margin: 16px auto 14px;
  padding: 12px;
  border-radius: 20px;
}

.action-btn {
  min-height: 42px;
  min-width: 155px;
}

.team-counter {
  min-height: 34px;
}

.teams-panel {
  margin: 0 auto 14px;
  padding: 14px 16px;
  border-radius: 22px;
}

.teams-panel-header {
  align-items: center;
  margin-bottom: 10px;
}

.teams-panel-header .eyebrow {
  margin-bottom: 3px;
}

.teams-panel-header h2 {
  font-size: clamp(19px, 1.6vw, 24px);
}

.teams-panel-header p {
  max-width: 520px;
  font-size: 13px;
}

.teams-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  max-height: 125px;
  overflow-y: auto;
  padding-right: 3px;
}

.teams-list::-webkit-scrollbar {
  width: 6px;
}

.teams-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(103, 232, 249, .26);
}

.team-card {
  padding: 10px;
  border-radius: 16px;
}

.team-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.team-actions {
  justify-content: flex-start;
}

.mini-btn {
  min-height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.bracket-stage {
  margin-top: 14px;
  padding: 22px;
  border-radius: 28px;
}

.bracket-header {
  margin: 0 0 16px;
}

.bracket-header .eyebrow {
  margin-bottom: 4px;
}

.bracket-header h1 {
  margin-bottom: 4px;
  font-size: clamp(30px, 3vw, 42px);
}

.bracket-board {
  min-height: 476px;
  grid-template-columns: minmax(350px, 1fr) 230px minmax(350px, 1fr);
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
}

.bracket-side,
.bracket-center {
  min-height: 430px;
}

.bracket-left .final-label,
.bracket-right .final-label {
  top: 118px;
}

.team-slot,
.advance-slot,
.final-slot {
  height: 24px;
}

.team-slot {
  width: 138px;
  font-size: 11px;
}

.advance-slot {
  width: 86px;
}

.final-slot {
  width: 90px;
}

.slot-l-1, .slot-r-1 { top: 32px; }
.slot-l-2, .slot-r-2 { top: 66px; }
.slot-l-3, .slot-r-3 { top: 126px; }
.slot-l-4, .slot-r-4 { top: 160px; }
.slot-l-5, .slot-r-5 { top: 246px; }
.slot-l-6, .slot-r-6 { top: 280px; }
.slot-l-7, .slot-r-7 { top: 340px; }
.slot-l-8, .slot-r-8 { top: 374px; }

.bracket-left .adv-l-1,
.bracket-left .adv-l-2,
.bracket-left .adv-l-3,
.bracket-left .adv-l-4 { left: 176px; }
.bracket-right .adv-r-1,
.bracket-right .adv-r-2,
.bracket-right .adv-r-3,
.bracket-right .adv-r-4 { right: 176px; }

.adv-l-1, .adv-r-1 { top: 49px; }
.adv-l-2, .adv-r-2 { top: 143px; }
.adv-l-3, .adv-r-3 { top: 263px; }
.adv-l-4, .adv-r-4 { top: 357px; }

.bracket-left .semi-l-1,
.bracket-left .semi-l-2 { right: 24px; }
.bracket-right .semi-r-1,
.bracket-right .semi-r-2 { left: 24px; }
.semi-l-1, .semi-r-1 { top: 100px; }
.semi-l-2, .semi-r-2 { top: 310px; }

.c-l-1, .c-l-2, .c-l-3, .c-l-4,
.c-r-1, .c-r-2, .c-r-3, .c-r-4 {
  width: 48px;
  height: 58px;
}

.c-l-1 { left: 138px; top: 43px; }
.c-l-2 { left: 138px; top: 137px; }
.c-l-3 { left: 138px; top: 257px; }
.c-l-4 { left: 138px; top: 351px; }
.c-r-1 { right: 138px; top: 43px; }
.c-r-2 { right: 138px; top: 137px; }
.c-r-3 { right: 138px; top: 257px; }
.c-r-4 { right: 138px; top: 351px; }

.c-l-1::before, .c-l-2::before, .c-l-3::before, .c-l-4::before,
.c-r-1::before, .c-r-2::before, .c-r-3::before, .c-r-4::before { height: 58px; }
.c-l-1::after, .c-l-2::after, .c-l-3::after, .c-l-4::after,
.c-r-1::after, .c-r-2::after, .c-r-3::after, .c-r-4::after { top: 29px; width: 48px; }

.c-l-5, .c-l-6, .c-r-5, .c-r-6 {
  width: 58px;
  height: 142px;
}

.c-l-5 { left: 262px; top: 61px; }
.c-l-6 { left: 262px; top: 281px; }
.c-r-5 { right: 262px; top: 61px; }
.c-r-6 { right: 262px; top: 281px; }

.c-l-5::before, .c-l-6::before,
.c-r-5::before, .c-r-6::before { height: 142px; }
.c-l-5::after, .c-l-6::after,
.c-r-5::after, .c-r-6::after { top: 71px; width: 58px; }

.final-label-center {
  top: 128px;
}

.final-left { left: 6px; top: 190px; }
.final-right { right: 6px; top: 190px; }

.trophy-core {
  width: 128px;
  height: 128px;
}

.trophy-core span {
  top: 22px;
}

.trophy-core strong {
  font-size: 25px;
}

@media (max-width: 1180px) {
  .bracket-side,
  .bracket-center {
    width: 545px;
  }
}

/* ===== v0.2.7 — ajustes solicitados do painel/chaveamento/cadastro ===== */
.tournament-topbar {
  z-index: 40;
}

.topbar-right {
  position: relative;
  z-index: 45;
}

.user-menu-wrap {
  position: relative;
  z-index: 60;
}

.user-dropdown {
  z-index: 999;
  top: calc(100% + 12px);
  right: 0;
  transform: none;
  border-color: rgba(103, 232, 249, .28);
  box-shadow: 0 30px 90px rgba(0,0,0,.68), 0 0 34px rgba(56, 189, 248, .10);
}

.tournament-actions,
.teams-panel,
.bracket-stage {
  position: relative;
  z-index: 1;
}

.bracket-board {
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, .08), transparent 16rem),
    repeating-radial-gradient(circle at center, rgba(103, 232, 249, .055) 0 1px, transparent 1px 9px),
    linear-gradient(90deg, rgba(139, 92, 246, .075), transparent 18%, transparent 82%, rgba(56, 189, 248, .075));
}

/* Troca as linhas simples por trilhos de progressão mais limpos. */
.connector {
  opacity: .82;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, .18));
}

.connector::before,
.connector::after {
  background: linear-gradient(90deg, rgba(103, 232, 249, .08), rgba(103, 232, 249, .72), rgba(167, 139, 250, .45));
  box-shadow: 0 0 16px rgba(56, 189, 248, .24);
  border-radius: 999px;
}

.bracket-left .connector::before,
.bracket-right .connector::before {
  width: 1px !important;
}

.bracket-left .connector::after,
.bracket-right .connector::after {
  height: 1px !important;
}

.connector::before {
  background: linear-gradient(180deg, rgba(103, 232, 249, .08), rgba(103, 232, 249, .64), rgba(167, 139, 250, .26));
}

.team-slot::before,
.advance-slot::before,
.final-slot::before {
  width: 7px;
  height: 7px;
  background: #67e8f9;
  box-shadow: 0 0 18px rgba(56, 189, 248, .78), 0 0 30px rgba(139, 92, 246, .28);
}

.advance-slot,
.final-slot {
  border-style: solid;
  border-color: rgba(103, 232, 249, .32);
}

.bracket-center {
  display: grid;
  align-content: center;
  justify-items: center;
}

.final-label-center {
  top: 132px;
}

.final-matchline {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 230px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .70), rgba(167, 139, 250, .55), rgba(103, 232, 249, .70), transparent);
  box-shadow: 0 0 22px rgba(56, 189, 248, .18);
}

.final-matchline::before {
  content: "FINAL";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  border: 1px solid rgba(103, 232, 249, .28);
  border-radius: 999px;
  color: #e7faff;
  background: rgba(5, 4, 14, .96);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .16em;
  box-shadow: 0 0 26px rgba(56, 189, 248, .16);
}

.final-left,
.final-right {
  top: 216px;
  width: 102px;
}

.final-left { left: 0; }
.final-right { right: 0; }

.trophy-core {
  display: none !important;
}

.logo-fieldset,
.players-block,
.reserves-block {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}

.logo-field-header,
.section-mini-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo-field-header strong,
.section-mini-title strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.logo-field-header small,
.section-mini-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.logo-preview {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(103, 232, 249, .22);
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--muted);
  background: rgba(0,0,0,.25);
  font-size: 10px;
  text-align: center;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-paste-box {
  min-height: 76px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  border: 1px dashed rgba(103, 232, 249, .30);
  border-radius: 16px;
  color: #d9f6ff;
  background: linear-gradient(135deg, rgba(56, 189, 248, .07), rgba(139, 92, 246, .07));
  outline: none;
  cursor: text;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.logo-paste-box:hover,
.logo-paste-box:focus,
.logo-paste-box.is-dragging {
  border-color: rgba(103, 232, 249, .62);
  background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(139, 92, 246, .10));
  transform: translateY(-1px);
}

.section-mini-title.with-action {
  align-items: center;
}

.reserves-grid:empty {
  display: none;
}

.reserve-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.remove-reserve {
  min-width: 38px;
  padding: 0;
}

@media (max-width: 1180px) {
  .final-matchline { top: 104px; left: 108px; right: 108px; }
  .final-left { left: 82px; top: 88px; }
  .final-right { right: 82px; top: 88px; }
}

@media (max-width: 720px) {
  .logo-field-header,
  .section-mini-title.with-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-preview {
    width: 70px;
    height: 70px;
  }
}


/* ===== v0.2.8 — correções de logos, final e persistência visual ===== */
.team-logo,
.logo-preview,
.team-slot img,
.advance-slot img,
.final-slot img {
  background: #05050c !important;
}

.team-logo img,
.logo-preview img {
  object-fit: contain !important;
  padding: 3px;
  background: #05050c;
}

.team-slot img,
.advance-slot img,
.final-slot img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  border-radius: 6px;
  object-fit: contain !important;
  display: block;
  flex: 0 0 18px;
  padding: 1px;
}

.final-slot {
  overflow: hidden;
  gap: 6px;
}

.final-slot span,
.final-slot b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-matchline::before {
  content: none !important;
}

.final-matchline {
  opacity: .72;
  top: 229px;
}

.final-label-center {
  z-index: 4;
}

/* Evita qualquer imagem de time estourar para fora do chaveamento. */
.bracket-board,
.bracket-side,
.bracket-center,
.team-slot,
.advance-slot,
.final-slot {
  overflow: hidden;
}

/* Pequeno aviso visual de banco local no painel, caso usado depois. */
.database-safe-note {
  color: #9be7ff;
  font-size: 12px;
}

/* ===== v0.2.9 — chaveamento maior, avatar GIF e editor manual ===== */
.user-chip-avatar img,
.user-dropdown-avatar img {
  object-fit: cover;
  image-rendering: auto;
}

.bracket-stage {
  padding: 28px 24px 26px;
}

.bracket-board {
  min-height: 620px;
  grid-template-columns: minmax(430px, 1fr) 330px minmax(430px, 1fr);
  gap: 18px;
  padding: 28px 26px;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, .105), transparent 20rem),
    linear-gradient(90deg, rgba(139, 92, 246, .095), rgba(8, 7, 18, .36) 18%, rgba(8, 7, 18, .40) 82%, rgba(56, 189, 248, .095));
}

.bracket-side,
.bracket-center {
  min-height: 560px;
}

.team-slot,
.advance-slot,
.final-slot {
  height: 31px;
  border-radius: 9px;
  overflow: hidden;
}

.team-slot {
  width: 172px;
  padding: 0 10px;
  gap: 8px;
  font-size: 12px;
}

.advance-slot {
  width: 116px;
  padding: 0 9px;
  font-size: 11px;
}

.final-slot {
  width: 140px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.team-slot img,
.advance-slot img,
.final-slot img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  border-radius: 7px;
  object-fit: contain !important;
  background: #02030a !important;
  padding: 2px;
}

.team-slot,
.advance-slot,
.final-slot {
  cursor: pointer;
}

.team-slot.is-empty,
.advance-slot.is-empty,
.final-slot.is-empty {
  cursor: default;
}

.bracket-left .team-slot { left: 0; }
.bracket-right .team-slot { right: 0; }

.slot-l-1, .slot-r-1 { top: 48px; }
.slot-l-2, .slot-r-2 { top: 94px; }
.slot-l-3, .slot-r-3 { top: 166px; }
.slot-l-4, .slot-r-4 { top: 212px; }
.slot-l-5, .slot-r-5 { top: 328px; }
.slot-l-6, .slot-r-6 { top: 374px; }
.slot-l-7, .slot-r-7 { top: 446px; }
.slot-l-8, .slot-r-8 { top: 492px; }

.bracket-left .adv-l-1,
.bracket-left .adv-l-2,
.bracket-left .adv-l-3,
.bracket-left .adv-l-4 { left: 224px; }
.bracket-right .adv-r-1,
.bracket-right .adv-r-2,
.bracket-right .adv-r-3,
.bracket-right .adv-r-4 { right: 224px; }

.adv-l-1, .adv-r-1 { top: 72px; }
.adv-l-2, .adv-r-2 { top: 190px; }
.adv-l-3, .adv-r-3 { top: 352px; }
.adv-l-4, .adv-r-4 { top: 470px; }

.bracket-left .semi-l-1,
.bracket-left .semi-l-2 { right: 16px; }
.bracket-right .semi-r-1,
.bracket-right .semi-r-2 { left: 16px; }
.semi-l-1, .semi-r-1 { top: 132px; }
.semi-l-2, .semi-r-2 { top: 410px; }

.bracket-left .final-label,
.bracket-right .final-label { top: 126px; }

.final-label-center {
  top: 178px;
  font-size: 12px;
}

.final-matchline {
  top: 280px;
  left: 26px;
  right: 26px;
  opacity: .85;
}

.final-left { left: 8px; top: 263px; }
.final-right { right: 8px; top: 263px; }

.connector {
  opacity: .78;
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, .18));
}

.c-l-1, .c-l-2, .c-l-3, .c-l-4,
.c-r-1, .c-r-2, .c-r-3, .c-r-4 {
  width: 52px;
  height: 76px;
}

.c-l-1 { left: 172px; top: 62px; }
.c-l-2 { left: 172px; top: 180px; }
.c-l-3 { left: 172px; top: 342px; }
.c-l-4 { left: 172px; top: 460px; }
.c-r-1 { right: 172px; top: 62px; }
.c-r-2 { right: 172px; top: 180px; }
.c-r-3 { right: 172px; top: 342px; }
.c-r-4 { right: 172px; top: 460px; }

.c-l-1::before, .c-l-2::before, .c-l-3::before, .c-l-4::before,
.c-r-1::before, .c-r-2::before, .c-r-3::before, .c-r-4::before { height: 76px !important; top: 0; }
.c-l-1::after, .c-l-2::after, .c-l-3::after, .c-l-4::after,
.c-r-1::after, .c-r-2::after, .c-r-3::after, .c-r-4::after { top: 38px !important; width: 52px !important; }

.c-l-5, .c-l-6, .c-r-5, .c-r-6 {
  width: 74px;
  height: 226px;
}

.c-l-5 { left: 340px; top: 88px; }
.c-l-6 { left: 340px; top: 366px; }
.c-r-5 { right: 340px; top: 88px; }
.c-r-6 { right: 340px; top: 366px; }

.c-l-5::before, .c-l-6::before,
.c-r-5::before, .c-r-6::before { height: 226px !important; }
.c-l-5::after, .c-l-6::after,
.c-r-5::after, .c-r-6::after { top: 113px !important; width: 74px !important; }

.bracket-editor-modal {
  width: min(1120px, 100%);
  max-height: min(86vh, 980px);
  overflow: auto;
  padding-bottom: 22px;
}

.editor-intro-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  margin: 4px 0 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.editor-help {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.editor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, .22);
  background: rgba(56, 189, 248, .08);
  color: #bfeaff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.bracket-editor-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr .86fr;
  gap: 16px;
  align-items: start;
}

.editor-section {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 8, 33, .92), rgba(9, 7, 24, .84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.editor-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.editor-section-head h3 {
  margin: 0;
  font-size: 24px;
}

.editor-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.editor-count {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #b7c8ff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.editor-section-grid {
  display: grid;
  gap: 10px;
}

.editor-slot-card {
  display: grid;
  gap: 7px;
  padding: 10px 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
}

.editor-slot-label {
  color: #e8e9ff;
  font-size: 14px;
  font-weight: 800;
}

.editor-select-wrap {
  position: relative;
}

.editor-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid rgba(255,255,255,.75);
  border-bottom: 2px solid rgba(255,255,255,.75);
  transform: rotate(45deg);
  pointer-events: none;
}

.bracket-editor-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(81, 203, 255, .2);
  border-radius: 14px;
  padding: 0 36px 0 12px;
  color: var(--text);
  background: rgba(3, 2, 10, .94);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.bracket-editor-grid select:hover,
.bracket-editor-grid select:focus {
  border-color: rgba(56, 189, 248, .6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}

.bracket-editor-grid select option {
  background: #090612;
  color: #f6f1ff;
}
@media (max-width: 1180px) {
  .bracket-board {
    grid-template-columns: 1fr;
    overflow-x: auto;
  }

  .bracket-side,
  .bracket-center {
    width: 680px;
  }

  .bracket-center {
    min-height: 190px;
  }

  .final-label-center { top: 18px; }
  .final-matchline { top: 94px; left: 160px; right: 160px; }
  .final-left { left: 134px; top: 78px; }
  .final-right { right: 134px; top: 78px; }
}

@media (max-width: 720px) {
  .bracket-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   v0.3.0 — refinamento do chaveamento
   =============================== */
.team-counter,
.teams-panel-header > p {
  display: none !important;
}

.danger-action {
  border-color: rgba(251, 113, 133, .28) !important;
  background: rgba(251, 113, 133, .08) !important;
}

.bracket-stage {
  padding: 30px 26px 28px;
}

.bracket-board {
  min-height: 640px !important;
  grid-template-columns: minmax(500px, 1fr) 300px minmax(500px, 1fr) !important;
  gap: 26px !important;
  padding: 30px 28px !important;
  background:
    linear-gradient(90deg, rgba(139, 92, 246, .11), rgba(8, 7, 18, .72) 30%, rgba(6, 18, 31, .76) 70%, rgba(56, 189, 248, .12)) !important;
}

.bracket-side,
.bracket-center {
  min-height: 580px !important;
}

.round-label,
.final-label-center {
  color: #65e8ff !important;
  text-shadow: 0 0 16px rgba(56, 189, 248, .26);
}

.bracket-left .top-label { left: 8px !important; top: 0 !important; }
.bracket-left .mid-label { left: 242px !important; top: 0 !important; }
.bracket-left .final-label { right: 30px !important; top: 168px !important; }
.bracket-right .top-label { right: 8px !important; top: 0 !important; }
.bracket-right .mid-label { right: 242px !important; top: 0 !important; }
.bracket-right .final-label { left: 30px !important; top: 168px !important; }

.team-slot,
.advance-slot,
.final-slot {
  height: 34px !important;
  border-color: rgba(56, 189, 248, .42) !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, .14), rgba(139, 92, 246, .08)) !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, .10) !important;
  color: #eef9ff !important;
  overflow: hidden;
}

.team-slot {
  width: 180px !important;
  border-radius: 8px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

.advance-slot {
  width: 134px !important;
  border-radius: 8px !important;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.final-slot {
  width: 135px !important;
  height: 36px !important;
  border-radius: 8px !important;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.team-slot img,
.advance-slot img,
.final-slot img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 7px !important;
  margin-right: 8px !important;
  object-fit: contain !important;
  background: rgba(0, 0, 0, .55) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.team-slot span,
.advance-slot span,
.final-slot span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-slot::before,
.advance-slot::before,
.final-slot::before {
  width: 7px !important;
  height: 7px !important;
  background: #65e8ff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, .65) !important;
}

.bracket-left .team-slot { left: 0 !important; }
.bracket-right .team-slot { right: 0 !important; }

.slot-l-1, .slot-r-1 { top: 50px !important; }
.slot-l-2, .slot-r-2 { top: 96px !important; }
.slot-l-3, .slot-r-3 { top: 174px !important; }
.slot-l-4, .slot-r-4 { top: 220px !important; }
.slot-l-5, .slot-r-5 { top: 340px !important; }
.slot-l-6, .slot-r-6 { top: 386px !important; }
.slot-l-7, .slot-r-7 { top: 464px !important; }
.slot-l-8, .slot-r-8 { top: 510px !important; }

.bracket-left .adv-l-1,
.bracket-left .adv-l-2,
.bracket-left .adv-l-3,
.bracket-left .adv-l-4 { left: 250px !important; }
.bracket-right .adv-r-1,
.bracket-right .adv-r-2,
.bracket-right .adv-r-3,
.bracket-right .adv-r-4 { right: 250px !important; }

.adv-l-1, .adv-r-1 { top: 72px !important; }
.adv-l-2, .adv-r-2 { top: 197px !important; }
.adv-l-3, .adv-r-3 { top: 362px !important; }
.adv-l-4, .adv-r-4 { top: 487px !important; }

.bracket-left .semi-l-1,
.bracket-left .semi-l-2 { right: 18px !important; }
.bracket-right .semi-r-1,
.bracket-right .semi-r-2 { left: 18px !important; }
.semi-l-1, .semi-r-1 { top: 134px !important; }
.semi-l-2, .semi-r-2 { top: 424px !important; }

.connector {
  position: absolute !important;
  display: block !important;
  pointer-events: none;
}

.connector::before,
.connector::after {
  background: rgba(56, 189, 248, .34) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, .14) !important;
}

.c-l-1, .c-l-2, .c-l-3, .c-l-4,
.c-r-1, .c-r-2, .c-r-3, .c-r-4 {
  width: 70px !important;
  height: 46px !important;
}
.c-l-1 { left: 180px !important; top: 68px !important; }
.c-l-2 { left: 180px !important; top: 192px !important; }
.c-l-3 { left: 180px !important; top: 358px !important; }
.c-l-4 { left: 180px !important; top: 482px !important; }
.c-r-1 { right: 180px !important; top: 68px !important; }
.c-r-2 { right: 180px !important; top: 192px !important; }
.c-r-3 { right: 180px !important; top: 358px !important; }
.c-r-4 { right: 180px !important; top: 482px !important; }

.c-l-1::before, .c-l-2::before, .c-l-3::before, .c-l-4::before,
.c-r-1::before, .c-r-2::before, .c-r-3::before, .c-r-4::before {
  width: 2px !important;
  height: 46px !important;
  top: 0 !important;
}
.c-l-1::before, .c-l-2::before, .c-l-3::before, .c-l-4::before { left: 0 !important; }
.c-r-1::before, .c-r-2::before, .c-r-3::before, .c-r-4::before { right: 0 !important; }
.c-l-1::after, .c-l-2::after, .c-l-3::after, .c-l-4::after,
.c-r-1::after, .c-r-2::after, .c-r-3::after, .c-r-4::after {
  width: 70px !important;
  height: 2px !important;
  top: 22px !important;
}
.c-l-1::after, .c-l-2::after, .c-l-3::after, .c-l-4::after { left: 0 !important; }
.c-r-1::after, .c-r-2::after, .c-r-3::after, .c-r-4::after { right: 0 !important; }

.c-l-5, .c-l-6, .c-r-5, .c-r-6 {
  width: 58px !important;
  height: 126px !important;
}
.c-l-5 { left: 384px !important; top: 87px !important; }
.c-l-6 { left: 384px !important; top: 377px !important; }
.c-r-5 { right: 384px !important; top: 87px !important; }
.c-r-6 { right: 384px !important; top: 377px !important; }
.c-l-5::before, .c-l-6::before,
.c-r-5::before, .c-r-6::before {
  width: 2px !important;
  height: 126px !important;
  top: 0 !important;
}
.c-l-5::before, .c-l-6::before { left: 0 !important; }
.c-r-5::before, .c-r-6::before { right: 0 !important; }
.c-l-5::after, .c-l-6::after,
.c-r-5::after, .c-r-6::after {
  width: 58px !important;
  height: 2px !important;
  top: 63px !important;
}
.c-l-5::after, .c-l-6::after { left: 0 !important; }
.c-r-5::after, .c-r-6::after { right: 0 !important; }

.bracket-center {
  position: relative !important;
  display: block !important;
  min-height: 580px !important;
}

.final-label-center {
  top: 218px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 11px !important;
}

.final-left { left: 0 !important; top: 278px !important; }
.final-right { right: 0 !important; top: 278px !important; }

.final-trophy {
  position: absolute;
  left: 50%;
  top: 250px;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, .28);
  background: radial-gradient(circle at 50% 28%, rgba(56, 189, 248, .18), rgba(139, 92, 246, .10) 42%, rgba(4, 3, 12, .64));
  box-shadow: 0 0 35px rgba(56, 189, 248, .12), inset 0 1px 0 rgba(255,255,255,.05);
}

.trophy-cup {
  font-size: 28px;
  transform: translateY(-5px);
  filter: drop-shadow(0 0 12px rgba(255,255,255,.16));
}

.trophy-ball {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 17px;
}

.editor-help {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.bracket-editor-grid {
  display: grid;
  gap: 18px;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 4px;
}

.editor-section {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}

.editor-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #dff7ff;
}

.editor-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

@media (max-width: 1280px) {
  .bracket-board {
    overflow-x: auto;
  }
  .bracket-side {
    min-width: 520px;
  }
  .bracket-center {
    min-width: 300px;
  }
}


/* ===== v0.2.11 — ajuste fino do chaveamento ===== */
.tournament-shell {
  width: min(1500px, calc(100% - 28px)) !important;
}

.bracket-stage {
  overflow: visible !important;
  padding: 26px 24px !important;
}

.bracket-board {
  width: 100% !important;
  min-height: 600px !important;
  grid-template-columns: minmax(500px, 1fr) 300px minmax(500px, 1fr) !important;
  gap: 22px !important;
  padding: 28px !important;
  overflow: hidden !important;
}

.bracket-side {
  min-height: 540px !important;
  min-width: 500px !important;
}

.bracket-center {
  min-height: 540px !important;
  min-width: 300px !important;
}

/* Mantém as oitavas do lado direito dentro do card */
.bracket-right .team-slot {
  right: 10px !important;
}

.bracket-right .top-label {
  right: 22px !important;
}

/* Pequeno respiro no lado esquerdo para simetria */
.bracket-left .team-slot {
  left: 10px !important;
}

.bracket-left .top-label {
  left: 22px !important;
}

/* Final mais limpa e organizada */
.final-label-center {
  top: 208px !important;
  font-size: 12px !important;
  letter-spacing: .18em !important;
  color: #65e8ff !important;
}

.final-left {
  left: 6px !important;
  top: 284px !important;
  width: 118px !important;
  z-index: 2;
}

.final-right {
  right: 6px !important;
  top: 284px !important;
  width: 118px !important;
  z-index: 2;
}

.final-trophy {
  top: 256px !important;
  width: 82px !important;
  height: 82px !important;
  border-radius: 26px !important;
  z-index: 1;
}

.trophy-cup {
  font-size: 31px !important;
  transform: translateY(-6px) !important;
}

.trophy-ball {
  right: 16px !important;
  bottom: 13px !important;
  font-size: 18px !important;
}

/* Liga visualmente os finalistas ao prêmio sem criar linhas atravessadas */
.final-left::after,
.final-right::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(101, 232, 255, .62));
  box-shadow: 0 0 12px rgba(56, 189, 248, .16);
}

.final-left::after {
  right: -28px;
}

.final-right::after {
  left: -28px;
  background: linear-gradient(90deg, rgba(101, 232, 255, .62), transparent);
}

/* Em telas menores, mantém rolagem horizontal ao invés de cortar as oitavas */
@media (max-width: 1420px) {
  .bracket-stage {
    overflow-x: auto !important;
  }

  .bracket-board {
    min-width: 1360px !important;
  }
}

@media (max-width: 720px) {
  .bracket-stage {
    overflow-x: auto !important;
  }

  .bracket-board {
    min-width: 1280px !important;
  }
}


/* ===== v0.2.12 — topo solto, ações laterais e final ajustada ===== */
.tournament-shell {
  width: min(1500px, calc(100% - 28px)) !important;
  padding-top: 18px !important;
}

.tournament-topbar {
  max-width: none !important;
  width: 100% !important;
  margin: 0 0 18px !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.topbar-left,
.topbar-right {
  border: 1px solid rgba(157, 105, 255, .22);
  background: linear-gradient(145deg, rgba(17, 14, 36, .80), rgba(8, 7, 18, .68));
  box-shadow: 0 18px 50px rgba(0,0,0,.26);
  backdrop-filter: blur(16px);
}

.topbar-left {
  padding: 10px 14px;
  border-radius: 22px;
}

.topbar-right {
  padding: 8px;
  border-radius: 22px;
}

/* Área de ações na lateral direita do chaveamento */
.bracket-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 18px;
  align-items: start;
  margin-top: 20px;
}

.bracket-workspace .teams-panel {
  grid-column: 1 / -1;
}

.tournament-actions {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 18px;
  margin: 0 !important;
  padding: 12px !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  border-radius: 22px !important;
}

.tournament-actions .action-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  white-space: normal;
  text-align: center;
}

.bracket-stage {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0 !important;
}

/* Remove os tracinhos/pontos extras no final das vagas das oitavas/quartas/final */
.team-slot::before,
.advance-slot::before,
.final-slot::before {
  display: none !important;
}

/* Ajuste da final: afasta os dois finalistas do troféu/bola */
.bracket-center {
  min-width: 360px !important;
}

.final-left {
  left: 0 !important;
  top: 284px !important;
  width: 134px !important;
}

.final-right {
  right: 0 !important;
  top: 284px !important;
  width: 134px !important;
}

.final-trophy {
  top: 252px !important;
  width: 80px !important;
  height: 80px !important;
}

.final-left::after {
  right: -18px !important;
  width: 18px !important;
}

.final-right::after {
  left: -18px !important;
  width: 18px !important;
}

.bracket-board {
  grid-template-columns: minmax(500px, 1fr) 360px minmax(500px, 1fr) !important;
}

@media (max-width: 1280px) {
  .bracket-workspace {
    grid-template-columns: 1fr;
  }

  .tournament-actions {
    grid-column: 1;
    grid-row: auto;
    position: static;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  .tournament-actions .action-btn {
    width: auto !important;
    min-width: 150px !important;
  }

  .bracket-stage {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .tournament-topbar {
    gap: 12px !important;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
  }

  .tournament-actions .action-btn {
    width: 100% !important;
  }
}

/* ===== v0.2.13 — botões mais à direita sem cortar o chaveamento ===== */
.tournament-shell {
  width: min(1680px, calc(100% - 20px)) !important;
}

.bracket-workspace {
  grid-template-columns: minmax(1360px, 1fr) 154px !important;
  gap: 22px !important;
  align-items: start !important;
}

.bracket-stage {
  min-width: 0 !important;
  overflow: visible !important;
}

.bracket-board {
  width: 100% !important;
  min-width: 1360px !important;
  overflow: visible !important;
}

.tournament-actions {
  width: 154px !important;
  justify-self: end !important;
  margin-right: 0 !important;
}

.tournament-actions .action-btn {
  min-width: 0 !important;
  width: 100% !important;
  padding-inline: 10px !important;
}

@media (max-width: 1540px) {
  .bracket-workspace {
    grid-template-columns: minmax(1360px, 1fr) 148px !important;
    gap: 16px !important;
    overflow-x: auto !important;
    padding-bottom: 6px;
  }

  .tournament-actions {
    width: 148px !important;
  }
}

@media (max-width: 1280px) {
  .bracket-workspace {
    grid-template-columns: 1fr !important;
    overflow-x: visible !important;
  }

  .tournament-actions {
    width: auto !important;
  }
}


/* ===== v0.2.14 — menu de perfil, meus times e ações compactas ===== */
.tournament-shell {
  width: min(1540px, calc(100% - 170px)) !important;
  margin-left: 138px !important;
  margin-right: 24px !important;
}

.user-dropdown {
  min-width: 310px !important;
  padding: 14px !important;
  z-index: 80 !important;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.user-dropdown-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.user-dropdown-actions button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  padding: 0 12px;
}

.user-dropdown-actions button:hover {
  border-color: rgba(56, 189, 248, .34);
  background: rgba(56, 189, 248, .08);
}

.user-dropdown-actions .danger-text {
  color: #ffbdc8;
  border-color: rgba(251, 113, 133, .18);
}

/* Ações do chaveamento ficam minimizadas no canto do próprio card */
.bracket-workspace {
  display: block !important;
  margin-top: 20px !important;
}

.bracket-stage {
  position: relative !important;
  margin-top: 0 !important;
  overflow: visible !important;
}

.tournament-actions {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 50 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  display: block !important;
}

.actions-toggle {
  min-width: 180px !important;
  min-height: 42px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  box-shadow: 0 14px 34px rgba(124, 58, 237, .26) !important;
}

.tournament-actions-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(157, 105, 255, .22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .96), rgba(8, 7, 18, .92));
  box-shadow: 0 22px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
}

.tournament-actions-menu[hidden] {
  display: none !important;
}

.tournament-actions-menu .action-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}

/* Evita que o botão de ações cubra o título do chaveamento */
.bracket-header {
  padding-right: 220px !important;
  padding-left: 220px !important;
}

/* Modal meus times */
.my-teams-modal {
  width: min(980px, calc(100% - 28px));
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(157, 105, 255, .24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .97), rgba(8, 7, 18, .94));
  box-shadow: 0 26px 90px rgba(0,0,0,.55);
  padding: 24px;
}

.my-teams-content {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.my-team-card {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.026));
}

.my-team-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.my-team-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.09);
}

.my-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0,0,0,.58);
}

.my-team-logo span {
  font-weight: 1000;
  color: #dff7ff;
}

.my-team-title h3 {
  margin: 8px 0 5px;
  color: var(--text);
}

.my-team-title p,
.muted-text {
  color: var(--muted);
  margin: 0;
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.team-stats-grid div {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.team-stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.team-stats-grid strong {
  font-size: 22px;
}

.team-profile-section {
  margin-top: 14px;
}

.team-profile-section h4 {
  margin: 0 0 10px;
  color: #dff7ff;
}

.roster-list,
.social-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roster-list span,
.social-link-grid span {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 8px 11px;
  color: #d8d1f4;
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 700;
}

.my-team-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.large-empty {
  padding: 32px;
}

@media (max-width: 1100px) {
  .tournament-shell {
    width: min(100%, calc(100% - 24px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .bracket-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 58px !important;
  }

  .tournament-actions {
    right: 14px !important;
    top: 14px !important;
  }

  .actions-toggle {
    min-width: 155px !important;
  }

  .team-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .user-dropdown {
    right: auto !important;
    left: 0 !important;
    min-width: min(310px, calc(100vw - 28px)) !important;
  }

  .my-team-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-stats-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== v0.2.15 — ajustes perfil/configurações e ações no lugar certo ===== */
.tournament-shell {
  width: min(1540px, calc(100% - 170px)) !important;
  margin-left: 138px !important;
  margin-right: 24px !important;
}

.bracket-stage {
  position: relative !important;
}

.tournament-actions {
  position: absolute !important;
  top: 22px !important;
  right: 24px !important;
  z-index: 30 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  display: block !important;
}

.actions-toggle {
  min-width: 180px !important;
  min-height: 42px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  box-shadow: 0 14px 34px rgba(124, 58, 237, .26) !important;
}

.tournament-actions-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(157, 105, 255, .22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .96), rgba(8, 7, 18, .92));
  box-shadow: 0 22px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
}

.tournament-actions-menu[hidden] {
  display: none !important;
}

.tournament-actions-menu .action-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}

.bracket-header {
  padding-right: 220px !important;
  padding-left: 220px !important;
}

.user-dropdown {
  min-width: 310px !important;
  padding: 14px !important;
  z-index: 80 !important;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.user-dropdown-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.user-dropdown-actions button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  padding: 0 12px;
}

.user-dropdown-actions button:hover {
  border-color: rgba(56, 189, 248, .34);
  background: rgba(56, 189, 248, .08);
}

.user-dropdown-actions .danger-text {
  color: #ffbdc8;
  border-color: rgba(251, 113, 133, .18);
}

.settings-modal,
.my-teams-modal {
  width: min(980px, calc(100% - 28px));
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(157, 105, 255, .24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .97), rgba(8, 7, 18, .94));
  box-shadow: 0 26px 90px rgba(0,0,0,.55);
  padding: 24px;
}

.settings-account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255,255,255,.04);
  margin: 16px 0;
}

.settings-account-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.settings-form {
  display: grid;
  gap: 16px;
}

.team-social-fields {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,.035);
}

.team-social-fields h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.my-teams-content {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.my-team-card {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.026));
}

.my-team-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.my-team-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.09);
}

.my-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0,0,0,.58);
}

.my-team-logo span {
  font-weight: 1000;
  color: #dff7ff;
}

.my-team-title h3 {
  margin: 8px 0 5px;
  color: var(--text);
}

.my-team-title p,
.muted-text {
  color: var(--muted);
  margin: 0;
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.team-stats-grid div {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.team-stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.team-stats-grid strong {
  font-size: 22px;
}

.team-profile-section {
  margin-top: 14px;
}

.team-profile-section h4 {
  margin: 0 0 10px;
  color: #dff7ff;
}

.roster-list,
.social-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roster-list span,
.social-link-grid span,
.social-link-grid a,
.share-team-btn {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 8px 11px;
  color: #d8d1f4;
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 700;
}

.social-link-grid a {
  color: #90e9ff;
  border-color: rgba(56,189,248,.20);
}

.social-empty {
  opacity: .45;
}

.share-team-btn {
  cursor: pointer;
}

.my-team-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.large-empty {
  padding: 32px;
}

.match-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.match-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.035);
}

.match-empty {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .tournament-shell {
    width: min(100%, calc(100% - 24px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .bracket-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 58px !important;
  }

  .tournament-actions {
    right: 14px !important;
    top: 14px !important;
  }

  .actions-toggle {
    min-width: 155px !important;
  }

  .team-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .user-dropdown {
    right: auto !important;
    left: 0 !important;
    min-width: min(310px, calc(100vw - 28px)) !important;
  }

  .my-team-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-stats-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== v0.2.17 — correção de times e rankings ===== */
.topbar-rank-btn {
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #dff7ff !important;
  border-color: rgba(56, 189, 248, .26) !important;
  background: rgba(56, 189, 248, .08) !important;
}

.topbar-rank-btn:hover {
  border-color: rgba(56, 189, 248, .48) !important;
  background: rgba(56, 189, 248, .14) !important;
}

.rankings-modal {
  width: min(1120px, calc(100% - 28px));
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(157, 105, 255, .24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 14, 36, .97), rgba(8, 7, 18, .94));
  box-shadow: 0 26px 90px rgba(0,0,0,.55);
  padding: 24px;
}

.ranking-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  margin: 16px 0 18px;
}

.ranking-tab {
  min-width: 160px;
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
}

.ranking-tab.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(124, 58, 237, .72), rgba(56, 189, 248, .62));
}

.ranking-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #ded8f5;
}

.ranking-table th {
  color: #77e6ff;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: 11px;
  font-weight: 1000;
}

.ranking-table tr:last-child td {
  border-bottom: 0;
}

.ranking-team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-team-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
}

.ranking-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ranking-team-logo span,
.ranking-team-logo b {
  font-size: 12px;
  font-weight: 1000;
}

.ranking-team-cell small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .topbar-left {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-rank-btn {
    width: 100%;
  }

  .ranking-tabs {
    width: 100%;
  }

  .ranking-tab {
    min-width: 0;
  }
}


/* ===== v0.2.18 — mover cadastrar/ranking e avatar dos jogadores ===== */
.tournament-topbar {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
}

.topbar-middle-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: 14px;
}

.topbar-rank-btn {
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #dff7ff !important;
  border: 1px solid rgba(56, 189, 248, .26) !important;
  background: rgba(56, 189, 248, .08) !important;
  box-shadow: 0 14px 34px rgba(56, 189, 248, .08);
}

.topbar-rank-btn:hover {
  border-color: rgba(56, 189, 248, .48) !important;
  background: rgba(56, 189, 248, .14) !important;
}

.top-create-team-btn {
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

/* Não mostrar cadastrar time dentro de ações do chaveamento, caso cache antigo mantenha o botão */
#tournamentActionsMenu #openTeamModalBtn {
  display: none !important;
}

.players-grid-linked label {
  gap: 8px;
}

.players-grid-linked input + input,
.reserve-row-expanded input + input {
  opacity: .86;
  font-size: 13px;
}

.reserve-row-expanded {
  display: grid !important;
  grid-template-columns: 1fr 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.ranking-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  color: #dff7ff;
  font-weight: 1000;
}

.ranking-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-player-avatar.no-avatar {
  background: linear-gradient(135deg, rgba(124, 58, 237, .34), rgba(56, 189, 248, .18));
}

.ranking-player-cell small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .tournament-topbar {
    grid-template-columns: 1fr !important;
  }

  .topbar-middle-actions {
    margin-left: 0;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-create-team-btn,
  .topbar-rank-btn {
    width: 100%;
  }

  .reserve-row-expanded {
    grid-template-columns: 1fr !important;
  }
}


/* ===== v0.2.19 — organização topo/perfil e config do torneio ===== */
.tournament-topbar {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
}

.topbar-middle-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin-left: 14px !important;
}

.topbar-rank-btn,
.top-create-team-btn {
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.topbar-rank-btn {
  color: #dff7ff !important;
  border: 1px solid rgba(56, 189, 248, .26) !important;
  background: rgba(56, 189, 248, .08) !important;
}

.top-create-team-btn {
  box-shadow: 0 14px 34px rgba(124, 58, 237, .20) !important;
}

/* Garante que cadastrar time fique fora da caixa de perfil/sair */
.topbar-right .top-create-team-btn {
  display: none !important;
}

/* Cabeçalho do chaveamento limpo */
.bracket-header {
  padding-top: 2px !important;
  padding-bottom: 12px !important;
}

.bracket-header .eyebrow {
  display: none !important;
}

#bracketStatus {
  display: none !important;
}

.board-tournament-name {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: 520px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, .18);
  color: #dff7ff;
  background: rgba(7, 8, 20, .56);
  box-shadow: 0 0 26px rgba(56, 189, 248, .08);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-row-with-gear {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  align-items: center;
}

.action-row-with-gear .action-btn {
  min-width: 0 !important;
}

.gear-btn {
  min-height: 40px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 13px;
  background: rgba(56, 189, 248, .08);
  color: #dff7ff;
  cursor: pointer;
  font-size: 18px;
}

.gear-btn:hover {
  background: rgba(56, 189, 248, .14);
  border-color: rgba(56, 189, 248, .40);
}

.tournament-config-modal {
  width: min(760px, calc(100% - 28px));
}

.config-option-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.04);
}

.config-option-card p {
  margin: 6px 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .tournament-topbar {
    grid-template-columns: 1fr !important;
  }

  .topbar-middle-actions {
    margin-left: 0 !important;
    flex-wrap: wrap;
  }

  .topbar-rank-btn,
  .top-create-team-btn {
    width: 100%;
  }

  .board-tournament-name {
    top: 10px;
    max-width: calc(100% - 36px);
  }
}


/* ===== v0.2.21 — nome do bot fresh + cards do modelo do torneio ===== */
.tournament-choice-section {
  display: grid;
  gap: 12px;
}

.choice-card-grid {
  display: grid;
  gap: 10px;
}

.match-format-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.structure-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.choice-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .22), transparent 46%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card span {
  position: relative;
  z-index: 1;
  color: #f4f0ff;
  font-weight: 1000;
  font-size: 16px;
}

.choice-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.35;
  font-weight: 700;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, .35);
  background: linear-gradient(145deg, rgba(56,189,248,.08), rgba(124,58,237,.07));
}

.choice-card.is-selected {
  border-color: rgba(56, 189, 248, .72);
  background: linear-gradient(145deg, rgba(124, 58, 237, .26), rgba(56, 189, 248, .16));
  box-shadow: 0 18px 50px rgba(56, 189, 248, .10), inset 0 0 0 1px rgba(255,255,255,.06);
}

.choice-card.is-selected::before {
  opacity: 1;
}

.choice-card.is-selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(56,189,248,.95));
  color: white;
  font-weight: 1000;
  font-size: 12px;
}

@media (max-width: 820px) {
  .match-format-grid,
  .structure-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .match-format-grid,
  .structure-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.2.23 — indicador visual da partida atual dentro das caixas do chaveamento */
.team-slot,
.advance-slot,
.final-slot {
  display: flex !important;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.team-slot .slot-name,
.advance-slot .slot-name,
.final-slot .slot-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-slot .series-badge,
.advance-slot .series-badge,
.final-slot .series-badge {
  margin-left: auto;
  flex: 0 0 auto;
}

.series-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}

.series-progress-one {
  background: linear-gradient(135deg, #2386ff 0%, #59b5ff 100%);
}

.series-progress-two {
  background: linear-gradient(135deg, #6f49ff 0%, #8f66ff 100%);
}

.series-progress-three {
  background: linear-gradient(135deg, #d63d8c 0%, #ff5fa2 100%);
}


/* v0.3 — ajustes do chaveamento e edição manual de partidas */
.tournament-shell {
  width: calc(100% - 180px) !important;
  max-width: none !important;
  margin-left: 140px !important;
  margin-right: 40px !important;
}

.teams-panel,
.bracket-stage {
  width: 100% !important;
}

.bracket-stage {
  padding: 30px !important;
}

.bracket-board {
  min-height: 690px !important;
  grid-template-columns: minmax(540px, 1fr) 320px minmax(540px, 1fr) !important;
  gap: 22px !important;
  padding: 34px !important;
}

.bracket-side,
.bracket-center {
  min-height: 620px !important;
}

.board-tournament-name {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.board-match-format-label {
  position: absolute;
  left: 50%;
  top: 56px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, .32);
  background: rgba(56, 189, 248, .08);
  color: #70e4ff;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 0 26px rgba(56, 189, 248, .10);
  z-index: 6;
}

.team-slot {
  width: 175px !important;
  padding: 0 8px !important;
}

.advance-slot,
.final-slot {
  width: 138px !important;
}

.bracket-left .adv-l-1,
.bracket-left .adv-l-2,
.bracket-left .adv-l-3,
.bracket-left .adv-l-4 { left: 235px !important; }

.bracket-right .adv-r-1,
.bracket-right .adv-r-2,
.bracket-right .adv-r-3,
.bracket-right .adv-r-4 { right: 235px !important; }

.bracket-left .semi-l-1,
.bracket-left .semi-l-2 { right: 36px !important; }
.bracket-right .semi-r-1,
.bracket-right .semi-r-2 { left: 36px !important; }

.c-l-1 { left: 175px !important; }
.c-l-2 { left: 175px !important; }
.c-l-3 { left: 175px !important; }
.c-l-4 { left: 175px !important; }
.c-r-1 { right: 175px !important; }
.c-r-2 { right: 175px !important; }
.c-r-3 { right: 175px !important; }
.c-r-4 { right: 175px !important; }

.team-slot,
.advance-slot,
.final-slot {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  overflow: hidden !important;
}

.team-slot .slot-name,
.advance-slot .slot-name,
.final-slot .slot-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-badge {
  min-width: 32px !important;
  height: 18px !important;
  padding: 0 7px !important;
}

.editor-manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
  align-items: center;
}

.editor-progress-wrap select {
  text-align: center;
  font-weight: 900;
  color: #dff7ff;
}

.bracket-editor-modal {
  width: min(980px, calc(100% - 28px)) !important;
}

.bracket-editor-grid {
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

@media (max-width: 1100px) {
  .tournament-shell {
    width: min(1320px, calc(100% - 42px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* v0.4 — rankings completos, perfil de jogador e atualização dinâmica do bot */
.ranking-player-profile-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.ranking-player-profile-btn:hover {
  color: #6ee7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-profile-modal {
  width: min(620px, calc(100vw - 32px));
}

.user-profile-content {
  display: grid;
  gap: 18px;
}

.public-user-card,
.public-user-section,
.public-linked-team {
  border: 1px solid rgba(157, 105, 255, .20);
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.public-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
}

.public-user-avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 1000;
  background: linear-gradient(135deg, rgba(124, 58, 237, .85), rgba(56, 189, 248, .72));
  border: 1px solid rgba(255,255,255,.12);
}

.public-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-user-info strong {
  display: block;
  font-size: 20px;
  margin-bottom: 5px;
}

.public-user-info p,
.public-user-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.public-user-section {
  padding: 16px;
  border-radius: 22px;
}

.public-user-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.public-linked-teams {
  display: grid;
  gap: 10px;
}

.public-linked-team {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
}

.public-linked-team strong,
.public-linked-team small {
  display: block;
}

.public-linked-team small {
  color: var(--muted);
  margin-top: 2px;
}

.rankings-content .empty-teams.large-empty {
  min-height: 180px;
}


/* v0.5 — perfis públicos de jogadores/times e redes sociais */
.ranking-team-profile-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.ranking-team-profile-btn:hover,
.clickable-linked-team:hover strong {
  color: #6ee7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clickable-linked-team {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.public-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.social-pill,
.social-empty {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.social-pill {
  color: #f7fbff;
  border: 1px solid rgba(56, 189, 248, .30);
  background: linear-gradient(135deg, rgba(56, 189, 248, .14), rgba(124, 58, 237, .13));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.social-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, .62);
  box-shadow: 0 10px 30px rgba(56, 189, 248, .12), inset 0 1px 0 rgba(255,255,255,.08);
}

.static-pill {
  cursor: default;
}

.social-empty {
  color: rgba(221, 214, 254, .58);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}

.public-team-avatar img,
.public-team-avatar .ranking-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-team-avatar .ranking-team-logo {
  width: 100%;
  height: 100%;
}

.team-roster-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-roster-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(157, 105, 255, .16);
  background: rgba(255,255,255,.035);
}

.team-roster-member strong,
.team-roster-member small {
  display: block;
}

.team-roster-member small {
  color: var(--muted);
  margin-top: 2px;
}

.team-profile-modal .team-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 680px) {
  .team-roster-profile-list,
  .team-profile-modal .team-stats-grid {
    grid-template-columns: 1fr;
  }
}


/* v0.6 — perfil do usuário inspirado no painel competitivo CBR, adaptado ao visual Abyss */
.settings-modal {
  width: min(1120px, calc(100vw - 32px));
}

.profile-editor-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 16px;
}

.profile-preview-card,
.profile-form-section {
  border: 1px solid rgba(56, 189, 248, .18);
  background: linear-gradient(145deg, rgba(15, 23, 52, .72), rgba(13, 10, 28, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 50px rgba(0,0,0,.22);
}

.profile-preview-card {
  position: sticky;
  top: 0;
  overflow: hidden;
  border-radius: 24px;
}

.profile-preview-banner {
  height: 128px;
  display: grid;
  place-items: center;
  color: rgba(221, 214, 254, .74);
  font-size: 13px;
  font-weight: 800;
  background:
    radial-gradient(circle at 25% 25%, rgba(56, 189, 248, .22), transparent 13rem),
    radial-gradient(circle at 75% 20%, rgba(124, 58, 237, .30), transparent 14rem),
    linear-gradient(135deg, rgba(124, 58, 237, .82), rgba(14, 165, 233, .54));
}

.profile-preview-avatar {
  width: 82px;
  height: 82px;
  margin: -42px 0 0 22px;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 1000;
  font-size: 26px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .95), rgba(56, 189, 248, .80));
  border: 4px solid rgba(9, 8, 22, .95);
  box-shadow: 0 16px 40px rgba(0,0,0,.34);
}

.profile-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-preview-body {
  padding: 14px 22px 22px;
}

.profile-preview-body strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.profile-preview-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-preview-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.profile-preview-links span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 12px;
  padding: 0 12px;
  color: rgba(238, 242, 255, .82);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  font-weight: 800;
  font-size: 12px;
}

.profile-settings-form {
  gap: 20px;
}

.profile-form-section {
  border-radius: 24px;
  padding: 18px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title-row h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.section-title-row > span {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  max-width: 270px;
}

.settings-form textarea,
.settings-form select {
  width: 100%;
  border: 1px solid rgba(157, 105, 255, .20);
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

.settings-form textarea {
  resize: vertical;
  min-height: 96px;
}

.settings-form select:focus,
.settings-form textarea:focus {
  border-color: rgba(56, 189, 248, .52);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .08);
}


.settings-form label:has(.custom-select) {
  gap: 8px;
}

.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, .24);
  background:
    linear-gradient(135deg, rgba(4, 10, 28, .96), rgba(10, 14, 34, .90)),
    rgba(0,0,0,.32);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.custom-select-trigger:hover {
  border-color: rgba(56, 189, 248, .42);
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, .60);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .10);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-select-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  color: #8fe8ff;
  transition: transform .18s ease;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  padding: 8px;
  max-height: 250px;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, .24);
  background: linear-gradient(160deg, rgba(9, 13, 32, .98), rgba(12, 14, 28, .97));
  box-shadow: 0 22px 46px rgba(0,0,0,.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-select-option {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255,255,255,.02);
  color: rgba(226, 232, 240, .92);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: none;
  background: rgba(56, 189, 248, .10);
  border-color: rgba(56, 189, 248, .28);
  color: #ffffff;
}

.custom-select-option.is-selected {
  background: linear-gradient(135deg, rgba(56, 189, 248, .18), rgba(131, 56, 236, .16));
  border-color: rgba(56, 189, 248, .32);
  color: #ffffff;
  font-weight: 800;
}

.form-grid.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.game-account-card {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 18px;
  background: rgba(56, 189, 248, .07);
  padding: 14px;
}

.game-account-card input {
  width: 100%;
  text-align: center;
  min-height: 36px;
}

.game-platform-icon {
  font-size: 20px;
  opacity: .9;
}

.disabled-card {
  opacity: .44;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}

.profile-save-btn {
  min-height: 52px;
}

.user-profile-modal {
  width: min(820px, calc(100vw - 32px));
}

.profile-hero-card {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(56, 189, 248, .18);
  background: linear-gradient(145deg, rgba(17, 14, 36, .96), rgba(8, 7, 18, .94));
}

.profile-hero-banner {
  height: 118px;
  background:
    radial-gradient(circle at 20% 30%, rgba(56, 189, 248, .24), transparent 14rem),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, .34), transparent 14rem),
    linear-gradient(135deg, rgba(124, 58, 237, .72), rgba(14, 165, 233, .42));
}

.profile-hero-main {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 18px 18px;
  margin-top: -42px;
}

.large-avatar {
  width: 88px;
  height: 88px;
  border-radius: 30px;
  border: 4px solid rgba(9, 8, 22, .96);
}

.profile-hero-info {
  min-width: 0;
  padding-bottom: 6px;
}

.profile-hero-info strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin: 7px 0 4px;
}

.profile-hero-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.profile-summary-section p {
  white-space: pre-wrap;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-info-grid div,
.profile-stats-grid div {
  min-height: 74px;
  border: 1px solid rgba(157, 105, 255, .16);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  padding: 12px;
}

.profile-info-grid span,
.profile-stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.profile-info-grid strong,
.profile-stats-grid strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
  word-break: break-word;
}

.enhanced-social-links .social-pill::before,
.enhanced-social-links .social-empty::before {
  content: '•';
  margin-right: 7px;
  color: #6ee7ff;
}

@media (max-width: 920px) {
  .profile-editor-layout,
  .game-account-grid,
  .form-grid.three-cols,
  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .profile-preview-card {
    position: relative;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title-row > span {
    text-align: left;
  }
}


/* v0.7 — entrada Hollow Nexus e banner editável do perfil */
.profile-preview-banner {
  position: relative;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
}

.profile-preview-banner.has-image span {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 16px rgba(0,0,0,.8);
}

.profile-preview-banner-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  gap: 8px;
  z-index: 2;
}

.profile-banner-btn {
  height: 30px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: rgba(10, 8, 24, .72);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.profile-banner-btn:hover {
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 0 18px rgba(56, 189, 248, .18);
}

.ghost-banner-btn {
  color: rgba(255, 210, 224, .95);
}

.profile-banner-url-field {
  grid-column: 1 / -1;
}

.profile-hero-banner {
  background-size: cover !important;
  background-position: center !important;
}

.hero-panel .brand-title {
  max-width: 9ch;
}


/* v0.8 — correção do banner do perfil e upload igual ao cadastro de time */
.profile-preview-card {
  overflow: hidden;
}

.profile-preview-banner {
  position: relative;
  z-index: 1;
}

.profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 5, 18, 0) 0%, rgba(4, 5, 18, .26) 100%);
  pointer-events: none;
}

.profile-preview-banner > span,
.profile-preview-banner-actions {
  position: relative;
  z-index: 2;
}

.profile-preview-avatar {
  position: relative;
  z-index: 5;
  margin-top: -46px;
  background-color: rgba(10, 8, 24, .96);
}

.profile-preview-body {
  position: relative;
  z-index: 3;
  background: linear-gradient(180deg, rgba(10, 9, 24, .98), rgba(10, 9, 24, .72));
}

.profile-banner-upload-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}

.profile-banner-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-banner-upload-header strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.profile-banner-upload-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.profile-banner-paste-box {
  min-height: 76px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  border: 1px dashed rgba(103, 232, 249, .30);
  border-radius: 16px;
  color: #d9f6ff;
  background: linear-gradient(135deg, rgba(56, 189, 248, .07), rgba(139, 92, 246, .07));
  outline: none;
  cursor: text;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.profile-banner-paste-box:hover,
.profile-banner-paste-box:focus,
.profile-banner-paste-box.is-dragging {
  border-color: rgba(103, 232, 249, .62);
  background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(139, 92, 246, .10));
  transform: translateY(-1px);
}

.profile-banner-url-field {
  grid-column: auto;
}

/* v0.9 — remove botões sobrepostos do banner no preview do perfil */
.profile-preview-banner-actions {
  display: none !important;
}


/* v1.0 — ajuste fino do perfil público e texto do upload de banner */
.public-profile-hero .profile-hero-info .mini-badge {
  display: none !important;
}

.public-profile-hero .profile-hero-info strong {
  margin-top: 0;
}

.profile-banner-paste-box {
  text-align: center;
}

/* v1.1 — banner animado do Discord e opção manual */
.discord-banner-btn {
  align-self: center;
  white-space: nowrap;
  border-color: rgba(88, 101, 242, .45) !important;
  background: rgba(88, 101, 242, .16) !important;
  color: #e7e9ff !important;
}

.discord-banner-btn:hover {
  background: rgba(88, 101, 242, .28) !important;
}

.profile-preview-banner.has-image,
.profile-hero-banner {
  background-size: cover;
  background-position: center;
}


/* v1.2 — upload do banner por botão real e perfil público com banner expandido */
.profile-banner-file-label {
  display: grid;
  gap: 8px;
}

.profile-banner-file-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid rgba(157, 105, 255, .18);
  border-radius: 14px;
  background: rgba(4, 3, 12, .62);
}

.profile-file-select-btn {
  border: 1px solid rgba(56, 189, 248, .34);
  border-radius: 11px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .34), rgba(56, 189, 248, .20));
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.profile-file-select-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, .62);
}

#profileBannerFileName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 800;
}

.profile-banner-hidden-input {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.user-profile-modal {
  width: min(860px, calc(100vw - 32px)) !important;
}

.public-profile-hero.profile-hero-card {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.public-profile-hero .profile-hero-banner {
  position: absolute;
  inset: 0;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
  transform: scale(1.01);
  z-index: 0;
}

.public-profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 3, 12, .10) 0%, rgba(4, 3, 12, .40) 48%, rgba(4, 3, 12, .92) 100%),
    linear-gradient(90deg, rgba(6, 5, 18, .74) 0%, rgba(6, 5, 18, .25) 48%, rgba(6, 5, 18, .46) 100%);
  pointer-events: none;
}

.public-profile-hero .profile-hero-main {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 0 !important;
  padding: 130px 24px 24px !important;
  align-items: flex-end;
}

.public-profile-hero .large-avatar {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  border: 4px solid rgba(8, 7, 20, .96);
  box-shadow: 0 18px 42px rgba(0,0,0,.45);
}

.public-profile-hero .profile-hero-info {
  padding-bottom: 10px;
  text-shadow: 0 10px 30px rgba(0,0,0,.75);
}

.public-profile-hero .profile-hero-info strong {
  font-size: clamp(22px, 3vw, 34px);
}

.public-profile-hero .profile-hero-info p {
  color: rgba(232, 225, 255, .84);
}

@media (max-width: 720px) {
  .public-profile-hero.profile-hero-card {
    min-height: 230px;
  }

  .public-profile-hero .profile-hero-main {
    padding: 112px 16px 18px !important;
  }

  .public-profile-hero .large-avatar {
    width: 82px;
    height: 82px;
    border-radius: 24px;
  }

  .profile-banner-file-control {
    align-items: stretch;
    flex-direction: column;
  }

  #profileBannerFileName {
    white-space: normal;
  }
}


/* v1.3 — perfil público sempre acima do perfil do time + preview do perfil com banner expandido */
#teamProfileModal {
  z-index: 70;
}

#userProfileModal {
  z-index: 90;
}

.profile-preview-card {
  position: sticky;
  top: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 188px;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(8, 7, 20, .98), rgba(11, 9, 26, .92));
}

.profile-preview-card .profile-preview-banner {
  position: absolute !important;
  inset: 0;
  height: 100% !important;
  z-index: 0;
  display: grid;
  place-items: start center;
  padding-top: 58px;
  background-size: cover !important;
  background-position: center !important;
  transform: scale(1.01);
}

.profile-preview-card .profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 4, 16, .08) 0%, rgba(5, 4, 16, .42) 46%, rgba(5, 4, 16, .96) 100%),
    linear-gradient(90deg, rgba(10, 7, 24, .46), rgba(10, 7, 24, .18), rgba(10, 7, 24, .52));
  pointer-events: none;
}

.profile-preview-card .profile-preview-banner > span {
  position: relative;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(6, 5, 18, .42);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  text-shadow: 0 6px 20px rgba(0,0,0,.75);
}

.profile-preview-card .profile-preview-avatar {
  position: relative;
  z-index: 4;
  margin: 0 0 -22px 22px !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.48);
}

.profile-preview-card .profile-preview-body {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 34px 22px 22px;
  background: linear-gradient(180deg, rgba(7, 6, 18, .84), rgba(7, 6, 18, .98));
  box-shadow: 0 -24px 60px rgba(0,0,0,.32);
}

.profile-preview-card .profile-preview-links span {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 10px 12px;
}

@media (max-width: 920px) {
  .profile-preview-card {
    position: relative;
    min-height: 360px;
    padding-top: 158px;
  }
}


/* v1.4 — preview das configs igual ao perfil público, centralizado acima do formulário */
.profile-editor-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 22px !important;
  align-items: start !important;
  justify-items: center !important;
  margin-top: 18px !important;
}

.profile-editor-layout .profile-settings-form {
  width: min(860px, 100%) !important;
  justify-self: center !important;
}

.profile-editor-layout .profile-preview-card {
  position: relative !important;
  top: auto !important;
  width: min(760px, 100%) !important;
  min-height: 252px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  isolation: isolate;
  overflow: hidden !important;
  border-radius: 26px !important;
  border: 1px solid rgba(56, 189, 248, .18) !important;
  background: linear-gradient(145deg, rgba(17, 14, 36, .96), rgba(8, 7, 18, .94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 70px rgba(0,0,0,.32) !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  display: block !important;
  background-size: cover !important;
  background-position: center !important;
  transform: scale(1.01);
  z-index: 0 !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 3, 12, .10) 0%, rgba(4, 3, 12, .38) 48%, rgba(4, 3, 12, .94) 100%),
    linear-gradient(90deg, rgba(6, 5, 18, .74) 0%, rgba(6, 5, 18, .22) 48%, rgba(6, 5, 18, .46) 100%);
  pointer-events: none;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner > span {
  display: none !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-avatar {
  position: relative !important;
  z-index: 4 !important;
  width: 96px !important;
  height: 96px !important;
  margin: 0 0 24px 24px !important;
  border-radius: 28px !important;
  border: 4px solid rgba(8, 7, 20, .96) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.45) !important;
  flex: 0 0 auto;
}

.profile-editor-layout .profile-preview-card .profile-preview-body {
  position: relative !important;
  z-index: 3 !important;
  width: auto !important;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 24px 32px 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: 0 10px 30px rgba(0,0,0,.75);
}

.profile-editor-layout .profile-preview-card .profile-preview-body strong {
  font-size: clamp(22px, 3vw, 34px) !important;
  line-height: 1.1 !important;
  margin: 0 0 6px !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-body p {
  color: rgba(232, 225, 255, .84) !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-links {
  display: none !important;
}

@media (max-width: 720px) {
  .profile-editor-layout .profile-preview-card {
    min-height: 230px !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-avatar {
    width: 82px !important;
    height: 82px !important;
    border-radius: 24px !important;
    margin: 0 0 20px 16px !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-body {
    padding: 0 16px 24px 0 !important;
  }
}


/* v1.5 — preview do perfil nas configs com avatar à esquerda e nome em cima */
.profile-editor-layout .profile-preview-card {
  position: relative !important;
  top: auto !important;
  width: min(760px, 100%) !important;
  min-height: 320px !important;
  padding: 26px !important;
  display: grid !important;
  grid-template-columns: 132px minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(190px, auto) !important;
  gap: 18px 22px !important;
  align-items: start !important;
  justify-items: stretch !important;
  isolation: isolate;
  overflow: hidden !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-body {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: 0 10px 30px rgba(0,0,0,.75);
}

.profile-editor-layout .profile-preview-card .profile-preview-body strong {
  display: block !important;
  font-size: clamp(26px, 3vw, 40px) !important;
  line-height: 1.04 !important;
  margin: 0 0 8px !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-body p {
  font-size: 14px !important;
  color: rgba(232, 225, 255, .84) !important;
  margin: 0 !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 190px !important;
  height: 100% !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
  transform: none !important;
  z-index: 1 !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 3, 12, .12) 0%, rgba(4, 3, 12, .42) 48%, rgba(4, 3, 12, .9) 100%),
    linear-gradient(90deg, rgba(6, 5, 18, .18) 0%, rgba(6, 5, 18, .12) 48%, rgba(6, 5, 18, .36) 100%);
  pointer-events: none;
}

.profile-editor-layout .profile-preview-card .profile-preview-banner > span {
  display: inline-flex !important;
  position: absolute !important;
  left: 18px !important;
  top: 16px !important;
  z-index: 2 !important;
  padding: 7px 14px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .03em !important;
  background: rgba(8, 7, 18, .72) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #fff !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-avatar {
  grid-column: 1 !important;
  grid-row: 2 !important;
  position: relative !important;
  z-index: 4 !important;
  width: 96px !important;
  height: 96px !important;
  margin: 72px 0 0 0 !important;
  border-radius: 28px !important;
  border: 4px solid rgba(8, 7, 20, .96) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.45) !important;
  flex: 0 0 auto;
  justify-self: start !important;
  align-self: start !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-links {
  display: grid !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: end !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding-bottom: 4px !important;
  position: relative !important;
  z-index: 5 !important;
}

.profile-editor-layout .profile-preview-card .profile-preview-links span {
  display: block !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(232, 225, 255, .82) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  .profile-editor-layout .profile-preview-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    min-height: auto !important;
    padding: 18px !important;
    gap: 14px !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-body {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-banner {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-height: 165px !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-avatar {
    grid-column: 1 !important;
    grid-row: 3 !important;
    margin: -58px 0 0 12px !important;
  }

  .profile-editor-layout .profile-preview-card .profile-preview-links {
    grid-column: 1 !important;
    grid-row: 4 !important;
    margin-top: -8px !important;
  }
}


/* v1.6 — tela de configurações do perfil expandida como janela normal */
#settingsModal {
  align-items: stretch !important;
  justify-content: center !important;
  padding: 18px !important;
}

#settingsModal .settings-modal {
  width: min(1540px, calc(100vw - 36px)) !important;
  max-width: none !important;
  height: calc(100vh - 36px) !important;
  max-height: calc(100vh - 36px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 28px !important;
}

#settingsModal .modal-header {
  flex: 0 0 auto !important;
  padding-bottom: 12px !important;
}

#settingsModal .profile-editor-layout {
  flex: 1 1 auto !important;
  overflow: auto !important;
  padding: 0 10px 28px 0 !important;
  grid-template-columns: 1fr !important;
  align-content: start !important;
}

#settingsModal .profile-editor-layout::-webkit-scrollbar {
  width: 10px;
}

#settingsModal .profile-editor-layout::-webkit-scrollbar-thumb {
  background: rgba(157, 105, 255, .48);
  border-radius: 999px;
}

#settingsModal .profile-editor-layout .profile-preview-card {
  width: min(1120px, 100%) !important;
}

#settingsModal .profile-editor-layout .profile-settings-form {
  width: min(1120px, 100%) !important;
}

#settingsModal .profile-form-section {
  padding: 24px !important;
}

#settingsModal .profile-settings-form .form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#settingsModal .profile-banner-upload-field,
#settingsModal .profile-form-section label:has(textarea) {
  grid-column: 1 / -1;
}

#settingsModal .game-platform-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#settingsModal .profile-save-btn {
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin-top: 8px;
  box-shadow: 0 -14px 30px rgba(0,0,0,.28);
}

@media (max-width: 900px) {
  #settingsModal {
    padding: 10px !important;
  }

  #settingsModal .settings-modal {
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 22px !important;
  }

  #settingsModal .profile-settings-form .form-grid.two-cols,
  #settingsModal .game-platform-grid {
    grid-template-columns: 1fr !important;
  }

  #settingsModal .profile-editor-layout {
    padding-right: 4px !important;
  }
}


/* v1.7 — correção do layout expandido do perfil */
#settingsModal .settings-modal {
  width: min(1560px, calc(100vw - 36px)) !important;
  height: calc(100vh - 36px) !important;
  max-height: calc(100vh - 36px) !important;
}

#settingsModal .profile-editor-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  align-items: start !important;
  gap: 24px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 18px 42px !important;
}

#settingsModal .profile-editor-layout .profile-preview-card {
  width: min(1120px, 100%) !important;
  min-height: 330px !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  grid-template-rows: auto 220px auto !important;
  gap: 18px 24px !important;
  padding: 26px !important;
  overflow: hidden !important;
  align-items: start !important;
  justify-items: stretch !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body strong {
  display: block !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.05 !important;
  margin: 0 0 6px !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body p {
  margin: 0 !important;
  color: rgba(232, 225, 255, .84) !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-avatar {
  grid-column: 1 !important;
  grid-row: 2 !important;
  position: relative !important;
  z-index: 5 !important;
  width: 104px !important;
  height: 104px !important;
  margin: 58px 0 0 0 !important;
  justify-self: center !important;
  align-self: start !important;
  border-radius: 30px !important;
  border: 4px solid rgba(8, 7, 20, .96) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .46) !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
  padding: 0 !important;
  display: block !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
  transform: none !important;
  z-index: 1 !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 3, 12, .10) 0%, rgba(4, 3, 12, .34) 50%, rgba(4, 3, 12, .82) 100%),
    linear-gradient(90deg, rgba(6, 5, 18, .20) 0%, rgba(6, 5, 18, .08) 52%, rgba(6, 5, 18, .32) 100%);
  pointer-events: none;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner > span {
  display: inline-flex !important;
  position: absolute !important;
  left: 18px !important;
  top: 16px !important;
  z-index: 2 !important;
  padding: 7px 14px !important;
  border-radius: 999px !important;
  background: rgba(6, 5, 18, .62) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  backdrop-filter: blur(10px);
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-links {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  position: relative !important;
  z-index: 4 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-links span {
  display: block !important;
  padding: 11px 13px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(232, 225, 255, .82) !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

#settingsModal .profile-editor-layout .profile-settings-form {
  width: min(1120px, 100%) !important;
}

#settingsModal .profile-save-btn {
  position: relative !important;
  bottom: auto !important;
  z-index: 1 !important;
  margin-top: 18px !important;
  box-shadow: none !important;
}

@media (max-width: 860px) {
  #settingsModal .profile-editor-layout .profile-preview-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 190px auto auto !important;
    padding: 18px !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner {
    grid-column: 1 !important;
    grid-row: 2 !important;
    height: 190px !important;
    min-height: 190px !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-avatar {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
    margin: -62px 0 0 16px !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-links {
    grid-column: 1 !important;
    grid-row: 4 !important;
    grid-template-columns: 1fr !important;
  }
}


/* v1.8 — remove textos de Steam/região do preview superior do perfil */
#settingsModal .profile-preview-card .profile-preview-links {
  display: none !important;
}


/* v1.9 — remove completamente textos extras do preview superior */
#settingsModal .profile-preview-links,
#settingsModal .profile-preview-card .profile-preview-links,
.profile-editor-layout .profile-preview-card .profile-preview-links {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#settingsModal .profile-preview-banner > span,
#settingsModal .profile-preview-card .profile-preview-banner > span,
.profile-editor-layout .profile-preview-card .profile-preview-banner > span {
  display: none !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body {
  grid-column: 1 / -1 !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner {
  grid-row: 2 !important;
}


/* v2.0 — banner como fundo completo da área superior do perfil */
#settingsModal .profile-editor-layout .profile-preview-card {
  position: relative !important;
  width: min(1120px, 100%) !important;
  min-height: 360px !important;
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  gap: 22px !important;
  padding: 28px !important;
  overflow: hidden !important;
  align-items: end !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 304px !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
  z-index: 1 !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 5, 18, .92) 0%, rgba(6, 5, 18, .72) 26%, rgba(6, 5, 18, .40) 54%, rgba(6, 5, 18, .82) 100%),
    linear-gradient(180deg, rgba(4, 3, 12, .18) 0%, rgba(4, 3, 12, .36) 48%, rgba(4, 3, 12, .74) 100%);
  pointer-events: none;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-avatar {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  width: 104px !important;
  height: 104px !important;
  margin: 0 0 34px 18px !important;
  justify-self: start !important;
  align-self: end !important;
  border-radius: 30px !important;
  border: 4px solid rgba(8, 7, 20, .96) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .46) !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  align-self: end !important;
  justify-self: start !important;
  padding: 0 24px 36px 0 !important;
  width: 100% !important;
  max-width: 560px !important;
  background: transparent !important;
  box-shadow: none !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body strong {
  display: block !important;
  font-size: clamp(30px, 3vw, 44px) !important;
  line-height: 1.04 !important;
  margin: 0 0 8px !important;
  color: #ffffff !important;
}

#settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body p {
  margin: 0 !important;
  color: rgba(232, 225, 255, .88) !important;
  font-size: 18px !important;
}

@media (max-width: 860px) {
  #settingsModal .profile-editor-layout .profile-preview-card {
    min-height: 320px !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    padding: 18px !important;
    align-items: end !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-banner {
    min-height: 280px !important;
    border-radius: 22px !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-avatar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 0 78px 14px !important;
    width: 92px !important;
    height: 92px !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body {
    grid-column: 1 !important;
    grid-row: 1 !important;
    padding: 0 14px 18px 118px !important;
    max-width: none !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body strong {
    font-size: clamp(24px, 7vw, 34px) !important;
  }

  #settingsModal .profile-editor-layout .profile-preview-card .profile-preview-body p {
    font-size: 15px !important;
  }
}


/* v2.1 — conexão Steam pública clicável */
.steam-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, .38);
  background: linear-gradient(135deg, rgba(23, 92, 160, .24), rgba(56, 189, 248, .10));
  color: #8fe8ff;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.steam-profile-link:hover {
  border-color: rgba(56, 189, 248, .72);
  background: linear-gradient(135deg, rgba(23, 92, 160, .36), rgba(56, 189, 248, .18));
  transform: translateY(-1px);
}

.steam-connection-card strong,
.steam-connection-card .steam-profile-link {
  margin-top: 2px;
}


/* v2.2 — card público de conexão Steam */
.public-connections-section {
  display: grid;
  gap: 12px;
}

.profile-connections-list {
  display: grid;
  gap: 10px;
}

.profile-connection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, .22);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .16), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  color: #ffffff;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.profile-connection-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, .54);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .24), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
}

.profile-connection-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 72, 118, .94), rgba(26, 122, 188, .70));
  border: 1px solid rgba(143, 232, 255, .28);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  font-size: 18px;
}

.profile-connection-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-connection-info strong {
  font-size: 15px;
  font-weight: 1000;
}

.profile-connection-info small {
  color: #8fe8ff;
  font-weight: 900;
}


/* v2.3 — garante destaque visual da Steam quando vinculada */
.profile-connections-list .steam-connection-profile-card {
  border-color: rgba(56, 189, 248, .42);
}

.profile-connections-list .steam-connection-profile-card .profile-connection-icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(143, 232, 255, .28), transparent 1.8rem),
    linear-gradient(135deg, rgba(14, 45, 78, .96), rgba(26, 122, 188, .78));
}


/* v2.4 — seção de conexões em estilo mais limpo e inspirado no card do Discord */
.game-info-grid-only {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.discord-style-connection-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(94, 234, 212, .18);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .16), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

.discord-style-connection-card:hover {
  border-color: rgba(94, 234, 212, .34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

.discord-style-connection-card .profile-connection-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 22px;
}

.discord-style-connection-card .profile-connection-info {
  flex: 1 1 auto;
  gap: 3px;
}

.discord-style-connection-card .profile-connection-info strong {
  font-size: 16px;
}

.discord-style-connection-card .profile-connection-info small {
  color: rgba(226, 232, 240, .82);
  font-size: 13px;
  font-weight: 700;
}

.profile-connection-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #8fe8ff;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(143, 232, 255, .18);
  font-size: 18px;
  font-weight: 900;
}

@media (max-width: 640px) {
  .discord-style-connection-card {
    padding: 14px;
  }

  .discord-style-connection-card .profile-connection-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 20px;
  }
}


/* v2.5 — card de conexão Steam com logo oficial e sem exibir o ID */
.steam-discord-card {
  border-color: rgba(56, 189, 248, .28);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .22), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}

.steam-discord-card:hover {
  border-color: rgba(56, 189, 248, .55);
}

.steam-logo-badge {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(24, 52, 92, .98), rgba(19, 109, 184, .92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 10px 24px rgba(0,0,0,.26);
}

.steam-logo-badge::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.20), transparent 45%),
    linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(39, 92, 161, .95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 0 1px rgba(255,255,255,.06);
}

.steam-logo-badge svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  color: #ffffff;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.28));
}

.steam-discord-card .profile-connection-info strong {
  letter-spacing: .01em;
}

.steam-discord-card .profile-connection-info small {
  color: #8fe8ff;
  font-weight: 800;
}


/* v2.7 — conexão pública Xbox */
.xbox-discord-card {
  border-color: rgba(96, 255, 160, .26);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, .18), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}

.xbox-discord-card:hover {
  border-color: rgba(96, 255, 160, .52);
}

.xbox-logo-badge {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.18), transparent 38%),
    linear-gradient(135deg, rgba(12, 61, 28, .98), rgba(16, 124, 16, .96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 10px 24px rgba(0,0,0,.26);
}

.xbox-logo-badge::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 42%),
    linear-gradient(135deg, rgba(28, 184, 65, .98), rgba(16, 124, 16, .94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.xbox-logo-badge svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  color: #ffffff;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.28));
}

.xbox-discord-card .profile-connection-info small {
  color: #9fffc3;
  font-weight: 800;
}

/* v2.8 — logos oficiais Steam/Xbox nos cards públicos */
.platform-official-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.steam-logo-badge,
.xbox-logo-badge {
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.steam-logo-badge::before,
.xbox-logo-badge::before {
  display: none;
}

.steam-logo-badge .platform-official-logo,
.xbox-logo-badge .platform-official-logo {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .22));
}

.steam-discord-card .profile-connection-info small {
  color: #9fe8ff;
}

.xbox-discord-card .profile-connection-info small {
  color: #aef6b5;
}

/* v3.2 — barra lateral de ações e chats do torneio */
.dashboard-side-rail {
  position: fixed;
  z-index: 5;
  left: 18px;
  top: 28px;
  width: 104px;
  display: grid;
  gap: 22px;
  pointer-events: auto;
}

.side-rail-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(157, 105, 255, .18);
  background: linear-gradient(145deg, rgba(17, 14, 36, .58), rgba(8, 7, 18, .42));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 22px 70px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}

.side-rail-group small {
  display: block;
  text-align: center;
  color: rgba(226, 232, 240, .62);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.side-rail-btn {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid rgba(56, 189, 248, .24);
  border-radius: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, .17), transparent 8rem),
    linear-gradient(145deg, rgba(15, 18, 43, .92), rgba(8, 7, 19, .74));
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.side-rail-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, .52);
  box-shadow: 0 16px 36px rgba(0,0,0,.28), 0 0 24px rgba(56,189,248,.08);
}

.side-rail-btn span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 17px;
}

.side-rail-btn strong {
  font-size: 12px;
  line-height: 1.12;
  text-align: center;
  font-weight: 1000;
}

.side-rail-btn-main {
  min-height: 78px;
  border-color: rgba(139, 92, 246, .42);
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, .24), transparent 8rem),
    linear-gradient(145deg, rgba(20, 16, 45, .95), rgba(8, 7, 18, .76));
}

.chat-modal {
  width: min(820px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 42px));
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(157, 105, 255, .25);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .10), transparent 20rem),
    linear-gradient(145deg, rgba(17, 14, 36, .98), rgba(8, 7, 18, .96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.compact-chat-modal {
  width: min(560px, calc(100vw - 32px));
}

.team-chat-modal {
  width: min(1040px, calc(100vw - 32px));
}

.chat-message-list {
  min-height: 360px;
  max-height: 460px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(157, 105, 255, .18);
  background: rgba(0,0,0,.20);
}

.chat-message-list.compact-list {
  min-height: 330px;
  max-height: 420px;
}

.chat-empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(157, 105, 255, .24);
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.chat-empty-state strong {
  color: var(--text);
}

.chat-empty-state p {
  margin: 0;
  line-height: 1.55;
}

.chat-message {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .95), rgba(56, 189, 248, .76));
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 1000;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message-body {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, .15);
  background: rgba(255,255,255,.04);
}

.chat-message.from-discord .chat-message-body {
  border-color: rgba(88, 101, 242, .28);
  background: linear-gradient(135deg, rgba(88,101,242,.12), rgba(255,255,255,.035));
}

.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.chat-message-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.chat-message-meta span {
  flex: 0 0 auto;
  color: rgba(226, 232, 240, .58);
  font-size: 11px;
  font-weight: 800;
}

.chat-message-body p {
  margin: 0;
  color: rgba(247, 244, 255, .92);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-compose-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-compose-form input,
.team-chat-create-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(157, 105, 255, .20);
  border-radius: 14px;
  color: var(--text);
  background: rgba(0,0,0,.28);
  padding: 0 14px;
  outline: none;
}

.chat-compose-form input:focus,
.team-chat-create-form select:focus {
  border-color: rgba(56, 189, 248, .52);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .08);
}

.team-chat-create-box {
  display: grid;
  grid-template-columns: 1fr minmax(420px, .9fr);
  gap: 16px;
  align-items: end;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(56, 189, 248, .16);
  background: rgba(56,189,248,.045);
}

.team-chat-create-box strong {
  display: block;
  margin-bottom: 4px;
}

.team-chat-create-box small {
  color: var(--muted);
  line-height: 1.45;
}

.team-chat-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.team-chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  min-height: 420px;
}

.team-chat-list-wrap,
.team-chat-room {
  border: 1px solid rgba(157, 105, 255, .18);
  border-radius: 22px;
  background: rgba(0,0,0,.18);
  padding: 14px;
}

.team-chat-list-wrap {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-width: 0;
}

.team-chat-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  max-height: 430px;
}

.team-chat-item {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  cursor: pointer;
}

.team-chat-item:hover,
.team-chat-item.is-active {
  border-color: rgba(56, 189, 248, .42);
  background: rgba(56, 189, 248, .09);
}

.team-chat-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.team-chat-item small {
  color: var(--muted);
  font-size: 11px;
}

.team-chat-room {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-width: 0;
}

.team-chat-room-head h3 {
  margin: 2px 0 0;
}

@media (max-width: 980px) {
  .dashboard-side-rail {
    position: relative;
    left: auto;
    top: auto;
    width: min(100% - 42px, 1320px);
    margin: 18px auto 0;
    grid-template-columns: 1fr;
  }

  .side-rail-group {
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
  }

  .side-rail-btn {
    min-height: 58px;
    grid-template-columns: auto 1fr;
    justify-content: start;
    text-align: left;
  }

  .team-chat-layout,
  .team-chat-create-box,
  .team-chat-create-form {
    grid-template-columns: 1fr;
  }
}

/* v3.3 — alinhamento da lateral, ponte Discord, selects premium e música */
.dashboard-side-rail {
  top: 88px !important;
  left: 48px !important;
  width: 96px !important;
  gap: 14px !important;
  align-content: start;
}

.side-rail-group {
  gap: 8px !important;
  padding: 10px !important;
}

.side-rail-btn {
  width: 100%;
  min-height: 70px !important;
  padding: 9px 7px !important;
}

.side-rail-btn span {
  width: 34px !important;
  height: 34px !important;
}

.side-rail-group-bottom {
  margin-top: 4px;
}

.chat-modal-header-actions {
  align-items: flex-start;
}

.chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-gear-btn {
  color: #8fe8ff;
}

.chat-bridge-meta {
  display: block;
  margin-top: 5px;
  color: rgba(226, 232, 240, .58);
  font-weight: 800;
  font-size: 12px;
}

.site-chat-settings-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(56, 189, 248, .20);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .12), transparent 18rem),
    rgba(0,0,0,.24);
  animation: softPanelIn .18s ease both;
}

.site-chat-settings-panel[hidden] {
  display: none;
}

.site-chat-settings-panel strong {
  display: block;
  margin-bottom: 4px;
}

.site-chat-settings-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.bridge-settings-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.custom-select {
  z-index: 1;
}

.custom-select.is-open {
  z-index: 80;
}

.custom-select-menu {
  z-index: 90 !important;
  background: linear-gradient(160deg, rgba(8, 12, 32, .99), rgba(12, 10, 28, .99)) !important;
  border-color: rgba(56, 189, 248, .36) !important;
}

.custom-select-option.is-disabled,
.custom-select-option:disabled {
  opacity: .48;
  cursor: not-allowed;
  background: rgba(255,255,255,.015);
  color: rgba(226, 232, 240, .48);
}

.team-chat-create-form .custom-select-trigger,
.site-chat-settings-select + .custom-select-trigger,
.music-settings-select + .custom-select-trigger {
  min-height: 48px;
}

.team-chat-create-form .custom-select-menu,
.site-chat-settings-panel .custom-select-menu {
  max-height: 270px;
}

.music-settings-panel {
  position: fixed;
  z-index: 70;
  left: 162px;
  top: 88px;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, .36);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .16), transparent 16rem),
    linear-gradient(145deg, rgba(17, 14, 36, .92), rgba(8, 7, 18, .88));
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
  transform: translateX(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}

.music-settings-panel[hidden] {
  display: none;
}

.music-settings-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.music-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.music-settings-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.music-settings-panel label {
  display: grid;
  gap: 8px;
  color: rgba(247,244,255,.92);
  font-weight: 900;
}

.music-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.music-volume-field input[type="range"] {
  width: 100%;
  accent-color: #8b5cf6;
}

.music-status {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
}

@keyframes softPanelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .dashboard-side-rail {
    left: auto !important;
    top: auto !important;
    width: min(100% - 42px, 1320px) !important;
  }

  .side-rail-group-bottom,
  .side-rail-group {
    grid-template-columns: auto 1fr 1fr !important;
  }

  .bridge-settings-row,
  .music-actions {
    grid-template-columns: 1fr;
  }

  .music-settings-panel {
    left: 16px;
    right: 16px;
    top: 86px;
    width: auto;
  }
}


/* v3.5 — lateral corrigida sem afetar o chaveamento */
.dashboard-side-rail {
  position: fixed !important;
  z-index: 8 !important;
  left: 54px !important;
  top: 88px !important;
  bottom: 28px !important;
  width: 128px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  align-items: stretch !important;
  padding: 0 !important;
  pointer-events: auto;
}

.side-rail-group {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
  padding: 10px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(157, 105, 255, .22) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, .18), transparent 8rem),
    linear-gradient(145deg, rgba(17, 14, 36, .62), rgba(8, 7, 18, .46)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 48px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(14px);
}

.side-rail-group-bottom {
  margin-top: auto !important;
}

.side-rail-group small {
  padding: 0 2px 2px !important;
  text-align: center !important;
  color: rgba(226, 232, 240, .66) !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  font-weight: 1000 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
}

.side-rail-btn,
.side-rail-btn-main {
  width: 100% !important;
  min-height: 52px !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 0 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(56, 189, 248, .30) !important;
  color: #f7f4ff !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .16), transparent 8rem),
    linear-gradient(135deg, rgba(12, 20, 46, .96), rgba(11, 10, 27, .82)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 12px 28px rgba(0,0,0,.20) !important;
  cursor: pointer;
  overflow: visible !important;
  text-align: left !important;
}

.side-rail-btn-main {
  min-height: 58px !important;
  border-color: rgba(139, 92, 246, .42) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, .26), transparent 8rem),
    linear-gradient(135deg, rgba(29, 20, 66, .96), rgba(11, 10, 27, .84)) !important;
}

.side-rail-btn:hover,
.side-rail-btn-main:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(56, 189, 248, .62) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 34px rgba(0,0,0,.26), 0 0 22px rgba(56,189,248,.10) !important;
}

.side-rail-btn span,
.side-rail-btn-main span {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 11px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  background: rgba(255,255,255,.07) !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

.side-rail-btn strong,
.side-rail-btn-main strong {
  display: block !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.08 !important;
  font-weight: 1000 !important;
}

.music-settings-panel {
  left: 196px !important;
  top: 88px !important;
}

@media (max-width: 980px) {
  .dashboard-side-rail {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: min(100% - 42px, 1320px) !important;
    margin: 18px auto 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .side-rail-group,
  .side-rail-group-bottom {
    display: grid !important;
    grid-template-columns: auto 1fr 1fr !important;
    align-items: center !important;
    margin-top: 0 !important;
  }

  .side-rail-btn,
  .side-rail-btn-main {
    min-height: 48px !important;
  }

  .music-settings-panel {
    left: 16px !important;
    right: 16px !important;
    top: 86px !important;
    width: auto !important;
  }
}

/* v3.6 — posição final dos botões na sobra esquerda, sem invadir o conteúdo */
.dashboard-side-rail {
  position: fixed !important;
  left: 36px !important;
  top: 78px !important;
  bottom: 26px !important;
  width: 90px !important;
  z-index: 9 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.side-rail-group,
.side-rail-group-bottom {
  width: 100% !important;
  padding: 8px !important;
  gap: 8px !important;
  border-radius: 20px !important;
}

.side-rail-group-bottom {
  margin-top: auto !important;
}

.side-rail-btn,
.side-rail-btn-main {
  width: 100% !important;
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  align-content: center !important;
  gap: 5px !important;
  padding: 8px 5px !important;
  border-radius: 16px !important;
  text-align: center !important;
  overflow: visible !important;
}

.side-rail-btn span,
.side-rail-btn-main span {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

.side-rail-btn strong,
.side-rail-btn-main strong {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: normal !important;
  text-align: center !important;
  font-size: 11.5px !important;
  line-height: 1.05 !important;
}

.side-rail-group small {
  font-size: 9px !important;
  letter-spacing: .08em !important;
}

.music-settings-panel {
  left: 146px !important;
  top: 136px !important;
}

@media (max-width: 980px) {
  .dashboard-side-rail {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: min(100% - 42px, 1320px) !important;
    margin: 18px auto 0 !important;
  }

  .side-rail-btn,
  .side-rail-btn-main {
    min-height: 54px !important;
    grid-template-columns: auto 1fr !important;
    justify-content: start !important;
    text-align: left !important;
  }

  .side-rail-btn strong,
  .side-rail-btn-main strong {
    text-align: left !important;
  }
}


/* v3.8 — chat com edição, menções e mensagens longas sem cortar */
.chat-modal {
  height: min(860px, calc(100vh - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.team-chat-modal {
  height: min(860px, calc(100vh - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chat-message-list {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.team-chat-layout {
  min-height: 0 !important;
  height: 100%;
}

.team-chat-list-wrap,
.team-chat-room {
  min-height: 0;
}

.team-chat-list {
  max-height: none !important;
}

.chat-message-body {
  overflow: visible;
}

.chat-message-text {
  margin: 0;
  color: rgba(247, 244, 255, .92);
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.chat-message-body p {
  display: none;
}

.chat-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.chat-message-edit-btn {
  border: 1px solid rgba(56, 189, 248, .24);
  background: rgba(56, 189, 248, .08);
  color: #8fe8ff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.chat-message-edit-btn:hover {
  border-color: rgba(56, 189, 248, .52);
  background: rgba(56, 189, 248, .15);
}

.chat-compose-form {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.chat-compose-form textarea {
  width: 100%;
  min-height: 46px;
  max-height: 138px;
  resize: none;
  border: 1px solid rgba(157, 105, 255, .20);
  border-radius: 14px;
  color: var(--text);
  background: rgba(0,0,0,.28);
  padding: 13px 14px;
  outline: none;
  line-height: 1.38;
  overflow-y: auto;
}

.chat-compose-form textarea:focus {
  border-color: rgba(56, 189, 248, .52);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .08);
}

.mention-btn {
  min-height: 46px;
  padding-inline: 14px;
  white-space: nowrap;
}

.mention-suggestions-panel {
  position: absolute;
  left: 0;
  right: 130px;
  bottom: calc(100% + 8px);
  z-index: 120;
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, .30);
  background: linear-gradient(160deg, rgba(8, 12, 32, .99), rgba(13, 10, 30, .99));
  box-shadow: 0 22px 46px rgba(0,0,0,.48);
}

.mention-suggestions-panel[hidden] {
  display: none;
}

.mention-suggestion {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas:
    "icon name"
    "icon sub";
  gap: 1px 10px;
  text-align: left;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  cursor: pointer;
}

.mention-suggestion:hover {
  border-color: rgba(56, 189, 248, .32);
  background: rgba(56, 189, 248, .10);
}

.mention-suggestion > span {
  grid-area: icon;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #8fe8ff;
  background: rgba(56, 189, 248, .12);
  font-weight: 1000;
}

.mention-suggestion strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.mention-suggestion small {
  grid-area: sub;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-mention {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, .26);
  background: rgba(56, 189, 248, .12);
  color: #9fe8ff;
  font-weight: 900;
}

.role-mention {
  border-color: rgba(139, 92, 246, .30);
  background: rgba(139, 92, 246, .15);
  color: #d8c8ff;
}

@media (max-width: 700px) {
  .chat-compose-form {
    grid-template-columns: 1fr;
  }

  .mention-suggestions-panel {
    right: 0;
  }
}

/* ==========================================================
   AJUSTE FINAL — BOTÕES LATERAIS V2 / OPÇÃO H MIDNIGHT BLEND
   Base: ZIP v3.8 enviado pelo usuário.
   Objetivo: manter a estrutura da opção/print 2 e trocar só a cor
   dos botões laterais claros para encaixar no fundo do site.
   ========================================================== */

.dashboard-side-rail {
  position: fixed !important;
  z-index: 32 !important;
  left: 14px !important;
  top: 18px !important;
  bottom: 18px !important;
  width: 122px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 9px !important;
  padding: 0 !important;
}

.side-rail-group,
.side-rail-group-bottom {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.side-rail-group-bottom {
  margin-top: auto !important;
}

.side-rail-group small {
  margin: 3px 0 0 !important;
  padding: 0 4px !important;
  text-align: left !important;
  color: rgba(220, 230, 255, .62) !important;
  font-size: 8.8px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  letter-spacing: .075em !important;
  text-transform: uppercase !important;
}

.side-rail-btn,
.side-rail-btn-main {
  width: 100% !important;
  min-height: 45px !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 12px !important;
  border-radius: 15px !important;
  border: 1px solid rgba(118, 139, 232, .42) !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, .20), transparent 52%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, .14), transparent 52%),
    linear-gradient(135deg, #1d173a 0%, #0d1831 100%) !important;
  box-shadow: 0 14px 30px rgba(5, 6, 21, .36), 0 0 20px rgba(96, 114, 255, .13) !important;
  text-align: center !important;
  overflow: visible !important;
  cursor: pointer !important;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.side-rail-btn-main {
  min-height: 47px !important;
}

.side-rail-btn:hover,
.side-rail-btn-main:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.06) !important;
  border-color: rgba(154, 170, 255, .72) !important;
  box-shadow: 0 16px 36px rgba(5, 6, 21, .44), 0 0 26px rgba(96, 114, 255, .20) !important;
}

.side-rail-btn span,
.side-rail-btn-main span {
  width: auto !important;
  height: auto !important;
  flex: 0 0 auto !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f3f0ff !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.side-rail-btn strong,
.side-rail-btn-main strong {
  display: block !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  text-align: center !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
}

.music-settings-panel {
  left: 150px !important;
  top: 24px !important;
}

@media (max-width: 980px) {
  .dashboard-side-rail {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: min(100% - 28px, 1320px) !important;
    margin: 14px auto 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .side-rail-group,
  .side-rail-group-bottom {
    grid-template-columns: 1fr 1fr !important;
  }

  .side-rail-group-bottom {
    margin-top: 0 !important;
  }

  .side-rail-group small {
    grid-column: 1 / -1 !important;
    text-align: center !important;
  }

  .music-settings-panel {
    left: 14px !important;
    right: 14px !important;
    top: 86px !important;
    width: auto !important;
  }
}


/* ==========================================================
   v3.8.1 — notificações do chat e botão Estatísticas placeholder
   ========================================================== */
.side-rail-btn {
  position: relative;
}

.side-rail-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  min-width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  background: linear-gradient(135deg, #f43f5e, #fb7185) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(244, 63, 94, .42) !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 1000 !important;
  pointer-events: none !important;
}

.side-rail-btn.has-chat-alert {
  border-color: rgba(251, 113, 133, .64) !important;
  box-shadow: 0 16px 36px rgba(5, 6, 21, .44), 0 0 26px rgba(251, 113, 133, .18) !important;
}

.site-notification-stack {
  position: fixed;
  z-index: 120;
  top: 94px;
  right: 24px;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.site-notification-toast {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(118, 139, 232, .42);
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, .22), transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, .14), transparent 52%),
    linear-gradient(135deg, rgba(29, 23, 58, .96), rgba(13, 24, 49, .96));
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 0 24px rgba(96, 114, 255, .16);
  backdrop-filter: blur(16px);
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.site-notification-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-notification-toast:hover {
  border-color: rgba(154, 170, 255, .74);
}

.site-notification-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .07);
}

.site-notification-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.site-notification-copy strong {
  font-size: 13px;
  font-weight: 1000;
}

.site-notification-copy small {
  overflow: hidden;
  color: rgba(226, 232, 240, .72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .site-notification-stack {
    top: 78px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}


/* ==========================================================
   AJUSTE v3.8.2 — Estatísticas abaixo de Times
   ========================================================== */
.side-rail-btn strong {
  max-width: 100% !important;
}

#openStatsBtn .side-rail-badge {
  top: -7px;
  right: -7px;
}

/* ==========================================================
   v3.8.3 — anexos/imagens do Discord no chat vinculado
   ========================================================== */

.chat-message-text:empty {
  display: none;
}

.chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.chat-attachment {
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, .22);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, .10), transparent 10rem),
    rgba(0, 0, 0, .24);
}

.chat-attachment-image {
  display: block;
  width: fit-content;
  max-width: min(100%, 520px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.chat-attachment-image img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: rgba(0,0,0,.28);
}

.chat-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  color: #dff6ff;
  text-decoration: none;
  font-weight: 900;
}

.chat-attachment-file strong {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment:hover {
  border-color: rgba(56, 189, 248, .44);
  box-shadow: 0 0 18px rgba(56, 189, 248, .10);
}

@media (max-width: 720px) {
  .chat-attachment-image {
    max-width: 100%;
  }

  .chat-attachment-image img {
    max-height: 240px;
  }
}

/* ==========================================================
   v4.0 — diagnóstico de payload vazio do Discord no chat
   ========================================================== */

.chat-message-notice {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, .28);
  background: rgba(251, 191, 36, .08);
  color: rgba(255, 244, 210, .92);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.chat-message-notice strong {
  color: #ffe7a3;
}

/* ==========================================================
   v4.1_render_ready — configurações de times/grupos
   ========================================================== */

.tournament-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tournament-config-grid select,
.tournament-config-modal select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(157, 105, 255, .25);
  border-radius: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, .28);
  padding: 0 14px;
  outline: none;
}

.tournament-config-modal select:focus {
  border-color: rgba(56, 189, 248, .52);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .08);
}

.groups-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.group-preview-card {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, .18);
  background: rgba(56, 189, 248, .045);
}

.group-preview-card strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #f7f4ff;
  font-size: 13px;
}

.group-preview-card span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, .62);
  font-size: 11px;
  font-weight: 800;
}

.group-preview-card ul {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.group-preview-card li {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 10px;
  color: rgba(247, 244, 255, .9);
  background: rgba(0, 0, 0, .22);
  font-size: 12px;
  font-weight: 800;
}

.group-preview-card .muted-group-item {
  color: rgba(226, 232, 240, .46);
}

.config-check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(157, 105, 255, .18);
  background: rgba(255,255,255,.035);
}

.config-check-row input {
  width: auto !important;
  min-height: auto !important;
}

.config-help-text {
  display: block;
  margin-top: 8px;
  color: rgba(226, 232, 240, .58);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .tournament-config-grid,
  .groups-preview {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   v4.2_player_event_views_preview — telas de jogadores
   ========================================================== */

.player-preview-body {
  min-height: 100vh;
  overflow-x: hidden;
}

.player-preview-sidebar .sidebar-brand img {
  object-fit: cover;
}

.player-preview-back {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

.player-preview-shell {
  min-height: 100vh;
}

.player-preview-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.player-preview-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(157, 105, 255, .22);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 58, 237, .22), transparent 36%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, .14), transparent 28%),
    rgba(7, 9, 20, .82);
  box-shadow: 0 22px 80px rgba(0, 0, 0, .32);
  overflow: hidden;
}

.player-preview-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .10);
  filter: blur(26px);
}

.player-preview-hero h1 {
  margin: 6px 0 8px;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .98;
  letter-spacing: -.04em;
}

.player-preview-hero p {
  max-width: 760px;
  color: rgba(226, 232, 240, .72);
  line-height: 1.6;
}

.player-preview-badge {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: grid;
  place-items: center;
  min-width: 92px;
  min-height: 92px;
  border-radius: 26px;
  border: 1px solid rgba(56, 189, 248, .30);
  background: linear-gradient(145deg, rgba(13, 17, 35, .92), rgba(83, 33, 150, .32));
}

.player-preview-badge strong {
  color: #fff;
  font-size: 23px;
  line-height: 1;
}

.player-preview-badge span {
  margin-top: -20px;
  color: rgba(226, 232, 240, .58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.player-layout-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(157, 105, 255, .14);
  background: rgba(4, 6, 15, .72);
  overflow-x: auto;
}

.player-layout-tab {
  border: 0;
  border-radius: 16px;
  min-height: 44px;
  padding: 0 16px;
  color: rgba(226, 232, 240, .70);
  background: rgba(255, 255, 255, .035);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.player-layout-tab:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(157, 105, 255, .14);
}

.player-layout-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, .92), rgba(14, 165, 233, .78));
  box-shadow: 0 14px 30px rgba(47, 32, 112, .38);
}

.player-preview-stage {
  min-height: 560px;
}

.player-layout-panel {
  display: none;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(157, 105, 255, .18);
  background:
    linear-gradient(180deg, rgba(10, 13, 28, .94), rgba(7, 9, 19, .90)),
    rgba(0,0,0,.4);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.player-layout-panel.active {
  display: block;
  animation: playerPanelIn .22s ease both;
}

@keyframes playerPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.player-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.player-section-head h2,
.lobby-feature h2 {
  margin: 4px 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -.035em;
}

.player-section-head span {
  color: rgba(226, 232, 240, .62);
  font-weight: 700;
}

.event-card-grid,
.captain-dashboard-grid,
.calendar-layout,
.lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 16px;
}

.event-main-card,
.event-list-card,
.captain-team-card,
.captain-event-card,
.calendar-month-card,
.calendar-events-list,
.lobby-feature,
.lobby-side-card {
  min-width: 0;
  border-radius: 26px;
  border: 1px solid rgba(56, 189, 248, .16);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .18), transparent 40%),
    rgba(255,255,255,.035);
  padding: 20px;
}

.event-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #dffbff;
  background: rgba(56, 189, 248, .14);
  border: 1px solid rgba(56, 189, 248, .24);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.event-main-card h3,
.captain-event-card h3 {
  margin: 14px 0 8px;
  color: #fff;
  font-size: 28px;
}

.event-main-card p,
.captain-event-card p,
.lobby-feature p {
  color: rgba(226, 232, 240, .68);
  line-height: 1.55;
}

.event-info-grid,
.lobby-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.event-info-grid span,
.lobby-meta span {
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .20);
  color: rgba(226, 232, 240, .72);
  font-size: 12px;
  font-weight: 800;
}

.event-info-grid strong,
.lobby-meta strong {
  display: block;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.event-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

.event-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124, 58, 237, .9), rgba(56, 189, 248, .9));
}

.event-actions,
.captain-next-actions,
.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.event-list-card h4,
.lobby-side-card h3 {
  margin: 0 0 12px;
  color: #fff;
}

.event-list-card button {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(157, 105, 255, .14);
  border-radius: 18px;
  padding: 14px;
  margin-top: 10px;
  background: rgba(0,0,0,.20);
  color: #fff;
  cursor: pointer;
}

.event-list-card button span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, .56);
  font-size: 12px;
  font-weight: 800;
}

.captain-team-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.captain-team-header img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(157, 105, 255, .25);
}

.captain-team-header span {
  color: rgba(226, 232, 240, .56);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.captain-team-header strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.captain-status {
  padding: 14px;
  border-radius: 18px;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .20);
}

.captain-status strong {
  display: block;
  color: #dbffe8;
}

.captain-status span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, .62);
  font-size: 12px;
  font-weight: 800;
}

.captain-checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.captain-checklist label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  color: rgba(226, 232, 240, .78);
  background: rgba(255,255,255,.04);
  font-weight: 850;
}

.calendar-month-card strong {
  display: block;
  color: #fff;
  font-size: 26px;
}

.calendar-month-card span {
  color: rgba(226, 232, 240, .58);
  font-weight: 800;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.mini-calendar i {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 12px;
  background: rgba(0,0,0,.24);
  color: rgba(226, 232, 240, .66);
  font-style: normal;
  font-weight: 900;
}

.mini-calendar i.active {
  color: #fff;
  background: rgba(124, 58, 237, .7);
}

.mini-calendar i.hot {
  color: #e0fbff;
  background: rgba(56, 189, 248, .22);
}

.calendar-events-list {
  display: grid;
  gap: 12px;
}

.calendar-event-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.06);
}

.calendar-event-item.active {
  border-color: rgba(56, 189, 248, .24);
  background: rgba(56, 189, 248, .06);
}

.calendar-event-item time {
  color: rgba(56, 189, 248, .82);
  font-size: 12px;
  font-weight: 950;
}

.calendar-event-item strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 17px;
}

.calendar-event-item span {
  display: block;
  margin: 4px 0 12px;
  color: rgba(226, 232, 240, .56);
  font-size: 12px;
  font-weight: 800;
}

.lobby-feature {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 70% 0%, rgba(56, 189, 248, .18), transparent 34%),
    radial-gradient(circle at 0% 80%, rgba(124, 58, 237, .22), transparent 42%),
    rgba(255,255,255,.035);
}

.lobby-side-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.registered-team {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .22);
}

.registered-team span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .8), rgba(56, 189, 248, .55));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.registered-team strong {
  color: rgba(247, 244, 255, .92);
  font-size: 13px;
}

.guided-flow {
  display: grid;
  gap: 14px;
}

.guided-step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(157, 105, 255, .14);
  background: rgba(255,255,255,.035);
}

.guided-step > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 950;
}

.guided-step.done > span {
  background: rgba(34, 197, 94, .55);
}

.guided-step.active {
  border-color: rgba(56, 189, 248, .28);
  background: rgba(56, 189, 248, .06);
}

.guided-step.active > span {
  background: linear-gradient(135deg, rgba(124, 58, 237, .9), rgba(56, 189, 248, .9));
}

.guided-step strong {
  color: #fff;
  font-size: 17px;
}

.guided-step p {
  margin: 4px 0 12px;
  color: rgba(226, 232, 240, .62);
  line-height: 1.45;
}

.player-fit-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  color: rgba(226, 232, 240, .72);
  background: rgba(157, 105, 255, .08);
  border: 1px solid rgba(157, 105, 255, .16);
  font-weight: 780;
}

.player-fit-note strong {
  color: #fff;
}

@media (max-width: 980px) {
  .player-preview-hero,
  .player-section-head {
    flex-direction: column;
  }

  .event-card-grid,
  .captain-dashboard-grid,
  .calendar-layout,
  .lobby-layout {
    grid-template-columns: 1fr;
  }

  .event-info-grid,
  .lobby-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .player-preview-shell {
    padding: 16px;
  }

  .player-layout-panel {
    padding: 16px;
  }

  .event-info-grid,
  .lobby-meta {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   v4.3_player_home_bracket_button — tela inicial + botão chaveamento
   ========================================================== */

.player-home-screen {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.player-home-screen[hidden],
.bracket-screen[hidden] {
  display: none !important;
}

.topbar-rank-btn.active {
  color: #fff;
  border-color: rgba(56, 189, 248, .36);
  background: rgba(56, 189, 248, .12);
}

.player-home-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(157, 105, 255, .22);
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, .24), transparent 36%),
    radial-gradient(circle at 82% 14%, rgba(56, 189, 248, .16), transparent 32%),
    linear-gradient(145deg, rgba(15, 12, 35, .88), rgba(5, 11, 24, .82));
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
  overflow: hidden;
}

.player-home-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -140px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .10);
  filter: blur(26px);
  pointer-events: none;
}

.player-home-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 6px 0 8px;
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  line-height: .98;
  letter-spacing: -.05em;
}

.player-home-hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: rgba(226, 232, 240, .72);
  line-height: 1.62;
  font-weight: 720;
}

.player-home-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 270px;
}

.player-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 18px;
}

.player-home-feature,
.player-home-side,
.player-home-flow,
.bracket-screen-head {
  min-width: 0;
  border-radius: 28px;
  border: 1px solid rgba(157, 105, 255, .18);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .18), transparent 42%),
    linear-gradient(145deg, rgba(17, 14, 36, .72), rgba(8, 7, 18, .56));
  box-shadow: 0 22px 75px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}

.player-home-feature {
  padding: 24px;
}

.player-home-feature h2 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -.04em;
}

.player-home-feature p {
  color: rgba(226, 232, 240, .68);
  line-height: 1.58;
  max-width: 760px;
}

.player-home-side {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-home-side h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
}

.player-home-flow {
  padding: 22px;
}

.bracket-screen {
  display: block;
  margin-top: 22px;
}

.bracket-screen-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 20px;
}

.bracket-screen-head h2 {
  margin: 4px 0;
  color: #fff;
  font-size: clamp(24px, 2.8vw, 38px);
  letter-spacing: -.035em;
}

.bracket-screen-head span {
  color: rgba(226, 232, 240, .62);
  font-weight: 760;
}

.player-preview-rail .player-preview-back {
  text-decoration: none;
}

.player-preview-rail .player-preview-back strong {
  color: inherit;
}

@media (max-width: 980px) {
  .player-home-hero,
  .bracket-screen-head {
    flex-direction: column;
  }

  .player-home-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .player-home-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   v4.4 — eventos reais, perfis públicos e Screens
   ========================================================== */
.screen-create-form {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.event-registered-teams {
  display: grid;
  gap: 10px;
}

.registered-team-btn {
  width: 100%;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.registered-team-btn:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, .08);
}

.public-teams-panel {
  min-width: 0;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(157, 105, 255, .18);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .14), transparent 42%),
    linear-gradient(145deg, rgba(17, 14, 36, .72), rgba(8, 7, 18, .56));
  box-shadow: 0 22px 75px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}

.public-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.public-team-directory-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(157, 105, 255, .14);
  background: rgba(255,255,255,.035);
}

.public-team-directory-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.public-team-directory-main:hover strong {
  color: #7dd3fc;
}

.public-team-directory-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .78), rgba(56, 189, 248, .58));
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 950;
}

.public-team-directory-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-team-directory-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-team-directory-info strong {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-team-directory-info small,
.public-team-directory-meta {
  color: rgba(226, 232, 240, .62);
  font-size: 12px;
  font-weight: 800;
}

.public-team-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-team-directory-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
}

.public-team-directory-meta .is-registered {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.24);
  background: rgba(34,197,94,.10);
}

.event-register-choices {
  display: grid;
  gap: 10px;
}

.event-register-choice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(157, 105, 255, .18);
  color: var(--text);
  background: rgba(255,255,255,.04);
  text-align: left;
  cursor: pointer;
}

.event-register-choice:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, .42);
  background: rgba(56, 189, 248, .08);
}

.event-register-choice:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.event-register-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .72), rgba(56, 189, 248, .52));
}

.event-register-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-register-choice strong {
  display: block;
  color: #fff;
}

.event-register-choice small {
  display: block;
  margin-top: 3px;
  color: rgba(226, 232, 240, .62);
}

.howto-guided-flow {
  max-height: min(620px, calc(100vh - 190px));
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 880px) {
  .public-teams-grid {
    grid-template-columns: 1fr;
  }

  .screen-create-form {
    grid-template-columns: 1fr !important;
  }
}

/* v4.5 — eventos admin + scrim */
.admin-only[hidden] { display: none !important; }
.player-home-feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.event-progress-secondary {
  margin-top: 10px;
  background: transparent;
  border: 1px dashed rgba(133, 111, 255, 0.28);
  padding: 12px 14px;
  color: rgba(255,255,255,0.72);
}
.events-showcase-panel {
  margin-top: 22px;
  border: 1px solid rgba(116, 99, 255, 0.2);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(12, 10, 35, 0.96), rgba(6, 8, 28, 0.94));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}
.events-showcase-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.event-showcase-card {
  border: 1px solid rgba(107, 128, 255, 0.18);
  background: rgba(18, 17, 48, 0.88);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  color: inherit;
}
.event-showcase-card.is-active {
  border-color: rgba(103, 178, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(103, 178, 255, 0.25), 0 12px 28px rgba(17, 111, 255, 0.12);
}
.event-showcase-card strong { font-size: 1rem; }
.event-showcase-card small,
.event-showcase-card span { color: rgba(255,255,255,0.72); }
.team-actions-lock,
.scrim-directory-note {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
}
.scrim-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
  width: 100%;
}
.scrim-directory-card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(107, 128, 255, 0.18);
  background: rgba(17, 15, 44, 0.88);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.scrim-directory-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.scrim-directory-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(104, 70, 255, 0.16);
  border: 1px solid rgba(135, 119, 255, 0.22);
}
.scrim-directory-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scrim-directory-logo span {
  font-weight: 800;
  font-size: 0.95rem;
}
.scrim-directory-head small {
  color: rgba(255,255,255,0.7);
  display: block;
  margin-top: 3px;
}
.scrim-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.primary-mini {
  background: linear-gradient(90deg, rgba(123, 72, 255, 1), rgba(68, 184, 255, 1));
  border-color: transparent;
  color: #fff;
}
.event-editor-modal {
  max-width: 860px;
}
.event-editor-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.compact-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compact-grid input,
.compact-grid select,
.event-editor-form textarea {
  width: 100%;
}
@media (max-width: 900px) {
  .player-home-feature-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .scrim-directory-grid,
  .events-showcase-list {
    grid-template-columns: 1fr;
  }
}

/* v4.6 — correções de layout eventos + scrim + selects */
.event-progress-secondary {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  display: block !important;
  line-height: 1.45;
}

.event-progress-secondary #eventMinimumTeamsMeta {
  display: block;
  white-space: normal;
}

.registered-team-btn {
  display: flex;
  align-items: center;
  gap: 10px;
}

.registered-team-media {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, .8), rgba(56, 189, 248, .55));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  flex: 0 0 34px;
}

.registered-team-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.registered-team-media span {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.team-chat-modal {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.team-chat-create-box.scrim-directory-shell {
  grid-template-columns: 1fr !important;
  align-items: start !important;
}

.scrim-directory-shell > div:first-child {
  max-width: 760px;
}

.scrim-directory-grid {
  margin-top: 6px;
  max-height: 330px;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}

.scrim-help-banner {
  grid-column: 1 / -1;
}

.team-chat-layout {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) !important;
  align-items: stretch;
  min-height: 420px !important;
}

.team-chat-list-wrap,
.team-chat-room {
  overflow: hidden;
}

.team-chat-room .chat-message-list {
  min-height: 240px !important;
}

.team-chat-list-wrap .chat-empty-state,
.team-chat-room .chat-empty-state {
  min-height: 180px;
  display: grid;
  align-content: center;
}

.event-editor-form .custom-select {
  width: 100%;
}

.event-editor-form .custom-select-trigger,
.event-editor-form input,
.event-editor-form textarea {
  border-radius: 16px;
}

.event-editor-form .custom-select-menu {
  max-height: 220px;
}

@media (max-width: 980px) {
  .team-chat-layout {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }

  .scrim-directory-grid {
    max-height: none;
  }
}


/* Ajuste fixo do botão Análise de Treinos na sidebar */
#openTrainingAnalysisBtn.side-rail-btn {
  width: 100%;
  min-height: 44px;
}

#openTrainingAnalysisBtn.side-rail-btn span {
  flex: 0 0 auto;
}

#openTrainingAnalysisBtn.side-rail-btn strong {
  font-size: clamp(9px, 0.64vw, 11px);
  line-height: 1.05;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.event-db-fallback-note {
  margin-bottom: 10px;
  border-style: solid;
  opacity: .92;
}


/* Sidebar: alinhamento consistente dos botões */
.side-rail-btn,
#openTrainingAnalysisBtn.side-rail-btn,
#openSiteConfigBtn.side-rail-btn {
  width: 100%;
  min-height: 46px;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 10px 11px !important;
  box-sizing: border-box;
}

.side-rail-btn > span,
#openTrainingAnalysisBtn.side-rail-btn > span,
#openSiteConfigBtn.side-rail-btn > span {
  width: 19px;
  min-width: 19px;
  height: 19px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.side-rail-btn > strong,
#openTrainingAnalysisBtn.side-rail-btn > strong,
#openSiteConfigBtn.side-rail-btn > strong {
  flex: 1 1 auto;
  display: block;
  min-width: 0;
  font-size: clamp(9px, 0.66vw, 11px) !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  text-align: left;
  white-space: normal;
}

#openTrainingAnalysisBtn.side-rail-btn strong,
#openSiteConfigBtn.side-rail-btn strong {
  max-width: 88px;
}

/* Modal Config do Site */
.site-config-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 4, 12, .74);
  backdrop-filter: blur(12px);
}

.site-config-backdrop.is-open {
  display: flex;
}

.site-config-panel {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 26px;
  border: 1px solid rgba(167,139,250,.28);
  background:
    radial-gradient(circle at top left, rgba(139,92,246,.20), transparent 34%),
    rgba(9, 10, 24, .96);
  box-shadow: 0 26px 90px rgba(0,0,0,.48);
  color: #f8f7ff;
}

.site-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(167,139,250,.16);
}

.site-config-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}

.site-config-body {
  padding: 20px 22px 24px;
}

.site-config-grid {
  display: grid;
  gap: 12px;
}

.site-config-row {
  display: grid;
  grid-template-columns: 70px 1.2fr 1fr 80px 80px 80px 90px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(167,139,250,.12);
}

.site-config-row input {
  min-width: 0;
  border: 1px solid rgba(167,139,250,.22);
  background: rgba(3,4,12,.45);
  color: #fff;
  border-radius: 12px;
  padding: 10px;
  outline: none;
}

.site-config-row input:focus {
  border-color: rgba(56,189,248,.68);
  box-shadow: 0 0 0 3px rgba(56,189,248,.10);
}

.site-config-actions,
.site-config-add {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.site-config-add {
  padding-top: 18px;
  border-top: 1px solid rgba(167,139,250,.14);
}

.site-config-btn {
  border: 1px solid rgba(167,139,250,.28);
  background: rgba(124,58,237,.18);
  color: #fff;
  border-radius: 13px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}

.site-config-btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  border-color: transparent;
}

.site-config-help {
  color: #c9c4e8;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

@media (max-width: 860px) {
  .site-config-row {
    grid-template-columns: 1fr 1fr;
  }
}

