*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-white: #ffffff;
  --color-black: #1f2022;
  --color-gray-50: #f5f6f6;
  --color-gray-100: #eeeff2;
  --color-gray-200: #dddee1;
  --color-gray-400: #83878d;
  --color-gray-600: #595c61;
  --color-gray-800: #383a3d;
  --color-blue: #009fd9;
  --color-blue-dark: #07344a;
  --color-blue-hover: #066286;
  --font-family: "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 9999px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  --header-height: 64px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-white);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-800);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.nav__link:hover {
  background: var(--color-gray-50);
}

.nav__chevron {
  margin-top: 1px;
}

.nav__link--login {
  font-weight: 600;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-gray-800);
  border-radius: var(--radius-sm);
}

.menu-toggle:hover {
  background: var(--color-gray-50);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-blue-dark);
  color: var(--color-white);
  padding: 10px 20px;
}

.btn--primary:hover {
  background: var(--color-blue-hover);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn--full {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--radius-full);
}

.btn--social {
  width: 100%;
  padding: 12px 20px;
  background: var(--color-gray-50);
  color: var(--color-black);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  position: relative;
  justify-content: center;
}

.btn--social .btn__icon {
  position: absolute;
  left: 20px;
}

.btn--social:hover {
  background: var(--color-gray-100);
}

.btn__icon {
  flex-shrink: 0;
}

/* Main */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 80px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
  margin-bottom: 32px;
  text-align: center;
}

/* Login card */
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
}

.field__input {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input::placeholder {
  color: var(--color-gray-400);
}

.field__input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(0, 159, 217, 0.15);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-200);
  border-radius: 4px;
  background: var(--color-white);
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.checkbox__box svg {
  opacity: 0;
  transition: opacity 0.15s;
}

.checkbox input:checked + .checkbox__box {
  background: var(--color-blue);
  border-color: var(--color-blue);
}

.checkbox input:checked + .checkbox__box svg {
  opacity: 1;
}

.checkbox__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}

.link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-blue);
  transition: opacity 0.15s;
}

.link:hover {
  opacity: 0.8;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

.divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Legal text */
.legal-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-gray-600);
  text-align: center;
  margin-bottom: 16px;
}

.legal-text .link {
  font-size: 12px;
}

/* Social buttons */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* reCAPTCHA badge placeholder */
.recaptcha-badge {
  position: fixed;
  bottom: 16px;
  right: 16px;
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile */
@media (max-width: 699px) {
  .header__inner {
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .main {
    padding: 32px 16px 64px;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .login-card {
    padding: 24px 20px;
    border-radius: var(--radius-md);
    max-width: 100%;
  }

  .form-row {
    flex-wrap: wrap;
  }

  .btn--full {
    padding: 13px 20px;
  }
}

/* Tablet / small desktop */
@media (min-width: 700px) {
  .page-title {
    font-size: 32px;
  }

  .login-card {
    padding: 40px;
  }
}
