/* ============================================================
   SIDEBAR DA DIREÇÃO — Academia Fernandinho Beltrão
   Carregado pelo includes/menu.php (junto com o custom-style.css
   que as telas já importam). Identidade: azul #1e4d8b.
   ============================================================ */

:root {
    --afs-largura: 262px;
    --afs-azul:        #1e4d8b;
    --afs-azul-escuro: #163a6b;
    --afs-azul-claro:  #2a5fa0;
    --afs-texto:       #e8eef7;
    --afs-texto-suave: #a9bcd8;
}

/* ---- empurra o conteúdo das telas existentes ---- */
body.afs-shell { background-color: #f1f3f5; }
body.afs-shell .main-content,
body.afs-shell > .container,
body.afs-shell > .container-fluid {
    margin-left: var(--afs-largura);
    padding: 18px 10px 24px;
    transition: margin-left .2s ease;
}

/* ---- sidebar ---- */
.afs-sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--afs-largura);
    display: flex; flex-direction: column;
    background: linear-gradient(170deg, var(--afs-azul) 0%, var(--afs-azul-escuro) 100%);
    color: var(--afs-texto);
    z-index: 1040;
    box-shadow: 2px 0 14px rgba(10, 30, 60, .18);
}

.afs-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.afs-brand img { height: 34px; width: auto; }
.afs-brand strong { display: block; font-size: .88rem; line-height: 1.15; }
.afs-brand small  { color: var(--afs-texto-suave); font-size: .7rem; }

.afs-user {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; font-size: .8rem;
    color: var(--afs-texto-suave);
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.afs-user .fa { font-size: 1.05rem; }

/* ---- busca ---- */
.afs-busca { position: relative; padding: 10px 12px 6px; }
.afs-busca .fa {
    position: absolute; left: 24px; top: 50%; transform: translateY(-38%);
    color: var(--afs-texto-suave); font-size: .8rem; pointer-events: none;
}
.afs-busca input {
    width: 100%; border: 0; border-radius: 8px;
    padding: 7px 10px 7px 32px; font-size: .82rem;
    background: rgba(255,255,255,.12); color: #fff; outline: none;
}
.afs-busca input::placeholder { color: var(--afs-texto-suave); }
.afs-busca input:focus { background: rgba(255,255,255,.2); }

/* ---- navegação ---- */
.afs-nav { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.afs-nav::-webkit-scrollbar { width: 6px; }
.afs-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

.afs-group { margin-top: 6px; }
.afs-group__title {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: none; border: 0; cursor: pointer;
    padding: 7px 10px 4px; color: var(--afs-texto-suave);
    font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.afs-group__title .fa { font-size: .6rem; transition: transform .18s ease; }
.afs-group.is-closed .afs-group__title .fa { transform: rotate(-90deg); }
.afs-group__itens { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.afs-group.is-closed .afs-group__itens { display: none; }

.afs-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px; margin: 1px 2px;
    border-radius: 8px; font-size: .84rem;
    color: var(--afs-texto); text-decoration: none;
    transition: background .12s ease;
}
.afs-item .fa { width: 17px; text-align: center; font-size: .85rem; color: var(--afs-texto-suave); }
.afs-item:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.afs-item.is-active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.afs-item.is-active .fa { color: #fff; }

/* ---- sair ---- */
.afs-sair {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 10px 12px 14px; padding: 8px;
    border-radius: 8px; font-size: .84rem; font-weight: 600;
    color: #ffd7d7; background: rgba(220, 53, 69, .25);
    text-decoration: none; transition: background .12s ease;
}
.afs-sair:hover { background: rgba(220, 53, 69, .45); color: #fff; text-decoration: none; }

/* ---- versão / data de atualização ---- */
.afs-versao {
    padding: 0 12px 12px;
    text-align: center;
    font-size: .68rem;
    color: var(--afs-texto-suave);
    letter-spacing: .02em;
}

/* ---- mobile ---- */
.afs-burger {
    display: none;
    position: fixed; top: 12px; left: 12px; z-index: 1050;
    width: 42px; height: 42px; border: 0; border-radius: 10px;
    background: var(--afs-azul); color: #fff; font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(10,30,60,.3); cursor: pointer;
}
.afs-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1035;
}
.afs-backdrop.is-open { display: block; }

@media (max-width: 991px) {
    body.afs-shell .main-content,
    body.afs-shell > .container,
    body.afs-shell > .container-fluid { margin-left: 0; padding-top: 64px; }
    .afs-burger { display: block; }
    .afs-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .afs-sidebar.is-open { transform: translateX(0); }
}

@media print {
    .afs-sidebar, .afs-burger, .afs-backdrop { display: none !important; }
    body.afs-shell .main-content { margin-left: 0; }
}
