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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

#page-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-ready #page-boot {
  display: none;
}

.page-boot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e5e5;
  border-top-color: #0078c8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

a {
  color: #429cd7;
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* Header 108px */

.site-header {
  flex-shrink: 0;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: #ffffff;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: 160px;
  height: 20px;
  object-fit: contain;
}

.menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #0078c8;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 14px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
}

/*
  Hero = full-bleed photo.
  Glass = dark translucent filter on the RIGHT half of the photo
  (not a separate frosted box next to the card).
*/

.hero {
  flex: 1;
  position: relative;
  min-height: 0;
  background-color: #2a2520;
  background-image: url("images/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(25, 27, 30, 0.5) 52%,
    rgba(20, 22, 26, 0.68) 72%,
    rgba(16, 18, 22, 0.78) 100%
  );
}

.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* White login card — ref 176,168 / 600×527 */

.login-card {
  position: absolute;
  left: 9.17144346%;
  top: 9.259259%;
  width: 31.2662845%;
  max-width: 600px;
  min-width: 300px;
  height: 81.32716%;
  max-height: 527px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  padding: 72px 83px 56px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.login-title {
  margin: 0 0 44px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: #222222;
}

.login-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #333333;
}

.field input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  border: 1px solid #c8c8c8;
  border-radius: 999px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: #333333;
  outline: none;
}

.field input::placeholder {
  color: #a0a0a0;
}

.field input:focus {
  border-color: #0078c8;
  box-shadow: 0 0 0 1px #0078c8;
}

.status-box {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
}

.status-box.status-error {
  background: #fdecea;
  color: #b42318;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  margin-top: 8px;
}

.login-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  min-width: 150px;
  height: 42px;
  padding: 0 28px;
  border-radius: 999px;
  background: #0078c8;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
}

.login-btn:hover {
  background: #0066ad;
}

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

.forgot-link {
  font-size: 13px;
  color: #429cd7;
  text-decoration: underline;
}

/* Promo text floating on the darkened right side — ref ~x=1192 */

.promo {
  position: absolute;
  left: 62.11568525%;
  top: 28.24%;
  color: #ffffff;
  max-width: 380px;
  width: 22%;
  min-width: 260px;
}

.promo-title {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.promo-text {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-width: 340px;
}

.promo-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.promo-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.promo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  background: #75b72a;
}

.promo-link {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

.promo-link:hover {
  color: #ffffff;
}

/* Footer 126px */

.site-footer {
  flex-shrink: 0;
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: #ffffff;
}

.lang-select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 46px;
  min-width: 168px;
  padding: 0 16px 0 20px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #ffffff;
  color: #555555;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  box-sizing: border-box;
}

.lang-label {
  white-space: nowrap;
}

.lang-caret {
  color: #666666;
  flex-shrink: 0;
}

.copyright {
  margin: 0;
  font-size: 13px;
  color: #888888;
}

@media (max-width: 1100px) and (min-width: 641px) {
  .login-card {
    left: 4%;
    width: 48%;
    max-width: none;
    min-width: 280px;
    height: auto;
    max-height: none;
    padding: 48px 40px;
  }

  .promo {
    left: 56%;
    width: 38%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 66px;
    padding: 0 18px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .hero {
    background-image: url("images/background-mobile.jpg");
  }

  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(20, 18, 16, 0.05) 0%,
      rgba(20, 18, 16, 0.08) 35%,
      rgba(18, 22, 26, 0.4) 62%,
      rgba(18, 22, 26, 0.55) 100%
    );
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    padding: 51px 18px 16px;
    overflow: auto;
  }

  .login-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    max-height: none;
    padding: 20px;
    flex-shrink: 0;
  }

  .login-title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .field {
    margin-bottom: 12px;
  }

  .field input {
    height: 42px;
    padding: 0 16px;
  }

  .form-actions {
    align-items: stretch;
    gap: 10px;
    margin-top: 2px;
  }

  .login-btn {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .forgot-link {
    text-align: right;
  }

  .promo {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-top: 24px;
    padding: 0 4px;
    flex-shrink: 0;
  }

  .promo-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .promo-text {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .site-footer {
    height: 42px;
    justify-content: flex-start;
    padding: 0 18px;
  }

  .site-footer .copyright {
    display: none;
  }

  .lang-select {
    height: 36px;
    min-width: 0;
    padding: 0 14px 0 12px;
    font-size: 12px;
    gap: 16px;
  }
}
