
html.native-app {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

html.native-app body {
  overscroll-behavior-y: contain;
  touch-action: manipulation;
}

[id="app-splash"] {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(160deg, var(--bg-soft), var(--surface));
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

html.apk-shell.parent-theme [id="app-splash"] {
  background: linear-gradient(160deg, var(--bg-soft), var(--surface));
}

html.apk-shell.driver-theme [id="app-splash"],
html.native-app.driver-theme [id="app-splash"] {
  background: linear-gradient(160deg, var(--bg-soft), var(--surface));
}

[id="app-splash"].hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

[id="app-splash"] strong {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.app-splash-tag {
  font-size: 0.85rem;
  opacity: 0.85;
}

.app-splash-spinner {
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgb(234, 179, 8);
  border-radius: 50%;
  animation: sb-spin 0.75s linear infinite;
}

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

.smartbus-toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 25000;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: rgb(248, 250, 252);
  font: 600 0.8rem system-ui, sans-serif;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.smartbus-toast.hidden {
  opacity: 0;
  pointer-events: none;
}

.smartbus-update-overlay {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.smartbus-update-overlay.hidden {
  display: none;
}

.smartbus-apk-update.hidden {
  display: none;
}

.smartbus-apk-update {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26000;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: rgb(15, 23, 42);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.25);
  font: 600 0.85rem system-ui, sans-serif;
}

.smartbus-apk-update-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.smartbus-apk-update button {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.smartbus-update-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  min-width: 220px;
}

.smartbus-update-card p {
  margin: 12px 0 0;
  font: 600 0.95rem system-ui, sans-serif;
  color: var(--text);
}

.smartbus-update-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid rgb(226, 232, 240);
  border-top-color: rgb(234, 179, 8);
  border-radius: 50%;
  animation: sb-spin 0.7s linear infinite;
}

html.native-app .login-wrap {
  min-height: 100dvh;
}

html.native-app.standalone .min-h-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
