/* =====================================================================
   DoubleM Basquete — estilos base (app.css)
   ===================================================================== */

:root {
    /* Paleta grafite/prata — combinando com a logo */
    --primary: #cfd6dc;
    --primary-dark: #aab3bb;
    --primary-soft: rgba(207, 214, 220, .14);
    --primary-contrast: #13161a;

    --ink: #e5e8eb;          /* texto principal (cinza claro) */
    --ink-soft: #c4c9ce;     /* texto secundário */
    --muted: #8d939a;
    --muted-soft: #6d737a;

    --bg: #17191c;           /* fundo da página (grafite) */
    --surface: #1f2226;      /* cards */
    --surface-2: #1a1d20;    /* inputs e faixas */
    --surface-3: #272b30;    /* hover / realce */
    --sidebar: #121417;      /* barra lateral */
    --sidebar-2: #171a1d;

    --border: #3a3f46;       /* bordas mais claras */
    --border-strong: #4e545c;

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, .16);
    --success-text: #86efac;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .16);
    --danger-text: #fca5a5;
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, .16);
    --info-text: #7dd3fc;
    --warning: #f59e0b;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, .5);
    --sidebar-w: 264px;
    --topbar-h: 72px;
    --footer-h: 58px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--bg);
    /* Fundo "pedra" mesclado com a logo (textura sutil + luz suave) */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E"),
        radial-gradient(1200px 700px at 18% -10%, rgba(255, 255, 255, .05), transparent 60%),
        radial-gradient(1000px 600px at 100% 110%, rgba(255, 255, 255, .035), transparent 60%);
    background-attachment: fixed, fixed, fixed;
    background-size: 180px 180px, cover, cover;
    background-repeat: repeat, no-repeat, no-repeat;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.25;
    color: var(--ink);
}

p {
    margin: 0;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

/* ---------------------------------------------------------------------
   Estrutura
   --------------------------------------------------------------------- */
.app {
    display: flex;
    min-height: 100vh;
}

.app__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1 1 auto;
    padding: 28px clamp(16px, 3vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
}

/* Sidebar ------------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--ink);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--topbar-h);
    height: var(--topbar-h);
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar__logo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
    flex: 0 0 auto;
}

.sidebar__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar__brand-text strong {
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__brand-text small {
    color: var(--muted-soft);
    font-size: 12px;
}

.sidebar__nav {
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.nav-link .icon {
    width: 19px;
    height: 19px;
    opacity: .85;
}

.nav-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
    text-decoration: none;
}

.nav-link.is-active {
    background: var(--primary);
    color: #fff;
}

.nav-link.is-active .icon {
    opacity: 1;
}

.nav-link.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Submenu (ex.: Financeiro > Planos) ---------------------------------- */
.nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.nav-group__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px 4px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted-soft);
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
}

.nav-group__toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.nav-group__toggle .nav-group__icon {
    width: 16px;
    height: 16px;
    opacity: .8;
    flex: 0 0 auto;
}

.nav-group__label {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-group__toggle .nav-group__chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: .65;
    flex: 0 0 auto;
    transition: transform .2s ease;
}

.nav-group.is-open .nav-group__chevron {
    transform: rotate(180deg);
}

/* Grupo aberto/ativo usa o mesmo destaque claro do item ativo do menu. */
.nav-group.is-open > .nav-group__toggle,
.nav-group.is-active > .nav-group__toggle {
    background: var(--primary);
    color: var(--primary-contrast);
}

.nav-group.is-open > .nav-group__toggle .nav-group__icon,
.nav-group.is-active > .nav-group__toggle .nav-group__icon {
    opacity: 1;
}

.nav-group__toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-group__items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-group__items[hidden] {
    display: none;
}

.nav-link--sub {
    padding-left: 48px;
    font-size: 13.5px;
    position: relative;
}

.nav-link--sub::before {
    content: "";
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-strong);
}

.nav-link--sub.is-active::before {
    background: var(--primary-contrast);
}

.nav-link__soon {
    margin-left: auto;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .12);
    padding: 2px 7px;
    border-radius: 20px;
}

.sidebar__footer {
    display: flex;
    align-items: center;
    min-height: var(--footer-h);
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
    color: var(--muted-soft);
}

.sidebar__logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--muted-soft);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease, background .15s ease;
}

.sidebar__logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    text-decoration: none;
}

.sidebar__logout .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: .85;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 35;
}

/* Topbar -------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: var(--topbar-h);
    height: var(--topbar-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(16px, 3vw, 36px);
}

.topbar__toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    padding: 8px;
    color: var(--ink);
    cursor: pointer;
}

.topbar__heading {
    flex: 1 1 auto;
    min-width: 0;
}

.topbar__heading h1 {
    font-size: 19px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__heading p {
    font-size: 12.5px;
    color: var(--muted);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    flex: none;
}

.user-chip__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-chip__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-chip__meta strong {
    font-size: 14px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip__meta small {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

/* Footer -------------------------------------------------------------- */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--footer-h);
    padding: 0 clamp(16px, 3vw, 36px);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12.5px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Botões
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn .icon {
    width: 17px;
    height: 17px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--ink);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--ink-soft);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--ink);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 13px 20px;
    font-size: 15px;
}

.btn-sm {
    padding: 7px 11px;
    font-size: 13px;
}

.btn-sm .icon {
    width: 15px;
    height: 15px;
}

/* ---------------------------------------------------------------------
   Cabeçalho de página
   --------------------------------------------------------------------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-head h2 {
    font-size: 22px;
}

.page-head p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 3px;
}

.page-head__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card__head h3 {
    font-size: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* ---------------------------------------------------------------------
   Formulários
   --------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.field__icon {
    position: absolute;
    left: 12px;
    color: var(--muted-soft);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.field__control .field__icon + input {
    padding-left: 40px;
}

.field__prefix {
    position: absolute;
    left: 13px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.field__control .field__prefix + input {
    padding-left: 40px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="date"],
input[type="month"] {
    color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea {
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Cobranças: competência/vencimento compactos e resumo no rodapé da tabela */
.cobrancas-form-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.cobrancas-form-grid {
    flex: 1 1 520px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
    align-items: end;
}
.cobrancas-form-grid .field { justify-content: flex-start; }
.cobrancas-form-grid .field input[type="month"],
.cobrancas-form-grid .field input[type="date"] {
    height: 44px;
    min-height: 44px;
    line-height: 1.2;
    box-sizing: border-box;
}
.cobrancas-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.cobrancas-form-actions .btn { height: 44px; }
.cobrancas-form-hint { margin: 10px 0 0; font-size: 12px; }

.cobrancas-resumo-rodape {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.cobrancas-resumo-rodape__item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted);
}
.cobrancas-resumo-rodape__item strong { font-size: 14px; color: var(--ink); }
.cobrancas-resumo-rodape__item small { font-size: 10.5px; color: var(--muted-soft); }

@media (max-width: 900px) {
    .cobrancas-form-row { flex-direction: column; align-items: stretch; }
    .cobrancas-form-actions { justify-content: flex-end; }
}

@media (max-width: 620px) {
    .cobrancas-form-grid { grid-template-columns: minmax(0, 1fr); max-width: none; }
    .cobrancas-form-actions { flex-direction: column; align-items: stretch; }
    .cobrancas-resumo-rodape { justify-content: flex-start; gap: 14px; }
}

.field--span-2 {
    grid-column: span 2;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border);
    margin: 0;
}

.form-section__title {
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
    padding: 0 8px;
}

.planos-exclusivos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.planos-exclusivos__item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}

.planos-exclusivos__item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.form-actions--inline {
    margin-top: 4px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Filtros ------------------------------------------------------------- */
.filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 18px;
}

.filters__field {
    min-width: 150px;
}

.filters__field--grow {
    flex: 1 1 240px;
}

/* ---------------------------------------------------------------------
   Tabelas
   --------------------------------------------------------------------- */
