.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #003366;
    padding: 10px 30px; /* Ajustado para maior espaçamento interno */
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Adicionado um sombreado para destaque */
    height: 70px;
}

.header img {
    max-height: 60px; /* Ajustado o tamanho do logo */
    margin-left: 20px; /* Move o logo mais para dentro */
}

/* Contém o seletor de idioma (form com as flags) */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;           /* espaço entre flags */
    margin-left: auto;     /* empurra para a direita no header, se o header for flex */
}

.header .language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;        /* espaço entre flags */
    margin-left: auto;  /* empurra para a direita */
    margin-right: 60px; /* afasta da margem direita */
}

.header .language-selector img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.header .language-selector img:hover {
    transform: scale(1.2);
}

/* Remove cara de botão de formulário, fica a parecer link/ícone */
.language-selector button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Imagens das bandeiras */
.language-selector button img {
    width: 24px;
    height: 24px;
    display: block;
}

/* Pequeno efeito de hover para parecer interativo */
.language-selector button:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* (Opcional) se quiseres que a flag ativa tenha destaque mais tarde */
.language-selector button.is-active img {
    outline: 2px solid #fff;
    box-shadow: 0 0 0 2px #007bff;
    border-radius: 50%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 90px; /* Compensa o cabeçalho fixo */
    background-color: #f4f4f9;
    min-height: 100vh;
}

.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container img {
    max-width: 150px;
    margin-bottom: 20px;
}

.login-container h1 {
    margin-bottom: 20px;
    color: #003366;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    text-align: left;
    color: #333;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #00509e;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #003366;
}

.login-container a {
    display: block;
    margin-top: 10px;
    color: #00509e;
    text-decoration: none;
}

.login-container a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}


.language-selector img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.language-selector img:hover {
    transform: scale(1.1);
}
.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    margin-top: 20px; /* Garante espaçamento extra abaixo do cabeçalho */
    padding-top: 50px; /* Evita que o texto fique sobreposto */
    text-align: center;
}

.dashboard-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.dashboard-links a {
    padding: 10px 15px;
    text-decoration: none;
    background-color: #00509e;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.dashboard-links a:hover {
    background-color: #003366;
}

.dashboard-info {
    background-color: #f4f4f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-info p {
    margin: 0 0 10px;
    color: #333;
}

.form-container {
    max-width: 800px;
    margin: 120px auto 20px auto;
    padding: 20px;
    background-color: #f4f4f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-container form .button-link {
    display: block; /* Faz o botão ocupar a linha toda */
    margin: 20px auto; /* Centraliza o botão horizontalmente */
    text-align: center; /* Centraliza o texto no botão */
    width: fit-content; /* Ajusta a largura ao conteúdo */
}


.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-header h1 {
    color: #003366;
}

.form-group {
    margin-bottom: 15px;
    display: flex; /* Alinha label e input */
    flex-direction: column; /* Coloca o label acima do input */
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; /* Garante que os campos ocupem toda a largura */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box; /* Inclui padding e borda na largura total */
}

form fieldset {
    border: 1px solid #c8c8d0;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #e6e6eb;
    box-shadow: 0 1px 0 #ffffff inset, 0 1px 2px rgba(0,0,0,0.05);
}

form legend {
    font-size: 1.1rem;
    font-weight: bold;
    color: #003366;
    padding: 0 10px;
}
.form-group input[type="file"] {
    padding: 5px;
}

.form-group .radio-group {
    display: flex;
    gap: 10px;
}

.form-group .radio-group input {
    margin-right: 5px;
}

.checkbox-group {
    display: flex;
    gap: 10px; /* Espaçamento entre o texto e a checkbox */
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.country-select .flag {
    display: inline-block;
    width: 20px; /* Ajuste o tamanho da bandeira */
    height: 15px;
    margin-right: 10px;
    vertical-align: middle; /* Alinha verticalmente com o texto */
}

.country-select {
    display: flex;
    align-items: start;
    gap: 10px;
}

.country-select select {
    flex-grow: 1; /* Faz o select ocupar o espaço restante */
}



.form-footer button:not(.btn-primary):not(.btn-secondary):not(.button-link) {
  padding: 10px 15px;
  background-color: #00509e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.form-footer button:not(.btn-primary):not(.btn-secondary):not(.button-link):hover {
  background-color: #003366;
}


.form-footer a:hover{
  text-decoration: underline;
}

.info-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.info-text a {
    color: #00509e;
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}

/* =========================
   FOOTER (global) - versão azul institucional
   ========================= */

.footer {
  text-align: center;
  padding: 14px 16px;
  background-color: #003366; /* mantém o teu azul */
  color: #fff;
  width: 100%;
  position: relative;
  margin-top: auto; /* mantém o comportamento de "colar ao fundo" quando o layout usa flex */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  line-height: 1.35;
}

.footer-platform {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* Mobile polish */
@media (max-width: 480px) {
  .footer {
    padding: 12px 12px;
  }
  .footer-platform {
    font-size: 0.9rem;
  }
  .footer-copy {
    font-size: 0.78rem;
  }
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95rem;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* para aplicar o border-radius no conjunto */
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.styled-table thead {
    background: #f5f5f5;
}

.styled-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid #e0e0e0;
}

.styled-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.styled-table thead tr {
    background-color: #003366;
    color: white;
    text-align: left;
    font-weight: bold;
}

.styled-table thead tr th {
    text-align: center; /* Centraliza os títulos */
    vertical-align: middle; /* Centraliza verticalmente */
}

.styled-table th, .styled-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:hover {
    background-color: #f0f7ff;
}

.styled-table tbody tr td:first-child {
    text-align: center; /* Centraliza a checkbox na célula */
    vertical-align: middle; /* Centraliza verticalmente */
}

.styled-table tbody tr td:first-child input[type="checkbox"] {
    transform: scale(1.5); /* Aumenta o tamanho do checkbox */
    cursor: pointer; /* Adiciona um cursor de mão para melhor interação */
}

/* colunas mais “técnicas” centradas para melhor leitura */
.styled-table td:nth-child(5),
.styled-table td:nth-child(6),
.styled-table td:nth-child(7),
.styled-table th:nth-child(5),
.styled-table th:nth-child(6),
.styled-table th:nth-child(7) {
    text-align: center;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.button-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 10px 5px;
    background-color: #00509e; /* Fundo azul */
    color: white !important; /* Força o texto branco */
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    font-weight: bold;
    min-width: 200px;
}

.button-link:hover {
    background-color: #003366;
    color: #bbb8b8; /* Texto cinza escuro */
    border: 1px solid #ddd; /* Adiciona uma borda leve */
}

.action-link {
    color: #00509e;
    text-decoration: none;
    font-weight: bold;
}
.hero-section {
    background: linear-gradient(135deg, #003366, #00509e);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-top: 100px; /* Espaço abaixo do header */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-content .button-link.large {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px; /* Espaço entre os botões */
}

.hero-content .button-link.secondary {
    background-color: #ffffff;
    color: #00509e !important;
    border: 2px solid #ffffff;
}

.hero-content .button-link.secondary:hover {
    background-color: #f4f4f9;
    color: #003366 !important;
    border: 2px solid #ddd;
}


.info-section {
    text-align: center;
    padding: 40px 20px;
    background-color: #f4f4f9;
}

.info-section h2 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.info-section p {
    font-size: 1.2rem;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

.links-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
}

.link-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    max-width: 300px;
    width: 100%;
}

.link-card h3 {
    margin-bottom: 15px;
    color: #003366;
    font-size: 1.4rem;
}

.link-card .button-link {
    display: inline-block;
    margin-top: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: #003366; /* Azul escuro */
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px;
}

.sidebar ul li a:hover {
    background-color: #00509e; /* Azul mais escuro */
    color: white; /* Texto branco no hover */
}

.sidebar-link.disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.sidebar-back {
  font-weight: 700;
}

.sidebar-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin: 14px 0 8px;
}

.content {
    margin-left: 270px; /* Espaço para a sidebar */
    padding: 20px;
    min-height: 100vh;
    background-color: #f4f4f9;
}
.alert {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.hidden {
    display: none !important; /* Garante que o estilo seja aplicado em qualquer situação */
    visibility: hidden; /* Oculta o campo da visão */
    opacity: 0; /* Garante que o elemento seja totalmente invisível */
    position: absolute; /* Remove o campo do fluxo normal do layout */
    left: -9999px; /* Move o campo para fora da tela */
    pointer-events: none; /* Evita interações */
}

.delete-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border-radius: 10px;
    transition: transform .04s ease, opacity .15s ease;
}

.delete-button:hover {
    background-color: #ff1a1a;
}

/* ===== delete-button disabled: visual “inativo” ===== */
.delete-button:disabled,
.delete-button[disabled]{
  background-color: #c9c9c9;   /* cinza óbvio */
  color: #666;
  cursor: not-allowed;
  opacity: 0.9;
  box-shadow: none;
}

/* Evita o hover “vermelho” quando está disabled */
.delete-button:disabled:hover{
  background-color: #c9c9c9;
}

/* Backdrop do modal (escurece fundo e elimina “transparência feia”) */
.modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 3000;
  background: rgba(0,0,0,0.55); /* <- essencial */
}

.modal-content{
  width: min(920px, 96vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.35);
  border: 1px solid rgba(0,0,0,0.08);
  position: relative;

  display: flex;              /* ✅ */
  flex-direction: column;     /* ✅ */
  overflow: hidden;           /* ok */
}

/* Header do modal */
.modal-header{
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.modal-title{
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #003366;
}

.modal-body{
  flex: 1 1 auto;             /* ✅ ocupa o “meio” disponível */
  overflow-y: auto;           /* ✅ scroll aqui */
  padding: 16px 18px;
  padding-bottom: 90px;      /* mantém para não tapar com footer sticky */
}

/* Footer do modal (botão sempre visível) */
.modal-footer{
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding: 12px 18px;
  border-top: 1px solid #eee;
    height: 72px;
  display: flex;
  justify-content: center;
  gap: 12px;
}


/* Botão X */
.close-modal{
  appearance: none;
  border: none;
  background: #f2f2f5;
  color: #003366;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.close-modal:hover{
  background: #e7e7ec;
}

.modal.hidden {
    display: none;
}

/* O modal-content é flex, mas o form também tem de ser flex
   para o .modal-body ficar realmente "scrollável" */
#modal-bailarino .modal-content{
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* O FORM tem de ocupar a altura disponível */
#modal-bailarino #bailarino-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;      /* ✅ essencial para o overflow funcionar */
}

/* Agora o body pode scrollar */
#modal-bailarino .modal-body{
  flex: 1 1 auto;
  min-height: 0;      /* ✅ essencial em flex */
  overflow-y: auto;
}

/* Footer não cresce */
#modal-bailarino .modal-footer{
  flex: 0 0 auto;
}

#modal-lider .modal-content{
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

#modal-lider #lider-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;     /* ✅ essencial */
}

#modal-lider .modal-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#modal-lider .modal-footer{
  flex: 0 0 auto;
}

h1, h2, h3 {
    text-align: center; /* Centraliza o texto */
    margin-bottom: 20px; /* Adiciona espaço abaixo */
    font-weight: bold; /* Mantém ou reforça o destaque dos títulos */
}

/* ——— Subníveis (níveis por modalidade) ——— */
#campos-niveis-modalidade .form-group.subnivel label,
#campos-niveis-modalidade .subnivel-label {
  font-weight: 400 !important;
  color: #444;
}

/* sobrepor .form-group select { width: 100% } */
#campos-niveis-modalidade .form-group.subnivel select.subnivel-select {
  width: auto !important;
  max-width: 480px !important;
  display: inline-block;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px;
}

#campos-niveis-modalidade .form-group.subnivel {
  margin-bottom: 10px;
}

/* --------- Campos apenas de leitura no editar bailarino --------- */

.readonly-field {
    padding: 0;
    background-color: transparent;  /* sem caixa */
    border: none;
    min-height: 0;
    display: block;
    font-size: 0.95rem;
    color: #333;
}

