:root {
  --color-black: #111111;
  --color-gray: #c4c4c4;
  --color-border: #e0e0e0;
  --color-muted: #777777;
  --color-error: #e53e3e;
  --color-background: #ffffff;
  --color-subtle: #f5f5f5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-background);
  color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  padding: 20px 0;
}

.logo {
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  text-transform: uppercase;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 60px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 40px 40px 32px;
}

.card__header {
  text-align: center;
  margin-bottom: 32px;
}

.icon {
  width: 64px;
  height: 64px;
  background: var(--color-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.title {
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.subtitle {
  font-weight: 300;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input {
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-black);
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.input::placeholder {
  color: #bbb;
}

.input:focus {
  border-color: var(--color-black);
}

.input--error,
.input--error:focus {
  border-color: var(--color-error);
}

.error-msg {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-error);
}

.server-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-error);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background-color: var(--color-black);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.btn:hover:not(:disabled) {
  opacity: 0.8;
}

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

.btn--outline {
  background-color: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-gray);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner--dark {
  width: 28px;
  height: 28px;
  border-color: rgba(17, 17, 17, 0.15);
  border-top-color: var(--color-black);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.note {
  font-size: 12px;
  line-height: 18px;
  color: #999;
  text-align: center;
}

.account {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account__email {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  word-break: break-all;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 32px 20px 24px;
  }
}