.card--table {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead th {
    text-align: left;
    padding: 14px 18px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #fafcff;
}

.table__link {
    font-weight: 600;
    color: var(--ink);
}

.table__sub {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
}

.table__actions {
    text-align: right;
    white-space: nowrap;
}

.table__check {
    width: 44px;
    text-align: center;
}

.table__check input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

.table__actions .btn {
    padding: 6px;
}

/* ---------------------------------------------------------------------
   Avatares e badges
   --------------------------------------------------------------------- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar--img {
    object-fit: cover;
}

.avatar--md {
    width: 54px;
    height: 54px;
    font-size: 17px;
}

.avatar-initials {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
}

.avatar-initials--lg {
    font-size: 34px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg);
    color: var(--ink-soft);
    white-space: nowrap;
}

.badge--success { background: var(--success-soft); color: #166534; }
.badge--muted   { background: #e2e8f0; color: #475569; }
.badge--primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge--info    { background: var(--info-soft); color: #1e40af; }
.badge--danger  { background: var(--danger-soft); color: #991b1b; }
.badge--online  { background: #dcfce7; color: #15803d; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
}

.chip .icon {
    width: 15px;
    height: 15px;
}

/* ---------------------------------------------------------------------
   Alertas
   --------------------------------------------------------------------- */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid transparent;
}

.alert .icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.alert--success {
    background: var(--success-soft);
    color: #166534;
    border-color: #bbf7d0;
}

.alert--error {
    background: var(--danger-soft);
    color: #991b1b;
    border-color: #fecaca;
}

.alert--info {
    background: var(--info-soft);
    color: #1e40af;
    border-color: #bfdbfe;
}

.alert__list {
    margin: 0;
    padding-left: 18px;
}

/* ---------------------------------------------------------------------
   Listas e estados vazios
   --------------------------------------------------------------------- */
.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.list__item:last-child {
    border-bottom: none;
}

.list__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.list__title {
    font-weight: 600;
    color: var(--ink);
}

.list__meta {
    font-size: 12.5px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* ---------------------------------------------------------------------
   Estatísticas / dashboard
   --------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.stat-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink-soft);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.stat-card--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    color: #fff;
}

.stat-card--primary .stat-card__icon {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.stat-card--primary .stat-card__label,
.stat-card--primary .stat-card__hint {
    color: rgba(255, 255, 255, .9);
}

.stat-card__body {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stat-card__value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-card__label {
    font-size: 14px;
    font-weight: 600;
}

.stat-card__hint {
    font-size: 12px;
    color: var(--muted);
}

.bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bar-list__head {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    margin-bottom: 6px;
}

.bar {
    height: 9px;
    background: var(--bg);
    border-radius: 20px;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 20px;
}

/* ---------------------------------------------------------------------
   CRUD (níveis, categorias, usuários)
   --------------------------------------------------------------------- */
.crud-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.crud-create {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
}

.crud-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crud-row {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: #fcfdff;
}

.crud-row.is-inactive {
    opacity: .62;
}

.crud-row--stack {
    flex-direction: column;
    align-items: stretch;
}

.crud-row__form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex: 1 1 420px;
    flex-wrap: wrap;
}

.crud-row__fields {
    display: flex;
    gap: 12px;
    flex: 1 1 320px;
    flex-wrap: wrap;
}

.crud-row__fields .field--grow {
    flex: 1 1 150px;
}

.crud-row__fields .field--ordem {
    width: 90px;
    flex: 0 0 auto;
}

.crud-row__fields .field--unidade {
    width: 110px;
    flex: 0 0 auto;
}

.crud-row__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-row__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-row__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-row__link {
    font-size: 13px;
    color: var(--muted);
}

.row-edit {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    background: var(--surface);
}

.row-edit summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ink-soft);
    list-style: none;
}

.row-edit summary::-webkit-details-marker {
    display: none;
}

.row-edit[open] summary {
    margin-bottom: 14px;
}

.row-edit .icon {
    width: 16px;
    height: 16px;
}

/* ---------------------------------------------------------------------
   Dados (dl) e perfil
   --------------------------------------------------------------------- */
.data-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.data-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.data-list > div:last-child {
    border-bottom: none;
}

.data-list dt {
    color: var(--muted);
    font-size: 13.5px;
}

.data-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.data-list--2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.profile-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-card__photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: grid;
    place-items: center;
}

.profile-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card__sub {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: -6px;
}

.profile-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-card__login {
    font-size: 13px;
    color: var(--ink-soft);
}

.profile-card__login--muted {
    color: var(--muted);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prose {
    color: var(--ink-soft);
    font-size: 14px;
}

/* ---------------------------------------------------------------------
   Página de erro
   --------------------------------------------------------------------- */
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.error-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 40px;
    max-width: 460px;
    text-align: center;
}

.error-card__code {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.error-card h1 {
    margin: 12px 0 8px;
    font-size: 22px;
}

.error-card p {
    color: var(--muted);
    margin-bottom: 22px;
}

.error-card__actions {
    display: flex;
    justify-content: center;
}

/* ---------------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crud-layout,
    .profile-grid,
    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .crud-create {
        position: static;
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: var(--shadow-md);
    }

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

    .topbar__toggle {
        display: inline-flex;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field--span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 620px) {
    .page {
        padding: 20px 15px;
        gap: 18px;
    }

    .topbar__heading p {
        display: none;
    }

    .user-chip__meta {
        display: none;
    }

    .btn__label {
        display: none;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters__field {
        min-width: 0;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .field--span-2 {
        grid-column: span 1;
    }

    .stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .data-list--2col {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-footer {
        flex-direction: column;
    }
}

/* =====================================================================
   TEMA ESCURO (ajustes sobre os componentes base)
   ===================================================================== */
a {
    color: var(--primary);
}

a:hover {
    color: var(--primary);
}

/* Barra superior e navegação ------------------------------------------ */
.topbar {
    background: rgba(23, 25, 28, .88);
    border-bottom: 1px solid var(--border);
}

.topbar__toggle {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--border-strong);
}

.sidebar {
    background: var(--sidebar);
}

.nav-link {
    color: #b7bcc2;
}

.nav-link.is-active {
    color: var(--primary-contrast);
}

.nav-link.is-active .icon {
    opacity: 1;
}

/* Botões --------------------------------------------------------------- */
.btn-primary {
    color: var(--primary-contrast);
}

.btn-primary:hover {
    color: var(--primary-contrast);
}

.btn-secondary {
    background: var(--surface-3);
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: #1f303b;
    color: var(--ink);
}

.btn-ghost {
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    background: var(--surface-3);
    color: var(--ink);
}

/* Formulários ---------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="search"],
input[type="color"],
select,
textarea {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--border-strong);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-soft);
}

select option {
    background: var(--surface-2);
    color: var(--ink);
}

/* Cards e blocos ------------------------------------------------------- */
.card {
    background: var(--surface);
    border-color: var(--border);
}

.crud-row {
    background: var(--surface-2);
    border-color: var(--border);
}

.row-edit {
    background: var(--surface-2);
}

/* Cards de estatística ------------------------------------------------- */
.stat-card {
    background: var(--surface);
    border-color: var(--border);
}

.stat-card__icon {
    background: var(--surface-3);
    color: var(--primary);
}

.stat-card--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-contrast);
}

.stat-card--primary .stat-card__icon {
    background: rgba(0, 0, 0, .16);
    color: var(--primary-contrast);
}

.stat-card--primary .stat-card__label,
.stat-card--primary .stat-card__hint {
    color: rgba(19, 22, 26, .82);
}

/* Tabelas -------------------------------------------------------------- */
.table thead th {
    background: var(--surface-2);
    color: var(--muted);
    border-bottom-color: var(--border);
}

.table tbody td {
    border-bottom-color: var(--border);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, .02);
}

.table__link {
    color: var(--ink);
}

/* Badges --------------------------------------------------------------- */
.badge {
    background: var(--surface-3);
    color: var(--ink-soft);
}

.badge--primary { background: var(--primary-soft); color: var(--primary); }
.badge--success { background: var(--success-soft); color: var(--success-text); }
.badge--warning { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.badge--muted   { background: var(--surface-3);    color: var(--muted); }
.badge--info    { background: var(--info-soft);    color: var(--info-text); }
.badge--danger  { background: var(--danger-soft);  color: var(--danger-text); }
.badge--online  { background: var(--success-soft); color: var(--success-text); }

.mens-tag { text-decoration: none; }
.mens-tag:hover { filter: brightness(1.12); }

/* Indicador de presença (online/offline) ------------------------------- */
.presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
    flex: none;
    vertical-align: middle;
}

