/* ============================================================
   Portal de Gestão — União Desportiva Oliveirense
   CSS Layout-> Layout geral; SideBar; MAIN CONTENT e
   ============================================================ */


/* ============================================================
   BACK OFFICE — Layout geral
   ============================================================ */
#pagina-backoffice {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#pagina-backoffice > header {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  box-shadow: 4px 0 18px rgba(13,27,46,.18);
  transition: width var(--t);
}

/* Avatar / foto do utilizador */
.sidebar-perfil {
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy-light);
  border: 3px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(200,32,30,.3);
}

.sidebar-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.sidebar-avatar-iniciais {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .04em;
}

#nome-utilizador-logado {
  font-family: 'Oswald', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#role-utilizador-logado {
  display: inline-block;
  margin-top: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(200,32,30,.25);
  color: var(--red-light);
  border: 1px solid rgba(200,32,30,.4);
  border-radius: 50px;
  padding: 3px 10px;
}

/* Logo / título sidebar */
.sidebar-logo {
  padding: 16px 20px 0;
  text-align: center;
  display: none; /* aparece quando sem perfil */
}

/* Navegação */
#nav-principal {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

#nav-principal ul {
  list-style: none;
}

#nav-principal li {
  margin: 2px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-family: 'Oswald', sans-serif;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t), color var(--t), padding-left var(--t);
}

.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
  padding-left: 20px;
}

.nav-link.ativo {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(200,32,30,.35);
}

.nav-link.ativo:hover {
  background: var(--red-dark);
  padding-left: 14px;
}

/* Ícones dos links */
.nav-link::before {
  font-size: 1.1rem;
  flex-shrink: 0;
}
#nav-inscritos::before  { content: '👥'; }
#nav-escaloes::before   { content: '🏅'; }
#nav-admin::before      { content: '⚙️'; }
#nav-treinador::before  { content: '🏅'; }
#nav-diretor::before    { content: '📋'; }
#nav-jerseys::before    { content: '👕'; }

/* Botão terminar sessão */
.sidebar-footer {
  padding: 16px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

#btn-terminar-sessao {
  width: 100%;
  background: transparent;
  color: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.15);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: .88rem;
  justify-content: center;
  gap: 8px;
}

#btn-terminar-sessao::before {
  content: '⏻';
  font-size: 1.1rem;
}

#btn-terminar-sessao:hover {
  background: rgba(200,32,30,.2);
  border-color: var(--red);
  color: var(--red-light);
  transform: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar do main */
.main-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
  gap: 8px;
}

.main-topbar-titulo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.main-topbar-titulo span {
  color: var(--red);
}

/* Conteúdo das secções */
.secao-conteudo {
  padding: 32px 36px;
  flex: 1;
}

.secao-conteudo h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--red);
  display: inline-block;
}

.secao-conteudo > p {
  color: var(--gray-dark);
  font-size: .9rem;
  margin-bottom: 24px;
  margin-top: 8px;
}

#painel-lista-utilizadores h3{
  display: flex;
  justify-content: space-between;
  align-items: center;
 }
 
/* ============================================================
   BACK OFFICE — oculto até ao login
   ============================================================ */
#pagina-backoffice { display: none; }

/* ============================================================
   SECÇÃO: BackOffice dispays das áreas
   ============================================================ */
#secao-inscritos { display: block;}
#secao-escaloes  { display: none; }
#secao-admin     { display: none; }
#secao-treinador { display: none; }
#secao-diretor   { display: none; }


#foto-edicao-nova-preview-wrap {
    display: none;
}

/* ============================================================
   Comun em todas as áreas
   ============================================================ */

.linha-vazia td {
    /*Nas areas pessoas incritas, ÁREA DO DIRETOR TÉCNICO, ÁREA DO TREINADOR e GESTÃO DE UTILIZADORES */
    text-align: center;
    padding: 20px;
    color: var(--gray-mid)
}
