/* ============================================================
   Aero Cartola — Glass Neon Dark Theme
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-root: #060B14;
  --bg-primary: #0B1120;
  --bg-secondary: #111B2E;
  --bg-tertiary: #182338;
  --neon-cyan: #00E5FF;
  --neon-blue: #4494FF;
  --neon-purple: #A855F7;
  --neon-green: #00FF88;
  --neon-amber: #F59E0B;
  --neon-red: #EF4444;
  --text-primary: #EDF2FA;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

/* --- Base --- */
html {
  background: var(--bg-root);
}

/* --- Grid Background Pattern --- */
.bg-grid {
  background-color: var(--bg-root);
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* --- Glass Panels --- */
.glass {
  background: rgba(11, 17, 32, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 229, 255, 0.08);
}

.glass-heavy {
  background: rgba(6, 11, 20, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.glass-light {
  background: rgba(17, 27, 46, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Neon Borders --- */
.neon-border {
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.06),
              inset 0 0 12px rgba(0, 229, 255, 0.015);
}

.neon-border-strong {
  border: 1px solid rgba(0, 229, 255, 0.30);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.10),
              inset 0 0 20px rgba(0, 229, 255, 0.03);
}

.neon-glow-cyan {
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.12);
}
.neon-glow-blue {
  box-shadow: 0 0 18px rgba(68, 148, 255, 0.12);
}
.neon-glow-purple {
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.12);
}
.neon-glow-green {
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.12);
}

/* --- Hover Glow --- */
.hover-glow:hover {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.12);
}

/* --- Neon Text Gradient --- */
.text-neon-gradient {
  background: linear-gradient(135deg, #00E5FF, #4494FF, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-neon-cyan-gradient {
  background: linear-gradient(135deg, #00E5FF, #4494FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Barras de rolagem globais, discretas e consistentes --- */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.48) rgba(6, 11, 20, 0.7) !important;
}

*::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}

*::-webkit-scrollbar-track {
  background: rgba(6, 11, 20, 0.7) !important;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.48) !important;
  border: 1px solid rgba(6, 11, 20, 0.68);
  border-radius: 999px;
  box-shadow: none !important;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.58) !important;
  box-shadow: none !important;
}

