:root {
  --bg: #f3f4f6;
  --line: #d8dde4;
  --title: #0f57b4;
  --text: #1f2937;
  --brand: #0f57b4;
  --button: #0f57b4;
  --button-hover: #0b4a99;
  --check: #14805a;
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --error-border: #fecaca;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 35%) 1fr;
}

.hero {
  position: relative;
  min-height: 0;
  background-image:
    linear-gradient(to top, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.24)),
    url("/public/assets/img/login/image-left.png");
  background-size: cover, cover;
  background-position: center, center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(19, 55, 117, 0.22), rgba(16, 37, 80, 0.08), rgba(6, 18, 43, 0.42));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 2.8vw, 40px);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: clamp(104px, 11vw, 180px);
  height: auto;
  object-fit: contain;
}

.hero-footer h2 {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 34px);
  font-weight: 700;
}

.hero-footer p {
  margin: 4px 0 0;
  font-size: clamp(16px, 1vw, 24px);
  font-weight: 500;
}

.panel {
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.2vh, 34px) clamp(28px, 3.4vw, 56px) clamp(84px, 10vh, 96px);
  background: var(--bg);
  overflow: hidden;
}

.panel-inner {
  width: min(470px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(10.5px, 1.15vh, 14.7px);
}

.intro-block,
.checklist-block,
.form-block {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(10.5px, 1.15vh, 14.7px);
}

.form-block {
  border-bottom: none;
  padding-bottom: 0;
}

.intro-block h1 {
  margin: 0 0 10px;
  color: var(--title);
  font-size: clamp(25px, 1.3vw, 37px);
  line-height: 1.1;
}

.intro-block p {
  margin: 0;
  max-width: 437px;
  font-size: clamp(12.6px, 0.76vw, 15.8px);
  line-height: 1.4;
  color: #2b3340;
}

.checklist-block h3,
.form-block label {
  margin: 0 0 12px;
  font-size: clamp(14.7px, 0.97vw, 20px);
  font-weight: 700;
}

.form-block label {
  display: block;
  margin: 0 0 8px;
  font-size: clamp(12.6px, 0.76vw, 15.8px);
}

#loginForm input[type="text"]:not(.honeypot-input) + label {
  margin-top: 8px;
}

.checklist-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7.5px;
}

.checklist-block li {
  display: flex;
  align-items: center;
  gap: 8.4px;
  color: #2b3139;
  font-size: clamp(12.6px, 0.74vw, 14.7px);
}

.check {
  width: clamp(13.7px, 0.71vw, 16.8px);
  height: clamp(13.7px, 0.71vw, 16.8px);
  border-radius: 50%;
  background: var(--check);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(8.4px, 0.53vw, 10.5px);
  line-height: 1;
}

.error-box {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error-text);
  font-size: clamp(13px, 0.82vw, 15px);
}

.error-box.is-visible {
  display: block;
}

#loginForm {
  max-width: 420px;
}

#loginForm input[type="text"],
#loginForm input[type="email"] {
  width: 100%;
  height: clamp(33.6px, 3.53vh, 42px);
  border: 1px solid #2c74ca;
  border-radius: 8px;
  background: #fff;
  padding: 0 13px;
  font-size: clamp(13.7px, 0.8vw, 16.8px);
  color: #111827;
  outline: none;
}

#loginForm input[type="text"]:focus,
#loginForm input[type="email"]:focus,
#requestCodeForm input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 87, 180, 0.12);
}

#loginForm input[type="text"].input-invalid,
#loginForm input[type="email"].input-invalid,
#requestCodeForm input.input-invalid {
  border-color: #cf3d3d;
  box-shadow: none;
}

#loginForm button {
  margin-top: 10px;
  width: 100%;
  height: clamp(33.6px, 3.53vh, 42px);
  border: none;
  border-radius: 8px;
  background: var(--button);
  color: #fff;
  font-size: clamp(14.7px, 0.84vw, 17.9px);
  font-weight: 700;
  cursor: pointer;
}

