/* =========================
   CSB • Área do Atleta (athlete.css)
   - Arquivo reescrito (sem duplicações)
========================= */

/* =========================
   Layout / Containers
========================= */
.athlete-narrow{
  max-width: 860px;
  margin: 0 auto;
}

/* respiro inferior por causa do menu fixo */
.app{
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* container fluido (sem estourar no mobile) */
.container{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: clamp(12px, 3vw, 22px);
  padding-right: clamp(12px, 3vw, 22px);
}

/* Cabeçalho de páginas */
.page-head{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap: wrap;
}
.head-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-hero{
  position:relative;
  overflow:hidden;
  align-items:center;
  padding:22px;
  margin-bottom:14px;
  border:1px solid rgba(15,75,140,.10);
  border-radius:22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(238,247,255,.88));
  box-shadow:0 18px 42px rgba(15,23,42,.08);
}
.portal-hero-copy{
  position:relative;
  z-index:1;
  min-width:0;
}
.portal-hero-kicker{
  margin-bottom:6px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--brand);
}
.portal-hero-logo{
  width:130px;
  height:20px;
  object-fit:contain;
  opacity:.80;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,.10));
}

/* Grids auxiliares */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 920px){
  .grid3{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px){
  .grid2{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .head-actions{ width:100%; justify-content:flex-start; }
  .head-actions .btn{ width:100%; }
}

/* Inputs 100% */
.field input, .field select, .field textarea{
  width: 100%;
  box-sizing: border-box;
}

/* =========================
   AUTH / Login Portal CSB Tech
   - Tela fixa no padrão visual do modal de login
   - Mantém os IDs/funções do register.js
========================= */
body:has(#viewAuth:not([hidden])) .app{
  padding-bottom: 0 !important;
}

#viewAuth{
  min-height: calc(100dvh - 156px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 0 16px;
}

#viewAuth .auth-wrap{
  width:100%;
  display:flex;
  justify-content:center;
  padding: clamp(8px, 1.6vw, 16px);
}

#viewAuth .auth-wrap > .card{
  width:min(430px, 100%);
  display:flex;
  flex-direction:column;
  gap:0;
  padding:0 !important;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(15,75,140,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.96));
  box-shadow:0 30px 90px rgba(2,6,23,.18);
}

#viewAuth .card-head{
  order:1;
  display:grid;
  justify-items:center;
  text-align:center;
  gap:7px;
  padding:22px 22px 8px;
}

#viewAuth .card-head::before{
  content:"";
  width:146px;
  max-width:70%;
  height:38px;
  display:block;
  margin-bottom:2px;
  background:url("../assets/CSBTECH.png") center / contain no-repeat;
  filter:drop-shadow(0 14px 22px rgba(15,23,42,.14));
}

#viewAuth #authTitle{
  margin:0;
  display:grid;
  gap:6px;
  justify-items:center;
  font-size:12px;
  line-height:1;
  font-weight:1000;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--brand, #0f4b8c);
}

#viewAuth #authTitle::before{
  content:"Portal CSB Tech";
  display:block;
  font-size:22px;
  line-height:1.12;
  font-weight:1000;
  letter-spacing:-.02em;
  text-transform:none;
  color:var(--text, #0f172a);
}

#viewAuth #authSubtitle{
  margin:0;
  max-width:340px;
  color:rgba(71,85,105,.94);
  font-size:13px;
  line-height:1.42;
}

#viewAuth #authForm{
  order:2;
  display:grid;
  gap:10px;
  padding:0 22px;
  margin:4px 0 0;
}

#viewAuth .field{
  display:grid;
  gap:6px;
}

#viewAuth .field > span{
  font-size:12px;
  font-weight:900;
  color:rgba(15,23,42,.74);
}

#viewAuth .field input{
  width:100%;
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(15,75,140,.16);
  background:#fff;
  padding:0 13px;
  font-size:14px;
  font-weight:700;
  color:var(--text, #0f172a);
  outline:none;
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}

#viewAuth .field input:focus{
  border-color:rgba(15,75,140,.36);
  box-shadow:0 0 0 4px rgba(15,75,140,.10), 0 12px 28px rgba(15,23,42,.06);
}

#viewAuth .password-wrap > input{
  padding-right:50px;
}

#viewAuth .password-toggle{
  right:8px;
  width:38px;
  height:38px;
  border-radius:12px;
}

#viewAuth .password-toggle:hover{
  background:rgba(15,75,140,.08);
  color:var(--brand, #0f4b8c);
}

#viewAuth #btnAuthSubmit{
  width:100%;
  min-height:46px;
  justify-content:center;
  border-radius:14px;
  margin-top:4px;
}

#viewAuth .row-between{
  display:grid;
  grid-template-columns:1fr;
  justify-items:center;
  gap:6px;
  margin-top:0;
  text-align:center;
}

#viewAuth #btnForgot{
  font-size:13px;
  font-weight:900;
  color:var(--brand, #0f4b8c);
}

#viewAuth #authHint{
  max-width:330px;
  font-size:13px;
  line-height:1.35;
}

#viewAuth #authGuardianHelperWrap{
  display:grid;
  gap:10px;
}

#viewAuth #authGuardianHelperWrap[hidden]{
  display:none !important;
}

#viewAuth .sep{
  order:3;
  display:flex;
  align-items:center;
  gap:10px;
  margin:14px 22px 12px;
  color:rgba(71,85,105,.82);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

#viewAuth .sep::before,
#viewAuth .sep::after{
  content:"";
  height:1px;
  flex:1;
  background:rgba(15,23,42,.10);
}

#viewAuth .sep span{
  background:transparent;
  padding:0;
}

#viewAuth .card > .row{
  order:4;
  display:grid !important;
  grid-template-columns:1fr;
  gap:10px !important;
  width:100%;
  margin:0;
  padding:0 22px 20px;
}

#viewAuth .card > .row .btn{
  width:100%;
  min-height:46px;
  justify-content:center;
  border-radius:14px;
}

#viewAuth #btnGoogle{
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
}

#viewAuth #btnAuthMode{
  border-color:rgba(15,75,140,.18);
}

