/* Extras do site Firebase: carregamento, avisos e tutoriais. */
.toast-host {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 9999;
  display: grid;
  gap: 8px;
  max-width: 340px;
}

.toast {
  padding: 12px 14px;
  border-radius: 10px;
  background: #09255c;
  color: #fff;
  font-size: 0.84rem;
  box-shadow: 0 18px 38px -20px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.2s ease;
}

.toast--error { background: #b91c1c; }
.toast--success { background: #15803d; }
.toast.is-leaving { opacity: 0; transition: opacity 0.4s; }

@keyframes toast-in {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.loading-state {
  display: grid;
  place-items: center;
  min-height: 45vh;
  gap: 12px;
  color: #4b5d78;
  font-family: "Inter", system-ui, sans-serif;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe7f8;
  border-top-color: #0d5bd7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-card {
  min-height: 320px;
  border-radius: 20px;
  background: linear-gradient(100deg, #eef3fa 20%, #f8fbff 40%, #eef3fa 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.setup-banner {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  border: 1px solid #f0d9a6;
  border-left: 5px solid #f7be2b;
  border-radius: 14px;
  background: #fffaf0;
  font-family: "Inter", system-ui, sans-serif;
  color: #5a4600;
  line-height: 1.6;
}

.setup-banner h2 { margin: 0 0 8px; font-size: 1.1rem; }
.setup-banner code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f3e8c8;
  font-size: 0.85em;
}

/* ---------- Gráficos do dashboard ---------- */
.panel-grid--charts { grid-template-columns: 1.6fr 1fr; align-items: stretch; margin-bottom: 22px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart__grid { stroke: #e6edf7; stroke-width: 1; stroke-dasharray: 3 4; }
.chart__tick { font: 600 11px var(--sans); fill: #6b7c93; }
.chart rect { transition: opacity .15s; }
.chart rect:hover { opacity: .8; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--muted); }
.legend li strong { margin-left: auto; color: var(--navy-deep); font-weight: 800; }
.legend i { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend--row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; justify-content: center; }
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut svg { width: 170px; height: 170px; flex: none; }
.donut circle { transition: opacity .15s; }
.donut__value { font: 800 26px var(--display); fill: var(--navy-deep); }
.donut__label { font: 600 11px var(--sans); fill: #6b7c93; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hbars__top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 6px; color: var(--ink); }
.hbars__top strong { color: var(--muted); font-weight: 700; font-size: .78rem; white-space: nowrap; }
.hbars__track { height: 10px; background: #eaf0f8; border-radius: 99px; overflow: hidden; }
.hbars__fill { height: 100%; border-radius: 99px; }
.panel__mini { margin: 22px 0 12px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -22px; top: -22px; width: 84px; height: 84px; border-radius: 50%; background: var(--blue-soft); opacity: .7; }
.stat--blue::after { background: #dbeafe; } .stat--green::after { background: #dcfce7; } .stat--amber::after { background: #fef3c7; }
@media (max-width: 980px) { .panel-grid--charts { grid-template-columns: 1fr; } }


/* ---------- Aba e Cards de Parcerias ---------- */
.section--partners {
  background: linear-gradient(180deg, #f5f8fc 0%, #eaf1fb 100%);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.partner-grid__item {
  display: flex;
}

.partner-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  border: 1px solid #dde6f2;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(6, 26, 68, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 52px -22px rgba(6, 26, 68, 0.34);
}

.partner-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #09255c;
  overflow: hidden;
}

.partner-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.partner-card:hover .partner-card__media img {
  transform: scale(1.04);
}

.partner-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(5, 24, 66, 0.84);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.partner-card__star {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7be2b, #ffcb3d);
  color: #051842;
  font-size: 0.71rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.partner-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 20px 22px 22px;
}

.partner-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #09255c;
}

.partner-card__benefit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.partner-card__desc {
  margin: 0;
  color: #4b5d78;
  font-size: 0.91rem;
  line-height: 1.58;
  flex: 1;
}

.partner-card__addr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  color: #586982;
  font-size: 0.82rem;
  font-weight: 600;
}

.partner-card__addr svg {
  width: 15px;
  height: 15px;
  color: #0d5bd7;
  flex: none;
}

.partner-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #edf2f9;
}

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

.partner-card__media {
  display: block;
  text-decoration: none;
}

.partner-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s;
}

.partner-card__title a:hover {
  color: #0d5bd7;
}

.partner-card__cta {
  width: 100%;
  justify-content: center;
}

.partner-benefit-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 22px 0;
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  color: #78350f;
}

.partner-benefit-banner__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  flex: none;
}

.partner-benefit-banner strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  margin-bottom: 2px;
}

.partner-benefit-banner p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #451a03;
}

.partner-story {
  margin: 24px 0;
}

.partner-story h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.partner-map {
  margin-top: 28px;
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #dde6f2;
  box-shadow: 0 18px 40px -24px rgba(6, 26, 68, 0.22);
}

.partner-map__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.partner-map__eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0d5bd7;
  margin-bottom: 4px;
}

.partner-map__head h2 {
  font-size: 1.3rem;
  margin: 0;
}

.partner-map__head p {
  margin: 4px 0 0;
  color: #4b5d78;
  font-size: 0.9rem;
}

.partner-map__frame-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #dde6f2;
  background: #eef3fa;
}

.partner-map__frame {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.partner-aside-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}


/* ---------- PWA ("Adicionar à tela inicial") ---------- */
.pwa-install-btn {
  margin-top: 10px;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.pwa-install-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.admin-side__pwa-btn {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.admin-side__pwa-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.pwa-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 396px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #061d49;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 44px -16px rgba(5, 24, 66, 0.65);
  animation: toast-in 0.25s ease;
}

.pwa-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
  background: #051842;
}

.pwa-banner__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.pwa-banner__copy strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.pwa-banner__copy small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
}

.pwa-banner__cta {
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: #f7be2b;
  color: #051842;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.pwa-banner__cta:hover {
  background: #ffcb3d;
}

.pwa-banner__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.pwa-banner__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pwa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 24, 66, 0.68);
  backdrop-filter: blur(4px);
}

.pwa-modal__card {
  position: relative;
  width: min(100%, 420px);
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  color: #0f1f38;
  box-shadow: 0 28px 60px -18px rgba(5, 24, 66, 0.5);
}

.pwa-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #eef3fa;
  color: #09255c;
  font-size: 1.2rem;
  cursor: pointer;
}

.pwa-modal__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pwa-modal__head img {
  border-radius: 14px;
  flex: none;
}

.pwa-modal__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d5bd7;
}

.pwa-modal__head h3 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  color: #09255c;
}

.pwa-modal__steps {
  margin: 0 0 18px;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.5;
}

.pwa-share-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef3fa;
}

@media (max-width: 680px) {
  .pwa-banner {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
}

@media (display-mode: standalone) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-tap-highlight-color: transparent;
  }
}
