/*! CPRT Futsal — © 2026 Ricardo Ferreira. Todos os direitos reservados. Software proprietário licenciado (ver LICENCA.txt). */
/* =========================================================================
   CPRT Futsal — Design system
   Marca: azul FC Porto #234C98 · navy #0E2A5C · tipografia Barlow / Barlow Condensed
   ========================================================================= */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: italic; font-display: swap; src: url(../fonts/barlow-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: italic; font-display: swap; src: url(../fonts/barlow-condensed-latin-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); }

:root {
  --brand: #234C98;
  --brand-600: #1C3F82;
  --brand-700: #16336B;
  --navy: #0E2A5C;
  --navy-900: #081A3D;
  --sky: #EAF1FB;
  --sky-2: #D8E5F8;
  --gold: #E9B949;
  --red: #D52B1E;

  --bg: #F3F6FB;
  --bg-grad: radial-gradient(1200px 500px at 90% -10%, #DCE8FA 0%, transparent 60%), radial-gradient(900px 400px at -10% 110%, #E6EEFB 0%, transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F7F9FD;
  --surface-3: #EEF3FA;
  --border: #E1E8F3;
  --border-strong: #CBD6E8;
  --text: #0D1B33;
  --text-2: #43516B;
  --muted: #6B7A93;
  --primary: var(--brand);
  --primary-ink: #FFFFFF;
  --primary-soft: #E7EEFB;
  --primary-soft-ink: #1C3F82;
  --focus: #3B82F6;

  --ok: #16A34A;   --ok-soft: #E3F6EA;
  --warn: #D97706; --warn-soft: #FDF1DE;
  --bad: #DC2626;  --bad-soft: #FDE7E7;
  --violet: #7C3AED; --violet-soft: #EEE7FD;

  --shadow-1: 0 1px 2px rgba(13, 27, 51, .05), 0 1px 1px rgba(13, 27, 51, .03);
  --shadow-2: 0 6px 20px -6px rgba(14, 42, 92, .14), 0 2px 6px rgba(14, 42, 92, .05);
  --shadow-3: 0 24px 60px -12px rgba(8, 26, 61, .32);

  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --sidebar-w: 264px;
  --topbar-h: 68px;
  --bottomnav-h: 68px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --t-fast: 140ms; --t: 240ms; --t-slow: 420ms;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #060E1D;
  --bg-grad: radial-gradient(1100px 500px at 90% -10%, rgba(35, 76, 152, .28) 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(35, 76, 152, .18) 0%, transparent 60%);
  --surface: #0D1829;
  --surface-2: #111E33;
  --surface-3: #16253E;
  --border: #1D2C46;
  --border-strong: #2A3C5C;
  --text: #E8EEF9;
  --text-2: #B4C1D8;
  --muted: #8494B0;
  --primary: #4F7FE0;
  --primary-soft: rgba(79, 127, 224, .16);
  --primary-soft-ink: #A9C3F5;
  --ok-soft: rgba(22, 163, 74, .16); --warn-soft: rgba(217, 119, 6, .18); --bad-soft: rgba(220, 38, 38, .18); --violet-soft: rgba(124, 58, 237, .2);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060E1D;
    --bg-grad: radial-gradient(1100px 500px at 90% -10%, rgba(35, 76, 152, .28) 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(35, 76, 152, .18) 0%, transparent 60%);
    --surface: #0D1829; --surface-2: #111E33; --surface-3: #16253E;
    --border: #1D2C46; --border-strong: #2A3C5C;
    --text: #E8EEF9; --text-2: #B4C1D8; --muted: #8494B0;
    --primary: #4F7FE0; --primary-soft: rgba(79, 127, 224, .16); --primary-soft-ink: #A9C3F5;
    --ok-soft: rgba(22, 163, 74, .16); --warn-soft: rgba(217, 119, 6, .18); --bad-soft: rgba(220, 38, 38, .18); --violet-soft: rgba(124, 58, 237, .2);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .5); --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.5; color: var(--text);
  background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
.i { width: 20px; height: 20px; flex: none; }
a.card, a.card:hover { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
code { font-size: .9em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: .005em; text-transform: uppercase; }
.eyebrow { font-family: var(--font-display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--primary); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide-mobile { }
.only-mobile { display: none !important; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; transition: opacity .35s var(--ease-out), visibility .35s; }
.boot img { animation: bootPulse 1.2s var(--ease-out) infinite alternate; }
.boot.is-hidden { opacity: 0; visibility: hidden; }
@keyframes bootPulse { from { transform: scale(.94); opacity: .7; } to { transform: scale(1); opacity: 1; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; padding: 8px 32px 48px; max-width: 1440px; width: 100%; margin: 0 auto; outline: none; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); color: #DCE6F7;
  padding: 20px 14px 12px; overflow: hidden; isolation: isolate;
}
.sb-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; padding: 0 8px 8px 22px; margin-left: -22px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); }
.sb-nav::-webkit-scrollbar { width: 6px; } .sb-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 6px; }
.sb-foot { display: flex; gap: 6px; align-items: stretch; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-foot .sb-user { flex: 1; min-width: 0; }
.sb-logout { flex: none; width: 48px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #C9D6EE; display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); }
.sb-logout:hover { background: rgba(220, 38, 38, .85); color: #fff; }
.sb-logout .i { width: 20px; height: 20px; }
@media (max-height: 860px) {
  .sidebar { padding-top: 14px; }
  .sb-brand { padding-bottom: 10px; }
  .sb-section { padding: 10px 12px 4px; }
  .sb-link { min-height: 40px; padding: 8px 12px; }
}
@media (max-height: 700px) {
  .sb-link { min-height: 36px; padding: 6px 12px; font-size: 14.5px; }
  .sb-credit { display: none; }
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, transparent 58px, #fff 59px, #fff 60px, transparent 61px),
    linear-gradient(#fff, #fff) 50% 0 / 1px 100% no-repeat;
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; color: #fff; }
.sb-brand img.crest { width: 40px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.sb-brand .wm { width: 118px; height: auto; }
.sb-brand small { display: block; font-family: var(--font-display); font-style: italic; font-weight: 700; letter-spacing: .08em; font-size: 11.5px; color: #93AEE0; text-transform: uppercase; margin-top: 2px; }
.sb-section { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; color: #7F97C4; padding: 14px 12px 6px; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 12px;
  color: #C9D6EE; font-weight: 600; font-size: 15px; transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
}
.sb-link svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.sb-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-link.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.sb-link.is-active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #fff; }
.sb-link .count { margin-left: auto; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .14); color: #fff; padding: 1px 8px; border-radius: 99px; }
.sb-link .count.alert { background: var(--gold); color: var(--navy-900); }
.sb-spacer { flex: 1; }
.sb-credit { display: block; text-align: center; font-size: 11.5px; color: #6F86B3; padding: 8px 4px 0; }
.sb-credit:hover { color: #C9D6EE; }
.licbar { display: flex; align-items: center; gap: 10px; padding: 10px 32px; font-size: 14px; font-weight: 600; }
.licbar[hidden] { display: none; }
.licbar .i { width: 18px; height: 18px; }
.licbar a { margin-left: auto; font-weight: 700; white-space: nowrap; color: inherit; text-decoration: underline; }
.licbar.is-warn { background: var(--warn-soft); color: var(--warn); }
.licbar.is-bad { background: var(--bad-soft); color: var(--bad); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #fff; border: 0; text-align: left; width: 100%; }
.sb-user:hover { background: rgba(255, 255, 255, .1); }
.sb-user small { display: block; color: #93AEE0; font-size: 12.5px; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
  padding: 0 32px; max-width: 1440px; width: 100%; margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar::after { content: ""; position: absolute; left: 32px; right: 32px; bottom: 0; height: 1px; background: var(--border); opacity: 0; transition: opacity var(--t); }
.topbar.is-scrolled::after { opacity: 1; }
.tb-mobile-brand { display: none; }
.tb-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 26px; letter-spacing: .01em; line-height: 1; }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.team-switch {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 10px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-1); font-weight: 600; max-width: 280px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.team-switch:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.team-switch:active { transform: scale(.98); }
.team-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.team-switch .ellipsis { max-width: 180px; }
.team-switch .i { width: 18px; height: 18px; color: var(--muted); }
.sb-user > .i { width: 18px; height: 18px; color: #93AEE0; }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav { display: none; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 14px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 3.4vw, 44px); line-height: .95; letter-spacing: .005em; }
.page-head h1 em { font-style: italic; color: var(--primary); font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 8px; min-height: 32px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 18px; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 18px; height: 18px; color: var(--primary); }
.card-link { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.card-link svg { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease-out); }
.card-link:hover svg { transform: translateX(3px); }
.card.is-interactive { transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), border-color var(--t); cursor: pointer; }
.card.is-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.card.is-interactive:active { transform: translateY(0) scale(.995); }
.card-flush { padding: 0; overflow: hidden; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-dash { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g-cards-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* hero card (dashboard) */
.hero {
  position: relative; overflow: hidden; color: #fff; border: 0; padding: 26px 28px; isolation: isolate;
  background: linear-gradient(120deg, var(--navy) 0%, var(--brand) 62%, #3C6BC4 100%);
  box-shadow: 0 18px 40px -18px rgba(14, 42, 92, .6);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
  background:
    radial-gradient(circle at 78% 50%, transparent 70px, #fff 71px, #fff 72.5px, transparent 73.5px),
    linear-gradient(#fff, #fff) 78% 0 / 1.5px 100% no-repeat;
}
.hero .crest-bg { position: absolute; right: -30px; bottom: -60px; width: 260px; opacity: .08; z-index: -1; transform: rotate(-8deg); }
.hero .eyebrow { color: #A9C3F5; }
.hero h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(28px, 3vw, 40px); line-height: .95; margin: 6px 0 10px; }
.hero p { color: #D6E2F7; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: #E3EBFA; font-weight: 600; font-size: 14.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 17px; height: 17px; opacity: .85; }

/* KPI */
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 13.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-soft-ink); flex: none; }
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.005em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 22px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.kpi-sub { font-size: 13.5px; color: var(--muted); }
.kpi .spark { position: absolute; right: 20px; top: 24px; width: 34%; height: 30px; opacity: .9; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 15px; white-space: nowrap; user-select: none; position: relative;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out), opacity var(--t-fast);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-primary:hover { --btn-bg: color-mix(in srgb, var(--primary) 88%, #000); border-color: transparent; box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 75%, transparent); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-soft-ink); --btn-bd: transparent; }
.btn-soft:hover { --btn-bg: color-mix(in srgb, var(--primary-soft) 70%, var(--primary) 12%); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-bd: var(--border); }
.btn-ghost:hover { --btn-bg: var(--surface-3); }
.btn-plain { --btn-bg: transparent; --btn-bd: transparent; }
.btn-plain:hover { --btn-bg: var(--surface-3); border-color: transparent; box-shadow: none; }
.btn-danger { --btn-bg: var(--bad-soft); --btn-fg: var(--bad); --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: var(--bad); --btn-fg: #fff; border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 16.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading svg { opacity: 0; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.btn-primary).is-loading::after { border-color: var(--border-strong); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.fab {
  display: none; position: fixed; right: 18px; bottom: calc(var(--bottomnav-h) + 18px + env(safe-area-inset-bottom)); z-index: 40;
  width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--primary); color: #fff;
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 80%, transparent); place-items: center;
  transition: transform var(--t) var(--ease-spring);
  animation: fabIn .5s var(--ease-spring) both .15s;
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(.92); }
@keyframes fabIn { from { transform: scale(.4) rotate(-45deg); opacity: 0; } }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap;
  transition: all var(--t-fast) var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-on { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip svg { width: 16px; height: 16px; }
.chip .n { font-size: 12px; opacity: .65; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-brand { background: var(--primary-soft); color: var(--primary-soft-ink); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge svg { width: 14px; height: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 16px; transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7A93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.field small { color: var(--muted); font-size: 12.5px; }
.field.is-invalid input { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: 13px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; }
.form-section { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; color: var(--muted); margin: 8px 0 -2px; grid-column: 1 / -1; }

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-3); border-radius: 12px; position: relative; }
.seg button svg { width: 16px; height: 16px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0 14px; min-height: 36px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); white-space: nowrap; }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.toggle-days { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-days label { position: relative; }
.toggle-days input { position: absolute; opacity: 0; inset: 0; }
.toggle-days span { display: grid; place-items: center; width: 46px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all var(--t-fast); }
.toggle-days input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.toggle-days input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }

.alert { padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14.5px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--primary-soft); color: var(--primary-soft-ink); }

/* ---------- avatars ---------- */
.avatar {
  --av: 44px; width: var(--av); height: var(--av); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--av-bg, var(--primary-soft)); color: var(--av-fg, var(--primary-soft-ink)); font-family: var(--font-display); font-weight: 700;
  font-size: calc(var(--av) * .38); letter-spacing: .02em; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --av: 34px; } .avatar-lg { --av: 64px; } .avatar-xl { --av: 112px; }
.shirt { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--navy); color: #fff; font-size: 12px; font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar-wrap { position: relative; flex: none; }
.avatar-sm + .shirt { min-width: 18px; height: 18px; font-size: 10.5px; right: -7px; bottom: -5px; padding: 0 4px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); min-height: 56px; }
.list-item:first-child { border-top: 0; }
a.list-item, button.list-item { color: inherit; border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; width: 100%; border-radius: 10px; transition: background var(--t-fast); padding-left: 8px; padding-right: 8px; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
.li-title { font-weight: 600; }
.li-sub { font-size: 13.5px; color: var(--muted); }
.li-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table .sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.table tbody tr:hover .sticky-col { background: var(--surface-2); }

/* attendance matrix */
.att-cell { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; font-family: var(--font-display); margin: 0 auto; }
.att-P { background: var(--ok-soft); color: var(--ok); }
.att-A { background: #EEF8DA; color: #4D7C0F; }
.att-J { background: var(--warn-soft); color: var(--warn); }
.att-L { background: var(--violet-soft); color: var(--violet); }
.att-F { background: var(--bad-soft); color: var(--bad); }
.att-none { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .att-A { background: rgba(132, 204, 22, .16); color: #A3E635; }

/* attendance marker (per session) */
.att-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--border); }
.att-row:first-child { border-top: 0; }
.att-opts { margin-left: auto; display: flex; gap: 6px; }
.att-opt {
  width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--muted);
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.att-opt:active { transform: scale(.88); }
.att-opt.is-on { color: #fff; border-color: transparent; animation: pop .28s var(--ease-spring); }
.att-opt[data-s="P"].is-on { background: var(--ok); }
.att-opt[data-s="A"].is-on { background: #65A30D; }
.att-opt[data-s="J"].is-on { background: var(--warn); }
.att-opt[data-s="L"].is-on { background: var(--violet); }
.att-opt[data-s="F"].is-on { background: var(--bad); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.att-summary { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- player cards ---------- */
.player-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; position: relative; overflow: hidden; }
.player-card .pc-top { display: flex; align-items: center; gap: 14px; }
.player-card .pc-num { position: absolute; right: 14px; top: 4px; font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 1; color: var(--primary); opacity: .09; pointer-events: none; }
.player-card .pc-name { font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-stat { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.pc-stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pc-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pc-inactive { opacity: .6; }

/* meter */
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); width: 0; transition: width .9s var(--ease-out); }

/* ---------- profile ---------- */
.profile-hero { display: flex; gap: 22px; align-items: center; }
.profile-hero .big-num { font-family: var(--font-display); font-weight: 800; font-size: 96px; line-height: .8; color: var(--primary); opacity: .14; margin-left: auto; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.info-grid dt { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.info-grid dd { margin: 2px 0 0; font-weight: 600; }
.att-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.att-dots i { width: 16px; height: 16px; border-radius: 5px; display: block; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; border: 0; background: none; padding: 12px 14px; min-height: 46px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color var(--t-fast); }
.tab:hover { color: var(--text); }
.tab.is-on { color: var(--text); }
.tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); animation: tabIn .3s var(--ease-out); }
@keyframes tabIn { from { transform: scaleX(.3); opacity: 0; } }

/* ---------- sessions / calendar ---------- */
.date-tile { width: 56px; flex: none; border-radius: 14px; text-align: center; padding: 6px 0 7px; background: var(--surface-3); line-height: 1; }
.date-tile b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.date-tile span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.date-tile.is-today { background: var(--primary); color: #fff; }
.date-tile.is-today span { color: #CFE0FF; }
.date-tile.is-match { background: var(--navy); color: #fff; }
.date-tile.is-match span { color: #A9C3F5; }
.session-card { display: flex; gap: 16px; align-items: center; padding: 14px 16px; }
.session-card .sc-body { flex: 1; min-width: 0; }
.session-card .sc-title { font-weight: 700; }
.session-card .sc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.session-card .sc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.session-card .sc-meta svg { width: 15px; height: 15px; }
.month-label { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-size: 14px; margin: 22px 0 10px; }
.month-label:first-child { margin-top: 0; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; letter-spacing: .06em; }
.cal-d { min-height: 92px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); min-width: 0; }
.cal-d:hover { border-color: var(--border-strong); }
.cal-d.is-out { opacity: .45; }
.cal-d.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-d .n { font-weight: 700; font-size: 13px; color: var(--muted); }
.cal-d.is-today .n { color: var(--primary); }
.cal-ev { font-size: 12px; font-weight: 600; padding: 3px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-soft-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.is-match { background: var(--navy); color: #fff; }
.cal-ev.is-done { background: var(--ok-soft); color: var(--ok); }

/* session plan builder */
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); transition: box-shadow var(--t), transform var(--t) var(--ease-out); }
.plan-item.is-dragging { box-shadow: var(--shadow-3); transform: scale(1.02); z-index: 5; position: relative; }
.plan-item .handle { cursor: grab; color: var(--muted); padding: 10px 2px; touch-action: none; }
.plan-item .handle svg { width: 18px; height: 18px; }
.plan-item .pi-fields { display: grid; grid-template-columns: 1fr 110px 120px 130px; gap: 8px; }
.plan-item .pi-fields input, .plan-item .pi-fields select { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.plan-item .pi-thumb { width: 88px; border-radius: 8px; overflow: hidden; }
.plan-total { display: flex; gap: 14px; align-items: center; font-weight: 600; color: var(--text-2); }
.phase-tag { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.tl-time { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--primary); text-align: right; padding-top: 2px; }
.tl-time small { display: block; font-size: 12px; color: var(--muted); font-family: var(--font); font-weight: 600; }
.tl-card { border-left: 3px solid var(--primary); padding: 2px 0 2px 16px; }
.tl-card .row { align-items: flex-start; }

/* ---------- exercise library ---------- */
.ex-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ex-thumb { position: relative; aspect-ratio: 2 / 1.05; background: #1B6E45; overflow: hidden; }
.ex-thumb svg { width: 100%; height: 100%; }
.ex-thumb .fav { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 0; color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast); }
.ex-thumb .fav svg { width: 19px; height: 19px; }
.ex-thumb .fav.is-on { color: #FFD166; }
.ex-thumb .fav.is-on svg { fill: currentColor; }
.ex-thumb .fav:active { transform: scale(.85); }
.ex-thumb .cat { position: absolute; left: 10px; top: 10px; }
.ex-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ex-title { font-weight: 700; font-size: 16px; line-height: 1.25; }
.ex-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.ex-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ex-meta svg { width: 14px; height: 14px; }
.int-Baixa { color: var(--ok); } .int-Média { color: var(--warn); } .int-Alta { color: var(--bad); }
.cat-badge { background: rgba(255, 255, 255, .92); color: #10213F; }
.prose h4 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: 15px; color: var(--muted); margin: 18px 0 6px; }
.prose p { white-space: pre-line; color: var(--text-2); }
.prose ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.prose li { margin: 3px 0; }

/* ---------- tactical board ---------- */
.board { position: relative; border-radius: 16px; overflow: hidden; background: #1B6E45; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); user-select: none; -webkit-user-select: none; }
.board svg { width: 100%; height: auto; touch-action: none; }
.board-static { aspect-ratio: 2 / 1.05; }
.board-static svg, .tl-thumb svg, .pi-thumb svg { width: 100%; height: 100%; }
.tl-thumb, .pi-thumb { aspect-ratio: 2 / 1.05; background: #1B6E45; }
.board-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; }
.board-tools .sep { width: 1px; height: 28px; background: var(--border-strong); margin: 0 4px; }
.tool { min-width: 44px; height: 44px; border-radius: 11px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; color: var(--text-2); padding: 0 8px; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.tool:hover { background: var(--surface-3); }
.tool:active { transform: scale(.92); }
.tool.is-on { background: var(--primary); color: #fff; }
.tool svg { width: 22px; height: 22px; }
.board-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.bd-item { cursor: grab; }
.bd-item.is-sel .sel-ring { opacity: 1; }
.sel-ring { opacity: 0; transition: opacity var(--t-fast); }

/* ---------- evaluations ---------- */
.score-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 8px 0; }
.score-row .lbl { font-weight: 600; }
.score-val { font-family: var(--font-display); font-weight: 800; font-size: 22px; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.score-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--vcolor, var(--primary)); height: 28px; }
.val-block { border-radius: 16px; padding: 14px 16px 8px; background: var(--surface-2); border: 1px solid var(--border); }
.val-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.val-head b { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 18px; letter-spacing: .03em; }
.val-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.val-pill i { width: 10px; height: 10px; border-radius: 3px; }
.eval-score { font-family: var(--font-display); font-weight: 800; font-size: 18px; min-width: 42px; height: 32px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.sc-hi { background: var(--ok-soft); color: var(--ok); } .sc-mid { background: var(--warn-soft); color: var(--warn); } .sc-lo { background: var(--bad-soft); color: var(--bad); } .sc-none { background: var(--surface-3); color: var(--muted); }
.delta { font-size: 12.5px; font-weight: 700; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.heat td.hc { text-align: center; }

/* ---------- matches ---------- */
.match-card { padding: 0; overflow: hidden; }
.mc-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--muted); gap: 8px; }
.mc-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 18px 16px; }
.mc-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 14.5px; min-width: 0; }
.mc-team img { width: 44px; height: auto; }
.opp-badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--text-2); }
.mc-score { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-align: center; }
.mc-score small { display: block; font-size: 13px; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-top: 4px; }
.mc-vs { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 30px; color: var(--muted); }
.card-y, .card-r { display: inline-block; width: 11px; height: 15px; border-radius: 2px; margin-right: 3px; vertical-align: -2px; background: #FACC15; } .card-r { background: var(--bad); }
.res-V { color: var(--ok); } .res-D { color: var(--bad); } .res-E { color: var(--warn); }
.form-pill { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #fff; }
.form-pill.V { background: var(--ok); } .form-pill.E { background: var(--warn); } .form-pill.D { background: var(--bad); }
.callup-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--border); }
.callup-row:first-child { border-top: 0; }
.callup-row.is-off { opacity: .55; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: background var(--t) var(--ease-out); }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform var(--t) var(--ease-spring); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--surface-2); font-weight: 800; font-size: 17px; color: var(--text-2); }
.stepper button:active { background: var(--surface-3); }
.stepper output { width: 30px; text-align: center; font-weight: 800; font-family: var(--font-display); font-size: 18px; }
.stat-grid { display: grid; grid-template-columns: minmax(160px, 1.4fr) repeat(5, auto); gap: 8px 14px; align-items: center; }
.poster-preview { width: 100%; max-width: 420px; border-radius: 16px; box-shadow: var(--shadow-2); margin: 0 auto; }

/* ---------- plan (planeamento) ---------- */
.week-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 18px; }
.week-date { border-right: 1px solid var(--border); padding-right: 14px; }
.week-date b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; }
.week-date span { font-size: 13px; color: var(--muted); font-weight: 600; }
.week-date.is-current b { color: var(--primary); }
.focus-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.focus-bar i { display: block; height: 100%; transition: flex-grow .8s var(--ease-out); }
.focus-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.focus-legend span { display: inline-flex; align-items: center; gap: 5px; }
.focus-legend i { width: 9px; height: 9px; border-radius: 3px; }
.week-sessions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- documentos ---------- */
.doc-tile { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; min-height: 132px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.doc-tile .badge { min-height: 28px; height: auto; padding: 4px 10px; font-size: 13px; white-space: normal; line-height: 1.25; }
@media (max-width: 560px) { .doc-tile { min-height: 0; padding: 14px; } .doc-row { flex-wrap: wrap; } .doc-row .li-end { width: 100%; justify-content: flex-end; margin-left: 0; } }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 2px dashed var(--border-strong); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone.has-file b { color: var(--ok); }

/* ---------- empty / skeleton ---------- */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-art { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-soft-ink); margin-bottom: 6px; }
.empty-art svg { width: 44px; height: 44px; }
.empty h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 22px; }
.empty p { color: var(--muted); max-width: 380px; }
.skel { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; border-radius: 12px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease-out) forwards .1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .fade { opacity: 0; animation: fadeIn .6s var(--ease-out) forwards .5s; }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease-out) both; }
@keyframes grow { from { transform: scaleY(0); } }
.chart .radar-shape { transform-box: fill-box; transform-origin: center; animation: radarIn .8s var(--ease-spring) both .1s; }
@keyframes radarIn { from { transform: scale(.2); opacity: 0; } }
.chart .pt { transition: r var(--t-fast); }
.chart-tip { position: fixed; pointer-events: none; z-index: 300; background: var(--text); color: var(--surface); padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-2); opacity: 0; transform: translate(-50%, -120%); transition: opacity var(--t-fast); white-space: nowrap; }
.chart-tip.is-on { opacity: 1; }
.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--surface-3); }
.ring .ring-fg { transition: stroke-dashoffset 1.1s var(--ease-out); stroke-linecap: round; }
.ring .ring-label { position: absolute; text-align: center; line-height: 1; }
.ring .ring-label b { font-family: var(--font-display); font-weight: 800; font-size: 28px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(6, 14, 29, .5); z-index: 100; opacity: 0; transition: opacity var(--t) var(--ease-out); backdrop-filter: blur(2px); }
.scrim.is-open { opacity: 1; }
.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%; width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); display: flex; flex-direction: column;
  transform: translate(-50%, -48%) scale(.96); opacity: 0; transition: transform var(--t-slow) var(--ease-spring), opacity var(--t) var(--ease-out);
}
.modal.modal-lg { width: min(980px, calc(100vw - 32px)); }
.modal.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.modal-head h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .01em; }
.modal-body { padding: 6px 22px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.grabber { display: none; }

.menu { position: fixed; z-index: 120; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-3); padding: 6px; transform-origin: top right; animation: menuIn .2s var(--ease-out); }
@keyframes menuIn { from { opacity: 0; transform: scale(.95) translateY(-4px); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; background: none; border-radius: 10px; font-weight: 600; text-align: left; color: var(--text); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); }
.menu-item svg { width: 18px; height: 18px; color: var(--muted); }
.menu-item.is-on { color: var(--primary); }
.menu-item.is-on svg { color: var(--primary); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger svg { color: var(--bad); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-head { padding: 8px 12px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.toasts { position: fixed; z-index: 400; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-3); font-weight: 600; font-size: 14.5px; animation: toastIn .38s var(--ease-spring); max-width: 100%; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.ok svg { color: #4ADE80; } .toast.err svg { color: #F87171; }
.toast.is-leaving { animation: toastOut .22s var(--ease-out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- motion: page + stagger ---------- */
.view-enter { animation: viewIn .38s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.stagger > * { animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- login ---------- */
.login-body { background: var(--bg); }
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100dvh; }
.login-hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px;
  background: radial-gradient(900px 600px at 20% 10%, #3565BF 0%, transparent 60%), linear-gradient(145deg, #0E2A5C 0%, #16336B 45%, #234C98 100%);
}
.court-lines { position: absolute; inset: -4%; width: 108%; height: 108%; color: rgba(255, 255, 255, .09); z-index: -1; animation: courtDrift 24s ease-in-out infinite alternate; }
@keyframes courtDrift { to { transform: scale(1.06) translate(-1%, 1%); } }
.login-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); z-index: -1; animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { transform: scale(.9); opacity: .6; } to { transform: scale(1.1); opacity: 1; } }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.login-crest { width: 150px; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); animation: crestIn 1s var(--ease-spring) both .1s, float 6s ease-in-out infinite 1.1s; }
@keyframes crestIn { from { opacity: 0; transform: translateY(30px) scale(.85); } }
@keyframes float { 50% { transform: translateY(-8px); } }
.login-wordmark { width: 260px; height: auto; animation: rise .8s var(--ease-out) both .35s; }
.login-motto { font-family: var(--font-display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; font-size: 16px; color: #BFD3F5; animation: rise .8s var(--ease-out) both .5s; }
.login-meta { position: absolute; bottom: 28px; left: 36px; right: 36px; display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 28px; position: relative; }
.login-form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form > * { animation: rise .6s var(--ease-out) both; }
.login-form > *:nth-child(2) { animation-delay: .08s; } .login-form > *:nth-child(3) { animation-delay: .14s; } .login-form > *:nth-child(4) { animation-delay: .2s; }
.login-form > *:nth-child(n+5) { animation-delay: .26s; }
.login-form.has-error .alert { animation: shake .45s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.login-title { font-size: clamp(40px, 5vw, 54px); line-height: .92; }
.login-title span { color: var(--primary); font-style: italic; }
.login-mobile-crest { display: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 10px; }
.pw-toggle[aria-pressed="true"] { color: var(--primary); }
.login-help { font-size: 13.5px; text-align: center; }
.login-foot { position: absolute; bottom: 20px; font-size: 12.5px; color: var(--muted); }

.install-page { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.install-card { width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.install-logo { width: 120px; margin: 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }
  .plan-item .pi-fields { grid-template-columns: 1fr 100px 110px; }
  .plan-item .pi-fields .pi-phase { display: none; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  body { font-size: 16px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 4px 16px calc(var(--bottomnav-h) + 96px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); gap: 10px; }
  .topbar::after { left: 0; right: 0; }
  .tb-title { display: none; }
  .licbar { padding: calc(8px + env(safe-area-inset-top)) 16px 8px; font-size: 13px; }
  .tb-mobile-brand { display: flex; align-items: center; gap: 8px; }
  .tb-mobile-brand img { width: 30px; height: auto; }
  .team-switch { height: 40px; }
  .team-switch .ellipsis { max-width: 150px; }
  .hide-mobile { display: none !important; }
  .only-mobile { display: revert !important; }
  .fab { display: grid; }

  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--border);
  }
  .bn-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 700; min-height: 52px; border-radius: 14px; transition: color var(--t-fast); }
  .bn-link svg { width: 23px; height: 23px; transition: transform var(--t) var(--ease-spring); }
  .bn-link.is-active { color: var(--primary); }
  .bn-link.is-active svg { transform: translateY(-1px) scale(1.08); }
  .bn-link.is-active::before { content: ""; position: absolute; top: 3px; width: 48px; height: 30px; border-radius: 99px; background: var(--primary-soft); z-index: -1; animation: pillIn .35s var(--ease-spring); }
  @keyframes pillIn { from { transform: scaleX(.4); opacity: 0; } }
  .bn-link .bn-dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }

  .page-head { margin: 10px 0 16px; }
  .page-head .page-actions .btn-primary.has-fab { display: none; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .g-dash { grid-template-columns: 1fr; gap: 14px; }
  .g-dash > * { grid-column: 1 / -1 !important; }
  .kpis-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .card { padding: 16px; border-radius: 18px; }
  .kpi-value { font-size: 34px; }
  .hero { padding: 22px 20px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid.keep-2 { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .profile-hero { flex-wrap: wrap; }
  .profile-hero .big-num { font-size: 64px; }
  .week-card { grid-template-columns: 1fr; gap: 10px; }
  .week-date { border-right: 0; padding-right: 0; display: flex; align-items: baseline; gap: 8px; }
  .cal-d { min-height: 64px; padding: 4px; }
  .cal-ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .stat-grid { grid-template-columns: 1fr repeat(2, auto); }
  .stat-grid .st-hide { display: none; }
  .plan-item { grid-template-columns: auto 1fr; }
  .plan-item .pi-end { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .plan-item .pi-fields { grid-template-columns: 1fr 1fr; }
  .plan-item .pi-fields .pi-title { grid-column: 1 / -1; }
  .att-opt { width: 40px; height: 40px; }
  .att-opts { gap: 4px; }

  /* modals become bottom sheets */
  .modal, .modal.modal-lg, .modal.modal-sm {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 94dvh; border-radius: 26px 26px 0 0;
    transform: translateY(100%); opacity: 1; padding-bottom: env(safe-area-inset-bottom);
  }
  .modal.is-open { transform: translateY(0); }
  .grabber { display: block; width: 42px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: 10px auto 0; flex: none; }
  .modal-head { padding: 12px 18px 8px; }
  .modal-body { padding: 4px 18px 16px; }
  .modal-foot { padding: 12px 18px 16px; }
  .modal-foot .btn { flex: 1; }
  .modal-foot .left { flex: 0 0 auto; }
  .toasts { bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); }

  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { justify-content: flex-start; padding-top: max(48px, env(safe-area-inset-top)); background: radial-gradient(600px 300px at 50% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%); }
  .login-mobile-crest { display: block; width: 64px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 10px 20px rgba(14, 42, 92, .3)); }
  .login-foot { position: static; margin-top: 32px; }
}

@media (max-width: 560px) {
  .att-row { flex-wrap: wrap; row-gap: 8px; padding: 12px 2px; }
  .att-row > .grow { flex: 1 1 calc(100% - 50px); }
  .att-opts { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .att-opt { width: auto; height: 46px; }
  .kpis-mobile .spark { display: none; }
}
@media (max-width: 420px) {
  .kpi-value { font-size: 30px; }
}

@media (hover: none) {
  .card.is-interactive:hover { transform: none; box-shadow: var(--shadow-1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .chart .draw { stroke-dashoffset: 0; }
  .chart .fade { opacity: 1; }
}

@media print {
  .sidebar, .topbar, .bottomnav, .fab, .page-actions, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}
