.account-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.1), transparent 40%),
    linear-gradient(180deg, #04070f 0%, #0a1220 55%, #070b14 100%);
  color: var(--text);
}

html:has(body.account-page),
body.account-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.account-page [hidden] {
  display: none !important;
}

.account-shell {
  width: min(440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.account-shell:has(#account-dashboard:not([hidden])) {
  width: min(920px, calc(100vw - 32px));
}

.account-header,
.account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-header {
  justify-content: space-between;
  margin-bottom: 28px;
}

.account-header__end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-brand {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.account-discord {
  color: rgba(226, 232, 240, 0.78);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.account-discord:hover {
  color: #fff;
  border-bottom-color: rgba(88, 101, 242, 0.7);
}

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

.account-auth__panel {
  padding: 28px 26px 24px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(165deg, rgba(18, 28, 48, 0.96), rgba(8, 14, 26, 0.94));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.account-auth__title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.account-auth__lead {
  margin: 0 0 22px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
}

.account-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(8, 14, 28, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.account-form,
.account-panel {
  display: grid;
  gap: 10px;
}

.account-form .account-label:not(:first-child) {
  margin-top: 4px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.account-title {
  margin-bottom: 8px;
}

.account-meta,
.account-help,
.account-status {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.account-status {
  min-height: 1.25em;
  text-align: center;
}

.account-status.is-error {
  color: #fca5a5;
}

.account-label {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.account-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(4, 8, 18, 0.8);
  color: var(--text);
}

.account-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16);
}

.account-submit,
.account-link-btn {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.account-submit {
  margin-top: 12px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #04101f;
}

.account-submit:hover {
  filter: brightness(1.06);
}

.account-submit--secondary,
.account-link-btn {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--panel-border);
  color: var(--text);
}

.account-link-btn--danger {
  color: #fca5a5;
}

.account-link-btn--admin {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.account-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 18px;
}

.account-panel h2 {
  font-size: 1rem;
  color: #7dd3fc;
}

.account-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}

.account-switch__btn {
  border: none;
  background: none;
  color: #7dd3fc;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-switch__btn:hover {
  color: #bae6fd;
}
