:root {
  --wine: #99170d;
  --wine-dark: #721008;
  --graphite: #343235;
  --ink: #18151a;
  --muted: #716b74;
  --line: #ddd8dc;
  --soft: #f5f3f4;
  --success: #15765d;
  --danger: #b42525;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8f7f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.hidden { display: none !important; }

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 45%) 1fr;
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(36px, 5vw, 74px);
  color: white;
  background:
    radial-gradient(circle at 92% 12%, rgba(176, 31, 18, .45), transparent 31%),
    linear-gradient(145deg, #211f22 0%, #353235 55%, #171517 100%);
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -220px;
  bottom: -210px;
  border: 42px solid rgba(153, 23, 13, .55);
  border-radius: 50%;
}

.auth-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(650px, 100%);
  height: clamp(165px, 17vw, 205px);
  padding: 12px 18px;
  border: 2px solid #fff;
  border-radius: 18px;
  object-fit: cover;
  object-position: center center;
  opacity: 1 !important;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .35),
    0 22px 54px rgba(0, 0, 0, .34);
  filter: none !important;
  mix-blend-mode: normal !important;
  isolation: isolate;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.auth-brand-copy h1 {
  max-width: 480px;
  margin: 10px 0 17px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.auth-brand-copy p:not(.auth-eyebrow) {
  max-width: 530px;
  margin: 0;
  color: #d9d5d9;
  font-size: 17px;
  line-height: 1.65;
}

.auth-brand-panel > small {
  position: relative;
  z-index: 1;
  color: #aaa4aa;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  min-height: 100vh;
  padding: 40px 24px;
}

.auth-card {
  width: min(470px, 100%);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid #e5e1e4;
  border-radius: 18px;
  background: white;
  box-shadow: 0 24px 70px rgba(42, 30, 37, .10);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-mobile-brand img {
  width: 47px;
  height: 47px;
  object-fit: cover;
  border-radius: 9px;
}

.auth-mobile-brand strong,
.auth-mobile-brand span {
  display: block;
}

.auth-mobile-brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 19px;
}

.auth-form header { margin-bottom: 5px; }

.auth-eyebrow {
  margin: 0;
  color: var(--wine);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .13em;
}

.auth-form h2 {
  margin: 7px 0 8px;
  font-size: 31px;
  letter-spacing: -.025em;
}

.auth-form header > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #4a444c;
  font-size: 13px;
  font-weight: 760;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cfc9ce;
  border-radius: 8px;
  outline: none;
  background: white;
  color: var(--ink);
}

.auth-form input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(153, 23, 13, .11);
}

.password-field { position: relative; }

.password-field input { padding-right: 82px; }

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

.auth-check {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  font-weight: 550 !important;
}

.auth-check input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--wine);
}

.auth-primary {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: white;
  background: var(--wine);
  box-shadow: 0 10px 20px rgba(153, 23, 13, .18);
  cursor: pointer;
  font-weight: 820;
}

.auth-primary:hover { background: var(--wine-dark); }
.auth-primary:disabled { opacity: .6; cursor: wait; }

.auth-link {
  border: 0;
  padding: 3px;
  color: var(--wine);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
}

.auth-message {
  margin-bottom: 22px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #fcebea;
  color: #842019;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.success {
  background: #e9f5f0;
  color: var(--success);
}

.password-rules {
  display: grid;
  gap: 6px;
  margin: -4px 0 1px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.password-rules li::before {
  content: "○";
  display: inline-block;
  width: 19px;
}

.password-rules li.valid { color: var(--success); }
.password-rules li.valid::before { content: "✓"; }

.auth-support {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 850px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 24px 16px; }
  .auth-mobile-brand { display: flex; }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 26px 21px;
    border-radius: 13px;
  }
}
