/* ==========================================================
   ASFEB — Área Restrita · Nova Identidade Visual
   Carregado APÓS area_restrita.css — sobrescreve sem remover.
   Seletores críticos prefixados com body para garantir
   especificidade superior ao CSS antigo.
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------- */
:root {
  --ar-bg:               #f3f6fb;
  --ar-surface:          #ffffff;
  --ar-surface-2:        #f8fafc;
  --ar-surface-offset:   #eef3f8;
  --ar-divider:          #d8e0e8;
  --ar-border:           #d0dbe6;

  --ar-text:             #10233b;
  --ar-text-muted:       #55677c;
  --ar-text-faint:       #7d8da1;
  --ar-text-inverse:     #f8fbff;

  --ar-primary:          #0a5f98;
  --ar-primary-hover:    #084d7c;
  --ar-primary-active:   #073a5e;
  --ar-primary-hl:       #d7e8f4;
  --ar-secondary:        #bc1622;
  --ar-secondary-soft:   #f7d9dc;

  --ar-success:          #2d7a46;
  --ar-success-soft:     #dceedd;
  --ar-warning:          #bf6b16;
  --ar-warning-soft:     #f8e6d2;
  --ar-info:             #3a6fb0;

  --ar-radius-sm:        0.5rem;
  --ar-radius-md:        0.875rem;
  --ar-radius-lg:        1.25rem;
  --ar-radius-full:      999px;

  --ar-shadow-sm:        0 4px 16px rgba(16,35,59,0.07);
  --ar-shadow-md:        0 12px 36px rgba(16,35,59,0.11);

  --ar-transition:       180ms cubic-bezier(0.16,1,0.3,1);

  --ar-font-display:     'Cabinet Grotesk', 'Segoe UI', Arial, sans-serif;
  --ar-font-body:        'Satoshi', 'Segoe UI', Arial, sans-serif;

  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2rem);

  --ar-content-max: 1080px;
  --ar-content-pad: clamp(1rem, 3vw, 2.5rem);
}

/* ----------------------------------------------------------
   2. BASE
   ---------------------------------------------------------- */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  min-width: 0;
  background: var(--ar-bg);
  font-family: var(--ar-font-body);
  font-size: var(--text-base);
  color: var(--ar-text);
}

/* reset do min-width fixo do basic.css */
body.noscroll { overflow: hidden; }

/* ----------------------------------------------------------
   3. BARRA SUPERIOR — body #bar
   Prefixo body garante especificidade (0,1,0,1) > (0,1,0,0)
   ---------------------------------------------------------- */
body #bar {
  float: none;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 44px;
  /* hex explícito — sem variável CSS para garantir parse imediato */
  background: linear-gradient(90deg, #073a5e 0%, #0a5f98 100%);
  background-color: #073a5e;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(16,35,59,0.18);
}

body #bar .content {
  width: auto;
  max-width: var(--ar-content-max);
  margin: 0 auto;
  padding: 0 var(--ar-content-pad);
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 44px;
  flex-wrap: wrap;
}

body #bar .usuario_restrita {
  float: none;
  position: static;
  margin-right: auto;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  margin-top: 0;
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0;
}

body #bar .telefone {
  position: static;
  width: auto;
  height: auto;
  background: none;
  left: auto;
  margin-left: 0;
  color: rgba(255,255,255,0.78);
  font-size: var(--text-xs);
  padding: 0;
  letter-spacing: 0;
  margin-right: 0.75rem;
}

body #bar a.bt_sair,
body #bar a.bt_alterarsenha,
body #bar a.bt_faleconosco {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem !important;
  margin: 0 !important;
  height: auto !important;
  font-family: var(--ar-font-body);
  font-size: 0.75rem !important;
  font-weight: 600;
  /* cor branca explícita — garante visibilidade no fundo azul */
  color: rgba(255,255,255,0.92) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22) !important;
  border-top: 1px solid rgba(255,255,255,0.22) !important;
  background: rgba(255,255,255,0.10) !important;
  background-color: rgba(255,255,255,0.10) !important;
  box-shadow: none !important;
  text-decoration: none !important;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease;
}

body #bar a.bt_sair:hover,
body #bar a.bt_alterarsenha:hover,
body #bar a.bt_faleconosco:hover {
  background: rgba(255,255,255,0.22) !important;
  background-color: rgba(255,255,255,0.22) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.36) !important;
}

body #bar a.bt_sair {
  border-left: 1px solid rgba(255,255,255,0.16);
  margin-left: 0;
  margin-top: 0;
  padding: 0.45rem 0.85rem;
}

body #bar a.bt_alterarsenha {
  border-top: 1px solid rgba(255,255,255,0.16);
  padding: 0.45rem 0.85rem;
}

