.auth-card {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(105, 240, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.auth-card-label,
.auth-card-meta,
.auth-card-grid span,
.auth-card-roles,
.auth-state-kicker,
.auth-state-detail {
  color: rgba(238, 246, 255, 0.68);
}

.auth-card-label,
.auth-state-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card-name {
  margin: 12px 0 4px;
  font-size: 22px;
  line-height: 1.1;
}

.auth-card-meta,
.auth-card-roles {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.auth-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.auth-card-grid div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-card-grid span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-card-grid strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: #eef6ff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.logout-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-state-page {
  min-height: 100vh;
}

.login-page {
  background:
    linear-gradient(90deg, rgba(126, 92, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(126, 92, 255, 0.08) 1px, transparent 1px),
    radial-gradient(1200px 760px at 12% 0%, rgba(124, 92, 255, 0.2), transparent 55%),
    radial-gradient(980px 680px at 88% 8%, rgba(105, 240, 255, 0.12), transparent 58%),
    linear-gradient(180deg, #070910, #0b1020);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  background-position: center;
}

.auth-state-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-state-card {
  position: relative;
  width: min(100%, 560px);
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12, 17, 34, 0.94), rgba(10, 14, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  color: #eef6ff;
}

.auth-state-card h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.auth-state-message {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(238, 246, 255, 0.9);
}

.auth-state-detail {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.auth-state-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #07111d;
  font-weight: 800;
  background: linear-gradient(135deg, #69f0ff, #5cf2a2);
}

button.auth-state-action,
.terms-decline-button {
  cursor: pointer;
}

.login-shell {
  gap: 28px;
  align-content: start;
  padding: 22px 32px 40px;
}

.login-card {
  width: min(100%, 520px);
}

.login-card-wide {
  width: min(100%, 1200px);
}

.login-hero {
  width: min(100%, 1080px);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding-top: 4px;
}

.login-brand {
  display: inline-flex;
  justify-content: center;
}

.login-brand-logo {
  display: block;
  width: min(100%, 408px);
  height: auto;
  filter: invert(1) brightness(2);
}

.login-hero-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  color: rgba(238, 246, 255, 0.94);
}

.login-hero-subtitle {
  margin: 0;
  max-width: 52rem;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(238, 246, 255, 0.72);
}

.login-layout {
  width: min(100%, 1220px);
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

/* Sign-in only (no self-signup panel): one centred card. */
.login-grid.login-grid--single {
  grid-template-columns: minmax(0, 600px);
  justify-content: center;
}

.login-panel-card {
  width: 100%;
  min-width: 0;
  padding: 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 240, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(12, 17, 34, 0.95), rgba(10, 14, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 56px rgba(0, 0, 0, 0.28);
}

.login-panel-alt {
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 242, 162, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(12, 15, 31, 0.98));
}

.login-section-title {
  margin: 10px 0 12px;
  font-size: 28px;
  line-height: 1.05;
}

.signup-value-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.signup-value-pill {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.signup-value-pill strong {
  font-size: 15px;
  color: #f0fbff;
}

.signup-value-pill span {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(238, 246, 255, 0.78);
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.login-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 246, 255, 0.72);
}

.login-input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #eef6ff;
  font: inherit;
}

.login-input:focus {
  outline: 2px solid rgba(105, 240, 255, 0.44);
  outline-offset: 2px;
}

.login-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(186, 61, 48, 0.16);
  border: 1px solid rgba(186, 61, 48, 0.26);
  color: #ffd6d1;
  line-height: 1.5;
}

.login-notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.5;
}

.login-notice-info {
  background: rgba(76, 130, 220, 0.18);
  border: 1px solid rgba(76, 130, 220, 0.28);
  color: #dce9ff;
}

.login-notice-warning {
  background: rgba(201, 106, 17, 0.18);
  border: 1px solid rgba(201, 106, 17, 0.28);
  color: #ffe5c8;
}

.login-notice-error {
  background: rgba(186, 61, 48, 0.16);
  border: 1px solid rgba(186, 61, 48, 0.26);
  color: #ffd6d1;
}

.login-submit {
  width: 100%;
  margin-top: 8px;
  border: 0;
  cursor: pointer;
}

.signup-form {
  margin-top: 18px;
}

.login-support-card {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-support-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-support-card p {
  margin: 0 0 14px;
  color: rgba(238, 246, 255, 0.78);
  line-height: 1.6;
}

.otp-delivery-meta {
  font-size: 14px;
  color: rgba(190, 225, 255, 0.7);
}

.otp-inline-support {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.otp-inline-support p {
  margin: 0 0 12px;
  color: rgba(238, 246, 255, 0.78);
  line-height: 1.6;
}

.otp-delivery-alert {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(201, 106, 17, 0.16);
  border: 1px solid rgba(201, 106, 17, 0.3);
  color: #ffe5c8;
}

.otp-delivery-alert strong {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.otp-delivery-alert span {
  line-height: 1.55;
}

.otp-resend-form {
  margin-top: 0;
}

.otp-resend-button[disabled],
.otp-resend-button[aria-disabled="true"] {
  opacity: 0.72;
  cursor: not-allowed;
}

.terms-card {
  width: min(100%, 980px);
}

.terms-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.terms-version-pill {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(76, 130, 220, 0.14);
  border: 1px solid rgba(145, 209, 255, 0.16);
  color: rgba(235, 247, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terms-card-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.terms-card-meta div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.terms-card-meta span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(238, 246, 255, 0.62);
}

.terms-card-meta strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  color: #eef6ff;
}

.terms-document {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(145, 209, 255, 0.08);
  color: rgba(238, 246, 255, 0.9);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 0 0 14px;
  line-height: 1.15;
  color: #f4fbff;
}

.markdown-body h1 {
  font-size: 28px;
}

.markdown-body h2 {
  margin-top: 30px;
  font-size: 22px;
}

.markdown-body h3 {
  margin-top: 24px;
  font-size: 18px;
}

.markdown-body p,
.markdown-body li {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(238, 246, 255, 0.84);
}

.markdown-body p {
  margin: 0 0 14px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(145, 209, 255, 0.12);
  color: #cbf1ff;
  font-size: 0.92em;
}

.markdown-body a {
  color: #77f0dc;
}

.terms-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.terms-preview-note {
  margin-top: 18px;
}

.terms-actions form {
  margin: 0;
}

.terms-accept-button {
  margin-top: 0;
  min-width: 280px;
}

.terms-decline-button {
  margin-top: 0;
  min-width: 240px;
  border: 0;
  cursor: pointer;
}

.login-inline-form {
  gap: 8px;
}

.login-inline-submit {
  margin-top: 8px;
}

.market-flag {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
}

.market-flag::before,
.market-flag::after {
  content: "";
  position: absolute;
}

.market-flag--dk {
  background: #c60c30;
}

.market-flag--dk::before {
  top: 0;
  bottom: 0;
  left: 31%;
  width: 12%;
  background: #ffffff;
}

.market-flag--dk::after {
  left: 0;
  right: 0;
  top: 44%;
  height: 12%;
  background: #ffffff;
}

.login-footer {
  padding: 8px 16px 18px;
  text-align: center;
}

.login-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.login-footer-support {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: rgba(105, 240, 255, 0.48);
  text-underline-offset: 4px;
}

.login-footer-support:hover {
  color: #ffffff;
  text-decoration-color: rgba(105, 240, 255, 0.9);
}

.login-footer-support:focus-visible {
  outline: 2px solid rgba(105, 240, 255, 0.72);
  outline-offset: 5px;
  border-radius: 4px;
}

.login-footer-legal {
  padding-top: 10px;
}

.legal {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.legal-flag {
  display: inline-flex;
  vertical-align: -2px;
  margin: 0 6px 0 4px;
  width: 18px;
  height: 13px;
  border-radius: 4px;
}

.muted {
  color: rgba(255, 255, 255, 0.6);
}

.dot {
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 980px) {
  .auth-card-grid {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding-inline: 22px;
  }

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

  .terms-card-head,
  .terms-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .terms-card-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .login-panel-card {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .login-shell {
    gap: 22px;
    padding: 16px 16px 28px;
  }

  .login-brand-logo {
    width: min(100%, 300px);
  }

  .login-panel-card {
    padding: 24px 22px;
    border-radius: 24px;
  }

}