#loginForm button:hover,
#requestCodeForm button:hover {
  background: var(--button-hover);
}

#loginForm button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hint {
  margin: 12px 0 0;
  font-size: clamp(11.5px, 0.67vw, 13.7px);
  color: #1b4f96;
}

.hint a {
  color: #1b4f96;
  text-decoration: none;
}

.hint a:hover {
  text-decoration: underline;
}

.consent-wrap {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.consent-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--button);
  cursor: pointer;
}

.consent-wrap label {
  display: inline;
  margin: 0;
  font-size: clamp(11.5px, 0.72vw, 14px);
  font-weight: 600;
  line-height: 1.35;
}

.consent-wrap a {
  color: #1b4f96;
  text-decoration: none;
}

.consent-wrap a:hover {
  text-decoration: underline;
}

.panel-footer {
  position: absolute;
  left: clamp(28px, 3.4vw, 56px);
  right: clamp(28px, 3.4vw, 56px);
  bottom: 0;
  border-top: 1px solid var(--line);
  min-height: clamp(56px, 7vh, 74px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5a6472;
  font-size: clamp(12px, 0.72vw, 15px);
}

.panel-footer a {
  color: inherit;
  text-decoration: none;
}

.panel-footer a:hover {
  text-decoration: underline;
}

.honeypot-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.request-modal[hidden] {
  display: none;
}

.request-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.request-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 43, 0.48);
}

.request-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(11, 23, 43, 0.24);
}

.request-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #425066;
  cursor: pointer;
}

.request-modal__dialog h3 {
  margin: 0;
  color: var(--title);
  font-size: 17px;
  line-height: 1.2;
}

.request-modal__dialog p {
  margin: 8px 0 12px;
  color: #3d4755;
  font-size: 11.9px;
}

#requestCodeForm label {
  display: block;
  margin: 0 0 8px;
  font-size: 11.9px;
  font-weight: 700;
}

#requestCodeForm input + label {
  margin-top: 8px;
}

#requestCodeForm input {
  width: 100%;
  height: 35.7px;
  border: 1px solid #2c74ca;
  border-radius: 8px;
  background: #fff;
  padding: 0 13px;
  font-size: 12.8px;
  color: #111827;
  outline: none;
}

#requestCodeForm button {
  margin-top: 12px;
  width: 100%;
  height: 35.7px;
  border: none;
  border-radius: 8px;
  background: var(--button);
  color: #fff;
  font-size: 13.6px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .page {
    grid-template-columns: 34% 66%;
  }

  .intro-block h1 {
    font-size: clamp(25.2px, 2.02vw, 31.5px);
  }
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 32% 68%;
  }

  .panel {
    padding: 20px 20px 74px;
  }

  .panel-footer {
    left: 20px;
    right: 20px;
  }

  .hero-footer h2 {
    font-size: 19px;
  }

  .hero-footer p {
    font-size: 14px;
  }
}

@media (max-width: 780px) {
  .page {
    grid-template-columns: 1fr;
  }

  .hero {
    display: none;
  }

  .panel {
    justify-content: center;
    padding: 16px 14px 66px;
  }

  .panel-inner {
    width: min(470px, 100%);
    gap: 14px;
  }

  .intro-block h1 {
    font-size: 25px;
  }

  .intro-block p,
  .checklist-block li,
  .hint {
    font-size: 13px;
  }

  .checklist-block h3,
  .form-block label {
    font-size: 17px;
  }

  .form-block label {
    font-size: 14px;
  }

  #loginForm input[type="text"],
  #loginForm input[type="email"],
  #loginForm button {
    font-size: 15px;
    height: 38px;
  }

  .panel-footer {
    left: 14px;
    right: 14px;
    min-height: 56px;
    font-size: 13px;
    gap: 7px;
    flex-wrap: wrap;
  }
}