body #bar a.bt_faleconosco {
  border-right: 1px solid rgba(255,255,255,0.16);
  margin-right: 0;
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  background: rgba(188,22,34,0.22);
  border-color: rgba(188,22,34,0.35);
  background-image: none;
}

body #bar a.bt_faleconosco:hover {
  background: rgba(188,22,34,0.36);
  background-image: none;
}

/* caixa alterar senha */
body .box_alterar_senha {
  display: none;
  position: absolute;
  top: -280px;
  right: 35px;
  z-index: 100;
  width: 270px;
  height: auto;
  padding: 1.25rem;
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-bottom-color: var(--ar-border);
  border-radius: var(--ar-radius-md);
  box-shadow: var(--ar-shadow-md);
}

body .box_alterar_senha form label span {
  float: none;
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  height: auto;
  width: auto;
  padding: 0 0 0.3rem 0;
}

body .box_alterar_senha label input {
  float: none;
  height: 40px;
  border: 1.5px solid var(--ar-border);
  border-top-color: var(--ar-border);
  border-left-color: var(--ar-border);
  border-radius: var(--ar-radius-sm);
  transition: border-color var(--ar-transition), box-shadow var(--ar-transition);
}

body .box_alterar_senha label input:focus {
  border-color: var(--ar-primary);
  box-shadow: 0 0 0 3px var(--ar-primary-hl);
  outline: none;
}

body .box_alterar_senha .bt_alterar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: right;
  height: 40px;
  padding: 0 1.25rem;
  margin: 0;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  background: var(--ar-primary);
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
  transition: background var(--ar-transition);
}

body .box_alterar_senha .bt_alterar:hover {
  background: var(--ar-primary-hover);
  background-color: var(--ar-primary-hover);
}

body .box_alterar_senha .bt_alterar:disabled {
  background: var(--ar-surface-offset);
  color: var(--ar-text-faint);
}

body .box_alterar_senha .bt_cancelar {
  float: left;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 1rem;
  margin: 0;
  height: 40px;
  background: transparent;
  background-color: transparent;
  border: 1.5px solid var(--ar-border);
  border-radius: var(--ar-radius-full);
  color: var(--ar-text-muted);
  font-family: var(--ar-font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--ar-transition);
  box-shadow: none;
}

body .box_alterar_senha .bt_cancelar:hover {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
}

/* ----------------------------------------------------------
   4. CABEÇALHO — body #topo
   Prefixo body garante especificidade (0,1,0,1) > (0,1,0,0)
   Fixes: min-height, logo max-height:52px, flex correto
   ---------------------------------------------------------- */
body #topo {
  float: none;
  width: 100%;
  min-height: 80px;
  /* hex explícito — garante white mesmo sem variáveis CSS */
  background: #ffffff;
  background-color: #ffffff;
  border-bottom: 1px solid #d0dbe6;
  box-shadow: 0 4px 16px rgba(16,35,59,0.07);
}

body #topo .content {
  width: auto;
  max-width: var(--ar-content-max);
  margin: 0 auto;
  padding: 0.75rem var(--ar-content-pad);
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
  height: auto;
}

/* basic.css linha 401: #topo h2 { background: url(logo_asfeb.png); width:342px; height:120px }
   Neutralizamos o background do h2 e do a para eliminar o logo duplicado.
   O logo real vive na <img> dentro do <a> — não no background do h2. */
body #topo h1,
body #topo h2 {
  margin: 0;
  padding: 0;
  float: none !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  background-image: none !important;
  line-height: 1;
}

body #topo h2 a {
  display: block;
  background: none !important;
  background-image: none !important;
  text-indent: 0 !important;
}

/* neutraliza qualquer pseudo-elemento que o tema possa injetar */
body #topo h2 a::before,
body #topo h2 a::after {
  display: none !important;
  content: none !important;
}

body #topo h2 a span {
  /* texto acessível escondido visualmente */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

body #topo h2 a img {
  display: block;
  max-height: 52px;
  width: auto;
  height: auto;
}

body #topo #usuario {
  float: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  margin: 0;
  padding: 0.5rem 1rem;
  width: auto;
  height: auto;
  /* substitui o sprite bg_usuario.png */
  background: var(--ar-primary-hl);
  background-image: none;
  border-radius: var(--ar-radius-md);
  border: 1px solid var(--ar-border);
}

body #topo #usuario span {
  float: none;
  display: block;
  color: var(--ar-primary);
  font-weight: 700;
}

body #topo #usuario span.id {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ar-text-muted);
  font-weight: 600;
}

body #topo #usuario span.nome {
  font-family: var(--ar-font-display);
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.4rem);
  color: var(--ar-primary);
  line-height: 1.15;
}

/* ----------------------------------------------------------
   5. CONTEÚDO PRINCIPAL — #miolo
   ---------------------------------------------------------- */
