* {
  box-sizing: border-box;
}

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

.login-page {
  min-height: 100vh;
  background: var(--tp-canvas);
  color: var(--tp-forest);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 57fr) minmax(430px, 43fr);
  min-height: 100vh;
  overflow: hidden;
}

.login-visual {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: var(--tp-forest);
}

.login-visual__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-visual::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 31, 0, 0.92) 0%, rgba(5, 31, 0, 0.72) 47%, rgba(5, 31, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(5, 31, 0, 0.64) 0%, transparent 48%);
  content: "";
}

.login-visual::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: radial-gradient(circle at 82% 62%, rgba(217, 165, 32, 0.12), transparent 33%);
  content: "";
  pointer-events: none;
}

.login-visual__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 54px clamp(42px, 5vw, 86px) 50px;
  color: #fff;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: "Chivo", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.24rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.login-brand__symbol {
  display: block;
  width: 35px;
  height: 45px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.14));
}

.login-brand__wordmark {
  white-space: nowrap;
}

.login-story {
  max-width: 640px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 80px 0 54px;
}

.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #dfe9df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.login-eyebrow::before {
  width: 34px;
  height: 2px;
  background: var(--tp-gold);
  content: "";
}

.login-story__title {
  max-width: 550px;
  margin: 0;
  font-family: "Chivo", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(44px, 4.6vw, 74px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.login-story__description {
  max-width: 590px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.81);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.62;
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 64px clamp(48px, 6vw, 96px);
  background: linear-gradient(145deg, #fff 0%, var(--tp-canvas) 68%, #f2f6f2 100%);
}

.login-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 78, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 78, 44, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent);
}

.login-form-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin: auto;
}

.login-form-title {
  margin: 0;
  color: var(--tp-forest);
  font-family: "Chivo", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(36px, 3vw, 48px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.login-form-eyebrow {
  margin: 0 0 10px;
  color: #627768;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-welcome-line {
  width: 48px;
  height: 3px;
  margin: 20px 0 40px;
  background: var(--tp-gold);
}

.login-messages {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.login-message,
.login-form-errors,
.login-field-errors {
  margin: 0;
  border-radius: var(--tp-control-radius);
  font-size: 13px;
  line-height: 1.45;
}

.login-message {
  padding: 12px 14px;
  border: 1px solid rgba(46, 78, 44, 0.18);
  background: var(--tp-mist);
  color: var(--tp-forest);
}

.login-message--error,
.login-form-errors,
.login-field-errors {
  border: 1px solid rgba(190, 24, 24, 0.2);
  background: #fff1f2;
  color: #b91c1c;
}

.login-message--warning {
  border-color: rgba(217, 165, 32, 0.3);
  background: #fffbeb;
  color: #854d0e;
}

.login-message--success {
  border-color: rgba(21, 128, 61, 0.22);
  background: #f0fdf4;
  color: #166534;
}

.login-form-errors {
  margin-bottom: 22px;
  padding: 12px 14px;
}

.login-form-errors ul,
.login-field-errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-form-group {
  margin-bottom: 22px;
}

.login-form-group label {
  display: block;
  margin: 0 0 9px;
  color: #334038;
  font-size: 13px;
  font-weight: 700;
}

.login-field {
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 17px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-control-radius);
  outline: none;
  background: #fff;
  box-shadow: 0 4px 14px rgba(5, 31, 0, 0.025);
  color: var(--tp-forest);
  font: 500 15px "DM Sans", ui-sans-serif, system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field:focus {
  border-color: var(--tp-sage);
  box-shadow: 0 0 0 4px rgba(139, 165, 136, 0.2);
}

.login-field[aria-invalid="true"] {
  border-color: #dc2626;
}

.login-field::placeholder {
  color: #65746a;
}

.login-field-errors {
  margin-top: 8px;
  padding: 9px 11px;
}

.login-field-errors:empty {
  display: none;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--tp-control-radius);
  background: var(--tp-green);
  box-shadow: 0 13px 30px rgba(5, 31, 0, 0.16);
  color: #fff;
  cursor: pointer;
  font: 700 15px "DM Sans", ui-sans-serif, system-ui, sans-serif;
  transition: background-color 0.2s, transform 0.2s;
}

.login-submit:hover {
  background: var(--tp-forest);
  transform: translateY(-1px);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(139, 165, 136, 0.55);
  outline-offset: 3px;
}

.login-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 23px 0 0;
  color: var(--tp-muted);
  font-size: 12px;
}

.login-privacy svg {
  width: 14px;
  height: 14px;
  color: var(--tp-sage);
  flex: 0 0 auto;
}

.login-footer {
  position: absolute;
  right: clamp(48px, 6vw, 96px);
  bottom: 32px;
  left: clamp(48px, 6vw, 96px);
  color: #526457;
  font-size: 12px;
  text-align: center;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.login-footer a:hover,
.login-footer a:focus-visible {
  color: var(--tp-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 901px) and (max-height: 900px) {
  .login-visual__content {
    padding: 28px clamp(42px, 5vw, 86px) 26px;
  }

  .login-brand__symbol {
    width: 31px;
    height: 40px;
  }

  .login-story {
    padding: 28px 0 22px;
  }

  .login-eyebrow {
    margin-bottom: 12px;
  }

  .login-story__title {
    font-size: clamp(38px, 4vw, 56px);
    line-height: 1;
  }

  .login-story__description {
    margin-top: 14px;
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.45;
  }


  .login-panel {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .login-form-title {
    font-size: 36px;
  }

  .login-welcome-line {
    margin: 14px 0 26px;
  }

  .login-form-group {
    margin-bottom: 18px;
  }

  .login-field {
    height: 52px;
  }

  .login-submit {
    height: 54px;
    margin-top: 6px;
  }

  .login-privacy {
    margin-top: 18px;
  }

  .login-footer {
    bottom: 16px;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 330px;
  }

  .login-visual__content {
    min-height: 330px;
    padding: 30px 28px;
  }

  .login-brand {
    font-size: 1.08rem;
  }

  .login-brand__symbol {
    width: 31px;
    height: 40px;
  }

  .login-story {
    margin: 0;
    padding: 42px 0 0;
  }

  .login-eyebrow,
  .login-story__description {
    display: none;
  }

  .login-story__title {
    max-width: 520px;
    font-size: 40px;
  }

  .login-panel {
    min-height: auto;
    padding: 58px 28px 76px;
  }

  .login-form-wrap {
    max-width: 520px;
  }

  .login-footer {
    position: static;
    margin-top: 54px;
  }
}

@media (max-width: 560px) {
  .login-visual,
  .login-visual__content {
    min-height: 245px;
  }

  .login-visual__content {
    padding: 26px 22px;
  }

  .login-brand {
    gap: 10px;
    font-size: 1.02rem;
  }

  .login-brand__symbol {
    width: 29px;
    height: 37px;
  }

  .login-story {
    padding-top: 28px;
  }

  .login-story__title {
    font-size: 32px;
  }

  .login-panel {
    padding: 46px 22px 48px;
  }

  .login-form-title {
    font-size: 36px;
  }

  .login-welcome-line {
    margin-bottom: 32px;
  }

  .login-privacy {
    font-size: 13px;
  }

  .login-footer {
    line-height: 1.55;
  }

  .login-footer__company,
  .login-footer__rights {
    display: block;
  }

  .login-footer__separator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-field,
  .login-submit,
  .login-footer a {
    transition: none;
  }

  .login-submit:hover {
    transform: none;
  }
}
