/* ==========================================================================
   Admin Shell — sistema visual compartilhado do Painel Admin
   Baseado na linguagem visual criada em admin-gestao-vc.css.
   Este arquivo NÃO substitui styles.css: ele soma uma camada por cima,
   focada em três coisas -> sidebar fixa, topbar e cards no padrão "vc-*".
   ========================================================================== */

:root {
  --vc-ink: #102f49;
  --vc-muted: #587187;
  --vc-line: rgba(30, 82, 119, .12);
  --vc-blue: #1e5f8c;
  --vc-orange: #ef721b;
  --vc-green: #16734a;
  --vc-red: #a93131;
  --vc-purple: #6a4fb0;
  --vc-teal: #0f7d75;
  --vc-navy: #123d61;
  --vc-bg: #f3f8fb;
  --vc-sidebar-w: 264px;
}

/* ---------- Layout base: sidebar fixa + área de conteúdo ---------- */

body.vc-has-sidebar {
  margin: 0;
  background: var(--vc-bg);
  color: var(--vc-ink);
  font-family: "Barlow", sans-serif;
}

.vc-app {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.vc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--vc-sidebar-w);
  height: 100vh;
  padding: 22px 16px 18px;
  background: linear-gradient(185deg, #0a2740 0%, #0d3151 55%, #123d61 100%);
  color: #eaf2f8;
  box-shadow: 6px 0 30px rgba(9, 31, 53, .12);
  overflow-y: auto;
}

.vc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  text-decoration: none;
  color: inherit;
}

.vc-sidebar-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.vc-sidebar-brand strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: .98rem;
  line-height: 1.15;
}

.vc-sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: #a9c2d6;
  font-size: .74rem;
}

.vc-sidebar-home {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.vc-sidebar-home:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .22);
}

.vc-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 2px;
}

.vc-sidebar-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px 4px;
  color: #86a4bd;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vc-sidebar-group-label svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: .85;
}

.vc-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vc-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border-radius: 10px;
  color: #cfe0ee;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.vc-sidebar-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: .8;
}

.vc-sidebar-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.vc-sidebar-link.is-active {
  background: rgba(239, 114, 27, .16);
  color: #fff;
}

.vc-sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--vc-orange);
}

.vc-sidebar-link.is-active svg {
  opacity: 1;
  color: #ff9a54;
}

.vc-sidebar-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.vc-sidebar-logout {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: transparent;
  color: #eaf2f8;
  font-weight: 800;
  font-size: .84rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease;
}

.vc-sidebar-logout:hover {
  background: rgba(255, 255, 255, .1);
}

/* ---------- Área de conteúdo principal ---------- */

.vc-app-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--vc-sidebar-w);
  padding: 28px clamp(20px, 3vw, 48px) 70px;
}

.vc-app-main-inner {
  width: min(1360px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

/* ---------- Toggle mobile (escondido em telas largas) ---------- */

.vc-sidebar-toggle {
  display: none;
}

.vc-sidebar-backdrop {
  display: none;
  pointer-events: none;
}

@media (max-width: 1080px) {
  .vc-sidebar {
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .vc-sidebar.is-open {
    transform: translateX(0);
  }

  .vc-app-main {
    margin-left: 0;
  }

  .vc-sidebar-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: #0d3151;
    color: #fff;
    box-shadow: 0 12px 26px rgba(9, 31, 53, .28);
    cursor: pointer;
  }

  .vc-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(6, 20, 34, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .vc-sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ==========================================================================
   Cards / KPIs no padrão "Gestão VC" — usados no hub e reaproveitáveis
   em qualquer subpágina que adote o shell.
   ========================================================================== */

.vc-page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(130deg, #0d3151, #185b86 58%, #287da3);
  color: #fff;
  box-shadow: 0 24px 60px rgba(11, 46, 74, .18);
}

.vc-page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -130px;
  border: 46px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.vc-page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.vc-page-hero .vc-eyebrow {
  margin: 0 0 7px;
  color: #ffb27c;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .76rem;
}

.vc-page-hero h1 {
  margin: 0;
  font: 800 clamp(1.8rem, 3.4vw, 2.7rem)/1.1 "Sora", sans-serif;
}

.vc-page-hero p:not(.vc-eyebrow) {
  max-width: 640px;
  margin: 12px 0 0;
  color: #dceaf3;
  font-size: 1rem;
  line-height: 1.5;
}

.vc-page-hero {
  margin-bottom: 24px;
}

.vc-page-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Botões dentro do hero escuro precisam de contraste próprio: várias regras
   antigas em styles.css miram IDs específicos (#admin-users-refresh,
   #admin-highlights-logout, [id$="-new"] etc.) com tons pensados para o
   hero claro anterior. Aqui garantimos legibilidade sem precisar listar
   cada ID individualmente. */
.vc-page-hero-actions button:not(.primary-button),
.vc-page-hero-actions a:not(.primary-button) {
  color: #fff3eb !important;
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .3) !important;
}

.vc-page-hero-actions button:not(.primary-button):hover,
.vc-page-hero-actions a:not(.primary-button):hover {
  background: rgba(255, 255, 255, .22) !important;
  border-color: rgba(255, 255, 255, .42) !important;
}

.vc-page-hero-actions button:disabled {
  color: rgba(255, 243, 235, .75) !important;
  opacity: .7 !important;
}

.vc-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.vc-kpi {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--vc-line);
  border-radius: 21px;
  background: #fff;
}

.vc-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--vc-blue));
}

