:root {
  --brand: #eb683e;
  --brand-dark: #cf4f28;
  --ink: #0d0d0d;
  --title: #1a1a1a;
  --muted: #666666;
  --canvas: #fafafa;
  --border: #b3b3b3;
  --soft-border: #dedede;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: Raleway, "Avenir Next", Inter, ui-sans-serif, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-dark);
  font-weight: 650;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(235, 104, 62, 0.28);
  outline-offset: 3px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(460px, 1.12fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px clamp(36px, 5vw, 76px);
  border-right: 1px solid #242424;
  background: #0d0d0d;
  color: #fff;
}

.brand-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--brand);
  content: "";
}

.brand-lockup,
.brand-copy,
.brand-footnote {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 9px 12px;
  border-radius: 4px;
  background: #fff;
}

.brand-lockup img {
  display: block;
  width: 132px;
  height: auto;
}

.brand-copy {
  max-width: 520px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 2px;
  background: var(--brand);
  content: "";
}

.brand-copy h1 {
  max-width: 490px;
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.brand-copy p {
  max-width: 460px;
  margin: 0;
  color: #cccccc;
  font-size: 16px;
  line-height: 1.6;
}

.brand-footnote {
  color: #8d8d8d;
  font-size: 12px;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px clamp(28px, 7vw, 104px);
  background: #ffffff;
}

.login-card {
  width: min(100%, 500px);
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(86, 38, 23, 0.1);
}

.mobile-logo {
  display: none;
  width: 122px;
  margin-bottom: 34px;
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
  color: var(--title);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-card > p {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.login-message {
  margin: -12px 0 20px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.5;
}

.login-message.is-success {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #166534;
}

.login-message[hidden] {
  display: none;
}

.sso-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease;
}

.sso-button:hover,
.sso-button:focus {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 7px 18px rgba(86, 38, 23, 0.13);
  color: #fff;
  transform: translateY(-1px);
}

.sso-button svg {
  width: 18px;
  height: 18px;
}

.sso-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.82;
  pointer-events: none;
}

.security-note {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 13px 14px;
  border: 1px solid var(--soft-border);
  border-radius: 4px;
  background: #f5f5f5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.security-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #15803d;
}

.account-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-border);
}

.account-link {
  display: block;
  padding: 12px;
  border: 1px solid var(--soft-border);
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.account-link:hover {
  border-color: var(--brand);
  background: #fff4ef;
}

.account-link small,
.account-link strong {
  display: block;
}

.account-link small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.account-link strong {
  color: var(--ink);
  font-size: 13px;
}

.external-mark {
  margin-left: 3px;
  color: var(--brand);
}

@media (max-width: 880px) {
  .login-shell {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;
  }

  .mobile-logo {
    display: block;
  }
}

@media (max-width: 520px) {
  html,
  body,
  .login-shell,
  .form-panel {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .form-panel {
    align-items: stretch;
    padding: 0;
  }

  .login-card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 32px 24px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-card > p,
  .security-note > span,
  .account-link {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .account-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
