.portal-auth-page {
  min-height: 100vh;
  background: #fff;
  color: #101828;
}

.portal-auth-page.hidden {
  display: none !important;
}

.portal-auth-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
}

.left-panel,
.portal-auth-left,
.portal-auth-left-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 10%, rgba(var(--portal-brand-primary-rgb, 10, 35, 66), 0.1), transparent 29%),
    radial-gradient(circle at 82% 83%, rgba(var(--portal-brand-primary-rgb, 10, 35, 66), 0.08), transparent 27%),
    color-mix(in srgb, var(--portal-brand-primary, #0A2342) 4%, white);
}

/* Left marketing column — do not rely on Tailwind `lg:flex` (may be absent from build) */
.portal-auth-left-panel {
  display: none;
  min-height: 100vh;
  width: 100%;
  min-width: 0;
  padding: 0;
  flex-direction: column;
  justify-content: stretch;
  border-right: 1px solid rgba(var(--portal-brand-primary-rgb, 10, 35, 66), 0.08);
}

@media (min-width: 1101px) {
  .portal-auth-left-panel {
    display: flex;
  }

  .portal-auth-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  }
}

.portal-auth-left-inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100vh;
  gap: 1.5rem;
  padding: 1.75rem 1.5rem 2rem;
  overflow: visible;
}

@media (min-width: 640px) {
  .portal-auth-left-inner {
    padding: 2rem 2.5rem 2.25rem;
  }
}

@media (min-width: 1024px) {
  .portal-auth-left-inner {
    padding: 2.75rem 3rem 2.5rem 3.5rem;
    max-width: none;
    width: 100%;
  }
}

@media (min-width: 1280px) {
  .portal-auth-left-inner {
    padding: 3.25rem 3.5rem 2.75rem 4.5rem;
  }
}

.portal-auth-left-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 28rem;
}

.portal-auth-left-brand [data-brand-name] {
  font-size: 1.125rem;
  font-weight: 800;
  color: #101828;
  letter-spacing: -0.02em;
}

.portal-auth-left-copy {
  flex: 0 0 auto;
  width: 100%;
  max-width: 28rem;
}

.portal-auth-left-copy .portal-auth-kicker {
  margin: 0 0 10px;
}

.portal-auth-left-copy .portal-auth-title {
  font-size: clamp(1.85rem, 2.8vw, 2.5rem);
  max-width: 22ch;
}

.portal-auth-left-copy .portal-auth-sub {
  margin-top: 0.875rem;
  max-width: 30rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

.portal-auth-left-hero-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
  min-height: 8rem;
  margin-top: auto;
  margin-inline: auto;
  padding-top: 0.75rem;
  overflow: hidden;
}

.portal-auth-left-panel .portal-auth-left-hero-wrap .portal-auth-hero-img,
.portal-auth-left-panel img.portal-auth-hero-img {
  display: block;
  width: 100% !important;
  max-width: 32rem !important;
  height: auto !important;
  max-height: min(40vh, 360px) !important;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
  box-shadow: none !important;
}

.portal-auth-field {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-auth-field:focus {
  border-color: var(--portal-brand-primary, #0A2342);
  box-shadow: 0 0 0 4px rgba(var(--portal-brand-primary-rgb, 10, 35, 66), 0.1);
  outline: none;
}

.portal-auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.portal-auth-brand {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.portal-auth-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.portal-auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html:not([data-brand-has-logo="1"]) [data-brand-logo-image],
html:not([data-brand-has-logo="1"]) [data-brand-logo-wrap],
html:not([data-brand-has-logo="1"]) .portal-auth-logo,
html:not([data-brand-has-logo="1"]) img.brand-logo {
  display: none !important;
}

.portal-auth-kicker {
  margin: 0 0 12px;
  color: var(--portal-brand-primary, #0A2342);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portal-auth-title {
  margin: 0;
  color: #101828;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.04em;
}

.portal-auth-title span {
  color: var(--portal-brand-primary, #0A2342);
}

.portal-auth-sub {
  max-width: 32rem;
  margin: 20px 0 0;
  color: #667085;
  font-size: 16px;
  line-height: 1.7;
}

.portal-auth-right {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 48px 24px;
}

.portal-auth-form {
  width: 100%;
  max-width: 560px;
}

.portal-auth-form-mobile-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 2rem;
}

.portal-auth-form-mobile-brand [data-brand-logo-wrap] {
  margin-inline: auto;
}

.portal-auth-form-mobile-brand [data-brand-logo-wrap].portal-brand-logo-wrap--square,
.portal-auth-form-mobile-brand .portal-auth-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
}

.portal-auth-form-mobile-brand [data-brand-logo-wrap].portal-brand-logo-wrap--wide {
  width: auto;
  max-width: min(100%, 12rem);
  height: auto;
  min-height: 2.75rem;
}

.portal-auth-form-mobile-brand [data-brand-name] {
  display: block;
  width: 100%;
  max-width: min(100%, 22rem);
  margin-inline: auto;
  font-size: clamp(1.375rem, 5.2vw, 1.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.portal-auth-form-heading {
  margin: 0;
  color: #101828;
  font-size: clamp(1.25rem, 4.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.portal-auth-form-heading + p {
  margin-top: 0.5rem;
}

@media (min-width: 1101px) {
  .portal-auth-form-mobile-brand {
    display: none !important;
  }
}

/* Below desktop split: sign-in only (same as mobile), no empty left column */
@media (max-width: 1100px) {
  .portal-auth-grid {
    display: block;
    grid-template-columns: 1fr;
  }

  .portal-auth-left-panel {
    display: none !important;
  }

  .portal-auth-left,
  .portal-auth-left-panel {
    min-height: 0;
  }

  .portal-auth-right {
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
  }

  .portal-auth-trust-copy {
    display: none;
  }
}

@media (max-width: 820px) {
  .portal-auth-left {
    min-height: auto;
  }
  .portal-auth-illustration-wrap {
    max-width: 680px;
    margin-inline: auto;
  }
}

@media (max-width: 540px) {
  .portal-auth-hero {
    margin-inline: -14px;
    width: calc(100% + 28px);
  }
}

/* Staff portal sidebar: fixed brand header, scrollable nav only */
#dashboardPage aside#sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dashboardPage aside#sidebar > .sidebar-header,
#dashboardPage aside#sidebar > .p-6.border-b.border-gray-100 {
  flex-shrink: 0;
  background: #fff;
}

#dashboardPage aside#sidebar #sidebarNav,
#dashboardPage aside#sidebar > nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#dashboardPage aside#sidebar > .sidebar-footer,
#dashboardPage aside#sidebar > .p-4.border-t.border-gray-100 {
  flex-shrink: 0;
  margin-top: 0;
}
.portal-auth-form button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.portal-auth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.portal-auth-google-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
