/* ===== Volley Analytics — estilos ===== */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e3e7f0;
  --text: #141c3a;
  --muted: #5f6884;
  --navy: #1e2a5e;          /* azul-marinho da logo */
  --navy-deep: #10173a;
  --orange: #f2703e;        /* laranja coral da logo */
  --orange-soft: #f98a4f;
  --primary: var(--navy);
  --grad-brand: linear-gradient(135deg, #1e2a5e 0%, #34437e 60%, #f2703e 160%);
  --grad-cta: linear-gradient(135deg, #f2703e 0%, #f98a4f 100%);
  --grad-bar: linear-gradient(90deg, #35447f 0%, #1e2a5e 45%, #0b1027 100%); /* lado claro junto à logo */
  --grad-card: linear-gradient(180deg, #ffffff 0%, #f8f9fe 100%);
  --grad-kpi: linear-gradient(135deg, #eef1fa 0%, #fdf2ea 100%);
  --excelente: #16a34a;
  --bom: #2563eb;
  --regular: #d97706;
  --ruim: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 28, 58, .07), 0 6px 18px rgba(30, 42, 94, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1000px 500px at 100% -10%, rgba(242, 112, 62, .06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(30, 42, 94, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: var(--muted); }

/* ---- Login ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(-45deg, #0b1027, #16204d, #1e2a5e, #2c3a75);
  background-size: 300% 300%;
  animation: grad-shift 16s ease infinite;
  position: relative; overflow: hidden;
}
@keyframes grad-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* brilho laranja sutil no canto, ecoando a logo */
.login-wrap::after {
  content: ''; position: absolute; right: -180px; top: -180px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(242, 112, 62, .28), transparent 65%);
  pointer-events: none;
}

/* arte da rede de vôlei em tela cheia — "bandeira tremulando" + impacto da bola */
.net-art {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.net-art svg {
  width: 100%; height: 100%; display: block;
  transform: rotate(-6deg) scale(1.22);   /* rede desconstruída, levemente inclinada */
  transform-origin: center;
}
/* tremular contínuo de bandeira (transform barato, sem re-filtrar) */
.net-sway {
  transform-box: view-box; transform-origin: center;
  animation: net-sway 9s ease-in-out infinite;
}
@keyframes net-sway {
  0%   { transform: skewY(.5deg) translateX(0) scaleY(1); }
  50%  { transform: skewY(-.6deg) translateX(-14px) translateY(5px) scaleY(1.012); }
  100% { transform: skewY(.5deg) translateX(0) scaleY(1); }
}
/* estufada da rede no ponto de impacto (como a rede balançando no "gol") */
.net-punch {
  transform-box: view-box;
  transform-origin: 70% 52%;              /* ponto onde a bola toca */
  animation: net-punch 8s ease-in-out infinite;
}
@keyframes net-punch {
  0%, 35% { transform: scale(1); }
  40% { transform: scale(1.055) skewX(-1.6deg); }  /* bola estufa a rede */
  46% { transform: scale(0.982); }                  /* rede devolve */
  52% { transform: scale(1.014); }
  58%, 100% { transform: scale(1); }
}
/* trajetória da bola: entra cortada, toca a rede, rebate e cai */
.net-ball2 {
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: ball-fly 8s linear infinite;
}
@keyframes ball-fly {
  0%   { transform: translate(1560px, -140px) rotate(0deg); opacity: 0; }
  5%   { opacity: 1; }
  36%  { transform: translate(1014px, 462px) rotate(215deg); opacity: 1; }      /* chega na rede */
  40%  { transform: translate(1034px, 480px) rotate(228deg) scale(.88, .94); }  /* comprime no toque */
  54%  { transform: translate(1150px, 296px) rotate(285deg) scale(1); }         /* rebote */
  80%  { transform: translate(1250px, 1040px) rotate(372deg); opacity: 1; }     /* cai */
  83%  { opacity: 0; }
  100% { transform: translate(1560px, -140px) rotate(0deg); opacity: 0; }
}
/* ondas que se espalham pela rede a partir do toque */
.net-ripple { opacity: 0; animation: net-ripple 8s ease-out infinite; }
.net-ripple.r2 { animation-delay: .12s; }
@keyframes net-ripple {
  0%, 37% { r: 14; opacity: 0; }
  41% { opacity: .85; }
  62% { r: 170; opacity: 0; }
  100% { r: 170; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .login-wrap, .net-sway, .net-punch, .net-ball2, .net-ripple { animation: none !important; }
}

.login-card {
  background: rgba(255, 255, 255, .97); border-radius: 20px; padding: 36px 32px;
  width: 100%; max-width: 420px; box-shadow: 0 25px 60px rgba(4, 8, 26, .5);
  backdrop-filter: blur(6px); position: relative; z-index: 1;
}
.login-card .login-logo-img { display: block; margin: 0 auto 10px; height: 130px; max-width: 100%; object-fit: contain; }
.login-card h1 {
  font-size: 27px; margin-bottom: 2px; letter-spacing: -.5px; text-align: center;
  color: var(--navy);
}
.login-card h1 .hl { color: var(--orange); }
.login-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; text-align: center; }

/* ---- Layout ---- */
.topbar {
  background: var(--grad-bar); color: #fff; padding: 8px 20px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(11, 16, 39, .4);
  min-height: 54px;
}
.topbar .brand { font-weight: 800; font-size: 17px; white-space: nowrap; letter-spacing: -.3px; display: inline-flex; align-items: center; gap: 10px; }
.topbar .brand .logo-badge {
  background: #fff; border-radius: 10px; padding: 3px 6px;
  display: inline-flex; align-items: center;
  box-shadow: 0 2px 8px rgba(4, 8, 26, .35);
}
.topbar .brand .logo-badge img { height: 30px; width: auto; display: block; }
.topbar .brand .hl { color: var(--orange-soft); }
.topbar .brand small { font-weight: 500; opacity: .6; font-size: 10.5px; margin-left: 6px; letter-spacing: .4px; }
.topbar .spacer { flex: 1; }

/* menu do usuário (avatar → dropdown) */
.user-menu { position: relative; }
.user-menu-btn {
  background: none; border: none; padding: 0; cursor: pointer; border-radius: 50%;
  display: inline-flex; outline-offset: 2px;
}
.user-menu-btn .avatar, .user-menu-btn .avatar-fallback { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,.4); transition: border-color .15s, transform .1s; }
.user-menu-btn:hover .avatar, .user-menu-btn:hover .avatar-fallback { border-color: var(--orange-soft); transform: scale(1.05); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
  background: #fff; color: var(--text); border-radius: 14px; min-width: 250px; max-width: min(320px, 92vw);
  box-shadow: 0 12px 40px rgba(4, 8, 26, .35); border: 1px solid var(--border);
  overflow: hidden; padding-bottom: 6px;
  animation: dd-in .14s ease;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ud-header {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: linear-gradient(135deg, #eef1fa, #fdf2ea); border-bottom: 1px solid var(--border);
}
.ud-header .ud-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ud-header .ud-id b { font-size: 14px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-header .ud-id span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-header .role-tag { background: var(--navy); color: #fff; padding: 2px 9px; border-radius: 20px; font-size: 11px; align-self: flex-start; }
.ud-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 11px 16px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.ud-item:hover { background: #f2f4fb; }
.ud-item.danger { color: var(--ruim); }
.ud-item.danger:hover { background: #fef2f2; }

.nav {
  display: flex; gap: 4px; background: rgba(255, 255, 255, .93); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 18px; overflow-x: auto; position: sticky; top: 54px; z-index: 40;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.nav a {
  padding: 13px 15px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.nav a.active { color: var(--orange); border-bottom-color: var(--orange); }

/* Menu suspenso: o botão só aparece quando as abas não cabem (ver media query) */
.nav-links { display: flex; gap: 4px; }
.nav-toggle {
  display: none; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer;
  padding: 12px 2px; font-size: 14px; font-weight: 700; color: var(--orange); font-family: inherit;
}
.nav-burger { font-size: 17px; line-height: 1; }

/* conteúdo em largura total, alinhado à barra de abas */
.main { width: 100%; max-width: none; margin: 0; padding: 22px 28px 60px; }
.page-title { font-size: 21px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.3px; color: var(--navy); }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ---- Cards / grids ---- */
.card {
  background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), #34437e 55%, var(--orange));
  opacity: .7;
}
.card h3 { font-size: 15px; margin-bottom: 12px; color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--grad-kpi); border: 1px solid #e6e4f0; border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow);
}
.kpi .label { font-size: 11px; color: var(--orange); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.kpi .value { font-size: 27px; font-weight: 800; margin-top: 2px; letter-spacing: -.5px; color: var(--navy); }
.kpi .hint { font-size: 12px; color: var(--muted); }

/* ---- Formulários ---- */
label.field { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: #33406b; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #c6cddf; border-radius: 9px;
  font-size: 15px; margin-top: 5px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad-cta); color: #fff; border: none; border-radius: 9px;
  padding: 12px 20px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 10px rgba(242, 112, 62, .35);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #e9ecf5; color: #33406b; box-shadow: none; }
.btn.secondary:hover { background: #d9def0; filter: none; }
.btn.navy { background: linear-gradient(135deg, #1e2a5e, #34437e); box-shadow: 0 3px 10px rgba(30,42,94,.3); }
.btn.danger { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: none; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.error-msg { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

/* ---- Avatares ---- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; vertical-align: middle;
  border: 2px solid #dfe4f5; background: #eef1fa; flex: none;
}
.avatar.lg { width: 64px; height: 64px; }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad-brand);
  color: #fff; font-weight: 700; font-size: 14px; vertical-align: middle; flex: none;
}
.avatar-fallback.lg { width: 64px; height: 64px; font-size: 22px; }

/* ---- Formulário de avaliação ágil ---- */
.eval-section { margin-bottom: 22px; }
.eval-section > h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 12px;
}
.eval-item { margin-bottom: 14px; }
.eval-item .item-label { font-size: 15px; font-weight: 600; margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.score-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.score-btn {
  padding: 14px 4px; min-height: 52px; border-radius: 11px; border: 2px solid var(--border);
  background: #f8f9fd; font-size: 13px; font-weight: 700; cursor: pointer; color: #4a5578;
  transition: transform .06s, background .12s, color .12s, border-color .12s;
  touch-action: manipulation; user-select: none;
}
.score-btn:active { transform: scale(.96); }
/* Escala de 6 níveis. As cores vêm de variáveis por nota, para o mesmo valor
   pintar igual em qualquer lugar (planilha, questionário, seletor de nota). */
:root {
  --nota-6: #15803d;   /* Excelente */
  --nota-5: #16a34a;   /* Muito Bom */
  --nota-4: #2563eb;   /* Bom */
  --nota-3: #0891b2;   /* Mediano */
  --nota-2: #d97706;   /* Em desenvolvimento */
  --nota-1: #dc2626;   /* Ruim */
}
.score-btn[data-score="6"].selected { background: var(--nota-6); border-color: var(--nota-6); color: #fff; }
.score-btn[data-score="5"].selected { background: var(--nota-5); border-color: var(--nota-5); color: #fff; }
.score-btn[data-score="4"].selected { background: var(--nota-4); border-color: var(--nota-4); color: #fff; }
.score-btn[data-score="3"].selected { background: var(--nota-3); border-color: var(--nota-3); color: #fff; }
.score-btn[data-score="2"].selected { background: var(--nota-2); border-color: var(--nota-2); color: #fff; }
.score-btn[data-score="1"].selected { background: var(--nota-1); border-color: var(--nota-1); color: #fff; }

/* Escolha direta da nota (toque longo na célula da planilha) */
.score-picker { display: grid; gap: 8px; margin-top: 8px; }
.score-picker .score-btn { display: flex; align-items: center; gap: 10px; justify-content: flex-start; padding: 12px 14px; min-height: 46px; }
.score-picker .score-btn b {
  min-width: 26px; height: 26px; border-radius: 7px; background: rgba(0,0,0,.08);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}

.context-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 5px; }
.context-toggle .score-btn.selected { background: linear-gradient(135deg, #1e2a5e, #34437e); border-color: var(--navy); color: #fff; }

.mode-toggle { display: inline-flex; background: #e9ecf5; border-radius: 11px; padding: 4px; gap: 4px; margin-bottom: 16px; max-width: 100%; }
.mode-toggle button {
  border: none; background: transparent; padding: 9px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.mode-toggle button.active { background: var(--grad-cta); color: #fff; box-shadow: 0 2px 8px rgba(242,112,62,.4); }

details.ct-section { border: 1px dashed #c3cbe6; border-radius: 10px; padding: 12px; margin-bottom: 22px; background: rgba(238, 241, 250, .5); }
details.ct-section summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--navy); }
details.ct-section .eval-section { margin-top: 14px; margin-bottom: 0; }

/* ---- Matriz de avaliação em grupo ---- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
table.matrix th, table.matrix td { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: center; }
table.matrix th {
  background: linear-gradient(180deg, #eef1fa, #e2e7f6); color: var(--navy); font-size: 11px;
  text-transform: uppercase; letter-spacing: .3px; position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.matrix th.sticky-col, table.matrix td.sticky-col {
  position: sticky; left: 0; z-index: 3; background: #fff; text-align: left;
  border-right: 2px solid var(--border); min-width: 170px; max-width: 220px;
}
table.matrix th.sticky-col { background: linear-gradient(180deg, #eef1fa, #e2e7f6); z-index: 4; }
table.matrix tr.absent td { opacity: .35; }
table.matrix tr.absent td.sticky-col { opacity: .6; }
.m-athlete { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.m-athlete .pos { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.m-cell {
  width: 46px; height: 42px; border-radius: 9px; border: 1.5px solid var(--border);
  background: #f8f9fd; font-weight: 800; font-size: 15px; color: #98a1bd; cursor: pointer;
  touch-action: manipulation; user-select: none; transition: background .1s, transform .05s;
}
.m-cell:active { transform: scale(.93); }
.m-cell[data-v="6"] { background: var(--nota-6); border-color: var(--nota-6); color: #fff; }
.m-cell[data-v="5"] { background: var(--nota-5); border-color: var(--nota-5); color: #fff; }
.m-cell[data-v="4"] { background: var(--nota-4); border-color: var(--nota-4); color: #fff; }
.m-cell[data-v="3"] { background: var(--nota-3); border-color: var(--nota-3); color: #fff; }
.m-cell[data-v="2"] { background: var(--nota-2); border-color: var(--nota-2); color: #fff; }
.m-cell[data-v="1"] { background: var(--nota-1); border-color: var(--nota-1); color: #fff; }
.presence-toggle {
  width: 40px; height: 40px; border-radius: 9px; border: 1.5px solid var(--border);
  background: #f1f3f9; cursor: pointer; font-size: 17px;
}
.presence-toggle.on { background: #dcfce7; border-color: #86efac; }
.note-btn { background: none; border: none; cursor: pointer; font-size: 15px; opacity: .45; }
.note-btn.has-note { opacity: 1; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 2px; align-items: center; }
.legend .dot { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; }
.col-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  border: 1.5px solid var(--border); background: #fff; color: var(--muted);
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.chip.on { background: var(--grad-cta); border-color: transparent; color: #fff; }

/* ---- Filtro de período ---- */
.period-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
  background: var(--grad-card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
  box-shadow: var(--shadow);
}
.period-bar .chip { padding: 7px 13px; }
.period-bar select, .period-bar input[type=date] { margin-top: 0; padding: 8px 10px; font-size: 13px; width: auto; max-width: 46vw; }
.period-bar .lbl { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; }

/* ---- Tabelas ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 9px 10px; background: linear-gradient(180deg, #f5f7fd, #edf0f9); color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.excelente { background: #dcfce7; color: #15803d; }
.badge.bom { background: #dbeafe; color: #1d4ed8; }
.badge.regular { background: #fef3c7; color: #b45309; }
.badge.ruim { background: #fee2e2; color: #b91c1c; }
.badge.neutral { background: #e6e9f3; color: #4a5578; }
.badge.melhora { background: #dcfce7; color: #15803d; }
.badge.queda { background: #fee2e2; color: #b91c1c; }
.badge.estavel { background: #e6e9f3; color: #4a5578; }
.badge.vitoria { background: #dcfce7; color: #15803d; }
.badge.derrota { background: #fee2e2; color: #b91c1c; }
.badge.empate { background: #e6e9f3; color: #4a5578; }

.trend-up { color: var(--excelente); font-weight: 700; }
.trend-down { color: var(--ruim); font-weight: 700; }
.trend-flat { color: var(--muted); font-weight: 700; }

/* ---- Prontidão / bem-estar ---- */
.readiness { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.readiness .ring, .ring {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; flex: none;
}
.ring.g { background: linear-gradient(135deg, #16a34a, #22c55e); }
.ring.y { background: linear-gradient(135deg, #d97706, #f59e0b); }
.ring.r { background: linear-gradient(135deg, #dc2626, #ef4444); }
.ring.na { background: #c9cfdf; color: #4a5578; }
.wellness-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.wellness-scale button {
  padding: 10px 2px; min-height: 46px; border-radius: 10px; border: 1.5px solid var(--border);
  background: #f8f9fd; cursor: pointer; font-size: 19px; touch-action: manipulation;
}
.wellness-scale button.selected { background: var(--grad-cta); border-color: transparent; }
.alert-tag { display: inline-block; background: #fee2e2; color: #b91c1c; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; margin: 1px 2px; }

/* ---- Painel de fundamentos ---- */
.fund-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 12px; }
.fund-card {
  background: var(--grad-kpi); border: 1px solid #e6e4f0; border-radius: var(--radius); padding: 14px;
}
.fund-card .name { font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.fund-card .avg { font-size: 28px; font-weight: 800; color: var(--navy); }
.fund-card .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fund-card .row { display: flex; align-items: baseline; justify-content: space-between; }

/* ---- Partidas ---- */
.match-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.match-row:last-child { border-bottom: none; }
.match-score {
  font-size: 20px; font-weight: 800; min-width: 64px; text-align: center;
  padding: 6px 10px; border-radius: 10px;
}
.match-score.vitoria { background: #dcfce7; color: #15803d; }
.match-score.derrota { background: #fee2e2; color: #b91c1c; }
.match-score.empate { background: #e6e9f3; color: #4a5578; }
.set-pill { display: inline-block; background: #eef1fa; color: var(--navy); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; margin: 2px 4px 2px 0; }
.form-dots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.form-dots .dot-w, .form-dots .dot-l {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 800;
}
.form-dots .dot-w { background: #16a34a; }
.form-dots .dot-l { background: #dc2626; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #f8f9fd;
  font-weight: 800; cursor: pointer; font-size: 15px; color: var(--navy);
  touch-action: manipulation;
}
.stepper .val { min-width: 26px; text-align: center; font-weight: 800; }

/* ---- Gráficos ---- */
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 360px; }
.chart-box.small { height: 230px; }

/* ---- Toast ---- */
#toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 13px 18px; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toast-in .25s ease; text-align: center; }
.toast.success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast.error { background: linear-gradient(135deg, #dc2626, #b91c1c); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11, 16, 39, .55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 520px; max-height: min(90vh, 90dvh); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.wide { max-width: 780px; }
.modal h3 { margin-bottom: 16px; color: var(--navy); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---- Relatório / impressão ---- */
.report-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
@media print {
  .topbar, .nav, .no-print, #toast-container, .period-bar { display: none !important; }
  .main { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; background: #fff; }
  .card::before { display: none; }
  body { background: #fff; }
}

.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 16px; }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar label.field { margin-bottom: 0; min-width: 220px; flex: 1 1 220px; max-width: 340px; }
.photo-preview { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 3px 5px; border-radius: 6px; }
.icon-btn:hover { background: #eef1fa; }

/* ---- Semana de Treinos ---- */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week-col {
  background: var(--grad-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; min-width: 0;
}
.week-col-head { font-size: 12px; font-weight: 800; color: var(--navy); text-align: center; text-transform: uppercase; letter-spacing: .4px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.week-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 14px 4px; font-style: italic; }
.week-add { align-self: stretch; }
.train-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px; box-shadow: 0 1px 2px rgba(20,28,58,.05); }
.train-card.editing { outline: 2px solid var(--orange); }
.train-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 5px; }
.train-actions { display: inline-flex; gap: 2px; }
.obj-badge { color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.train-time { font-size: 12px; color: var(--muted); font-weight: 600; }
.train-desc { font-size: 12px; margin: 5px 0; color: var(--text); }
.train-notes { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.block { width: 100%; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 8px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.video-note:last-child { border-bottom: none; }
.vn-corr { font-size: 12px; color: var(--excelente); margin-top: 3px; }

/* ---- Campeonatos ---- */
.set-pill.next { background: var(--orange); color: #fff; }
.prep-box { display: flex; gap: 22px; flex-wrap: wrap; background: var(--grad-kpi); border: 1px solid #e6e4f0; border-radius: 12px; padding: 12px 16px; }
.prep-box > div { display: flex; flex-direction: column; }
.prep-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--orange); font-weight: 700; }

/* ---- Partida ao vivo ---- */
.live-head .live-score { text-align: center; font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1; }
.live-head .live-score span { color: var(--muted); font-weight: 500; margin: 0 4px; }
.live-head .live-score small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.live-setctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-name { font-weight: 600; font-size: 14px; }
.live-proj { margin: 4px 0; }
.live-proj small, .live-stats small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin: 0 6px 0 2px; }
.live-stats { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.proj-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 6px; border-radius: 8px; font-size: 12px; font-weight: 800; color: #fff; }
.proj-chip.g { background: var(--excelente); }
.proj-chip.y { background: var(--regular); }
.proj-chip.r { background: var(--ruim); }
.proj-chip.na { background: #cbd2e0; color: #4a5578; }
.live-rate { margin: 8px 0 6px; }
.live-rate small { font-size: 11px; color: var(--muted); }
.rate-btns { display: inline-flex; gap: 4px; margin-left: 4px; }
.rate-btn { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--border); background: #f8f9fd; font-weight: 800; cursor: pointer; color: var(--navy); touch-action: manipulation; }
.rate-btn:active { transform: scale(.92); }
.sub-live { margin-top: 4px; }
.bench-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bench-row:last-child { border-bottom: none; }
.sub-list { max-height: 46vh; overflow-y: auto; }
.court-cell .court-warn { position: absolute; top: 6px; right: 8px; }

/* linhas de rodada / listas do fluxo (campeonatos, central) */
.champ-rounds { display: flex; flex-direction: column; gap: 2px; }
.round-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.round-row:last-child { border-bottom: none; }
.round-date { font-size: 14px; font-weight: 500; color: var(--text); }
.court-warn { font-size: 13px; }

/* ---- Escalação / quadra ---- */
.court {
  background: linear-gradient(160deg, #e88a54, #d9713a); border-radius: 14px; padding: 16px;
  border: 3px solid #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), var(--shadow);
}
.court-net { text-align: center; color: #fff; font-weight: 800; letter-spacing: 3px; font-size: 11px; padding: 4px; border-bottom: 3px dashed rgba(255,255,255,.8); margin-bottom: 12px; }
.court-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.court-cell {
  background: rgba(255,255,255,.92); border-radius: 10px; min-height: 76px; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
}
.court-cell.filled { background: #fff; }
.court-pos { position: absolute; top: 4px; left: 7px; font-size: 10px; font-weight: 800; color: var(--orange); }
.court-player { background: none; border: none; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 0; }
.court-player b { font-size: 18px; color: var(--navy); line-height: 1; }
.court-player span { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.1; }
.court-empty { color: #cbd2e6; font-size: 22px; }
.sub-btn { position: absolute; bottom: 3px; right: 4px; }
.court-empty + .sub-btn, .court-cell:not(.filled) .sub-btn { display: none; }

.starter-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.starter-row:last-child { border-bottom: none; }
.starter-row > span { flex: 1; display: flex; align-items: center; gap: 6px; }
.link-name { background: none; border: none; cursor: pointer; color: var(--navy); font-weight: 600; font-size: 14px; text-align: left; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.link-name:hover { color: var(--orange); text-decoration: underline; }
.link-name .avatar, .link-name .avatar-fallback { width: 28px; height: 28px; font-size: 11px; }

.lvl-bar { display: inline-block; width: 74px; height: 8px; border-radius: 6px; background: #e6e9f3; overflow: hidden; vertical-align: middle; }
.lvl-fill { display: block; height: 100%; border-radius: 6px; }
.lvl-fill.g { background: linear-gradient(90deg, #16a34a, #22c55e); }
.lvl-fill.y { background: linear-gradient(90deg, #d97706, #f59e0b); }
.lvl-fill.r { background: linear-gradient(90deg, #dc2626, #ef4444); }
.lvl-num { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 6px; }

.toggle-starter { border: 1.5px solid var(--border); background: #f1f3f9; color: var(--muted); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.toggle-starter.on { background: var(--grad-cta); border-color: transparent; color: #fff; }

.sub-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.sub-col-title { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.sub-arrow { font-size: 22px; padding-bottom: 6px; }
.sub-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: var(--grad-kpi); border-radius: 12px; padding: 14px; }
.sub-side { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.sub-verdict { text-align: center; }
.sub-diff { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 700; }

/* ============================================================
   RESPONSIVIDADE — tablet e celular
   ============================================================ */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .main { padding: 18px 18px 56px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .chart-box { height: 280px; }
}

/* Tablet retrato / celular grande (≤ 900px) */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar .brand small { display: none; }

  /* Abas viram menu suspenso: com 11 a 13 destinos, a barra rolável era difícil de usar */
  .nav { display: block; overflow: visible; padding: 0 12px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .16);
    max-height: 72vh; overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
  }
  .nav-links a.active {
    border-bottom-color: var(--border); border-left-color: var(--orange); background: #fff6f2;
  }
  /* Semana de treinos vira faixa rolável horizontal */
  .week-grid { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .week-col { min-width: 168px; flex: 0 0 168px; }
}

/* Celular (≤ 700px) */
@media (max-width: 700px) {
  .main { padding: 14px 12px 56px; }
  .page-title { font-size: 19px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .topbar .brand { font-size: 15px; gap: 7px; }
  .topbar .brand .logo-badge img { height: 26px; }
  .user-menu-btn .avatar, .user-menu-btn .avatar-fallback { width: 36px; height: 36px; }
  .user-dropdown { right: -4px; }
  .nav { padding: 0 8px; top: 54px; }
  .nav a { padding: 12px 11px; font-size: 13px; }
  .card { padding: 14px; }
  .kpi .value { font-size: 22px; }
  .chart-box { height: 240px; }
  .chart-box.small { height: 200px; }
  th, td { padding: 8px 7px; font-size: 13px; }
  .toolbar label.field { min-width: 100%; max-width: none; }
  .modal { padding: 18px 14px; border-radius: 14px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: 92dvh; }
  table.matrix th.sticky-col, table.matrix td.sticky-col { min-width: 128px; max-width: 150px; }
  .m-athlete { font-size: 12px; gap: 6px; }
  .m-athlete .avatar, .m-athlete .avatar-fallback { width: 28px; height: 28px; font-size: 11px; }
  .m-cell { width: 42px; height: 40px; }
  .match-score { font-size: 17px; min-width: 54px; }
  .period-bar { padding: 8px 10px; gap: 6px; }
  .period-bar .chip { padding: 6px 10px; font-size: 12px; }
  .login-card { padding: 26px 20px; }
  .login-card .login-logo-img { height: 105px; }
  .wellness-scale button { font-size: 17px; min-height: 42px; }
  .score-btn { min-height: 48px; font-size: 12px; }
  /* Escalação e substituição empilham no celular */
  .sub-grid { grid-template-columns: 1fr; gap: 8px; }
  .sub-arrow { display: none; }
  .prep-box { gap: 14px; }
  .court-player span { font-size: 10px; }
}

/* Celular estreito (≤ 400px) */
@media (max-width: 400px) {
  .score-row { gap: 5px; }
  .score-btn { font-size: 11px; padding: 12px 2px; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* Aviso curto sob um gráfico (ex.: dados insuficientes para traçar evolução) */
.chart-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---- Páginas-índice (hubs) ---- */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.hub-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.hub-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--orange));
}
.hub-card:hover, .hub-card:focus-visible {
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .13); border-color: var(--orange);
}
.hub-icon { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.hub-title { font-size: 15.5px; font-weight: 800; color: var(--navy); letter-spacing: -.2px; }
.hub-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---- Alternador de modo dentro de uma tela ---- */
.seg-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.seg-tabs button {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  padding: 9px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .14s ease;
}
.seg-tabs button:hover { border-color: var(--orange); color: var(--navy); }
.seg-tabs button.active { background: var(--orange); border-color: var(--orange); color: #fff; }

@media (max-width: 700px) {
  .hub-grid { grid-template-columns: 1fr; gap: 11px; }
  .hub-card { padding: 15px; }
  .seg-tabs button { flex: 1; padding: 9px 10px; font-size: 12.5px; }
}

/* Botão que parece link (ex.: "Esqueci minha senha" sob o formulário) */
.link-btn {
  display: block; width: 100%; margin-top: 12px; padding: 6px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: underline;
}
.link-btn:hover { color: var(--orange); }

/* ---- Pedidos de redefinição de senha / observações ---- */
.request-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.request-row:last-child { border-bottom: 0; }
.request-row .grow { flex: 1; min-width: 180px; }
.request-when { font-size: 12.5px; color: var(--muted); }

.obs-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.obs-item:last-child { border-bottom: 0; }
.obs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.obs-author { font-weight: 700; font-size: 13.5px; color: var(--navy); }
.obs-when { font-size: 12px; color: var(--muted); }
.obs-body { font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.obs-unread { border-left: 3px solid var(--orange); padding-left: 12px; background: #fff8f4; border-radius: 0 8px 8px 0; }

/* ---- Sino de avisos ---- */
.bell-menu { position: relative; }
.bell-btn {
  background: none; border: 0; cursor: pointer; position: relative;
  font-size: 20px; line-height: 1; padding: 8px; border-radius: 50%;
  filter: grayscale(1) brightness(2.4); transition: filter .15s, transform .1s;
}
.bell-btn:hover { transform: scale(1.08); }
.bell-btn.has-news { filter: none; animation: bell-nudge 2.4s ease-in-out 1s 2; }
@keyframes bell-nudge {
  0%, 88%, 100% { transform: rotate(0); }
  91% { transform: rotate(12deg); }
  94% { transform: rotate(-10deg); }
  97% { transform: rotate(6deg); }
}
.bell-badge {
  position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--orange); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--navy-deep);
}
.bell-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
  background: #fff; color: var(--text); border-radius: 14px;
  width: min(330px, calc(100vw - 24px));
  box-shadow: 0 12px 40px rgba(4, 8, 26, .35); border: 1px solid var(--border);
  overflow: hidden; animation: dd-in .14s ease; max-height: 70vh; overflow-y: auto;
}
.bell-section + .bell-section { border-top: 1px solid var(--border); }
.bell-title {
  font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .3px;
  padding: 11px 14px 5px; text-transform: uppercase;
}
.bell-item {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 9px 14px 11px; font-family: inherit; border-left: 3px solid transparent;
}
.bell-item:hover { background: #fff6f2; border-left-color: var(--orange); }
.bell-item b { font-size: 13.5px; color: var(--navy); }
.bell-item span { font-size: 12.5px; color: var(--muted); }
.bell-empty { padding: 20px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---- Questionário de autoavaliação ---- */
.sa-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sa-row:last-child { border-bottom: 0; }
.sa-label { font-weight: 700; font-size: 14px; color: var(--navy); margin-bottom: 7px; }
.sa-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sa-scale .score-btn { font-size: 12px; padding: 9px 4px; min-height: 42px; }

/* ---- Cartão do elenco (nota geral e atributos) ---- */
.squad-card { background: linear-gradient(135deg, #101740 0%, #1e2a5e 55%, #2b3a72 100%); color: #fff; border-color: transparent; }
.squad-card h3, .squad-card .page-sub { color: #fff; }
.squad-card .page-sub { opacity: .75; }
.squad-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.squad-overall {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px; height: 96px; border-radius: 16px; flex-shrink: 0;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25);
}
.squad-overall.alto { border-color: #4ade80; }
.squad-overall.medio { border-color: #fbbf24; }
.squad-overall.baixo { border-color: #f87171; }
.squad-value { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -2px; }
.squad-caption { font-size: 10px; font-weight: 800; letter-spacing: 1.6px; opacity: .7; margin-top: 4px; }
.squad-meta { flex: 1; min-width: 200px; }
.squad-physical { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 9px; font-size: 12.5px; opacity: .85; }
.squad-physical b { font-size: 14px; opacity: 1; }

.squad-attrs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 16px; }
.squad-attr {
  background: rgba(255,255,255,.09); border-radius: 10px; padding: 9px 4px; text-align: center;
  border-bottom: 3px solid rgba(255,255,255,.2);
}
.squad-attr.alto { border-bottom-color: #4ade80; }
.squad-attr.medio { border-bottom-color: #fbbf24; }
.squad-attr.baixo { border-bottom-color: #f87171; }
.attr-short { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; opacity: .65; }
.attr-value { display: block; font-size: 21px; font-weight: 800; line-height: 1.15; }

.squad-coverage { margin-top: 14px; }
.squad-coverage summary { cursor: pointer; font-size: 13px; font-weight: 700; opacity: .85; }
.coverage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.coverage-item { background: rgba(255,255,255,.07); border-radius: 9px; padding: 9px 11px; }
.coverage-item.vazia { background: rgba(248,113,113,.16); }
.coverage-item.apertada { background: rgba(251,191,36,.14); }
.coverage-pos { font-size: 12.5px; font-weight: 800; margin-bottom: 3px; }
.coverage-pos span { opacity: .6; font-weight: 600; }
.coverage-names { font-size: 12px; opacity: .8; line-height: 1.45; }
.coverage-names i { opacity: .6; font-style: normal; }

/* ---- Posições da atleta ---- */
.pos-edit { background: none; border: 0; cursor: pointer; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; font-family: inherit; }
.pos-chip {
  background: #eef1fa; color: var(--navy); border-radius: 999px;
  padding: 3px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.pos-chip.vazio { background: #f1f5f9; color: var(--muted); font-style: italic; }
.pos-edit:hover .pos-chip { background: var(--orange); color: #fff; }

/* ---- Arrastar para a quadra ---- */
.court-player[draggable="true"] { cursor: grab; }
.court-player.dragging, .link-name.dragging { opacity: .4; }
.court-cell.drop-target {
  outline: 2px dashed #fff; outline-offset: -5px;
  background: rgba(255, 255, 255, .22);
}
.link-name[draggable="true"] { cursor: grab; }

@media (max-width: 700px) {
  .squad-attrs { grid-template-columns: repeat(3, 1fr); }
  .squad-overall { min-width: 78px; height: 78px; }
  .squad-value { font-size: 32px; }
}

/* ---- Subabas: navegação dentro de um hub ---- */
/* Rola junto com o conteúdo de propósito: fixá-la exigiria calcular a altura da
   barra de abas, que muda entre tamanhos de tela e viraria sobreposição. */
.subnav {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 28px;
}
.subnav-back {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 10px 12px 10px 0; text-decoration: none;
  font-size: 13px; font-weight: 700; color: var(--muted);
  border-right: 1px solid var(--border); padding-right: 14px;
}
.subnav-back:hover { color: var(--orange); }
.subnav-back span { font-size: 15px; }
.subnav-tabs { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.subnav-tabs a {
  padding: 10px 12px; text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.subnav-tabs a:hover { color: var(--navy); }
.subnav-tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }

@media (max-width: 900px) {
  .subnav { padding: 0 12px; }
}
@media (max-width: 700px) {
  .subnav { gap: 8px; }
  .subnav-back { padding-right: 10px; font-size: 12.5px; }
  .subnav-tabs a { padding: 9px 9px; font-size: 12.5px; }
}
@media print { .subnav { display: none; } }

/* ---- Calendário de treinos ---- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 7px; }
.cal-label { font-weight: 800; color: var(--navy); font-size: 14.5px; min-width: 130px; text-align: center; text-transform: capitalize; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.cal-head {
  background: #f8f9fe; padding: 9px 6px; text-align: center;
  font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .5px; text-transform: uppercase;
}
.cal-day { background: #fff; min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-day.fora { background: #fbfcfe; }
.cal-day.fora .cal-day-head span { opacity: .35; }
.cal-day.hoje { background: #fff8f4; box-shadow: inset 0 0 0 2px var(--orange); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.cal-add {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 15px; line-height: 1; padding: 0 3px; opacity: 0; transition: opacity .12s;
}
.cal-day:hover .cal-add { opacity: 1; }
.cal-add:hover { color: var(--orange); }
.cal-sess {
  display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%;
  background: #f4f6fb; border: 0; border-left: 3px solid var(--navy); border-radius: 5px;
  padding: 5px 6px; cursor: pointer; text-align: left; font-family: inherit;
  font-size: 11.5px; font-weight: 600; color: var(--navy);
}
.cal-sess:hover { background: #eef1fa; }
.cal-sess-top { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-pres { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.week-col.hoje .week-col-head { background: var(--orange); color: #fff; }

/* ---- Chamada de presença ---- */
.att-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px; max-height: 46vh; overflow-y: auto; }
.att-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; cursor: pointer; font-family: inherit; font-size: 13.5px;
}
.att-item.on { background: #f0fdf4; border-color: #86efac; }
.att-item .att-check {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e5e7eb; color: var(--muted); font-weight: 800; font-size: 12px;
}
.att-item.on .att-check { background: #16a34a; color: #fff; }
.att-item .avatar, .att-item .avatar-fallback { width: 26px; height: 26px; font-size: 10px; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-name i { color: var(--muted); font-style: normal; font-size: 12px; }

@media (max-width: 700px) {
  .cal-day { min-height: 72px; padding: 4px; }
  .cal-day-head { font-size: 11.5px; }
  .cal-add { opacity: 1; }
  .cal-sess { font-size: 10px; padding: 3px 4px; }
  .cal-pres { display: none; }
  .cal-label { min-width: 100px; font-size: 13px; }
  .att-list { grid-template-columns: 1fr; }
}

/* ---- Saudação do painel da atleta ---- */
.hello {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--grad-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.hello::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--orange));
}
.hello-text { flex: 1; min-width: 180px; }
.hello-text h2 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--navy); margin: 0; }
.hello-text p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; text-transform: capitalize; }
.hello-ring { flex-shrink: 0; }

/* título que separa blocos de uma tela */
.section-title {
  font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); margin: 24px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.section-title:first-of-type { margin-top: 4px; }

/* ---- Assiduidade do check-in ---- */
.assiduity { margin-top: 12px; }
.assiduity-bar { height: 6px; background: #eef1fa; border-radius: 999px; overflow: hidden; }
.assiduity-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--orange)); border-radius: 999px; }
.assiduity-text { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.assiduity-text b { color: var(--navy); }

/* ---- Ajuda por tela (botão "i") ---- */
.help-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 0; background: var(--grad-bar); color: #fff;
  font-family: Georgia, 'Times New Roman', serif; font-size: 20px; font-weight: 700; font-style: italic;
  box-shadow: 0 6px 18px rgba(11, 16, 39, .35);
  transition: transform .12s, box-shadow .12s;
}
.help-fab:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(11, 16, 39, .45); }
.help-list { margin: 10px 0 0; padding-left: 20px; }
.help-list li { margin-bottom: 9px; font-size: 14px; line-height: 1.55; }
.help-list li::marker { color: var(--orange); }

/* ---- Tour guiado ---- */
.tour { text-align: center; padding: 4px 2px; }
.tour-icon {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: linear-gradient(135deg, #eef1fa, #fdf2ea); border: 1px solid var(--border);
}
.tour h3 { font-size: 19px; color: var(--navy); margin-bottom: 8px; }
.tour p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background .15s, width .15s; }
.tour-dots span.on { background: var(--orange); width: 18px; border-radius: 999px; }
.tour-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  .help-fab { right: 12px; bottom: 12px; width: 38px; height: 38px; font-size: 18px; }
  .tour-actions .btn { flex: 1; min-width: 96px; }
}
@media print { .help-fab { display: none; } }

/* Cartão de estado do time durante a partida ao vivo */
.live-overall .squad-overall { min-width: 84px; height: 84px; }
.live-overall .squad-value { font-size: 34px; }
.live-name[draggable="true"] { cursor: grab; }
.live-name.dragging { opacity: .4; }

/* Ações na linha de uma rodada do campeonato */
.round-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---- Faixa de partida em andamento ---- */
.live-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, #7f1d1d, #b91c1c); color: #fff;
  padding: 9px 28px; font-size: 13.5px;
}
.live-strip-text { flex: 1; min-width: 180px; }
.live-strip-text small { display: block; opacity: .75; font-size: 12px; }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #fff; flex-shrink: 0;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@media (max-width: 900px) { .live-strip { padding: 9px 12px; } }
@media print { .live-strip { display: none; } }

/* ---- Rodadas do campeonato ---- */
.round-form { display: grid; grid-template-columns: 1fr 110px 1.4fr auto; gap: 8px; margin-bottom: 12px; }
.round-form input { margin: 0; }
.round-list { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow-y: auto; }
.round-item {
  display: flex; align-items: center; gap: 10px;
  background: #f8f9fe; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px;
}
.round-when { font-weight: 700; font-size: 13px; color: var(--navy); white-space: nowrap; }
.round-opp { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round-opp i { opacity: .7; }
.field-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 400; }

@media (max-width: 700px) {
  .round-form { grid-template-columns: 1fr 1fr; }
  .round-form input[type="text"], .round-form button { grid-column: span 2; }
}

/* Com 6 níveis os botões de nota ficam menores; duas colunas no celular */
.sa-scale { grid-template-columns: repeat(3, 1fr); }
.score-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.score-row .score-btn { font-size: 11.5px; padding: 10px 2px; min-height: 46px; }
.rate-btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }

@media (max-width: 700px) {
  .sa-scale { grid-template-columns: repeat(2, 1fr); }
  .score-row { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Avaliação quantitativa: acertos e erros ---- */
.kind-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px; }
.kind-toggle button {
  border: 1.5px solid var(--border); background: #f8f9fd; border-radius: 11px; padding: 10px 12px;
  font-weight: 800; font-size: 14px; color: var(--navy); cursor: pointer; text-align: left;
}
.kind-toggle button small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kind-toggle button.active { border-color: var(--orange); background: #fff4ee; box-shadow: 0 0 0 3px rgba(242,112,62,.15); }

.q-cell { display: inline-grid; grid-template-columns: auto auto; gap: 3px; align-items: center; justify-items: center; }
.q-cell .q-eff { grid-column: span 2; }
.q-btn {
  min-width: 44px; height: 36px; padding: 0 6px; border-radius: 9px; border: 1.5px solid var(--border);
  background: #f8f9fd; font-size: 13px; cursor: pointer; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.q-btn b { font-size: 14px; }
.q-btn.ok { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.q-btn.err { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.q-btn:active { transform: scale(.93); }
.q-eff { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; color: #fff; }
.q-eff.g { background: var(--excelente); }
.q-eff.y { background: var(--regular); }
.q-eff.r { background: var(--ruim); }
.q-eff.na { background: #e3e7f0; color: #5f6884; }
table.matrix.quanti td { padding: 6px 8px; }

.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.q-label { font-weight: 700; font-size: 13px; color: var(--navy); }
.q-sum { font-size: 12px; font-weight: 700; color: var(--muted); }

.live-evalsum { min-height: 0; margin: 4px 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.live-evalsum:empty { display: none; }
.live-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.bench-row.played { background: #fbfcff; }
.bench-eval { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }

table tr.total-row td { background: #f4f6fb; }
table tr.me-row td { background: #fff4ee; }
.mode-toggle.compact { margin: 0; }
.mode-toggle.compact button { padding: 6px 10px; font-size: 12.5px; }

/* ---- Boas-vindas ---- */
.welcome-logo { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 10px; display: block; }
.welcome h3 { font-size: 22px; }

@media (max-width: 700px) {
  .kind-toggle button { font-size: 13px; padding: 8px 10px; }
  .q-btn { min-width: 40px; height: 34px; }
}
