:root {
  --red: #b11226;
  --red-dark: #850b1a;
  --black: #1a1a1a;
  --beige: #faf8f5;
  --olive: #c7c9a6;
  --olive-dark: #737651;
  --white: #ffffff;
  --muted: #6b6761;
  --line: #e3ded7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--black);
  background: var(--beige);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
}

.login-brand {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: var(--beige);
  background: var(--black);
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -210px;
  top: 15%;
  border: 84px solid rgba(199, 201, 166, .16);
  border-radius: 50%;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 360px;
  left: -70px;
  bottom: -150px;
  background: var(--red);
  transform: rotate(28deg);
}

.brand-lockup, .brand-message, .brand-footer {
  position: relative;
  z-index: 1;
}

.brand-lockup, .mobile-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  background: var(--olive);
}

.brand-name, .brand-product { display: block; }
.brand-name { font-size: 16px; font-weight: 800; }
.brand-product { margin-top: 3px; color: var(--olive); font-size: 13px; }
.brand-message { max-width: 560px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-brand .eyebrow { color: var(--olive); }

.brand-message h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.brand-message > p:last-child {
  max-width: 470px;
  margin: 24px 0 0;
  color: #d7d3cb;
  font-size: 17px;
  line-height: 1.65;
}

.brand-footer { margin: 0; color: #aaa69f; font-size: 12px; }

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 88px);
  background:
    linear-gradient(rgba(199, 201, 166, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 201, 166, .22) 1px, transparent 1px),
    var(--beige);
  background-size: 42px 42px;
}

.login-card {
  width: min(100%, 480px);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 70px rgba(26, 26, 26, .11);
}

.mobile-brand { display: none; margin-bottom: 34px; font-weight: 800; }
.login-card h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -.03em; }
.login-intro { margin: 12px 0 30px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 10px; }

.login-form label {
  margin-top: 8px;
  color: #494641;
  font-size: 13px;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cec8c0;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
}

.login-form input:focus {
  border-color: var(--olive-dark);
  box-shadow: 0 0 0 4px rgba(199, 201, 166, .34);
}

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

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

.login-error { min-height: 20px; margin: 4px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }

.login-button {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: var(--red);
  font-weight: 850;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.login-button:hover { background: var(--red-dark); }
.login-button:active { transform: translateY(1px); }
.login-button:disabled { cursor: wait; opacity: .7; }

.login-help {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; }
  .mobile-brand { display: flex; }
}

@media (max-width: 460px) {
  .login-panel { padding: 0; place-items: stretch; background: var(--beige); }
  .login-card {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-top: 7px solid var(--red);
    border-radius: 0;
    box-shadow: none;
  }
}
