.login-body { overflow: auto; }

.login-shell {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* Brand panel */
.brand-panel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px 48px;
  color: #fff7f0;
  background:
    radial-gradient(1200px 500px at -10% -10%, rgba(255, 255, 255, .14), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, rgba(0, 0, 0, .25), transparent 60%),
    linear-gradient(150deg, #d9541c 0%, #b23c0e 48%, #6f2208 100%);
}
.brand-panel::before {
  /* subtle grid texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.brand-top { position: relative; display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .08em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25);
}
.brand-hero { position: relative; max-width: 520px; padding: 40px 0; }
.wordmark {
  margin: 0; font-family: var(--sans); font-weight: 700;
  font-size: clamp(64px, 9vw, 112px); line-height: .95; letter-spacing: .06em;
  background: linear-gradient(180deg, #fff 0%, #ffd9c2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline {
  margin: 14px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: #ffd2b8;
}
.pitch { margin: 22px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.5; color: #fff3ea; }
.features { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 16px; }
.features li { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: #ffe6d8; }
.features strong { color: #fff; font-weight: 600; }
.feat-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
}
.brand-chart { position: relative; width: min(340px, 70%); align-self: flex-end; opacity: .9; }
.brand-chart rect { fill: rgba(255, 255, 255, .16); }
.brand-chart path { stroke: #ffd2b8; }

/* Form panel */
.form-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -.01em; }
.login-card .sub { margin: 6px 0 28px; color: var(--muted); }
.mobile-brand { display: none; }

.field { display: block; margin-bottom: 16px; }
.field > span:first-child { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; color: var(--muted);
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

.login-error {
  margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}
.login-btn {
  width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .1s;
}
.login-btn:hover:not(:disabled) { background: var(--accent-hover); }
.login-btn:active:not(:disabled) { transform: translateY(1px); }
.login-btn:disabled { opacity: .7; cursor: default; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fineprint { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { align-items: start; padding-top: 12vh; }
  .mobile-brand { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
  .wordmark-sm {
    font-weight: 700; font-size: 44px; letter-spacing: .06em; line-height: 1;
    background: linear-gradient(135deg, #d9541c, #8a2a0a); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .tagline-sm { margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
}
