/* Stable desktop authentication surface. Loaded after the shared UI cascade. */
html {
  min-height: 100%;
  background: #050506;
}

body.auth-page {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #050506;
}

.auth-page .auth-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: visible;
  background: #050506;
}

.auth-page .auth-stage {
  display: grid;
  grid-template-columns: minmax(420px, 46%) minmax(0, 54%);
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  gap: 0;
  align-items: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #08080a;
  box-shadow: none;
  transform: none;
  animation: none;
}

.auth-page .auth-panel {
  order: 1;
  display: grid;
  align-content: center;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: clamp(32px, 5vw, 76px);
  gap: 18px;
  overflow: visible;
  background:
    radial-gradient(circle at 16% 8%, rgba(225, 29, 54, 0.12), transparent 30%),
    #09090b;
  transform: none;
  animation: none;
}

.auth-page .auth-visual {
  order: 2;
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: clamp(36px, 5vw, 76px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.55), rgba(5, 5, 6, 0.04) 66%),
    linear-gradient(0deg, rgba(5, 5, 6, 0.88), transparent 58%),
    url("/branding/login-background.png") 58% center / cover no-repeat;
  transform: none;
  animation: none;
}

.auth-page .auth-visual__content {
  width: min(560px, 88%);
}

.auth-page .auth-card {
  width: 100%;
  max-width: 520px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  animation: none;
}

.auth-page .auth-brand,
.auth-page .auth-heading,
.auth-page .auth-card {
  justify-self: start;
}

.auth-page .brand-mark-image {
  filter: none !important;
}

.auth-page .auth-tabs--owner-present {
  display: none !important;
}

.auth-page .auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 12px 0 18px;
}

.auth-page .auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-text-muted, #a1a1aa);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.auth-page .auth-remember-checkbox {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--auth-red, #e11d48);
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
}

.auth-page .auth-form input,
.auth-page .btn-login,
.auth-page .btn-google {
  min-height: 48px;
}

.auth-page .login-error:empty {
  display: none;
}

@media (max-height: 900px) and (min-width: 821px) {
  .auth-page .auth-panel {
    align-content: start;
    padding-top: 22px;
    padding-bottom: 22px;
    gap: 12px;
  }

  .auth-page .brand-mark-image {
    width: 58px;
    height: 58px;
  }

  .auth-page .auth-heading {
    gap: 4px;
  }

  .auth-page .auth-title {
    font-size: 32px;
  }

  .auth-page .auth-tabs {
    margin-bottom: 12px;
  }
}

@media (max-width: 820px) {
  .auth-page .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-page .auth-panel {
    min-height: auto;
    padding: 32px clamp(22px, 7vw, 52px) 44px;
  }

  .auth-page .auth-visual {
    min-height: 260px;
    padding: 30px clamp(22px, 7vw, 52px);
    background-position: 62% 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* First-run setup is a standalone owner experience, not an app page. */
.desktop-setup-body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 88% 10%, rgba(225, 29, 54, 0.13), transparent 28%),
    #050506;
}

.desktop-setup-body .app-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

.desktop-setup-body .app-sidebar,
.desktop-setup-body .mobile-topbar,
.desktop-setup-body .mob-nav-scrim,
.desktop-setup-body .onboarding-overlay,
.desktop-setup-body .command-palette {
  display: none !important;
}

.desktop-setup-body .app-main,
.desktop-setup-body .app-main-content {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
}

.desktop-setup-body .app-main-content {
  padding: clamp(22px, 4vw, 56px);
}

.desktop-setup-body .desktop-setup-page {
  width: 100%;
  padding: 0;
}

.desktop-setup-body .desktop-setup-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.desktop-setup-body .desktop-setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .desktop-setup-body .desktop-setup-grid {
    grid-template-columns: 1fr;
  }
}
