.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: enter 0.28s ease both;
}

.identity-card {
  padding: 4px 17px 17px;
}

.identity-line {
  justify-content: space-between;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.identity-line span {
  color: var(--muted);
}

.identity-line strong {
  max-width: 62%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  color: #06111e;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
}

.portal-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.security-note {
  margin: 14px 8px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 14px;
  display: flex;
  width: min(calc(100% - 28px), 592px);
  margin: auto;
  padding: 7px;
  border: 1px solid rgba(154, 195, 230, 0.16);
  border-radius: 22px;
  background: rgba(8, 20, 34, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(22px);
}

.nav-item {
  display: grid;
  flex: 1;
  gap: 3px;
  place-items: center;
  padding: 7px;
  border: 0;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.nav-item span {
  font-size: 18px;
}

.nav-item.active {
  color: var(--cyan);
  background: rgba(115, 240, 223, 0.08);
}

.state-card {
  margin-top: 18vh;
  padding: 32px 24px;
  text-align: center;
}

.state-card h2 {
  margin: 14px 0 8px;
}

.state-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.state-icon,
.loader {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: auto;
  border-radius: 50%;
}

.state-icon {
  color: var(--gold);
  background: rgba(255, 211, 122, 0.1);
  font-size: 24px;
  font-weight: 900;
}

.loader {
  border: 2px solid rgba(81, 184, 255, 0.14);
  border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}

.empty {
  padding: 28px 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.hidden {
  display: none !important;
}

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

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 520px) {
  .app-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
