:root{
  --rodasc-red:#d63a2f;
  --rodasc-red-2:#b92f26;
  --rodasc-blue:#093262;
  --bg:#f4f6f9;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --radius:14px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container{
  max-width: 1050px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.topbar{
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar .inner{
  max-width: 1050px;
  margin: 0 auto;
  padding: 14px 14px;
  display:flex;
  align-items:center;
  gap:14px;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.brand img{ height: 38px; width:auto; }
.brand .title{
  display:flex; flex-direction:column; line-height:1.1;
}
.brand .title b{ color:var(--rodasc-blue); }
.brand .title span{ color:var(--muted); font-size:12px; }

.userbox{
  margin-left:auto;
  display:flex; gap:10px; align-items:center;
  color:var(--muted);
  font-size:13px;
}
.userbox .pill{
  background:#f8fafc;
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
}

/* =========================
   User menu (Topbar)
   ========================= */
.userMenu{
  display:flex;
  align-items:center;
  gap:10px;
}

.userPopover{ position:relative; }

.userMenuBtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  background:#f8fafc;
  color: var(--rodasc-blue);
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.userMenuBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  background:#fff;
}
.userMenuBtn .bi{ font-size:18px; line-height:1; }
.userMenuBtn .chev{ font-size:14px; opacity:.75; }

.userPop{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  width: min(300px, calc(100vw - 28px));
  background:#fff;
  border:1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  overflow:hidden;
  display:none;
  z-index: 10060;
}
.userPop.show{ display:block; }

.userPopHd{
  padding: 12px 12px;
  background: linear-gradient(135deg, rgba(9,50,98,.06), rgba(33,161,87,.08));
  border-bottom: 1px solid rgba(9,50,98,.10);
}
.userPopHd .nm{ font-weight:1000; color: var(--rodasc-blue); }
.userPopHd .em{ margin-top:2px; font-size:12px; color: var(--muted); word-break: break-word; }

.userPopLinks{ padding: 8px; display:flex; flex-direction:column; gap:6px; }
.userPop .popLink{
  width:100%;
  text-align:left;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  color: var(--rodasc-blue);
  text-decoration:none;
}
.userPop .popLink:hover{
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  border-color: rgba(9,50,98,.25);
}
.userPop .popLink .bi{ font-size:16px; }

.iconOnly{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border:1px solid var(--border);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--rodasc-blue);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
.iconOnly:hover{ transform: translateY(-1px); }
.iconOnly .bi{ font-size:18px; }
.iconOnly.danger{
  background:#fee2e2;
  border-color:#fecaca;
  color:#991b1b;
}

.row{ display:flex; gap:14px; flex-wrap:wrap; }
.col{ flex:1 1 320px; }

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.card .hd{
  background: var(--rodasc-red);
  color:#fff;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-size: 13px;
}

.card .bd{ padding: 14px; }

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 780px){
  .grid{ grid-template-columns: 1fr; }
}

label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2px;
}

/* ======================
   Mobile: evita zoom do iOS ao focar inputs (font-size < 16px) + melhora toque
   ====================== */
html{ -webkit-text-size-adjust: 100%; }

@supports (-webkit-touch-callout: none){
  input, select, textarea{ font-size:16px; }
}

/* controles com alvo de toque confortável */
input, select, textarea{
  font-size:16px;            /* também ajuda Android/iOS */
  min-height: 44px;          /* padrão de toque */
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

/* select mais “app-like” (menos azul / mais consistente) */
select{
  appearance:none;
  -webkit-appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 38px;
}
select::-ms-expand{ display:none; }

/* header do card (status + lixeira) */
.topActions{
  display:flex;
  align-items:center;
  gap:10px;
}
.topActions .iconBtn{
  position:static;
  top:auto;
  right:auto;
  transform:none;
  width:36px;
  height:36px;
}
.iconBtn.danger{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
}
.iconBtn.danger:hover{ filter: brightness(0.98); }
input, select, textarea{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fff;
}
/* =========================
   FIX: checkbox / radio pequenos e bonitos
   (não herdar width:100% e min-height:44px)
   ========================= */
input[type="checkbox"],
input[type="radio"]{
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  border-radius: 6px;
  box-shadow: none !important;
  cursor: pointer;
  accent-color: var(--rodasc-blue);
}
/* deixa as opções do modal mais limpas */
#exportColsMount .detailItem{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
#exportColsMount .detailItem:hover{
  border-color: rgba(9,50,98,.25);
  box-shadow: 0 0 0 4px rgba(9,50,98,.08);
}

