/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'General Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #F6F7F9;
  color: #1a1a2e;
  min-height: 100vh;
}
.screen { display: none; width: 100%; }
.screen.active { display: block; animation: screenFadeIn 0.35s ease-out; }

/* ── Global persistent Clerk UserButton ──────────────── */
#global-user-button {
  position: fixed;
  top: 0;
  right: 32px;
  height: 53px;
  z-index: 200;
  display: none; /* shown via JS when signed in */
  align-items: center;
}
@media (max-width: 600px) {
  #global-user-button { right: 16px; height: 49px; }
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════
   APP LAYOUT SYSTEM — Shared across all product screens
   ══════════════════════════════════════════════════════ */

/* ── App Navigation Bar ─────────────────────────────── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,247,249,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E5E7EB;
}
.app-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-nav-logo {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.3px;
  background: none;
  border: none;
  cursor: default;
}
.app-nav-home {
  cursor: pointer;
  transition: color 0.15s;
}
.app-nav-home:hover { color: #4361ee; }
.app-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}
.app-nav-back {
  background: none;
  border: none;
  color: #6B7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.app-nav-back:hover {
  color: #4361ee;
  background: rgba(67,97,238,0.06);
}
.app-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding-right: 40px;
}

/* ── Breadcrumb Bar ──────────────────────────────────── */
.breadcrumb-bar {
  background: rgba(246,247,249,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #E5E7EB;
  padding: 0 40px;
}
.breadcrumb-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9CA3AF;
}
.breadcrumb-bar a {
  color: #6B7280;
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: color 0.15s, background 0.15s;
}
.breadcrumb-bar a:hover {
  color: #4361ee;
  background: rgba(67,97,238,0.06);
}
.breadcrumb-sep {
  font-size: 11px;
  color: #D1D5DB;
  user-select: none;
}
.breadcrumb-current {
  color: #374151;
  font-weight: 500;
}
@media (max-width: 768px) {
  .breadcrumb-bar { padding: 0 24px; }
}
@media (max-width: 600px) {
  .breadcrumb-bar { padding: 0 16px; }
  .breadcrumb-bar-inner { font-size: 12px; }
}

/* ── App Sections (full-width bands) ─────────────────── */
.app-section {
  width: 100%;
  padding: 48px 40px;
}
.app-section--white { background: #FFFFFF; }
.app-section--neutral { background: #F6F7F9; }

/* ── App Content Grid ────────────────────────────────── */
.app-grid {
  max-width: 1280px;
  margin: 0 auto;
}
.app-section-center {
  text-align: center;
}

/* ── App Page Headings ───────────────────────────────── */
.app-page-title {
  font-size: 30px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
.app-page-sub {
  font-size: 15px;
  color: #6B7280;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── App Band Heading ────────────────────────────────── */
.app-band-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9CA3AF;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Language Dropdown ────────────────────────────────── */
.lang-toggle {
  position: relative;
  margin-bottom: 0;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.lang-trigger:hover { border-color: #bfc4cc; }
.lang-trigger:focus-visible { outline: 2px solid #4361ee; outline-offset: 2px; }
.lang-toggle.open .lang-trigger { border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.12); }
.lang-trigger-globe {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
}
.lang-trigger-chevron {
  width: 12px; height: 12px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.2s;
}
.lang-toggle.open .lang-trigger-chevron { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
}
.lang-toggle.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-dropdown::-webkit-scrollbar { width: 6px; }
.lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  text-align: left;
}
.lang-option:hover { background: #F3F4F6; }
.lang-option.active { background: #EEF2FF; color: #4361ee; font-weight: 600; }
.lang-option-code {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9CA3AF;
  min-width: 32px;
}
.lang-option.active .lang-option-code { color: #4361ee; }
.lang-option-check {
  margin-left: auto;
  width: 14px; height: 14px;
  opacity: 0;
}
.lang-option.active .lang-option-check { opacity: 1; color: #4361ee; }

/* ── Link Button ─────────────────────────────────────── */
.btn-link {
  background: none;
  border: none;
  color: #4361ee;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.btn-link:hover { text-decoration: underline; }