/* --------- Bloco de erros do formulário (já usado no editar bailarino) --------- */

.form-errors {
    margin-bottom: 20px;
    border-radius: 6px;
}

/* Mantém compatibilidade com .alert.error que já tens */
.form-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* --------- Texto de ajuda consistente --------- */

.help-text {
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
}

/* --------- Ajustes de UX para botões no rodapé do formulário --------- */

.form-footer button {
    min-width: 140px;
    padding: 10px 15px;
}

.form-footer a {
    display: inline-block;
    margin-top: 10px;
}

/* --------- Responsivo básico para ecrãs pequenos --------- */

@media (max-width: 600px) {
    .form-container {
        margin: 100px 10px 20px 10px;
        padding: 15px;
    }

    .form-footer button,
    .form-footer a {
        width: 100%;
    }

    .form-footer button {
        margin-bottom: 10px;
    }
}


/* Espaçamento no rodapé dos formulários */
.form-footer {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ======== CAMPOS GENÉRICOS (ex.: pesquisa de coreógrafo) ======== */

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

/* ======== RESULTADOS DA PESQUISA DE COREÓGRAFOS ======== */

#coreografo-results {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.coreografo-card {
    background-color: #ffffff;
    margin: 6px 0;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.95rem;
}

.coreografo-card-title {
    font-weight: bold;
    color: #003366;
}

.coreografo-card-meta {
    color: #555;
    font-size: 0.9rem;
}

.coreografo-card .btn-primary {
    margin-top: 6px;
    padding: 6px 18px;
    font-size: 0.9rem;
}

/* Responsivo: melhor empilhamento em ecrãs pequenos */
@media (max-width: 600px) {
    .coreografo-card {
        padding: 10px;
    }
}

/* ======== BARRA DE FILTROS PARA LISTAGENS ======== */

.filters-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
    width: 100%;
}

.filters-bar .form-group {
    margin-bottom: 0;
}

/* Responsivo: em ecrãs médios, 2 por linha */
@media (max-width: 900px) {
    .filters-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Em ecrãs pequenos, 1 por linha */
@media (max-width: 600px) {
    .filters-bar {
        grid-template-columns: 1fr;
    }
}

/* ======== TABELAS RESPONSIVAS EM LISTAGENS ======== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-responsive::after {
  content: "⟷";
  position: absolute;
  top: 6px;
  right: 10px;
  opacity: .4;
  font-size: 14px;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
}

/* --- MODO CARTÕES EM ECRÃS PEQUENOS (ex.: iPhone) --- */

/* Total row fora da tabela (evita tfoot/colspan a partir em mobile) */
.table-total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  margin-top:10px;
  border:1px solid #E8EEF7;
  border-radius:12px;
  background:#F8FBFF;
  font-weight:700;
}

.table-total-row .table-total-label{
  color:#0B1B3A;
}

.table-total-row .table-total-value{
  white-space:nowrap;
}

/* Mobile: garante que os "cards" não rebentam largura com textos/valores longos */
@media (max-width: 600px){
  .styled-table tbody td{
    flex-wrap:wrap;          /* permite quebrar linha */
    align-items:flex-start;
  }
  .styled-table tbody td::before{
    flex:0 0 46%;
    max-width:46%;
  }
  .styled-table tbody td{
    overflow-wrap:anywhere;  /* corta palavras gigantes */
    word-break:break-word;
  }
  .table-total-row{
    border-radius:14px;
  }
}

@media (max-width: 600px) {

    .table-responsive {
        overflow-x: visible; /* já não precisamos de scroll horizontal em modo cartão */
    }

    .styled-table {
        border: 0;
    }


    .styled-table thead {
        display: none; /* escondemos o header – os labels vêm de data-label */
    }

    .styled-table tbody tr {
        display: block;
        margin-bottom: 12px;
        background-color: #ffffff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    .styled-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 10px;
        border: none;
        border-bottom: 1px solid #eee;
        font-size: 0.85rem;
        white-space: normal;
        word-wrap: break-word;
    }

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

    .styled-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #003366;
        margin-right: 8px;
        flex: 0 0 45%;
    }

    /* Botão de ação mais compacto */
    .styled-table tbody td .btn-primary,
    .styled-table tbody td .btn-secondary {
        padding: 6px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Ícones + texto de validação bem alinhados */
    .styled-table tbody td span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
}

/* Grid genérico para pares de campos (ex: cidade/localidade, facebook/instagram, etc.) */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;   /* MOBILE: uma coluna */
    gap: 16px;                    /* espaçamento vertical/horizontal entre campos */
}

/* Em ecrãs médios/grandes, passa para duas colunas */
@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;         /* podes ajustar se quiseres mais/menos espaço */
        row-gap: 16px;
    }
}

/* Opcional: se já usas margin-bottom nos .form-group, isto evita "dobrar" o espaço dentro do grid */
.form-grid-2 .form-group {
    margin-bottom: 0;
}

/* === Layout base (competição/escola) === */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: row;      /* <-- isto resolve o “vazio gigante” */
  align-items: stretch;
}

/* sidebar fixa/estável com header fixo */
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  position: sticky;
  top: 90px;                /* igual ao padding-top do body (header fixo) */
  height: calc(100vh - 90px);
  overflow: auto;
}

/* área principal */
.main-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px 24px 48px;
}

.layout-main {
    flex: 1;
    display: flex;
    align-items: stretch;
}


.layout-content {
    flex: 1;
    padding: 20px;
}

.page-header {
    text-align: center;
}

.page-header h1 {
    margin-bottom: 5px;
    color: #003366;
}