/* se algum wrapper estiver “esticando” */
label input[type="checkbox"],
label input[type="radio"]{
  flex: 0 0 auto;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(9,50,98,.55);
  box-shadow: 0 0 0 4px rgba(9,50,98,.10);
}

small.hint{ color:var(--muted); display:block; margin-top:6px; }

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

/* Navegação padrão dos passos (Voltar/Avançar/Enviar) */
.btns.footerNav{
  width:100%;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding: 0 6px; /* evita encostar nas bordas do card */
}

/* ===== Menu "Ações" (Cancel/Delete) ===== */
.actionsDrop{ position:relative; }
.actionsDrop > summary{ list-style:none; }
.actionsDrop > summary::-webkit-details-marker{ display:none; }

.actionsMenu{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  min-width:240px;
  max-width:min(320px, calc(100vw - 24px));
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.18);
  z-index:50;
}

.actionsMenu .btn{
  width:100%;
  justify-content:flex-start;
}

.actionsMenu .btn + .btn{
  margin-top:8px;
}

/* No mobile, vira um "sheet" fixo pra nunca escapar da tela */
@media (max-width:520px){
  .actionsMenu{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    top:auto;
    max-width:none;
  }
}

/* =========================
   Home tabs (Index)
   ========================= */
.home-tabs{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
.home-tabs .segBtn{
  flex:1;
  padding:10px 12px;
  border-radius:999px;
  border:0;
  background:transparent;
  font-weight:900;
  cursor:pointer;
  color:var(--muted);
}
.home-tabs .segBtn.active{
  background:var(--rodasc-blue);
  color:#fff;
}

.tab-panel{ display:none; }
.tab-panel.is-active{ display:block; }

/* =========================
   Pick list (modal)
   ========================= */
.pick-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.pick-item{
  width:100%;
  text-align:left;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  padding:12px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.pick-item:hover{
  border-color: rgba(9,50,98,.45);
  box-shadow: 0 0 0 4px rgba(9,50,98,.08);
}
.pick-item:focus{
  outline:none;
  box-shadow: 0 0 0 4px rgba(214,58,47,.14);
}
.pick-item .t{
  font-weight:900;
  color:var(--rodasc-blue);
}
.pick-item .d{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
  line-height:1.25;
}
button, .btn{
  cursor:pointer;
  border:none;
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 900;
  display:inline-flex;
  align-items:center;
  gap:8px;
  line-height: 1;
  user-select:none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
button:active, .btn:active{ transform: translateY(0); }
button:hover, .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,0.10);
}
button:disabled, .btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.btn .bi{ font-size:16px; line-height:1; }

.btn-primary{
  background: linear-gradient(135deg, var(--rodasc-red), var(--rodasc-red-2));
  color:#fff;
}
.btn-primary:hover{ filter: brightness(1.02); }

.btn-ghost{
  background:#fff;
  border:1px solid var(--border);
  color: var(--rodasc-blue);
}
.btn-ghost:hover{
  border-color: rgba(9,50,98,.35);
  box-shadow: 0 14px 30px rgba(15,23,42,0.10);
}

.btn-danger{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
}
.btn-danger:hover{ filter: brightness(0.98); }

.badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border:1px solid var(--border);
}
.badge.PENDENTE{ background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.badge.PENDENTE_PAGAMENTO{ background:#fffbeb; border-color:#fde68a; color:#92400e; }
.badge.PAGO{ background:#ecfdf5; border-color:#bbf7d0; color:#065f46; }
.badge.APROVADA{ background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }
.badge.REJEITADA{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.badge.DRAFT{ background:#f8fafc; border-color:#e2e8f0; color:#334155; }

/* =========================
   Final screen (accordions)
   ========================= */
.finalHero{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
  margin-bottom: 12px;
}
.finalOk{
  display:flex;
  gap:10px;
  align-items:flex-start;
  flex: 1 1 320px;
}
.finalOk .bi{
  font-size:22px;
  color: var(--rodasc-blue);
  margin-top:2px;
}
.finalTitle{
  font-weight:1000;
  font-size:18px;
  color: var(--rodasc-blue);
}
.finalConfirm{
  border:1px solid rgba(33,161,87,.35);
  background: linear-gradient(135deg, rgba(33,161,87,.08), rgba(9,50,98,.05));
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 240px;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
.confirmCode{
  font-weight:1000;
  color: var(--rodasc-blue);
  word-break: break-word;
  font-size: 14px;
  letter-spacing: .2px;
  margin-top:4px;
}

.acc{
  border:1px solid var(--border);
  border-radius: 16px;
  background:#fff;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  overflow:hidden;
}
.acc summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 14px;
  font-weight: 1000;
  color: var(--rodasc-blue);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: linear-gradient(135deg, rgba(9,50,98,.04), rgba(214,58,47,.04));
}
.acc summary::-webkit-details-marker{ display:none; }
.acc summary .left{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.acc summary .chev{ transition: transform .16s ease; opacity:.8; }
.acc[open] summary .chev{ transform: rotate(180deg); }
.acc .accBody{
  padding: 14px;
  border-top: 1px solid var(--border);
}
.acc-success summary{
  background: linear-gradient(135deg, rgba(33,161,87,.10), rgba(9,50,98,.04));
}
.qrRow{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.qrBox{
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background:#fff;
}
#confirmQrCanvas{
  width: 180px;
  height: 180px;
  display:block;
}
.note.success{
  background:#ecfdf5;
  border:1px solid #bbf7d0;
  color:#065f46;
}


.stepper{
  display:flex; gap:8px; flex-wrap:wrap;
  margin: 10px 0 14px;
}
.step{
  flex:1 1 140px;
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  background:#fff;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}
.step.active{
  border-color: rgba(214,58,47,.35);
  box-shadow: 0 0 0 4px rgba(214,58,47,.10);
  color: var(--rodasc-red);
}

/* =========================
   Step transitions (event) + Stepper progress
   ========================= */
.stepper{
  position:relative;
  padding-bottom: 10px;
  --p: 0; /* 0..1 */
}
.stepper::before{
  content:"";
  position:absolute;
  left:6px; right:6px; bottom:0;
  height:4px;
  border-radius:999px;
  background: rgba(9,50,98,.10);
}
.stepper::after{
  content:"";
  position:absolute;
  left:6px; bottom:0;
  height:4px;
  border-radius:999px;
  width: calc((100% - 12px) * var(--p));
  background: linear-gradient(90deg, var(--rodasc-red), rgba(33,161,87,.95));
  transition: width .26s ease;
}

/* animações direction-aware */
@keyframes stepEnterRight{ from{opacity:0; transform:translateX(18px) scale(.995);} to{opacity:1; transform:translateX(0) scale(1);} }
@keyframes stepEnterLeft { from{opacity:0; transform:translateX(-18px) scale(.995);} to{opacity:1; transform:translateX(0) scale(1);} }
@keyframes stepLeaveLeft { from{opacity:1; transform:translateX(0); } to{opacity:0; transform:translateX(-14px);} }
@keyframes stepLeaveRight{ from{opacity:1; transform:translateX(0); } to{opacity:0; transform:translateX(14px);} }

.stepCard{ display:none; will-change: transform, opacity; }
.stepCard.is-active{ display:block !important; }

.stepCard.enter-fwd{ display:block !important; animation: stepEnterRight .28s cubic-bezier(.2,.7,.2,1) both; }
.stepCard.enter-back{ display:block !important; animation: stepEnterLeft  .28s cubic-bezier(.2,.7,.2,1) both; }
.stepCard.leave-fwd{ display:block !important; animation: stepLeaveLeft  .22s ease both; }
.stepCard.leave-back{ display:block !important; animation: stepLeaveRight .22s ease both; }

/* =========================
   Choice UI (radios bonitos)
   ========================= */
.seg{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.segOpt{
  flex:1 1 140px;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:1000;
  color: var(--rodasc-blue);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
  user-select:none;
}
.segOpt:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,0.10);
  border-color: rgba(9,50,98,.25);
}
.segOpt input{ position:absolute; opacity:0; pointer-events:none; }
.segOpt.is-selected{
  border-color: rgba(214,58,47,.45);
  box-shadow: 0 0 0 4px rgba(214,58,47,.12);
  background: linear-gradient(135deg, rgba(214,58,47,.08), rgba(9,50,98,.04));
}
.segOpt .bi{ font-size:16px; }

.choiceList{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 8px;
}
.choiceCard{
  border:1px solid var(--border);
  border-radius: 16px;
  background:#fff;
  padding: 12px 12px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
.choiceCard:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,0.10);
  border-color: rgba(9,50,98,.25);
}
.choiceCard input{ position:absolute; opacity:0; pointer-events:none; }

.choiceMain{
  display:flex;
  gap:12px;
  align-items:center;
}
.choiceIcon{
  width:42px; height:42px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(9,50,98,.08), rgba(33,161,87,.10));
  border:1px solid rgba(9,50,98,.12);
  color: var(--rodasc-blue);
  flex: 0 0 auto;
}
.choiceIcon .bi{ font-size:20px; }
.choiceTxt{ flex:1; min-width: 0; }
.choiceTitle{
  font-weight:1000;
  color: var(--rodasc-blue);
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.choiceTag{
  font-size:11px;
  font-weight:1000;
  padding: 3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color: var(--muted);
  text-transform:uppercase;
  letter-spacing:.2px;
}
.choiceDesc{
  margin-top:3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}
.choiceCheck{
  width:30px; height:30px;
  border-radius: 10px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  color: transparent; /* aparece só quando seleciona */
  flex: 0 0 auto;
}

.choiceCard.is-selected{
  border-color: rgba(214,58,47,.45);
  box-shadow: 0 0 0 4px rgba(214,58,47,.12);
}
.choiceCard.is-selected .choiceCheck{
  border-color: rgba(33,161,87,.45);
  background: rgba(33,161,87,.10);
  color: rgba(33,161,87,.95);
}

/* Termo (checkbox maior e clicável) */
.tickRow{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  cursor:pointer;
  background:#fff;
}
.tickRow:hover{
  border-color: rgba(9,50,98,.25);
  box-shadow: 0 0 0 4px rgba(9,50,98,.08);
}
.tickRow input{ margin-top:2px; width:18px; height:18px; }

/* =========================
   Skeleton loading (event)
   ========================= */
@keyframes shimmer{
  0%{ background-position: -480px 0; }
  100%{ background-position: 480px 0; }
}
.skel{
  background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 37%, #eef2f7 63%);
  background-size: 900px 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
}
.skel-line{ height:12px; margin:10px 0; }
.skel-line.sm{ height:10px; width:55%; }
.skel-line.md{ height:12px; width:75%; }
.skel-line.lg{ height:14px; width:92%; }
.skel-pill{ height:28px; width:120px; border-radius:999px; }
.skel-btn{ height:42px; width:220px; border-radius:14px; }
.skel-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow: 0 12px 26px rgba(15,23,42,0.06);
  padding:14px;
}

.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  min-width: 260px;
  max-width: 360px;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow: 0 14px 28px rgba(15,23,42,.16);
  display:none;
}
.toast.show{ display:block; }
.toast b{ display:block; margin-bottom:4px; }
.toast p{ margin:0; color:var(--muted); font-size:13px; }

/* =========================
   Toasts v2 (stack + variants)
   ========================= */
.toasts{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  width: min(380px, calc(100vw - 32px));
}

.toast-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(15,23,42,.16);
  overflow:hidden;
  transform: translateY(6px);
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
}
.toast-item.show{
  transform: translateY(0);
  opacity: 1;
}

.toast-item .bar{
  height: 4px;
  background: rgba(9,50,98,.18);
}
.toast-item[data-variant="success"] .bar{ background: rgba(16,185,129,.35); }
.toast-item[data-variant="error"]   .bar{ background: rgba(239,68,68,.35); }
.toast-item[data-variant="warning"] .bar{ background: rgba(245,158,11,.35); }
.toast-item[data-variant="info"]    .bar{ background: rgba(59,130,246,.30); }

.toast-item .content{
  padding: 12px 12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.toast-item .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: rgba(9,50,98,.55);
}
.toast-item[data-variant="success"] .dot{ background: #10b981; }
.toast-item[data-variant="error"]   .dot{ background: #ef4444; }
.toast-item[data-variant="warning"] .dot{ background: #f59e0b; }
.toast-item[data-variant="info"]    .dot{ background: #3b82f6; }

.toast-item .txt{ flex:1; }
.toast-item b{ display:block; margin-bottom:3px; }
.toast-item p{ margin:0; color:var(--muted); font-size:13px; line-height:1.35; }

.toast-item .x{
  border:1px solid var(--border);
  background:#fff;
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 9px;
  font-weight: 900;
}
.toast-item .x:hover{ color: var(--rodasc-blue); }

/* keep old single #toast if present */
.toast{ z-index:10000; }

/* =========================
   Modal v2
   ========================= */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.52);
  display:none;
  z-index: 10100; /* acima do footer (10040) */

  /* 🔥 importante: espaço inferior para o rodapé */
  padding: 18px 12px calc(var(--app-footer-h) + 18px + env(safe-area-inset-bottom, 0px));

  /* 🔥 permite rolagem quando modal for alto (sem “sumir” no rodapé) */
  overflow: auto;
  align-items: flex-start;
}
.modal-backdrop.show{ display:flex; }

.modal{
  margin: 12px auto;
  width: min(560px, 100%);
  background:#fff;
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(15,23,42,28);

  /* 🔥 evita que o modal passe da viewport (considerando footer) */
  max-height: calc(100vh - 36px - var(--app-footer-h) - env(safe-area-inset-bottom, 0px));

  display:flex;
  flex-direction: column;
  overflow:hidden; /* scroll fica no .mb */
}

.modal .mh{
  padding: 14px 16px;
  border-bottom:1px solid var(--border);
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
.modal .mh b{ color:var(--rodasc-blue); font-size:15px; }
.modal .mb{
  padding: 14px 16px;
  color: var(--text);
}
.modal .mb p{ margin:0; color: var(--muted); line-height:1.45; }
.modal .mf{
  padding: 14px 16px;
  border-top:1px solid var(--border);
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.modal .close{
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  color:var(--muted);
}
.modal .close:hover{ color: var(--rodasc-blue); }
.modal .field{
  margin-top:12px;
}
.modal .field textarea, .modal .field input{
  width:100%;
}
.modal .dangerTitle b{ color: #991b1b; }


/* =========================
   Global Loader + Busy buttons + Skeleton
   ========================= */
@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes skel{ 0%{ background-position: 100% 0; } 100%{ background-position: 0 0; } }

button:disabled, .btn:disabled, button[disabled], .btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-busy, button.is-busy{
  position: relative;
  padding-right: 44px;
}
.btn.is-busy::after, button.is-busy::after{
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: .75;
  animation: spin .8s linear infinite;
}

.badge.CANCELADA{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }

.gloader{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  background: rgba(244,246,249,.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 18px;
}
.gloader.show{ display:flex; }
.gloader .box{
  width: min(420px, 100%);
  background:#fff;
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(15,23,42,.20);
  padding: 16px;
  display:flex;
  gap:12px;
  align-items:center;
}

.gloader .sportIcon{
  width: 42px;
  height: 42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(9,50,98,.08), rgba(33,161,87,.10));
  border: 1px solid rgba(9,50,98,.12);
}
.gloader .sportIcon svg{ width: 34px; height: 34px; }
.gloader .sportIcon .boot{
  fill: rgba(9,50,98,.14);
  stroke: rgba(9,50,98,.8);
  stroke-width: 2;
}
.gloader .sportIcon .plate{
  stroke: rgba(33,161,87,.95);
  stroke-width: 3;
  stroke-linecap: round;
}
/* detalhes do patins */
.gloader .sportIcon .boot{
  fill: rgba(9,50,98,.14);
  stroke: rgba(9,50,98,.32);
  stroke-width: 2;
}
.gloader .sportIcon .bootDetail{
  stroke: rgba(9,50,98,.35);
  stroke-width: 2;
  stroke-linecap: round;
  opacity:.9;
}
.gloader .sportIcon .plate{
  stroke: rgba(33,161,87,.95);
  stroke-width: 3;
  stroke-linecap: round;
}

/* 4 rodinhas girando */
.gloader .sportIcon .wheelGroup{
  transform-box: fill-box;
  transform-origin: center;
  animation: spin .85s linear infinite;
}
.gloader .sportIcon .wheelGroup.wg2{ animation-duration: .75s; }
.gloader .sportIcon .wheelGroup.wg3{ animation-duration: .95s; }
.gloader .sportIcon .wheelGroup.wg4{ animation-duration: .80s; }

.gloader .sportIcon .wheelDot{
  fill:#fff;
  stroke: rgba(9,50,98,.85);
  stroke-width: 2;
}
.gloader .sportIcon .wheelSpoke{
  stroke: rgba(33,161,87,.95);
  stroke-width: 2;
  stroke-linecap: round;
  opacity:.95;
}

.gloader .txt b{ display:block; color: var(--rodasc-blue); }
.gloader .txt span{ display:block; color: var(--muted); font-size: 13px; margin-top:2px; }

.gloader .txt{ flex:1; }

.gloader .loaderActions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}

.gloader .loaderActions .btn{
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}


.skel{
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: skel 1.2s ease infinite;
  border-radius: 12px;
}
.skel.line{ height: 12px; }
.skel.line.sm{ height: 10px; }
.skel.line.lg{ height: 16px; }
.skel.block{ height: 78px; }


/* =========================
   Step nav (Voltar / Avançar)
   ========================= */
.btns.stepNav{
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 520px){
  .btns.stepNav{
    flex-direction: column;
    align-items: stretch;
  }
  .btns.stepNav .btn{
    width: 100%;
    justify-content: center;
  }
}

/* =========================
   Top actions (menu Ações)
   ========================= */
.actionsDrop{ position: relative; }
.actionsDrop > summary{ list-style:none; }
.actionsDrop > summary::-webkit-details-marker{ display:none; }

.actionsDrop .actionsMenu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 28px));
  background:#fff;
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  z-index: 10010;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.actionsDrop[open] .actionsMenu{ display:flex; }
.actionsDrop .actionsMenu .btn{
  width: 100%;
  justify-content: flex-start;
  box-shadow: none;
}

/* Breadcrumb / secondary nav */
.breadcrumb{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 2px;}
.breadcrumb a{color:var(--rodasc-blue);font-weight:900;text-decoration:none;}
.breadcrumb span{color:var(--muted);font-size:12px;}
.breadcrumb .sep{opacity:.5;}

/* =========================
   Auth v2 (Login / Signup) + Gate Profile
   ========================= */
.authTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.authTitle{
  font-size:26px;
  font-weight:1000;
  letter-spacing:-.02em;
}
.authSub{
  margin-top:2px;
  color:var(--muted);
  font-weight:600;
}

.authTabs{
  display:flex;
  gap:8px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px;
}
.authTabs .tab{
  border:0;
  background:transparent;
  padding:9px 12px;
  border-radius:999px;
  font-weight:900;
  color:var(--muted);
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.authTabs .tab:hover{ transform: translateY(-1px); }
.authTabs .tab.active{
  background: rgba(9,50,98,.08);
  color: var(--rodasc-blue);
}

.hrOr{
  display:flex;
  align-items:center;
  gap:12px;
  margin: 12px 0;
  color: var(--muted);
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.2px;
}
.hrOr::before,
.hrOr::after{
  content:"";
  height:1px;
  background: var(--border);
  flex:1;
}
.hrOr span{
  padding: 0 6px;
}

.btn-google{
  background:#fff;
  border:1px solid var(--border);
  color: var(--text);
}
.btn-google:hover{ box-shadow:0 10px 22px rgba(15,23,42,0.06); }
.btn .ico, button .ico{
  display:inline-flex;
  width:18px;height:18px;
  margin-right:8px;
  vertical-align:middle;
}

.inputWrap{
  position:relative;
}
.inputWrap input{
  padding-right: 44px;
}
.iconBtn{
  position:absolute;
  right:8px;
  top:50%;
  transform: translateY(-50%);
  width:34px;
  height:34px;
  border-radius: 10px;
  border:1px solid var(--border);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  transition: transform .14s ease, box-shadow .14s ease, color .14s ease;
}
.iconBtn:hover{
  color: var(--rodasc-blue);
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
.iconBtn.is-on{
  color: var(--rodasc-blue);
}
@keyframes eyePop{
  0%{ transform: translateY(-50%) scale(.92); opacity:.6; }
  100%{ transform: translateY(-50%) scale(1); opacity:1; }
}
.iconBtn.is-anim{
  animation: eyePop .18s ease;
}

.note{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.note b{ color: var(--rodasc-blue); }

.addrBox{
  margin-top:10px;
  border:1px solid var(--border);
  background:#fff;
  border-radius: 14px;
  padding: 12px;
}
.addrBox .miniInfo{
  color: var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.2px;
  margin-bottom:8px;
}

/* =========================
   Auth Pending (evita piscar login antes do Firebase resolver)
   ========================= */
body.auth-pending header,
body.auth-pending main,
body.auth-pending .breadcrumb{
  opacity: 0;
  pointer-events: none;
}

/* garante que o loader sempre aparece */
body.auth-pending .gloader{
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* =========================
   FIX: Gate modal scroll (CEP / endereço)
   ========================= */

/* deixa o backdrop rolável quando o conteúdo passar da altura da tela */
.modal-backdrop{
  overflow: auto;
  align-items: flex-start;   /* importante: permite rolar a página do modal */
  padding: 18px 12px calc(var(--app-footer-h) + 18px + env(safe-area-inset-bottom, 0px));
}

/* garante que o modal não passe da altura da viewport */
.modal-backdrop .modal{
  margin: 12px auto;
  max-height: calc(100vh - 36px - var(--app-footer-h) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;          /* o scroll fica na área .mb */
}


/* área do conteúdo do modal rola */
.modal-backdrop .modal .mb{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}


/* =========================
   App Footer (injetado via JS)
   ========================= */
:root{
  --app-footer-h: 56px;
}

body.hasAppFooter{
  padding-bottom: calc(var(--app-footer-h) + env(safe-area-inset-bottom, 0px));
}


/* =========================
   Toasts acima do footer
   (Bootstrap / containers comuns)
   ========================= */

/* Bootstrap 5: .toast-container (geralmente position-fixed + bottom-0) */
.toast-container{
  z-index: 10080; /* acima do footer (10040) */
}

/* Se estiver usando classes bottom-0, sobe o container */
.toast-container.bottom-0,
.toast-container.position-fixed.bottom-0,
.toast-container.position-fixed.start-0.bottom-0,
.toast-container.position-fixed.end-0.bottom-0{
  bottom: calc(var(--app-footer-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Alguns projetos usam IDs/containers próprios */
#toastContainer,
#toasts,
.toast-stack{
  z-index: 10080;
  bottom: calc(var(--app-footer-h) + 12px + env(safe-area-inset-bottom, 0px)) !important;
}


.appFooter{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10040;
  border-top: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.appFooter .inner{
  max-width: 1050px;
  margin: 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.appFooter .footLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}

.appFooter .footLogo{
  height: 28px;
  width: auto;
  display:block;
}

.appFooter .footApp{
  display:flex;
  flex-direction:column;
  line-height:1.1;
  min-width: 0;
}

.appFooter .footAppName{
  font-weight: 1000;
  color: var(--rodasc-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(520px, calc(100vw - 220px));
}

.appFooter .brandInfoLink{
  border: 0;
  background: transparent;
  padding: 0;
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
  border-radius: 0;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.appFooter .brandInfoLink:hover{
  color: var(--rodasc-blue);
  text-decoration: underline;
}

.appFooter .brandInfoLink .regMark{
  font-weight: 1000;
}

.appFooter .supportLink{
  border: 0;
  background: transparent;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 1000;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow:none;
  border-radius:0;
  white-space: nowrap;
}
.appFooter .supportLink:hover{
  color: var(--rodasc-blue);
  text-decoration: underline;
}
.appFooter .supportLink .bi{
  font-size: 16px;
  line-height: 1;
}




.appFooter .footLink:hover{
  background: #fff;
  color: var(--rodasc-blue);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}
.appFooter .footLink .bi{ font-size: 15px; line-height: 1; }


.appFooter .footBtn:hover{
  background:#fff;
  color: var(--rodasc-blue);
  box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.appFooter .footPopover{
  position: absolute;
  left: 14px;
  right: auto;
  bottom: calc(100% + 10px);
  width: min(340px, calc(100vw - 28px));
}
.appFooter .popCard{
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  padding: 12px 12px;
}
.appFooter .popTitle{
  font-weight: 1000;
  color: var(--rodasc-blue);
  margin-bottom: 6px;
}
.appFooter .popRow{
  font-size: 13px;
  color: var(--text);
  margin-top: 6px;
}
.appFooter .popRow b{
  color: var(--muted);
  font-weight: 900;
  margin-right: 6px;
}
.appFooter .popRow a{
  color: var(--rodasc-blue);
  text-decoration: none;
  font-weight: 900;
}
.appFooter .popMini{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 520px){
  .appFooter .footAppName{
    max-width: min(320px, calc(100vw - 180px));
  }
  .appFooter .footPopover{
    left: 50%;
    transform: translateX(-50%);
  }
}

/* =========================
   Anti-flicker do Auth (evita piscar tela de login no reload)
   ========================= */
body.auth-pending #loginCard,
body.auth-pending #appArea,
body.auth-pending #userbox{
  display:none !important;
}


.badge.CLOSED{
  background:#f1f5f9;
  border-color:#cbd5e1;
  color:#0f172a;
}