#viewAuth .card > .row a[href*="eventos"]{
  min-height:42px;
  font-size:13px;
}

@media (max-width: 720px){
  body:has(#viewAuth:not([hidden])) .topbar-inner{
    min-height:58px;
  }

  #viewAuth{
    min-height: calc(100dvh - 138px);
    padding:8px 0 12px;
  }

  #viewAuth .auth-wrap{
    padding:8px 10px 12px;
  }

  #viewAuth .auth-wrap > .card{
    border-radius:20px;
    width:min(430px, 100%);
  }

  #viewAuth .card-head{
    padding:18px 16px 8px;
  }

  #viewAuth .card-head::before{
    width:132px;
    height:34px;
  }

  #viewAuth #authTitle::before{
    font-size:20px;
  }

  #viewAuth #authForm{
    padding:0 16px;
  }

  #viewAuth .sep{
    margin:13px 16px 11px;
  }

  #viewAuth .card > .row{
    padding:0 16px 16px;
  }
}

@media (max-width: 420px){
  #viewAuth .auth-wrap{
    padding-left:8px;
    padding-right:8px;
  }

  #viewAuth .field input,
  #viewAuth #btnAuthSubmit,
  #viewAuth .card > .row .btn{
    min-height:44px;
  }
}

/* =========================
   Listas (cards)
========================= */
.ath-cards{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.ath-card{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.ath-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap:wrap;
}
.ath-card-top > div{
  min-width:0 !important;
}

.ath-card-title{
  font-weight: 1000;
  font-size: 15px;
  line-height: 1.15;
}

.ath-card-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

/* =========================
   Orientações do dashboard
========================= */
.dash-guide-card{
  margin-bottom: 12px;
  border: 1px solid rgba(6,168,79,0.18);
}

.dash-guide-intro{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px 18px;
  border-radius: 18px;
  background: #06A84F;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 18px 40px rgba(6,168,79,0.22);
  color: #ffffff;
}

.dash-guide-intro-icon{
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-size: 24px;
}

.dash-guide-intro-body{
  display: grid;
  gap: 5px;
}

.dash-guide-intro-label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .92;
}

.dash-guide-intro-title{
  font-size: 15px;
  line-height: 1.35;
  font-weight: 1000;
  color: #ffffff;
}

.dash-guide-intro-text{
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.94);
}

@media (max-width: 820px){
  .dash-guide-intro{
    padding: 16px;
    gap: 12px;
  }

  .dash-guide-intro-title{
    font-size: 15px;
  }

  .dash-guide-intro-icon{
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 20px;
  }
}

.dash-guide-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-step{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(2,6,23,0.08);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 24px rgba(15,23,42,0.04);
}