.page-header .help-text {
    margin-top: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-nav li.is-active > a {
    background: #ffe4a3;            /* dourado muito claro no fundo */
    border-left: 3px solid #d4af37; /* dourado tipo All Dance */
    font-weight: 600;
}

/* ======== MENU HAMBÚRGUER / SIDEBAR RESPONSIVA ======== */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 900px) {
    .layout-main {
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 70px; /* mesma altura do header */
        left: 0;
        height: calc(100% - 70px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

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

    .layout-content {
        padding: 15px;
    }

    .menu-toggle {
        display: block;
    }
}

.required {
  color: #c0392b;
  font-weight: bold;
}
.required-note {
  margin-bottom: 15px;
}
.field-errors { color: #c0392b; margin-top: 6px; }
.has-error input, .has-error select, .has-error textarea { border-color: #c0392b; }

/* django-countries: limitar flags só dentro do campo de nacionalidade */
.form-group .country-select-flag,
.form-group .flag {
  width: 18px;
  height: auto;
  max-width: 18px;
  display: inline-block;
  vertical-align: middle;
}


/* Grid 3 colunas para redes sociais */
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

.checklist {
    margin: 10px 0 14px;
    padding-left: 18px;
}
.checklist li {
    margin: 6px 0;
}

/* Password rules: escondidas por defeito */
.password-rules {
    display: none;
    margin-top: 10px;
}
.password-rules.is-open {
    display: block;
}

/* Um pouco mais claro o bloco de documentação */
.doc-box {
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
}

/* Botão de download mais “call to action” */
.button-link.secondary {
    display: inline-block;
    text-decoration: none;
    margin-top: 8px;
}
/* === Phone widget: prefixo + número na mesma linha === */
.phone-widget {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Select do prefixo */
.phone-widget .phone-prefix-select {
  flex: 0 0 240px;     /* largura fixa legível */
  min-width: 240px;
  height: 44px;
}

/* Input do número */
.phone-widget .phone-number-input {
  flex: 1 1 auto;      /* ocupa o resto */
  min-width: 160px;
  height: 44px;
}

/* Mobile: empilha */
@media (max-width: 520px) {
  .phone-widget {
    flex-direction: column;
    align-items: stretch;
  }

  .phone-widget .phone-prefix-select,
  .phone-widget .phone-number-input {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}


/* header igual às tabelas (azul institucional) */
.bailarinos-picker .picker-head{
  background: #003366;
  color: #fff;
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* linhas mais “tabela” */
.bailarinos-picker .picker-row{
  padding: 10px 12px;
  border-top: 1px solid #eee;
}

.bailarinos-picker .picker-row:hover{
  background: #f0f7ff; /* igual ao hover das styled-table */
}

/* checkbox um bocadinho maior (consistente com styled-table) */
.bailarinos-picker input[type="checkbox"]{
  transform: scale(1.2);
  cursor: pointer;
}

/* === "i" do header (coluna Idade) — precisa de contraste no fundo azul === */
.bailarinos-picker .picker-head .level-flag.info-flag{
  width: 16px;
  height: 16px;
  margin-left: 6px;

  background: #ffffff;          /* invertido */
  color: #003366;               /* azul institucional */
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);

  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.bailarinos-picker .picker-head .level-flag.info-flag:hover{
  transform: scale(1.08);
}

.form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 980px){
  .form-grid{ grid-template-columns: 1fr; }
}
.form-section{
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.section-title{
  margin: 0 0 12px 0;
}

.bailarinos-picker{
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  overflow: hidden;
}
.picker-head, .picker-row{
  display: grid;
  grid-template-columns: 1.6fr .6fr 1fr;
  gap: 10px;
  align-items: center;
}

.picker-body{
  max-height: 420px;
  overflow: auto;
}

.picker-row:hover{
  background: #fafafa;
}
.picker-col.name{
  display: flex;
  align-items: center;
  gap: 10px;
}
.picker-name{
  font-weight: 600;
}

.picker-col.level-mod {
  /* ajusta ao teu layout */
  min-width: 140px;
}

.level-flag{
  margin-left: 6px;
  font-weight: 800;
  cursor: help;
  vertical-align: super;
  font-size: 0.85em;
  display: inline-block;
}

/* Tooltip “global” (vai ser criado no body via JS) */
.level-tooltip{
  position: fixed;
  z-index: 99999;
  display: none;
  max-width: 360px;
  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  pointer-events: none; /* não “rouba” o hover/click */
}

.level-inline-tip{
  display: none;
  position: absolute;
  left: 12px;
  top: -6px;
  white-space: nowrap;
  background: #111;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 9999;
}

.level-flag:hover .level-inline-tip{
  display: block;
}

.level-flag.is-hidden { display: none !important; }

.level-flag.info-flag{
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  background: #003366;  /* azul institucional */
  color: #fff;
  vertical-align: middle;
}
.level-flag.info-flag:hover{
  transform: scale(1.06);
}

.empty-state{
  padding: 12px;
  text-align: center;
  color: #666;
}
.info-box{
  border: 1px dashed #cfcfcf;
  border-radius: 10px;
  padding: 10px 12px;
}

/* Lista vertical de bailarinos */
.bailarinos-lista {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.bailarinos-lista li {
  margin-bottom: 0.3em;
  line-height: 1.3;
}

.bailarino-meta {
  color: #555;
  font-size: 0.9em;
}
/* ===== Tooltip genérico (para botões disabled) ===== */
.tooltip-wrap{
  position: relative;
  display: inline-block;
}

/* ---- Badges curtos (coreógrafo / tempo extra / contagens) ---- */
.badge{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.18rem .55rem;
  border-radius:999px;
  font-size:.78rem;
  line-height:1.2;
  border:1px solid rgba(0,0,0,.12);
  white-space:nowrap;
}

.badge-soft{ background: rgba(0,0,0,.04); }
.badge-muted{ background: rgba(0,0,0,.02); opacity:.75; }
.badge-warn{ background: rgba(255, 193, 7, .18); }
.badge-count{ margin-left:.5rem; font-weight:700; }

/* ---- Coreografias: nome + badges na mesma célula ---- */
.coreo-title{
  display:flex;
  flex-direction:column;
  gap:.35rem;
}

.coreo-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}

/* ---- Accordion (details/summary) ---- */
.accordion-block{
  margin-top: 10px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  background: #fff;
  overflow:hidden;
}

.accordion-summary{
  cursor:pointer;
    user-select: none;
  list-style:none;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: #f4f7fb;
    border: 1px solid #dbe2ef;
}

details[open] .accordion-summary {
  background: #e9f0fb;
  border-color: #b6c7e5;
}

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

.accordion-summary:hover{
  background: rgba(0,0,0,.03);
}

.accordion-title{
  margin:0;
  display:flex;
  align-items:center;
  gap:.5rem;
  font-size: 1.05rem;
}

.accordion-hint{
  opacity:.7;
  font-weight: 600;
}

.accordion-body{
  padding: 12px 14px;
}

/* --- Coreografias: Bailarinos em chips (melhor para células de tabela) --- */
.td-bailarinos-coreo {
  min-width: 0;          /* em vez de 260px */
  max-width: none;       /* deixa a largura vir da coluna */
  white-space: normal;
    position: relative;
}

.bailarinos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}


.b-mini {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.1;
}

/* Badge pro do tempo extra */
.badge-te-pro {
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.badge-te-cost {
  font-weight: 600;
  opacity: .9;
  margin-left: 6px;
}
.bailarinos-resumo{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.bailarinos-resumo--stack{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-end; /* fica arrumado no canto direito da célula */
}

.btn-link-mini{
    position: relative;
    z-index: 2;
    pointer-events: auto;
  background:none;
  border:0;
  padding:0;
  color:#0b4aa2;
  font-weight:600;
  cursor:pointer;
  text-decoration:underline;
}

/* ===== Linha expandida: claramente “filha” da coreografia acima ===== */
.row-bailarinos-detalhe td{
  background: linear-gradient(90deg, rgba(212,175,55,.22), rgba(212,175,55,0) 22px), #fbfcfe;
  border-top: 0;
  padding-top: 12px;
  padding-bottom: 16px;
  position: relative;
}

/* filete dourado vertical (mais óbvio e premium) */
.row-bailarinos-detalhe td::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#d4af37;
  opacity:.85;
  border-radius: 0 6px 6px 0;
}

/* Tabela: deixa o browser gerir as larguras */
.coreos-table{
  table-layout: auto;
  width: 100%;
}

/* ===== Destacar a row da coreografia quando a linha seguinte (detalhe) está visível ===== */
.coreos-table tbody tr:has(+ tr.row-bailarinos-detalhe:not([hidden])){
  background: #fffdf6; /* creme suave */
}

.coreos-table tbody tr:has(+ tr.row-bailarinos-detalhe:not([hidden])) td{
  border-bottom-color: rgba(212,175,55,.35);
}

/* Fallback universal */
.coreos-table tbody tr.is-expanded-parent{
  background: #fffdf6;
}
.coreos-table tbody tr.is-expanded-parent td{
  border-bottom-color: rgba(212,175,55,.35);
}

.row-bailarinos-detalhe td { padding-left: 18px; }
.row-bailarinos-detalhe td::before { left: 6px; }

/* Regra base: quebra por palavras, não por letras */
.coreos-table th,
.coreos-table td{
  white-space: normal;
  overflow-wrap: break-word;  /* quebra palavras longas só quando necessário */
  word-break: normal;         /* não parte letras */
}

/* Custo (e Ações se existir): nunca quebrar */
.coreos-table th:nth-child(7),
.coreos-table td:nth-child(7),
.coreos-table th:nth-child(8),
.coreos-table td:nth-child(8){
  white-space: nowrap;
}

/* Header: evita que “Sub-divisão” fique em 2 linhas feias demais */
.coreos-table th{
  line-height: 1.15;
}

.coreo-badges .badge{
  white-space: normal;      /* ✅ agora pode quebrar */
  max-width: 100%;
  overflow-wrap: anywhere;  /* ✅ não invade a célula do lado */
}

.coreos-table th:nth-child(6){
  white-space: normal;
  line-height: 1.15;
}

/* ===== Bailarinos chips (PREMIUM): azul + filete dourado subtil ===== */
.b-chip{
  display: inline-flex;
  flex-direction: column;
  gap: 2px;

  padding: 6px 10px;
  border-radius: 999px;

  /* base azul suave */
  background: rgba(0, 80, 158, .08);
  color: #003366;

  /* borda azul muito leve + “anel” dourado interno */
  border: 1px solid rgba(0, 80, 158, .22);
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 55, .35),   /* dourado All Dance, discreto */
    0 1px 0 rgba(255,255,255,.65) inset;      /* brilho suave */

  max-width: 100%;
}

/* subtítulo (idade · nível) discreto */
.b-chip .b-mini{
  font-size: 12px;
  opacity: .85;
  line-height: 1.1;
}

.b-chip:hover{
  background: rgba(0, 80, 158, .12);
  border-color: rgba(0, 80, 158, .32);
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 55, .60), /* ✅ dourado só no hover */
    0 2px 6px rgba(0,0,0,.06);
}

/* opcional: quando há muitos chips, melhora legibilidade */
.b-name{ font-weight: 800; }

/* ===========================
   COMPETIÇÃO / INSCRIÇÃO
   UI "plataforma profissional"
   =========================== */

/* Layout helpers */
.inline-form { display: inline-block; }
.micro-note { margin: 8px 0 0; opacity: .8; font-size: .9rem; }
.soft-hr { margin: 14px 0; opacity: .25; }

/* Page head (top panel) */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.page-head-main { flex: 1; min-width: 280px; }
.page-title { margin: 0; font-size: 1.6rem; letter-spacing: .2px; }
.page-subtitle { margin: 6px 0 0; opacity: .85; }

.page-meta { margin-top: 10px; }
.meta-line { opacity: .95; }
.meta-sep { margin: 0 8px; opacity: .5; }

.badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.page-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* Card container */
.card-like {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* KPIs */
.kpis {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 6px;
}

.kpi {
  flex: 1;
  min-width: 180px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}

.kpi-label {
  opacity: .75;
  font-size: .9rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .2px;
}

/* Details (small) */
.mini-details { margin-top: 6px; }
.mini-details summary.button-link { display: inline-block; cursor: pointer; }

/* Payment block */
.payment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.upload-inline {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}

.ok-line { margin: 0; opacity: .9; }

/* Accordion header bar layout */
.accordion-header-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  align-items: flex-start;
  flex-wrap: wrap;
}

.accordion-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Button-link disabled (visual only) */
.button-link.is-disabled {
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
}


.delete-button:active { transform: translateY(1px); }

/* Table refinements for an "international platform" feel */
.styled-table th {
  font-size: .92rem;
  letter-spacing: .2px;
}

.styled-table td {
  vertical-align: middle;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .page-title { font-size: 1.35rem; }
  .page-head-actions { justify-content: flex-start; }
  .kpi { min-width: 150px; }
}

.competition-card { margin-top: 14px; }

/* =========================================
   BOTÕES (plataforma competição artística)
   - btn-primary: ação principal (decisiva)
   - btn-secondary: ação de fluxo (navegação/edição)
   - btn-ghost: ação neutra (ver detalhes/atalhos)
   ========================================= */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 16px;
  border-radius: 12px;

  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;
  cursor: pointer;

  border: 1px solid transparent;
  transition: transform .05s ease, filter .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 42px;
}

.btn:active{ transform: translateY(1px); }

.btn[disabled],
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary = azul institucional + “peso” premium */
.btn-primary{
  background: #00509e;
  color: #fff !important;
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 8px 20px rgba(0,80,158,.18);
}

.btn-primary:hover{
  filter: brightness(.95);
}

/* Secondary = branco/clarinho + contorno (ação de fluxo) */
.btn-secondary{
  background: #ffffff;
  color: #003366 !important;
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.btn-secondary:hover{
  background: rgba(0,80,158,.06);
  border-color: rgba(0,80,158,.28);
}

/* Ghost = link premium (para detalhes/atalhos sem “gritar”) */
.btn-ghost{
  background: transparent;
  color: #00509e !important;
  border-color: transparent;
  box-shadow: none;
  padding: 8px 10px;
  min-height: 36px;
  font-weight: 800;
}

.btn-ghost:hover{
  background: rgba(0,80,158,.08);
  border-color: rgba(0,80,158,.12);
}

/* Small button */
.btn-sm{
  padding: 8px 12px;
  min-height: 36px;
  border-radius: 10px;
  font-size: .95rem;
}

/* =========================
   Botões — responsive sizing
   ========================= */

@media (max-width: 520px){
  .btn{
    padding: 9px 12px;
    min-height: 38px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  .btn-sm{
    padding: 8px 10px;
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.92rem;
  }

  /* Evita botões “largos demais” empurrarem layout */
  .button-link{
    min-width: 0;
    width: auto;
  }
}

/* ===========================
   REMOÇÃO DOS ÚLTIMOS INLINEs
   (classes usadas no template)
   =========================== */

.section-title{ margin: 0; }
.mt-0{ margin-top: 0; }
.mt-8{ margin-top: 8px; }
.mt-10{ margin-top: 10px; }
.mt-12{ margin-top: 12px; }
.mt-14{ margin-top: 14px; }
.mb-0{ margin-bottom: 0; }
.mb-8{ margin-bottom: 8px; }

.list-tight{ margin-top: 10px; }
.muted-inline{ margin-left: 6px; opacity: .75; }

.payment-block{ margin-top: 10px; }
.payment-title{ margin: 0 0 8px 0; }
.payment-balance{ margin: 0 0 10px 0; }
.payment-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.upload-inline .upload-head{ margin: 0 0 8px 0; }
.upload-inline .upload-help{ opacity: .8; }
.upload-inline .upload-submit{ margin-top: 8px; }

.actions-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top: 12px; }

.table-empty{ text-align:center; }

/* Deixar os títulos dentro do accordion sem margin inline */
.accordion-title{ margin: 0; }

/* Espaçamento padrão para blocos accordion sucessivos */
.accordion-block + .accordion-block{ margin-top: 14px; }


/* =========================
   Ultra-premium Stepper
   (colar no FIM do styles.css)
   ========================= */

.stepper{
  position: sticky;
  top: 88px;              /* ajusta se o teu header tiver outra altura */
  z-index: 1200;
  margin: 14px 0 18px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  backdrop-filter: blur(10px);
}

.stepper-track{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.stepper-track::-webkit-scrollbar{ display:none; }

.stepper .step{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.08);
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
    position: relative;
}

.stepper .step:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.14);
}

.stepper .step-icon{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .12);
  flex: 0 0 auto;
}

.stepper .step-num{
  font-size: 12px;
  font-weight: 800;
  opacity: .85;
}

.stepper .step-label{
  font-size: 14px;
  letter-spacing: .1px;
}

.stepper .step.is-current{
  background: rgba(255,255,255,.96);
  border-color: rgba(212,175,55,.42);
  box-shadow:
    0 14px 30px rgba(0,0,0,.08),
    0 10px 26px rgba(212,175,55,.10);
}
.stepper .step.is-current .step-label{
  font-weight: 900;
}
.stepper .step.is-current::after{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(212,175,55,0) 0%,
    rgba(212,175,55,.95) 25%,
    rgba(212,175,55,.55) 75%,
    rgba(212,175,55,0) 100%
  );
  opacity: .95;
}

.stepper .step.is-current .step-icon{
  background: rgba(212,175,55,.14);
  border-color: rgba(212,175,55,.35);
}

/* remove qualquer “barra azul” antiga (se estiver a ser aplicada por outra regra) */
.stepper .step.is-current{
  border-color: rgba(212,175,55,.40);
  box-shadow: 0 14px 30px rgba(212,175,55,.10);
}

/* Done: check SEMPRE (mesmo quando is-current) */
.stepper .step.is-done{
  background: rgba(22, 163, 74, .08);
  border-color: rgba(22, 163, 74, .24);
}
.stepper .step.is-done .step-icon{
  background: rgba(22, 163, 74, .16);
  border-color: rgba(22, 163, 74, .28);
}
.stepper .step.is-done .step-num{
  font-size: 0; /* esconde o número */
}
.stepper .step.is-done .step-num::before{
  content: "✓";
  font-size: 13px;
  font-weight: 900;
  opacity: .95;
}

/* Locked: premium, sem “emoji lock” */
.stepper .step.is-locked{
  opacity: .45;
  background: rgba(15, 23, 42, .03);
  border-color: rgba(15, 23, 42, .08);
  pointer-events: none;
}
.stepper .step.is-locked .step-icon{
  background: rgba(15, 23, 42, .04);
  border-color: rgba(15, 23, 42, .10);
}

/* ===== Stepper: Resumo (overview) NÃO é done ===== */
.stepper .step.is-summary{
  background: rgba(0, 51, 102, .05);
  border-color: rgba(0, 51, 102, .14);
}
.stepper .step.is-summary .step-icon{
  background: rgba(0, 80, 158, .10);
  border-color: rgba(0, 80, 158, .22);
}

/* Quando o Resumo é o current, reforça como “em curso” */
.stepper .step.is-summary.is-current{
  background: rgba(0, 80, 158, .10);
  border-color: rgba(0, 80, 158, .28);
  box-shadow: 0 10px 24px rgba(0,80,158,.10);
}

/* Legend: escondida por defeito (fica “premium” e limpa) */
.stepper-legend{
  display: flex;
  gap: 14px;
  margin-top: 8px;
  padding: 0 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-2px);
  transition: max-height .16s ease, opacity .16s ease, transform .16s ease;
}
.stepper:focus-within .stepper-legend,
.stepper:hover .stepper-legend{
  max-height: 40px;
  opacity: .85;
  transform: translateY(0);
}

