/* NadaFFA app_web — moldura central 800px + laterais decorativas (desktop) */

:root {
  --nf-web-max-width: 800px;
  --nf-web-frame-radius: 0px;
}

@media (min-width: 841px) {
  :root {
    --nf-web-frame-radius: 20px;
  }
}

body.nadaffa-web-app {
  background: #0f1430;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(79, 195, 247, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(13, 148, 136, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #0f1430 0%, #1a234e 42%, #121a3d 100%);
}

body.nadaffa-web-app::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.nf-web-stage {
  display: none;
}

@media (min-width: 841px) {
  .nf-web-stage {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  .nf-web-stage__aside {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc((100% - var(--nf-web-max-width)) / 2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.92);
  }

  .nf-web-stage__aside--left {
    left: 0;
    align-items: stretch;
    text-align: left;
    padding-left: 48px;
    padding-right: 24px;
  }

  .nf-web-stage__aside--right {
    right: 0;
    align-items: flex-start;
    padding-left: 56px;
  }

  .nf-web-stage__brand {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nf-web-stage__logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 22px;
  }

  .nf-web-stage__logo {
    display: block;
    width: auto;
    height: 76px;
    max-width: min(240px, 100%);
    margin: 0;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
  }

  .nf-web-stage__brand h1 {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .nf-web-stage__brand p {
    margin: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.78);
  }

  .nf-web-stage__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .nf-web-stage__features li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(226, 232, 240, 0.85);
  }

  .nf-web-stage__features .mdi {
    font-size: 20px;
    color: #4fc3f7;
  }

  .nf-web-stage__cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 260px;
  }

  .nf-web-stage__card {
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  }

  .nf-web-stage__card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
    color: #fff;
  }

  .nf-web-stage__card span {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.72);
  }

  .nf-web-stage__card--accent {
    border-color: rgba(79, 195, 247, 0.35);
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
  }
}

.nf-web-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--nf-web-max-width);
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 841px) {
  .nf-web-frame {
    margin-top: 0;
    margin-bottom: 0;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 24px 80px rgba(0, 0, 0, 0.45),
      0 0 120px rgba(79, 195, 247, 0.08);
    border-radius: var(--nf-web-frame-radius);
    overflow: hidden;
  }

  body.nadaffa-web-app #app {
    border-radius: var(--nf-web-frame-radius);
    overflow: hidden;
  }
}

body.nadaffa-web-app #app {
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 841px) {
  body.nadaffa-web-app #nadaffaAppFooter.toolbar.toolbar-bottom.tabbar {
    left: 50% !important;
    right: auto !important;
    width: min(var(--nf-web-max-width), 100%) !important;
    max-width: var(--nf-web-max-width);
    transform: translateX(-50%) !important;
    border-radius: 0 0 var(--nf-web-frame-radius) var(--nf-web-frame-radius);
  }

  body.nadaffa-web-app #nadaffaAppFooter .toolbar-inner {
    border-radius: 0 0 var(--nf-web-frame-radius) var(--nf-web-frame-radius);
  }
}

/* Alertas F7 — acima da moldura 800px e laterais decorativas */
body.nadaffa-web-app > .dialog-backdrop.dialog-backdrop-in {
  z-index: 64999 !important;
  pointer-events: auto !important;
}

body.nadaffa-web-app > .dialog.nadaffa-f7-dialog.dialog-in,
body.nadaffa-web-app > .dialog.dialog-in {
  z-index: 65000 !important;
  pointer-events: auto !important;
}

body.nadaffa-web-app > .dialog.dialog-in .dialog-button {
  min-height: 44px;
  cursor: pointer;
  pointer-events: auto !important;
}

.nf-web-frame {
  isolation: isolate;
}

/* Popups produtos / overlay — centralizar na moldura em telas largas */
@media (min-width: 841px) {
  body.nadaffa-web-app.nf-produtos-open .nf-produtos-overlay {
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--nf-web-max-width), 100%);
    max-width: var(--nf-web-max-width);
  }
}
