/**
 * Fal Hub Filament login — layout and theme tokens (light + dark).
 * Distinct from the reference project: teal / slate mesh, split hero, glass form column.
 */

body:has(.fal-bio-auth-page) .fi-simple-layout {
  background-color: #f0fdfa;
  background-image:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(13, 148, 136, 0.18), transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 10%, rgba(15, 118, 110, 0.12), transparent 50%),
    linear-gradient(165deg, #ecfdf5 0%, #f8fafc 38%, #f1f5f9 100%) !important;
}

.dark body:has(.fal-bio-auth-page) .fi-simple-layout,
html.dark body:has(.fal-bio-auth-page) .fi-simple-layout {
  background-color: #042f2e;
  background-image:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(13, 148, 136, 0.18), transparent 45%),
    linear-gradient(165deg, #022c22 0%, #0f172a 45%, #020617 100%) !important;
}

body:has(.fal-bio-auth-page) .fi-simple-main {
  max-width: min(1040px, 100%) !important;
  width: 100%;
  padding-inline: clamp(1rem, 4vw, 2rem) !important;
  padding-block: clamp(1.5rem, 5vw, 2.5rem) !important;
}

body:has(.fal-bio-auth-page) .fi-simple-header {
  margin-bottom: 0.5rem;
}

body:has(.fal-bio-auth-page) .fi-simple-header-heading {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #0f172a !important;
}

body:has(.fal-bio-auth-page) .fi-simple-header-subheading {
  color: #64748b !important;
  font-size: 0.9375rem !important;
}

.dark body:has(.fal-bio-auth-page) .fi-simple-header-heading,
html.dark body:has(.fal-bio-auth-page) .fi-simple-header-heading {
  color: #f0fdfa !important;
}

.dark body:has(.fal-bio-auth-page) .fi-simple-header-subheading,
html.dark body:has(.fal-bio-auth-page) .fi-simple-header-subheading {
  color: #94a3b8 !important;
}

/* Split shell: decorative column + form stack */
.fal-bio-auth-shell {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 900px) {
  .fal-bio-auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: 2rem;
  }
}

.fal-bio-auth-aside {
  position: relative;
  border-radius: 1.25rem;
  min-height: 20rem;
  overflow: hidden;
  background: linear-gradient(145deg, #0d9488 0%, #115e59 48%, #134e4a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 20px 50px rgba(15, 118, 110, 0.35);
}

@media (min-width: 900px) {
  .fal-bio-auth-aside {
    min-height: 24rem;
  }
}

.fal-bio-auth-aside-inner {
  position: relative;
  z-index: 1;
  min-height: inherit;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  color: #ecfdf5;
}

.fal-bio-auth-aside-logo-area {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.fal-bio-auth-orbit {
  position: absolute;
  inset: -40% -20% auto -30%;
  height: 85%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.55;
  pointer-events: none;
}

.fal-bio-auth-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(204, 251, 241, 0.35) 0%, transparent 65%);
  pointer-events: none;
}

.fal-bio-auth-aside-logo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.fal-bio-auth-aside-logo {
  max-width: min(360px, 92%);
  width: auto;
  height: auto;
  max-height: min(8.5rem, 22vw);
  object-fit: contain;
}

@media (min-width: 900px) {
  .fal-bio-auth-aside-logo {
    max-height: 9.5rem;
  }
}

.fal-bio-auth-aside-logo--dark {
  display: none;
}

.dark .fal-bio-auth-aside-logo--light,
html.dark .fal-bio-auth-aside-logo--light {
  display: none;
}

.dark .fal-bio-auth-aside-logo--dark,
html.dark .fal-bio-auth-aside-logo--dark {
  display: block;
}

.fal-bio-auth-aside-line {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1rem;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 28ch;
  opacity: 0.92;
}

.fal-bio-auth-main {
  border-radius: 1.25rem;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.dark .fal-bio-auth-main,
html.dark .fal-bio-auth-main {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(45, 212, 191, 0.15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 48px rgba(0, 0, 0, 0.35);
}

.fal-bio-auth-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.fal-bio-auth-locale {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.dark .fal-bio-auth-locale,
html.dark .fal-bio-auth-locale {
  background: rgba(255, 255, 255, 0.06);
}

.fal-bio-auth-locale-pill {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease;
}

.fal-bio-auth-locale-pill:hover {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
}

.fal-bio-auth-locale-pill--active {
  color: #f0fdfa !important;
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
}

.dark .fal-bio-auth-locale-pill,
html.dark .fal-bio-auth-locale-pill {
  color: #94a3b8;
}

.dark .fal-bio-auth-locale-pill:hover,
html.dark .fal-bio-auth-locale-pill:hover {
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.12);
}

.fal-bio-auth-form .fi-input-wrp,
.fal-bio-auth-form .fi-fo-field-wrp {
  width: 100%;
}

/* Field polish */
body:has(.fal-bio-auth-page) .fal-bio-auth-field .fi-fo-field-label label {
  font-weight: 600;
  font-size: 0.8125rem;
}

body:has(.fal-bio-auth-page) .fi-btn.fi-color-primary {
  background-image: linear-gradient(135deg, #0d9488, #0f766e) !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
}

body:has(.fal-bio-auth-page) .fi-btn.fi-color-primary:hover {
  filter: brightness(1.05);
}

/* RTL: aside on end for wide layouts */
[dir="rtl"] .fal-bio-auth-shell {
  direction: rtl;
}

[dir="rtl"] .fal-bio-auth-toolbar {
  justify-content: flex-start;
}

@media (min-width: 900px) {
  [dir="rtl"] .fal-bio-auth-shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }

  [dir="rtl"] .fal-bio-auth-aside {
    order: 2;
  }

  [dir="rtl"] .fal-bio-auth-main {
    order: 1;
  }
}