#miolo {
  float: none;
  width: 100%;
  margin: 0;
  padding: 2rem 0 3rem;
  background: var(--ar-bg);
}

#miolo .content,
#miolo > .content {
  width: auto;
  max-width: var(--ar-content-max);
  margin: 0 auto;
  padding: 0 var(--ar-content-pad);
}

/* ----------------------------------------------------------
   6. ACCORDION — .topico / .topico_null / .conteudo_topico
   ---------------------------------------------------------- */
#miolo .topico,
#miolo .topico_null {
  float: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 60px;
  padding: 1rem 1.25rem;
  margin: 0 0 0.5rem 0;
  background: var(--ar-surface);
  background-image: none;
  border: 1px solid var(--ar-border);
  border-bottom-color: var(--ar-border);
  border-radius: var(--ar-radius-md);
  box-shadow: var(--ar-shadow-sm);
  color: var(--ar-text);
  font-family: var(--ar-font-display);
  font-size: clamp(0.95rem, 1vw + 0.6rem, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
  transition: background var(--ar-transition), box-shadow var(--ar-transition), border-color var(--ar-transition);
  cursor: pointer;
  box-sizing: border-box;
}

#miolo .topico:hover {
  background: var(--ar-primary-hl);
  background-image: none;
  border-color: var(--ar-primary);
  box-shadow: var(--ar-shadow-md);
  color: var(--ar-primary);
}

#miolo .topico.opened {
  border-radius: var(--ar-radius-md) var(--ar-radius-md) 0 0;
  border-bottom-color: transparent;
  background: var(--ar-primary-hl);
  background-image: none;
  color: var(--ar-primary);
  margin-bottom: 0;
}

/* seta em CSS puro — substitui o sprite arrow.png */
#miolo .topico .arrow {
  position: static;
  flex-shrink: 0;
  display: inline-block;
  width: 10px;
  height: 10px;
  padding: 0;
  margin-left: 1rem;
  border: solid var(--ar-primary);
  border-width: 0 2.5px 2.5px 0;
  border-left: none;
  background: none;
  background-image: none;
  transform: rotate(45deg);
  transition: transform var(--ar-transition);
}

#miolo .topico.opened .arrow {
  transform: rotate(-135deg);
  background-position: 0 0; /* neutraliza background-position do CSS antigo */
  background-image: none;
}

#miolo .topico:hover .arrow {
  border-color: var(--ar-primary);
  background-image: none;
}

#miolo .topico.opened:hover .arrow {
  background-image: none;
}

/* botões dentro do topico_null */
#miolo .topico_null a.bt_download,
#miolo .topico_null a.bt_visualizar {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  height: auto;
  width: auto;
  border-radius: var(--ar-radius-full);
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  border: 1.5px solid var(--ar-primary);
  background: transparent;
  background-image: none;
  color: var(--ar-primary);
  box-shadow: none;
  transition: background var(--ar-transition), color var(--ar-transition);
  margin-left: auto;
  top: auto;
  right: auto;
}

#miolo .topico_null a.bt_download {
  background: var(--ar-secondary);
  background-image: none;
  border-color: var(--ar-secondary);
  color: #fff;
  margin-left: 0.5rem;
}

#miolo .topico_null a.bt_download:hover {
  background: #9b1119;
  background-image: none;
  border-color: #9b1119;
  color: #fff;
}

#miolo .topico_null a.bt_visualizar:hover {
  background: var(--ar-primary-hl);
  background-image: none;
}

/* painel de conteúdo expandido */
#miolo .conteudo_topico {
  float: none;
  width: 100%;
  max-width: 100%;
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-top: none;
  border-radius: 0 0 var(--ar-radius-md) var(--ar-radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--ar-shadow-sm);
  box-sizing: border-box;
}

/* ----------------------------------------------------------
   7. FORMULÁRIOS
   ---------------------------------------------------------- */
form label {
  float: none;
  display: inline-flex;
  flex-direction: column;
  margin: 0 1rem 0.75rem 0;
  vertical-align: top;
}

form label.last { margin-right: 0; }

form label span {
  float: none;
  display: block;
  height: auto;
  width: auto;
  padding: 0 0 0.3rem 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

form input[type='text'],
form input[type='tel'],
form input[type='email'],
form input[type='date'],
form input[type='password'],
form select,
form textarea {
  float: none;
  margin: 0;
  padding: 0.65rem 0.9rem;
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--ar-border);
  border-top-color: var(--ar-border);
  border-left-color: var(--ar-border);
  border-bottom-color: var(--ar-border);
  border-right-color: var(--ar-border);
  border-radius: var(--ar-radius-sm);
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  color: var(--ar-text);
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  box-sizing: border-box;
  transition: border-color var(--ar-transition), box-shadow var(--ar-transition);
}