/* --- Position module controls and tables --- */
.position-config-header {
  cursor: pointer;
  justify-content: space-between;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  background: rgba(17, 27, 46, 0.72) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.position-config-header:hover,
.position-config-header:focus-visible {
  background-color: rgba(51, 65, 85, 0.42) !important;
  outline: none;
  box-shadow: none;
}

/* O painel é funcional, mas não deve competir visualmente com a tabela. */
.position-config-panel {
  background: rgba(11, 17, 32, 0.78) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 0.8rem !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.position-config-panel > .position-config-header {
  min-height: 2.7rem;
  padding: 0.55rem 0.8rem !important;
}

.position-config-panel > .position-config-header > .flex,
.position-config-panel > .position-config-header .flex.items-center {
  gap: 0.55rem;
}

.position-config-panel > .position-config-header i:not(.position-config-chevron) {
  color: #94a3b8 !important;
  font-size: 0.78rem !important;
}

.position-config-panel > .position-config-header h3 {
  color: #e2e8f0 !important;
  font-size: 0.78rem !important;
}

.position-config-panel > .position-config-header p {
  color: #94a3b8 !important;
  font-size: 0.63rem !important;
}

.position-config-panel form {
  background: rgba(11, 17, 32, 0.45);
}

.position-config-panel form label {
  color: #94a3b8 !important;
}

.position-config-panel form input,
.position-config-panel form select {
  border-color: rgba(148, 163, 184, 0.2) !important;
  background: rgba(15, 23, 42, 0.72) !important;
}

.position-config-panel form button {
  background: #334155 !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
  transform: none !important;
}

.position-config-panel form button:hover:not(:disabled) {
  background: #475569 !important;
}

.position-config-chevron {
  margin-left: auto;
  color: rgba(237, 242, 250, 0.72);
  font-size: 0.75rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.position-config-chevron.is-expanded {
  transform: rotate(180deg);
  color: var(--neon-cyan);
}

.position-config-panel.position-config-collapsed > form,
.position-config-panel.position-config-collapsed > .position-config-lock {
  display: none;
}

.position-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.position-table {
  display: table;
  width: max-content;
  min-width: 980px;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.position-table th,
.position-table td {
  white-space: nowrap;
  border-right: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.position-table th:last-child,
.position-table td:last-child { border-right: 0; }

.position-table th:first-child,
.position-table td:first-child {
  width: 3.25rem;
  min-width: 3.25rem;
}

.position-table th.position-player-sticky,
.position-table td.position-player-sticky {
  position: sticky;
  left: 0;
  width: 14.25rem;
  min-width: 14.25rem;
  max-width: 14.25rem;
  z-index: 4;
}

/* Máscara neutra para a coluna fixa: evita que as colunas roladas vazem por
   baixo dela sem criar um destaque visual diferente para o jogador. */
.position-table td.position-player-sticky {
  background: #0b1120;
}

.position-table th.position-player-sticky {
  background: #0b1120;
}

.position-table th.position-match-source,
.position-table td.position-match-source {
  display: none !important;
}

.position-table thead th.position-player-sticky {
  z-index: 8;
}

.position-player-line {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem !important;
  width: 100%;
  min-width: 0;
}

.position-player-line > :first-child {
  grid-column: 1;
  min-width: 0;
}

.position-player-line > .position-game-inline {
  grid-column: 3;
  grid-row: 1;
}

.position-player-line > .min-w-0 {
  grid-column: 2;
  grid-row: 1;
  min-width: 2.8rem;
}

.position-game-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.15rem;
  min-width: 4.8rem;
  line-height: 1;
}

.position-game-side {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.position-game-side--home {
  transform: translateY(-0.12rem);
}

.position-game-side--away {
  transform: translateY(0.12rem);
}

.position-game-label {
  display: inline-block;
  overflow: hidden;
  max-width: 1.65rem;
  text-overflow: ellipsis;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.position-game-shields {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  line-height: 1;
}

.position-game-team--player {
  max-width: 7rem;
  color: var(--text-primary);
  font-weight: 600;
}

.position-game-team--opponent {
  color: var(--text-muted);
  opacity: 0.3;
  filter: grayscale(1);
}

.position-game-inline .position-game-shield,
.position-game-inline .position-game-shield-fallback {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.position-game-shield--opponent,
.position-game-shield-fallback.position-game-shield--opponent {
  opacity: 0.28;
  filter: grayscale(1);
}

.position-game-shield--player,
.position-game-shield-fallback.position-game-shield--player {
  opacity: 1;
  filter: none;
}

.position-game-shield {
  object-fit: contain;
}

.position-game-shield-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.36rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.position-game-inline-name {
  max-width: 1.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.position-game-inline-vs {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

/* Compactação exclusiva das páginas de posição em telas pequenas. */
@media (max-width: 640px) {
  body.position-page {
    font-size: 0.72rem;
  }

  body.position-page main > div {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 4rem !important;
  }

  body.position-page nav a,
  body.position-page nav button {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.62rem !important;
  }

  body.position-page .position-config-panel input,
  body.position-page .position-config-panel button {
    font-size: 0.62rem !important;
  }

  body.position-page .text-4xl {
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
  }

  body.position-page .text-lg {
    font-size: 0.78rem !important;
  }

  body.position-page .mb-8 {
    margin-bottom: 0.9rem !important;
  }

  body.position-page .mb-6 {
    margin-bottom: 0.65rem !important;
  }

  body.position-page .position-config-panel {
    border-radius: 0.75rem;
  }

  body.position-page .position-config-header {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem !important;
  }

  body.position-page .position-config-header h3 {
    font-size: 0.72rem !important;
  }

  body.position-page .position-config-header p {
    font-size: 0.58rem !important;
  }

  body.position-page .position-config-panel > form {
    padding: 0.55rem !important;
  }

  body.position-page .position-table-scroll {
    margin-inline: -0.25rem;
  }

  body.position-page .position-table {
    display: table;
    width: max-content;
    min-width: 560px;
    font-size: 0.58rem;
    table-layout: auto;
  }

  body.position-page .position-table thead {
    display: table-header-group;
  }

  body.position-page .position-table tbody {
    display: table-row-group;
  }

  body.position-page .position-table tr {
    display: table-row;
  }

  body.position-page .position-table th,
  body.position-page .position-table td {
    display: table-cell;
  }

  body.position-page .position-table th,
  body.position-page .position-table td {
    padding: 0.24rem 0.22rem !important;
  }

  body.position-page .position-table th:first-child,
  body.position-page .position-table td:first-child {
    width: 2.25rem;
    min-width: 2.25rem;
  }

  body.position-page .position-table th.position-player-sticky,
  body.position-page .position-table td.position-player-sticky {
    width: 10.9rem;
    min-width: 10.9rem;
    max-width: 10.9rem;
  }

  body.position-page .position-player-sticky > div {
    gap: 0.2rem !important;
  }

  body.position-page .position-player-sticky .w-7 {
    width: 1.35rem !important;
    height: 1.35rem !important;
  }

  body.position-page .position-player-sticky .w-5 {
    width: 1rem !important;
    height: 1rem !important;
  }

  body.position-page .position-player-sticky .text-xs,
  body.position-page .position-player-sticky .text-sm {
    font-size: 0.58rem !important;
  }

  body.position-page .position-game-inline {
    min-width: 3.95rem;
    gap: 0.08rem;
  }

  body.position-page .position-game-label {
    max-width: 1.15rem;
    font-size: 0.36rem;
  }

  body.position-page .position-game-shields {
    gap: 0.06rem;
  }

  body.position-page .position-game-inline .position-game-shield,
  body.position-page .position-game-inline .position-game-shield-fallback {
    width: 0.85rem;
    height: 0.85rem;
    flex-basis: 0.85rem;
    font-size: 0.3rem;
  }

  body.position-page .position-game-inline-name {
    max-width: 1.35rem;
    font-size: 0.39rem;
  }

  body.position-page .position-game-inline-vs {
    font-size: 0.5rem;
  }
}

/* --- Botões neutros da aplicação --- */
.aero-button-neutral,
.aero-button-details {
  background: rgba(51, 65, 85, 0.82) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.aero-button-neutral:hover:not(:disabled),
.aero-button-details:hover:not(:disabled) {
  background: rgba(71, 85, 105, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  transform: none !important;
}

.aero-button-details {
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
}

/* --- Tabelas legadas: rolagem horizontal sem empilhar células --- */
.aero-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

table.aero-responsive-table {
  display: table;
  border-collapse: collapse;
}

table.aero-responsive-table thead { display: table-header-group; }
table.aero-responsive-table tbody { display: table-row-group; }
table.aero-responsive-table tr { display: table-row; }
table.aero-responsive-table th,
table.aero-responsive-table td { display: table-cell; }

/* Componente de confronto usado nos perfis de peso. */
.profile-fixture-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.profile-fixture-rank {
  width: 1.1rem;
  flex: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.profile-fixture {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

.profile-fixture-weight {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Compactação global para celulares. Mantém controles tocáveis e desktop intacto. */
@media (max-width: 640px) {
  html {
    font-size: 10px;
  }

  body {
    line-height: 1.3;
  }

  body.aero-global-ui main > div,
  body.aero-global-ui main > section {
    max-width: 100%;
  }

  body.aero-global-ui main > .p-8,
  body.aero-global-ui main .p-8 {
    padding: 1rem !important;
  }

  body.aero-global-ui main > .p-6,
  body.aero-global-ui main .p-6 {
    padding: 0.85rem !important;
  }

  body.aero-global-ui main .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  body.aero-global-ui main .py-8 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  body.aero-global-ui main .gap-8 { gap: 1rem !important; }
  body.aero-global-ui main .gap-6 { gap: 0.8rem !important; }
  body.aero-global-ui main .space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem !important; }
  body.aero-global-ui main .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.8rem !important; }

  body.aero-global-ui .text-5xl {
    font-size: 2rem !important;
    line-height: 1.05 !important;
  }

  body.aero-global-ui .text-4xl {
    font-size: 1.7rem !important;
    line-height: 1.1 !important;
  }

  body.aero-global-ui .text-3xl {
    font-size: 1.45rem !important;
    line-height: 1.15 !important;
  }

  body.aero-global-ui [role="dialog"],
  body.aero-global-ui .fixed.inset-0 > div {
    max-width: calc(100vw - 1.2rem) !important;
    max-height: calc(100dvh - 1.2rem) !important;
  }

  body.aero-global-ui input:not([type="checkbox"]):not([type="radio"]),
  body.aero-global-ui select,
  body.aero-global-ui textarea {
    max-width: 100%;
    min-height: 3.2rem;
    padding: 0.65rem 0.8rem !important;
    font-size: 16px !important;
  }

  body.aero-global-ui button,
  body.aero-global-ui a[role="button"] {
    max-width: 100%;
  }

  .aero-table-scroll {
    width: 100%;
  }

  table.aero-responsive-table {
    width: max-content;
    min-width: 100%;
    font-size: 0.9rem;
    table-layout: auto;
  }

  table.aero-responsive-table th,
  table.aero-responsive-table td {
    padding: 0.45rem 0.55rem !important;
    vertical-align: middle;
  }

  .profile-fixture-row {
    gap: 0.22rem;
  }

  .profile-fixture-weight {
    font-size: 0.62rem;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Componentes administrativos e superfícies compartilhadas --- */
.aero-page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(.8rem, 2vw, 1.5rem);
}

.aero-surface {
  background: linear-gradient(145deg, rgba(17, 29, 48, .92), rgba(6, 14, 26, .94));
  border: 1px solid rgba(127, 191, 255, .14);
  border-radius: 1rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.aero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--neon-cyan);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.aero-button-primary,
.aero-button-neutral,
.aero-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2rem;
  padding: .45rem .7rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  color: #eaf8ff;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.aero-button-primary {
  color: #06141b;
  background: #57e2b1;
  border-color: rgba(144, 255, 215, .55);
}

.aero-button-primary:hover:not(:disabled) { background: #7af3c7; border-color: #b5ffe4; }
.aero-button-primary:disabled { cursor: not-allowed; opacity: .55; }
.aero-button-neutral { color: #b9cede; background: rgba(127, 191, 255, .06); border-color: rgba(127, 191, 255, .16); }
.aero-button-neutral:hover:not(:disabled) { color: #f2fbff; background: rgba(127, 191, 255, .13); border-color: rgba(127, 191, 255, .34); }
.aero-icon-button { width: 2rem; padding: .35rem; color: #a7bfd3; background: rgba(127, 191, 255, .06); border-color: rgba(127, 191, 255, .15); }
.aero-icon-button:hover { color: #fff; background: rgba(127, 191, 255, .14); }

/* Fotos */
.admin-photos-page { display: grid; gap: 1rem; }
.admin-photos-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; padding: clamp(1rem, 2vw, 1.5rem); }
.admin-photos-hero h1 { margin:.35rem 0 .3rem; color:#f3f8ff; font-size:clamp(1.3rem, 2.4vw, 2rem); letter-spacing:-.04em; }
.admin-photos-hero p { max-width: 48rem; margin:0; color:#8299ad; font-size:.78rem; line-height:1.5; }
.admin-photos-count { min-width:8rem; padding:.7rem .9rem; border-left:1px solid rgba(82,230,255,.34); text-align:right; }
.admin-photos-count strong { display:block; color:#e9faff; font-size:1.6rem; line-height:1; }
.admin-photos-count span { display:block; margin-top:.3rem; color:#71889d; font-size:.63rem; }
.admin-photos-filters { position:sticky; top:.7rem; z-index:8; padding: .85rem 1rem; }
.admin-photos-filter-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.8rem; }
.admin-photos-filter-heading strong { display:block; margin-top:.22rem; color:#e8f3fb; font-size:.78rem; }
.admin-photos-filter-grid { display:grid; grid-template-columns:minmax(11rem,1.2fr) repeat(3,minmax(8rem,1fr)) auto; align-items:end; gap:.65rem; }
.admin-photos-field { display:grid; gap:.28rem; min-width:0; }
.admin-photos-field > span { color:#829ab0; font-size:.62rem; font-weight:750; }
.admin-photos-field input,
.admin-photos-field select { width:100%; min-height:2.2rem; padding:.48rem .6rem; color:#e9f5ff; background:#0a1525; border:1px solid rgba(127,191,255,.14); border-radius:.5rem; outline:0; font:inherit; font-size:.72rem; }
.admin-photos-field input:focus,
.admin-photos-field select:focus { border-color:rgba(82,230,255,.58); box-shadow:0 0 0 3px rgba(82,230,255,.08); }
.admin-photos-input-wrap { position:relative; }
.admin-photos-input-wrap i { position:absolute; top:50%; left:.65rem; color:#5e788f; font-size:.68rem; transform:translateY(-50%); }
.admin-photos-input-wrap input { padding-left:1.8rem; }
.admin-photos-submit { min-height:2.2rem; white-space:nowrap; }
.admin-photos-sections { display:grid; gap:1rem; }
.admin-photos-section { overflow:hidden; }
.admin-photos-section-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem 1rem; border-bottom:1px solid rgba(127,191,255,.1); }
.admin-photos-section-head > div { display:flex; align-items:center; gap:.55rem; min-width:0; }
.admin-photos-section-index { display:grid; place-items:center; width:1.55rem; height:1.55rem; color:#6de9f8; background:rgba(82,230,255,.08); border:1px solid rgba(82,230,255,.16); border-radius:.4rem; font:700 .62rem/1 'JetBrains Mono',monospace; }
.admin-photos-section-head h2 { margin:0; color:#edf6ff; font-size:.88rem; }
.admin-photos-section-total { min-width:1.35rem; padding:.17rem .4rem; color:#96aac0; background:rgba(148,163,184,.1); border-radius:99px; font-size:.62rem; text-align:center; }
.admin-photos-section-note { color:#6f879d; font-size:.62rem; }
.admin-photos-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(9rem,1fr)); gap:.55rem; padding:.75rem; }
.admin-photo-card { position:relative; display:grid; justify-items:center; min-width:0; padding:.75rem .55rem .6rem; border:1px solid rgba(127,191,255,.1); border-radius:.75rem; background:rgba(4,14,27,.48); transition:border-color .18s ease, background-color .18s ease; }
.admin-photo-card:hover { border-color:rgba(82,230,255,.35); background:rgba(15,34,53,.68); }
.admin-photo-preview { position:relative; display:grid; place-items:center; width:4.5rem; height:4.5rem; overflow:hidden; padding:0; border:1px solid rgba(127,191,255,.22); border-radius:50%; color:#5de4f2; background:rgba(82,230,255,.09); cursor:pointer; }
.admin-photo-preview img { width:100%; height:100%; object-fit:cover; }
.admin-photo-fallback { font-size:.9rem; font-weight:850; letter-spacing:.04em; }
.admin-photo-edit-hint { position:absolute; right:.1rem; bottom:.1rem; display:grid; place-items:center; width:1.25rem; height:1.25rem; color:#06141b; background:#62e6c1; border:2px solid #0c1727; border-radius:50%; font-size:.55rem; opacity:0; transform:scale(.8); transition:opacity .18s ease, transform .18s ease; }
.admin-photo-card:hover .admin-photo-edit-hint, .admin-photo-preview:focus-visible .admin-photo-edit-hint { opacity:1; transform:scale(1); }
.admin-photo-copy { width:100%; min-width:0; margin-top:.55rem; text-align:center; }
.admin-photo-copy strong { display:block; overflow:hidden; color:#e8f2fb; font-size:.7rem; text-overflow:ellipsis; white-space:nowrap; }
.admin-photo-copy span { display:block; overflow:hidden; margin-top:.2rem; color:#71889e; font-size:.58rem; text-overflow:ellipsis; white-space:nowrap; }
.admin-photo-copy b { color:#aed1e3; font-weight:800; }
.admin-photo-edit { min-height:1.65rem; margin-top:.55rem; padding:.25rem .5rem; font-size:.59rem; }
.admin-photo-status { display:inline-flex; align-items:center; gap:.25rem; margin-top:.45rem; color:#d5a65e; font-size:.56rem; }
.admin-photo-status.is-loaded { color:#66e4af; }
.admin-photo-status i { font-size:.48rem; }
.admin-photos-empty { display:grid; justify-items:center; gap:.35rem; padding:3rem 1rem; color:#8097aa; text-align:center; }
.admin-photos-empty i { color:#5de2ed; font-size:1.6rem; }
.admin-photos-empty strong { color:#eaf4fc; font-size:.9rem; }
.admin-photos-empty span { font-size:.72rem; }
.admin-photo-modal { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:1rem; }
.admin-photo-modal[hidden] { display:none; }
.admin-photo-modal-backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgba(2,7,14,.78); backdrop-filter:blur(6px); cursor:default; }
.admin-photo-dialog { position:relative; width:min(100%,27rem); padding:1rem; }
.admin-photo-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; padding-bottom:.8rem; border-bottom:1px solid rgba(127,191,255,.11); }
.admin-photo-dialog-head h2 { margin:.3rem 0 0; color:#edf7ff; font-size:1rem; }
.admin-photo-dialog-preview { display:grid; place-items:center; width:7rem; height:7rem; margin:1rem auto; overflow:hidden; color:#5de4f2; background:rgba(82,230,255,.09); border:1px solid rgba(82,230,255,.25); border-radius:1rem; font-weight:850; }
.admin-photo-dialog-preview img { width:100%; height:100%; object-fit:cover; }
.admin-photos-field small { color:#6f879c; font-size:.58rem; line-height:1.4; }
.admin-photo-form-error { margin:.6rem 0 0; padding:.5rem .6rem; color:#ffb4bd; background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.2); border-radius:.45rem; font-size:.65rem; }
.admin-photo-dialog-actions { display:flex; justify-content:flex-end; gap:.5rem; margin-top:1rem; padding-top:.8rem; border-top:1px solid rgba(127,191,255,.11); }
body.photo-modal-open { overflow:hidden; }

/* Gerenciar times */
.team-manager-page { display:grid; gap:1rem; width:100%; max-width:none; padding:clamp(.8rem,2vw,1.5rem); }
.team-manager-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; padding:clamp(1rem,2vw,1.5rem); }
.team-manager-hero h1 { margin:.35rem 0 .3rem; color:#eef7ff; font-size:clamp(1.4rem,2.7vw,2.2rem); letter-spacing:-.05em; }
.team-manager-hero p { margin:0; color:#8299ad; font-size:.78rem; }
.team-manager-hero-actions { display:flex; align-items:center; gap:.6rem; }
.team-manager-limit { padding:.7rem .85rem; border:1px solid rgba(127,191,255,.13); border-radius:.65rem; text-align:right; }
.team-manager-limit strong { display:block; color:#eaf7ff; font:700 1rem/1 'JetBrains Mono',monospace; }
.team-manager-limit span { display:block; margin-top:.25rem; color:#71899e; font-size:.58rem; }
.team-manager-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(19rem,1fr)); gap:.85rem; }
.team-manager-card { position:relative; display:flex; flex-direction:column; min-width:0; overflow:hidden; padding:1rem; }
.team-manager-card.is-selected { border-color:rgba(92,242,165,.5); box-shadow:0 0 0 1px rgba(92,242,165,.1), 0 14px 34px rgba(0,0,0,.16); }
.team-manager-card.is-locked { opacity:.72; }
.team-manager-card-head { display:flex; align-items:center; gap:.7rem; min-width:0; padding-bottom:.85rem; border-bottom:1px solid rgba(127,191,255,.1); }
.team-manager-shield { display:grid; place-items:center; width:3.2rem; height:3.2rem; flex:0 0 3.2rem; overflow:hidden; color:#5de4f2; background:rgba(82,230,255,.08); border:1px solid rgba(82,230,255,.2); border-radius:.75rem; }
.team-manager-shield img { width:100%; height:100%; object-fit:contain; }
.team-manager-card-title { min-width:0; }
.team-manager-card-title h2 { overflow:hidden; margin:0; color:#edf6ff; font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
.team-manager-card-title p { margin:.28rem 0 0; color:#71899f; font-size:.62rem; }
.team-manager-status { display:inline-flex; align-items:center; gap:.25rem; margin-left:auto; padding:.25rem .45rem; color:#66e4af; background:rgba(92,242,165,.08); border:1px solid rgba(92,242,165,.18); border-radius:99px; font-size:.56rem; font-weight:800; white-space:nowrap; }
.team-manager-status.error { color:#ffb2bc; background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.2); }
.team-manager-status.locked { color:#d4ad68; background:rgba(245,158,11,.08); border-color:rgba(245,158,11,.18); }
.team-manager-meta { display:grid; grid-template-columns:1fr 1fr; gap:.55rem; margin-top:1rem; }
.team-manager-meta div { padding:.55rem .6rem; background:rgba(3,12,23,.45); border:1px solid rgba(127,191,255,.08); border-radius:.5rem; }
.team-manager-meta span { display:block; color:#617c93; font-size:.56rem; text-transform:uppercase; letter-spacing:.06em; }
.team-manager-meta strong { display:block; margin-top:.25rem; color:#dbeaf5; font:600 .68rem/1 'JetBrains Mono',monospace; }
.team-manager-error { margin-top:.75rem; padding:.6rem .7rem; color:#f2bbc1; background:rgba(239,68,68,.07); border:1px solid rgba(239,68,68,.18); border-radius:.5rem; font-size:.63rem; line-height:1.4; }
.team-manager-actions { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:auto; padding-top:1rem; }
.team-manager-actions .aero-button-neutral { flex:1 1 8rem; }
.team-manager-action-danger { color:#ffb0ba; border-color:rgba(239,68,68,.22); background:rgba(239,68,68,.06); }
.team-manager-action-danger:hover { color:#ffecef; background:rgba(239,68,68,.14); border-color:rgba(239,68,68,.4); }
.team-manager-add { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:14rem; padding:1.25rem; color:#7b94a8; border-style:dashed; text-align:center; text-decoration:none; }
.team-manager-add i { display:grid; place-items:center; width:3rem; height:3rem; margin-bottom:.7rem; color:#66e4af; background:rgba(92,242,165,.08); border:1px solid rgba(92,242,165,.2); border-radius:.8rem; font-size:1.2rem; }
.team-manager-add strong { color:#e2f2fb; font-size:.8rem; }
.team-manager-add span { max-width:16rem; margin-top:.35rem; font-size:.65rem; line-height:1.45; }
.team-manager-empty { display:grid; justify-items:center; gap:.45rem; padding:3rem 1rem; color:#7f97aa; text-align:center; }
.team-manager-empty i { color:#5de4f2; font-size:1.6rem; }
.team-manager-empty strong { color:#eaf5fc; font-size:.9rem; }
.team-manager-empty span { font-size:.7rem; }

/* Garantia de fim de rolagem em tabelas largas: a última coluna ganha uma
   margem real no conteúdo rolável, inclusive no Safari mobile. */
.position-table-scroll,
.aero-table-scroll {
  padding-inline-end: 1rem;
  scroll-padding-inline-end: 1rem;
  -webkit-overflow-scrolling: touch;
}
.position-table,
table.aero-responsive-table { margin-inline-end: 1rem; }
.position-game-team--opponent { color: #a4b4c3; opacity: .62; filter: grayscale(.62); }
.position-game-shield--opponent,
.position-game-shield-fallback.position-game-shield--opponent { opacity: .56; filter: grayscale(.62); }

@media (max-width: 700px) {
  .admin-photos-hero, .team-manager-hero { align-items:flex-start; flex-direction:column; }
  .admin-photos-count, .team-manager-hero-actions { width:100%; text-align:left; }
  .admin-photos-count { padding:.55rem 0 0; border-top:1px solid rgba(82,230,255,.18); border-left:0; }
  .admin-photos-filter-grid { grid-template-columns:1fr 1fr; }
  .admin-photos-field-search { grid-column:1 / -1; }
  .admin-photos-submit { width:100%; }
  .admin-photos-grid { grid-template-columns:repeat(auto-fill,minmax(7.5rem,1fr)); }
  .team-manager-grid { grid-template-columns:1fr; }
}

@media (max-width: 430px) {
  .admin-photos-page, .team-manager-page { padding:.55rem; }
  .admin-photos-filter-grid { grid-template-columns:1fr; }
  .admin-photos-field-search { grid-column:auto; }
  .admin-photos-filters { top:.35rem; }
  .admin-photos-grid { grid-template-columns:repeat(3,minmax(0,1fr)); padding:.5rem; gap:.35rem; }
  .admin-photo-card { padding:.55rem .3rem .45rem; }
  .admin-photo-preview { width:3.35rem; height:3.35rem; }
  .admin-photo-copy strong { font-size:.62rem; }
  .admin-photo-copy span, .admin-photo-status { font-size:.5rem; }
  .admin-photo-edit { width:100%; padding:.2rem .25rem; font-size:.52rem; }
  .team-manager-hero-actions { align-items:stretch; flex-direction:column; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 4px rgba(0, 229, 255, 0.3); }
  100% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.55); }
}

@keyframes neonPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scanLine {
  0%   { transform: translateY(-100%); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.35s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite alternate;
}

.animate-neon-pulse {
  animation: neonPulse 2s ease-in-out infinite;
}

/* --- Glass Shimmer Effect --- */
.glass-shimmer {
  position: relative;
  overflow: hidden;
}

.glass-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(0, 229, 255, 0.04) 45%,
    rgba(68, 148, 255, 0.06) 50%,
    rgba(0, 229, 255, 0.04) 55%,
    transparent 60%
  );
  animation: shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* --- Neon Scan Line (on hover) --- */
.neon-scan {
  position: relative;
  overflow: hidden;
}

.neon-scan::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.4), transparent);
  animation: scanLine 3s ease-in-out infinite paused;
  pointer-events: none;
  z-index: 1;
}

.neon-scan:hover::before {
  animation-play-state: running;
}

/* --- Backdrop blur utilities (for browsers that need it) --- */
@supports not (backdrop-filter: blur(1px)) {
  .glass,
  .glass-heavy,
  .glass-light {
    background: rgba(6, 11, 20, 0.92);
  }
}

/* --- Focus ring (neon) --- */
.neon-focus:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2),
              0 0 15px rgba(0, 229, 255, 0.08);
}

/* --- Sidebar specific styles --- */
.sidebar-link {
  position: relative;
  transition: all 0.2s ease;
}

.sidebar-link::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--neon-cyan);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s ease;
}

.sidebar-link.active::after {
  transform: translateY(-50%) scaleY(1);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.sidebar-link.active {
  background: rgba(0, 229, 255, 0.06);
  box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.04);
}

/* --- Logo icon glow --- */
.logo-icon {
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25),
              0 0 24px rgba(68, 148, 255, 0.12);
}

/* --- Plan badge styles --- */
.plan-badge-free {
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.plan-badge-avancado {
  background: rgba(0, 229, 255, 0.10);
  color: #00E5FF;
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.plan-badge-pro {
  background: rgba(168, 85, 247, 0.10);
  color: #A855F7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* --- Flash message styles --- */
.flash-error {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
}
.flash-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.08);
}
.flash-info {
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid #00E5FF;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.08);
}
.flash-success {
  background: rgba(0, 255, 136, 0.08);
  border-left: 3px solid #00FF88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.08);
}

/* --- Footer --- */
.footer-glass {
  background: rgba(6, 11, 20, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 229, 255, 0.06);
}

/* --- Divider line --- */
.divider-neon {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.1), transparent);
}

/* --- Mobile top bar --- */
.mobile-topbar {
  background: rgba(6, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

/* --- Utility: delay animations for staggered children --- */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
/* Rankings: números simples no top 3, sem medalhas ou fundos chamativos. */
.position-rank-number { display:inline-grid; place-items:center; width:1.5rem; height:1.5rem; border-radius:50%; color:#8da3ba; background:rgba(30,49,72,.42); font:700 .72rem 'JetBrains Mono',monospace; }
.position-rank-number.position-rank-top { color:#dceefa; border:1px solid rgba(82,230,255,.32); background:rgba(82,230,255,.08); }

/* Ações compartilhadas, inclusive elementos criados dinamicamente pela sidebar. */
.aero-button-details,
.aero-sidebar-action,
button[class*="from-blue-500"] {
  border:1px solid rgba(82,230,255,.28) !important;
  border-radius:8px !important;
  color:#d9f7ff !important;
  background:rgba(82,230,255,.08) !important;
  box-shadow:none !important;
}
.aero-button-details:hover,
.aero-sidebar-action:hover,
button[class*="from-blue-500"]:hover { border-color:rgba(82,230,255,.55) !important; background:rgba(82,230,255,.15) !important; }
.aero-sidebar-action { display:block; color:#9ceff7 !important; }
.aero-sidebar-action::before { content:none; }
.aero-sidebar-batch-action { display:grid; grid-template-columns:1.85rem minmax(0,1fr) auto; align-items:center; gap:.5rem; width:100%; padding:.55rem .5rem; border:1px solid rgba(82,230,255,.28); border-radius:9px; color:#d9f7ff; background:rgba(82,230,255,.08); text-align:left; transition:border-color .18s,background .18s,transform .18s; }
.aero-sidebar-batch-action:hover:not(:disabled) { border-color:rgba(82,230,255,.6); background:rgba(82,230,255,.15); transform:translateY(-1px); }
.aero-sidebar-batch-action:disabled { opacity:.55; cursor:not-allowed; }
.aero-sidebar-batch-icon { display:grid; place-items:center; width:1.85rem; height:1.85rem; border:1px solid rgba(92,242,165,.25); border-radius:7px; color:#5cf2a5; background:rgba(92,242,165,.1); }
.aero-sidebar-batch-copy { min-width:0; }.aero-sidebar-batch-copy strong,.aero-sidebar-batch-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.aero-sidebar-batch-copy strong { color:#e7fbff; font-size:.68rem; }.aero-sidebar-batch-copy small { margin-top:.12rem; color:#7994a9; font-size:.53rem; }.aero-sidebar-batch-arrow { color:#6c8da2; font-size:.62rem; }

.batch-escalation-modal { position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; padding:1rem; background:rgba(3,8,17,.78); backdrop-filter:blur(9px); }
.batch-escalation-sheet { width:min(680px,100%) !important; max-height:90vh !important; overflow:auto !important; padding:1.25rem !important; border:1px solid rgba(82,230,255,.2) !important; border-radius:16px !important; background:#0b1727 !important; box-shadow:0 22px 70px rgba(0,0,0,.5) !important; }
.batch-close { width:2rem; height:2rem; border:1px solid rgba(148,163,184,.18) !important; border-radius:7px; color:#9db1c4 !important; background:rgba(148,163,184,.06) !important; }.batch-close:hover { color:#fff !important; border-color:rgba(82,230,255,.5) !important; }
.batch-progress-track { height:6px !important; border-radius:99px !important; background:rgba(148,163,184,.12) !important; }.batch-progress-bar { background:linear-gradient(90deg,#52e6ff,#5cf2a5) !important; box-shadow:none !important; }
.batch-stage { margin:.7rem 0; padding:.55rem .65rem; border-left:2px solid #52e6ff; color:#b9d4e3; background:rgba(82,230,255,.05); font-size:.7rem; }
.batch-teams { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; max-height:170px; overflow:auto; margin-bottom:.7rem; }
.batch-team { display:grid; grid-template-columns:1.2rem minmax(0,1fr) auto; align-items:center; gap:.35rem; padding:.45rem .5rem; border:1px solid rgba(148,163,184,.12); border-radius:7px; color:#9db1c4; background:rgba(3,13,25,.55); font-size:.65rem; }.batch-team strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.batch-team small { color:#718ba4; font-size:.55rem; }.batch-team-status { color:#52e6ff; }.batch-team.success { color:#b9f7d1; border-color:rgba(92,242,165,.26); }.batch-team.success .batch-team-status { color:#5cf2a5; }.batch-team.error { color:#ffc1c8; border-color:rgba(248,113,113,.3); }.batch-team.error .batch-team-status { color:#ff8f9d; }
.batch-logs { max-height:220px !important; padding:.75rem !important; border:1px solid rgba(148,163,184,.12) !important; border-radius:9px !important; background:rgba(1,8,14,.72) !important; color:#91a9bc; font: .66rem/1.5 'JetBrains Mono',monospace !important; }
.batch-log-entry { margin-bottom:.25rem; color:#9db1c4; }.batch-log-entry.success { color:#8effc1; }.batch-log-entry.error { color:#ff9aa5; }.batch-log-entry.warning { color:#ffd878; }
.batch-finish-button { width:100%; margin-top:.8rem; min-height:2.2rem; border:1px solid rgba(92,242,165,.3) !important; border-radius:8px !important; color:#aaf4c4 !important; background:rgba(92,242,165,.08) !important; font-size:.72rem !important; }.batch-finish-button:hover { background:rgba(92,242,165,.15) !important; }
.batch-teams { max-height:none; overflow:visible; }
.batch-team { grid-template-columns:1rem minmax(0,1fr) auto; gap:.3rem; padding:.35rem .42rem; }
.batch-team-status { font-size:.72rem; }
.availability-controls { position:sticky; top:0; z-index:24; background:rgba(11,17,32,.96) !important; backdrop-filter:blur(12px); }
.availability-tab { min-height:2rem; padding:.42rem .7rem; border:1px solid rgba(148,163,184,.16); border-radius:7px; color:#9db1c4; background:rgba(148,163,184,.05); font-size:.7rem; transition:border-color .18s,background .18s,color .18s; }
.availability-tab:hover { color:#e7faff; border-color:rgba(82,230,255,.42); }.availability-tab.active { color:#e7faff; border-color:rgba(82,230,255,.55); background:rgba(82,230,255,.11); }

@media (min-width: 1024px) {
  body.app-authenticated main > .w-full { max-width:none; }
  body.app-authenticated main > .w-full > .max-w-7xl,
  body.app-authenticated main > .w-full > .max-w-6xl,
  body.app-authenticated main > .w-full > .max-w-5xl { max-width:none !important; width:100%; margin-left:0 !important; margin-right:0 !important; }
  body.app-authenticated main > .w-full > .animate-fade-in > .max-w-7xl,
  body.app-authenticated main > .w-full > .animate-fade-in > .max-w-6xl,
  body.app-authenticated main > .w-full > .animate-fade-in > .max-w-5xl,
  body.app-authenticated main > .w-full > .animate-fade-in > .max-w-4xl { max-width:none !important; width:100%; margin-left:0 !important; margin-right:0 !important; }
  body.app-authenticated .dashboard-page,
  body.app-authenticated .scx-page,
  body.app-authenticated #availabilityPage,
  body.app-authenticated #escalacaoIdealPage { width:100%; max-width:none !important; }
}

/* Auditoria mobile: as páginas mantêm a estrutura de tabela e rolam somente
   quando necessário, em vez de empilhar cada célula em uma coluna ilegível. */
@media (max-width: 640px) {
  body.aero-global-ui main > .w-full { padding-left:.55rem !important; padding-right:.55rem !important; }
  body.aero-global-ui main > .w-full > .animate-fade-in > main,
  body.aero-global-ui main > .w-full > .animate-fade-in > #availabilityPage { width:100%; max-width:none; padding-left:.55rem !important; padding-right:.55rem !important; }
  body.aero-global-ui .aero-table-scroll { max-width:100%; overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain; }
  body.aero-global-ui table.aero-responsive-table { display:table; width:max-content; min-width:100%; font-size:.62rem; table-layout:auto; }
  body.aero-global-ui table.aero-responsive-table th,
  body.aero-global-ui table.aero-responsive-table td { white-space:nowrap; padding:.3rem .35rem !important; }
  body.aero-global-ui .batch-teams { grid-template-columns:1fr; }
  body.aero-global-ui .availability-controls { margin-inline:-.1rem; padding:.65rem !important; }
}

/* Módulos: no celular os cards deixam de ocupar uma coluna inteira. Isso
   reduz a área visual sem esconder os textos e mantém a navegação tocável. */
.modules-page { width:100%; max-width:none; }
.modules-grid { width:100%; }
@media (max-width: 640px) {
  body.aero-global-ui #modulesPage { padding-inline:.15rem; }
  body.aero-global-ui #modulesPage > .text-center { margin-bottom:1rem; }
  body.aero-global-ui #modulesPage > .text-center h1 { font-size:1.45rem; }
  body.aero-global-ui #modulesPage > .text-center p { font-size:.68rem; }
  body.aero-global-ui #modulesPage .modules-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
  body.aero-global-ui #modulesPage .modulo-card,
  body.aero-global-ui #modulesPage .modules-grid > div { border-radius:.8rem; }
  body.aero-global-ui #modulesPage .modules-grid [class*="aspect-\[4\/3\]"] { aspect-ratio:1 / .82; }
  body.aero-global-ui #modulesPage .modules-grid .p-3 { padding:.55rem; }
  body.aero-global-ui #modulesPage .modules-grid h3 { font-size:.72rem; }
  body.aero-global-ui #modulesPage .modules-grid p { font-size:.58rem; line-height:1.35; }
  body.aero-global-ui #modulesPage .modules-grid .mt-2 { margin-top:.4rem; font-size:.58rem; }
  body.aero-global-ui #modulesPage .status-badge { top:.35rem; right:.35rem; padding:.15rem .3rem; font-size:.43rem; }
  body.aero-global-ui #modulesPage > .mt-10 { margin-top:1.15rem; padding:.75rem; }
  body.aero-global-ui #modulesPage > .mt-10 h3 { font-size:.75rem; }
  body.aero-global-ui #modulesPage > .mt-10 p { font-size:.58rem; }
}
@media (max-width: 420px) {
  body.aero-global-ui #modulesPage .modules-grid { grid-template-columns:1fr 1fr; gap:.4rem; }
  body.aero-global-ui #modulesPage .modules-grid .p-3 { padding:.45rem; }
  body.aero-global-ui #modulesPage .modules-grid h3 { font-size:.65rem; }
}

/* Sidebar: a navegação precisa caber na altura disponível. A densidade é
   reduzida progressivamente em telas baixas para não criar uma segunda
   página rolável dentro da aplicação. */
#sidebar {
  display: flex !important;
  width: clamp(220px, 15vw, 270px) !important;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  --sidebar-density: 1;
}
#sidebar > nav {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden !important;
  padding-top: calc(.75rem * var(--sidebar-density)) !important;
  padding-bottom: calc(.75rem * var(--sidebar-density)) !important;
  gap: calc(.75rem * var(--sidebar-density)) !important;
}
#sidebar > nav > div { margin-bottom: 0 !important; }
#sidebar .sidebar-link {
  min-height: calc(1.9rem * var(--sidebar-density));
  padding-top: calc(.28rem * var(--sidebar-density)) !important;
  padding-bottom: calc(.28rem * var(--sidebar-density)) !important;
  font-size: calc(.875rem * var(--sidebar-density)) !important;
}
#sidebar .sidebar-link i { margin-right: calc(.65rem * var(--sidebar-density)) !important; }
#sidebar > nav p {
  margin-top: 0 !important;
  margin-bottom: calc(.3rem * var(--sidebar-density)) !important;
  font-size: calc(.625rem * var(--sidebar-density)) !important;
}
#sidebar > div:first-child {
  flex: 0 0 auto;
  padding-top: calc(.75rem * var(--sidebar-density)) !important;
  padding-bottom: calc(.5rem * var(--sidebar-density)) !important;
}
#sidebar > div:first-child img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: clamp(110px, calc(19vh * var(--sidebar-density)), 190px);
  margin-inline: auto;
}
#sidebar > div:nth-of-type(2) {
  flex: 0 0 auto;
  padding-top: calc(.55rem * var(--sidebar-density)) !important;
  padding-bottom: calc(.55rem * var(--sidebar-density)) !important;
}
#sidebar > div:nth-of-type(2) .w-9 { width: calc(2.25rem * var(--sidebar-density)) !important; height: calc(2.25rem * var(--sidebar-density)) !important; }
#sidebar > div:last-child {
  flex: 0 0 auto;
  padding-top: calc(.42rem * var(--sidebar-density)) !important;
  padding-bottom: calc(.42rem * var(--sidebar-density)) !important;
}
#timesListContainer { max-height:none !important; overflow:visible !important; }
#timesList { min-width: 0; }
#timesList > .sidebar-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.65rem, 1fr));
  gap: calc(.32rem * var(--sidebar-density));
  padding-inline: calc(.35rem * var(--sidebar-density));
}
#timesList .sidebar-team-item {
  position: relative;
  min-width: 0;
  min-height: calc(4.35rem * var(--sidebar-density));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(.18rem * var(--sidebar-density));
  padding: calc(.25rem * var(--sidebar-density));
  border: 1px solid transparent;
  border-radius: .55rem;
  color: #a7b7c9;
  background: rgba(17,27,46,.34);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
#timesList .sidebar-team-item:hover { color: #f4fbff; background: rgba(0,229,255,.08); border-color: rgba(0,229,255,.18); transform: translateY(-1px); }
#timesList .sidebar-team-item.is-selected { color: #e7fbff; background: rgba(0,229,255,.11); border-color: rgba(0,229,255,.38); box-shadow: 0 0 10px rgba(0,229,255,.06); }
#timesList .team-shield-sidebar {
  width: calc(2.15rem * var(--sidebar-density));
  height: calc(2.15rem * var(--sidebar-density));
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .45rem;
}
#timesList .sidebar-team-shield-image { width: 100%; height: 100%; object-fit: contain; image-rendering: -webkit-optimize-contrast; }
#timesList .sidebar-team-name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: calc(.56rem * var(--sidebar-density));
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#timesList .sidebar-team-check {
  position: absolute;
  top: .16rem;
  right: .16rem;
  display: grid;
  place-items: center;
  width: .82rem;
  height: .82rem;
  border-radius: 999px;
  color: #07131c;
  background: #5cf2a5;
  font-size: .42rem;
}
#timesList .sidebar-team-error {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(248,113,113,.4);
  border-radius: .45rem;
  color: #f87171;
  background: rgba(239,68,68,.12);
}
#timesList .aero-sidebar-batch-action { margin-bottom: calc(.35rem * var(--sidebar-density)) !important; padding-block: calc(.4rem * var(--sidebar-density)); }

@media (min-width: 1024px) {
  body.app-authenticated main.lg\:ml-64,
  body.app-authenticated footer.lg\:ml-64,
  body main[class~="lg:ml-64"],
  body footer[class~="lg:ml-64"] { margin-left: clamp(220px, 15vw, 270px) !important; }
}

@media (max-width: 1023px) {
  #sidebar { width: min(86vw, 300px) !important; }
}

@media (max-height: 760px) and (min-width: 1024px) {
  #sidebar { --sidebar-density: .84; }
}
@media (max-height: 650px) and (min-width: 1024px) {
  #sidebar { --sidebar-density: .72; }
  #sidebar > div:first-child img { max-height: 72px; }
}
@media (max-height: 560px) and (min-width: 1024px) {
  #sidebar { --sidebar-density: .63; }
  #sidebar > div:first-child img { max-height: 62px; }
}

/* A marca ocupa toda a área reservada do cabeçalho. A arte tem fundo próprio,
   então o encaixe intencionalmente preenche largura e altura sem preservar a
   caixa quadrada original. */
#sidebar > div:first-child {
  height: clamp(138px, 22vh, 220px);
  padding: 0 !important;
  overflow: hidden;
}
#sidebar > div:first-child > a {
  display: block;
  width: 100%;
  height: 100%;
}
#sidebar > div:first-child img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  object-fit: fill !important;
}

/* Navegação compacta entre os módulos de posição. Ela fica logo abaixo do
   cabeçalho da página e continua navegável horizontalmente em telas estreitas. */
.module-position-nav {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  margin: -1rem 0 1.35rem;
  padding: .45rem;
  overflow-x: auto;
  border: 1px solid rgba(77, 153, 204, .18);
  border-radius: .85rem;
  background: linear-gradient(135deg, rgba(11, 24, 42, .9), rgba(8, 18, 32, .8));
  box-shadow: 0 9px 24px rgba(0, 0, 0, .16);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, .3) transparent;
}
.module-position-nav-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
  padding: 0 .35rem 0 .5rem;
  color: #7f9ab0;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.module-position-nav-label i { color: #00e5ff; font-size: .72rem; }
.module-position-nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: max-content;
}
.module-position-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2rem;
  padding: .28rem .58rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  color: #9aafc2;
  background: rgba(255, 255, 255, .025);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.module-position-nav-link img {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  object-fit: contain;
  border-radius: .35rem;
}
.module-position-nav-link:hover,
.module-position-nav-link:focus-visible {
  color: #effcff;
  border-color: rgba(0, 229, 255, .28);
  background: rgba(0, 229, 255, .08);
  outline: none;
  transform: translateY(-1px);
}
.module-position-nav-link.is-active {
  color: #eaffff;
  border-color: rgba(0, 229, 255, .5);
  background: linear-gradient(135deg, rgba(0, 229, 255, .16), rgba(68, 148, 255, .12));
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .05), 0 0 16px rgba(0, 229, 255, .08);
}
@media (max-width: 640px) {
  .module-position-nav { margin: -.55rem 0 1rem; padding: .35rem; gap: .35rem; }
  .module-position-nav-label { display: none; }
  .module-position-nav-link { min-height: 2.25rem; padding-inline: .5rem; font-size: .64rem; }
}

/* Dropdown nativo padronizado do design system. Mantemos o select para que
   teclado, leitor de tela e o seletor nativo do celular continuem funcionando. */
select.aero-select {
  width: 100%;
  min-height: 2.35rem;
  padding: .52rem 2.05rem .52rem .72rem !important;
  border: 1px solid rgba(91, 155, 201, .26) !important;
  border-radius: .58rem !important;
  color: #e7f7ff !important;
  background-color: #0b1727 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2379d9e8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .72rem center !important;
  background-size: .72rem auto !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 4px 12px rgba(0, 0, 0, .12);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
select.aero-select:hover { border-color: rgba(0, 229, 255, .46) !important; background-color: #0e1d31 !important; }
select.aero-select:focus-visible {
  border-color: #00d9ef !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .13), inset 0 1px 0 rgba(255, 255, 255, .025);
}
select.aero-select option { color: #e7f7ff; background: #0b1727; }
select.aero-select:disabled { cursor: not-allowed; opacity: .58; }
@media (max-width: 640px) {
  select.aero-select { min-height: 2.7rem; font-size: .8rem; }
}

/* Segunda camada visual dos dropdowns: arredondamento maior, contraste em
   profundidade e um foco mais próximo dos cards do Aero Cartola. */
select.aero-select {
  min-height: 2.55rem;
  border-radius: .78rem !important;
  background-color: #0b192b !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 7px 18px rgba(0, 0, 0, .16);
}
select.aero-select:hover {
  background-color: #10243a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .065), 0 8px 20px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 229, 255, .05);
}

/* Dropdown aberto controlado pelo Aero Cartola. O select original continua
   no DOM e sincronizado, mas a lista aberta deixa de depender do sistema
   operacional e passa a usar o mesmo acabamento dos demais painéis. */
.aero-dropdown {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 20;
}
.aero-dropdown > select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.aero-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  width: 100%;
  min-height: 2.55rem;
  padding: .62rem .78rem;
  border: 1px solid rgba(91, 155, 201, .26);
  border-radius: .78rem;
  color: #e7f7ff;
  background: linear-gradient(135deg, rgba(12, 31, 51, .98), rgba(7, 20, 35, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 7px 18px rgba(0, 0, 0, .16);
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.aero-dropdown-trigger:hover,
.aero-dropdown.is-open .aero-dropdown-trigger,
.aero-dropdown-trigger:focus-visible {
  border-color: rgba(103, 232, 249, .7);
  background: linear-gradient(135deg, rgba(17, 51, 75, .99), rgba(8, 28, 47, .99));
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px rgba(0, 0, 0, .22);
  outline: none;
}
.aero-dropdown-trigger:active { transform: translateY(1px); }
.aero-dropdown-trigger:disabled { cursor: not-allowed; opacity: .55; }
.aero-dropdown-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aero-dropdown-chevron { flex: 0 0 auto; color: #78eaf5; font-size: .68rem; transition: transform .18s ease; }
.aero-dropdown.is-open .aero-dropdown-chevron { transform: rotate(180deg); }
.aero-dropdown-menu {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(18rem, 45vh);
  padding: .35rem;
  overflow-y: auto;
  border: 1px solid rgba(103, 232, 249, .36);
  border-radius: .85rem;
  background: linear-gradient(150deg, rgba(12, 31, 51, .99), rgba(5, 15, 28, .995));
  box-shadow: 0 20px 40px rgba(0, 0, 0, .46), 0 0 0 1px rgba(255, 255, 255, .035), 0 0 24px rgba(0, 229, 255, .08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px) scale(.985);
  transform-origin: top center;
  transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, .38) transparent;
}
.aero-dropdown.is-open { z-index: 300; }
.aero-dropdown.is-open .aero-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.aero-dropdown-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.3rem;
  padding: .55rem .68rem;
  border: 1px solid transparent;
  border-radius: .58rem;
  color: #a8bfd0;
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: color .14s ease, background .14s ease, border-color .14s ease;
}
.aero-dropdown-option:hover,
.aero-dropdown-option:focus-visible {
  color: #effcff;
  border-color: rgba(0, 229, 255, .2);
  background: rgba(0, 229, 255, .1);
  outline: none;
}
.aero-dropdown-option.is-selected {
  color: #eaffff;
  border-color: rgba(103, 232, 249, .3);
  background: linear-gradient(90deg, rgba(0, 229, 255, .16), rgba(68, 148, 255, .08));
}
.aero-dropdown-option.is-selected::before {
  content: '\f00c';
  margin-right: .45rem;
  color: #63f0ba;
  font-family: 'Font Awesome 6 Free';
  font-size: .64rem;
  font-weight: 900;
}
.aero-dropdown-option:disabled { cursor: not-allowed; opacity: .38; }
.aero-dropdown.is-strategy .aero-dropdown-trigger {
  min-height: 46px;
  padding-left: 38px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
}
.aero-dropdown.is-strategy .aero-dropdown-menu { border-radius: 13px; }
@media (max-width: 640px) {
  .aero-dropdown-trigger { min-height: 2.7rem; font-size: .8rem; }
  .aero-dropdown-option { min-height: 2.7rem; font-size: .8rem; }
}
