/* ==========================================================================
   AXIONMESK — Home quando logado
   Arquivo limpo, sem regras conflitantes.
   ========================================================================== */

/* ---------- Saudação ---------- */
.hero__title--user {
  font-size: clamp(24px, 6vw, 34px) !important;
  line-height: 1.2 !important;
  margin: 0 0 6px !important;
  text-align: left !important;
}

.hero__subtitle {
  font-size: 14px;
  color: #8b93a1;
  margin: 0 0 18px;
  line-height: 1.5;
  text-align: left;
}

/* ---------- Grade de atalhos ---------- */
.hero__quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.hero__quick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 9px;
  padding: 14px;
  min-height: 108px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
  color: #F5F7FA;
  transition: transform .14s ease, background .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero__quick-item:active {
  transform: scale(.97);
  background: rgba(56,107,255, .13);
  border-color: rgba(56,107,255, .33);
}

.hero__quick-item--primary {
  background: linear-gradient(140deg, rgba(56,107,255, .17), rgba(56,107,255, .045));
  border-color: rgba(56,107,255, .32);
}

/* ---------- Ícone ---------- */
.hero__quick-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  color: #386BFF;
  flex: 0 0 auto;
}
.hero__quick-item--primary .hero__quick-ico {
  background: linear-gradient(140deg, #5C86FF, #386BFF);
  color: #221900;
}
.hero__quick-ico svg { width: 19px; height: 19px; }

/* ---------- Texto ---------- */
.hero__quick-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

.hero__quick-txt b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #F5F7FA;
  white-space: normal;
  word-break: break-word;
}

.hero__quick-txt small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.32;
  color: #8b93a1;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: visible;
  text-overflow: clip;
}

/* ---------- Cabeçalho de seção ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 0 2px;
  margin: 0 0 12px;
}

.section-head .section-title,
.section-head h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-head a {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #386BFF;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* ---------- Desktop: 4 colunas ---------- */
@media (min-width: 901px) {
  .hero__quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__quick-item { min-height: 118px; }
}

/* ---------- Celular pequeno: 1 coluna horizontal ---------- */
@media (max-width: 360px) {
  .hero__quick { grid-template-columns: 1fr; }
  .hero__quick-item {
    flex-direction: row;
    align-items: center;
    min-height: 76px;
    gap: 12px;
    padding: 12px;
  }
  .section-head .section-title,
  .section-head h2 { font-size: 16.5px; }
}

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__quick-item { transition: none !important; }
  .hero__quick-item:active { transform: none !important; }
}

/* ==========================================================================
   Espaço para a bottom nav não cobrir a seção "Mercados em alta"
   ========================================================================== */
@media (max-width: 900px) {
  body:not(.auth-page) main,
  body:not(.auth-page) .page-body,
  body:not(.auth-page) > section:last-of-type {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* A seção de mercados ganha respiro próprio */
  .markets,
  .markets-section,
  .section-markets {
    padding-bottom: 16px !important;
    margin-bottom: 6px !important;
  }

  /* O título nunca fica sob a nav */
  .section-head {
    position: relative;
    z-index: 1;
  }
}

/* ===== CORRECAO FINAL: barra PWA acima da bottom nav ===== */
@media (max-width: 900px) {
  .pwa-install-bar {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1100 !important;
  }
  #bottomNav.bottom-nav { z-index: 1000 !important; }
  .mais-fundo { pointer-events: none; }
  .mais-fundo.aberto { pointer-events: auto; }
}

/* ==========================================================================
   Saudacao discreta (hero logado simplificado)
   ========================================================================== */
.hero__greeting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #386BFF;
  background: rgba(56,107,255, .09);
  border: 1px solid rgba(56,107,255, .22);
  border-radius: 99px;
  padding: 6px 14px;
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -.01em;
}

/* Esconde os cards de atalho (nao mais usados) */
.hero__quick { display: none !important; }
.hero__subtitle { display: none !important; }

@media (max-width: 900px) {
  .hero__greeting {
    font-size: 13px;
    padding: 6px 13px;
    margin-bottom: 14px;
  }
}

/* ==========================================================================
   Prefixo do campo: "R$" no lugar de "+55" quando logado
   ========================================================================== */
.field__prefix--currency {
  color: #386BFF !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  letter-spacing: -.01em;
  padding-right: 12px !important;
  border-right: 1px solid rgba(56,107,255, .28) !important;
  margin-right: 12px !important;
}

/* Input de valor com números tabulares */
.field__input[inputmode="decimal"] {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .01em;
}

@media (max-width: 900px) {
  .field__prefix--currency {
    font-size: 15.5px !important;
    padding-right: 10px !important;
    margin-right: 10px !important;
  }
}