form input[type='text']:focus,
form input[type='tel']:focus,
form input[type='email']:focus,
form input[type='date']:focus,
form input[type='password']:focus,
form select:focus,
form textarea:focus {
  border-color: var(--ar-primary);
  box-shadow: 0 0 0 3px var(--ar-primary-hl);
  outline: none;
}

form input.disabled,
form input[readonly] {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  color: var(--ar-text-faint);
  cursor: default;
}

form select {
  margin: 0;
  height: 42px;
  appearance: auto;
  -webkit-appearance: auto;
}

/* campos dentro da box_alterar_senha */
body .box_alterar_senha label input[type='text'],
body .box_alterar_senha label input[type='password'] {
  float: none;
  height: 40px;
  border: 1.5px solid var(--ar-border);
  border-top-color: var(--ar-border);
  border-left-color: var(--ar-border);
  border-radius: var(--ar-radius-sm);
}

body .box_alterar_senha label input:focus {
  border-color: var(--ar-primary);
  box-shadow: 0 0 0 3px var(--ar-primary-hl);
  outline: none;
}

/* labels com largura fixa — tornadas responsivas com min() */
label.label550 { width: min(550px, 100%); }
label.label540 { width: min(540px, 100%); }
label.label450 { width: min(450px, 100%); }
label.label400 { width: min(400px, 100%); }
label.label390 { width: min(390px, 100%); }
label.label300 { width: min(300px, 100%); }
label.label290 { width: min(290px, 100%); }
label.label220 { width: min(220px, 100%); }
label.label200 { width: min(200px, 100%); }
label.label190 { width: min(190px, 100%); }
label.label130 { width: min(130px, 100%); }

/* ----------------------------------------------------------
   8. BOTÕES
   ---------------------------------------------------------- */

/* primário */
form .bt_enviar,
form .bt_atualizar,
.bt_imprimir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0.5rem 0 0.5rem 0.75rem;
  padding: 0 1.5rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--ar-primary);
  background-color: var(--ar-primary);
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: 0 4px 14px rgba(10,95,152,0.28);
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition), transform var(--ar-transition);
}

form .bt_enviar:hover,
form .bt_atualizar:hover,
.bt_imprimir:hover {
  background: var(--ar-primary-hover);
  background-color: var(--ar-primary-hover);
  color: var(--ar-text-inverse);
  transform: translateY(-1px);
}

.bt_imprimir { margin: 0 1.25rem 0 0; }

/* cancelar */
form .bt_cancelar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0.5rem 0.75rem 0.5rem 0;
  padding: 0 1.25rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ar-text-muted);
  text-transform: uppercase;
  background: transparent;
  background-color: transparent;
  border: 1.5px solid var(--ar-border);
  border-radius: var(--ar-radius-full);
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition), border-color var(--ar-transition);
}

form .bt_cancelar:hover {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  border-color: var(--ar-text-faint);
}

/* download */
form .bt_download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0;
  padding: 0 1.25rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  background: var(--ar-secondary);
  background-color: var(--ar-secondary);
  background-image: none;
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: 0 4px 14px rgba(188,22,34,0.22);
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition), transform var(--ar-transition);
}

form .bt_download:hover {
  background: #9b1119;
  background-color: #9b1119;
  background-image: none;
  color: #fff;
  transform: translateY(-1px);
}

form .bt_download.dir { float: right; }

/* visualizar — outline */
form .bt_visualizar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0;
  padding: 0 1.25rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-primary);
  background: transparent;
  background-color: transparent;
  background-image: none;
  border: 1.5px solid var(--ar-primary);
  border-radius: var(--ar-radius-full);
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition), color var(--ar-transition);
}

form .bt_visualizar:hover {
  background: var(--ar-primary-hl);
  background-color: var(--ar-primary-hl);
  background-image: none;
  color: var(--ar-primary-hover);
}

form .bt_visualizar.dir { float: right; }

/* espaçamento automático entre botões sequenciais */
form .bt_visualizar ~ .bt_download,
form .bt_download ~ .bt_download,
form .bt_visualizar ~ input.bt_download,
form input.bt_download ~ input.bt_download {
  margin-left: 0.625rem;
}

/* upload */
form .bt_upload {
  display: inline-flex;
  align-items: center;
  float: none;
  margin: 0.5rem 0 0 0;
  padding: 0 1.25rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-primary);
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  background-image: none;
  border: 1.5px solid var(--ar-primary);
  border-radius: var(--ar-radius-full);
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition);
}

form .bt_upload:hover {
  background: var(--ar-primary-hl);
  background-color: var(--ar-primary-hl);
  background-image: none;
}

form .bt_upload:disabled {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  background-image: none;
  border-color: var(--ar-border);
  color: var(--ar-text-faint);
  cursor: not-allowed;
}

