:root {
  color-scheme: light;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #0d1117;
  --navy: #0f172a;
  --navy-soft: #162338;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-pale: #dbeafe;
  --paper: #f8fafc;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ed;
  --error: #b4233c;
  --error-bg: #fff1f2;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--ink); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--paper);
}

button, input { font: inherit; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
  min-height: 100vh;
  min-height: 100svh;
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 64px);
  color: var(--paper);
  background:
    radial-gradient(ellipse at 78% 43%, rgb(59 130 246 / 13%), transparent 44%),
    linear-gradient(145deg, var(--navy-soft), var(--ink) 70%);
}

.brand-panel::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 48%, rgb(13 17 23 / 36%));
  content: "";
  pointer-events: none;
}

.brand-row, .brand-copy, .brand-location { position: relative; z-index: 1; }

.brand-row { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 56%);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 6px 20px rgb(0 0 0 / 14%);
}

.brand-mark img { display: block; width: 31px; height: 31px; }

.brand-name { font-size: 18px; font-weight: 650; letter-spacing: -.025em; }

.terrain-art {
  position: absolute;
  top: 13%;
  right: -5%;
  width: min(90%, 760px);
  color: #dbeafe;
  opacity: .92;
  pointer-events: none;
}

.terrain-art svg { display: block; width: 100%; height: auto; overflow: visible; }

.brand-copy { max-width: 570px; margin-top: auto; padding-top: 320px; }

.eyebrow, .access-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow { color: #a8c5e8; }

.brand-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 5.2vw, 66px);
  font-weight: 560;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.brand-description {
  max-width: 380px;
  margin: 0;
  color: #c4d0df;
  font-size: 15px;
  line-height: 1.75;
}

.brand-location {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 54px 0 0;
  color: #aab7c8;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
}

.location-mark, .access-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6eaaff;
  box-shadow: 0 0 0 4px rgb(59 130 246 / 16%);
}

.location-separator { color: #64748b; }

.access-panel {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(ellipse at 100% 0, rgb(219 234 254 / 40%), transparent 42%),
    var(--paper);
}

.access-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid #e4eaf1;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 24px 70px rgb(15 23 42 / 8%), 0 2px 8px rgb(15 23 42 / 3%);
}

.access-label { display: flex; align-items: center; gap: 10px; color: #475569; }

.access-dot { width: 6px; height: 6px; background: var(--blue); box-shadow: none; }

.access-card h2 {
  margin: 30px 0 8px;
  color: var(--navy);
  font-size: clamp(29px, 3vw, 36px);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.intro { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.field + .field { margin-top: 20px; }

.field label {
  display: block;
  margin: 0 0 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.field input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input::placeholder { color: #64748b; }

.field input:hover { border-color: #94a3b8; }

.field input:focus-visible {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 18%);
}

.field input[aria-invalid="true"] { border-color: var(--error); }

.password-field { position: relative; }

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

.password-field button {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 58px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #1d4ed8;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.password-field button:hover { background: #eff6ff; }

.submit {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding: 0 16px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-dark);
  box-shadow: 0 5px 12px rgb(37 99 235 / 18%);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.submit:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 8px 18px rgb(37 99 235 / 24%);
  transform: translateY(-1px);
}

.submit:disabled { cursor: wait; opacity: .82; }

.submit-arrow { font-size: 18px; font-weight: 400; line-height: 1; }

.form-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: var(--error);
  background: var(--error-bg);
  font-size: 13px;
  line-height: 1.5;
}

.form-error[hidden] { display: none; }

.access-help {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 26px;
}

.help-rule { width: 2px; min-height: 34px; border-radius: 2px; background: #bfdbfe; }

.access-help p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.panel-footer {
  display: flex;
  max-width: 440px;
  justify-content: space-between;
  gap: 16px;
  margin: 30px auto 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
}

.panel-footer span:first-child { font-weight: 700; letter-spacing: .1em; }

button:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, .95fr); }
  .brand-copy { padding-top: 280px; }
  .access-panel { padding: 32px; }
}

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

  .brand-panel {
    min-height: 290px;
    padding: 24px clamp(22px, 6vw, 40px) 28px;
  }

  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand-mark img { width: 28px; height: 28px; }
  .brand-name { font-size: 17px; }

  .terrain-art {
    top: 20px;
    right: -30%;
    width: 82%;
    opacity: .54;
  }

  .brand-copy { max-width: 430px; padding-top: 62px; }
  .eyebrow { font-size: 9px; }
  .brand-copy h1 { margin: 10px 0 7px; font-size: clamp(27px, 7vw, 36px); letter-spacing: -.045em; }
  .brand-description { max-width: 360px; font-size: 12px; line-height: 1.5; }
  .brand-location { margin-top: 22px; font-size: 9px; }

  .access-panel { min-height: auto; padding: 28px 20px 36px; }
  .access-card { max-width: 500px; padding: clamp(24px, 7vw, 36px); border-radius: 14px; }
  .access-card h2 { margin-top: 24px; font-size: 30px; }
  .intro { margin-bottom: 26px; }
  .panel-footer { width: 100%; max-width: 500px; margin-top: 22px; }
}

@media (max-width: 380px) {
  .brand-panel { min-height: 270px; }
  .brand-copy { padding-top: 52px; }
  .brand-description { max-width: 290px; }
  .access-panel { padding-right: 14px; padding-left: 14px; }
  .panel-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .brand-mark, .access-card, .field input, .submit { border: 1px solid ButtonText; }
  .access-dot, .location-mark { background: LinkText; box-shadow: none; }
  .terrain-art { opacity: .4; }
}
