/* ============================================================
   FLTF LAYOUT — Auth Pages, Wrappers, Backgrounds
   Depends on: fltf-base.css
   ============================================================ */

/* ── Auth Page Shell ── */
.fltf-auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-8) var(--space-4);
  background: var(--fltf-gradient);
}

/* Subtle watermark / texture overlay */
.fltf-auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(0, 153, 204, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26, 111, 168, 0.14) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

/* Optional: background photo overlay */
.fltf-auth-page[data-bg-photo]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg-photo-url);
  background-size: cover;
  background-position: center;
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

.fltf-auth-page > * {
  position: relative;
  z-index: var(--z-base);
}

/* ── Auth Container Column ── */
.fltf-auth-col {
  width: 100%;
  max-width: 480px;
  /* Ensures card never gets pinched on very narrow screens */
  min-width: 0;
}

/* ── Main Content Area (dashboard pages) ── */
.fltf-main {
  padding: var(--space-6) var(--space-4);
  min-height: calc(100vh - 64px);
  background: var(--fltf-off-white);
}

/* ── Page Header ── */
.fltf-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 2px solid var(--fltf-grey-100);
}

.fltf-page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--fltf-primary);
  margin: 0;
}

.fltf-page-subtitle {
  font-size: var(--text-sm);
  color: var(--fltf-text-muted);
  margin: var(--space-1) 0 0;
}

/* ── Section Wrapper ── */
.fltf-section {
  margin-bottom: var(--space-8);
}

.fltf-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semi);
  color: var(--fltf-primary-dark);
  margin-bottom: var(--space-4);
}

/* ── Responsive Grid helpers ── */
.fltf-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.fltf-grid-2 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(2, 1fr);
}

.fltf-grid-3 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .fltf-grid-2,
  .fltf-grid-3 {
    grid-template-columns: 1fr;
  }

  .fltf-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fltf-main {
    padding: var(--space-4) var(--space-3);
  }
}

@media (max-width: 576px) {
  .fltf-auth-page {
    /* On small screens, start from the top so content is never
       clipped and the page scrolls down to reveal the full card */
    justify-content: flex-start;
    padding: var(--space-6) var(--space-3);
  }

  .fltf-auth-col {
    max-width: 100%;
    width: 100%;
  }
}
