.account-screen-shell {
  min-height: calc(100vh - 118px);
  display: grid;
}

.auth-shell {
  display: grid;
  gap: 22px;
  width: min(100%, 680px);
  min-height: min(78vh, 760px);
  align-content: center;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 46px);
}

.auth-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auth-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.auth-switch {
  border: 0;
  min-height: 54px;
  padding: 15px 18px;
  border-radius: 20px;
  color: #44617f;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-switch:hover {
  transform: translateY(-1px);
}

.auth-switch.active {
  color: #274864;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 20px rgba(49, 74, 122, 0.08);
}

.auth-grid,
.account-grid {
  grid-template-columns: 1fr;
}

.auth-panel,
.auth-side-panel {
  align-self: start;
}

.auth-grid {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.auth-panel {
  width: 100%;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 34px);
  border-radius: 30px;
}

.auth-panel form {
  display: grid;
  gap: 18px;
}

.auth-panel .field {
  margin-bottom: 0;
}

.auth-panel .field span {
  display: block;
  margin: 0 0 10px 4px;
  color: #203b5c;
  font-size: 15px;
  font-weight: 900;
}

.auth-panel input {
  min-height: 64px;
  border-radius: 24px;
  padding: 18px 20px;
  color: #102946;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 255, 0.82));
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(49, 74, 122, 0.08);
}

.auth-panel input::placeholder {
  color: rgba(97, 114, 141, 0.64);
  font-weight: 650;
}

.auth-panel .stack-actions {
  display: grid;
  gap: 12px;
}

.auth-panel .btn {
  width: 100%;
  min-height: 60px;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 900;
  box-shadow:
    0 18px 34px rgba(10, 132, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.auth-mini-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

#authScreen .auth-panel form,
#authScreen .auth-panel .field,
#authScreen .auth-panel .stack-actions,
#authScreen .auth-panel input,
#authScreen .auth-panel .btn {
  width: 100%;
}

#authScreen .auth-panel .stack-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-content: stretch;
}

#authScreen .auth-panel .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.account-simple-panel {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.account-member-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.account-member-stack > .panel-title {
  max-width: 620px;
  width: 100%;
  margin: 0 auto 2px;
}

.account-session-card {
  display: grid;
  gap: 14px;
}

.account-email-row {
  display: grid;
  gap: 6px;
}

.account-email-row span,
.account-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-email-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-metric {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.account-metric strong {
  display: block;
  margin-top: 6px;
  color: #16365f;
  font-size: 20px;
  line-height: 1;
}

.account-meta-line {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-action-row {
  width: 100%;
}

.account-action-row .btn {
  width: 100%;
  min-height: 44px;
  padding-top: 12px;
  padding-bottom: 12px;
}

#appDownloadCard {
  margin-top: 2px;
}

.account-download-card {
  display: grid;
  gap: 16px;
}

.account-download-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.account-download-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #34a1ff 0%, #0a84ff 58%, #64d2ff 100%);
  box-shadow: 0 14px 28px rgba(10, 132, 255, 0.2);
}

.account-download-head h3 {
  margin-bottom: 4px;
}

.account-download-notes {
  padding: 13px 14px;
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  white-space: pre-wrap;
}

.account-download-button {
  width: 100%;
  min-height: 44px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.account-guest-view {
  display: grid;
  place-items: center;
  min-height: 100%;
  width: 100%;
  padding: 0;
}

.account-login-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(84vw, 360px);
  min-height: 132px;
  padding: 28px 32px;
  border: 0;
  border-radius: 34px;
  color: #ffffff;
  text-decoration: none;
  font: inherit;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(180deg, #36a4ff 0%, #0a84ff 100%);
  box-shadow:
    0 24px 48px rgba(10, 132, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-status-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.me-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 1080px) {
  .auth-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767px) {
  .account-screen-shell {
    min-height: calc(100vh - 108px);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .account-guest-view {
    min-height: calc(100vh - 108px);
  }

  .account-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-member-stack {
    gap: 16px;
  }

  .account-metric {
    padding: 11px 8px;
  }

  .account-metric strong {
    font-size: 18px;
  }
}