.dash-step-icon{
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.dash-step-body{
  display: grid;
  gap: 6px;
}

.dash-step-title{
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.2;
  color: var(--text);
}

.dash-step-text{
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.dash-step-actions{
  margin-top: 4px;
}

.dash-step-done .dash-step-icon{
  background: rgba(22,163,74,0.10);
  color: #15803d;
}

.dash-step-wait .dash-step-icon{
  background: rgba(245,158,11,0.12);
  color: #b45309;
}

.dash-step-info .dash-step-icon{
  background: rgba(15,75,140,0.10);
  color: var(--brand);
}

.dash-step-link .dash-step-icon{
  background: rgba(99,102,241,0.10);
  color: #4f46e5;
}

.dash-guide-foot{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(2,6,23,0.08);
}

.dash-guide-foot a{
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.dash-guide-reopen{
  margin-bottom: 12px;
}

@media (max-width: 820px){
  .dash-guide-grid{
    grid-template-columns: 1fr;
  }
}

.ath-card-grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
@media (max-width: 640px){
  .ath-card-grid{ grid-template-columns: 1fr; }

  .ath-card{
    border-radius:14px;
    padding:10px;
  }

  .ath-card-top{
    display:grid;
    grid-template-columns:1fr;
  }

  .ath-actions{
    justify-content:stretch;
  }

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

  .ath-field{
    align-items:flex-start;
  }

  .ath-field .v{
    min-width:0;
  }
}

.ath-field{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15,75,140,0.04);
  border: 1px solid rgba(15,75,140,0.08);
}
.ath-field .k{
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.ath-field .v{
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.ath-actions{
  display:flex;
  justify-content:flex-end;
  gap: 8px;
  margin-top: 10px;
  flex-wrap:wrap;
}
.btn-sm{
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
}

/* =========================
   Carteirinha
========================= */
.ath-id-wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items:start;
}

/* controles (dropdown) */
.ath-id-controls{
  width: 100%;
}

.ath-id-card{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(15,75,140,0.20);
  background: linear-gradient(180deg, rgba(15,75,140,0.10), rgba(255,255,255,0.85));
  padding: 14px;
  display:grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  overflow: hidden;
}

@media (max-width: 640px){
  .ath-id-card{ grid-template-columns: 1fr; }
}

.ath-id-top{
  grid-column: 1 / -1;
  display:flex;
  gap: 10px;
  align-items:center;
}

.ath-id-logo{
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ath-id-h{
  font-weight: 1000;
  font-size: 16px;
}

.ath-id-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap:anywhere;
}

.ath-id-body{
  display:grid;
  gap: 8px;
}

.ath-id-line{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,75,140,0.10);
}
.ath-id-line span{
  font-size: 11px;
  color: var(--muted);
}
.ath-id-line b{
  font-size: 12px;
  text-align:right;
  overflow-wrap:anywhere;
}

.ath-id-qr{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(15,75,140,0.10);
}
.ath-id-qr canvas{
  width: 160px;
  height: 160px;
  max-width: 100%;
}

/* =========================
   FAB + menu atleta (mobile/desktop)
========================= */
.ath-fab-menu{
  position:fixed;
  right:14px;
  bottom:calc(14px + env(safe-area-inset-bottom));
  z-index:9600;
  width:52px;
  height:52px;
  border:none;
  border-radius:999px;
  background:linear-gradient(135deg,var(--csb-blue),var(--csb-blue-soft));
  color:#fff;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 14px 34px rgba(9,50,98,.30);
  cursor:pointer;
}

.ath-fab-menu[hidden],
.ath-sheet[hidden],
.ath-sheet-backdrop[hidden]{
  display:none !important;
}
.ath-fab-menu i{
  font-size:22px;
  line-height:1;
}
.ath-fab-menu:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 40px rgba(9,50,98,.36);
}

.ath-sheet-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(2,6,23,0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.ath-sheet-backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

.ath-sheet{
  position:fixed;
  left:10px;
  right:10px;
  bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:9600;
  transform:translateY(110%);
  transition:transform .20s ease;
  background:rgba(255,255,255,.99);
  border-radius:20px;
  border:1px solid rgba(2,6,23,0.10);
  box-shadow:0 -18px 48px rgba(2,6,23,.22);
  height:min(78vh, 620px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.ath-sheet.show{
  transform:translateY(0);
}
.ath-sheet-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px 8px;
  border-bottom:1px solid rgba(2,6,23,0.08);
  flex:0 0 auto;
}
.ath-sheet-name{
  font-weight:1000;
  font-size:14px;
}
.ath-sheet-close{
  border:0;
  background:transparent;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  opacity:.75;
  padding:6px 8px;
}
.ath-sheet-close:hover{ opacity:1; }

.ath-sheet-body{
  flex:1 1 auto;
  min-height:0;
  padding:10px 12px 8px;
  display:grid;
  gap:12px;
  align-content:start;
  grid-auto-rows:max-content;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:rgba(15,75,140,.28) transparent;
}
.ath-sheet-body::-webkit-scrollbar{ width:4px; }
.ath-sheet-body::-webkit-scrollbar-track{ background:transparent; }
.ath-sheet-body::-webkit-scrollbar-thumb{
  background:rgba(15,75,140,.24);
  border-radius:999px;
}
.ath-sheet-body::-webkit-scrollbar-thumb:hover{
  background:rgba(15,75,140,.34);
}

.ath-menu-group{
  display:grid;
  gap:8px;
  align-content:start;
  grid-auto-rows:max-content;
}
.ath-menu-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  padding:2px 4px 0;
}

.ath-sheet-btn{
  width:100%;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:flex-start !important;
  text-align:left !important;
  gap:10px;
  padding:11px 13px;
  font-size:14px;
  font-weight:800;
  line-height:1.1;
  color:var(--text) !important;
  border:1px solid rgba(15,75,140,.16);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border-radius:14px;
  box-shadow:none;
}
.ath-sheet-btn:hover{
  border-color:rgba(15,75,140,.28);
  background:linear-gradient(180deg,#ffffff 0%, #f2f8ff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.ath-sheet-btn i{
  flex:0 0 18px;
  width:18px;
  text-align:left;
  font-size:15px;
  opacity:.92;
  color:inherit !important;
}
.ath-sheet-btn span{
  flex:1 1 auto;
  display:block;
  text-align:left !important;
  font-size:14px;
  font-weight:800;
  color:inherit !important;
}

.ath-sheet-footer{
  flex:0 0 auto;
  padding:10px 12px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(2,6,23,0.08);
  background:rgba(255,255,255,.98);
}
.ath-sheet-btn-danger{
  border-color:rgba(239,68,68,.18);
  background:linear-gradient(180deg,#fff 0%, #fff6f6 100%);
}
.ath-sheet-btn-danger:hover{
  border-color:rgba(239,68,68,.30);
  background:linear-gradient(180deg,#fff 0%, #fff0f0 100%);
}

.ath-oc-body{
  padding:12px 14px;
  display:grid;
  gap:14px;
  align-content:start;
  grid-auto-rows:max-content;
  overflow:auto;
}
.ath-oc-footer{
  margin-top:auto;
  padding:12px 14px calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(2,6,23,0.08);
  background:rgba(255,255,255,.98);
}

.ath-offcanvas .ath-sheet-btn{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:flex-start !important;
  text-align:left !important;
  gap:10px;
  padding:12px 14px;
  font-size:15px;
  font-weight:800;
  line-height:1.2;
  color:var(--text) !important;
  border:1px solid rgba(15,75,140,.16);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border-radius:14px;
  box-shadow:none;
}
.ath-offcanvas .ath-sheet-btn:hover{
  border-color:rgba(15,75,140,.28);
  background:linear-gradient(180deg,#ffffff 0%, #f2f8ff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.ath-offcanvas .ath-sheet-btn i{
  flex:0 0 18px;
  width:18px;
  text-align:left;
  font-size:16px;
  color:inherit !important;
}
.ath-offcanvas .ath-sheet-btn span{
  flex:1 1 auto;
  display:block;
  text-align:left !important;
  font-size:15px;
  font-weight:800;
  color:inherit !important;
}

@media (min-width: 920px){
  .ath-fab-menu{ display:none !important; }
  .ath-sheet{
    display:none !important;
  }
}
@media (max-width: 919px){
  .ath-fab-menu{ display:flex !important; }
  .ath-oc-backdrop,
  .ath-offcanvas,
  .top-user{
    display:none !important;
  }
}
@media (max-width: 560px){
  .ath-fab-menu{
    width:48px;
    height:48px;
    right:12px;
    bottom:calc(12px + env(safe-area-inset-bottom));
  }
  .ath-sheet{
    left:8px;
    right:8px;
    bottom:calc(8px + env(safe-area-inset-bottom));
    height:min(82vh, 620px);
  }
  .ath-sheet-btn{
    min-height:42px;
    padding:10px 11px;
    font-size:13px;
  }
  .ath-sheet-btn span{
    font-size:13px;
  }
  .ath-sheet-body::-webkit-scrollbar{
    width:3px;
  }
}

/* =========================
   Modal (bonitinho + responsivo)
========================= */
.modal-backdrop{
  position: fixed !important;
  inset: 0 !important;
  z-index: 9800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background: rgba(2,6,23,0.55) !important;
  backdrop-filter: blur(6px);
}

.modal-backdrop .modal{
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 auto !important;
  width: min(560px, calc(100vw - 40px)) !important;
  max-width: 560px !important;
  max-height: min(86vh, 720px) !important;
  height: auto !important;
  transform: none !important;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(2,6,23,0.10);
  box-shadow: 0 30px 110px rgba(2,6,23,0.45);
  overflow: auto;
  animation: modalIn .14s ease-out;
}

@keyframes modalIn{
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(2,6,23,0.08);
}

.modal-title{
  font-weight: 1000;
  font-size: 15px;
  line-height: 1.15;
}

.modal-close{
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .75;
  padding: 6px 8px;
}
.modal-close:hover{ opacity: 1; }

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

.modal-foot{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(2,6,23,0.08);
}

@media (max-width: 520px){
  .modal-foot{
    flex-direction: column-reverse;
  }
  .modal-foot .btn{
    width: 100%;
    justify-content:center;
  }
}

/* =========================
   Top user (desktop) + hide bottom bar on desktop
========================= */

/* por padrão (mobile): some o menu do topo */
.top-user{ display:none; }

/* botão do topo */
.top-user-btn{
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(2,6,23,0.10);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 8px 10px;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.top-user-btn:hover{
  background: rgba(255,255,255,0.85);
}
.top-user-text{
  display:flex;
  flex-direction:column;
  line-height: 1.05;
  text-align:right;
}
.top-user-name{
  font-weight: 1000;
  font-size: 13px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-user-email{
  font-size: 11px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* desktop: mostra top-user e esconde bottom bar */
@media (min-width: 920px){
  .top-user{ display:block; }
  .ath-bottom-bar{ display:none !important; }
}

/* mobile: mantém bottom bar normal */
@media (max-width: 919px){
  .ath-bottom-bar{ display:block; }
}

/* =========================
   Top user (desktop) + Offcanvas
========================= */

/* por padrão (mobile): some o top-user */
.top-user{ display:none; }

/* texto separado do botão */
.top-user-text{
  display:flex;
  flex-direction:column;
  line-height: 1.05;
  text-align:right;
  margin-right: 10px;
}
.top-user-name{
  font-weight: 1000;
  font-size: 13px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-user-email{
  font-size: 11px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* botão ícone menu */
.top-user-menu-btn{
  width: 40px;
  height: 40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(2,6,23,0.10);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.top-user-menu-btn:hover{
  background: rgba(255,255,255,0.85);
}

/* desktop: mostra top-user e esconde bottom bar */
@media (min-width: 920px){
  .top-user{
    display:flex;
    align-items:center;
    gap: 0;
  }
  .ath-bottom-bar{ display:none !important; }
}

/* mobile: mantém bottom bar normal */
@media (max-width: 919px){
  .ath-bottom-bar{ display:block; }
}

/* =========================
   Offcanvas (desktop)
========================= */
.ath-oc-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9650;
  background: rgba(2,6,23,0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.ath-oc-backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

.ath-offcanvas{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 92vw);
  z-index: 9700;
  background: rgba(255,255,255,0.96);
  border-left: 1px solid rgba(2,6,23,0.10);
  box-shadow: -24px 0 80px rgba(2,6,23,0.30);
  transform: translateX(110%);
  transition: transform .20s ease;
  display:flex;
  flex-direction:column;
  padding-bottom: env(safe-area-inset-bottom);
}
.ath-offcanvas.show{
  transform: translateX(0);
}

.ath-oc-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(2,6,23,0.08);
}
.ath-oc-name{ font-weight: 1000; font-size: 14px; }
.ath-oc-close{
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .75;
  padding: 6px 8px;
}
.ath-oc-close:hover{ opacity: 1; }

.ath-oc-body{
  padding: 12px 14px 14px;
  display:grid;
  gap: 10px;
}

/* offcanvas só faz sentido no desktop */
@media (max-width: 919px){
  .ath-oc-backdrop, .ath-offcanvas{ display:none !important; }
}

/* =========================
   CEP simples + alinhamento do cadastro
========================= */
#pZip{
  width: 100%;
}

.btn-inline-logout{
  min-width: 116px;
  justify-content: center;
}

#viewGate .page-head,
#viewProfile .page-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#viewProfile .grid3{
  align-items: start;
}

#viewProfile .field{
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100%;
}

#viewProfile .field > span{
  display: block;
  min-height: 18px;
  margin-bottom: 6px;
}

#viewProfile .field > input,
#viewProfile .field > select{
  width: 100%;
}

#viewProfile .field > .muted.small{
  display: block;
  margin-top: 6px;
  min-height: 38px;
  line-height: 1.35;
}

.profile-save-bottom{
  margin-top: 14px;
}
.profile-save-bottom .btn{
  width: 100%;
  justify-content: center;
}

/* respiro extra para não colar no rodapé/menu */
#viewProfile .container{
  padding-bottom: 14px;
}

/* =========================
   Meu cadastro - visualização em card
========================= */
.profile-view-card{
  overflow: hidden;
  border: 1px solid rgba(15,75,140,.14);
  background:
    radial-gradient(circle at top left, rgba(6,168,79,.10), transparent 34%),
    linear-gradient(180deg, rgba(15,75,140,.045), rgba(255,255,255,.94)),
    #fff;
}

.profile-view-hero{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 2px 18px;
  border-bottom: 1px solid rgba(2,6,23,.08);
}

.profile-view-avatar{
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--csb-blue), var(--csb-blue-soft));
  box-shadow: 0 18px 42px rgba(15,75,140,.22);
}

.profile-view-avatar span{
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: .03em;
}

.profile-view-main{
  flex: 1 1 auto;
  min-width: 0;
}

.profile-view-label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.profile-view-name{
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.08;
  font-weight: 1000;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-view-status{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(15,75,140,.12);
  background: rgba(15,75,140,.06);
  color: var(--brand);
}

.profile-view-status.profile-status-ok{
  border-color: rgba(22,163,74,.18);
  background: rgba(22,163,74,.08);
  color: #15803d;
}

.profile-view-status.profile-status-warn{
  border-color: rgba(245,158,11,.22);
  background: rgba(245,158,11,.10);
  color: #b45309;
}

.profile-view-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.profile-summary-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.profile-summary-item{
  min-width: 0;
  border: 1px solid rgba(15,75,140,.10);
  background: rgba(255,255,255,.76);
  border-radius: 16px;
  padding: 12px 13px;
}

.profile-summary-item span{
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 5px;
}

.profile-summary-item b{
  display: block;
  font-size: 13px;
  font-weight: 1000;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-address-card{
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15,75,140,.12);
  border-radius: 18px;
  background: rgba(15,75,140,.045);
}

.profile-address-icon{
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(15,75,140,.10);
  color: var(--brand);
  font-size: 18px;
}

.profile-address-title{
  font-size: 13px;
  font-weight: 1000;
  color: var(--text);
  margin-bottom: 3px;
}

.profile-address-text{
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.profile-form-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-form-actions .btn{
  width: auto !important;
  min-width: 180px;
}

@media (max-width: 820px){
  .profile-view-hero{
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-view-actions{
    width: 100%;
  }

  .profile-view-actions .btn{
    width: 100%;
    justify-content: center;
  }

  .profile-summary-grid{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px){
  .profile-view-hero{
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
  }

  .profile-view-avatar{
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 20px;
  }

  .profile-view-avatar span{
    font-size: 17px;
  }

  .profile-view-actions{
    grid-column: 1 / -1;
  }

  .profile-summary-grid{
    grid-template-columns: 1fr;
  }

  .profile-form-actions{
    flex-direction: column-reverse;
  }

  .profile-form-actions .btn{
    width: 100% !important;
    min-width: 0;
    justify-content: center;
  }
}

@media (max-width: 720px){
  #viewGate .page-head,
  #viewProfile .page-head{
    flex-direction: column;
    align-items: stretch;
  }

  .btn-inline-logout{
    width: 100%;
  }

  #viewProfile .field > .muted.small{
    min-height: 0;
  }
}

#viewProfile .grid3 > .field[style*="grid-column: span 2;"]{
  align-self: start;
}

.entity-access-card{
  margin-bottom: 14px;
  border: 1px solid rgba(15, 75, 140, 0.14);
  background:
    linear-gradient(180deg, rgba(15,75,140,.05), rgba(15,75,140,.02)),
    #fff;
}

.entity-access-head{
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.entity-access-icon{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  background: rgba(15, 75, 140, 0.10);
  color: #0f4b8c;
  font-size: 1.3rem;
}

.entity-access-body{
  min-width: 0;
}

.entity-access-label{
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #0f4b8c;
  margin-bottom: 4px;
}

.portal-Hero-Title{
  font-size: 1.30rem;
  font-weight: 900;
  line-height: 1.3;
  color: #0f4b8c;
  margin-bottom: 4px;
}
.entity-access-title{
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.3;
  color: #0f172a;
  margin-bottom: 4px;
}

.entity-access-text{
  color: #475569;
  line-height: 1.5;
}

.entity-access-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.entity-access-actions .btn{
  min-width: 220px;
  justify-content: center;
}

/* =========================
   Acesso institucional compacto
========================= */
.entity-access-card-compact{
  padding-bottom: 14px;
}

.entity-access-card-compact .entity-access-title{
  font-size: 16px;
  line-height: 1.2;
}

.entity-access-card-compact .entity-access-text{
  margin-top: 4px;
  font-size: 13px;
}

.entity-access-body-full{
  flex: 1 1 auto;
  width: 100%;
}

.entity-access-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.entity-access-title-row .entity-access-title{
  margin-bottom: 0;
}

.entity-linked-view-btn{
  min-height: 34px;
  border: 1px solid rgba(15,75,140,.16);
  background: linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  color: var(--brand);
  border-radius: 999px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.entity-linked-view-btn:hover{
  border-color: rgba(15,75,140,.30);
  box-shadow: 0 12px 24px rgba(15,23,42,.09);
}

.entity-linked-view-btn i{
  font-size: 15px;
  line-height: 1;
}

.entity-choice-status{
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15,75,140,.08);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.entity-access-actions-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.entity-action-card{
  width: 100%;
  min-height: 76px;
  border: 1px solid rgba(15,75,140,.16);
  border-radius: 16px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
  text-align: left;
  font-family: inherit;
}

.entity-action-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15,23,42,.10);
  border-color: rgba(15,75,140,.28);
}

.entity-action-card i{
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.entity-action-card span{
  display: grid;
  gap: 3px;
  min-width: 0;
}

.entity-action-card b{
  font-size: 14px;
  line-height: 1.15;
}

.entity-action-card small{
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}

.entity-action-card-soft{
  background: linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  color: var(--text);
}

.entity-action-card-soft i{
  background: rgba(15,75,140,.10);
  color: var(--brand);
}

.entity-action-card-primary{
  background: linear-gradient(135deg, var(--csb-blue), var(--csb-blue-soft));
  color: #fff;
}

.entity-action-card-primary i{
  background: rgba(255,255,255,.16);
  color: #fff;
}

.entity-action-card-primary small{
  color: rgba(255,255,255,.86);
}

.entity-choice-list{
  display: grid;
  gap: 9px;
}

.entity-choice-item{
  width: 100%;
  border: 1px solid rgba(15,75,140,.14);
  border-radius: 15px;
  background: linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.entity-choice-item:hover{
  border-color: rgba(15,75,140,.28);
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

.entity-choice-name{
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}

.entity-choice-sub{
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.entity-choice-go{
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15,75,140,.10);
  color: var(--brand);
}

@media (max-width: 680px){
  .entity-access-actions-grid{
    grid-template-columns: 1fr;
  }

  .entity-action-card{
    min-height: 68px;
  }
}

/* respiro entre carteirinha e orientações do dashboard */
#cardCarteirinha{
  margin-bottom: 14px;
}

@media (max-width: 720px){
  .entity-access-head{
    flex-direction: column;
  }

  .entity-access-actions{
    flex-direction: column;
  }

  .entity-access-actions .btn{
    width: 100%;
    min-width: 0;
  }
}

/* =========================
   Gate - erro visual nos campos
========================= */
.field.field-error > input,
.field.field-error > select,
.field input.input-error,
.field select.input-error{
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  background: rgba(220, 38, 38, 0.03);
}

.field.field-error > span{
  color: #b91c1c;
}

/* =========================
   Auth: senha com olho + validações
========================= */
.password-wrap{
  position: relative;
  width: 100%;
}

.password-wrap > input{
  width: 100%;
  padding-right: 44px;
}

.password-toggle{
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  opacity: .9;
}

.password-toggle:hover{
  background: rgba(15,75,140,0.08);
  color: var(--text);
}

.password-toggle i{
  font-size: 16px;
  line-height: 1;
}

.field.field-error .password-wrap > input,
.password-wrap > input.input-error{
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  background: rgba(220, 38, 38, 0.03);
}

/* =========================
   Busy overlay: ação de cancelar
========================= */
.busy-actions{
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.busy-actions .btn{
  min-width: 140px;
  justify-content: center;
}

/* =========================
   Scrollbar desktop invisível
========================= */
@media (min-width: 920px){
  html,
  body{
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar{
    width: 0;
    height: 0;
  }
}

@media (max-width: 919px){
  html,
  body{
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .app{
    min-height: 100dvh;
  }

  .view{
    min-height: auto;
  }
}

/* =========================
   Auth helper / perfis vinculados
========================= */
.auth-helper-toggle{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:14px;
  padding:12px 14px;
  border:1px solid rgba(15,75,140,0.12);
  border-radius:16px;
  background:rgba(15,75,140,0.04);
  cursor:pointer;
}

.auth-helper-toggle input{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color: var(--brand);
}

.auth-helper-toggle span{
  font-size:13px;
  line-height:1.45;
  color:var(--text);
}

.auth-helper-toggle-inline{
  margin-top:0;
}

#authGuardianHintBox{
  margin-top:10px;
}

.linked-gate-help{
  border:1px solid rgba(15,75,140,0.12);
  background:rgba(15,75,140,0.04);
}

.linked-profiles-card{
  margin-bottom:14px;
  padding:12px;
  border:1px solid rgba(15,75,140,0.10);
  border-radius:18px;
  background:#fff;
}

.linked-modal-note{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #b91c1c;
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.12);
  border-radius: 12px;
  padding: 8px 10px;
}

.linked-danger-text{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220,38,38,.16);
  background: rgba(220,38,38,.06);
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.55;
}

.btn-danger-soft{
  border-color: rgba(220,38,38,.22) !important;
  color: #b91c1c !important;
  background: linear-gradient(180deg,#fff 0%, #fff5f5 100%) !important;
}

.btn-danger-soft:hover{
  border-color: rgba(220,38,38,.34) !important;
  background: linear-gradient(180deg,#fff 0%, #fee2e2 100%) !important;
}

.linked-inline-current small{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}


.linked-inline-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.linked-inline-current{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1 1 320px;
  min-width:0;
  padding:4px 2px;
  border:0;
  background:transparent;
}

.linked-inline-current i{
  font-size:16px;
  color:var(--brand);
  flex:0 0 auto;
}

.linked-inline-current span{
  min-width:0;
  color:var(--text);
  line-height:1.4;
}

.linked-inline-current b{
  color:var(--text);
}

.linked-inline-switch{
  width:42px;
  height:42px;
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  border-radius:14px;
  border:1px solid rgba(15,75,140,.14);
  background:linear-gradient(180deg,#fff,#f7fbff);
  color:var(--brand);
  cursor:pointer;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
}
.linked-inline-switch:hover{
  border-color:rgba(15,75,140,.26);
  box-shadow:0 14px 28px rgba(15,23,42,.09);
}
.linked-inline-switch i{
  font-size:17px;
}

.linked-modal-list{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.linked-modal-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(2,6,23,0.08);
  background:rgba(255,255,255,0.82);
  box-shadow:0 10px 24px rgba(15,23,42,0.04);
}

.linked-modal-title{
  font-size:15px;
  font-weight:1000;
  line-height:1.2;
  color:var(--text);
}

.linked-modal-subtitle{
  margin-top:4px;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.linked-modal-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

@media (max-width: 780px){
  .linked-inline-row{
    align-items:stretch;
  }

  .linked-inline-current{
    width:100%;
  }

  .linked-inline-switch{
    width:48px;
    height:48px;
    justify-content:center;
    margin-left:auto;
  }

  .linked-modal-item{
    flex-direction:column;
  }

  .linked-modal-actions{
    width:100%;
  }

  .linked-modal-actions .btn{
    width:100%;
    justify-content:center;
  }
}

.ath-sheet-btn[hidden],
.ath-menu-group[hidden]{
  display: none !important;
}

/* =========================
   Efeitos visuais do portal
   - Entrada suave dos blocos
   - Transições modernas sem pesar no mobile
========================= */
@keyframes csbFadeUp{
  from{
    opacity:0;
    transform:translateY(12px);
    filter:blur(2px);
  }
  to{
    opacity:1;
    transform:translateY(0);
    filter:blur(0);
  }
}

@keyframes csbSoftGlow{
  0%,100%{ transform:translate3d(0,0,0) scale(1); opacity:.70; }
  50%{ transform:translate3d(-10px,7px,0) scale(1.035); opacity:.92; }
}

body:not(.booting) .view:not([hidden]) .page-head,
body:not(.booting) .view:not([hidden]) .card,
body:not(.booting) .view:not([hidden]) .profile-save-bottom,
body:not(.booting) .view:not([hidden]) .dash-guide-reopen{
  animation:csbFadeUp .42s cubic-bezier(.2,.7,.2,1) both;
}

body:not(.booting) .view:not([hidden]) .card:nth-of-type(2){ animation-delay:.04s; }
body:not(.booting) .view:not([hidden]) .card:nth-of-type(3){ animation-delay:.08s; }
body:not(.booting) .view:not([hidden]) .card:nth-of-type(4){ animation-delay:.12s; }

#viewDash .card,
#viewProfile .card,
#viewGate .card,
#viewAuth .card{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

#viewDash .card:hover,
#viewProfile .card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 46px rgba(15,23,42,.09);
  border-color:rgba(15,75,140,.18);
}

.btn,
.entity-action-card,
.entity-choice-item,
.ath-sheet-btn,
.top-user-menu-btn{
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease, filter .16s ease;
}

.btn:hover,
.entity-action-card:hover,
.entity-choice-item:hover,
.ath-sheet-btn:hover,
.top-user-menu-btn:hover{
  transform:translateY(-1px);
}

.btn:focus-visible,
.entity-action-card:focus-visible,
.entity-choice-item:focus-visible,
.ath-sheet-btn:focus-visible,
.top-user-menu-btn:focus-visible{
  outline:3px solid rgba(6,168,79,.22);
  outline-offset:3px;
}

/* =========================
   Bloco Área de Eventos - compacto e moderno
========================= */
.events-access-card{
  position:relative;
  overflow:hidden;
  margin-bottom:12px;
  padding:0 !important;
  border:1px solid rgba(15,75,140,.15);
  background:
    radial-gradient(circle at 10% 0%, rgba(6,168,79,.13), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(15,75,140,.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.97) 0%, rgba(245,250,255,.95) 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}

.events-access-bg{
  position:absolute;
  inset:-45% -14% auto auto;
  width:260px;
  height:260px;
  border-radius:999px;
  pointer-events:none;
  opacity:.72;
  background:
    radial-gradient(circle, rgba(6,168,79,.16), transparent 58%),
    conic-gradient(from 140deg, rgba(15,75,140,.15), rgba(6,168,79,.08), transparent, rgba(15,75,140,.14));
  filter:blur(.2px);
  animation:csbSoftGlow 7s ease-in-out infinite;
}

.events-access-card::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(6,168,79,.38), rgba(15,75,140,.22), transparent);
  pointer-events:none;
}

.events-access-content{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:14px;
  padding:14px clamp(14px, 2.2vw, 20px);
}

.events-access-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.events-access-icon{
  width:48px;
  height:48px;
  min-width:48px;
  border-radius:17px;
  display:grid;
  place-items:center;
  color:#0f4b8c;
  background:linear-gradient(180deg, rgba(15,75,140,.12), rgba(6,168,79,.08));
  border:1px solid rgba(15,75,140,.12);
  box-shadow:0 12px 24px rgba(15,75,140,.10);
}

.events-access-icon i{
  font-size:22px;
  line-height:1;
}

.events-access-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.events-access-label{
  font-size:11px;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--brand);
}

.events-access-title{
  font-size:clamp(17px, 1.7vw, 21px);
  line-height:1.15;
  font-weight:1000;
  color:var(--text);
  letter-spacing:-.02em;
}

.events-access-text{
  max-width:620px;
  font-size:13px;
  line-height:1.4;
  color:var(--muted);
}

.events-access-cta{
  min-height:42px;
  border:0;
  border-radius:999px;
  padding:10px 14px 10px 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  text-decoration:none;
  white-space:nowrap;
  color:#fff;
  background:linear-gradient(135deg, #06A84F 0%, #0f4b8c 100%);
  box-shadow:0 12px 28px rgba(6,168,79,.20);
  font-size:13px;
  font-weight:1000;
}

.events-access-cta:hover{
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(15,75,140,.23);
  filter:saturate(1.05);
}

.events-access-cta i{
  font-size:16px;
  line-height:1;
  color:#fff;
  opacity:.96;
  transition:transform .16s ease;
}

.events-access-cta:hover i{
  transform:translateX(2px);
}

@media (max-width:720px){
  .events-access-content{
    grid-template-columns:1fr;
    gap:12px;
    padding:14px;
  }

  .events-access-main{
    align-items:flex-start;
  }

  .events-access-icon{
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:15px;
  }

  .events-access-icon i{
    font-size:20px;
  }

  .events-access-title{
    font-size:18px;
  }

  .events-access-text{
    font-size:12.5px;
  }

  .events-access-cta{
    width:100%;
    box-sizing:border-box;
    min-height:40px;
  }
}

@media (max-width:460px){
  .events-access-main{
    gap:10px;
  }

  .events-access-icon{
    width:40px;
    height:40px;
    min-width:40px;
  }

  .events-access-label{
    font-size:10.5px;
  }

  .events-access-title{
    font-size:17px;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.001ms !important;
  }
}


/* =========================
   Acesso institucional - mesmo padrão da Área de Eventos
   Mantém os IDs dos botões e atualiza apenas a apresentação.
========================= */
.entity-access-card-compact{
  position:relative;
  overflow:hidden;
  margin-bottom:12px;
  padding:0 !important;
  border:1px solid rgba(15,75,140,.15);
  background:
    radial-gradient(circle at 10% 0%, rgba(6,168,79,.13), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(15,75,140,.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.97) 0%, rgba(245,250,255,.95) 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}

.entity-access-card-compact .entity-access-bg{
  position:absolute;
  inset:-45% -14% auto auto;
  width:260px;
  height:260px;
  border-radius:999px;
  pointer-events:none;
  opacity:.72;
  background:
    radial-gradient(circle, rgba(6,168,79,.16), transparent 58%),
    conic-gradient(from 140deg, rgba(15,75,140,.15), rgba(6,168,79,.08), transparent, rgba(15,75,140,.14));
  filter:blur(.2px);
  animation:csbSoftGlow 7s ease-in-out infinite;
}

.entity-access-card-compact::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(6,168,79,.38), rgba(15,75,140,.22), transparent);
  pointer-events:none;
}

.entity-access-card-compact .entity-access-content{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:14px;
  padding:14px clamp(14px, 2.2vw, 20px);
}

.entity-access-card-compact .entity-access-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.entity-access-card-compact .entity-access-icon{
  width:48px;
  height:48px;
  min-width:48px;
  border-radius:17px;
  display:grid;
  place-items:center;
  color:#0f4b8c;
  background:linear-gradient(180deg, rgba(15,75,140,.12), rgba(6,168,79,.08));
  border:1px solid rgba(15,75,140,.12);
  box-shadow:0 12px 24px rgba(15,75,140,.10);
  font-size:22px;
}

.entity-access-card-compact .entity-access-icon i{
  font-size:22px;
  line-height:1;
}

.entity-access-card-compact .entity-access-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.entity-access-card-compact .entity-access-label{
  margin:0;
  font-size:11px;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--brand);
}

.entity-access-card-compact .entity-access-title{
  margin:0;
  font-size:clamp(17px, 1.7vw, 21px);
  line-height:1.15;
  font-weight:1000;
  color:var(--text);
  letter-spacing:-.02em;
}

.entity-access-card-compact .entity-access-text{
  max-width:620px;
  margin:0;
  font-size:13px;
  line-height:1.4;
  color:var(--muted);
}

.entity-access-cta-group{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.entity-access-cta{
  min-height:42px;
  border:0;
  border-radius:999px;
  padding:10px 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  white-space:nowrap;
  font-family:inherit;
  font-size:13px;
  font-weight:1000;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease, border-color .16s ease, background .16s ease;
}

.entity-access-cta:hover{
  transform:translateY(-2px);
  text-decoration:none;
}

.entity-access-cta i{
  font-size:15px;
  line-height:1;
}

.entity-access-cta span,
.entity-access-cta b{
  display:inline;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:1;
}

.entity-access-cta-soft{
  border:1px solid rgba(15,75,140,.15);
  color:var(--brand);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,.055);
}

.entity-access-cta-soft:hover{
  color:var(--brand);
  border-color:rgba(15,75,140,.28);
  box-shadow:0 16px 30px rgba(15,23,42,.10);
}

.entity-access-cta-primary{
  color:#fff;
  background:linear-gradient(135deg, #06A84F 0%, #0f4b8c 100%);
  box-shadow:0 12px 28px rgba(6,168,79,.20);
}

.entity-access-cta-primary:hover{
  color:#fff;
  box-shadow:0 18px 34px rgba(15,75,140,.23);
  filter:saturate(1.05);
}

@media (max-width:860px){
  .entity-access-card-compact .entity-access-content{
    grid-template-columns:1fr;
    gap:12px;
    padding:14px;
  }

  .entity-access-card-compact .entity-access-main{
    align-items:flex-start;
  }

  .entity-access-cta-group{
    width:100%;
    justify-content:stretch;
  }

  .entity-access-cta{
    flex:1 1 180px;
    box-sizing:border-box;
    min-height:40px;
  }
}

@media (max-width:520px){
  .entity-access-card-compact .entity-access-main{
    gap:10px;
  }

  .entity-access-card-compact .entity-access-icon{
    width:40px;
    height:40px;
    min-width:40px;
    border-radius:15px;
  }

  .entity-access-card-compact .entity-access-icon i{
    font-size:20px;
  }

  .entity-access-card-compact .entity-access-label{
    font-size:10.5px;
  }

  .entity-access-card-compact .entity-access-title{
    font-size:17px;
  }

  .entity-access-card-compact .entity-access-text{
    font-size:12.5px;
  }

  .entity-access-cta-group{
    display:grid;
    grid-template-columns:1fr;
  }

  .entity-access-cta{
    width:100%;
  }
}

/* =====================================================
   Portal CSB Tech — hero do painel com ícone + logo mobile à direita
   Ajuste cirúrgico 2026-05-15
   ===================================================== */
#viewDash .portal-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:nowrap;
  min-height:90px;
}

#viewDash .portal-hero-main{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
  flex:1 1 auto;
}

#viewDash .portal-hero-icon{
  width:50px;
  height:50px;
  min-width:50px;
  display:grid;
  place-items:center;
  border-radius:17px;
  color:#fff;
  background:linear-gradient(135deg, var(--csb-blue, #0f4b8c), var(--csb-blue-soft, #1d6fb8));
  box-shadow:0 16px 34px rgba(15,75,140,.22);
}

#viewDash .portal-hero-icon i{
  font-size:23px;
  line-height:1;
}

#viewDash .portal-hero-copy{
  display:grid;
  gap:3px;
  min-width:0;
  text-align:left;
}

#viewDash .portal-Hero-Title{
  margin:0;
  font-size:clamp(20px, 2.4vw, 28px);
  line-height:1.1;
  overflow-wrap:anywhere;
}

#viewDash .portal-hero-logo{
  position:relative;
  z-index:1;
  flex:0 0 auto;
  margin-left:auto;
  width:132px;
  height:auto;
  max-height:28px;
  object-fit:contain;
  opacity:.9;
}

@media (max-width:720px){
  #viewDash .portal-hero{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:center;
    gap:10px;
    min-height:88px;
    padding:16px 14px !important;
  }

  #viewDash .portal-hero-main{
    gap:10px;
    min-width:0;
  }

  #viewDash .portal-hero-icon{
    width:44px;
    height:44px;
    min-width:44px;
    border-radius:15px;
  }

  #viewDash .portal-hero-icon i{
    font-size:20px;
  }

  #viewDash .portal-Hero-Title{
    font-size:19px;
    line-height:1.12;
    letter-spacing:-.02em;
  }

  #viewDash #dashSubtitle{
    font-size:12px;
    line-height:1.25;
  }

  #viewDash .portal-hero-logo{
    justify-self:end;
    align-self:center;
    width:98px;
    max-width:26vw;
    max-height:24px;
    margin-left:0;
  }
}