form .bt_upload:disabled:hover {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  background-image: none;
}

/* pesquisar / solicitar */
#miolo .bt_pesquisar,
#miolo .bt_solicitar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: none;
  margin: 0.5rem 0 0 0;
  padding: 0 1.25rem;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  text-transform: uppercase;
  background: var(--ar-primary);
  background-color: var(--ar-primary);
  background-image: none;
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: 0 4px 14px rgba(10,95,152,0.22);
  cursor: pointer;
  line-height: 1;
  transition: background var(--ar-transition);
}

#miolo .bt_pesquisar:hover,
#miolo .bt_solicitar:hover {
  background: var(--ar-primary-hover);
  background-color: var(--ar-primary-hover);
  background-image: none;
}

#miolo .bt_pesquisar:disabled {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  background-image: none;
  color: var(--ar-text-faint);
  cursor: not-allowed;
}

/* adicionar convidado */
#miolo a.bt_adicionarconvidado {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: right;
  margin: 0.75rem 0 0 0;
  padding: 0 1.5rem;
  width: auto;
  height: 42px;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  background: var(--ar-primary);
  background-color: var(--ar-primary);
  background-image: none;
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: 0 4px 14px rgba(10,95,152,0.22);
  line-height: 1;
  transition: background var(--ar-transition);
}

#miolo a.bt_adicionarconvidado:hover {
  background: var(--ar-primary-hover);
  background-color: var(--ar-primary-hover);
  background-image: none;
}

/* remover convidado */
#miolo .conteudo_topico .row_convidado a.bt_remover {
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  background-image: none;
  border: 1.5px solid var(--ar-border);
  border-radius: var(--ar-radius-sm);
  color: var(--ar-secondary);
  font-size: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ar-transition), border-color var(--ar-transition);
}

#miolo .conteudo_topico .row_convidado a.bt_remover::before {
  content: '✕';
  font-size: 14px;
  display: block;
  text-align: center;
}

#miolo .conteudo_topico .row_convidado a:hover.bt_remover {
  background: var(--ar-secondary-soft);
  background-color: var(--ar-secondary-soft);
  background-image: none;
  border-color: var(--ar-secondary);
}

/* ----------------------------------------------------------
   9. CAIXA DE LOGIN — body #miolo .box_arearestrita
   Especificidade (0,1,1,1) > antiga (0,1,1,0)
   Fix: position static, layout em bloco, bt_entrar sem float
   ---------------------------------------------------------- */
body #miolo .box_arearestrita {
  position: static;
  width: min(420px, 92vw);
  max-width: 92vw;
  height: auto;
  min-height: 0;
  left: auto;
  margin: 2.5rem auto;
  margin-left: auto;
  padding: 2rem 2rem 1.5rem;
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-bottom-color: var(--ar-border);
  border-radius: var(--ar-radius-lg);
  box-shadow: var(--ar-shadow-md);
  z-index: 1;
}

body #miolo .box_arearestrita label {
  float: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 0.75rem 0;
}

body #miolo .box_arearestrita label span {
  float: none;
  display: block;
  width: auto;
  height: auto;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0 0 0.3rem 0;
}

body #miolo .box_arearestrita label input[type='text'],
body #miolo .box_arearestrita label input[type='password'] {
  float: none;
  height: 42px;
  border: 1.5px solid var(--ar-border);
  border-top-color: var(--ar-border);
  border-left-color: var(--ar-border);
  border-radius: var(--ar-radius-sm);
}

body #miolo .box_arearestrita label input:focus {
  border-color: var(--ar-primary);
  box-shadow: 0 0 0 3px var(--ar-primary-hl);
  outline: none;
}

body #miolo .box_arearestrita a.bt_esqueceusenha {
  float: none;
  display: block;
  clear: both;
  margin: 0 0 1.25rem 0;
  color: var(--ar-primary);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body #miolo .box_arearestrita a.bt_esqueceusenha h6 {
  display: inline;
  float: none;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

body #miolo .box_arearestrita a:hover.bt_esqueceusenha {
  text-decoration: underline;
}

/* bt_entrar — display flex, SEM float para não sobrepor mensagem de erro */
body #miolo .box_arearestrita .bt_entrar,
.passaporte .bt_entrar {
  display: block;
  float: none;
  width: 100%;
  height: 44px;
  padding: 0 1.5rem;
  margin: 0.25rem 0 0.75rem 0;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text-inverse);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ar-primary);
  background-color: var(--ar-primary);
  border: none;
  border-radius: var(--ar-radius-full);
  box-shadow: 0 4px 14px rgba(10,95,152,0.28);
  cursor: pointer;
  line-height: 44px;
  transition: background var(--ar-transition);
}

