.app-body [hidden],
.app-body [hidden=""],
.app-body .app-footer-nav[hidden],
.app-body .app-drawer-backdrop[hidden] {
  display: none !important;
}

.app-body [hidden],
.app-body [hidden=""],
.app-body .app-bottom-nav[hidden],
.app-body .app-drawer-backdrop[hidden] {
  display: none !important;
}

.app-body {
  background: #f6f7fb;
  min-height: 100vh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); /* espaço para footer nav */
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-brand-logo { height: 28px; width: auto; display: block; }
.app-brand-title { font-family: var(--font); font-weight: 800; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
}
.app-menu-btn span { height: 2px; width: 100%; background: #222; border-radius: 2px; display: block; }

.app-logout-btn {
  border: 1px solid #eee;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.app-main { padding: 16px; max-width: 980px; margin: 0 auto; }

/* Cartão DeliLife: container que “escapa” do padding para o cartão não ficar estreito no mobile */
#screen-cartao .dl-card-viewport {
  margin-top: 12px;
  margin-left: -32px;
  margin-right: -32px;
  width: calc(100% + 64px);
  max-width: none;
  box-sizing: border-box;
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
}

.app-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.app-h1 { margin: 0 0 10px; font-size: 1.35rem; color: var(--dark); }
.app-muted { margin: 0 0 14px; color: var(--gray); }
.app-small { margin: 12px 0 0; font-size: 0.92rem; color: var(--gray); }
.app-small a { color: var(--red); font-weight: 700; }

.app-form { max-width: 520px; }
.app-label { display: block; font-weight: 700; margin: 10px 0 6px; }
.app-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
}
.app-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12); }

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

.app-panel {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
}
.app-panel-title { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #666; }
.app-panel-body { margin-top: 8px; font-weight: 700; }

.app-list { display: grid; gap: 10px; margin: 12px 0 14px; }
.app-item {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.app-item-title { font-weight: 800; margin: 0 0 6px; }
.app-item-sub { margin: 0; color: var(--gray); }
.app-item-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  text-decoration: none;
  font-weight: 800;
  color: var(--dark);
  background: #fff;
}
.app-link.primary { background: var(--red); color: #fff; border-color: var(--red); }

.app-kv { display: grid; gap: 10px; }
.app-kv-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f1f1; }
.app-kv-key { color: #666; font-weight: 800; }
.app-kv-val { font-weight: 700; word-break: break-word; }
@media (max-width: 520px) {
  .app-kv-row { grid-template-columns: 1fr; }
}

.app-footer-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 70px;
  width: 100%;
}

.app-footer-item {
  flex: 1;
  text-align: center;
  color: #999;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
  background: transparent;
  border: 0;
  padding: 8px 6px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.app-footer-item:focus {
  outline: none;
}

.app-footer-item:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.35);
  outline-offset: 2px;
  border-radius: 14px;
}

.app-footer-item .icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.app-footer-item.active {
  color: var(--red);
  font-weight: 600;
  background: rgba(196, 30, 58, 0.06);
  border-radius: 14px;
}

.app-footer-item span {
  line-height: 1.1;
}

.app-footer-item:active {
  transform: scale(0.95);
}

.app-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
}
.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  width: min(320px, 88vw);
  background: #fff;
  z-index: 310;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
}
.app-drawer.open { transform: translateX(0); }
.app-drawer-header { padding: 16px; border-bottom: 1px solid #eee; }
.app-user { display: flex; gap: 12px; align-items: center; }
.app-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.app-user-name { font-weight: 900; }
.app-user-sub { color: #666; font-weight: 700; font-size: 0.9rem; }
.app-drawer-nav { padding: 10px; display: grid; gap: 8px; }
.app-nav-item {
  width: 100%;
  text-align: left;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  font-weight: 900;
  cursor: pointer;
}
.app-nav-item.is-active { border-color: var(--red); color: var(--red); background: rgba(196,30,58,0.06); }

/* Banner "plano não ativo" (vermelho com X) */
.cadastro-feedback.is-danger {
  background: var(--red);
  border: 1px solid var(--red-dark);
  color: #fff;
}

.cadastro-feedback.is-danger a {
  color: #fff;
  font-weight: 900;
  text-decoration: underline;
}

.app-plan-alert {
  position: relative;
  padding-right: 46px; /* espaço para o X */
}

.app-plan-alert-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.app-plan-alert-x:hover {
  background: rgba(255,255,255,0.24);
}

.academia-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0 10px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.academia-qr-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.academia-qr-meta {
  text-align: center;
  font-weight: 800;
  color: var(--dark, #0f172a);
  margin: 0 0 6px;
}
.academia-qr-hint {
  text-align: center;
  font-size: 0.9rem;
  margin: 0;
}

/* Intro em vídeo (abertura do app) */
html.app-intro-done .app-intro {
  display: none !important;
}

.app-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6A1915;
  pointer-events: auto;
  isolation: isolate;
}

.app-intro.is-leaving {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-intro__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  /* Preto do vídeo vira transparente e mostra o #6A1915 do container */
  mix-blend-mode: lighten;
}

.app-intro__skip {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 2;
  isolation: isolate;
  mix-blend-mode: normal;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.app-intro__skip:hover,
.app-intro__skip:focus-visible {
  background: rgba(196, 18, 48, 0.92);
  outline: none;
}


