/* ENTELΞKRON — Trust Platform app shell (mobile PWA) */
.app-shell {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  background: var(--white);
}

.app-hero {
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px;
  text-align: center;
}

.app-hero img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-md);
}

.app-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 10px;
}

.app-hero .lead {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
  margin: 0 auto 16px;
}

.app-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid rgba(0, 102, 204, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
  background: var(--blue-light);
}

.app-stage-notice {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--silver);
  border: 1px solid var(--border);
}

.app-lang-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.app-lang-wrap select {
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}

.app-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.app-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.app-action-card:hover {
  text-decoration: none;
  border-color: rgba(0, 102, 204, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.app-action-card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--blue-light), rgba(0, 102, 204, 0.06));
  border-color: rgba(0, 102, 204, 0.25);
}

.app-action-card .icon {
  font-size: 1.1rem;
  color: var(--blue);
}

.app-action-card strong {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.app-action-card span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.app-section {
  padding: 8px 20px 28px;
  max-width: 640px;
  margin: 0 auto;
}

.app-section h2 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

.install-steps {
  display: grid;
  gap: 12px;
}

.install-step {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--silver);
  border: 1px solid var(--border);
}

.install-step h3 {
  font-size: 0.9rem;
  margin: 0 0 6px;
  color: var(--navy);
}

.install-step p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

#pwa-install-btn {
  margin-top: 8px;
}

#pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 102, 204, 0.25);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  color: var(--text);
}

#pwa-install-banner[hidden],
#pwa-install-btn[hidden],
#pwa-ios-hint[hidden] {
  display: none !important;
}

.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.app-tabbar a.active,
.app-tabbar a:hover {
  color: var(--blue);
  text-decoration: none;
}

.app-tabbar svg {
  width: 20px;
  height: 20px;
}

.app-site-link {
  text-align: center;
  padding: 0 20px 24px;
  font-size: 0.85rem;
  color: var(--muted);
}

.app-site-link a {
  color: var(--blue);
  text-decoration: underline;
}

.app-install-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .app-tabbar {
    display: none;
  }

  .app-shell {
    padding-bottom: 40px;
  }

  #pwa-install-banner {
    bottom: 20px;
    max-width: 420px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}