body #miolo .box_arearestrita .bt_entrar:hover,
.passaporte .bt_entrar:hover {
  background: var(--ar-primary-hover);
  background-color: var(--ar-primary-hover);
  color: var(--ar-text-inverse);
}

body #miolo .box_arearestrita .bt_entrar:disabled,
.passaporte .bt_entrar:disabled {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  color: var(--ar-text-faint);
  cursor: not-allowed;
}

/* cancelar e voltar login — display block, sem float */
body #miolo .box_arearestrita .bt_cancelar,
body #miolo .box_arearestrita .bt_voltarlogin {
  display: inline-flex;
  float: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  background-color: transparent;
  border: 1.5px solid var(--ar-border);
  color: var(--ar-text-muted);
  padding: 0 1.1rem;
  height: 40px;
  min-width: auto;
  box-shadow: none;
  border-radius: var(--ar-radius-full);
  font-family: var(--ar-font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  cursor: pointer;
  margin: 0 0 0.5rem 0;
  transition: background var(--ar-transition);
}

body #miolo .box_arearestrita .bt_cancelar:hover,
body #miolo .box_arearestrita a:hover.bt_voltarlogin {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
}

/* ----------------------------------------------------------
   10. MENSAGENS DE ERRO E FEEDBACK
   ---------------------------------------------------------- */
#mensagem_erro,
#feedback_erro {
  display: none;
  float: none;
  clear: both;
  padding: 0.65rem 1rem;
  background: var(--ar-secondary-soft);
  background-color: var(--ar-secondary-soft);
  background-image: none;
  border-radius: var(--ar-radius-sm);
  border-left: 3px solid var(--ar-secondary);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ar-secondary);
  margin-top: 0.5rem;
}

.feedback_ok {
  display: none;
  float: none;
  clear: both;
  padding: 0.65rem 1rem;
  background: var(--ar-success-soft);
  background-color: var(--ar-success-soft);
  background-image: none;
  border-radius: var(--ar-radius-sm);
  border-left: 3px solid var(--ar-success);
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ar-success);
  margin-top: 0.5rem;
}

.mensagem_erro_top_100 {
  position: static;
  float: none;
  clear: both;
  display: block;
  top: auto;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--ar-secondary-soft);
  background-color: var(--ar-secondary-soft);
  background-image: none;
  border-radius: var(--ar-radius-sm);
  border-left: 3px solid var(--ar-secondary);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ar-secondary);
}

.mensagem_erro_top_80 {
  position: static;
  float: none;
  clear: both;
  display: block;
  top: auto;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--ar-secondary-soft);
  background-color: var(--ar-secondary-soft);
  background-image: none;
  border-radius: var(--ar-radius-sm);
  border-left: 3px solid var(--ar-secondary);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ar-secondary);
}

.feedback_ok_top_80 {
  position: static;
  float: none;
  clear: both;
  display: block;
  top: auto;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--ar-success-soft);
  background-color: var(--ar-success-soft);
  background-image: none;
  border-radius: var(--ar-radius-sm);
  border-left: 3px solid var(--ar-success);
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ar-success);
}

.naopreenchido {
  border-color: var(--ar-secondary) !important;
  box-shadow: 0 0 0 3px var(--ar-secondary-soft) !important;
}

/* ----------------------------------------------------------
   11. TABELAS
   ---------------------------------------------------------- */
table {
  float: none;
  width: 100%;
  margin: 0.75rem 0;
  border: none;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--ar-radius-md);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(16,35,59,0.06);
}

table .titulos {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  color: var(--ar-text-muted);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  height: 38px;
  line-height: 38px;
  text-indent: 12px;
}

table th {
  background: var(--ar-surface-offset);
  background-color: var(--ar-surface-offset);
  color: var(--ar-text-muted);
  font-family: var(--ar-font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.7rem 0.75rem;
  text-indent: 0;
  border-bottom: 1px solid var(--ar-border);
}

table td {
  text-indent: 0;
  padding: 0.75rem 0.75rem;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  color: var(--ar-text-muted);
  height: auto;
  border-bottom: 1px solid var(--ar-divider);
}

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

table tr:hover { background-color: var(--ar-primary-hl) !important; }

table tr.titulos:hover { background-color: var(--ar-surface-offset) !important; }

table .linha02 { background-color: var(--ar-surface-2); }

.tdpointer { cursor: pointer; }

/* wrapper scroll horizontal */
.ar-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ar-radius-md);
}

/* ----------------------------------------------------------
   12. ABAS
   ---------------------------------------------------------- */
