:root {
  --ink: #1e1e2a;
  --muted: #686879;
  --line: #e1e1e8;
  --paper: #f5f5f8;
  --forest: #262262;
  --forest-2: #39347f;
  --mint: #e8e7f2;
  --amber: #be1e2d;
  --red: #be1e2d;
  --shadow: 0 18px 50px rgba(38, 34, 98, .14);
  font-family: "Open Sans", Inter, ui-sans-serif, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
  grid-template-columns: minmax(480px, 1.18fr) minmax(420px, .82fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 7vw;
  color: var(--forest);
  background: white url("mhol-flatirons.webp") center / cover no-repeat;
}

.login-brand::before {
  content: none;
}

.login-brand::after {
  content: none;
}

.login-brand-logo {
  width: min(360px, 70%);
  height: auto;
  margin-bottom: clamp(38px, 7vh, 76px);
}

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

.login-brand h1 {
  margin: 16px 0 26px;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(58px, 6.2vw, 92px);
  line-height: .92;
  letter-spacing: .005em;
}

.login-brand h1 span {
  color: var(--red);
  text-shadow: none;
}

.brand-copy {
  max-width: 510px;
  margin-bottom: 54px;
  font-family: "Open Sans", sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.32;
}

.brand-points span {
  border-color: rgba(38, 34, 98, .48);
  border-radius: 4px;
  background: rgba(255, 255, 255, .78);
  font-weight: 700;
}

.login-panel { background: linear-gradient(145deg, #f7f7fa, #e9e9f0); }

.login-card {
  border-top: 7px solid var(--red);
  border-radius: 10px;
}

.login-card h2,
.drawer h2,
.modal h2,
.topbar h1,
.welcome h2 {
  font-family: Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.primary { background: var(--red); }
.primary:hover { background: #9f1825; }
.secondary { border-color: #c8c6dd; }

.sidebar {
  border-right: 5px solid var(--red);
  background: white;
  color: var(--forest);
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 182px;
  height: auto;
}

.nav-item { color: var(--forest); border-radius: 6px; }
.nav-item:hover,
.nav-item.active { background: var(--red); color: white; }
.avatar { background: var(--red); color: white; }

.sidebar-foot {
  border-top-color: rgba(38, 34, 98, .18);
}

.sidebar-foot small { color: var(--muted); }

.sidebar-foot {
  grid-template-columns: 38px minmax(0, 1fr);
}

.sign-out-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(38, 34, 98, .34);
  border-radius: 6px;
  background: transparent;
  color: var(--forest);
  font-size: 13px;
}

.sign-out-button:hover,
.sign-out-button:focus-visible {
  border-color: var(--red);
  background: var(--red);
  color: white;
  outline: none;
}

.metric {
  border-top: 4px solid var(--forest);
  border-radius: 8px;
}

.metric strong,
.billing-total {
  font-family: Impact, "Arial Narrow", sans-serif;
  letter-spacing: .02em;
}

.card { border-radius: 8px; }
.stage { color: var(--forest); }

.toast {
  border-left: 5px solid var(--red);
  border-radius: 7px;
  background: var(--forest);
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand {
    display: flex;
    min-height: 390px;
    padding: 48px clamp(28px, 8vw, 72px);
    background-position: center 58%;
  }
  .login-brand-logo {
    width: min(300px, 62vw);
    margin-bottom: 28px;
  }
  .login-brand h1 {
    margin: 8px 0 18px;
    font-size: clamp(48px, 10vw, 72px);
  }
  .brand-copy {
    max-width: 560px;
    margin-bottom: 28px;
    font-size: 21px;
  }
  .sidebar-foot .sign-out-button {
    display: flex;
    grid-column: 1;
    width: 42px;
    margin: 10px auto 0;
  }
  .sidebar-foot .sign-out-button strong { display: none; }
}

@media (max-width: 650px) {
  .login-shell { display: block; }
  .login-brand {
    min-height: 320px;
    padding: max(24px, env(safe-area-inset-top)) 22px 28px;
    background-position: 56% center;
  }
  .login-brand-logo {
    width: min(235px, 66vw);
    margin-bottom: 18px;
  }
  .login-brand h1 {
    margin: 5px 0 14px;
    font-size: clamp(42px, 13vw, 58px);
  }
  .brand-copy {
    display: none;
  }
  .brand-points { display: none; }
  .login-panel {
    min-height: 0;
    padding: 22px 16px max(28px, env(safe-area-inset-bottom));
  }
  .login-card {
    width: 100%;
    padding: 28px 22px;
  }
  .login-card label { margin-top: 17px; }
  .login-card input { min-height: 48px; }
  .primary,
  .secondary { min-height: 46px; }

  .app { display: block; }
  .sidebar {
    position: sticky;
    z-index: 10;
    top: 0;
    inset: auto;
    width: 100%;
    padding: max(10px, env(safe-area-inset-top)) 12px 8px;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 8px 12px;
    border-right: 0;
    border-bottom: 4px solid var(--red);
    box-shadow: 0 5px 18px rgba(38, 34, 98, .12);
  }
  .logo-row {
    width: 150px;
    margin: 0;
  }
  .sidebar-logo { max-width: 150px; }
  .sidebar nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-item {
    justify-content: center;
    gap: 4px;
    min-height: 42px;
    padding: 7px 3px;
    font-size: 11px;
  }
  .nav-item span {
    width: auto;
    font-size: 15px;
  }
  .sidebar-foot {
    align-self: center;
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
  }
  .sidebar-foot .avatar,
  .sidebar-foot > div:not(.avatar) { display: none; }
  .sidebar-foot .sign-out-button {
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 8px 11px;
  }
  .sidebar-foot .sign-out-button strong { display: inline; }
  main {
    grid-column: auto;
    padding: 0 12px max(32px, env(safe-area-inset-bottom));
  }
  .topbar {
    gap: 14px;
    padding: 18px 2px;
  }
  .topbar h1 { font-size: 27px; }
  .top-actions .primary {
    padding: 10px 12px;
    white-space: nowrap;
  }
  .welcome {
    align-items: stretch;
    gap: 18px;
    padding-top: 2px;
  }
  .welcome .secondary { align-self: flex-start; }
  .card { padding: 18px; }
  .table-card { padding: 0; }
  th,
  td {
    min-width: 112px;
    padding: 13px 14px;
  }
  th:last-child,
  td:last-child { min-width: 44px; }
  .account-grid .card { min-height: 0; }
  .account-grid dl { grid-template-columns: 100px 1fr; }
}
