:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #050608;
  color: #f7f5ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(237, 185, 73, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(32, 155, 126, 0.08), transparent 28%),
    #050608;
}

button,
input {
  font: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  padding: 32px;
}

.brand-panel,
.form-panel {
  min-height: calc(100vh - 64px);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  background-size: 28px 28px, 28px 28px, auto;
}

.brand-mark,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0;
}

.brand-letter,
.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8d66d, #b9841d);
  color: #090805;
  font-weight: 800;
  font-family: Georgia, serif;
}

.brand-name,
.mobile-brand span {
  font-weight: 800;
  font-size: 24px;
}

.brand-name span,
.mobile-brand span span {
  color: #9ca3af;
  font-weight: 300;
}

.brand-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 18px;
  color: #d4af37;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  margin: 24px 0 0;
  max-width: 560px;
  color: #b8bdc7;
  font-size: 18px;
  line-height: 1.75;
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 8px 8px 0;
  background: rgba(3, 4, 6, 0.92);
}

.mobile-brand {
  display: none;
}

.form-card {
  width: min(100%, 440px);
}

.form-heading {
  margin-bottom: 28px;
}

h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: 0;
}

.form-heading p,
.mode-line,
.terms {
  color: #9ca3af;
}

.message {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
}

.message.is-error {
  display: block;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.28);
}

.message.is-success {
  display: block;
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.24);
  border-color: rgba(74, 222, 128, 0.24);
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #6b7280;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  padding: 13px 14px 13px 44px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus {
  border-color: rgba(234, 179, 8, 0.7);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.16);
  background: rgba(255, 255, 255, 0.075);
}

input::placeholder {
  color: #667085;
}

.primary-button,
.link-button {
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #eab308, #ca8a04);
  color: #080808;
  font-weight: 800;
  margin-top: 4px;
  transition: transform 180ms ease, filter 180ms ease;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-line {
  margin: 28px 0 0;
  text-align: center;
  font-size: 14px;
}

.link-button {
  border: 0;
  background: transparent;
  color: #eab308;
  padding: 0;
  font-weight: 700;
}

.link-button:hover {
  color: #facc15;
}

.terms {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
}

body.login-mode .register-only,
body.register-mode .login-only {
  display: none;
}

@media (max-width: 900px) {
  .auth-shell {
    display: block;
    padding: 20px;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: calc(100vh - 40px);
    border-radius: 8px;
    padding: 28px;
  }

  .mobile-brand {
    display: flex;
    margin-bottom: 34px;
  }

  h2 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    padding: 0;
  }

  .form-panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 24px 18px;
  }

}