.abas {
  float: none;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: auto;
  margin: 1.5rem 0 0 0;
  border-bottom: 2px solid var(--ar-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.abas::-webkit-scrollbar { display: none; }

.abas ul {
  float: none;
  display: flex;
  gap: 0.25rem;
  width: auto;
  height: auto;
  text-align: left;
  list-style: none;
  margin: 0;
  padding: 0;
}

.abas ul li {
  display: inline-block;
  zoom: 1;
  margin: 0;
  width: auto;
  height: auto;
  border-top: none;
  border-bottom: 3px solid transparent;
  transition: border-color var(--ar-transition);
}

.abas ul li a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  width: auto;
  height: auto;
  font-family: var(--ar-font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  font-style: normal;
  color: var(--ar-text-muted);
  background: transparent;
  background-color: transparent;
  border: none;
  vertical-align: baseline;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: var(--ar-radius-sm) var(--ar-radius-sm) 0 0;
  transition: color var(--ar-transition), background var(--ar-transition);
}

.abas ul li a:hover {
  color: var(--ar-primary);
  background: var(--ar-primary-hl);
  background-color: var(--ar-primary-hl);
}

.abas ul li.sel {
  border-top: none;
  border-bottom: 3px solid var(--ar-primary);
  background: transparent;
  color: var(--ar-primary);
}

.abas ul li.sel a {
  color: var(--ar-primary);
  background: var(--ar-primary-hl);
  background-color: var(--ar-primary-hl);
}

.miolo_abas {
  float: none;
  width: 100%;
  background: transparent;
  background-color: transparent;
}

.cont_abas {
  display: none;
  float: none;
  width: 100%;
  max-width: 100%;
  padding: 1.5rem 0;
}

/* ----------------------------------------------------------
   13. DADOS PRÉ-PREENCHIDOS — .dadospre
   ---------------------------------------------------------- */
.dadospre {
  float: none;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 1rem 0;
}

.dadospre div {
  float: none;
  margin: 0 0 0.75rem 0;
  width: auto;
  min-width: 200px;
  flex: 1 1 200px;
  font-size: var(--text-sm);
  color: var(--ar-text);
}

.dadospre .pre600 { flex: 1 1 min(600px, 100%); }
.dadospre .pre300 { flex: 1 1 min(300px, 100%); }
.dadospre .pre200 { flex: 1 1 min(200px, 100%); }
.dadospre .pre160 { flex: 1 1 min(160px, 100%); }
.dadospre .full   { flex: 1 1 100%; }
.dadospre .email  { float: none; }

.dadospre span {
  float: none;
  display: block;
  height: auto;
  width: auto;
  padding: 0 0 0.2rem 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ----------------------------------------------------------
   14. BANNER — responsivo
   ---------------------------------------------------------- */
.banner {
  float: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0.75rem 0;
  padding: 0;
  line-height: 1;
  background-color: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-bottom-color: var(--ar-border);
  border-radius: var(--ar-radius-md);
  box-shadow: var(--ar-shadow-sm);
  overflow: hidden;
  cursor: pointer;
}

.banner img,
.ar-banner-img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.ar-banner-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: var(--ar-radius-md);
}

/* ----------------------------------------------------------
   15. TEXTO E SEPARADORES
   ---------------------------------------------------------- */
.texto {
  float: none;
  width: 100%;
  margin: 0 0 1.25rem 0;
  font-family: var(--ar-font-body);
  font-size: var(--text-sm);
  color: var(--ar-text-muted);
  line-height: 1.65;
}

hr {
  float: none;
  width: 100%;
  height: 1px;
  margin: 1rem 0;
  border: none;
  border-bottom: 1px solid var(--ar-divider);
  font-size: 1px;
}

/* ----------------------------------------------------------
   16. LOADING
   ---------------------------------------------------------- */
#loading_restrita {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ar-surface);
  background-color: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: var(--ar-radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  font-family: var(--ar-font-body);
  color: var(--ar-text-muted);
  font-size: var(--text-sm);
}

/* ----------------------------------------------------------
   17. FIELDSETS INLINE (seções com border em formulários)
   ---------------------------------------------------------- */
#miolo .conteudo_topico [style*="border: 1px solid #E3E9EF"],
#miolo .conteudo_topico [style*="border:1px solid #E3E9EF"],
.ar-fieldset {
  border: 1px solid var(--ar-border) !important;
  border-radius: var(--ar-radius-md) !important;
  overflow: hidden;
  margin-bottom: 1rem;
}

#miolo .conteudo_topico [style*="background: #E3E9EF"],
#miolo .conteudo_topico [style*="background:#E3E9EF"] {
  background: var(--ar-surface-offset) !important;
  background-color: var(--ar-surface-offset) !important;
  border-bottom: 1px solid var(--ar-border);
  padding: 0.65rem 1rem;
}

#miolo .conteudo_topico [style*="background: #E3E9EF"] label,
#miolo .conteudo_topico [style*="background:#E3E9EF"] label {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ar-text);
}