.presence-dot.is-online {
    background: #22c55e;
    animation: presence-pulse 2s ease-out infinite;
}

@keyframes presence-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
    70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.card__head .presence-dot {
    margin-right: 6px;
}

.user-row__last {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.user-row__last .icon {
    width: 15px;
    height: 15px;
    flex: none;
}

/* Alertas -------------------------------------------------------------- */
.alert--success { background: var(--success-soft); color: var(--success-text); border-color: rgba(34, 197, 94, .3); }
.alert--error   { background: var(--danger-soft);  color: var(--danger-text);  border-color: rgba(239, 68, 68, .3); }
.alert--info    { background: var(--info-soft);    color: var(--info-text);    border-color: rgba(56, 189, 248, .3); }

/* Avatares ------------------------------------------------------------- */
.avatar {
    background: var(--primary-soft);
    color: var(--primary);
}

.user-chip__avatar {
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-card__photo {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Barras e listas ------------------------------------------------------ */
.bar {
    background: var(--surface-3);
}

.list__item {
    border-bottom-color: var(--border);
}

.list__title {
    color: var(--ink);
}

.data-list > div {
    border-bottom-color: var(--border);
}

/* Rodapé --------------------------------------------------------------- */
.app-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.filters {
    background: var(--surface);
}

/* ---------------------------------------------------------------------
   Abas laterais (formulários em seções)
   --------------------------------------------------------------------- */
.vtabs {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.vtabs__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
}

.vtab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.vtab .icon {
    width: 18px;
    height: 18px;
    opacity: .85;
    flex: 0 0 auto;
}

.vtab:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.vtab.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    border-left-color: var(--primary);
}

.vtabs__panels {
    padding: clamp(18px, 2.5vw, 28px);
    min-width: 0;
}

.vpanel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.vpanel.is-active {
    display: flex;
}

.vpanel__title {
    font-size: 17px;
}

.vpanel__hint {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: -8px;
}

@media (max-width: 860px) {
    .vtabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .vtabs__nav {
        flex-direction: row;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 10px;
        align-items: center;
    }

    .vtabs__profile {
        flex: 0 0 auto;
        flex-direction: row;
        padding: 0 12px 0 0;
        margin: 0;
        border-bottom: 0;
        border-right: 1px solid var(--border);
    }

    .photo-circle {
        width: 54px;
        height: 54px;
    }

    .photo-circle__initials {
        font-size: 20px;
    }

    .photo-circle__camera {
        width: 22px;
        height: 22px;
    }

    .photo-circle__camera .icon {
        width: 12px;
        height: 12px;
    }

    .vtabs__profile-name,
    .photo-circle__remove {
        display: none;
    }

    .vtab {
        width: auto;
        white-space: nowrap;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .vtab.is-active {
        border-left: 0;
        border-bottom-color: var(--primary);
    }
}

/* ---------------------------------------------------------------------
   Foto do atleta no topo do menu lateral (abas)
   --------------------------------------------------------------------- */
.vtabs__profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.photo-circle {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.photo-circle__media {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    border: 3px solid var(--primary-soft);
    color: var(--primary);
    transition: border-color .15s ease, opacity .15s ease;
}

.photo-circle:hover .photo-circle__media {
    border-color: var(--primary);
}

.photo-circle__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-circle__initials {
    font-size: 34px;
    font-weight: 700;
}

.photo-circle__placeholder {
    width: 42px;
    height: 42px;
    opacity: .6;
}

.photo-circle__camera {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-contrast);
    display: grid;
    place-items: center;
    border: 3px solid var(--surface-2);
}

.photo-circle__camera .icon {
    width: 16px;
    height: 16px;
}

.vtabs__profile-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-circle__remove {
    font-size: 12px;
    color: var(--muted);
}

.photo-circle__remove .icon {
    width: 14px;
    height: 14px;
}

.photo-circle__remove input:checked + span {
    color: var(--danger-text);
}

/* Foto do atleta, logo antes da avaliação técnica */
.avaliacao-foto-card__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.avaliacao-foto-card__media {
    flex: 0 0 auto;
}

.avaliacao-foto-card__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.avaliacao-foto-card__name {
    font-size: 15px;
    line-height: 1.25;
}

.avaliacao-foto-card__hint {
    margin: 0;
    font-size: 12.5px;
}

.avaliacao-foto-card__info .photo-circle__remove {
    margin-top: 4px;
}

.avaliacao-foto-card__info .photo-circle__remove[hidden] {
    display: none !important;
}

.photo-circle:has(#avaliacaoRemoverFoto:checked) .photo-circle__media {
    opacity: .35;
}

@media (max-width: 620px) {
    .avaliacao-foto-card__row {
        align-items: flex-start;
        gap: 14px;
    }

    .avaliacao-foto-card__name {
        font-size: 14px;
    }
}

.photo-circle:has(#removerFoto:checked) .photo-circle__media {
    opacity: .35;
}

/* Vínculo atleta × treinos (lista de atletas) ------------------------- */
.link-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.link-tags .badge {
    font-weight: 600;
}

.link-tags .badge small {
    opacity: .75;
    font-weight: 700;
}

.link-tags .color-dot {
    margin-right: 2px;
}

/* Botão "+" de vincular treinos --------------------------------------- */
.picker-trigger {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px dashed var(--border-strong);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    flex: 0 0 auto;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.picker-trigger:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.picker-trigger .icon {
    width: 16px;
    height: 16px;
}

/* Botões de ação sem borda (visualizar/editar) ------------------------ */
.btn-plain {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.btn-plain:hover {
    background: var(--surface-3);
    color: var(--ink);
    text-decoration: none;
}

.btn-plain .icon {
    width: 18px;
    height: 18px;
}

.btn-plain--danger:hover {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.table__actions .btn-plain + .btn-plain {
    margin-left: 2px;
}

/* Seletor moderno de treinos (popover com checkboxes) ----------------- */
.picker-pop {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    padding: 0;
    width: min(1120px, 96vw);
    max-height: 90vh;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.picker-pop::backdrop {
    background: rgba(0, 0, 0, .55);
}

.picker-pop__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.picker-pop__title {
    font-weight: 700;
    font-size: 15px;
}

.picker-pop__sub {
    color: var(--muted);
    font-size: 12.5px;
}

.picker-pop__body {
    max-height: 46vh;
    overflow: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.picker-pop__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .12s ease, border-color .12s ease;
}

.picker-pop__option:hover {
    background: var(--surface-3);
}

.picker-pop__option:has(input:checked) {
    background: var(--primary-soft);
    border-color: rgba(207, 214, 220, .45);
}

.picker-pop__option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.picker-pop__name {
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 600;
}

.picker-pop__meta {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.picker-pop__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.picker-pop__foot .muted {
    font-size: 12px;
}

/* Calendário de vínculo de treinos no cadastro do atleta */
.picker-pop__body--calendar {
    display: block;
    max-height: 70vh;
    padding: 12px;
    overflow: auto;
}
.picker-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
    gap: 8px;
    min-width: 900px;
}
.picker-calendar__day {
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 10px;
    background: rgba(71, 80, 92, .55);
}
.picker-calendar__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 1px 2px 7px;
    border-bottom: 1px solid rgba(148, 163, 184, .24);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.picker-calendar__count {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
}
.picker-calendar__empty {
    display: block;
    padding: 10px 3px 4px;
    color: #94a3b8;
    font-size: 11px;
}
.picker-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding: 8px 8px 8px 11px;
    border: 1px solid var(--slot-color);
    border-radius: 8px;
    background: rgba(71, 80, 92, .35);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--slot-color) 34%, transparent), color-mix(in srgb, var(--slot-color) 16%, transparent)),
        rgba(71, 80, 92, .35);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.picker-slot:hover {
    transform: translateY(-1px);
    border-color: var(--slot-color);
}
.picker-slot:has(input:checked) {
    border: 2px solid var(--slot-color);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--slot-color) 44%, transparent), color-mix(in srgb, var(--slot-color) 24%, transparent)),
        rgba(71, 80, 92, .35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}
.picker-slot:has(input:focus-visible) {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.picker-slot input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.picker-slot__time {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f8fafc;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 800;
}
.picker-slot__time .icon {
    width: 9px;
    height: 9px;
    flex: none;
    opacity: .7;
}
.picker-slot__name {
    color: #f8fafc;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}
.picker-slot__check {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--slot-color);
    color: #fff;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .15s ease, transform .15s ease;
}
.picker-slot__check .icon {
    width: 9px;
    height: 9px;
}
.picker-slot:has(input:checked) .picker-slot__check {
    opacity: 1;
    transform: scale(1);
}
@media (max-width: 700px) {
    .picker-pop {
        width: 96vw;
    }
    .picker-pop__body--calendar {
        max-height: 72vh;
    }
}

/* Permissões de perfil ------------------------------------------------- */
.perm-group {
    margin-bottom: 18px;
}

.perm-group:last-child {
    margin-bottom: 0;
}

.perm-group__title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.perm-item {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    transition: border-color .15s ease, background .15s ease;
}

.perm-item:hover {
    border-color: var(--border-strong);
}

.perm-item:has(input:checked) {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.perm-row {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perm-row__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.perm-row__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Notas de avaliação (formulário) ------------------------------------- */
.score-list {
    display: flex;
    flex-direction: column;
}

.score-video-limit {
    margin: -4px 0 0;
    font-size: 12px;
    line-height: 1.4;
}

.score-row {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 160px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.score-row:last-child {
    border-bottom: none;
}

.score-row__name {
    font-size: 14px;
    font-weight: 600;
}

.score-row__hint {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--muted);
}

.score-row__value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-row__nota {
    text-align: center;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.score-row__unit {
    flex: none;
    padding: 4px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
}

.score-row__obs-video {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.score-row__obs {
    flex: 1 1 140px;
    width: auto;
    min-width: 0;
}

.video-attach {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.video-attach:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--ink);
}

.video-attach .icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.video-attach.is-selected {
    max-width: 230px;
    border-style: solid;
    border-color: rgba(34, 197, 94, .55);
    background: var(--success-soft);
    color: var(--success-text);
}

.video-attach.is-selected span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-video-chip.is-selected {
    border-color: var(--success-text);
}

.score-video-chip {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    max-width: 210px;
    padding: 0 4px 0 10px;
    border: 1px solid rgba(34, 197, 94, .55);
    border-radius: 8px;
    background: var(--success-soft);
    color: var(--success-text);
    font-size: 11.5px;
    font-weight: 700;
}

.score-video-chip__file {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    cursor: pointer;
}

.score-video-chip__file .icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.score-video-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-video-chip__remove {
    flex: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: inherit;
    cursor: pointer;
}

.score-video-chip__remove .icon {
    width: 11px;
    height: 11px;
}

.score-video-chip__remove:has(input:checked) {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.score-video-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.upload-progress {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
}

.upload-progress[hidden] {
    display: none !important;
}

.upload-progress__box {
    width: min(440px, 100%);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.upload-progress__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.upload-progress__head strong {
    font-size: 14px;
}

.upload-progress__head span {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.upload-progress__track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-3);
}

.upload-progress__bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width .18s ease;
}

.upload-progress__hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* Vídeo da avaliação --------------------------------------------------- */
.video-player {
    width: 100%;
    max-height: 480px;
    border-radius: var(--radius-sm);
    background: #000;
    display: block;
}

.video-player + .checkbox,
.video-player + .field {
    margin-top: 12px;
}

/* Vídeo por critério no portal do atleta ------------------------------- */
.video-watch {
    font-weight: 700;
}

.modal.modal--video {
    width: min(960px, 96vw);
    max-height: 92vh;
}

.modal--video .modal__head {
    align-items: flex-start;
}

.modal--video .modal__head h3 {
    overflow-wrap: anywhere;
}

.video-modal__group {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.modal--video .modal__body {
    padding: 0;
    background: #000;
}

.modal--video .video-player {
    max-height: min(72vh, 640px);
    border-radius: 0;
}

@media (max-width: 560px) {
    .modal--video .modal__foot {
        flex-direction: column-reverse;
    }

    .modal--video .modal__foot .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Avaliação do atleta: tabela vira cartões no mobile -------------------- */
@media (max-width: 720px) {
    .table--avaliacao,
    .table--avaliacao tbody,
    .table--avaliacao tr,
    .table--avaliacao td {
        display: block;
        width: 100%;
    }

    .table--avaliacao thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    .table--avaliacao tbody {
        padding: 12px;
    }

    .table--avaliacao tbody tr {
        padding: 8px 14px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface-2);
    }

    .table--avaliacao tbody tr + tr {
        margin-top: 12px;
    }

    .table--avaliacao tbody tr:hover {
        background: var(--surface-2);
    }

    .table--avaliacao tbody td {
        padding: 9px 0;
        border-bottom: 1px dashed var(--border);
        overflow-wrap: anywhere;
    }

    .table--avaliacao tbody td:last-child {
        padding-bottom: 2px;
        border-bottom: 0;
    }

    .table--avaliacao tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .table--avaliacao .video-watch {
        width: 100%;
        justify-content: center;
    }
}

.checkbox + .field {
    margin-top: 12px;
}

/* Campo de arquivo moderno (upload) ----------------------------------- */
.file-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.file-field:hover,
.file-field:focus-within {
    border-color: var(--primary);
    background: var(--surface-3);
}

.file-field:focus-within {
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.file-field.is-dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-field__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.file-field__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: none;
}

.file-field__icon .icon {
    width: 20px;
    height: 20px;
}

.file-field__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.file-field__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.file-field__name {
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-field__name.is-selected {
    color: var(--ink-soft);
}

.file-field__action {
    flex: none;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface-3);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.file-field + .field-hint {
    display: block;
    margin-top: 8px;
}

/* Autocomplete de responsável ----------------------------------------- */
.modal--resp form {
    max-height: 90vh;
}

.modal--resp .modal__body {
    overflow-y: auto;
}

.ac-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
}

.ac-selected__label {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
}

.ac-selected__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.ac-selected__clear {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.ac-selected__clear:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.ac-selected__clear .icon {
    width: 15px;
    height: 15px;
}

.ac-list {
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.ac-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.ac-item:last-child {
    border-bottom: 0;
}

.ac-item:hover,
.ac-item.is-active {
    background: var(--surface-3);
}

.ac-item__name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.ac-item__meta {
    font-size: 12px;
    color: var(--muted);
}

.ac-empty {
    margin-top: 10px;
    font-size: 12.5px;
}

@media (max-width: 520px) {
    .file-field {
        flex-wrap: wrap;
    }

    .file-field__action {
        width: 100%;
        text-align: center;
    }
}

.columns-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 16px;
}

.columns-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
}

.columns-list__idx {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
}

@media (max-width: 620px) {
    .columns-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .score-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
}

@media (max-width: 620px) {
    .score-row__obs-video {
        flex-wrap: wrap;
    }

    .video-attach,
    .score-video-chip {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

/* Mostrar/ocultar senha (olho) ---------------------------------------- */
input.has-toggle {
    padding-right: 44px;
}

.field__toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    padding: 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.field__toggle:hover {
    color: var(--ink);
    background: var(--surface-3);
}

.field__toggle .icon {
    width: 18px;
    height: 18px;
}

.field__toggle-off {
    display: none;
}

.field__toggle.is-on {
    color: var(--primary);
}

.field__toggle.is-on .field__toggle-on {
    display: none;
}

.field__toggle.is-on .field__toggle-off {
    display: grid;
}

/* ---------------------------------------------------------------------
   Abas horizontais (modernas)
   --------------------------------------------------------------------- */
.tabs__nav {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}

.tab:hover {
    color: var(--ink);
}

.tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 20px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
}

.tab.is-active .tab__count {
    background: var(--primary-soft);
    color: var(--primary);
}

.tabs__panels {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(16px, 2.5vw, 24px);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
    animation: tab-fade .18s ease;
}

@keyframes tab-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   Modal (dialog nativo)
   --------------------------------------------------------------------- */
.modal {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    padding: 0;
    width: min(560px, 94vw);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.modal::backdrop {
    background: rgba(0, 0, 0, .55);
}

.modal form {
    display: flex;
    flex-direction: column;
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal__head h3 {
    font-size: 16px;
}

.modal__body {
    padding: 18px 20px;
}

.modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

/* Chip de usuário clicável (abre "Meu perfil") ------------------------ */
.user-chip--button {
    border: 0;
    background: transparent;
    font-family: inherit;
    color: inherit;
    text-align: left;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s ease;
}

.user-chip--button:hover {
    background: var(--surface-3);
}

.user-chip--button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.user-chip__gear {
    width: 16px;
    height: 16px;
    color: var(--muted);
    margin-left: 2px;
    flex: none;
}

/* Modal "Meu perfil" -------------------------------------------------- */
.modal__body > .field {
    margin-bottom: 14px;
}

.modal__body > .alert {
    margin-bottom: 16px;
}

.modal__body > .field:last-child {
    margin-bottom: 0;
}

.field-hint {
    font-size: 12px;
    color: var(--muted);
}

.perfil-senha {
    margin-top: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.perfil-senha legend {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}

.perfil-senha > .field {
    margin-bottom: 14px;
}

.perfil-senha > .field:last-child {
    margin-bottom: 0;
}

/* Foto do perfil (dentro do modal) ------------------------------------ */
.modal--perfil {
    width: min(600px, 94vw);
    max-height: 92vh;
}

.modal--perfil form {
    max-height: 92vh;
}

.modal--perfil .modal__head,
.modal--perfil .modal__foot {
    flex: none;
}

.modal--perfil .modal__body {
    overflow-y: auto;
}

.perfil-foto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-bottom: 18px;
}

.perfil-foto .photo-circle {
    width: 96px;
    height: 96px;
}

.perfil-foto .field-hint {
    max-width: 340px;
}

.photo-circle:has(#perfilRemoverFoto:checked) .photo-circle__media {
    opacity: .35;
}

/* Lista de seleção múltipla (checkboxes) ------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.pagination__info { font-size: 12px; color: var(--muted); }

.check-list {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 6px;
}

.check-list__item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s ease;
}

.check-list__item:hover {
    background: var(--surface-3);
}

.check-list__item:has(input:checked) {
    background: var(--primary-soft);
}

.check-list__item input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.check-list__name {
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 600;
}

.check-list__vagas {
    flex: 0 0 auto;
}

.check-list__meta {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
}

/* Calendário de treinos no cadastro do atleta (admin) */
.admin-treino-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-treino-counter { font-size: 12px; }
.admin-treino-hint { font-size: 12px; }
.admin-treino-hint:empty { display: none; }
.admin-treino-grid { margin-top: 2px; }
.admin-treino-grid.is-full .admin-treino-slot:not(:has(input:checked)) {
    opacity: .35;
    filter: grayscale(1);
    cursor: not-allowed;
}
.admin-treino-grid.is-full .admin-treino-slot:not(:has(input:checked)) input { cursor: not-allowed; }
.admin-treino-grid.is-full .admin-treino-slot:not(:has(input:checked)):hover {
    transform: none;
    border-color: rgba(255, 255, 255, .09);
}
.admin-treino-slot:has(input:checked) {
    border-color: var(--slot-color);
    box-shadow: 0 0 0 1px var(--slot-color), 0 8px 20px rgba(0, 0, 0, .25);
}
.admin-treino-slot:has(input:checked) .rematricula-slot__check { opacity: 1; transform: scale(1); }
.admin-treino-slot__name { display: flex; align-items: center; gap: 6px; }
.admin-treino-slot__name .color-dot { margin-right: 0; flex: none; }
.admin-treino-slot .rematricula-slot__vagas { background: var(--success-soft); color: var(--success-text); }
.admin-treino-slot .rematricula-slot__vagas.is-full { background: var(--danger-soft); color: var(--danger-text); }

/* ---------------------------------------------------------------------
   Financeiro — Projeção
   --------------------------------------------------------------------- */
.fin-periodo select {
    width: auto;
    min-width: 190px;
}

.fin-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fin-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--muted);
}

.fin-legend__swatch {
    width: 16px;
    height: 0;
    border-top: 3px solid var(--sw, #7dd3fc);
    border-radius: 2px;
}

.fin-legend__swatch--dashed {
    border-top-style: dashed;
}

.fin-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--muted);
}

.fin-note .icon {
    width: 15px;
    height: 15px;
    flex: none;
    margin-top: 1px;
}

.line-chart {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
}

.line-chart__grid {
    stroke: rgba(255, 255, 255, .07);
    stroke-width: 1;
}

.line-chart__axis {
    fill: var(--muted);
    font-size: 11px;
    font-family: inherit;
}

.line-chart__line {
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.line-chart__line.is-dashed {
    stroke-dasharray: 6 5;
}

.line-chart__area {
    opacity: .12;
    stroke: none;
}

.line-chart__dot {
    stroke: var(--surface);
    stroke-width: 1.5;
}

.table th.is-num,
.table td.is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table tfoot td {
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 13px;
}

/* Detalhamento por plano dentro de cada mês */
.fin-month + .fin-month .fin-month-row td {
    border-top: 2px solid var(--border);
}

.fin-month-row td {
    background: var(--surface);
}

.fin-subrow td {
    background: var(--surface-2);
    font-size: 12.5px;
    color: var(--ink-soft);
}

.fin-subrow td.is-dash {
    color: var(--muted-soft);
}

.fin-plan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.fin-plan::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--border-strong);
    flex: none;
}

/* =====================================================================
   SIDEBAR RECOLHÍVEL (desktop)
   Rail de ícones (78px) que expande ao passar o mouse ou focar.
   O estado "fixado/recolhido" fica em localStorage (dm.sidebar).
   ===================================================================== */
.sidebar {
    transition: width .22s ease, flex-basis .22s ease, box-shadow .22s ease;
}

.sidebar__collapse {
    position: absolute;
    top: calc(var(--topbar-h) + 12px);
    right: -13px;
    width: 26px;
    height: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.sidebar__collapse:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-contrast);
}

.sidebar__collapse .icon {
    width: 14px;
    height: 14px;
    opacity: .9;
}

@media (min-width: 861px) {
    html.sidebar-collapsed .sidebar {
        width: 78px;
        flex: 0 0 78px;
        /* Continua no fluxo: o conteúdo é redimensionado, sem overlay. */
    }

    html.sidebar-collapsed .sidebar:hover,
    html.sidebar-collapsed .sidebar:focus-within {
        width: var(--sidebar-w);
        flex-basis: var(--sidebar-w);
    }

    html.sidebar-collapsed .sidebar__collapse .icon {
        transform: rotate(180deg);
    }

    /* Textos somem no rail e voltam quando o menu expande. */
    /* Rail: sem o botão de expandir e com os ícones centralizados. */
    html.sidebar-collapsed .sidebar__collapse {
        opacity: 0;
        pointer-events: none;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__collapse,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__collapse {
        opacity: 1;
        pointer-events: auto;
    }

    html.sidebar-collapsed .nav-link__soon,
    html.sidebar-collapsed .nav-group__chevron {
        margin-left: 0;
        display: none;
    }

    html.sidebar-collapsed .sidebar:hover .nav-link__soon,
    html.sidebar-collapsed .sidebar:hover .nav-group__chevron,
    html.sidebar-collapsed .sidebar:focus-within .nav-link__soon,
    html.sidebar-collapsed .sidebar:focus-within .nav-group__chevron {
        margin-left: auto;
        display: inline-block;
    }

    html.sidebar-collapsed .sidebar__brand-text,
    html.sidebar-collapsed .nav-link > span,
    html.sidebar-collapsed .nav-group__label,
    html.sidebar-collapsed .nav-group__chevron,
    html.sidebar-collapsed .nav-link__soon,
    html.sidebar-collapsed .sidebar__footer span {
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity .12s ease;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__brand-text,
    html.sidebar-collapsed .sidebar:hover .nav-link > span,
    html.sidebar-collapsed .sidebar:hover .nav-group__label,
    html.sidebar-collapsed .sidebar:hover .nav-group__chevron,
    html.sidebar-collapsed .sidebar:hover .nav-link__soon,
    html.sidebar-collapsed .sidebar:hover .sidebar__footer span,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__brand-text,
    html.sidebar-collapsed .sidebar:focus-within .nav-link > span,
    html.sidebar-collapsed .sidebar:focus-within .nav-group__label,
    html.sidebar-collapsed .sidebar:focus-within .nav-group__chevron,
    html.sidebar-collapsed .sidebar:focus-within .nav-link__soon,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__footer span {
        opacity: 1;
        max-width: 240px;
    }

    html.sidebar-collapsed .sidebar__brand {
        padding: 0;
        justify-content: center;
    }

    html.sidebar-collapsed .sidebar__logo {
        width: 44px;
        height: 44px;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__brand,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__brand {
        padding: 0 20px;
        justify-content: flex-start;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__logo,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__logo {
        width: 52px;
        height: 52px;
    }

    html.sidebar-collapsed .nav-link {
        justify-content: center;
        gap: 0;
        padding-left: 0;
        padding-right: 0;
    }

    html.sidebar-collapsed .sidebar:hover .nav-link,
    html.sidebar-collapsed .sidebar:focus-within .nav-link {
        justify-content: flex-start;
        gap: 12px;
        padding-left: 14px;
        padding-right: 14px;
    }

    html.sidebar-collapsed .nav-link--sub {
        display: none;
    }

    html.sidebar-collapsed .sidebar:hover .nav-link--sub,
    html.sidebar-collapsed .sidebar:focus-within .nav-link--sub {
        display: flex;
        padding-left: 48px;
    }

    html.sidebar-collapsed .nav-group__toggle {
        justify-content: center;
        gap: 0;
        padding-left: 0;
        padding-right: 0;
    }

    html.sidebar-collapsed .sidebar:hover .nav-group__toggle,
    html.sidebar-collapsed .sidebar:focus-within .nav-group__toggle {
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 14px 4px;
    }

    html.sidebar-collapsed .sidebar__footer {
        justify-content: center;
        padding: 0;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__footer,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__footer {
        justify-content: flex-start;
        padding: 0 20px;
    }

    html.sidebar-collapsed .sidebar__logout {
        justify-content: center;
        gap: 0;
        padding-left: 0;
        padding-right: 0;
    }

    html.sidebar-collapsed .sidebar:hover .sidebar__logout,
    html.sidebar-collapsed .sidebar:focus-within .sidebar__logout {
        justify-content: flex-start;
        gap: 12px;
        padding: 9px 10px;
    }

    html.sidebar-collapsed .sidebar__nav {
        overflow-x: hidden;
    }
}

@media (max-width: 860px) {
    .sidebar__collapse {
        display: none;
    }
}

/* =====================================================================
   REMATRÍCULA (portal do atleta + admin)
   ===================================================================== */
.rematricula-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border: 1px solid rgba(34, 197, 94, .35);
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(34, 197, 94, .16), rgba(56, 189, 248, .08) 55%, var(--surface));
}

.rematricula-banner__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--success-soft);
    color: var(--success-text);
    flex: none;
}

.rematricula-banner__icon .icon { width: 24px; height: 24px; }
.rematricula-banner__text { flex: 1 1 auto; min-width: 0; }
.rematricula-banner__text h3 { margin: 6px 0 2px; font-size: 17px; }
.rematricula-banner__text p { color: var(--muted); font-size: 13px; }

.rematricula-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.rematricula-admin__info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rematricula-admin__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted-soft);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .04);
    flex: none;
}

.rematricula-admin__dot.is-open { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.rematricula-admin strong { font-size: 14px; }
.rematricula-admin small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.rematricula-plan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rematricula-form { display: flex; flex-direction: column; gap: 22px; }
.rematricula-hint { margin: 0 0 12px; }
.rematricula-hint:empty { display: none; }
.rematricula-slot[hidden],
.rematricula-day__empty[hidden] {
    display: none !important;
}

/* Rematrícula — pagamento e confirmação */
.rematricula-pagamento,
.rematricula-confirmada { padding: 24px; }

.rematricula-confirmada__hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.rematricula-confirmada__text { min-width: 0; }
.rematricula-confirmada__text h3 { margin: 4px 0; font-size: 20px; }
.rematricula-confirmada__text p { color: var(--muted); font-size: 13px; max-width: 760px; }
.rematricula-pagamento__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.rematricula-pagamento__note { margin: 14px 0 0; font-size: 12px; }

.rematricula-uniforme-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.rematricula-uniforme-resumo > div {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}
.rematricula-uniforme-resumo small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.rematricula-uniforme-resumo strong { display: block; margin-top: 2px; font-size: 14px; color: var(--ink); }

.rematricula-uniforme__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}
.rematricula-uniforme__top p { margin: 0; }
.rematricula-uniforme__top .btn { flex: none; }

.rematricula-uniforme__contato {
    margin-top: 16px;
    max-width: 380px;
}
.rematricula-uniforme__contato .field { width: 100%; }

.phone-field {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.phone-field__icon {
    display: flex;
    flex: none;
    color: var(--muted);
}
.phone-field__icon svg {
    width: 18px;
    height: 18px;
}
.phone-field .phone-field__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    outline: none;
}
.phone-field .phone-field__input:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.modal--confirmacao .modal__body > p {
    margin: 0 0 4px;
}
.confirmacao-telefone {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 14px 0 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    text-align: center;
}
.confirmacao-telefone__label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.confirmacao-telefone strong {
    color: var(--ink);
    font-size: clamp(20px, 4vw, 24px);
    letter-spacing: .02em;
}
.modal--confirmacao .modal__foot {
    flex-wrap: wrap;
}
.modal--confirmacao .modal__foot .btn {
    justify-content: center;
}

@media (max-width: 560px) {
    .modal--confirmacao .modal__foot {
        flex-direction: column-reverse;
    }
    .modal--confirmacao .modal__foot .btn {
        width: 100%;
    }
}

.modal--medidas { width: min(980px, 96vw); max-height: 92vh; }
.modal--medidas .modal__body { overflow-y: auto; }
.modal__head-actions { display: flex; align-items: center; gap: 8px; }

/* Modal de assinatura do contrato (iframe) */
.modal--contrato {
    display: flex;
    flex-direction: column;
    width: min(1100px, 96vw);
    height: min(88vh, 880px);
    max-height: 92vh;
}
.modal--contrato .modal__head,
.modal--contrato .modal__foot {
    flex: none;
}
.modal--contrato .modal__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
}
.contrato-iframe {
    flex: 1 1 auto;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.modal--contrato .modal__foot {
    align-items: center;
    flex-wrap: wrap;
}
@media (max-width: 700px) {
    .modal--contrato {
        width: 96vw;
        height: 90vh;
    }
    .modal--contrato .modal__foot .btn {
        justify-content: center;
    }
}
.medidas-intro { margin: 0 0 16px; font-size: 12px; }
.medidas-imagem-wrap { overflow: auto; text-align: center; }
.medidas-imagem {
    display: block;
    width: 100%;
    max-width: 634px;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}
.medidas-grupo { margin-bottom: 22px; }
.medidas-grupo h4 { margin: 0 0 8px; font-size: 16px; }
.medidas-grupo h5 {
    margin: 12px 0 6px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.medidas-table-wrap { overflow-x: auto; }
.medidas-tabela { width: 100%; border-collapse: collapse; font-size: 12px; }
.medidas-tabela th,
.medidas-tabela td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
}
.medidas-tabela th { background: var(--surface-3); color: var(--ink-soft); font-size: 11px; }
.medidas-tabela td:first-child { text-align: left; font-weight: 600; color: var(--ink-soft); }

@media (max-width: 620px) {
    .rematricula-pagamento,
    .rematricula-confirmada { padding: 18px; }
    .rematricula-confirmada__hero { align-items: flex-start; }
}

/* Seleção de plano na rematrícula */
.rematricula-section-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.rematricula-section-title h3 { margin: 0; }
.rematricula-planos__hint-inline { font-size: 11.5px; color: var(--muted); font-weight: 400; line-height: 1.3; }
.rematricula-section-title__icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--surface-3);
    color: var(--primary);
}
.rematricula-section-title__icon .icon { width: 16px; height: 16px; }
.rematricula-section-title__icon--aabb { background: rgba(232, 212, 138, .14); color: #e8d48a; }
.rematricula-section-title__icon--danger { background: var(--danger-soft); color: var(--danger-text); }

.badge .icon { width: 12px; height: 12px; flex: none; }

.rematricula-planos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
}
.rematricula-plano {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rematricula-plano:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.rematricula-plano.is-selected {
    border-color: var(--success);
    background: linear-gradient(120deg, var(--success-soft), var(--surface-2) 70%);
    box-shadow: 0 0 0 1px var(--success), 0 8px 18px rgba(34, 197, 94, .13);
}
.rematricula-plano.is-selected .badge--primary { background: var(--success-soft); color: var(--success-text); }
.rematricula-plano input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rematricula-plano__check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--success);
    color: #fff;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .15s ease, transform .15s ease;
}
.rematricula-plano__check .icon { width: 11px; height: 11px; }
.rematricula-plano.is-selected .rematricula-plano__check { opacity: 1; transform: scale(1); }
.rematricula-plano__head { display: flex; flex-direction: column; gap: 3px; padding-right: 16px; }
.rematricula-plano__nome { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.rematricula-plano__valor { font-size: 18px; font-weight: 700; color: var(--ink); }
.rematricula-plano__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rematricula-plano__meta .badge { padding: 3px 8px; font-size: 11px; }

/* "Alteração de dados" — um único bloco vermelho com os três grupos */
.rematricula-collapse--dados > summary h3 { color: var(--danger-text); }
.rematricula-collapse--dados > summary .rematricula-collapse__chevron { color: var(--danger-text); }
.rematricula-collapse--dados .rematricula-section-title__icon { width: 26px; height: 26px; border-radius: 8px; }
.rematricula-collapse--dados .rematricula-section-title__icon .icon { width: 14px; height: 14px; }

.rematricula-dados { display: flex; flex-direction: column; gap: 20px; }
.rematricula-dados__group h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.rematricula-dados__group h4 .icon { width: 14px; height: 14px; flex: none; }
.rematricula-dados__group + .rematricula-dados__group {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.rematricula-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.rematricula-grid.is-full:not(.admin-treino-grid) .rematricula-slot:not(.is-selected) {
    opacity: .35;
    filter: grayscale(1);
    cursor: not-allowed;
}
.rematricula-grid.is-full:not(.admin-treino-grid) .rematricula-slot:not(.is-selected) input { cursor: not-allowed; }
.rematricula-grid.is-full:not(.admin-treino-grid) .rematricula-slot:not(.is-selected):hover {
    transform: none;
    border-color: var(--slot-color);
}

.rematricula-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 10px;
    background: rgba(71, 80, 92, .55);
}
.rematricula-day__title {
    padding: 1px 2px 6px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .24);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #e2e8f0;
}

