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

:root {
  --auth-bg: #F1F5FB;
  --auth-card: #FFFFFF;
  --auth-text: #0A2540;
  --auth-muted: #475569;
  --auth-border: #DDE6F2;
  --auth-accent: #FF6B00;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.auth-card {
  width: min(100%, 460px);
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 38px);
  box-shadow: 0 22px 60px rgba(10, 37, 64, 0.08);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 900;
}

.auth-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: #FFF4E8;
  color: var(--auth-accent);
}

.auth-kicker {
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 0 0 24px;
  color: var(--auth-muted);
  line-height: 1.7;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: #F8FAFC;
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.auth-tab.active {
  background: var(--auth-accent);
  color: #FFFFFF;
}

.auth-form[hidden] {
  display: none;
}

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

.auth-field label {
  font-size: 13px;
  font-weight: 800;
  color: var(--auth-text);
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--auth-text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(255, 107, 0, 0.55);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--auth-accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.auth-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 999px;
  background: #FFF4E8;
  color: var(--auth-accent);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.auth-btn + .auth-secondary-btn,
.auth-secondary-btn + .auth-status {
  margin-top: 12px;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-row a {
  color: var(--auth-accent);
  font-weight: 800;
}

.auth-status {
  min-height: 20px;
  color: var(--auth-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.auth-status.error {
  color: #b91c1c;
}

.auth-status.success {
  color: #15803d;
}

.auth-note {
  margin-top: 16px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .auth-shell {
    align-items: start;
    padding: 14px 12px;
  }

  .auth-card {
    border-radius: 20px;
    padding: 20px 18px;
    box-shadow: 0 14px 34px rgba(10, 37, 64, 0.07);
  }

  .auth-brand {
    margin-bottom: 18px;
  }

  .auth-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .auth-kicker {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }

  .auth-title {
    margin: 6px 0 8px;
    font-size: clamp(1.65rem, 9vw, 2.15rem);
    line-height: 1.03;
    letter-spacing: -0.035em;
  }

  .auth-copy {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.55;
  }

  .auth-form {
    gap: 10px;
  }

  .auth-field {
    gap: 5px;
  }

  .auth-field label {
    font-size: 12px;
  }

  .auth-field input {
    min-height: 42px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .auth-btn {
    min-height: 44px;
    font-size: 14px;
  }

  .auth-row {
    margin-top: 14px;
    font-size: 13px;
  }

  .auth-note {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.45;
  }

  .auth-status {
    min-height: 18px;
    font-size: 12.5px;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .auth-shell {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .auth-card {
    padding: 16px;
  }

  .auth-brand {
    margin-bottom: 12px;
  }

  .auth-title {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .auth-copy {
    margin-bottom: 12px;
  }

  .auth-field input {
    min-height: 40px;
    padding: 9px 11px;
  }

  .auth-form {
    gap: 8px;
  }
}
