
:root {
  color-scheme: light;
  --auth-green: #153d2b;
  --auth-green-dark: #0e2d1e;
  --auth-green-light: #e8f2eb;
  --auth-orange: #ef9b38;
  --auth-text: #1d2a22;
  --auth-muted: #718077;
  --auth-border: #e1e8e2;
  --auth-surface: #ffffff;
  --auth-background: #f6f8f5;
  --auth-danger: #b42318;
  --auth-success: #176b3a;
  font-family: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-background);
  color: var(--auth-text);
}

a {
  color: var(--auth-green);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

.auth-header {
  min-height: 76px;
  padding: 16px clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--auth-surface);
  border-bottom: 1px solid var(--auth-border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-green);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.brand strong {
  display: block;
  font-weight: 800;
}

.brand-mark,
.mobile-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--auth-green);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -1px;
}

.back-link {
  font-size: 13px;
}

.auth-layout {
  width: min(1180px, 100%);
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  padding: 38px 28px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: stretch;
  gap: 34px;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  padding: clamp(28px, 4vw, 54px);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(ellipse at 80% 15%, rgb(239 155 56 / 40%), transparent 35%),
    linear-gradient(145deg, #23563b, #102c1e 78%);
}

.visual-content {
  position: relative;
  z-index: 1;
  max-width: 470px;
}

.eyebrow {
  display: inline-block;
  color: var(--auth-orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.auth-visual h1 {
  margin: 20px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(32px, 3.3vw, 46px);
  line-height: 1.16;
  letter-spacing: -1.8px;
}

.auth-visual p {
  max-width: 390px;
  color: #d5e4d9;
  font-size: 15px;
  line-height: 1.8;
}

.visual-badge {
  display: inline-flex;
  margin-top: 24px;
  padding: 11px 15px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 100px;
  background: rgb(255 255 255 / 8%);
  font-size: 12px;
}

.visual-decoration {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
  pointer-events: none;
}

.decoration-one {
  width: 350px;
  height: 350px;
  top: -120px;
  right: -130px;
}

.decoration-two {
  width: 250px;
  height: 250px;
  top: -70px;
  right: -80px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  background: var(--auth-surface);
  box-shadow: 0 18px 55px rgb(20 53 35 / 5%);
}

.mobile-brand-mark {
  display: none;
  margin-bottom: 24px;
}

.auth-card h2 {
  margin: 12px 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(25px, 3vw, 31px);
  line-height: 1.25;
  letter-spacing: -1px;
}

.auth-subtitle {
  margin: 0 0 27px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.7;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 19px;
}

.form-field label {
  font-size: 13px;
  font-weight: 700;
}

.optional {
  color: var(--auth-muted);
  font-weight: 400;
}

.form-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dce5dd;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--auth-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input::placeholder {
  color: #a0aaa3;
}

.form-field input:focus {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgb(21 61 43 / 10%);
}

.form-field small {
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.5;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-row a {
  font-size: 11px;
}

.password-wrap {
  position: relative;
  display: flex;
}

.password-wrap input {
  padding-right: 65px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--auth-green);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--auth-green-light);
}

.submit-button {
  width: 100%;
  min-height: 49px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--auth-green);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.submit-button:hover {
  background: var(--auth-green-dark);
  transform: translateY(-1px);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.button-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}

.button-spinner:not([hidden]) {
  display: inline-block;
}

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

.form-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f0c5c1;
  border-radius: 10px;
  background: #fff2f1;
  color: var(--auth-danger);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.form-message.success {
  border-color: #b9dfc5;
  background: #effaf2;
  color: var(--auth-success);
}

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.guest-note {
  margin: 18px 0 0;
  padding-top: 17px;
  border-top: 1px solid #edf0ed;
  color: var(--auth-muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}

.auth-footer {
  min-height: 60px;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--auth-muted);
  font-size: 11px;
}

@media (max-width: 850px) {
  .auth-layout {
    width: min(560px, 100%);
    min-height: auto;
    padding: 28px 20px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    padding: 0;
  }

  .auth-card {
    max-width: 100%;
  }

  .mobile-brand-mark {
    display: grid;
  }
}

@media (max-width: 480px) {
  .auth-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand {
    gap: 8px;
    font-size: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .back-link {
    font-size: 11px;
  }

  .auth-layout {
    padding: 18px 12px 26px;
  }

  .auth-card {
    padding: 23px 18px;
    border-radius: 18px;
  }

  .auth-footer {
    padding: 16px;
    font-size: 10px;
  }
}
