* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.auth-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  background: var(--rentulo-surface);
  border: 1px solid var(--rentulo-line);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(16, 32, 25, 0.05);
}

.auth-intro {
  padding: 30px;
  background: var(--rentulo-green-soft);
  border-right: 1px solid var(--rentulo-line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rentulo-green);
  font-size: 13px;
  font-weight: 800;
}

.auth-intro h1 {
  margin: 0 0 12px;
  color: var(--rentulo-green-dark);
  font-size: clamp(36px, 4vw, 46px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.auth-intro > p:not(.eyebrow) {
  margin: 0;
  color: var(--rentulo-muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-helper-box {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 14px 15px;
  color: var(--rentulo-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 103, 71, 0.14);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-helper-box strong {
  color: var(--rentulo-green-dark);
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 30px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group label {
  color: var(--rentulo-ink);
  font-size: 14px;
  font-weight: 800;
}

.form-group input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  color: var(--rentulo-ink);
  background: var(--rentulo-surface);
  border: 1px solid #cfdad4;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input::placeholder {
  color: #8a958f;
}

.form-group input:hover {
  border-color: #b9c9c1;
}

.form-group input:focus-visible {
  border-color: rgba(23, 103, 71, 0.55);
  box-shadow: 0 0 0 3px rgba(23, 103, 71, 0.09);
}

.form-group input.input-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.auth-error-message,
.status-message {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-error-message.active,
.status-message.active {
  display: block;
}

.auth-error-message,
.status-message.error {
  color: #9d2634;
  background: #fff0f1;
  border: 1px solid #f0b2bb;
}

.status-message.success {
  color: var(--rentulo-green-dark);
  background: var(--rentulo-green-soft);
  border: 1px solid rgba(23, 103, 71, 0.16);
}

.auth-note {
  margin: 0;
  color: var(--rentulo-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-note a {
  color: var(--rentulo-green);
  font-weight: 800;
  text-decoration: none;
}

.auth-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-note-right {
  margin-top: -4px;
  text-align: right;
}

.terms-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  color: var(--rentulo-muted);
  background: #fbfcfb;
  border: 1px solid var(--rentulo-line);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.terms-check input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--rentulo-green);
}

.auth-button {
  min-height: 48px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--rentulo-action-green, #00835a);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.auth-button:hover:not(:disabled) {
  background: var(--rentulo-action-green-hover, #006846);
}

.auth-button:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-button:focus-visible {
  outline: 2px solid rgba(23, 103, 71, 0.38);
  outline-offset: 2px;
}

.auth-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .auth-page {
    width: min(680px, calc(100% - 28px));
    padding-top: 18px;
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    padding: 26px;
    border-right: 0;
    border-bottom: 1px solid var(--rentulo-line);
  }

  .auth-intro h1 {
    font-size: 38px;
  }
}

@media (max-width: 620px) {
  .auth-page {
    padding: 14px 0 36px;
  }

  .auth-intro,
  .auth-form {
    padding: 20px 18px;
  }

  .auth-intro h1 {
    font-size: 36px;
  }

  .auth-form {
    gap: 13px;
  }

  .auth-note-right {
    text-align: left;
  }

  .auth-button {
    width: 100%;
  }
}