/* ----------------------------------------------------------
   18. RESPONSIVIDADE
   ---------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  body #topo .content {
    flex-wrap: wrap;
  }

  body #bar .content {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  body #bar .usuario_restrita {
    flex-basis: 100%;
    padding: 0.35rem 0;
  }

  body #topo #usuario {
    align-items: flex-start;
  }

  label.label450,
  label.label400,
  label.label390,
  label.label300 {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body #bar .content {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.35rem;
  }

  body #bar .usuario_restrita {
    order: -1;
    font-size: 0.7rem;
  }

  body #bar .telefone { display: none; }

  body #bar a.bt_sair,
  body #bar a.bt_alterarsenha,
  body #bar a.bt_faleconosco {
    font-size: 0.68rem;
    padding: 0.35rem 0.65rem;
  }

  body #topo .content {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  body #topo #usuario {
    align-items: flex-start;
    width: 100%;
  }

  body #topo #usuario span.nome {
    font-size: clamp(1.1rem, 4vw, 1.35rem);
  }

  #miolo { padding: 1rem 0 2rem; }

  #miolo .topico,
  #miolo .topico_null {
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
    min-height: 54px;
  }

  #miolo .conteudo_topico { padding: 1rem; }

  /* labels 100% no mobile */
  label.label550,
  label.label540,
  label.label450,
  label.label400,
  label.label390,
  label.label300,
  label.label290,
  label.label220,
  label.label200,
  label.label190,
  label.label130 {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0;
  }

  form label {
    width: 100% !important;
    margin-right: 0;
  }

  /* botões ocupam largura total */
  form .bt_enviar,
  form .bt_atualizar,
  form .bt_cancelar,
  form .bt_download,
  form .bt_visualizar,
  form .bt_upload,
  #miolo .bt_pesquisar,
  #miolo .bt_solicitar {
    width: 100%;
    margin: 0.4rem 0;
    justify-content: center;
  }

  /* tabelas com scroll horizontal */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* login box */
  body #miolo .box_arearestrita {
    width: 92vw;
    padding: 1.5rem 1.25rem;
  }

  /* dadospre em coluna */
  .dadospre {
    flex-direction: column;
    gap: 0;
  }
  .dadospre div {
    flex: 1 1 100%;
    min-width: 0;
  }

  .banner { height: auto; max-width: 100%; }

  #miolo a.bt_adicionarconvidado {
    float: none;
    width: 100%;
    margin: 0.75rem 0 0 0;
  }

  /* total/valor de eventos: remove float no mobile */
  .ar-total-area {
    float: none;
    width: 100%;
    text-align: right;
    margin: 0.5rem 0;
  }

  /* botões sequenciais: reset margin-left quando já são 100% de largura */
  form .bt_visualizar ~ .bt_download,
  form .bt_download ~ .bt_download,
  form .bt_visualizar ~ input.bt_download,
  form input.bt_download ~ input.bt_download {
    margin-left: 0;
  }

  /* caixas de tamanho de camisa: empilhar em coluna no mobile */
  .div_spin {
    float: none;
    display: inline-block;
    margin: 0 8px 10px 0;
  }
}

/* Telas muito pequenas */
@media (max-width: 480px) {
  body #topo h2 a img {
    max-height: 38px;
  }

  .abas ul li a {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
  }

  #miolo .conteudo_topico { padding: 0.75rem; }
}

/* ----------------------------------------------------------
   19. ACESSIBILIDADE
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   20. UTILITÁRIOS — Fase 3
   ---------------------------------------------------------- */

/* label de aviso / instrução (vermelho, menor) */
.ar-label-aviso {
  display: block;
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 0.625rem;
  line-height: 1.4;
}

/* cabeçalho de seção em card/formulário */
.ar-section-header {
  background: #E3E9EF;
  background-color: #E3E9EF;
  padding: 0.625rem 0.75rem;
  margin: 0 !important;
  display: flex;
  align-items: center;
}

/* label ao lado de checkbox */
.ar-checkbox-label {
  margin-left: 0.3rem;
}

/* coluna de label de telefone em grid de contatos */
.ar-col-phone {
  flex: 1;
  min-width: 130px;
}

/* área de total/valor em eventos — mostrada via JS */
.ar-total-area {
  float: right;
  text-align: right;
}

/* link "Não sei meu CEP" */
.ar-cep-link {
  display: inline-block;
  float: left;
  font-size: 0.75rem;
  padding-top: 1.875rem;
  padding-right: 0.625rem;
  color: var(--ar-primary);
  text-decoration: underline;
}
/* Grupo C — lavagem: camisa boxes */
.box_camisa h4 { background-color: #FBFBFB; margin: 10px 0 0; text-align: center; border: 1px solid #D1D1D1; }
.box_camisa .spin { width: 50px; float: none; padding: 5px; height: 30px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