@media (max-width:420px){
  #viewDash .portal-hero{
    gap:8px;
    padding:15px 12px !important;
  }

  #viewDash .portal-hero-icon{
    width:40px;
    height:40px;
    min-width:40px;
    border-radius:14px;
  }

  #viewDash .portal-Hero-Title{
    font-size:18px;
  }

  #viewDash .portal-hero-logo{
    width:90px;
    max-width:24vw;
  }
}

/* Modais do registro: o overlay rola inteiro no mobile, sem rodape fixo escondendo conteudo. */
.modal-backdrop{
  align-items:flex-start !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
  -webkit-overflow-scrolling:touch;
}

.modal-backdrop .modal{
  width:min(560px, calc(100vw - 24px)) !important;
  max-width:560px !important;
  max-height:none !important;
  margin:0 auto !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:visible !important;
  border-radius:12px !important;
}

.modal-body{
  max-height:none !important;
  overflow:visible !important;
}

.modal-foot{
  position:relative !important;
  bottom:auto !important;
  flex:0 0 auto !important;
  flex-wrap:wrap;
}

@media (max-width:520px){
  .modal-backdrop{
    padding:max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
  }

  .modal-backdrop .modal{
    width:calc(100vw - 16px) !important;
    max-width:calc(100vw - 16px) !important;
  }
}