.rematricula-day__empty { font-size: 12px; color: #94a3b8; padding: 10px 4px; }

.rematricula-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 8px 8px 11px;
    border: 1px solid var(--slot-color);
    border-radius: 8px;
    background: rgba(71, 80, 92, .35);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--slot-color) 34%, transparent), color-mix(in srgb, var(--slot-color) 16%, transparent)),
        rgba(71, 80, 92, .35);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.rematricula-slot:hover { transform: translateY(-1px); border-color: var(--slot-color); }
.rematricula-slot.is-selected {
    border: 2px solid var(--slot-color);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--slot-color) 44%, transparent), color-mix(in srgb, var(--slot-color) 24%, transparent)),
        rgba(71, 80, 92, .35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}
.rematricula-slot:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.rematricula-slot input { position: absolute; opacity: 0; pointer-events: none; }
.rematricula-slot__check {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--slot-color);
    color: #fff;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .15s ease, transform .15s ease;
}
.rematricula-slot__check .icon { width: 9px; height: 9px; }
.rematricula-slot.is-selected .rematricula-slot__check { opacity: 1; transform: scale(1); }
.rematricula-slot__time { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 10.5px; line-height: 1.2; font-weight: 800; color: #f8fafc; }
.rematricula-slot__time .icon { width: 9px; height: 9px; flex: none; opacity: .7; }
.rematricula-slot__level { font-size: 11px; line-height: 1.2; font-weight: 700; color: #f8fafc; }
.rematricula-slot__vagas {
    align-self: flex-start;
    margin-top: 1px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
    background: rgba(255, 255, 255, .08);
    background: color-mix(in srgb, var(--slot-color) 26%, transparent);
}

@media (max-width: 900px) {
    .rematricula-grid { grid-template-columns: repeat(7, 140px); }
}

@media (max-width: 620px) {
    .rematricula-banner { flex-wrap: wrap; }
    .rematricula-banner .btn { width: 100%; justify-content: center; }
    .rematricula-admin { flex-direction: column; align-items: stretch; }
}

/* Seções recolhíveis da rematrícula */
.rematricula-collapse { padding: 0; overflow: hidden; }

.rematricula-collapse > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.rematricula-collapse > summary::-webkit-details-marker { display: none; }
.rematricula-collapse > summary h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.rematricula-collapse__hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.rematricula-collapse__heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rematricula-collapse__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    line-height: 1.25;
    color: var(--muted);
}
.rematricula-collapse__item { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 260px; }
.rematricula-collapse__item .icon { width: 12px; height: 12px; flex: none; }
.rematricula-collapse__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rematricula-collapse__chevron { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .2s ease; }
.rematricula-collapse[open] .rematricula-collapse__chevron { transform: rotate(180deg); }
.rematricula-collapse > summary:hover { background: rgba(255, 255, 255, .02); }
.rematricula-collapse .card__body { padding: 0 20px 20px; }

@media (max-width: 620px) {
    .rematricula-collapse__hint { display: none; }
}

/* Aba Rematrícula (admin) — switch */
.rematricula-toggle-card .card__head { margin-bottom: 0; }
.rematricula-toggle-form { padding: 4px 20px 20px; }
.rematricula-uniforme__action { display: flex; align-items: flex-end; }

.switch { display: inline-flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
    position: relative;
    width: 52px;
    height: 28px;
    flex: none;
    border-radius: 999px;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    transition: background .18s ease, border-color .18s ease;
}
.switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .18s ease;
}
.switch input:checked + .switch__track { background: var(--success); border-color: var(--success); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(24px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch__text { display: flex; flex-direction: column; gap: 2px; }
.switch__text strong { font-size: 14px; }
.switch__text small { color: var(--muted); font-size: 12px; }

.rematricula-info { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
.rematricula-info p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.rematricula-info .muted { color: var(--muted); font-size: 12px; }

/* Status de rematrícula na lista de atletas */
.table__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table__athlete {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table__athlete-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.table__athlete-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* Associado AABB (rematrícula) */
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-field input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.checkbox-field__text { display: flex; flex-direction: column; gap: 2px; }
.checkbox-field__text strong { font-size: 14px; }
.checkbox-field__text small { color: var(--muted); font-size: 12px; }
.rematricula-aabb { padding: 14px 20px; }
.rematricula-aabb__line {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.rematricula-aabb__switch { gap: 10px; }
.rematricula-aabb__badge { margin-left: auto; }

.rematricula-counter { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rematricula-counter .icon { width: 14px; height: 14px; flex: none; color: var(--success-text); }

@media (max-width: 900px) {
    .rematricula-planos__grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 620px) {
    .rematricula-section-title { gap: 8px; }
    .rematricula-section-title__icon { width: 26px; height: 26px; border-radius: 8px; }
    .rematricula-section-title__icon .icon { width: 14px; height: 14px; }
    .rematricula-planos__grid { grid-template-columns: 1fr; }
    .rematricula-planos__hint-inline { flex-basis: 100%; }
    .rematricula-aabb__line { gap: 10px 12px; }
    .rematricula-aabb__badge { margin-left: 0; }
    .rematricula-collapse__summary { gap: 8px; }
    .rematricula-collapse__item { max-width: 100%; }
    .rematricula-slot__time { flex-wrap: wrap; }
}

/* Switch compacto (lista de planos) */
.switch--xs { gap: 7px; }
.switch--xs .switch__track { width: 32px; height: 14px; }
.switch--xs .switch__thumb { top: 1px; left: 1px; width: 10px; height: 10px; }
.switch--xs input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch--xs .switch__text strong { font-size: 12px; font-weight: 600; color: var(--muted); }
.switch--xs input:checked ~ .switch__text strong { color: var(--success-text); }

/* Atletas: nome uma vez + responsável com ícone */
.table__sub--icon { display: inline-flex; align-items: center; gap: 5px; }
.table__sub--icon .icon { width: 13px; height: 13px; flex: none; opacity: .8; }

/* Atletas: traço vermelho quando não há responsável */
.table__sub__missing { color: var(--danger-text); font-weight: 700; }

/* Ícone de responsável: traço vermelho diagonal quando ausente */
.resp-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    flex: none;
}
.resp-icon .icon { width: 13px; height: 13px; opacity: .8; }
.resp-icon.is-missing::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: var(--danger);
    transform: rotate(-45deg);
    box-shadow: 0 0 0 1.5px var(--surface);
}
.table__sub__name { color: #e8d48a; font-weight: 600; }

/* Financeiro do atleta: lista de mensalidades com rolagem interna */
.financeiro-mensalidades {
    max-height: 430px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.financeiro-mensalidades .table {
    min-width: 760px;
}
.financeiro-mensalidades .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
@media (max-width: 560px) {
    .financeiro-mensalidades {
        max-height: 50vh;
    }
}

/* Contrato de rematrícula (Autentique) */
.rematricula-contrato {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
}
.rematricula-contrato__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.rematricula-contrato__text {
    flex: 1;
    min-width: 0;
}
.rematricula-contrato__text h4 {
    margin: 4px 0 3px;
    font-size: 15px;
}
.rematricula-contrato__text p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 700px) {
    .rematricula-contrato {
        flex-wrap: wrap;
    }
    .rematricula-contrato .btn {
        width: 100%;
        justify-content: center;
    }
}

.rematricula-contrato__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Contrato embutido — abre abaixo do botão de assinar */
.contrato-assinatura {
    flex: 1 1 100%;
    min-width: 0;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
}
.contrato-assinatura__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.contrato-assinatura__head strong {
    font-size: 13px;
}
.contrato-assinatura__head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.contrato-assinatura__frame {
    position: relative;
    min-height: clamp(420px, 72vh, 760px);
}
.contrato-assinatura__loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    pointer-events: none;
}
.contrato-assinatura__loading[hidden] {
    display: none;
}
.contrato-assinatura__loading strong {
    font-size: 15px;
}
.contrato-assinatura__loading > span:last-child {
    color: var(--muted);
    font-size: 12px;
}
.contrato-assinatura__spinner {
    width: 26px;
    height: 26px;
    flex: none;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: contrato-spin .8s linear infinite;
}
@keyframes contrato-spin {
    to { transform: rotate(360deg); }
}
.contrato-assinatura iframe {
    display: block;
    width: 100%;
    height: clamp(420px, 72vh, 760px);
    border: 0;
    background: #fff;
}
@media (max-width: 700px) {
    .contrato-assinatura__head {
        flex-wrap: wrap;
    }
    .contrato-assinatura__head-actions {
        margin-left: auto;
    }
}

/* Contrato digital no topo da aba Contrato */
.vpanel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.vpanel__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.vpanel__header .vpanel__hint {
    margin-top: 0;
}
.contrato-digital-corner {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: -2px;
    text-align: center;
}
.contrato-digital-corner__pdf {
    display: inline-block;
    color: inherit;
    line-height: 0;
    text-decoration: none;
}
.contrato-digital__pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 46px;
    gap: 1px;
    border-radius: 7px;
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, .18);
    transition: background .15s ease, transform .15s ease;
}
.contrato-digital__pdf svg {
    width: 16px;
    height: 16px;
}
.contrato-digital__pdf span {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
}
.contrato-digital-corner__pdf:hover .contrato-digital__pdf {
    background: #b91c1c;
    transform: translateY(-1px);
}
.contrato-digital-corner__label {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
}
.contrato-digital-corner__status {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
@media (max-width: 560px) {
    .vpanel__header {
        flex-wrap: wrap;
    }
    .contrato-digital-corner {
        align-items: flex-start;
        margin-top: 0;
        text-align: left;
    }
}

/* Status do contrato digital na listagem de atletas */
.table__contract-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.table__contract-line .badge {
    white-space: nowrap;
}
.table--atletas .badge[hidden] {
    display: none !important;
}

/* Listagem de atletas: colunas equilibradas e badges compactos */
.table--atletas {
    table-layout: fixed;
    width: 100%;
}
.table--atletas .col--name    { width: 182px; }
.table--atletas .col--photo   { width: 36px; }
.table--atletas .col--idade   { width: 70px; }
.table--atletas .col--status  { width: 70px; }
.table--atletas .col--contrato { width: 170px; }
.table--atletas .col--sugestao { width: 160px; }
.table--atletas .col--treinos { width: 250px; }
.table--atletas .col--acoes   { width: 135px; }

/* Sugestão de plano para a próxima rematrícula */
.sugestao-plano-form {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sugestao-plano-form__row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sugestao-plano-form__select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 6px 24px 6px 8px;
    font-size: 11.5px;
}

.sugestao-plano-form__feedback {
    min-height: 0;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.25;
}

.sugestao-plano-form.is-saving .sugestao-plano-form__select {
    opacity: .55;
    pointer-events: none;
}

.sugestao-plano-form.is-saved .sugestao-plano-form__feedback {
    color: var(--success-text);
}

.sugestao-plano-form.is-error .sugestao-plano-form__feedback {
    color: var(--danger-text);
}

.table--atletas .avatar--md {
    width: 36px;
    height: 36px;
    font-size: 13px;
}
.table--atletas thead th,
.table--atletas tbody td {
    padding: 10px 8px;
}
.table--atletas thead th:nth-child(1),
.table--atletas tbody td:nth-child(1) {
    padding-left: 0;
    padding-right: 0;
}
.table--atletas thead th:nth-child(2),
.table--atletas tbody td:nth-child(2) {
    padding-left: 0;
}
.table--atletas thead th:nth-child(3),
.table--atletas tbody td:nth-child(3) {
    padding-left: 0;
}
.table--atletas thead th:nth-child(4),
.table--atletas tbody td:nth-child(4) {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}
.table--atletas tbody td:nth-child(4) .badge {
    padding: 3px 8px;
}
.table--atletas thead th.table__actions,
.table--atletas tbody td.table__actions {
    text-align: right;
    white-space: nowrap;
    padding-right: 10px;
}

.table--atletas .table__name {
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
}
.table--atletas .table__link {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.table--atletas .table__name .badge {
    flex: none;
    font-size: 10px;
    padding: 2px 6px;
    line-height: 1.2;
    white-space: nowrap;
}

.table--atletas .table__sub {
    font-size: 11.5px;
    line-height: 1.35;
}

.table__actions-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
}
.table__actions-group form.inline {
    display: contents;
}
.table__actions-group .btn-plain {
    width: 26px;
    height: 26px;
    margin: 0;
}
.table__actions-group .btn-plain .icon {
    width: 14px;
    height: 14px;
}

.table--atletas .link-tags {
    gap: 4px;
    margin-bottom: 0;
}
.table--atletas .link-tags .badge {
    font-size: 10px;
    padding: 2px 5px;
    line-height: 1.2;
}
.table--atletas .link-tags .picker-trigger {
    width: 26px;
    height: 26px;
}
.table--atletas .link-tags .picker-trigger .icon {
    width: 14px;
    height: 14px;
}

@media (max-width: 900px) {
    .table--atletas {
        min-width: 1073px;
    }
}

/* Contador de atletas no botão da listagem de treinos */
.atletas-count {
    min-width: 20px;
    padding: 2px 6px;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 800;
}

/* Ordenação manual dos treinos e planos */
.table--treinos tbody tr,
.table--planos tbody tr {
    cursor: grab;
}
.table--treinos tbody tr:active,
.table--planos tbody tr:active {
    cursor: grabbing;
}
.table--treinos tbody tr.is-dragging,
.table--planos tbody tr.is-dragging {
    opacity: .4;
}
.table--treinos tbody tr.is-drag-over,
.table--planos tbody tr.is-drag-over {
    box-shadow: inset 0 2px 0 var(--primary);
}
.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 7px;
    color: var(--muted);
    cursor: grab;
    vertical-align: middle;
}
.drag-handle .icon {
    width: 13px;
    height: 16px;
}