.legend-item{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(148,163,184,.35);
}

.legend-dot.is-done{ background: rgba(22,163,74,.55); }
.legend-dot.is-current{ background: rgba(0,51,102,.55); }
.legend-dot.is-todo{ background: rgba(148,163,184,.35); }
.legend-dot.is-locked{ background: rgba(71,85,105,.35); }

/* =========================
   Stepper tooltip (mobile)
   ========================= */

.stepper-tooltip {
  position: fixed;
  z-index: 99999;
  background: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Só faz sentido em mobile */
@media (min-width: 521px){
  .stepper-tooltip { display: none; }
}

/* Mobile: mais compacto */
@media (max-width: 900px){
  .stepper{ top: 74px; padding: 8px; border-radius: 14px; }
  .stepper .step{ padding: 9px 12px; }
  .stepper .step-label{ font-size: 13px; }
}

/* =========================
   Stepper — Mobile “compact premium”
   - sem scroll horizontal
   - labels só no step atual
   ========================= */

@media (max-width: 520px){
  /* O container deixa de “empurrar” horizontalmente */
  .stepper{
    padding: 8px;
  }

  /* Em vez de overflow-x, permitimos quebra (2 linhas) */
  .stepper-track{
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  /* Step mais compacto e consistente */
  .stepper .step{
    padding: 8px 10px;
    border-radius: 14px;
    gap: 8px;
    flex: 0 1 auto;
  }

  /* Ícone ligeiramente menor */
  .stepper .step-icon{
    width: 22px;
    height: 22px;
  }

  /* Por defeito: esconder labels (fica minimalista e cabe sempre) */
  .stepper .step-label{
    display: none;
    font-size: 13px;
  }

  /* Mostrar label SÓ no passo atual (para orientação) */
  .stepper .step.is-current .step-label{
    display: inline;
  }

  /* Opcional: quando é “done”, continua clean */
  .stepper .step.is-done .step-label{
    display: none;
  }
  .stepper .step.is-done.is-current .step-label{
    display: inline;
  }

  /* Underline dourado (só no current) fica mais contido no mobile */
  .stepper .step.is-current::after{
    left: 12px;
    right: 12px;
    bottom: 5px;
  }
}

/* ===== Fix âncoras com header+stepper sticky ===== */
.anchor-target{
  scroll-margin-top: 190px; /* ajusta fino se precisares: 150–190 costuma bater certo */
}

/* ===========================
   SIDEBAR — UNIFICAR ESCOLA + COMPETIÇÃO
   (ul/li/a + sidebar-link)
   =========================== */

/* Base do nav */
.sidebar-nav{
  font-size: 0.98rem;
}

/* Links (menu escola) */
.sidebar-nav ul > li > a{
  color: #003366;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 2px 10px;
  transition: background-color .15s ease, color .15s ease, transform .05s ease;
}

/* Links (menu competição) */
.sidebar-nav .sidebar-link{
  display: block;
  color: #003366;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 2px 10px;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease, transform .05s ease;
}

/* Hover consistente */
.sidebar-nav ul > li > a:hover,
.sidebar-nav .sidebar-link:hover{
  background: rgba(0, 80, 158, .08);
  color: #003366;
}

/* Active consistente */
.sidebar-nav li.is-active > a,
.sidebar-nav .sidebar-link.active{
  background: #ffe4a3;
  border-left: 3px solid #d4af37;
  font-weight: 700;
}

/* Disabled: escola (span) */
.sidebar-nav .is-disabled{
  display: block;
  opacity: .55;
  cursor: not-allowed;
  padding: 10px 14px;
  margin: 2px 10px;
  border-radius: 10px;
}

/* Disabled: competição (a/span com .disabled) */
.sidebar-nav .sidebar-link.disabled{
  display: block;
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Back link (Voltar ao Dashboard) */
.sidebar-nav .sidebar-back{
  display: block;
  font-weight: 800;
  padding: 10px 14px;
  margin: 8px 10px 6px;
  border-radius: 10px;
  color: #003366;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.06);
}
.sidebar-nav .sidebar-back:hover{
  background: rgba(0,80,158,.08);
}

/* Títulos de secção (competição) mais “premium” e consistentes */
.sidebar-section-title{
  margin: 14px 12px 8px;
  font-size: .80rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #003366;
  opacity: .7;
}

/* Pequena afinação do container sidebar para “presença” */
.sidebar{
  background: #f7f7f7;
}

/* ===========================
   DETALHES INSCRIÇÃO (TOP + RESUMO)
   =========================== */

/* Mata o “vazio” no topo: o teu CSS antigo empurra títulos demais */
.dashboard-header h2 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Topo compacto */
.page-top {
  padding: 16px 16px 12px;
}

.page-top-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}

.page-top-main{ flex:1; min-width:260px; }
.page-top-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.page-where{
  margin-top: 6px;
  opacity: .9;
}
.page-dot{ margin: 0 8px; opacity:.5; }

.page-top-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.page-top-note{
  margin: 10px 0 0;
  opacity: .9;
}

/* Badges semânticos */
.badge-strong{
  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.14);
  font-weight: 800;
}
.badge-deadline{
  background: rgba(212,175,55,.18);
  border-color: rgba(212,175,55,.45);
}

.badge-status{
  border: 1px solid rgba(0,0,0,.12);
  font-weight: 900;
}
.badge-draft{
  background: rgba(0,80,158,.12);
  border-color: rgba(0,80,158,.35);
}
.badge-submitted{
  background: rgba(111,66,193,.14);
  border-color: rgba(111,66,193,.35);
}
.badge-paid{
  background: rgba(26,127,55,.14);
  border-color: rgba(26,127,55,.35);
}

/* Section head (título + ação à direita) */
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.section-head-tight{ margin-bottom: 8px; }
.section-head-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* KPIs: reforço visual */
.kpis-finance .kpi{
  background: #fff;
}
.kpi-danger{
  background: rgba(255, 77, 77, .08) !important;
  border-color: rgba(255, 77, 77, .25) !important;
}
.kpi-ok{
  background: rgba(26,127,55,.06) !important;
  border-color: rgba(26,127,55,.18) !important;
}
.kpi-sub{
  margin-top: 6px;
  font-size: .9rem;
  font-weight: 700;
  opacity: .8;
}

/* KPIs compactos (contagens) */
.kpis-counts{ margin-top: 10px; }
.kpi-compact{
  min-width: 140px;
  background: rgba(0,0,0,.02);
}

/* Detalhe financeiro colapsável */
.mini-details{
  margin-top: 10px;
}
.mini-details-body{
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}

/* Caixa de saldo em dívida (grita quando deve gritar) */
.payment-balance-box{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
  margin: 10px 0 10px;
}
.payment-balance-box.is-danger{
  background: rgba(255, 77, 77, .10);
  border-color: rgba(255, 77, 77, .28);
}
.payment-balance-box.is-ok{
  background: rgba(26,127,55,.08);
  border-color: rgba(26,127,55,.22);
}
.payment-balance-label{
  font-weight: 800;
  opacity: .85;
}
.payment-balance-value{
  font-weight: 900;
  font-size: 1.25rem;
}

/* Mobile */
@media (max-width: 768px){
  .page-top-actions{ justify-content:flex-start; }
  .payment-balance-box{ flex-direction:column; align-items:flex-start; }
}

.section-head .section-title{
  margin-bottom: 8px;
}

.section-help{
  margin: 0 0 14px;
  color: #556;
  font-size: 0.95rem;
}

.financial-breakdown{
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  background: #fbfcff;
}

.financial-row{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e6e8ef;
}
.financial-row:last-child{
  border-bottom: 0;
}

.financial-label{ color:#334; }
.financial-value{ color:#111; }

.financial-actions{
  margin-top: 10px;
}

.btn-link{
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* Hero do pagamento */
.payment-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
}

.payment-hero.is-due {
  border-color: rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .06);
}

.payment-hero.is-ok{
  border-color: #cfe9d3;
  background: #f7fff8;
}

.payment-hero-left {
  display: grid;
  gap: 8px;
}

.payment-hero-title {
  font-weight: 700;
  font-size: 14px;
  opacity: .9;
}

.payment-hero-label{
  color:#445;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.payment-hero-value{
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.payment-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payment-hero-right {
  text-align: right;
}

.payment-amount-label {
  font-size: 12px;
  opacity: .8;
}

.payment-amount {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.payment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Botão secundário com presença (não “link perdido”) */
.btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.12);
  color: #123a6f;
}
.btn-secondary:hover {
  border-color: rgba(0,0,0,.20);
}

/* === Pagamento: 2 cartões (estado + saldo) === */
.payment-cards{
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 12px;
  margin-top: 10px;
}

.payment-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 14px;
}

.payment-card.is-due{
  border-color: rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .05);
}

.payment-card.is-ok{
  border-color: rgba(26,127,55,.22);
  background: rgba(26,127,55,.05);
}

.payment-card-top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.payment-card-title{
  font-weight: 900;
  color: #003366;
  letter-spacing: .2px;
}

.payment-card-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.payment-card-balance{
  display:flex;
  flex-direction: column;
  justify-content: center;
}

.payment-balance-amount{
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 6px;
}

.payment-balance-hint{
  margin-top: 6px;
  opacity: .8;
  font-size: .92rem;
}

/* Mobile: empilha */
@media (max-width: 900px){
  .payment-cards{
    grid-template-columns: 1fr;
  }
}

.payment-balance-top{
  display:flex;
  flex-direction:column;
  gap: 4px;
  margin-bottom: 8px;
}

.payment-balance-label{
  font-size: .82rem;
  opacity: .78;
  font-weight: 700;
}

.payment-balance-amount{
  font-size: 2.15rem;   /* ↑ mais “KPI” */
  font-weight: 900;
  line-height: 1.05;
  margin-top: 4px;
}

.btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 0.95em;
  opacity: .9;
}

/* disabled “real” (sem inline styles) */
.btn.is-disabled{
  opacity:.55;
  pointer-events:none;
  cursor:not-allowed;
}

/* Bailarinos: select de método mais “plataforma” */
.bailarinos-select{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  font-weight: 700;
}
.bailarinos-select:disabled{
  opacity: .6;
  cursor: not-allowed;
}

/* Garante que hidden funciona mesmo com componentes que usam display: ... !important */
[hidden] { display: none !important; }

.inline-save-hint{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  font-size: .85rem;
  background: #fff6d6;
  border: 1px solid #f1d27a;
  color: #6b5300;
}
/* ===========================
   STATEMENT (Extrato detalhado)
   =========================== */

.statement-page .print-header[hidden] { display: none; }

