/* Gestão de Associações V6.13.1 — correções responsivas
   Mantém o layout de computador e evita texto esmagado em telemóveis/tablets. */

/* Checkboxes com tamanho real. Sem esta regra, o estilo global dos inputs
   fazia algumas caixas ocupar toda a largura do campo. */
label.checkline{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  width:100%;
  min-width:0;
  text-transform:none!important;
  line-height:1.35;
  overflow-wrap:normal!important;
  word-break:normal!important;
  cursor:pointer;
}
label.checkline>input[type="checkbox"]{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
  max-width:20px!important;
  max-height:20px!important;
  flex:0 0 20px!important;
  padding:0!important;
  margin:1px 0 0!important;
  border-radius:4px!important;
  accent-color:var(--brand);
}

/* Não partir rótulos, estados ou ações letra a letra. */
.fiscalTaxRow>label,
.assoc-badge,
.mobileActions .btn{
  overflow-wrap:normal!important;
  word-break:normal!important;
}
.assoc-badge,.mobileActions .btn{white-space:nowrap!important}
.mobileActions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.mobileActions .btn{margin:0}

@media(max-width:1050px){
  /* Fiscalidade: cada regra passa a ser um formulário vertical legível. */
  .fiscalTaxRows{gap:14px!important}
  .fiscalTaxRow{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    padding:14px!important;
  }
  .fiscalTaxRow>label{
    display:block;
    width:100%;
    min-width:0;
    margin:0 0 12px!important;
    grid-column:auto!important;
  }
  .fiscalTaxRow>label.checkline{
    display:flex!important;
    padding:4px 0;
  }
  .fiscalTaxRow>button{
    width:100%;
    margin:2px 0 0!important;
  }
  .fiscalSettingsCard>.formgrid .checkline{padding:5px 0}

  /* As tabelas extensas não voltam a esmagar colunas. Nas listas assinaladas
     abaixo, cada registo transforma-se num cartão sem deslocação horizontal. */
  .scroll:not(.mobileCardTableWrap){
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch;
  }
  .scroll:not(.mobileCardTableWrap)>table{
    width:max-content!important;
    min-width:760px!important;
    max-width:none!important;
    table-layout:auto!important;
  }
  .mobileCardTableWrap{
    width:100%!important;
    overflow:visible!important;
  }
  table.mobileCardTable{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:auto!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
    background:transparent!important;
  }
  .mobileCardTable thead{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }
  .mobileCardTable tbody{
    display:grid!important;
    width:100%;
    gap:12px;
  }
  .mobileCardTable tbody tr{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    min-width:0;
    border:1px solid var(--line);
    border-radius:15px;
    overflow:hidden;
    background:var(--card);
    box-shadow:0 3px 12px rgba(43,23,13,.06);
  }
  .mobileCardTable tbody td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:10px 12px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .mobileCardTable tbody td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:4px;
    color:var(--muted);
    font-size:11px;
    font-weight:850;
    line-height:1.15;
    letter-spacing:.035em;
    text-transform:uppercase;
  }
  .mobileCardTable .mobileCardPrimary{
    order:-2;
    grid-column:1/-1;
    padding:13px 12px!important;
    background:var(--soft2);
  }
  .mobileCardTable .mobileCardPrimary::before{margin-bottom:5px}
  .mobileCardTable .mobileCardPrimary b{font-size:16px;line-height:1.25}
  .memberMobileTable .mobileContactValue{
    grid-column:1/-1;
    overflow-wrap:anywhere!important;
  }
  .memberMobileTable td[data-label="N.º"]{grid-column:1/-1}
  .memberMobileTable .mobileContactValue small{overflow-wrap:anywhere!important}
  .mobileCardTable .mobileTableSelect{
    order:-1;
    grid-column:1/-1;
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .mobileCardTable .mobileTableSelect::before{margin:0}
  .mobileCardTable .mobileTableSelect input[type="checkbox"]{
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    min-height:22px!important;
    margin:0!important;
    accent-color:var(--brand);
  }
  .mobileCardTable .mobileTableActions{
    grid-column:1/-1;
    border-bottom:0!important;
    padding-top:11px!important;
    padding-bottom:12px!important;
  }
  .mobileCardTable .mobileTableActions .mobileActions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .mobileCardTable .mobileTableActions .btn{
    width:100%;
    min-width:0;
    min-height:44px;
  }
  .mobileCardTable .assoc-badge{
    display:inline-flex;
    max-width:100%;
  }
}

@media(max-width:420px){
  .fiscalTaxRow{padding:12px!important}
  .mobileCardTable tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobileCardTable tbody td{padding:9px 10px!important}
  .mobileCardTable .mobileTableActions .btn{font-size:14px!important;padding:9px 8px!important}
}
