:root {
  --auth-bg: #f5f5f5;
  --auth-text: #323232;
  --auth-field-text: #1a1b23;
  --auth-field-border: #c4c4c4;
  --auth-field-bg: #ffffff;
  --auth-button-bg: #323232;
  --auth-button-text: #f2f4fd;
  --auth-error: #b42318;
  --auth-status: #5d6778;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-accent: "Switzer", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--auth-text);
  outline-offset: 3px;
}

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

.auth-layout {
  display: flex;
  width: min(343px, 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.auth-title {
  margin: 0;
  width: 100%;
  color: var(--auth-text);
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
}

.auth-form {
  display: flex;
  width: min(313px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-input {
  width: 100%;
  height: 56px;
  padding: 18px 14px;
  border: 1px solid var(--auth-field-border);
  border-radius: 16px;
  background: var(--auth-field-bg);
  color: var(--auth-field-text);
  font-size: 16px;
  line-height: 1.2;
}

.auth-input::placeholder {
  color: var(--auth-field-text);
  opacity: 1;
}

.auth-input:focus-visible {
  outline: none;
  border-color: var(--auth-text);
  box-shadow: 0 0 0 3px rgba(50, 50, 50, 0.08);
}

.auth-submit {
  display: inline-flex;
  min-width: 160px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 8px 16px;
  border: 1px solid var(--auth-button-bg);
  border-radius: 1000px;
  background: var(--auth-button-bg);
  color: var(--auth-button-text);
  font-family: var(--font-accent);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-submit:hover {
  border-color: #252525;
  background: #252525;
}

.auth-submit:active {
  border-color: #1d1d1d;
  background: #1d1d1d;
}

.auth-submit[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--auth-status);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.auth-status.is-error {
  color: var(--auth-error);
}

@media (max-width: 480px) {
  .auth-shell {
    padding-inline: 20px;
  }

  .auth-layout,
  .auth-form {
    width: 100%;
  }
}