/* Cupão: input + botão na mesma linha, com boa presença */
.coupon-row{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.coupon-input{
  flex: 1 1 280px;
  min-width: 240px;
}

/* Acessibilidade: label escondida */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
/* Print: esconder chrome do layout base e ajustar margens */
@page { size: A4; margin: 12mm 10mm; }

@media print{
  .sidebar, .header, .footer, .language-selector, .menu-toggle,
  .no-print { display:none !important; }

  body{ background:#fff !important; padding-top: 0 !important; }
  .layout, .main-content{ padding: 0 !important; margin:0 !important; }
  .dashboard-container{ margin:0 !important; padding:0 !important; width:100% !important; }

  .statement-page .print-header{ display:block !important; margin-bottom: 10px; }
  .statement-page .print-header h1{ margin:0 0 4px 0; font-size:18px; }
  .statement-page .print-header .small{ font-size:12px; opacity:0.9; }

  /* detalhes/accordion */
  details{ break-inside: avoid; page-break-inside: avoid; }
  .accordion-summary{ background:#f2f2f2 !important; border-color:#ddd !important; }
  .accordion-hint{ display:none !important; }

  /* tabelas */
  table.styled-table{
    border-collapse: collapse !important;
    width:100% !important;
  }
  table.styled-table th, table.styled-table td{
    border:1px solid #ddd !important;
    padding:6px 8px !important;
  }
}

/* ===========================
   Statement — Resumo financeiro sequencial
   =========================== */

.finance-seq{
  margin-top: 10px;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  background: #fbfcff;
  overflow: hidden;
}

.finance-seq-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px dashed #e6e8ef;
  align-items: baseline;
}

.finance-seq-row:first-child{ border-top: 0; }

.finance-seq-label{
  color: #334;
  font-weight: 800;
  opacity: .92;
}

.finance-seq-value{
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: .2px;
  text-align: right;
  white-space: nowrap;
}

.finance-seq-sub{
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: .9rem;
  opacity: .75;
  font-weight: 700;
}

.finance-seq-row.is-total{
  background: rgba(212,175,55,.14);
}

.finance-seq-row.is-total .finance-seq-value{
  font-size: 1.28rem;
}

.finance-seq-row.is-discount .finance-seq-value{
  color: #6b5300;
}

.finance-seq-row.is-paid .finance-seq-value{
  color: #1a7f37;
}

.finance-seq-row.is-balance.is-due{
  background: rgba(255, 77, 77, .08);
}
.finance-seq-row.is-balance.is-ok{
  background: rgba(26,127,55,.06);
}

.finance-seq-status{
  padding: 10px 14px 14px;
}

.finance-seq-value .sign{
  opacity: .85;
  margin-right: 4px;
}

/* Mobile: empilha valor por baixo (mais legível) */
@media (max-width: 520px){
  .finance-seq-row{
    grid-template-columns: 1fr;
  }
  .finance-seq-value{
    text-align: left;
  }
}

.finance-eq{
  padding: 10px 14px 14px;
  font-weight: 800;
  opacity: .78;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.finance-eq .op{
  opacity: .6;
  font-weight: 900;
}

/* ===========================
   Top status (2 linhas)
   =========================== */

.top-status{ margin-top: 6px; }

.top-status-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.top-status-row-payment{
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #e6e8ef;
}

.top-status-label{
  font-weight: 900;
  opacity: .85;
  margin-right: 4px;
}

.badge-strong{
  background: #fff;
  border: 1px solid #d9deea;
  font-weight: 900;
}

/* CTA compacto e premium (extrato) */
.payment-balance-box{
  align-items: center;            /* em vez de baseline */
}

.payment-balance-left{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-balance-hint{
  font-size: .92rem;
  opacity: .78;
  font-weight: 700;
  margin-top: 4px;
}

/* ===========================
   Statement — Resumo financeiro PREMIUM (2 colunas + leader lines)
   =========================== */

.finance-premium{
  margin-top: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  padding: 14px;
}

.finance-premium-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.finance-premium-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #003366;
  letter-spacing: .2px;
}

/* 2 colunas em ecrãs largos */
.finance-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.finance-col{
  background: #fbfcff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 12px;
}

/* Linha com leader line */
.finance-item{
  display:flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
}

.fi-label{
  font-weight: 900;
  color: #223;
  opacity: .92;
  max-width: 72%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fi-dots{
  flex: 1 1 auto;
  border-bottom: 1px dotted rgba(0,0,0,.30);
  transform: translateY(-2px);
  opacity: .65;
}

.fi-value{
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: .2px;
  white-space: nowrap;
  text-align: right;

  /* “premium detail”: números alinham visualmente muito melhor */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  min-width: 132px; /* evita “saltar” quando valores mudam */
}

.finance-hint{
  margin: -4px 8px 8px;
  font-size: .90rem;
  font-weight: 700;
  opacity: .72;
}

.finance-divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.10), transparent);
  margin: 8px 0;
}

/* Estados/ênfase */
.finance-item.is-total{
  background: rgba(212,175,55,.16);
  border: 1px solid rgba(212,175,55,.22);
}
.finance-item.is-total .fi-value{ font-size: 1.18rem; }

.finance-item.is-discount .fi-value{ color: #6b5300; }
.finance-item.is-paid .fi-value{ color: #1a7f37; }

.finance-item.is-balance.is-due{
  background: rgba(255, 77, 77, .10);
  border: 1px solid rgba(255, 77, 77, .20);
}
.finance-item.is-balance.is-ok{
  background: rgba(26,127,55,.08);
  border: 1px solid rgba(26,127,55,.18);
}

/* Equação */
.finance-eq-premium{
  margin: 6px 8px 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,.12);
  background: rgba(255,255,255,.7);
  font-weight: 800;
  opacity: .80;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.finance-eq-premium .op{
  opacity: .6;
  font-weight: 900;
}

/* CTA alinhado e proporcional */
.finance-cta{
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.finance-cta-title{
  font-weight: 900;
  color: #003366;
}
.finance-cta-sub{
  margin-top: 4px;
  font-weight: 700;
  opacity: .75;
  font-size: .92rem;
}

/* Responsive */
@media (max-width: 900px){
  .finance-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .finance-item{ flex-wrap: wrap; }
  .fi-label{
    max-width: 100%;
    white-space: normal;
    text-overflow: clip;
  }
  .fi-dots{ display:none; }
  .fi-value{ text-align: left; min-width: 0; }
  .finance-cta{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ====== AJUDANTES (competição) – UX premium + responsive ====== */

.form-card {
  max-width: 860px;
  margin: 0 auto;
}

.form-card-header {
  margin-bottom: 14px;
}

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

.section-title {
  margin: 0;
}

.req {
  color: #b42318;
  margin-left: 4px;
  font-weight: 700;
}

.empty-state {
  padding: 14px 6px;
}
/* Alerts sem inline styles (repõe o look antigo “azul info”) */
.alert.info{
  background-color:#e7f3ff;
  border-color:#b7d8ff;
  color:#003366;
}

.alert.warn{
  background:#fff3cd;
  border-color:#ffeeba;
  color:#003366;
}

/* AJUDANTES — microcopy + alert stack */
.rules-list{
  margin: 8px 0 0;
  padding-left: 18px;
}
.rules-list li{
  margin: 6px 0;
}
.rules-label{
  font-weight: 900;
  color: #003366;
  margin-right: 6px;
}

/* Alertas empilhados com espaçamento consistente */
.alerts-stack{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* ===== AJUDANTES — KPIs + Regras em 2 colunas (desktop), empilha em mobile ===== */

.kpi-rules-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 10px;
}

.kpi-col .kpis{
  margin-top: 0; /* não duplicar espaço dentro do grid */
}

.rules-box{
  margin: 0; /* fica alinhado com os KPIs */
}

/* Desktop: KPIs ficam “arrumados” (sem esticar estranho) */
@media (min-width: 901px){
  .kpi-col .kpis{
    flex-wrap: nowrap;
  }
  .kpi-col .kpi{
    min-width: 0;
  }
}

/* Mobile/Tablet: empilha */
@media (max-width: 900px){
  .kpi-rules-grid{
    grid-template-columns: 1fr;
  }
}

/* === LÍDERES: utilitários que estavam inline === */
.center { text-align: center; }

.ok-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#1f9d55;
  color:#fff;
  font-weight:900;
  line-height:1;
}

/* Avisos: texto centrado + “forte” */
.alert-center-strong{
  text-align:center;
  font-weight:800;
}

/* Fieldset mais “premium” (opcional, mas melhora muito) */
.fieldset-soft{
  border: 1px solid #c8c8d0;
  padding: 15px 20px;
  margin-top: 12px;
  border-radius: 10px;
  background-color: #f5f7fb;
  box-shadow: 0 1px 0 #ffffff inset, 0 1px 2px rgba(0,0,0,0.05);
}

/* Lista de resultados do coreógrafo no modal (só para consistência de espaçamento) */
.coreografo-results{
  list-style:none;
  padding:0;
  margin:10px 0 0;
}

/* ================================
   Líderes — UX premium (locked rows + sticky actions)
================================ */

/* Row “já inscrito” — legível, mas claramente indisponível */
.styled-table tr.row-inscrito {
  background: #f7f8fb;
  opacity: 0.70;
}

.styled-table tr.row-inscrito td {
  position: relative;
}

.styled-table tr.row-inscrito input[type="checkbox"] {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.85;
}

/* Badges de estado (usar o teu sistema de .badge já existente) */
.badge-inscrito {
  border-color: rgba(0,0,0,0.08);
}

.badge-disponivel {
  border-color: rgba(0,0,0,0.08);
}

/* Actions bar sticky (apenas mobile) */
.actions-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .actions-bar-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    justify-content: space-between;
  }

  /* garante que o conteúdo não fica escondido atrás do sticky bar */
  .dashboard-container,
  .form-container,
  main {
    padding-bottom: 90px;
  }

  .actions-bar-sticky .btn {
    flex: 1;
  }
}

/* Linha já inscrita: legível, mas claramente "bloqueada" */
.row-inscrito {
  opacity: 0.55;
  filter: saturate(0.75);
}
.row-inscrito td {
  cursor: not-allowed;
}

/* Pequeno realce para linhas disponíveis (opcional, discreto) */
.row-disponivel:hover {
  background: rgba(0, 51, 102, 0.04);
}

/* Checkbox premium (mantém input real para acessibilidade) */
.check-premium {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.check-premium input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-premium .check-ui {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #cfd7e3;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-premium input:checked + .check-ui {
  background: #003366;
  border-color: #003366;
}

.check-premium input:checked + .check-ui::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* Quando desativado: fica óbvio que está bloqueado */
.check-premium input:disabled + .check-ui {
  background: #eef2f7;
  border-color: #d7dfeb;
  box-shadow: none;
}

/* Acessibilidade (se ainda não tiveres) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Barra sticky só em mobile */
.leaders-actions-bar {
  margin-top: 16px;
}

@media (max-width: 768px) {
  .leaders-actions-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e6edf7;
  }

  .leaders-actions-inner {
    max-width: 980px;
    margin: 0 auto;
  }

  .btn-block {
    width: 100%;
  }
}

/* ================================
   LÍDERES — botões mais óbvios e “app-like”
   (colar no fim do styles.css)
================================ */

/* Botão de “Adicionar” com affordance clara (não parece um submit perdido) */
.btn-add{
  position: relative;
  padding-left: 44px; /* espaço para o ícone */
  border-style: dashed;
  border-width: 1px;
}

.btn-add::before{
  content: "+";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(0,80,158,.10);
  border: 1px solid rgba(0,80,158,.18);
  color: #003366;
}

/* CTA principal: mais “decisivo” */
.btn-cta{
  letter-spacing: .2px;
  box-shadow: 0 12px 28px rgba(0,80,158,.22);
}

.btn-cta:disabled{
  box-shadow: none;
}

/* “Voltar” não deve competir com o CTA */
.btn-back{
  font-weight: 900;
}

/* Linha de ações (desktop): CTA encostado à direita, back à esquerda */
.leaders-actions-row{
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* Mobile sticky bar: aspeto de app, dois níveis */
@media (max-width: 768px){
  /* já tens .leaders-actions-bar sticky — aqui só reforçamos UX */
  .leaders-actions-bar{
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -10px 24px rgba(0,0,0,.08);
  }

  .leaders-actions-inner{
    display: grid;
    gap: 10px;
  }

  /* “Voltar” em mobile fica largura total e alinhado */
  .btn-block-mobile{
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
    background: rgba(0,80,158,.06);
    border: 1px solid rgba(0,80,158,.14);
    border-radius: 12px;
  }
}

/* Adicionar Coreografia: dar mais respiro entre o topo e o card do formulário */
.dashboard-container .page-top + .form-card {
  margin-top: 18px; /* ajusta 16–24px se quiseres mais/menos */
}

/* ===== Mobile sticky actions (reutilizável) ===== */
.page-actions-bar {
  display: none;
}

@media (max-width: 820px) {
  .page-actions-bar {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 30;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e6e6e6;
    padding: 10px 12px;
    margin-top: 14px;
  }

  .page-actions-inner {
    display: grid;
    gap: 10px;
  }

  .btn-block {
    width: 100%;
    justify-content: center;
  }
}

/* CTA row (desktop) – mais “óbvio” e alinhado */
.actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.section-head-actions .help-text {
  display: block;
  margin-top: 6px;
  max-width: 520px;
}

/* Espaçamento padrão entre o header (page-top) e o primeiro card */
.dashboard-container .page-top + .card-like {
  margin-top: 18px; /* podes ajustar para 16–24px se quiseres */
}

/* =========================
   Ano de transição — escolher divisão
   ========================= */

.transicao-options{
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

@media (min-width: 992px){
  .transicao-options{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.transicao-choice{
  display: block;
  position: relative;
  cursor: pointer;
}

.transicao-radio{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.transicao-choice-inner{
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 14px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}

.transicao-choice:hover .transicao-choice-inner{
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.transicao-radio:checked + .transicao-choice-inner{
  border-color: #f5c542; /* dourado AllDance */
  box-shadow: 0 10px 22px rgba(245,197,66,0.18);
}

.transicao-choice-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.transicao-choice-title{
  font-weight: 800;
  color: #0b1f3a;
}

.transicao-choice-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 0.92rem;
}

.muted{ opacity: .9; }

/* =========================
   Ano de transição — UI dos blocos de ajuda
   ========================= */

.transicao-help{
  display: grid;
  gap: 14px;
}

.transicao-help-grid{
  display: grid;
  gap: 12px;
}

@media (min-width: 900px){
  .transicao-help-grid{
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  /* o “O que está a acontecer?” ocupa a largura toda para contextualizar */
  .info-box--help{
    grid-column: 1 / -1;
  }
}

.info-box{
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

/* Sem mudar copy: só sinalização visual por tipo */
.info-box--help{
  background: rgba(0,80,158,.06);
  border-color: rgba(0,80,158,.18);
}

.info-box--rule{
  background: rgba(212,175,55,.12);
  border-color: rgba(212,175,55,.28);
}

.info-box--example{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.10);
}

.transicao-instructions{
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbfcff;
  border: 1px solid #e6e8ef;
}

.transicao-instructions .section-title{
  margin: 0 0 6px 0;
  text-align: left; /* fica mais “documento” e menos cartaz */
}

.transicao-instructions .help-text{
  margin: 0;
}


/* =========================
   Ano de transição — tornar escolha óbvia
   ========================= */

/* reforça “estado selecionado” com check visual */
.transicao-choice-inner{
  position: relative;
}

.transicao-radio:checked + .transicao-choice-inner::after{
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(212,175,55,.22);
  border: 1px solid rgba(212,175,55,.45);
  color: #6b5300;
}

/* quando disabled: mesmo óbvio */
.transicao-choice--disabled{
  cursor: not-allowed;
}

.transicao-choice--disabled .transicao-choice-inner{
  opacity: .55;
  filter: grayscale(.25);
  box-shadow: none;
}

.transicao-choice--disabled:hover .transicao-choice-inner{
  transform: none;
  border-color: #e5e7eb;
  box-shadow: none;
}

/* títulos alinhados à esquerda para leitura rápida */
.transicao-choice-title{
  text-align: left;
}

/* dá mais “presença” ao nome da divisão */
.transicao-choice-meta strong{
  font-weight: 900;
  color: #003366;
}

/* Espaço consistente entre o card do topo e o conteúdo */
.mb-16 { margin-bottom: 16px; }

/* Escolher método de pagamento */
.payment-methods{
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

@media (min-width: 900px){
  .payment-methods{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.payment-method-card{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.payment-method-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.payment-method-radio{
  margin-top: 4px;
  flex: 0 0 auto;
}

.payment-method-body{
  flex: 1 1 auto;
  min-width: 0;
}

.payment-method-title-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.payment-method-title{
  font-weight: 800;
}

.payment-method-details{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

/* Estado selecionado (sem depender de :has) */
.payment-method-card input:checked + .payment-method-body{
  /* só dá destaque à “área de texto”, mantendo o layout simples */
}

.payment-method-card:focus-within{
  outline: 2px solid rgba(246,198,91,.55);
  outline-offset: 2px;
  border-color: #f6c65b;
}

/* Escolher método — cartão selecionado (realce forte) */
.payment-method-card:has(.payment-method-radio:checked){
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 14px 30px rgba(212,175,55,.12);
  background: rgba(212,175,55,.06);
}

/* bolinha do rádio ligeiramente maior (affordance) */
.payment-method-radio{
  transform: scale(1.15);
}

.pay-kv{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 12px;
  align-items: baseline;
}
.pay-kv .k{ font-weight: 900; color:#003366; }
.pay-kv .v{ font-variant-numeric: tabular-nums; }
.pay-mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* ===========================
   Payment Detail (uniform UI)
   =========================== */

.payment-detail-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}

@media (max-width: 900px){
  .payment-detail-grid{
    grid-template-columns: 1fr;
  }
}

.payment-panel{
  border:1px solid #e7e9ee;
  border-radius:14px;
  padding:16px;
  background:#fff;
}

.payment-panel-title{
  margin:0 0 10px 0;
  font-size:1.05rem;
  font-weight:800;
  color:#0b2545;
}

.kv-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.kv-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #eef0f4;
  border-radius:12px;
  background:#fbfcfe;
}

.kv-label{
  font-weight:700;
  color:#334;
  font-size:.95rem;
}

.kv-value{
  color:#111;
  text-align:right;
}

.kv-mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.92rem;
}

.payment-instructions{
  border:1px dashed #d7dce5;
  border-radius:12px;
  padding:12px;
  background:#fafbff;
  color:#223;
  line-height:1.35;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:.85rem;
  border:1px solid #e7e9ee;
  background:#f7f8fb;
}

.status-pill.status-pago{
  background:#eaf7ef;
  border-color:#bfe6cb;
}

.status-pill.status-pendente,
.status-pill.status-em_processamento,
.status-pill.status-parcial{
  background:#fff6e6;
  border-color:#ffe2b5;
}

.status-pill.status-cancelado,
.status-pill.status-falhado{
  background:#ffe9e9;
  border-color:#ffbcbc;
}

/* upload */
.upload-card{
  margin-top:14px;
  border:1px solid #eef0f4;
  border-radius:14px;
  padding:14px;
  background:#fff;
}

.upload-title{
  margin:0 0 6px 0;
  font-weight:900;
  color:#0b2545;
}

.upload-help{
  margin:0 0 12px 0;
}

.upload-existing{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid #eef0f4;
  border-radius:12px;
  background:#fbfcfe;
  margin-bottom:12px;
}

.file-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:.85rem;
  border:1px solid #dbe2ef;
  background:#eef4ff;
  color:#0b2545;
}

.file-field input[type="file"]{
  width:100%;
  padding:10px;
  border:1px solid #dfe3ea;
  border-radius:10px;
  background:#fff;
}

/* ===========================
   Upload (file input) — fix Safari/Chrome UI
   =========================== */

.file-field{
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.file-label{
  font-weight: 800;
  color: #003366;
}

.file-field input[type="file"]{
  width: 100%;
  padding: 10px;
  border: 1px dashed #dfe3ea;
  border-radius: 12px;
  background: #fbfcfe;
  font-size: .92rem;
}

/* Botão interno (Chrome/Edge/Firefox recentes) */
.file-field input[type="file"]::file-selector-button{
  margin-right: 10px;
  border: 0;
  background: #00509e;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}
.file-field input[type="file"]::file-selector-button:hover{
  filter: brightness(.95);
}

/* Fallback Safari/WebKit */
.file-field input[type="file"]::-webkit-file-upload-button{
  margin-right: 10px;
  border: 0;
  background: #00509e;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}
.file-field input[type="file"]::-webkit-file-upload-button:hover{
  filter: brightness(.95);
}

/* Se o nome do ficheiro for gigante, não rebenta o layout */
.file-field input[type="file"]{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-existing{
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Pagamento: painel a toda a largura (comprovativos) */
.payment-panel-wide{
  margin-top: 16px;
}

/* Tabela de comprovativos: nomes longos NÃO podem esticar layout */
.upload-table{
  table-layout: fixed; /* força o browser a respeitar larguras */
  width: 100%;
}

.upload-table th:nth-child(1),
.upload-table td:nth-child(1){
  width: 140px;
  white-space: nowrap;
}

.upload-table th:nth-child(3),
.upload-table td:nth-child(3){
  width: 240px;
}

/* Link do ficheiro: pode quebrar em qualquer ponto (caminhos enormes) */
.file-link{
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Detalhe Pagamento: coluna direita com detalhes + instruções */
.pay-kv-stacked {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 14px;
  margin-top: 10px;
}

.pay-kv-stacked .k {
  font-weight: 700;
  white-space: nowrap;
}

.pay-kv-stacked .v {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pay-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Upload: garantir que o input não ultrapassa e não força layout estranho */
.file-field input[type="file"] {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Se a tabela de comprovativos for grande, não pode estourar a coluna */
.upload-table-wrap {
  max-width: 100%;
}
.upload-table .file-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.competition-card-item{
  display:flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.competition-media{
  width: 110px;
  flex: 0 0 110px;
}

.competition-media img{
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  display:block;
}

.competition-media-placeholder{
  width:110px;height:110px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.04);
  font-size: 28px;
}

.competition-title{
  margin: 0 0 6px 0;
}

.competition-rows{
  margin-top: 8px;
  display:grid;
  gap: 6px;
}

.competition-row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
}

.competition-row .label{
  opacity:.75;
  white-space:nowrap;
}

.competition-actions{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.is-disabled{
  pointer-events:none;
  opacity:.55;
}

.checklist{ display:grid; gap:10px; margin-top:10px; }
.checklist-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-radius:12px; border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.checklist-left{ display:flex; align-items:center; gap:10px; }

.alerts{ display:grid; gap:10px; margin-top:10px; }
.alert{
  display:flex; gap:12px; justify-content:space-between; align-items:center;
  padding:12px; border-radius:12px; border:1px solid rgba(0,0,0,.08);
}
.alert-danger{ background: rgba(255,0,0,.04); }
.alert-warning{ background: rgba(255,165,0,.06); }
.alert-info{ background: rgba(0,0,0,.02); }

/* ===========================
   ALERTAS — agrupados + colapsáveis
   =========================== */

.alerts-groups{
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

/* details container */
.alerts-group{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

/* summary row */
.alerts-group-summary{
  cursor: pointer;
  list-style: none;
  user-select: none;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 14px;
  background: rgba(0,0,0,.02);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.alerts-group-summary::-webkit-details-marker{ display:none; }

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

.ags-title{
  font-weight: 900;
  color: #003366;
  letter-spacing: .2px;
}

.ags-right{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ags-hint{
  font-weight: 800;
  opacity: .75;
  font-size: .92rem;
  white-space: nowrap;
}

.ags-chevron{
  font-weight: 900;
  opacity: .6;
  transition: transform .15s ease;
}

details[open] .ags-chevron{
  transform: rotate(180deg);
}

/* dots */
.ags-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
}
.ags-dot-danger{ background: rgba(220, 38, 38, .65); }
.ags-dot-warning{ background: rgba(245, 158, 11, .65); }
.ags-dot-info{ background: rgba(0, 80, 158, .45); }

/* inside padding */
.alerts-inside{
  padding: 12px;
}

/* Refinar o alert interno (sem mudar o teu sistema) */
.alert{
  align-items: flex-start; /* em vez de center: mensagem longa fica melhor */
}

.alert-main{
  display: grid;
  gap: 4px;
  min-width: 0;
}

.alert-title{
  font-weight: 900;
}

.alert-msg{
  margin-top: 0 !important;
}

/* CTA não deve “saltitar” */
.alert-cta{
  margin-left: 12px;
  flex: 0 0 auto;
}

/* Estado aberto mais premium (muito subtil) */
.alerts-group-danger[open]{
  box-shadow: 0 10px 26px rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.18);
}

.alerts-group-warning[open]{
  box-shadow: 0 10px 26px rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.18);
}

.alerts-group-info[open]{
  box-shadow: 0 10px 26px rgba(0,80,158,.08);
  border-color: rgba(0,80,158,.16);
}

/* Mobile: CTA vai para baixo, para não esmagar texto */
@media (max-width: 600px){
  .alert{
    flex-direction: column;
    gap: 10px;
  }
  .alert-cta{
    margin-left: 0;
    width: 100%;
  }
  .alert-cta .btn{
    width: 100%;
    justify-content: center;
  }
}
.alerts-toggle{
  margin-top: 10px;
  margin-left: auto;
  display: inline-flex;
}

/* ===== Alerts: preview “há mais” (premium) ===== */
.alerts-preview{
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
}

.alerts-preview-line{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  opacity: .62;
  font-size: .92rem;
  font-weight: 700;

  /* fade-out à direita */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
}

/* Quando o grupo está expandido, o preview deixa de fazer sentido */
.alerts-preview.is-hidden{
  display: none;
}

/* ===== Alerts group summary: mini “best message” ===== */
.ags-text{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

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

/* ===== Alerts group summary: mini “best message” ===== */
.ags-mini-stack{
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ags-mini{
  font-size: .88rem;
  font-weight: 800;
  opacity: .72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ags-mini-more{
  opacity: .58;
  font-weight: 900;
}

.ags-text{ min-width: 0; flex: 1 1 auto; }
.ags-left{ min-width: 0; }

/* ===========================
   Competition cards v2 (media top + chips)
   =========================== */

.competition-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-flow: row;          /* <- o fix principal */
  grid-auto-rows: auto;
  gap: 16px;
  align-items: stretch;
}

.competition-grid > .comp-card{
  width: 100%;
  min-width: 0;
}

/* novo card vertical */
.comp-card{
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* imagem em cima */
.comp-media{
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,.03);
}

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

/* placeholder */
.comp-media-placeholder{
  width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 44px;
  opacity: .75;
}

/* Chips (default = fora da imagem, em fluxo normal) */
.comp-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 0;
  padding:0;
  position:static; /* 🔥 isto resolve o “chips desapareceram” */
}

.comp-chips .badge{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.12);
  backdrop-filter: blur(6px);
}

/* corpo */
.comp-body{
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
}

.comp-title{
  margin: 0;
  text-align: left;   /* leitura > cartaz */
  font-size: 1.05rem;
  font-weight: 900;
  color: #003366;
}

.comp-kv{
  display: grid;
  gap: 6px;
}

.comp-kv-row{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.comp-kv-row .label{
  opacity: .75;
  white-space: nowrap;
}

.comp-actions{
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.comp-actions-left{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* CTA claro e consistente */
.comp-cta{
  width: 100%;
  justify-content: center;
}

/* microcopy */
.comp-note{
  margin: 0;
  text-align: left;
  opacity: .78;
  font-weight: 700;
}

/* inscrições: KPIs mais “arrumados” dentro do card */
.comp-kpis{
  margin: 6px 0 0;
}

/* Mobile: mantém tudo “app-like” */
@media (max-width: 520px){
  .comp-body{ padding: 12px; }
  .comp-kv-row{ flex-direction: column; align-items: flex-start; }
  .comp-actions-left .btn{ flex: 1 1 auto; }
}

/* Chips: hierarquia e leitura */
.comp-chips .badge { font-weight: 800; }

/* deadline = prioridade (dourado suave) */
.comp-chips .badge-deadline{
  background: rgba(212,175,55,.22);
  border-color: rgba(212,175,55,.55);
}

/* desconto = warning (amarelo) */
.comp-chips .badge-warn{
  background: rgba(255,193,7,.22);
  border-color: rgba(255,193,7,.55);
}

/* status = “pílula” de estado mais óbvia */
.comp-chips .badge-status{
  background: rgba(0,80,158,.14);
  border-color: rgba(0,80,158,.35);
}

/* melhora contraste do overlay em imagens claras */
.comp-chips .badge{
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
}

/* ===== Competitions Available (Premium cards) ===== */

.comp-card .comp-media--bleed{
  height: 170px;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.comp-card .comp-media--bleed img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.75);
  white-space: nowrap;
}

.chip--meta { background: rgba(0,0,0,.03); }

.chip--deadline { background: rgba(15, 82, 186, .08); border-color: rgba(15, 82, 186, .18); }
.chip--discount  { background: rgba(245, 158, 11, .10); border-color: rgba(245, 158, 11, .22); }

/* “modo urgência” (quente) */
.chip--hot {
  font-weight: 700;
  background: rgba(220, 38, 38, .10);
  border-color: rgba(220, 38, 38, .25);
}

/* Links silenciosos para não competir com CTA */
.comp-actions-left--quiet {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.link-quiet {
  font-size: 13px;
  color: rgba(0,0,0,.55);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,0,0,.25);
}

.link-quiet:hover {
  color: rgba(0,0,0,.85);
  border-bottom-color: rgba(0,0,0,.55);
}

/* CTA mantém prioridade */
.comp-actions--available .comp-cta {
  width: 100%;
}

/* FIX: elimina o “vazio” entre imagem e título (altura consistente) */
.comp-card--available .comp-media--bleed{
  height: 170px;           /* mantém o teu tamanho */
  aspect-ratio: auto;      /* desliga o 16/9 aqui */
}

.comp-card--available .comp-media--bleed img{
  height: 100%;
}

.comp-actions-left--quiet .btn-ghost{
  background: rgba(0,80,158,.06);
  border: 1px solid rgba(0,80,158,.14);
  border-radius: 12px;
}
.comp-actions-left--quiet .btn-ghost:hover{
  background: rgba(0,80,158,.10);
  border-color: rgba(0,80,158,.22);
}

/* Base: evita cortes/overflow em elementos a 100% */
*, *::before, *::after { box-sizing: border-box; }

.comp-actions .btn-cta,
.comp-actions .btn-primary {
  width: 100%;
  box-sizing: border-box;
}
/* Chips abaixo da imagem (não overlay) */
.comp-chips--below{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px 0 12px;
}

/* Bloco financeiro (Total / Dívida / Deadline) */
.comp-finance{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  background: rgba(0,0,0,.015);
}
.comp-fin-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 4px 0;
}

/* ===========================
   Chips — variantes em falta (INSCRIÇÕES)
   =========================== */

/* Warning (ex.: saldo em dívida / a aguardar comprovativo) */
.chip--warn{
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .28);
  color: rgba(120, 70, 0, .95);
  font-weight: 800;
}

/* Danger (ex.: inscrições encerraram) */
.chip--danger{
  background: rgba(220, 38, 38, .12);
  border-color: rgba(220, 38, 38, .28);
  color: rgba(140, 20, 20, .95);
  font-weight: 900;
}

/* Gold (ex.: desconto antecipado nas tuas inscrições) */
.chip--gold{
  background: rgba(212, 175, 55, .18);
  border-color: rgba(212, 175, 55, .40);
  color: rgba(90, 65, 0, .95);
  font-weight: 900;
}

/* Se algum chip aparecer em cima de fundos “claros” do card, reforça legibilidade */
.comp-card--inscricao .chip{
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* ===========================
   Chips — Estado da inscrição (INSCRIÇÕES)
   =========================== */

.chip--status{
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* Em andamento (azul institucional leve) */
.chip--draft{
  background: rgba(0, 80, 158, .12);
  border-color: rgba(0, 80, 158, .28);
  color: #003366;
}

/* Submetida (roxo “workflow”) */
.chip--submitted{
  background: rgba(111, 66, 193, .14);
  border-color: rgba(111, 66, 193, .30);
  color: rgba(65, 35, 120, .95);
}

/* Paga (verde “ok”) */
.chip--paid{
  background: rgba(26, 127, 55, .12);
  border-color: rgba(26, 127, 55, .26);
  color: rgba(18, 92, 40, .95);
}

/* ===========================
   FIX MOBILE: chips podem quebrar
   (evita cards rebentarem largura)
   =========================== */

@media (max-width: 1200px){

  /* container já é flex-wrap, mas garantimos */
  .comp-chips,
  .comp-chips-row{
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
  }

  /* o chip em si tem nowrap -> em mobile deixa quebrar */
  .chip{
    white-space: normal !important;   /* 🔥 override do nowrap */
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.15;
  }

  /* se tiveres badges dentro do bloco de chips, aplica a mesma lógica */
  .comp-chips .badge{
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
}

/* ===========================
   PERFIL — Estado do Perfil (PREMIUM)
   =========================== */

.profile-card{
  padding: 16px;
}

.profile-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

.profile-head-left{ min-width: 240px; flex: 1 1 auto; }
.profile-title{
  margin: 0;
  text-align: left;
  color: #003366;
  font-weight: 900;
  letter-spacing: .2px;
}
.profile-subtitle{
  margin: 6px 0 0;
}

.profile-head-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.profile-score{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  line-height: 1.05;
}
.profile-score-main{
  font-weight: 900;
  font-size: 1.15rem;
  color:#0b1b3a;
}
.profile-score-sub{
  font-weight: 800;
  opacity: .70;
  font-size: .85rem;
}

.profile-percent{
  font-weight: 900;
}

/* Progress bar */
.profile-progress{
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
  margin: 10px 0 14px;
}

.profile-progress-bar{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,80,158,.55), rgba(212,175,55,.65));
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

/* Complete state */
.profile-done{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(26,127,55,.22);
  background: rgba(26,127,55,.06);
}

.profile-done-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(26,127,55,.16);
  border: 1px solid rgba(26,127,55,.22);
}

.profile-done-body{ flex: 1 1 auto; min-width: 0; }
.profile-done-title{ font-weight: 900; color:#0b1b3a; }
.profile-done-text{ margin-top: 4px; }

/* Steps */
.profile-steps{
  display:grid;
  gap: 10px;
}

.profile-steps-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 2px;
  margin-bottom: 6px;
}

.profile-steps-title{
  font-weight: 900;
  color: #003366;
  letter-spacing: .2px;
}
.profile-steps-hint{
  font-weight: 800;
  opacity: .72;
  font-size: .92rem;
}

.profile-step{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.profile-step-left{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-step-text{ min-width: 0; }
.profile-step-label{
  font-weight: 900;
  color: #0b1b3a;
  line-height: 1.2;
}

.profile-step-hint{
  margin-top: 4px;
  font-size: .92rem;
  font-weight: 700;
  opacity: .72;
  line-height: 1.25;
}

.profile-step-right{ flex: 0 0 auto; }

.profile-step-dot{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(0,80,158,.10);
  border: 1px solid rgba(0,80,158,.18);
  color: #003366;
}

.profile-step-check{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(26,127,55,.12);
  border: 1px solid rgba(26,127,55,.22);
  color: rgba(18,92,40,.95);
}

/* Required chip */
.profile-step-required{
  display:inline-flex;
  align-items:center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  background: rgba(220,38,38,.10);
  border: 1px solid rgba(220,38,38,.22);
  color: rgba(140,20,20,.95);
  vertical-align: middle;
}

/* todo/done visual distinction */
.profile-step.is-todo{
  border-color: rgba(0,80,158,.14);
  background: rgba(0,80,158,.03);
}
.profile-step.is-done{
  border-color: rgba(26,127,55,.14);
  background: rgba(26,127,55,.03);
}

/* Tip box */
.profile-tip{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(212,175,55,.35);
  background: rgba(212,175,55,.10);
}

.profile-tip-icon{
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(212,175,55,.18);
  border: 1px solid rgba(212,175,55,.30);
}

.profile-tip-text{
  font-weight: 800;
  opacity: .85;
  line-height: 1.25;
}

/* Done list (collapsible) */
.profile-done-list{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.profile-done-summary{
  cursor:pointer;
  list-style:none;
  user-select:none;
  padding: 12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  background: rgba(0,0,0,.02);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.profile-done-summary::-webkit-details-marker{ display:none; }

.profile-done-summary-title{
  font-weight: 900;
  color:#003366;
}

.profile-done-chevron{
  font-weight: 900;
  opacity: .6;
  transition: transform .15s ease;
}
details[open] .profile-done-chevron{ transform: rotate(180deg); }

.profile-done-items{
  padding: 12px;
  display:grid;
  gap: 10px;
}

/* Mobile: CTA não pode esmagar texto */
@media (max-width: 600px){
  .profile-step{
    flex-direction: column;
    gap: 10px;
  }
  .profile-step-right{
    width: 100%;
  }
  .profile-step-right .btn{
    width: 100%;
    justify-content: center;
  }
  .profile-score{
    align-items:flex-start;
  }
}

/* =========================
   PROFILE: compact success (quando completo)
   ========================= */
.profile-success-mini{
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.06);
}

.profile-success-mini-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.profile-success-mini-left{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  min-width: 0;
}

.profile-success-mini-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.04);
  flex: 0 0 auto;
}

.profile-success-mini-title{
  font-weight: 700;
  line-height: 1.2;
}

.profile-success-mini-right{
  flex: 0 0 auto;
}

.profile-success-mini-details{
  margin-top: 10px;
}

.profile-success-mini-summary{
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: inherit;
  opacity: .9;
  list-style: none;
}

.profile-success-mini-summary::-webkit-details-marker{ display:none; }

.profile-success-mini-summary:after{
  content: "▾";
  display: inline-block;
  margin-left: 8px;
  opacity: .7;
  transform: translateY(-1px);
}

.profile-success-mini-details[open] .profile-success-mini-summary:after{
  content: "▴";
}

.profile-steps--compact{
  margin-top: 10px;
}

/* Em compact, reduz um pouco a densidade */
.profile-steps--compact .profile-step{
  padding: 10px 10px;
}
/* ✅ Perfil completo: versão compacta (sem ruído) */
.profile-complete-mini {
  padding: 14px 16px;
}

.profile-complete-mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-complete-mini-body {
  flex: 1;
  min-width: 0;
}

.profile-complete-mini-title {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.profile-complete-mini-text {
  margin-top: 4px;
}

.profile-complete-mini-details {
  margin-top: 10px;
}

.profile-complete-mini-inner {
  margin-top: 10px;
}

/* ===== Perfil completo — sensação de conquista ===== */

.profile-done-icon--gold{
  background: rgba(212, 175, 55, .22);
  border: 1px solid rgba(212, 175, 55, .45);
  color: #6b5300;
  font-size: 18px;
  box-shadow:
    0 6px 18px rgba(212,175,55,.25),
    inset 0 0 0 1px rgba(255,255,255,.4);
}

.profile-done-title{
  font-size: 1.02rem;
  font-weight: 900;
  color: #0b1b3a;
  letter-spacing: .2px;
}

.profile-done-text{
  font-weight: 700;
  opacity: .85;
}

/* ================================
   Centro de Inscrições — Atalhos + Pesquisa
================================ */

.section-jump{
  padding: 12px 14px;
}

.section-jump-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.section-jump-left{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:260px;
  flex: 1 1 420px;
}

.section-jump-right{
  min-width:260px;
  flex: 0 1 420px;
}

.jump-title{
  font-weight:900;
  letter-spacing:.2px;
  opacity:.9;
}

.jump-pills{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.jump-pill{
  text-decoration:none;
}

.jump-search{
  max-width: 520px;
}

.jump-hint{
  opacity:.75;
}

/* Ajustes mobile: empilhar e manter botão “clicável” */
@media (max-width: 768px) {
  .section-jump-right{
    width:100%;
  }
  .jump-search{
    width:100%;
    max-width:none;
  }
  .jump-pills .btn{
    flex: 1 1 auto;
  }
}

/* UX extra: se quiseres scroll mais elegante no documento */
html { scroll-behavior: smooth; }

/* Accept legal terms — mobile polish */
.page-title{
  overflow-wrap: anywhere;   /* resolve palavras longas */
  word-break: break-word;
}

@media (max-width: 420px){
  .page-title{
    font-size: 28px;         /* ajusta se o teu base já definir outro tamanho */
    line-height: 1.15;
  }
}

/* Legal accept: checkboxes more touch-friendly */
.checks .check-premium{
  display: flex;             /* em vez de inline-flex */
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(0, 51, 102, 0.04);
}

.checks .check-premium .check-ui{
  flex: 0 0 18px;
  margin-top: 2px;
}

.checks .check-premium .check-text{
  flex: 1 1 auto;
  line-height: 1.35;
}

/* Legal docs: evitar cortes e scroll horizontal esquisito no mobile */
.doc-content,
.doc-content * {
  max-width: 100%;
}

.doc-content {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Se o doc_html tiver imagens */
.doc-content img {
  max-width: 100%;
  height: auto;
}

/* Public (páginas sem sidebar) */
.public-shell{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.public-container{
  display: grid;
  gap: 16px;
}

.public-hero{
  padding: 18px;
}

.public-cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

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

@media (max-width: 820px){
  .public-links{ grid-template-columns: 1fr; }
  .public-cta .btn{ width: 100%; justify-content: center; }
}

/* ===========================
   LOGIN (página pública) — layout isolado
   =========================== */
body.public-auth{
  padding-top: 0;                 /* nesta página não há header fixo */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background-color: #f4f4f9;      /* mantém o teu tom base */
}

body.public-auth .login-container{
  margin: 0 auto;                /* garante centragem */
}

/* Flags no login: centradas (sem "margin-left:auto" do header) */
body.public-auth .login-container .language-selector{
  justify-content: center;
  margin-top: 14px;
  margin-left: 0;
  margin-right: 0;
}

/* Login subtitle */
.login-subtitle{
  margin: -10px 0 20px;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: .75;
}

/* Login links */
.login-links{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-links a{
  font-weight: 700;
  font-size: 0.9rem;
}

/* Destaque subtil para criar conta */
.login-register{
  margin-top: 6px;
}

.sidebar-divider{
  list-style: none;
  margin: 14px 0 10px;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(212,175,55,0),
    rgba(212,175,55,0.35),
    rgba(212,175,55,0)
  );
}

/* Logout ligeiramente distinto (sem dramatizar) */
.sidebar-logout{
  opacity: .85;
}

.sidebar-logout:hover{
  opacity: 1;
}
/* -------------------------
   Cookie modal (premium)
-------------------------- */

.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(6px);
}

.cookie-modal.hidden{ display: none; }

.cookie-modal-card--premium{
  width: 100%;
  max-width: 720px;
  border-radius: 18px;
  overflow: hidden;

  background: linear-gradient(180deg, rgba(7,24,52,.98), rgba(6,18,38,.98));
  color: #fff;

  box-shadow:
    0 26px 70px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.08) inset;
  position: relative;
}

.cookie-modal-card--premium::before{
  content:"";
  position:absolute;
  left: 16px;
  right: 16px;
  top: 12px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(212,175,55,.0), rgba(212,175,55,.75), rgba(212,175,55,.0));
  opacity: .85;
}

.cookie-modal-head--premium{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px 18px;
}

.cookie-modal-headline{
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-icon--modal{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 18px;
}

.cookie-modal-title{
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: .2px;
}

.cookie-modal-subtitle{
  margin: 4px 0 0 0;
  opacity: .85;
  font-size: .95rem;
}

.cookie-x--premium{
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset;
}
.cookie-x--premium:hover{ background: rgba(255,255,255,.12); }

.cookie-modal-body--premium{
  padding: 8px 18px 12px 18px;
}

.cookie-row--premium{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.10);
}
.cookie-row--premium:first-child{ border-top: 1px solid rgba(255,255,255,.10); }

.cookie-row-text{ max-width: 72%; }
.cookie-row-title{ display:block; font-size: 1rem; }
.cookie-row-desc{
  margin: 6px 0 0 0;
  opacity: .85;
  font-size: .93rem;
  line-height: 1.3;
}

.cookie-row-toggle{
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-chip{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .82rem;
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
  opacity: .95;
}
.cookie-chip--locked{
  background: rgba(212,175,55,.14);
  box-shadow: 0 0 0 1px rgba(212,175,55,.22) inset;
}

/* Toggle switch (estilo premium) */
.cookie-toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cookie-toggle input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.cookie-toggle-ui{
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset;
  position: relative;
  transition: transform .15s ease, background .15s ease;
}
.cookie-toggle-ui::after{
  content:"";
  position:absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: left .15s ease;
}

.cookie-toggle input:checked + .cookie-toggle-ui{
  background: rgba(212,175,55,.35);
  box-shadow: 0 0 0 1px rgba(212,175,55,.32) inset;
}
.cookie-toggle input:checked + .cookie-toggle-ui::after{
  left: 22px;
}

/* Actions */
.cookie-modal-actions--premium{
  padding: 14px 18px 18px 18px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 640px){
  .cookie-row-text{ max-width: 100%; }
  .cookie-row--premium{
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-row-toggle{ width: 100%; justify-content: space-between; }
  .cookie-modal-actions--premium{
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-modal-actions--premium .btn{ width: 100%; }
}
/* ===============================
   COOKIE BANNER – FIX DEFINITIVO
   =============================== */

#cookie-banner.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483647;
  display: block;
}

#cookie-banner.cookie-banner.hidden {
  display: none;
}



/* ===============================
   COOKIE BANNER – PREMIUM UI
   (colar no FIM do CSS)
   =============================== */

.cookie-banner{
  /* o posicionamento já está garantido pelo #cookie-banner, isto é só “segurança” */
  padding: 0;
}

/* Card premium */
#cookie-banner .cookie-card--premium{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 16px;

  background: linear-gradient(180deg, rgba(7,24,52,.98), rgba(6,18,38,.98));
  color: #fff;

  box-shadow:
    0 18px 45px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,255,255,.08) inset;

  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  position: relative;
}

/* risca dourada subtil */
#cookie-banner .cookie-card--premium::before{
  content:"";
  position:absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(212,175,55,.0), rgba(212,175,55,.75), rgba(212,175,55,.0));
  opacity: .85;
}

#cookie-banner .cookie-headline{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}

#cookie-banner .cookie-icon{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
  font-size: 16px;
}

#cookie-banner .cookie-title{
  font-size: 1.02rem;
  letter-spacing: .2px;
}

#cookie-banner .cookie-desc{
  margin: 0;
  opacity: .9;
  font-size: .95rem;
  line-height: 1.35;
  max-width: 70ch;
}

#cookie-banner .cookie-links{
  margin: 6px 0 0 0;
  font-size: .9rem;
  opacity: .9;
}

#cookie-banner .cookie-link{
  color: rgba(255,255,255,.92);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

#cookie-banner .cookie-dot{
  margin: 0 8px;
  opacity: .7;
}

/* actions alinhadas e bonitas */
#cookie-banner .cookie-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* botão ghost */
#cookie-banner .cookie-btn-ghost{
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
}
#cookie-banner .cookie-btn-ghost:hover{
  background: rgba(255,255,255,.14) !important;
}

/* Mobile: stack */
@media (max-width: 720px){
  #cookie-banner .cookie-card--premium{
    grid-template-columns: 1fr;
    padding: 12px;
  }
  #cookie-banner .cookie-actions{
    justify-content: stretch;
  }
  #cookie-banner .cookie-actions .btn{
    width: 100%;
  }
}
.turnstile-wrap{
  display: flex;
  justify-content: center;
}
.turnstile-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
}