.vc-kpi span {
  display: block;
  color: var(--vc-muted);
  font-weight: 700;
  font-size: .84rem;
}

.vc-kpi strong {
  display: block;
  margin: 8px 0 6px;
  font: 800 2rem/1 "Sora", sans-serif;
  color: var(--vc-ink);
}

.vc-kpi small {
  color: var(--vc-muted);
}

.vc-section-group {
  display: grid;
  gap: 14px;
}

.vc-section-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc-section-group-head .vc-group-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--accent, var(--vc-blue));
  color: #fff;
}

.vc-section-group-head .vc-group-icon svg {
  width: 18px;
  height: 18px;
}

.vc-section-group-head h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.14rem;
  color: var(--vc-ink);
}

.vc-section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.vc-section-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  min-height: 128px;
  padding: 18px 18px 16px;
  border: 1px solid var(--vc-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 48, 73, .06);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.vc-section-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--vc-blue));
  opacity: .85;
}

.vc-section-card:hover,
.vc-section-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(30, 82, 119, .28);
  box-shadow: 0 20px 44px rgba(15, 48, 73, .12);
  outline: none;
}

.vc-section-card span {
  display: block;
  color: var(--vc-muted);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.vc-section-card strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--vc-ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.vc-section-card small {
  display: block;
  color: var(--vc-muted);
  font-size: .82rem;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .vc-kpis { grid-template-columns: repeat(2, 1fr); }
  .vc-page-hero { padding: 22px; }
}

/* ---------- Tabs (mesmo padrão usado em admin-gestao-vc.css) ---------- */

.vc-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--vc-line);
  border-radius: 18px;
  background: #fff;
}

.vc-tab {
  flex: 1;
  min-width: max-content;
  border: 0;
  border-radius: 13px;
  padding: 11px 16px;
  background: transparent;
  color: var(--vc-muted);
  cursor: pointer;
  font-weight: 800;
  font-family: "Barlow", sans-serif;
  font-size: .88rem;
}

.vc-tab.is-active {
  background: #123d61;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 61, 97, .18);
}

.vc-tab-panel[hidden] {
  display: none;
}

/* ---------- Disclosure discreta para conteúdo de referência ---------- */

.vc-disclosure {
  border: 1px solid var(--vc-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .7);
  overflow: hidden;
}

.vc-disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--vc-ink);
}

.vc-disclosure > summary::-webkit-details-marker {
  display: none;
}

.vc-disclosure > summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--vc-orange);
  transition: transform .15s ease;
}

.vc-disclosure[open] > summary::after {
  transform: rotate(45deg);
}

.vc-disclosure-body {
  padding: 0 20px 20px;
}

/* ---------- Repaginação: Usuários e Vínculos ---------- */

.admin-users-page .admin-users-pending-card {
  position: relative;
  overflow: hidden;
  padding-left: 22px;
}

.admin-users-page .admin-users-pending-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--pending-accent, var(--vc-blue));
}

.admin-users-page .admin-users-pending-card strong {
  font-family: "Sora", sans-serif;
  font-size: 2.1rem;
}

