/* Login-only styling for the observed Termix 2.9.2 frontend.
   The :has() scope intentionally stops matching if upstream changes the layout. */
.fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) {
  background-color: #09090b;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .28)), url("/custom/login-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) > .flex.flex-1.overflow-hidden > .bg-sidebar {
  background: rgba(9, 9, 11, .12);
  border-color: rgba(251, 146, 60, .15);
}

.fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) > .flex.flex-1.overflow-hidden > .bg-sidebar > [style*="radial-gradient"] {
  opacity: 0;
}

.fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) .w-full.max-w-sm.flex.flex-col.gap-6 {
  padding: 28px;
  background: rgba(9, 9, 11, .91);
  border: 1px solid rgba(251, 146, 60, .35);
  border-radius: 12px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
}

/* SSO-only center box, observed on Termix 2.9.2, 2026-10-09.
   Require the native rememberSSO checkbox so authenticated screens and other
   login methods are untouched. Keep native errors and event handlers intact. */
.w-full.max-w-sm.flex.flex-col.gap-6:has(#rememberSSO) > .flex.flex-col.gap-5 > .flex.border,
.w-full.max-w-sm.flex.flex-col.gap-6:has(#rememberSSO) > .flex.flex-col.gap-5 > .flex.flex-col.gap-1,
.w-full.max-w-sm.flex.flex-col.gap-6:has(#rememberSSO) > .flex.flex-col.gap-5 > .flex.items-center.justify-between,
.w-full.max-w-sm.flex.flex-col.gap-6:has(#rememberSSO) > .flex.flex-col.gap-5 > .text-center,
.w-full.max-w-sm.flex.flex-col.gap-6:has(#rememberSSO) .flex.flex-col.gap-3 > button:not(.bg-accent-brand) {
  display: none;
}

@media (max-width: 767px) {
  .fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) {
    background-position: 42% center;
  }
  .fixed.inset-0.flex.flex-col.bg-background.overflow-hidden:has(> .flex.flex-1.overflow-hidden > .flex.flex-1.items-center.justify-center) .w-full.max-w-sm.flex.flex-col.gap-6 {
    padding: 22px;
  }
}
