:root {
  --green: #123526;
  --cream: #f7f3e9;
  --gold: #e4d39a;
  --gold-btn: #c9a45c;
  --gold-btn-hi: #ddc07a;
  --ink: #111111;
  --muted: #8d877d;
  --label: #6d6860;
  --line: #e5dece;
  --white: #ffffff;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Inter, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 48px 28px;
  background: var(--green);
  overflow: hidden;
}

.brand::before {
  content: "";
  position: absolute;
  inset: 8% 18% auto;
  height: 280px;
  background: radial-gradient(circle, rgba(228, 211, 154, 0.16), transparent 68%);
  pointer-events: none;
}

.brand-art {
  position: relative;
  min-height: 46vh;
}

.brand-illustration {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  height: auto;
}

.brand-logo {
  position: absolute;
  left: 50%;
  top: 51%;
  z-index: 2;
  width: 23%;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  background: none;
  border: 0;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.brand-copy {
  position: relative;
  z-index: 1;
  padding-top: 8px;
  text-align: center;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 4.2vw, 54px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f3e7c4;
}

.brand-copy p {
  margin: 16px 0 0;
  font-size: 15px;
  color: #e6d7a8;
}

.brand-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 4px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: #e2d3a2;
}

.brand-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c8, #d4b65f);
  box-shadow: 0 0 8px rgba(228, 211, 154, 0.7);
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--cream);
}

.card {
  width: min(400px, 100%);
  padding: 48px 40px 36px;
  background: var(--white);
  border-radius: 26px;
  box-shadow: 0 18px 50px rgba(28, 36, 20, 0.08);
}

.card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.03em;
  text-align: center;
}

.card .lead {
  margin: 10px 0 32px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.form-error {
  margin: -16px 0 18px;
  color: #b42318;
  font-size: 13.5px;
  text-align: center;
}

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

.field label {
  color: var(--label);
  font-size: 13px;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 14.5px/1 var(--sans);
  outline: none;
}

.field input:focus {
  border-color: var(--gold-btn);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.16);
}

.password { position: relative; }
.password input { padding-right: 46px; }

.toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: #9a948a;
  cursor: pointer;
  transform: translateY(-50%);
}

.forgot {
  display: block;
  margin: 4px 0 14px;
  color: var(--label);
  font-size: 13px;
  text-align: right;
  text-decoration: none;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border-radius: 999px;
  font: 600 14.5px/1 var(--sans);
  cursor: pointer;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff8e8;
  background: linear-gradient(180deg, var(--gold-btn-hi) 0%, var(--gold-btn) 55%, #b89246 100%);
  box-shadow: 0 8px 18px rgba(184, 146, 70, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 248, 220, 0.7), transparent);
  transform: skewX(-20deg);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 10px 26px rgba(212, 175, 90, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary:hover::after {
  animation: shine 0.7s ease;
}

.btn-primary:disabled {
  cursor: progress;
  filter: brightness(0.96);
}

.btn-primary .spin {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(255, 248, 232, 0.35);
  border-top-color: #fff8e8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

@keyframes shine {
  to { left: 140%; }
}

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

  .brand {
    min-height: auto;
    padding: 24px 20px 20px;
  }

  .brand-art { min-height: 240px; }

  .brand-logo {
    left: 48.8%;
    top: 46%;
    width: 28%;
  }

  .brand-copy h1 { font-size: 34px; }

  .card { padding: 36px 22px 28px; }
}
