.forgot-username-page {
  min-height: 100dvh;
  padding: 34px 22px 44px;
  background:
    linear-gradient(180deg, rgba(8, 17, 29, 0.14), rgba(8, 17, 29, 0) 22%),
    linear-gradient(135deg, rgba(242, 140, 40, 0.06), transparent 26%),
    radial-gradient(960px 420px at 18% 6%, rgba(242, 140, 40, 0.08), transparent 52%),
    radial-gradient(960px 520px at 82% 8%, rgba(255, 255, 255, 0.12), transparent 56%);
}

.forgot-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.forgot-password-page [hidden],
.forgot-username-page [hidden] {
  display: none !important;
}

.forgot-hero,
.forgot-card {
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 42px rgba(8, 15, 28, 0.16);
  height: 100%;
}

.forgot-hero {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(18, 31, 52, 0.9), rgba(31, 49, 78, 0.86));
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.forgot-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(242, 140, 40, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%);
}

.forgot-brand,
.forgot-card > * {
  position: relative;
  z-index: 1;
}

.forgot-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.forgot-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #eef2f7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  object-fit: contain;
  object-position: center;
}

.forgot-brand-copy {
  display: grid;
  gap: 4px;
}

.forgot-brand-copy span {
  color: #f2c94c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.forgot-brand-copy strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.forgot-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(242, 140, 40, 0.12);
  border: 1px solid rgba(242, 140, 40, 0.28);
  color: #ffe3b6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.forgot-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.25vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.forgot-hero-intro,
.forgot-hero-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.65;
  max-width: 52ch;
}

.forgot-info-grid {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.forgot-info-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  position: relative;
  overflow: hidden;
}

.forgot-info-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 20px 0 0 20px;
  background: linear-gradient(180deg, var(--primary), #f2c94c);
}

.forgot-info-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #ffffff;
}

.forgot-info-list,
.forgot-info-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.65;
}

.forgot-info-list {
  padding-left: 18px;
}

.forgot-info-list li + li {
  margin-top: 6px;
}

.forgot-hero-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.forgot-card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(245, 248, 252, 0.92));
  position: relative;
  overflow: hidden;
}

.forgot-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #f2c94c, #f28c28, #ee7f17);
}

.forgot-card-header {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.forgot-card-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(242, 140, 40, 0.1);
  border: 1px solid rgba(242, 140, 40, 0.18);
  color: #ad5b13;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.forgot-card-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

.forgot-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.forgot-status {
  width: 100%;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.forgot-status[data-state="info"] {
  color: var(--info);
  background: var(--info-bg);
  border-color: var(--info-border);
}

.forgot-status[data-state="loading"] {
  color: var(--info);
  background: var(--loading-bg);
  border-color: rgba(59, 130, 246, 0.25);
}

.forgot-status[data-state="success"] {
  color: var(--success);
  background: var(--success-bg);
  border-color: var(--success-border);
}

.forgot-status[data-state="error"] {
  color: var(--error);
  background: var(--error-bg);
  border-color: var(--error-border);
}

.forgot-status-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.forgot-status-detail {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.forgot-form {
  display: grid;
  gap: 16px;
}

.forgot-form .field-group {
  display: grid;
  gap: 8px;
}

.forgot-form label {
  font-size: 14px;
  font-weight: 700;
  color: #243043;
}

.forgot-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.forgot-form input::placeholder {
  color: #94a3b8;
}

.forgot-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.forgot-form input[aria-invalid="true"] {
  border-color: var(--error-border);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.field-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.field-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}

.forgot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.forgot-actions .btn,
.forgot-success .btn {
  width: auto;
  min-width: 240px;
  margin-top: 0;
  min-height: 50px;
  padding-inline: 18px;
  font-size: 15px;
  font-weight: 900;
  color: #1b1306;
  background: linear-gradient(135deg, #f2c94c, #f28c28);
  border: 1px solid rgba(242, 140, 40, 0.18);
  box-shadow: 0 16px 34px rgba(242, 140, 40, 0.22);
}

.forgot-actions .btn:hover,
.forgot-success .btn:hover {
  background: linear-gradient(135deg, #f0bf3c, #ee7f17);
}

.forgot-link {
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
}

.forgot-link:hover,
.forgot-link:focus-visible {
  text-decoration: underline;
}

.forgot-support-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.86);
  color: #6b7280;
  line-height: 1.6;
}

.forgot-support-note strong {
  color: var(--text);
}

.forgot-success {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--success-border);
  background: rgba(236, 253, 243, 0.88);
}

.forgot-success h2 {
  margin: 0;
  font-size: 24px;
  color: var(--text);
}

.forgot-success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 960px) {
  .forgot-shell {
    grid-template-columns: 1fr;
  }

  .forgot-card {
    order: 0;
  }

  .forgot-hero {
    order: 1;
  }
}

@media (max-width: 640px) {
  .forgot-username-page {
    padding: 14px 12px 24px;
  }

  .forgot-shell {
    gap: 16px;
  }

  .forgot-hero,
  .forgot-card {
    border-radius: 24px;
  }

  .forgot-hero,
  .forgot-card {
    padding: 22px 18px;
  }

  .forgot-brand {
    align-items: flex-start;
    gap: 14px;
  }

  .forgot-brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .forgot-brand-copy strong {
    font-size: 16px;
  }

  .forgot-hero h1,
  .forgot-card-header h2 {
    font-size: 26px;
  }

  .forgot-hero-intro,
  .forgot-card-header p {
    font-size: 14px;
  }

  .forgot-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .forgot-actions .btn,
  .forgot-success .btn {
    width: 100%;
    min-width: 0;
  }

  .forgot-link {
    text-align: center;
  }
}