.admin-users-page #admin-users-pending-grid .admin-users-pending-card:nth-child(1) { --pending-accent: #ef721b; }
.admin-users-page #admin-users-pending-grid .admin-users-pending-card:nth-child(2) { --pending-accent: #a93131; }
.admin-users-page #admin-users-pending-grid .admin-users-pending-card:nth-child(3) { --pending-accent: #6a4fb0; }
.admin-users-page #admin-users-pending-grid .admin-users-pending-card:nth-child(4) { --pending-accent: #1e5f8c; }

.admin-users-toolbar-hint {
  margin: 6px 0 0;
  color: var(--vc-muted);
  font-size: .86rem;
  font-weight: 600;
}

.admin-users-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 20px;
}

.admin-users-bulk-group {
  display: grid;
  align-content: start;
  gap: 10px;
}

.admin-users-bulk-group-label {
  color: var(--vc-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-users-bulk-group-apply {
  flex: 1;
  min-width: 280px;
}

.admin-users-bulk-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}

.admin-users-bulk-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.admin-users-bulk-divider {
  width: 1px;
  align-self: stretch;
  background: var(--vc-line);
}

@media (max-width: 900px) {
  .admin-users-bulk-divider { display: none; }
}

.admin-user-header {
  position: relative;
  padding-right: 84px;
}

.admin-user-toggle {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--vc-line);
  border-radius: 999px;
  background: #fff;
  color: var(--vc-blue);
  font-weight: 800;
  font-size: .8rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.admin-user-toggle:hover {
  background: #eaf5fb;
  border-color: rgba(30, 82, 119, .3);
}

.admin-user-card-details {
  display: grid;
  gap: 16px;
}

.admin-user-card-details[hidden] {
  display: none;
}

/* ---------- Repaginação: Cadastro de Atletas ---------- */

.admin-athlete-kpi-grid {
  margin-bottom: 4px;
}

.admin-athlete-kpi-card {
  border: 1px solid var(--vc-line);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}

.admin-athlete-kpi-card:hover,
.admin-athlete-kpi-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 48, 73, .12);
  outline: none;
}

.admin-athlete-kpi-grid .admin-athlete-kpi-card:nth-child(1) { --accent: #1e5f8c; }
.admin-athlete-kpi-grid .admin-athlete-kpi-card:nth-child(2) { --accent: #16734a; }
.admin-athlete-kpi-grid .admin-athlete-kpi-card:nth-child(3) { --accent: #ef721b; }
.admin-athlete-kpi-grid .admin-athlete-kpi-card:nth-child(4) { --accent: #a93131; }

.admin-athlete-fidelity-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--vc-line);
  background: rgba(255, 255, 255, .75);
}

.admin-athlete-fidelity-eyebrow {
  color: var(--vc-orange);
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-athlete-fidelity-detail {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin: 4px 0 6px;
  border-radius: 12px;
  background: rgba(22, 115, 74, .08);
}

.admin-athlete-fidelity-detail strong {
  color: var(--vc-ink);
  font-family: "Sora", sans-serif;
}

.admin-athlete-fidelity-detail span {
  color: var(--vc-muted);
  font-size: .86rem;
}

.admin-athlete-fidelity-link {
  width: fit-content;
}

.admin-athlete-quicklinks {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--vc-line);
}

.admin-athlete-quicklinks-label {
  color: var(--vc-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-athlete-quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.admin-athlete-quicklink {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--vc-line);
  border-radius: 12px;
  background: #fff;
  color: var(--vc-blue);
  font-weight: 700;
  font-size: .86rem;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.admin-athlete-quicklink:hover {
  background: #eaf5fb;
  border-color: rgba(30, 82, 119, .3);
}

.admin-athlete-save-row {
  justify-content: flex-end;
}

.admin-athlete-strava-card {
  display: grid;
  gap: 8px;
  align-content: start;
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--vc-line);
  background: rgba(255, 255, 255, .75);
}

.admin-athlete-strava-status {
  display: grid;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--vc-line);
  border-radius: 12px;
  background: rgba(245, 250, 253, .96);
  font-size: .84rem;
  color: var(--vc-muted);
}

.admin-athlete-strava-status strong {
  color: var(--vc-ink);
}

.admin-athlete-strava-status .ok {
  color: #177245;
}

.admin-athlete-strava-status .pending {
  color: #b6500e;
}
