/* App WebView pages: login + cabinet */
.app-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-top {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 72px 20px 32px;
}

.app-card {
  width: min(420px, 100%);
  border-radius: 24px;
  padding: 28px 22px 24px;
}

.app-brand {
  text-align: center;
  margin-bottom: 22px;
}

.app-brand h1 {
  margin: 14px 0 8px;
  font-size: 1.45rem;
}

.app-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.app-brand--compact {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.app-brand--compact h1 {
  margin: 2px 0 8px;
  font-size: 1.25rem;
}

.cabinet-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.logo__mark--lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto;
}

.logo__mark--lg .logo__img {
  width: 52px;
  height: 52px;
}

.pill-free {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.login-users {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.login-users strong {
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.login-users__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 11px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab.is-active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}

.wallet-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
}

.wallet-box__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wallet-lead {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.wallet-ok {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent-2);
}

#walletForm .btn,
#walletConnected .btn {
  width: 100%;
  margin-top: 4px;
}

.wallet-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
}

.wallet-status.is-on {
  color: #0f766e;
  background: rgba(45, 212, 191, 0.15);
  border-color: rgba(45, 212, 191, 0.35);
}

[data-theme="dark"] .wallet-status.is-on {
  color: #5eead4;
}

.wallet-address {
  display: block;
  word-break: break-all;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.82rem;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  color: var(--text);
}

.cabinet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.cabinet-actions .btn {
  text-align: center;
  text-decoration: none;
}

@media (max-width: 420px) {
  .cabinet-actions {
    grid-template-columns: 1fr;
  }
}
