:root {
  --navy: #0F1B33;
  --blue: #2563EB;
  --blue-2: #4E86F7;
  --blue-deep: #1D4ED8;
  --ink: #0F1B33;
  --muted: #93A0B5;
  --muted-2: #6B7A93;
  --line: #E7ECF4;
  --surface: #fff;
  --canvas: #F4F6FA;
  --green: #18A957;
  --green-ink: #1E7A43;
  --red: #E5484D;
  --red-ink: #B3261E;
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --shadow: 0 3px 14px rgba(15, 27, 51, .06);
  --shadow-lg: 0 3px 16px rgba(15, 27, 51, .07);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.fd-auth {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
}

.fd-auth-shell {
  width: min(100%, 480px);
  padding: 40px 24px;
}

.fd-auth-shell:has(.fd-auth-plan-grid) {
  width: min(100%, 960px);
}

.fd-auth-card {
  padding: 28px 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.fd-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.fd-auth-brand img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(20, 100, 244, .18);
}

.fd-auth-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--blue);
}

.fd-auth-brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.fd-auth-head {
  margin-bottom: 18px;
  text-align: center;
}

.fd-auth-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.fd-auth-head p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}

.fd-auth-form {
  display: grid;
  gap: 12px;
}

.fd-auth-field {
  display: grid;
  gap: 6px;
}

.fd-auth-field > span,
.fd-auth-field > label {
  color: #8b97a8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fd-auth-field input,
.fd-auth-field select,
.fd-auth-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  outline: 0;
  background: #f7f9fc;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}

.fd-auth-field input:focus,
.fd-auth-field select:focus,
.fd-auth-field textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 100, 244, .1);
}

.fd-auth-password {
  position: relative;
}

.fd-auth-password input {
  padding-right: 64px;
}

.fd-auth-password-toggle {
  position: absolute;
  right: 8px;
  bottom: 6px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.fd-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fd-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.fd-auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.fd-auth-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.fd-auth-btn-icon {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.fd-auth-btn-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: none;
}

.fd-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.fd-auth-btn.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

.fd-auth-btn.secondary {
  color: var(--ink);
  background: #eef2f8;
}

.fd-auth-btn.outline {
  color: var(--blue);
  background: #fff;
  border: 1px solid #dbe4f0;
}

.fd-auth-divider {
  position: relative;
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.fd-auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.fd-auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  background: var(--surface);
}

.fd-auth-footer {
  margin-top: 14px;
  text-align: center;
}

.fd-auth-alert {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.fd-auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.fd-auth-alert.is-error {
  color: var(--red-ink);
  background: #fdecec;
}

.fd-auth-alert.is-success {
  color: var(--green-ink);
  background: #e8f7ee;
}

.fd-auth-alert.is-info {
  color: var(--blue-deep);
  background: #edf3ff;
}

.fd-auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fd-auth-type-grid {
  display: grid;
  gap: 10px;
}

.fd-auth-type {
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #f7f9fc;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.fd-auth-type h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}

.fd-auth-type p {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}

.fd-auth-type.is-active {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 100, 244, .08);
}

.fd-auth-plan-grid {
  display: grid;
  gap: 12px;
}

.fd-auth-plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e1e7ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.fd-auth-plan.is-featured {
  border-color: rgba(37, 99, 235, .35);
}

.fd-auth-plan h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
}

.fd-auth-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--blue);
}

.fd-auth-plan-price strong {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
}

.fd-auth-plan-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fd-auth-plan-copy {
  flex: 1;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.5;
}

.fd-auth-plan-copy ul {
  margin: 0;
  padding-left: 18px;
}

.fd-auth-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: #edf3ff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 720px) {
  .fd-auth-plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 719px) {
  .fd-auth-shell {
    width: min(100%, 520px);
    padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  }

  .fd-auth-card {
    padding: 22px 18px 20px;
  }

  .fd-auth-grid-2 {
    grid-template-columns: 1fr;
  }
}
