:root {
  --athlete-navy: #102d49;
  --athlete-navy-2: #183e61;
  --athlete-gold: #f4b21b;
  --athlete-bg: #f4f7fb;
  --athlete-card: #ffffff;
  --athlete-text: #17324d;
  --athlete-muted: #6e8195;
  --athlete-line: #e1e9f1;
  --athlete-safe-bottom: env(safe-area-inset-bottom, 0px);
  --athlete-nav-h: 68px;
}

body.cloud-page-body {
  background: var(--athlete-bg);
  color: var(--athlete-text);
  padding-top: 58px;
  padding-bottom: calc(var(--athlete-nav-h) + var(--athlete-safe-bottom) + 18px);
}

.athlete-app-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1040;
  height: 58px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--athlete-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.athlete-app-header-inner {
  width: min(760px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
}
.athlete-app-mark,
.athlete-app-back,
.athlete-app-notifications {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.athlete-app-mark { background: #edf3f8; overflow: hidden; }
.athlete-app-mark img { width: 29px; height: 29px; object-fit: contain; }
.athlete-app-back,
.athlete-app-notifications { color: var(--athlete-navy); text-decoration: none; background: #f4f7fa; border: 1px solid #e7edf3; }
.athlete-app-title-wrap { min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.athlete-app-kicker { color: #92a1af; text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; font-weight: 700; }
.athlete-app-title { font-size: 1.08rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--athlete-navy); }
.athlete-app-notifications { position: relative; font-size: 1.05rem; }
.athlete-app-notifications.has-badge { background: #fff8e5; border-color: #ffe1a0; }
.athlete-app-notifications span { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: #dc3545; color: #fff; font-size: .62rem; font-weight: 700; border: 2px solid #fff; }

.athlete-bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1050;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--athlete-line);
  padding-bottom: var(--athlete-safe-bottom);
  box-shadow: 0 -8px 30px rgba(16,45,73,.08);
}
.athlete-bottom-nav-inner { width: min(760px, 100%); height: var(--athlete-nav-h); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.athlete-bottom-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: #7e8fa0; font-size: .72rem; font-weight: 600; }
.athlete-bottom-icon { width: 34px; height: 28px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; }
.athlete-bottom-link.is-active { color: var(--athlete-navy); }
.athlete-bottom-link.is-active .athlete-bottom-icon { background: #e9f1f8; color: var(--athlete-navy); }
.athlete-bottom-link.is-active::after { content: ''; position: absolute; bottom: 4px; width: 18px; height: 3px; border-radius: 999px; background: var(--athlete-gold); }

.cloud-athlete-global-header,
.cloud-athlete-welcome-card { display: none !important; }
.cloud-athlete-global-page-main,
.cloud-athlete-shell,
.cloud-search-page-shell,
.cloud-network-shell,
.cloud-athlete-profile-shell,
.cloud-profile-unified-shell {
  width: min(760px, calc(100% - 24px)) !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 14px 0 0 !important;
}
.athlete-page-helper { margin: 0 2px 12px; color: var(--athlete-muted); font-size: .84rem; line-height: 1.35; }

.cloud-card,
.cloud-public-home-card,
.cloud-athlete-info-card,
.cloud-profile-unified-card {
  border: 1px solid var(--athlete-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(28, 55, 78, .05) !important;
}

/* Home / carreira */
.athlete-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 2px 12px; }
.athlete-home-head small { display: block; color: var(--athlete-muted); font-size: .75rem; }
.athlete-home-head h1 { margin: 0; font-size: 1.42rem; font-weight: 700; color: var(--athlete-navy); }
.athlete-home-head a { color: var(--athlete-navy); font-size: .78rem; font-weight: 600; text-decoration: none; }
.athlete-career-card { background: linear-gradient(145deg, var(--athlete-navy), var(--athlete-navy-2)); color: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 14px 30px rgba(16,45,73,.18); }
.athlete-career-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.athlete-career-label { display: block; color: #bfd0df; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.athlete-career-level { display: block; margin-top: 2px; font-size: 1.45rem; font-weight: 700; }
.athlete-career-points { text-align: right; }
.athlete-career-points strong { display: block; font-size: 1.35rem; }
.athlete-career-points span { color: #c9d8e5; font-size: .7rem; }
.athlete-career-progress-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 16px; }
.athlete-career-progress-row .progress { height: 7px; background: rgba(255,255,255,.18); }
.athlete-career-progress-row .progress-bar { background: var(--athlete-gold); }
.athlete-career-progress-row strong { font-size: .78rem; }
.athlete-career-message { margin-top: 10px; color: #d6e2ec; font-size: .78rem; line-height: 1.35; }

.athlete-section-title { margin: 18px 2px 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.athlete-section-title h2 { margin: 0; font-size: .94rem; font-weight: 700; color: var(--athlete-navy); }
.athlete-section-title a { font-size: .74rem; text-decoration: none; font-weight: 600; }
.athlete-pending-list { display: grid; gap: 8px; }
.athlete-pending-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--athlete-line); border-radius: 14px; text-decoration: none; color: var(--athlete-text); }
.athlete-pending-item form { margin: 0; }
.athlete-pending-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff6dc; color: #a56d00; }
.athlete-pending-copy strong { display: block; font-size: .86rem; }
.athlete-pending-copy span { display: block; margin-top: 1px; color: var(--athlete-muted); font-size: .72rem; line-height: 1.25; }
.athlete-pending-action { font-size: .72rem; font-weight: 700; color: var(--athlete-navy); white-space: nowrap; }

.athlete-next-card { display: grid; grid-template-columns: 42px 1fr 22px; gap: 11px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--athlete-line); border-radius: 16px; color: var(--athlete-text); text-decoration: none; }
.athlete-next-date { width: 42px; height: 48px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #edf3f8; color: var(--athlete-navy); line-height: 1; }
.athlete-next-date strong { font-size: 1.05rem; }
.athlete-next-date span { margin-top: 3px; font-size: .62rem; text-transform: uppercase; font-weight: 700; }
.athlete-next-main strong { display: block; font-size: .9rem; }
.athlete-next-main span { display: block; margin-top: 2px; color: var(--athlete-muted); font-size: .74rem; }
.athlete-next-card > i { color: #99a8b6; }
.athlete-empty-light { padding: 16px; text-align: center; border: 1px dashed #d8e2eb; border-radius: 15px; color: var(--athlete-muted); background: rgba(255,255,255,.6); font-size: .78rem; }

.athlete-mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.athlete-mini-stat { padding: 12px 8px; background: #fff; border: 1px solid var(--athlete-line); border-radius: 14px; text-align: center; }
.athlete-mini-stat strong { display: block; color: var(--athlete-navy); font-size: 1.1rem; }
.athlete-mini-stat span { display: block; margin-top: 2px; color: var(--athlete-muted); font-size: .68rem; }

.athlete-detail-panel { margin-top: 12px; border: 1px solid var(--athlete-line); border-radius: 16px; background: #fff; overflow: hidden; }
.athlete-detail-panel > summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: .86rem; font-weight: 700; color: var(--athlete-navy); }
.athlete-detail-panel > summary::-webkit-details-marker { display:none; }
.athlete-detail-panel > summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #91a1b1; transition: transform .2s ease; }
.athlete-detail-panel[open] > summary::after { transform: rotate(180deg); }
.athlete-detail-panel > .athlete-detail-content { padding: 0 12px 12px; }
.athlete-detail-panel .cloud-card { box-shadow: none !important; }

/* Torneios */
.athlete-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: #eaf0f5; }
.athlete-segmented a { min-height: 38px; display: grid; place-items: center; border-radius: 10px; color: #667a8f; text-decoration: none; font-size: .8rem; font-weight: 700; }
.athlete-segmented a.is-active { background: #fff; color: var(--athlete-navy); box-shadow: 0 3px 10px rgba(16,45,73,.08); }
.athlete-search-card { padding: 14px !important; }
.athlete-search-primary { display: grid; grid-template-columns: 1fr 44px; gap: 8px; }
.athlete-search-primary input { min-height: 44px; }
.athlete-search-primary button { width: 44px; height: 44px; padding: 0; }
.athlete-filter-details { margin-top: 10px; border-top: 1px solid var(--athlete-line); }
.athlete-filter-details > summary { cursor: pointer; padding: 10px 0 0; color: var(--athlete-navy); font-size: .78rem; font-weight: 700; }
.athlete-filter-grid { display: grid; grid-template-columns: 1fr 92px; gap: 9px; padding-top: 10px; }
.athlete-filter-grid .athlete-filter-full { grid-column: 1 / -1; }

/* Rede */
.athlete-anchor-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 4px; margin-bottom: 10px; scrollbar-width: none; }
.athlete-anchor-tabs::-webkit-scrollbar { display:none; }
.athlete-anchor-tabs a { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--athlete-line); border-radius: 999px; background: #fff; color: var(--athlete-navy); text-decoration: none; font-size: .75rem; font-weight: 700; }
.cloud-network-summary { grid-template-columns: repeat(3,1fr) !important; gap: 7px !important; }
.cloud-network-summary article { padding: 10px !important; border-radius: 14px !important; }
.cloud-network-summary article > i { display: none; }
.cloud-network-summary strong { font-size: 1rem !important; }
.cloud-network-summary span { font-size: .64rem !important; }
.cloud-network-feed-filters { overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: none; }
.cloud-network-feed-filter { flex: 0 0 auto; }
.cloud-network-section-head p,
.cloud-athlete-section-head p { font-size: .76rem !important; line-height: 1.35 !important; }

/* Perfil */
.athlete-profile-summary { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 12px 2px 14px; }
.athlete-profile-summary-avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--athlete-navy); color: #fff; font-weight: 700; }
.athlete-profile-summary-avatar img { width: 100%; height: 100%; object-fit: cover; }
.athlete-profile-summary strong { display:block; font-size: 1rem; color: var(--athlete-navy); }
.athlete-profile-summary span { display:block; margin-top: 2px; color: var(--athlete-muted); font-size: .74rem; }
.cloud-profile-tabs { position: sticky; top: 58px; z-index: 8; background: var(--athlete-bg); padding: 6px 0 8px !important; }
.cloud-profile-tabs a { min-height: 40px !important; }
.cloud-athlete-grid.two { grid-template-columns: 1fr !important; }
.cloud-athlete-localidade { grid-template-columns: 78px 1fr !important; }
.cloud-athlete-city-code-field { grid-column: 1 / -1; }
.cloud-athlete-profile-save .btn { width: 100%; min-height: 46px; }

/* Compactar estruturas antigas no mobile */
.cloud-unified-operations-head { margin-top: 16px !important; }
.cloud-unified-operations-head h2 { font-size: 1rem !important; }
.cloud-unified-operations-head p { display:none; }
.cloud-athlete-telemetry-kpis { grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
.cloud-athlete-telemetry-kpi { min-height: auto !important; padding: 11px !important; }
.cloud-athlete-telemetry-kpi strong { font-size: 1.1rem !important; }
.cloud-athlete-telemetry-kpi small { font-size: .65rem !important; }
.cloud-career-overview-grid { grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
.cloud-career-main-card { grid-column: 1 / -1 !important; }
.cloud-career-kpi-card { min-height: auto !important; padding: 11px !important; }
.cloud-career-content-grid,
.cloud-athlete-telemetry-grid,
.cloud-athlete-dashboard-grid { grid-template-columns: 1fr !important; }
.cloud-network-upcoming-grid { grid-template-columns: 1fr !important; }
.cloud-network-upcoming-card { padding: 12px !important; }

.athlete-confirm-dialog { border: 0; border-radius: 18px; padding: 0; width: min(92vw, 390px); color: var(--athlete-text); box-shadow: 0 24px 70px rgba(10,32,52,.28); }
.athlete-confirm-dialog::backdrop { background: rgba(7,25,42,.58); backdrop-filter: blur(2px); }
.athlete-confirm-card { padding: 22px; text-align:center; }
.athlete-confirm-icon { width: 46px; height: 46px; margin: 0 auto 12px; display:grid; place-items:center; border-radius:50%; background:#fff1f2; color:#c53343; font-size:1.25rem; }
.athlete-confirm-card h2 { margin:0; font-size:1.08rem; }
.athlete-confirm-card p { margin:8px 0 18px; color:var(--athlete-muted); font-size:.84rem; line-height:1.4; }
.athlete-confirm-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }

@media (min-width: 768px) {
  body.cloud-page-body { padding-top: 66px; }
  .athlete-app-header { height: 66px; }
  .athlete-app-header-inner { padding-inline: 20px; }
  .cloud-athlete-global-page-main,
  .cloud-athlete-shell,
  .cloud-search-page-shell,
  .cloud-network-shell,
  .cloud-athlete-profile-shell,
  .cloud-profile-unified-shell { width: min(760px, calc(100% - 40px)) !important; padding-top: 20px !important; }
  .athlete-page-helper { font-size:.9rem; }
  .cloud-profile-tabs { top:66px; }
}
.athlete-profile-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-bottom:12px; }
.athlete-profile-actions a { min-height:42px; display:flex; align-items:center; justify-content:center; gap:6px; border:1px solid var(--athlete-line); border-radius:12px; background:#fff; color:var(--athlete-navy); text-decoration:none; font-size:.72rem; font-weight:700; }
.athlete-profile-actions a.is-danger { color:#b02a37; }
@media (max-width: 420px) {
  .athlete-profile-actions { grid-template-columns:1fr 1fr; }
  .athlete-profile-actions a:last-child { grid-column:1 / -1; }
}
/* Onboarding / cadastro antes do login */
body.athlete-onboarding { padding-top: 0; padding-bottom: 28px; background: var(--athlete-bg); }
.athlete-onboarding .cloud-athlete-shell { width: min(680px, calc(100% - 24px)) !important; padding-top: 18px !important; }
.athlete-onboarding .cloud-athlete-card { padding: 16px !important; }
.athlete-onboarding .cloud-athlete-card-brand { margin: 2px auto 16px !important; }
.athlete-onboarding .cloud-athlete-card-brand img { max-width: 180px !important; }
.athlete-onboarding .cloud-athlete-head { align-items: flex-start !important; gap: 10px !important; }
.athlete-onboarding .cloud-athlete-head h1 { font-size: 1.35rem !important; }
.athlete-onboarding .cloud-athlete-head p { font-size: .78rem !important; line-height: 1.4 !important; }
.athlete-onboarding .cloud-athlete-declaration-card { padding: 12px !important; }
.athlete-onboarding .cloud-athlete-declaration-card p { font-size: .76rem !important; }
.athlete-onboarding .cloud-athlete-declaration-card small { font-size: .7rem !important; }
.athlete-onboarding .cloud-athlete-actions { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; }
.athlete-onboarding .cloud-athlete-actions .btn { width: 100%; min-height: 46px; }

/* =========================================================
   Rev. 8 - PWA, instalação, badge e central de notificações
   ========================================================= */
.athlete-pwa-card {
  width: min(736px, calc(100% - 24px));
  margin: 12px auto 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px 1fr auto 30px;
  gap: 10px;
  align-items: center;
  padding: 10px 9px 10px 10px;
  border: 1px solid #dbe5ee;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,45,73,.06);
}
.athlete-pwa-card[hidden] { display: none !important; }
.athlete-pwa-icon { width: 48px; height: 48px; border-radius: 13px; overflow: hidden; background: var(--athlete-navy); }
.athlete-pwa-icon img { width: 100%; height: 100%; object-fit: cover; }
.athlete-pwa-copy { min-width: 0; }
.athlete-pwa-copy strong { display: block; color: var(--athlete-navy); font-size: .83rem; line-height: 1.15; }
.athlete-pwa-copy span { display: block; margin-top: 3px; color: var(--athlete-muted); font-size: .68rem; line-height: 1.25; }
.athlete-pwa-card .btn { min-height: 36px; border-radius: 10px; font-size: .72rem; font-weight: 700; }
.athlete-pwa-close { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: #9aa8b5; }
.athlete-confirm-icon.is-info { background: #eaf3fb; color: var(--athlete-navy); }
.athlete-confirm-actions.single { grid-template-columns: 1fr; }

.athlete-app-toast {
  position: fixed;
  z-index: 2200;
  left: 50%;
  bottom: calc(var(--athlete-nav-h) + var(--athlete-safe-bottom) + 16px);
  transform: translate(-50%, 18px);
  width: min(420px, calc(100% - 28px));
  padding: 11px 14px;
  border-radius: 13px;
  background: #17324d;
  color: #fff;
  box-shadow: 0 14px 38px rgba(10,32,52,.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
}
.athlete-app-toast.is-error { background: #a52b39; }
.athlete-app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.athlete-notifications-page { padding-bottom: 20px !important; }
.athlete-notif-setup {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #ecd69b;
  border-radius: 16px;
  background: #fffaf0;
}
.athlete-notif-setup > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff1c9; color: #946200; }
.athlete-notif-setup strong, .athlete-notif-setup span { display: block; }
.athlete-notif-setup strong { color: var(--athlete-navy); font-size: .9rem; }
.athlete-notif-setup span { margin-top: 3px; color: var(--athlete-muted); font-size: .75rem; line-height: 1.35; }

.athlete-notif-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin-bottom: 10px; }
.athlete-notif-toolbar > div { display: flex; align-items: baseline; gap: 5px; color: var(--athlete-muted); font-size: .72rem; }
.athlete-notif-toolbar > div strong { color: var(--athlete-navy); font-size: 1rem; }

.athlete-push-status {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--athlete-line);
  border-radius: 16px;
  background: #fff;
}
.athlete-push-status.is-on { border-color: #b9dfca; background: #f7fcf9; }
.athlete-push-status-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf3f8; color: var(--athlete-navy); }
.athlete-push-status.is-on .athlete-push-status-icon { background: #dff3e7; color: #237445; }
.athlete-push-status strong, .athlete-push-status span { display: block; }
.athlete-push-status strong { color: var(--athlete-navy); font-size: .8rem; line-height: 1.15; }
.athlete-push-status span { margin-top: 3px; color: var(--athlete-muted); font-size: .67rem; line-height: 1.25; }
.athlete-push-status .btn { min-height: 36px; border-radius: 10px; font-size: .7rem; font-weight: 700; }

.athlete-notification-list { display: grid; gap: 7px; }
.athlete-notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr 10px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--athlete-line);
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.athlete-notification-item.is-unread { border-color: #cdddeb; background: #fafdff; }
.athlete-notification-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #edf3f8; color: var(--athlete-navy); font-size: .9rem; }
.athlete-notification-item.is-unread .athlete-notification-icon { background: #e5f0fa; }
.athlete-notification-copy { min-width: 0; }
.athlete-notification-copy strong { display: block; color: var(--athlete-navy); font-size: .82rem; line-height: 1.2; }
.athlete-notification-copy span { display: block; margin-top: 3px; color: #63778b; font-size: .73rem; line-height: 1.32; }
.athlete-notification-copy small { display: block; margin-top: 5px; color: #9aa8b5; font-size: .64rem; }
.athlete-notification-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #e44a5a; }

.athlete-notification-settings { margin-top: 14px; overflow: hidden; border: 1px solid var(--athlete-line); border-radius: 16px; background: #fff; }
.athlete-notification-settings > summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; cursor: pointer; list-style: none; color: var(--athlete-navy); font-size: .8rem; font-weight: 700; }
.athlete-notification-settings > summary::-webkit-details-marker { display:none; }
.athlete-notification-settings > summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #91a1b1; transition: transform .2s ease; }
.athlete-notification-settings[open] > summary::after { transform: rotate(180deg); }
.athlete-notification-settings-body { padding: 0 12px 12px; border-top: 1px solid #eef2f6; }
.athlete-notification-toggle { min-height: 58px; display: grid; grid-template-columns: 1fr 42px; gap: 10px; align-items: center; border-bottom: 1px solid #eef2f6; }
.athlete-notification-toggle strong, .athlete-notification-toggle small { display: block; }
.athlete-notification-toggle strong { color: var(--athlete-navy); font-size: .76rem; }
.athlete-notification-toggle small { margin-top: 2px; color: var(--athlete-muted); font-size: .66rem; line-height: 1.25; }
.athlete-notification-toggle input { appearance: none; width: 40px; height: 23px; border-radius: 999px; background: #cbd5de; position: relative; transition: background .2s ease; }
.athlete-notification-toggle input::after { content:''; position:absolute; top:3px; left:3px; width:17px; height:17px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.18); transition:transform .2s ease; }
.athlete-notification-toggle input:checked { background: var(--athlete-navy); }
.athlete-notification-toggle input:checked::after { transform: translateX(17px); }

@media (max-width: 520px) {
  .athlete-pwa-card { grid-template-columns: 44px 1fr auto 26px; gap: 8px; }
  .athlete-pwa-icon { width: 44px; height: 44px; }
  .athlete-pwa-copy span { max-width: 210px; }
  .athlete-push-status { grid-template-columns: 40px 1fr; }
  .athlete-push-status .btn { grid-column: 1 / -1; width: 100%; }
}

/* Safe areas quando o RankingBT estiver instalado como PWA. */
:root { --athlete-safe-top: env(safe-area-inset-top, 0px); }
body.cloud-page-body { padding-top: calc(58px + var(--athlete-safe-top)); }
.athlete-app-header { height: calc(58px + var(--athlete-safe-top)); padding-top: var(--athlete-safe-top); }
.athlete-app-header-inner { height: 58px; }
.cloud-profile-tabs { top: calc(58px + var(--athlete-safe-top)); }
@media (min-width: 768px) {
  body.cloud-page-body { padding-top: calc(66px + var(--athlete-safe-top)); }
  .athlete-app-header { height: calc(66px + var(--athlete-safe-top)); }
  .athlete-app-header-inner { height: 66px; }
  .cloud-profile-tabs { top: calc(66px + var(--athlete-safe-top)); }
}

/* =========================================================
   Rev. 8.4 - Navegação superior mobile, menu lateral e header
   ========================================================= */
:root {
  --athlete-header-h: 64px;
  --athlete-nav-h: 58px;
}

body.cloud-page-body {
  padding-top: calc(var(--athlete-header-h) + var(--athlete-nav-h) + var(--athlete-safe-top));
  padding-bottom: 18px;
}

.athlete-app-header {
  height: calc(var(--athlete-header-h) + var(--athlete-safe-top));
  padding-top: var(--athlete-safe-top);
  background: linear-gradient(135deg, #102d49 0%, #163b5d 100%);
  border-bottom: 2px solid rgba(244,178,27,.92);
  box-shadow: 0 5px 18px rgba(16,45,73,.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.athlete-app-header-inner {
  width: min(760px, 100%);
  height: var(--athlete-header-h);
  padding: 0 12px;
  grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 9px;
}
.athlete-app-menu,
.athlete-app-notifications,
.athlete-app-logout {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}
.athlete-app-menu { padding: 0; }
.athlete-app-actions { display: flex; align-items: center; gap: 7px; }
.athlete-app-logout {
  border-color: rgba(255,255,255,.12);
  background: #e34755;
  font-size: 1.08rem;
}
.athlete-app-notifications.has-badge {
  background: rgba(255,255,255,.14);
  border-color: rgba(244,178,27,.78);
}
.athlete-app-notifications span {
  top: -5px;
  right: -5px;
  border-color: #153755;
}
.athlete-app-title-wrap { line-height: 1.03; }
.athlete-app-kicker {
  color: #f7c65c;
  font-size: .6rem;
  letter-spacing: .105em;
}
.athlete-app-title,
.athlete-app-title-link { color: #fff; }
.athlete-app-title { font-size: 1.12rem; font-weight: 700; }
.athlete-app-title-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.athlete-app-title-link > i { font-size: .65rem; color: #c8d6e2; }
.athlete-app-title-link .athlete-app-title { min-width: 0; }

/* A antiga barra inferior passa a ser a navegação principal logo abaixo do header. */
.athlete-bottom-nav {
  inset: calc(var(--athlete-header-h) + var(--athlete-safe-top)) 0 auto 0;
  height: var(--athlete-nav-h);
  padding-bottom: 0;
  background: rgba(255,255,255,.985);
  border-top: 0;
  border-bottom: 1px solid var(--athlete-line);
  box-shadow: 0 5px 14px rgba(16,45,73,.055);
  z-index: 1035;
}
.athlete-bottom-nav-inner { height: var(--athlete-nav-h); }
.athlete-bottom-link {
  gap: 1px;
  font-size: .68rem;
  color: #7a8b9c;
}
.athlete-bottom-icon {
  width: 32px;
  height: 27px;
  border-radius: 10px;
  font-size: .94rem;
}
.athlete-bottom-link.is-active::after {
  top: 0;
  bottom: auto;
  width: 30px;
  height: 3px;
}

.cloud-profile-tabs {
  top: calc(var(--athlete-header-h) + var(--athlete-nav-h) + var(--athlete-safe-top));
}

/* Menu lateral acionado pelo hamburger. */
.athlete-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1070;
  background: rgba(5,21,35,.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .2s ease;
}
.athlete-drawer-backdrop[hidden] { display: none !important; }
.athlete-drawer-backdrop.is-visible { opacity: 1; }
.athlete-app-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1080;
  width: min(84vw, 320px);
  padding: calc(12px + var(--athlete-safe-top)) 12px calc(18px + var(--athlete-safe-bottom));
  background: #fff;
  box-shadow: 18px 0 48px rgba(6,27,45,.22);
  transform: translateX(-104%);
  transition: transform .22s ease;
  overflow-y: auto;
}
.athlete-app-drawer.is-open { transform: translateX(0); }
body.athlete-drawer-open { overflow: hidden; }
.athlete-drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.athlete-drawer-brand { display: flex; align-items: center; gap: 9px; }
.athlete-drawer-brand-mark { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: var(--athlete-navy); }
.athlete-drawer-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.athlete-drawer-brand strong,
.athlete-drawer-brand small { display: block; }
.athlete-drawer-brand strong { color: var(--athlete-navy); font-size: .95rem; }
.athlete-drawer-brand small { margin-top: 1px; color: var(--athlete-muted); font-size: .68rem; }
.athlete-drawer-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 11px; background: #eef3f7; color: var(--athlete-navy); }
.athlete-drawer-profile { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; margin: 14px 0 8px; padding: 12px; border-radius: 14px; background: #f3f7fa; }
.athlete-drawer-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--athlete-navy); color: #fff; }
.athlete-drawer-profile strong,
.athlete-drawer-profile small { display: block; }
.athlete-drawer-profile strong { color: var(--athlete-navy); font-size: .84rem; }
.athlete-drawer-profile small { margin-top: 2px; color: var(--athlete-muted); font-size: .67rem; }
.athlete-drawer-nav { display: grid; gap: 4px; }
.athlete-drawer-section { margin: 12px 8px 4px; color: #93a2b0; font-size: .61rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.athlete-drawer-link { min-height: 44px; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 0 10px; border-radius: 12px; color: #496176; text-decoration: none; font-size: .8rem; font-weight: 600; }
.athlete-drawer-link > i { width: 28px; text-align: center; color: #71879a; }
.athlete-drawer-link.is-active { background: #eaf1f7; color: var(--athlete-navy); }
.athlete-drawer-link.is-active > i { color: var(--athlete-navy); }
.athlete-drawer-badge { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #dc3545; color: #fff; font-size: .62rem; }
.athlete-drawer-badge[hidden] { display: none !important; }

/* As ações de senha/privacidade/logout passam para o menu e para o X do header. */
.athlete-profile-actions { display: none !important; }

@media (min-width: 768px) {
  :root { --athlete-header-h: 68px; --athlete-nav-h: 60px; }
  .athlete-app-header-inner { padding-inline: 20px; }
  .athlete-app-title { font-size: 1.18rem; }
  .athlete-bottom-link { font-size: .72rem; }
}

@media (max-width: 380px) {
  .athlete-app-header-inner { padding-inline: 9px; gap: 6px; }
  .athlete-app-menu,
  .athlete-app-notifications,
  .athlete-app-logout { width: 36px; height: 36px; border-radius: 11px; }
  .athlete-app-actions { gap: 5px; }
  .athlete-app-title { font-size: 1.02rem; }
  .athlete-app-kicker { font-size: .56rem; }
}
