/* ═══════════════════════════════════════════
   styles.css — Global App Styles
   WZNA Church App

   Canonical responsive breakpoints (documented convention, not enforced by
   CSS custom properties -- @media can't consume var()). New responsive
   rules anywhere in the app should target these three values instead of
   inventing a new max-width:
     480px  -- phones
     768px  -- tablets / phone landscape
     1024px -- tablet landscape / small desktop
   Existing rules using other values are legacy and are being consolidated
   toward this scale opportunistically, not rewritten in bulk.
═══════════════════════════════════════════ */

/* ════════════════════════════════
   1. CSS VARIABLES
════════════════════════════════ */
:root {
  --font-app: 'Alan Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-arabic: var(--font-app);
  --font-latin: var(--font-app);
  --font-mono: 'Consolas', 'Courier New', monospace;
  --font: var(--font-app);
  --nav-font: var(--font-app);
  --mdb-font-body: var(--font-app);
  --mdb-font-head: var(--font-app);

  --youth-primary:   #6E59A5;
  --youth-secondary: #9b87f5;
  --youth-accent:    #E5DEFF;
  --youth-light:     #F1F0FB;
  --youth-dark:      #1A1F2C;
  --youth-white:     #fff;

  /* Wazna brand accents (marketing palette) */
  --gold-500:   #D9971F;
  --gold-600:   #b87e17;
  --gold-surface: #FCF1DD;
  --coral-500:  #E2636F;
  --coral-surface: #FBE9EB;
  --teal-500:   #3FA79A;
  --teal-surface: #E7F5F2;

  /* Brand */
  --brand-50:  #f0f4ff; --brand-100: #e0e9ff; --brand-200: #c6d6ff;
  --brand-300: #a3b8ff; --brand-400: #7c90ff; --brand-500: #5865f2;
  --brand-600: #4f46e5; --brand-700: #4338ca; --brand-800: #3730a3;
  --brand-900: #312e81; --brand-950: #1e1b4b;

  /* Success */
  --success-50:  #f0fdf9; --success-100: #ccfbef;
  --success-500: #10b981; --success-600: #059669;

  /* Warning */
  --warning-50:  #fffbeb; --warning-100: #fef3c7;
  --warning-500: #f59e0b; --warning-600: #d97706;

  /* Error */
  --error-500: #ef4444; --error-600: #dc2626;

  /* Neutral */
  --gray-50:  #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280;
  --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937;
  --gray-900: #111827;

  /* Spacing */
  --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-12: 3rem;   --space-16: 4rem;

  /* Radius */
  --radius-sm: .25rem; --radius-md: .5rem;
  --radius-lg: .75rem; --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}


/* ════════════════════════════════
   2. RESET & BASE
════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-app);
  background-color: #f7f7f7;
  color: #333;
  line-height: 1.6;
}

.el-messiri {
  font-family: var(--font-app);
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

:is(
  body,
  h1, h2, h3, h4, h5, h6,
  p, a, span, strong, small,
  button, label, input, textarea, select, option,
  table, th, td, caption,
  dialog, [role="dialog"],
  .navbar, .nav-link, .nav-link--btn, .menu-name,
  .card, .modal, .alert, .toast, .toast-container, .badge, .pagination,
  .btn, .button, .form-control, .form-input, .form-select
) {
  font-family: var(--font-app);
}

:is(input, textarea)::placeholder {
  font-family: var(--font-app);
}

:is(.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"]) {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands";
}

:is(.bi, [class^="bi-"], [class*=" bi-"])::before {
  font-family: "bootstrap-icons";
}


/* ════════════════════════════════
   3. UTILITY CLASSES
════════════════════════════════ */
.cursor-pointer  { cursor: pointer; }
.text-center     { text-align: center; }
.mar-auto        { margin: auto; }
.just-con-center { justify-content: center; }
.just-con-bet    { justify-content: space-between; }
.align-items     { align-items: center; }
.color-primary   { color: var(--youth-primary); }
.pad-10px        { padding: 10px; }
.mar-bottom-3px  { margin-bottom: 3px; }
.mar-bottom-5px  { margin-bottom: 5px; }
.mar-bottom-15px { margin-bottom: 15px; }
.mar-left-90     { margin-left: 90%; }
.width-120px     { width: 120px; }
.width-250       { max-width: 250px; }
.font-size-14px  { font-size: 14px; }
.dis_none        { display: none; }
.dis_block       { display: block; }
.hide            { display: none; }
.red-col         { background-color: var(--error-500); }
.white-color-text{ color: #fff; }
.ul-list-style-none { list-style: none; }
.gap-5           { gap: 5px; }
.heading-h2      { font-size: 2em; }

.flex      { display: flex; }
.flx-wrap  { flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.inactive, .red-font { color: #dc3545; }
.invalid { border-color: #dc3545; }
.pos-relative { position: relative; }


/* ════════════════════════════════
   4. CONTAINER
════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}


/* ════════════════════════════════
   5. NAVBAR
════════════════════════════════ */

:root {
  --nav-glow:      rgba(110,89,165,.28);
  --nav-border:    rgba(110,89,165,.12);
  --nav-pill-bg:   rgba(110,89,165,.07);
  --nav-danger-bg: rgba(220,38,38,.07);
  --nav-sidebar-w: min(85vw, 340px);
  --nav-font:      var(--font-app);
  --nav-trans:     .2s cubic-bezier(.4,0,.2,1);
  --nav-text:      #3f3a56;
  --nav-muted:     #68627d;
  --nav-shadow:    0 1px 10px rgba(26,31,44,.06);
}

/* Mobile backdrop */
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,31,44,.32);
  backdrop-filter: blur(2px);
  z-index: 998;
}
.nav-overlay.visible { display: block; }

/* ── Navbar bar ──
   NO filter/backdrop-filter/transform here —
   those create a stacking context that traps
   position:absolute children inside the bar.
*/
.navbar {
  font-family: var(--nav-font);
  background: #fff;
  border-bottom: 1px solid rgba(110,89,165,.14);
  box-shadow: var(--nav-shadow);
  padding: 0 clamp(1rem, 2vw, 2rem);
  height: 68px;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 500;
  /* overflow must be VISIBLE so dropdowns can escape the bar */
  overflow: visible;
}

/* ── Brand ── */
.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--nav-font); font-weight: 700; font-size: 1.3rem;
  color: var(--youth-primary); text-decoration: none;
  transition: opacity var(--nav-trans); flex-shrink: 0;
  min-width: 74px;
}
.navbar-brand:hover { opacity: .8; }
.navbar .logo {
  width: 58px; height: 58px; background: none; border-radius: 0;
  box-shadow: none; overflow: visible; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.navbar .logo img { width: 100%; height: 100%; object-fit: contain; }

/* ── Nav list ── */
.navbar-nav {
  display: flex; list-style: none; gap: .18rem;
  align-items: center; margin: 0; padding: 0; height: 100%;
  flex: 1;
  overflow: visible; /* must be visible — clips fixed children otherwise */
}

/* nav-item: static by default so fixed dropdowns go to viewport */
.navbar .nav-item  { display: flex; align-items: center; position: static; }
/* only .main-menu is the positioning anchor on desktop */
.navbar .main-menu { position: relative; height: 100%; }

/* ── Nav links ── */
.navbar .nav-link {
  display: flex; align-items: center; gap: .45rem;
  min-height: 44px;
  padding: 0 .72rem;
  font-family: var(--nav-font); font-size: .82rem; font-weight: 500;
  color: var(--nav-muted); text-decoration: none; border-radius: 8px;
  border: none; background: transparent; cursor: pointer;
  white-space: nowrap; line-height: 1; position: relative;
  transition: color var(--nav-trans), background var(--nav-trans), border-color var(--nav-trans);
}
.navbar .nav-link:hover:not(.active) { background: var(--nav-pill-bg); color: var(--youth-primary); }
.navbar .nav-link.active {
  background: transparent;
  color: var(--youth-primary);
  box-shadow: none;
}
.navbar-nav > .nav-item > .nav-link.active::before,
.navbar-nav > .main-menu > .nav-link.active::before,
.navbar-nav > .nav-item > form > .nav-link.active::before {
  content: "";
  position: absolute;
  inset-inline: .7rem;
  bottom: -12px;
  height: 2px;
  border-radius: 2px;
  background: var(--youth-primary);
}

/* Button-style links (forms inside nav) */
.navbar .nav-link--btn {
  font-family: var(--nav-font); font-size: .82rem; font-weight: 500;
  background: none; border: none; padding: 0 .72rem;
  min-height: 44px;
  color: var(--nav-muted); cursor: pointer;
  display: flex; align-items: center; gap: .45rem;
  border-radius: 8px; line-height: 1; position: relative;
  transition: color var(--nav-trans), background var(--nav-trans);
}
.navbar .nav-link--btn:hover { background: var(--nav-pill-bg); color: var(--youth-primary); }
.navbar .nav-link--danger:hover { background: var(--nav-danger-bg) !important; color: #dc2626 !important; }
.navbar .nav-link--danger:hover .nav-icon { stroke: #dc2626; }

/* Icons */
.navbar .nav-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  transition: color var(--nav-trans);
}
.navbar .nav-link:hover .nav-icon,
.navbar .nav-link--btn:hover .nav-icon { color: currentColor; }

.navbar .nav-item--language {
  margin-inline-start: auto;
  padding-inline-start: .7rem;
  border-inline-start: 1px solid rgba(110,89,165,.12);
}

.navbar-profile-avatar {
  padding-inline-start: .25rem;
}

.navbar-notification {
  padding-inline-start: .25rem;
  margin-inline-start: auto;
}

.navbar-notification-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-muted);
  text-decoration: none;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: color var(--nav-trans), background var(--nav-trans);
}

.navbar-notification-link:hover {
  color: var(--youth-primary);
  background: var(--nav-pill-bg);
}

.navbar-notification-badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  line-height: 1;
}

.navbar-avatar-link {
  min-width: 0;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 9999px;
  border: 1px solid rgba(110,89,165,.16);
  background: #fff;
  color: var(--youth-primary);
  text-decoration: none;
  overflow: visible;
  cursor: pointer;
  padding: .18rem .45rem .18rem .2rem;
  transition: border-color var(--nav-trans), box-shadow var(--nav-trans), background var(--nav-trans);
}

.navbar-avatar-link:hover {
  border-color: rgba(110,89,165,.34);
  background: var(--nav-pill-bg);
  box-shadow: 0 4px 12px rgba(110,89,165,.1);
}

.navbar-avatar-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  display: block;
  border-radius: 9999px;
  flex-shrink: 0;
}

.navbar-avatar-img--hidden {
  display: none !important;
}

.navbar-avatar-fallback {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(110,89,165,.12), rgba(155,135,245,.2));
  color: var(--youth-primary);
  line-height: 1;
  border-radius: 9999px;
  flex-shrink: 0;
}

.navbar-avatar-fallback svg {
  width: 56%;
  height: 56%;
}

.navbar-avatar-fallback--hidden {
  display: none !important;
}

.navbar-avatar-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--nav-text);
  font-size: .8rem;
  font-weight: 600;
}

.navbar-avatar-chevron {
  width: 14px;
  height: 14px;
  color: var(--nav-muted);
  flex-shrink: 0;
}

.navbar .nav-item--language > .nav-link {
  min-width: 54px;
  justify-content: center;
}

.navbar .nav-item--language .sub-menu {
  min-width: 120px;
}

/* Dropdown chevron */
.navbar .main-menu > .nav-link::after {
  content: ''; display: inline-block; width: 0; height: 0;
  margin-left: .3rem;
  border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .5; transition: transform var(--nav-trans); flex-shrink: 0;
}
.navbar .main-menu:hover > .nav-link::after { transform: rotate(-180deg); }

/* ════════════════════════════════
   DROPDOWNS — DESKTOP
   position: absolute so they sit
   relative to .main-menu/.nav-item
   and never go off-viewport.
════════════════════════════════ */
.navbar .sub-menu,
.navbar .sub-sub-menu {
  /* hidden until hover / touch-open */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
  transform: translateY(-4px);

  list-style: none;
  position: absolute;
  background: #fff;
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(31,41,55,.12);
  padding: .45rem;
  min-width: 205px;
  z-index: 9999;
}

/* Level-1 dropdown: below the trigger */
.navbar .sub-menu {
  top: calc(100% + 2px);
  right: 0;
}

/* Invisible hover bridge so mouse can travel down */
.navbar .sub-menu::before {
  content: ''; position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}

/* Level-2 dropdown: to the left of parent row */
.navbar .sub-sub-menu {
  top: -6px;
  right: calc(100% + 4px);
  min-width: 175px;
}
.navbar .sub-sub-menu::before {
  content: ''; position: absolute;
  top: 0; bottom: 0; right: -8px; width: 8px;
}

[dir="rtl"] .navbar .main-menu > .nav-link::after {
  margin-right: .3rem;
  margin-left: 0;
}

[dir="rtl"] .navbar .sub-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .navbar .sub-sub-menu {
  right: auto;
  left: calc(100% + 4px);
}

[dir="rtl"] .navbar .sub-sub-menu::before {
  right: auto;
  left: -8px;
}

/* ── Show on desktop hover ── */
.navbar .main-menu:hover > .sub-menu {
  visibility: visible; opacity: 1;
  pointer-events: auto; transform: translateY(0);
}
.navbar .sub-menu .nav-item:hover > .sub-sub-menu {
  visibility: visible; opacity: 1;
  pointer-events: auto; transform: translateY(0);
}

/* ── Show on mobile touch (JS adds .touch-open) ── */
.navbar .main-menu.touch-open > .sub-menu,
.navbar .sub-menu .nav-item.touch-open > .sub-sub-menu {
  visibility: visible; opacity: 1;
  pointer-events: auto; transform: translateY(0);
}

/* Dropdown items */
.navbar .sub-menu > .nav-item,
.navbar .sub-sub-menu > .nav-item { display: block; position: relative; }

.navbar .sub-menu > .nav-item + .nav-item,
.navbar .sub-sub-menu > .nav-item + .nav-item {
  border-top: 1px solid rgba(110,89,165,.06);
  margin-top: .1rem; padding-top: .1rem;
}

.navbar .sub-menu .nav-link,
.navbar .sub-sub-menu .nav-link {
  font-size: .82rem; padding: 0 .7rem; min-height: 38px;
  border-radius: 8px; width: 100%;
  color: var(--nav-text); white-space: nowrap;
  display: flex; align-items: center; gap: .4rem;
}
.navbar .sub-menu .nav-link:hover,
.navbar .sub-sub-menu .nav-link:hover,
.navbar .sub-menu .nav-link.active,
.navbar .sub-sub-menu .nav-link.active {
  background: var(--nav-pill-bg); color: var(--youth-primary);
}

/* Parent row that opens a sub-sub-menu */
.navbar .nav-link--parent {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: .45rem; padding: 0 .7rem; min-height: 38px;
  font-size: .82rem; color: var(--nav-text); border-radius: 8px;
  white-space: nowrap; cursor: default;
  transition: background var(--nav-trans), color var(--nav-trans);
}
.navbar .nav-link--parent:hover { background: var(--nav-pill-bg); color: var(--youth-primary); }
.navbar .sub-arrow {
  opacity: .4; flex-shrink: 0;
  transition: transform var(--nav-trans), opacity var(--nav-trans);
}
.navbar .sub-menu .nav-item:hover > .nav-link--parent .sub-arrow {
  transform: rotate(180deg); opacity: 1;
}

/* ════════════════════════════════
   HAMBURGER BUTTON
════════════════════════════════ */
.mobile-menu-button {
  display: none; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--nav-border);
  border-radius: 8px; padding: .52rem; cursor: pointer;
  color: var(--youth-primary);
  transition: background var(--nav-trans), box-shadow var(--nav-trans);
}
.mobile-menu-button:hover { background: var(--nav-pill-bg); box-shadow: 0 2px 10px rgba(110,89,165,.1); }
.mobile-menu-button svg { display: block; }

/* ════════════════════════════════
   USER INFO
════════════════════════════════ */
.user-info {
  display: flex; align-items: center;
  margin-left: .75rem; padding-left: .75rem;
  border-left: 1px solid var(--gray-200); gap: .4rem; flex-shrink: 0;
}
.user-name { font-size: .82rem; font-weight: 600; color: var(--youth-primary); }
.points-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--youth-accent); color: var(--youth-primary);
  font-size: .72rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 9999px;
}
.user-info.mobile, .user-info.desktop { display: none; }
@media (min-width: 901px) { .user-info.desktop { display: flex; } }

@media (min-width: 901px) and (max-width: 1120px) {
  .navbar { padding-inline: 1rem; gap: .65rem; }
  .navbar .logo { width: 52px; height: 52px; }
  .navbar-nav { gap: .05rem; }
  .navbar .nav-link,
  .navbar .nav-link--btn {
    padding-inline: .52rem;
    font-size: .78rem;
  }
  .navbar .nav-icon { width: 17px; height: 17px; }
}

/* ════════════════════════════════
   MOBILE SIDEBAR  (≤ 900px)
════════════════════════════════ */
@media (max-width: 900px) {
  .mobile-menu-button { display: flex; }
  .user-info.mobile   { display: flex; }
  .user-info          { display: none; }
  .navbar             { padding: 0 1.25rem; }

  /* Icon-only strip from the right */
  .navbar-nav {
    position: fixed; top: 0; right: 0; height: 100dvh;
    width: 56px;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: #fff;
    border-left: 1px solid var(--nav-border);
    box-shadow: -4px 0 24px rgba(110,89,165,.1);
    padding: .4rem .2rem .5rem;
    overflow: visible;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  }

  /* Accent stripe */
  .navbar-nav::before {
    content: ''; display: block; width: 70%; height: 3px;
    background: linear-gradient(90deg, var(--youth-primary), var(--youth-secondary));
    border-radius: 2px; margin-bottom: .3rem; flex-shrink: 0;
  }

  .navbar-nav.open { transform: translateX(0); opacity: 1; pointer-events: all; }

  /* Centered icon items — kill inherited desktop height */
  .navbar-nav > .nav-item,
  .navbar-nav > .main-menu,
  .navbar .main-menu {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: auto !important;
    padding: 0 !important; margin: 0 !important;
    line-height: 1;
  }

  /* Icon-only — hide all text */
  .navbar-nav .menu-name { display: none; }

  /* Square icon buttons — no margin, no padding, tight */
  .navbar-nav .nav-link,
  .navbar-nav .nav-link--btn {
    justify-content: center; padding: 0;
    width: 38px; height: 34px; border-radius: 8px;
    font-size: .82rem; margin: 0;
  }
  .navbar-nav .nav-icon { margin: 0; width: 17px; height: 17px; flex-shrink: 0; }

  /* Hide desktop chevron */
  .navbar .main-menu > .nav-link::after { display: none; }

  /* ── Mobile dropdowns ──
     position:fixed, coords set by nav.js.
     They fly out LEFT of the sidebar.     */
  .navbar .sub-menu,
  .navbar .sub-sub-menu {
    position: fixed !important;
    top: auto !important;
    right: 55px !important;
    left: auto !important;
    bottom: auto !important;
    /* wide enough to never clip text */
    width: calc(100vw - 56px - 8px);
    max-width: 145px;
    min-width: 120px;
    border-radius: 12px 0 0 12px;
    transform: none !important;
    box-shadow: -4px 4px 20px rgba(110,89,165,.2);
  }
    .navbar .sub-sub-menu {
      right: 170px !important;
    }

  /* sub-sub is narrower since it stacks further left */
  .navbar .sub-sub-menu {
    width: calc(100vw - 56px - 8px);
    max-width: 145px;
  }

  /* Show text labels INSIDE the flyout menus */
  .navbar-nav .sub-menu .menu-name,
  .navbar-nav .sub-sub-menu .menu-name { display: block; }
}

@media (max-width: 900px) {
  .navbar {
    justify-content: space-between;
  }

  .navbar .logo {
    width: 54px;
    height: 54px;
  }

  .navbar-brand {
    min-width: auto;
  }

  .navbar-nav {
    width: var(--nav-sidebar-w);
    align-items: stretch;
    gap: .18rem;
    padding: 76px .85rem 1rem;
    overflow-y: auto;
    overflow-x: visible;
    box-shadow: -10px 0 30px rgba(31,41,55,.14);
  }

  .navbar-nav::before {
    content: "";
    position: fixed;
    top: 68px;
    right: .85rem;
    left: .85rem;
    display: block;
    width: auto;
    height: 1px;
    background: rgba(110,89,165,.12);
    border-radius: 0;
    margin: 0;
  }

  .navbar-nav > .nav-item,
  .navbar-nav > .main-menu,
  .navbar .main-menu {
    display: block;
    width: 100%;
  }

  .navbar-nav .menu-name {
    display: block;
  }

  .navbar-nav .nav-link,
  .navbar-nav .nav-link--btn {
    justify-content: flex-start;
    padding: 0 .75rem;
    width: 100%;
    min-height: 44px;
    height: auto;
    border-radius: 8px;
    font-size: .9rem;
  }

  .navbar-nav .nav-icon {
    width: 18px;
    height: 18px;
  }

  .navbar-nav > .nav-item > .nav-link.active::before,
  .navbar-nav > .main-menu > .nav-link.active::before,
  .navbar-nav > .nav-item > form > .nav-link.active::before {
    inset-block: .55rem;
    inset-inline-start: auto;
    inset-inline-end: 0;
    bottom: auto;
    width: 2px;
    height: auto;
  }

  .navbar .nav-item--language {
    margin-inline-start: 0;
    padding-inline-start: 0;
    padding-top: .65rem;
    margin-top: .65rem !important;
    border-inline-start: 0;
    border-top: 1px solid rgba(110,89,165,.12);
  }

  .navbar-profile-avatar {
    order: -2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline-start: 0;
    padding: .35rem 0 1rem !important;
    margin: 0 0 .65rem !important;
    border-bottom: 1px solid rgba(110,89,165,.12);
  }

  .navbar-avatar-link {
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    text-align: center;
  }

  .navbar-avatar-link:hover {
    background: transparent;
    box-shadow: none;
  }

  .navbar-avatar-img,
  .navbar-avatar-fallback {
    width: 78px;
    height: 78px;
    border: 2px solid rgba(110,89,165,.18);
    box-shadow: 0 10px 24px rgba(110,89,165,.14);
  }

  .navbar-avatar-name {
    max-width: 190px;
    font-size: .95rem;
    color: var(--nav-text);
    text-align: center;
    display: block;
  }

  .navbar-avatar-chevron {
    display: none;
  }

  .navbar-notification {
    order: -1;
    position: absolute;
    top: 88px;
    inset-inline-end: 1.35rem;
    width: auto !important;
    padding-inline-start: 0;
    z-index: 2;
  }

  .navbar-notification-link {
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid rgba(110,89,165,.14);
    box-shadow: 0 8px 18px rgba(31,41,55,.08);
  }

  .navbar .sub-menu,
  .navbar .sub-sub-menu {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100%;
    max-width: none;
    min-width: 0;
    border-radius: 8px;
    transform: none !important;
    box-shadow: none;
    border-color: rgba(110,89,165,.1);
    margin: .25rem 0 .5rem;
    padding: .3rem;
    background: rgba(249,250,251,.8);
    display: none;
  }

  .navbar .main-menu.touch-open > .sub-menu,
  .navbar .sub-menu .nav-item.touch-open > .sub-sub-menu {
    display: block;
  }

  .navbar .sub-menu::before,
  .navbar .sub-sub-menu::before {
    display: none;
  }

  .navbar .sub-menu .nav-link,
  .navbar .sub-sub-menu .nav-link,
  .navbar .nav-link--parent {
    min-height: 40px;
    font-size: .86rem;
  }
}

/* Modern WZNA navigation override */
.wazna-navbar {
  direction: inherit;
  height: 68px;
  padding-inline: clamp(2rem, 4vw, 3rem);
}

.wazna-navbar .navbar-brand,
.wazna-navbar .logo {
  display: none;
}

.navbar-mobile-actions,
.navbar-drawer-close-item {
  display: none;
}

.wazna-navbar .navbar-nav {
  flex: 1;
  justify-content: flex-start;
  gap: .35rem;
}

.wazna-navbar .navbar-utility-item:first-of-type {
  margin-inline-start: auto;
}

.wazna-navbar .nav-link,
.wazna-navbar .nav-link--btn {
  min-height: 44px;
  padding-inline: .9rem;
  border-radius: 10px;
  font-size: .86rem;
}

.wazna-navbar .nav-link.active {
  background: rgba(110,89,165,.08);
}

.wazna-navbar .navbar-nav > .nav-item > .nav-link.active::before,
.wazna-navbar .navbar-nav > .main-menu > .nav-link.active::before,
.wazna-navbar .navbar-nav > .nav-item > form > .nav-link.active::before {
  bottom: -16px;
}

.wazna-navbar .nav-item--language {
  margin-inline-start: auto;
  padding-inline-start: .85rem;
  border-inline-start: 1px solid rgba(110,89,165,.12);
}

.wazna-navbar .navbar-mobile-drawer-only {
  display: none;
}

.wazna-navbar .navbar-legacy-language {
  display: none !important;
}

.wazna-navbar .navbar-notification-link:focus-visible,
.wazna-navbar .navbar-avatar-link:focus-visible,
.wazna-navbar .nav-link:focus-visible,
.wazna-navbar .nav-link--btn:focus-visible,
.mobile-menu-button:focus-visible,
.navbar-drawer-close:focus-visible {
  outline: 2px solid rgba(110,89,165,.45);
  outline-offset: 2px;
}

.wazna-navbar .navbar-manage-item {
  margin-inline-start: auto;
  margin-inline-end: clamp(.85rem, 1.8vw, 1.5rem);
  padding-inline-start: .7rem;
  border-inline-start: 1px solid rgba(110,89,165,.12);
}

.wazna-navbar .navbar-manage-trigger {
  min-height: 40px;
  padding-inline: .7rem;
  color: var(--nav-muted);
  font-size: .8rem;
  font-weight: 500;
  background: transparent;
}

.wazna-navbar .navbar-manage-trigger:hover,
.wazna-navbar .navbar-manage-item:hover > .navbar-manage-trigger {
  color: var(--youth-primary);
  background: rgba(110,89,165,.05);
}

.wazna-navbar .navbar-manage-menu {
  min-width: 220px;
  padding: .3rem;
  border-radius: 8px;
}

.wazna-navbar .navbar-manage-menu .nav-link,
.wazna-navbar .navbar-manage-menu .nav-link--parent {
  min-height: 34px;
  padding-inline: .55rem;
  border-radius: 7px;
  gap: .45rem;
  font-size: .78rem;
}

.wazna-navbar .navbar-manage-menu .nav-icon {
  width: 16px;
  height: 16px;
  opacity: .82;
}

.wazna-navbar .navbar-manage-menu .sub-arrow {
  margin-inline-start: auto;
}

.wazna-navbar .navbar-manage-menu .sub-sub-menu {
  min-width: 190px;
  padding: .3rem;
}

.wazna-navbar .navbar-notification {
  margin-inline-start: auto;
  margin-inline-end: clamp(.85rem, 1.8vw, 1.5rem);
}

.wazna-navbar .navbar-manage-item ~ .navbar-notification {
  margin-inline-start: 0;
}

.navbar-drawer-profile {
  display: none !important;
}

.wazna-navbar .navbar-profile-avatar {
  position: relative;
  padding-inline-start: 0;
}

.wazna-navbar .navbar-profile-avatar > .navbar-avatar-link::after {
  display: none;
}

.wazna-navbar .navbar-profile-menu {
  min-width: 180px;
  inset-inline-end: 0;
  padding: .35rem;
  border-radius: 8px;
}

.wazna-navbar .navbar-profile-menu form {
  display: block;
}

.wazna-navbar .navbar-profile-menu .nav-link--btn {
  width: 100%;
}

.wazna-navbar .navbar-profile-menu .nav-link,
.wazna-navbar .navbar-profile-menu .nav-link--btn {
  min-height: 36px;
  padding-inline: .65rem;
  border-radius: 7px;
  font-size: .8rem;
}

.wazna-navbar .navbar-profile-menu-divider {
  height: 1px;
  margin: .25rem .35rem !important;
  padding: 0 !important;
  background: rgba(110,89,165,.12);
  border: 0 !important;
}

.wazna-navbar .navbar-profile-menu .nav-link--parent {
  cursor: pointer;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .wazna-navbar {
    padding-inline: 1.25rem;
  }

  .wazna-navbar .nav-link,
  .wazna-navbar .nav-link--btn {
    padding-inline: .62rem;
    font-size: .8rem;
  }

  .wazna-navbar .navbar-avatar-name {
    max-width: 84px;
  }
}

@media (max-width: 900px) {
  .wazna-navbar {
    height: 64px;
    padding-inline: 1rem;
    justify-content: space-between;
    gap: .75rem;
  }

  .navbar-mobile-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-inline-start: auto;
  }

  .mobile-menu-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
  }

  .mobile-top-notification {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(110,89,165,.14);
    background: #fff;
  }

  .mobile-top-avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9999px;
    border: 1px solid rgba(110,89,165,.16);
    background: #fff;
    color: var(--youth-primary);
    text-decoration: none;
  }

  .mobile-top-avatar .navbar-avatar-img,
  .mobile-top-avatar .navbar-avatar-fallback {
    width: 100%;
    height: 100%;
    border: 0;
    box-shadow: none;
  }

  .wazna-navbar .navbar-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: min(85vw, 340px) !important;
    height: 100dvh !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
    padding: .9rem 1rem 1rem !important;
    background: #fff;
    border-right: 1px solid rgba(110,89,165,.12);
    border-left: 0;
    box-shadow: 14px 0 34px rgba(31,41,55,.16);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transform: translateX(-100%) !important;
    opacity: 1;
    pointer-events: none;
    transition: transform .24s ease-out;
  }

  .wazna-navbar .navbar-nav.open {
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  .wazna-navbar .navbar-nav::before {
    display: none;
  }

  .wazna-navbar .navbar-nav::after {
    content: "";
    order: 19;
    display: block;
    height: 1px;
    margin: .7rem 0 .2rem;
    background: rgba(110,89,165,.12);
  }

  .navbar-drawer-close-item {
    display: flex !important;
    justify-content: flex-end;
    order: -4;
    width: 100%;
    margin-bottom: .35rem !important;
  }

  .navbar-drawer-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--nav-muted);
    cursor: pointer;
  }

  .navbar-drawer-close:hover {
    background: var(--nav-pill-bg);
    color: var(--youth-primary);
  }

  .navbar-drawer-close svg {
    width: 21px;
    height: 21px;
  }

  .wazna-navbar .navbar-profile-avatar {
    display: none !important;
  }

  .wazna-navbar .navbar-drawer-profile {
    order: -3;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center;
    padding: .1rem 0 1.15rem !important;
    margin: 0 0 .85rem !important;
    border-bottom: 1px solid rgba(110,89,165,.1);
  }

  .navbar-drawer-profile-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    color: var(--nav-text);
    text-decoration: none;
  }

  .wazna-navbar .navbar-avatar-link {
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-align: center;
  }

  .wazna-navbar .navbar-avatar-img,
  .wazna-navbar .navbar-avatar-fallback {
    width: 72px;
    height: 72px;
    border: 2px solid rgba(110,89,165,.16);
    box-shadow: 0 10px 24px rgba(110,89,165,.12);
  }

  .wazna-navbar .navbar-avatar-name {
    max-width: 220px;
    color: var(--nav-text);
    font-size: .98rem;
    font-weight: 700;
    text-align: center;
  }

  .wazna-navbar .navbar-avatar-chevron {
    display: block;
    width: 16px;
    height: 16px;
    margin-top: -.25rem;
    transition: transform var(--nav-trans);
  }

  .wazna-navbar .navbar-drawer-profile.touch-open .navbar-avatar-chevron {
    transform: rotate(180deg);
  }

  .wazna-navbar .navbar-notification {
    display: none !important;
  }

  .wazna-navbar .navbar-nav > .nav-item,
  .wazna-navbar .navbar-nav > .main-menu,
  .wazna-navbar .main-menu {
    width: 100%;
    display: block;
  }

  .wazna-navbar .nav-link,
  .wazna-navbar .nav-link--btn,
  .wazna-navbar .nav-link--parent {
    min-height: 50px;
    width: 100%;
    justify-content: flex-start;
    gap: .75rem;
    padding-inline: .9rem;
    border-radius: 14px;
    font-size: .94rem;
  }

  .wazna-navbar .nav-icon {
    width: 20px;
    height: 20px;
  }

  .wazna-navbar .nav-link.active {
    background: rgba(110,89,165,.1);
  }

  .wazna-navbar .navbar-nav > .nav-item > .nav-link.active::before,
  .wazna-navbar .navbar-nav > .main-menu > .nav-link.active::before,
  .wazna-navbar .navbar-nav > .nav-item > form > .nav-link.active::before {
    inset-block: .75rem;
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: 3px;
    height: auto;
    bottom: auto;
  }

  .wazna-navbar .main-menu > .nav-link::after {
    display: inline-block;
    margin-inline-start: auto;
    transform: rotate(-90deg);
  }

  .wazna-navbar .main-menu.touch-open > .nav-link::after {
    transform: rotate(0);
  }

  .wazna-navbar .sub-menu,
  .wazna-navbar .sub-sub-menu {
    position: static !important;
    display: none;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none !important;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: .25rem 0 .45rem;
    padding: .25rem 0 0 .75rem;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .wazna-navbar .main-menu.touch-open > .sub-menu,
  .wazna-navbar .sub-menu .nav-item.touch-open > .sub-sub-menu {
    display: block;
  }

  .wazna-navbar .nav-item--language {
    order: 20;
    margin: .35rem 0 0 !important;
    padding: 0 !important;
    border-top: 0;
    border-inline-start: 0;
  }

  .wazna-navbar .navbar-mobile-drawer-only {
    display: block;
  }

  .wazna-navbar .navbar-legacy-language {
    display: none !important;
  }

  .wazna-navbar .navbar-manage-item {
    order: 18;
    margin: .35rem 0 0 !important;
    padding: .55rem 0 0 !important;
    border-top: 1px solid rgba(110,89,165,.12);
    border-inline-start: 0;
  }

  .wazna-navbar .navbar-manage-trigger {
    min-height: 46px;
    font-size: .88rem;
  }

  .wazna-navbar .navbar-manage-menu .nav-link,
  .wazna-navbar .navbar-manage-menu .nav-link--parent {
    min-height: 42px;
    font-size: .86rem;
  }

  .wazna-navbar .navbar-profile-menu {
    width: 100%;
    margin-top: .55rem;
    padding: .35rem;
    border-radius: 14px;
    background: rgba(110,89,165,.05);
  }

  .wazna-navbar .navbar-drawer-profile > .navbar-profile-menu {
    display: none;
  }

  .wazna-navbar .navbar-drawer-profile.touch-open > .navbar-profile-menu {
    display: block;
  }

  .wazna-navbar .nav-item--language > .nav-link::after,
  .wazna-navbar .navbar-profile-avatar > .navbar-avatar-link::after {
    display: inline-block;
  }
}

body.nav-lock {
  overflow: hidden;
}

@media (max-width: 480px) { .navbar { padding: 0 1rem; } }

/* ════════════════════════════════
   6. BUTTONS
════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .5rem 1rem; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: all .2s ease; text-decoration: none; border: none;
  width: 100%; margin-top: .5rem;
}
.btn-primary   { background-color: var(--youth-primary); color: white; }
.btn-primary:hover { background-color: var(--youth-secondary); }
.btn-secondary { background-color: white; color: #666; border: 1px solid #ccc; }
.btn-secondary:hover { background-color: #f5f5f5; }

.btn-no-width {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .5rem 1rem; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: all .2s ease; text-decoration: none; border: none;
  margin-top: .5rem;
}
.btn-no-width.btn-primary   { background-color: var(--youth-primary); color: white; }
.btn-no-width.btn-primary:hover { background-color: var(--youth-secondary); }

.link { color: var(--youth-primary); font-weight: 500; text-decoration: none; }
.link:hover { color: var(--youth-secondary); text-decoration: underline; }

.btn-primary i{
  padding: 0 10px;
}
/* ════════════════════════════════
   7. CONFIG / AUTH FORMS
   Used by: create-qr, edit-qr,
   create-item, edit-item,
   and all configuration pages
════════════════════════════════ */
.auth-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgb(226,221,255) 0%, rgb(242,239,255) 100%);
}


/* Config pages that sit below navbar */
.auth-container.has-navbar {
  min-height: calc(100vh - 68px);
  justify-content: flex-start;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
/* Sign-in/up logo above form */
.auth-container .logo {
  width: 96px; height: 96px;
  margin-bottom: 1.25rem;
}
.auth-container .logo img { width: 100%; height: 100%; }

.auth-form {
  width: 100%;
  max-width: 750px;
  background-color: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(110,89,165,.12);
}

/* Form header icon + title */
.auth-form-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.auth-form-icon {
  width: 48px; height: 48px;
  background: var(--youth-accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--youth-primary);
  flex-shrink: 0;
}
.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--youth-primary);
  margin: 0 0 2px 0;
  /* gradient text for sign-in */
  background: linear-gradient(90deg, #6E59A5 0%, #9b87f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 1rem;
}
.auth-subtitle {
  font-size: .8rem;
  color: var(--gray-400);
  margin: 0;
}

/* Two-column row inside form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-form { padding: 1.25rem; }
}

/* Form group */
.form-group { margin-bottom: .75rem; }

.form-label {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.form-label i { color: var(--youth-primary); font-size: .8rem; }

/* All inputs, selects, textareas */
.form-input {
  width: 100%;
  padding: .4rem .65rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-family: inherit;
  background: var(--gray-50);
  color: var(--gray-800);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--youth-secondary);
  background: white;
  box-shadow: 0 0 0 3px rgba(155,135,245,.15);
}
.form-input:hover:not(:focus) {
  border-color: var(--gray-300);
}
.form-input.invalid {
  border-color: var(--error-500);
  background: #fff5f5;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }

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

select.form-input { cursor: pointer; }
textarea.form-input {
  resize: none;
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.5;
}

/* Checkbox row */

.checkbox-row-container {
    display: flex;
    gap: 1.5rem; 
    margin-bottom: .75rem;
}
.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem 0;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--youth-primary);
  cursor: pointer;
  margin: 0;
}
.form-check .form-label { margin-bottom: 0; cursor: pointer; }

/* Inline hint below input */
.form-hint {
  display: block;
  font-size: .72rem;
  color: var(--gray-400);
  margin-top: 3px;
  font-style: italic;
}

/* Submit button inside form — full width */
.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  padding: .65rem 1rem;
  margin-top: 1.25rem;
  background: var(--youth-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.form-submit:hover {
  background: var(--youth-secondary);
  box-shadow: 0 4px 12px rgba(110,89,165,.3);
  transform: translateY(-1px);
}

/* Old .btn inside auth-form — keep compatible */
.auth-form .btn { margin-top: 1.25rem; }

/* Label + input general (non-form-group usage) */
.label {
  font-size: .875rem;
  font-weight: 500;
  color: #444;
  margin-bottom: .25rem;
  display: inline-block;
}
.input {
  padding: .5rem .75rem;
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  font-size: .875rem;
  transition: border-color .2s ease;
}
.input:focus {
  outline: none;
  border-color: var(--youth-secondary);
  box-shadow: 0 0 0 2px rgba(155,135,245,.2);
}

/* Form element wrapper (filter bars) */
.form-element {
  background-color: var(--youth-white);
  padding: var(--space-6);
  border-radius: var(--space-5);
}


/* ════════════════════════════════
   8. TABLE (legacy .table class)
════════════════════════════════ */
.table { width: 100%; }
.table thead {
  background-color: var(--youth-primary);
  color: var(--youth-white);
  padding: var(--space-5);
}
.table td { text-align: center; padding: 0 5px; }

@media (max-width: 768px) {
  .mob-hid { display: none; }
  .table thead th { font-size: 12px; }
  .table tbody td { font-size: .9em; }
  .flex-mob { flex-direction: column; }
}


/* ════════════════════════════════
   9. PAGINATION
════════════════════════════════ */
.pagination-link {
  padding: 6px 12px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
  border-radius: var(--radius-sm);
}
.pagination-link:hover,
.active-page {
  background-color: var(--youth-primary);
  color: #fff;
  font-weight: bold;
  border-color: var(--youth-primary);
}


/* ════════════════════════════════
   10. TOAST
════════════════════════════════ */
.toast-container {
  position: fixed; top: 16px; right: 5px;
  z-index: 10002; width: 100%; max-width: 420px;
  padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-2);
  pointer-events: none;
}
.toast {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: var(--space-4);
  display: flex; align-items: flex-start; gap: var(--space-3);
  animation: slideIn .3s ease-out;
  pointer-events: auto;
}
.toast-success { border-left: 4px solid var(--success-500); }
.toast-error   { border-left: 4px solid var(--error-500); }
.toast-content { flex: 1; }
.toast-title   { font-weight: 600; margin-bottom: var(--space-1); }
.toast-message { color: var(--gray-600); font-size: .875rem; }
.toast-close {
  background: none; border: none; font-size: 1.25rem;
  color: var(--gray-600); cursor: pointer; line-height: 1;
  padding: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.toast-close:hover { color: var(--gray-600); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}


/* ════════════════════════════════
   11. MODAL
════════════════════════════════ */
.modal {
  display: none; 
  position: fixed; z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,.7);
  justify-content: center; align-items: center;
}

.modal-content {
  background-color: var(--youth-white); color: var(--youth-primary);
  padding: 20px; border-radius: 8px;
  max-width: 500px; width: 80%;
  position: relative; border: 1px solid #f5c6cb;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
  text-align: center;
}
.modal .confirm-btn { background-color: #059669; }
.modal .cancel-btn  { background-color: #dc2626; }
.modal-btn {
  display: inline-block; padding: 8px 20px;
  border: none; border-radius: var(--radius-md);
  font-size: 1rem; cursor: pointer; transition: all .2s ease;
  color: var(--youth-white);
}
.modal-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.modal .confirm-btn.modal-btn:hover { background-color: #047857; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.modal .cancel-btn.modal-btn:hover  { background-color: #b91c1c; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.close { color: var(--error-500); float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.error-message { font-size: 14px; font-weight: bold; color: #dc3545; margin-top: 10px; line-height: 1.5; }

.modal-dialog {
  background: white; margin: 10% auto; padding: 0;
  width: 90%; max-width: 400px;
  border-radius: 8px; box-shadow: var(--shadow-xl);
}
.modal-header, .modal-footer { padding: 12px 15px; background: #f5f5f5; }
.modal-body   { padding: 15px; }
.modal-header h5 { margin: 0; font-size: 1.1em; font-weight: 600; }
.btn-close {
  float: right; font-size: 1.2em; cursor: pointer;
  border: none; background: none; font-weight: bold;
  padding: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.btn-close:hover { background-color: rgba(0,0,0,.1); border-radius: 50%; }
.modal-footer .btn { padding: 6px 12px; font-size: .85em; min-width: 80px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }

@media (max-width: 768px) {
  .modal-dialog { margin: 5% auto; max-width: 320px; width: 95%; }
  .youth-dialog { margin: auto; width: min(94vw, 450px); }
  .youth-header { padding: 16px 18px; }
  .youth-body { padding: 16px; }
  .youth-footer { padding: 12px 16px; flex-direction: column; }
  .youth-btn { padding: 11px 16px; }
  .reset-password-fields div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 480px) { .modal-dialog { max-width: 280px; margin: 2% auto; } }


/* ════════════════════════════════
   12. YOUTH DELETE MODAL
════════════════════════════════ */
.youth-modal {
  display: none; position: fixed; z-index: 10000;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(26,31,44,.8); backdrop-filter: blur(5px);
  align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.youth-dialog {
  position: relative; background: var(--youth-white);
  margin: auto; padding: 0; width: min(90vw, 450px); max-height: calc(100dvh - 32px);
  border-radius: 12px; box-shadow: 0 20px 40px rgba(110,89,165,.2);
  overflow: hidden; animation: youthSlideIn .3s ease;
  display: flex; flex-direction: column;
}
@keyframes youthSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(.9); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.youth-header {
  background: linear-gradient(135deg, var(--youth-primary), var(--youth-secondary));
  padding: 20px 22px; display: flex; align-items: center; gap: 12px; position: relative;
  flex: 0 0 auto;
}
.youth-warning-icon {
  background: var(--youth-white); border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(110,89,165,.3);
  flex: 0 0 auto;
}
.youth-warning-icon i { font-size: 18px; color: var(--youth-primary); }
.youth-header-content { flex: 1; }
.youth-title    { color: var(--youth-white); margin: 0 0 4px 0; font-size: 1.2em; font-weight: 600; }
.youth-subtitle { color: var(--youth-accent); margin: 0; font-size: .9em; opacity: .9; }
.youth-close {
  position: absolute; right: 16px; top: 16px;
  background: rgba(255,255,255,.2); border: none; color: var(--youth-white);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .3s ease;
  z-index: 2;
}
.youth-close:hover { background: rgba(255,255,255,.3); transform: rotate(90deg); }
html[dir="rtl"] .youth-close {
  right: auto;
  left: 16px;
}
.youth-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.youth-message { text-align: center; margin-bottom: 25px; }
.youth-warning-main   { color: var(--youth-dark); font-size: 1.1em; font-weight: 500; margin: 0 0 10px 0; line-height: 1.4; }
.youth-warning-detail { color: #666; font-size: .95em; margin: 0; line-height: 1.5; }
.youth-verification   { background: var(--youth-light); border-radius: 8px; padding: 20px; border: 1px solid var(--youth-accent); }
.youth-input-group label { color: var(--youth-dark); display: block; margin-bottom: 10px; font-weight: 500; font-size: .95em; text-align: right; }
.youth-input-group label strong { color: var(--youth-primary); font-weight: 600; }
.youth-input {
  width: 100%; padding: 12px 16px;
  background: var(--youth-white); border: 2px solid var(--youth-accent);
  border-radius: 8px; color: var(--youth-dark); font-size: 1em;
  transition: all .3s ease; box-sizing: border-box;
}
.youth-input:focus { outline: none; border-color: var(--youth-primary); box-shadow: 0 0 0 3px rgba(110,89,165,.1); }
.youth-input::placeholder { color: #999; }
.youth-footer {
  display: flex; gap: 12px; padding: 16px 22px; background: var(--youth-light); border-top: 1px solid var(--youth-accent);
  flex: 0 0 auto;
}
.youth-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px; border: none; border-radius: 8px;
  font-weight: 500; cursor: pointer; transition: all .3s ease; flex: 1; font-size: .95em;
}
.youth-btn-cancel  { background: var(--youth-white); color: var(--youth-dark); border: 2px solid var(--youth-accent); }
.youth-btn-cancel:hover { background: var(--youth-accent); border-color: var(--youth-secondary); transform: translateY(-1px); }
.youth-btn-confirm { background: var(--youth-primary); color: var(--youth-white); border: 2px solid var(--youth-primary); }
.youth-btn-confirm:enabled:hover { background: var(--youth-secondary); border-color: var(--youth-secondary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(110,89,165,.3); }
.youth-btn-confirm:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.side-menu-action {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: start;
  font: inherit;
}
.reset-password-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  text-align: start;
}
.reset-password-fields div {
  display: grid;
  grid-template-columns: minmax(100px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--youth-accent);
  border-radius: 8px;
  background: var(--youth-light);
}
.reset-password-fields span {
  color: #666;
  font-size: .9em;
}
.reset-password-fields strong {
  color: var(--youth-dark);
  overflow-wrap: anywhere;
}
.reset-password-value {
  color: var(--youth-primary) !important;
  direction: ltr;
}
.reset-password-message-label {
  display: block;
  margin-bottom: 6px;
  color: var(--youth-dark);
  font-weight: 600;
  font-size: .9em;
  text-align: start;
}
.reset-password-message {
  width: 100%;
  min-height: 96px;
  max-height: 26dvh;
  resize: vertical;
  border: 2px solid var(--youth-accent);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--youth-dark);
  font-family: inherit;
  line-height: 1.5;
}

.reset-password-dialog {
  width: min(92vw, 520px);
}
.youth-success, .youth-error {
  position: fixed; top: 20px; right: 20px;
  padding: 16px 20px; border-radius: 8px;
  z-index: 10001; animation: youthSlideInRight .5s ease;
  display: flex; align-items: center; gap: 10px; max-width: 300px;
  color: var(--youth-white);
}
.youth-success { background: var(--youth-primary); box-shadow: 0 8px 20px rgba(110,89,165,.3); }
.youth-error   { background: #dc3545;               box-shadow: 0 8px 20px rgba(220,53,69,.3); }
@keyframes youthSlideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.youth-loading {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3); border-radius: 50%;
  border-top-color: var(--youth-white);
  animation: youthSpin 1s ease-in-out infinite;
}
@keyframes youthSpin { to { transform: rotate(360deg); } }



/* ════════════════════════════════
   13. LEADERBOARD
════════════════════════════════ */
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s ease;
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item:hover { background-color: rgba(229,222,255,.2); }
.leaderboard-item.top-3 { background-color: rgba(229,222,255,.15); }

.leaderboard-rank {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.75rem; width: 1.75rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 600;
  background-color: #f0f0f0;
  color: #555;
  flex-shrink: 0;
}
.rank-number.top-3 {
  background-color: var(--youth-primary);
  color: white;
}

.leaderboard-points {
  font-weight: 700;
  color: var(--youth-primary);
  background: var(--youth-accent);
  padding: .2rem .65rem;
  border-radius: 9999px;
  font-size: .82rem;
}

/* ════════════════════════════════
   14. CARDS & HERO
════════════════════════════════ */
.card {
  background-color: white; border-radius: .5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.1); overflow: hidden;
}
.card-header {
  background-color: rgba(229,222,255,.6); padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--youth-primary); }

.dashboard-summary {
  margin-bottom: 2rem;
  padding: 1.35rem 0 1.55rem;
}

.dashboard-welcome {
  text-align: center;
  margin-bottom: 1.35rem;
}

.dashboard-welcome-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  color: var(--youth-dark);
  font-size: 1.55rem;
  font-weight: 650;
  line-height: 1.3;
}

.dashboard-welcome-subtitle {
  margin-top: .4rem;
  color: var(--gray-500);
  font-size: .98rem;
}

.summary-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 142px;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid #ECEAF4;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(31,41,55,.05);
}

.summary-card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  flex-shrink: 0;
}

.summary-card-icon svg {
  width: 22px;
  height: 22px;
}

.summary-card--balance .summary-card-icon {
  color: var(--youth-primary);
  background: rgba(110,89,165,.1);
}

.summary-card--ranking .summary-card-icon {
  color: #059669;
  background: rgba(5,150,105,.1);
}

.summary-card--season .summary-card-icon {
  color: #d97706;
  background: rgba(217,119,6,.12);
}

.summary-card-content {
  min-width: 0;
}

.summary-card-label {
  color: var(--gray-500);
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.summary-card-value {
  display: block;
  color: var(--youth-dark);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
}

.summary-card-value--text {
  font-size: 1.2rem;
}

.summary-card-meta {
  display: block;
  color: var(--gray-500);
  font-size: .86rem;
  margin-top: .25rem;
}

.dashboard-summary {
  position: relative;
}

.dashboard-summary .summary-card-grid {
  align-items: stretch;
}

.dashboard-summary .summary-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: stretch;
  min-height: 166px;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}

.dashboard-summary .summary-card::before {
  content: none;
}

.dashboard-summary .summary-card::after {
  content: "";
  position: absolute;
  inset-inline: 1.15rem;
  top: .9rem;
  height: 3px;
  z-index: 1;
  opacity: .55;
  background: var(--summary-accent, var(--youth-primary));
  border-radius: 999px;
}

.dashboard-summary .summary-card:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.dashboard-summary .summary-card--season {
  --summary-accent: #35C6C8;
}

.dashboard-summary .summary-card--ranking {
  --summary-accent: #F4B740;
}

.dashboard-summary .summary-card--balance {
  --summary-accent: #35C6C8;
}

.summary-card-visual {
  position: relative;
  width: 78px;
  min-width: 78px;
  height: 78px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}

.summary-card-visual--season {
  background: linear-gradient(145deg, rgba(155,135,245,.14), rgba(53,198,200,.14));
}

.summary-card-visual--ranking {
  background: linear-gradient(145deg, rgba(244,183,64,.18), rgba(155,135,245,.12));
}

.summary-card-visual--balance {
  background: linear-gradient(145deg, rgba(110,89,165,.16), rgba(14,165,233,.11));
}

.summary-card-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.dashboard-summary .summary-card-label {
  color: var(--gray-600);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 650;
}

.dashboard-summary .summary-card-value {
  color: var(--youth-dark);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 750;
}

.dashboard-summary .summary-card-value--text {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-summary .summary-card-meta {
  color: var(--gray-600);
  font-weight: 550;
}

.summary-card-badge {
  align-self: flex-start;
  padding: .16rem .55rem;
  color: var(--youth-primary);
  background: rgba(110,89,165,.12);
  border-radius: 999px;
}

.summary-blob,
.summary-glow {
  position: absolute;
  inset: 11px;
  border-radius: 999px;
  filter: blur(1px);
  opacity: .7;
}

.summary-blob--season {
  background: rgba(110,89,165,.18);
}

.summary-glow--trophy {
  background: rgba(244,183,64,.18);
}

.summary-glow--plus {
  background: rgba(110,89,165,.18);
}

.summary-calendar {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 46px;
  padding: 14px 8px 8px;
  background: #fff;
  border: 2px solid rgba(53,198,200,.26);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(53,198,200,.12);
}

.summary-calendar-top {
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background: linear-gradient(90deg, var(--youth-secondary), #35C6C8);
  border-radius: 12px 12px 0 0;
}

.summary-calendar-row {
  display: block;
  height: 5px;
  margin-top: 5px;
  background: rgba(53,198,200,.30);
  border-radius: 999px;
}

.summary-calendar-row--short {
  width: 62%;
}

.summary-trophy {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 48px;
}

.summary-trophy-cup {
  position: absolute;
  top: 3px;
  left: 8px;
  width: 30px;
  height: 26px;
  background: linear-gradient(145deg, #FFE08A, #F4B740);
  border-radius: 8px 8px 14px 14px;
  box-shadow: 0 10px 20px rgba(244,183,64,.20);
}

.summary-trophy-cup::before,
.summary-trophy-cup::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 12px;
  height: 14px;
  border: 4px solid #F4B740;
  border-radius: 999px;
}

.summary-trophy-cup::before {
  left: -11px;
  border-right: 0;
}

.summary-trophy-cup::after {
  right: -11px;
  border-left: 0;
}

.summary-trophy-stem {
  position: absolute;
  top: 28px;
  left: 19px;
  width: 8px;
  height: 11px;
  background: #C98612;
  border-radius: 3px;
}

.summary-trophy-base {
  position: absolute;
  left: 10px;
  bottom: 3px;
  width: 26px;
  height: 8px;
  background: #8A5A12;
  border-radius: 999px;
}

.summary-confetti {
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.summary-confetti--one {
  top: 13px;
  right: 14px;
  background: var(--youth-primary);
}

.summary-confetti--two {
  top: 20px;
  left: 11px;
  background: var(--youth-secondary);
  transform: rotate(24deg);
}

.summary-confetti--three {
  right: 18px;
  bottom: 15px;
  background: #c4b5fd;
  transform: rotate(45deg);
}

.summary-plus-mark {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, var(--youth-primary), var(--youth-secondary));
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(110,89,165,.22);
}

.summary-plus-mark::before,
.summary-plus-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 6px;
  background: #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.summary-plus-mark::after {
  width: 6px;
  height: 24px;
}

@media (max-width: 760px) {
  .dashboard-summary {
    padding: 1.1rem 0 1.35rem;
  }

  .summary-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-card {
    min-height: 128px;
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-summary .summary-card {
    min-height: 156px;
  }

  .summary-card-visual {
    width: 64px;
    min-width: 64px;
    height: 64px;
    align-self: flex-start;
  }

  .summary-card--season {
    grid-column: 1 / -1;
  }
}




/* ════════════════════════════════
   15. HOME PAGE — GRID, EVENTS, SCAN
════════════════════════════════ */

/* Grid layout for leaderboard + events */
.grid { display: grid; gap: 2rem; }

@media (min-width: 1024px) {
  .grid-cols-3 { grid-template-columns: 1fr 2fr; }
}

.home-page {
  position: relative;
  padding-top: 1.8rem;
}

.home-page::before {
  content: none;
}

.home-action-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: -1rem 0 1.5rem;
}

.home-action-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 86px;
  padding: 1rem 1.1rem;
  overflow: hidden;
  color: var(--gray-800);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}

.home-action-card::after {
  content: "";
  position: absolute;
  inset-inline: auto 0;
  inset-block: 0;
  width: 4px;
  opacity: .55;
  background: var(--home-action-accent, var(--youth-primary));
}

.home-action-card:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.home-action-card--scan {
  --home-action-accent: linear-gradient(180deg, #35C6C8, var(--youth-secondary));
}

.home-action-card--market {
  --home-action-accent: linear-gradient(180deg, #F4B740, var(--youth-secondary));
}

.home-action-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--youth-primary);
  background: rgba(110,89,165,.1);
  border-radius: 18px;
}

.home-action-card--scan .home-action-icon {
  color: #148C91;
  background: rgba(53,198,200,.13);
}

.home-action-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .12rem;
}

.home-action-copy strong {
  color: var(--youth-dark);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
}

.home-action-copy span {
  color: var(--gray-600);
  font-size: .9rem;
  line-height: 1.35;
}

.home-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(0, 1.7fr);
  gap: 1.35rem;
  align-items: start;
}

.home-panel {
  min-width: 0;
}

.home-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: none;
}

.home-leaderboard-panel .home-card,
.home-events-panel .home-card {
  background: #fbfaff;
  border-color: #ece7ff;
}

.home-card-header {
  min-height: 70px;
  padding: 1rem 1.15rem;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
}

.home-leaderboard-panel .home-card-header,
.home-events-panel .home-card-header {
  background: #f2edff;
  border-bottom-color: #e7ddff;
}

.home-card-header .card-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  color: var(--youth-dark);
  font-size: 1.08rem;
  font-weight: 650;
}

.home-leaderboard-panel .home-card-header .card-title,
.home-events-panel .home-card-header .card-title {
  color: #6E59A5;
}

.home-card-header .card-header-icon {
  width: 21px;
  height: 21px;
  color: var(--gray-600);
  flex-shrink: 0;
}

.home-leaderboard-panel .home-card-header .card-header-icon,
.home-events-panel .home-card-header .card-header-icon {
  color: #6E59A5;
}

.home-section-kicker,
.leaderboard-points-label {
  color: var(--gray-600);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  padding: .42rem .65rem;
  background: var(--gray-100);
  border-radius: 8px;
  white-space: nowrap;
}

.home-leaderboard-panel .leaderboard-points-label,
.home-events-panel .home-section-kicker {
  color: #6E59A5;
  background: #e4dcff;
  border-radius: 999px;
}

.home-leaderboard-list {
  padding: .55rem;
}

.leaderboard-loading {
  padding: 1.25rem;
  color: var(--gray-500);
  text-align: center;
  font-size: .92rem;
}

.home-page .leaderboard-item {
  min-height: 58px;
  padding: .72rem .75rem;
  border: 1px solid transparent;
  border-bottom-color: rgba(229,231,235,.8);
  border-radius: 8px;
  background: #fff;
}

.home-page .leaderboard-item:hover {
  background: #f8f5ff;
  border-color: #e7ddff;
}

.home-page .leaderboard-item.top-3 {
  background: #fff;
  border-color: #eeeaf6;
}

.home-page .rank-number {
  width: 2rem;
  height: 2rem;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 650;
}

.home-page .rank-number.top-3 {
  background: #6E59A5;
  color: #fff;
  box-shadow: none;
}

.home-page .leaderboard-name {
  min-width: 0;
  color: var(--youth-dark);
  font-size: .93rem;
  font-weight: 600;
}

.leaderboard-points-bar {
  min-width: 4rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .55rem;
}

.home-page .leaderboard-points {
  min-width: 2.45rem;
  color: #6E59A5;
  background: #e4dcff;
  border-radius: 999px;
  text-align: center;
  font-weight: 650;
}

.home-event-list {
  display: grid;
  gap: .95rem;
  padding: 1rem;
}

.home-event-card {
  display: grid;
  grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin: 0;
  padding: .75rem;
  background: #fff;
  border: 1px solid #eeeaf6;
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}

.home-event-card:hover {
  background: #fff;
  border-color: #e7ddff;
}

.event-img {
  width: 100%;
  min-height: 138px;
}

.event-image {
  width: 100%;
  height: 100%;
  min-height: 138px;
  max-height: 190px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.event-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: .25rem .2rem;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .55rem;
}

.event-title {
  min-width: 0;
  color: var(--youth-dark);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.25;
}

.event-points {
  flex-shrink: 0;
  color: #6E59A5;
  background: #e4dcff;
  padding: .36rem .62rem;
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.event-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-600);
  font-size: .93rem;
  line-height: 1.55;
  margin-bottom: .85rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-details {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--gray-500);
  font-size: .92rem;
  margin-bottom: 0;
}

.event-location {
  font-size: .95rem;
  font-weight: 500;
  color: var(--youth-primary);
}

.event-price {
  color: var(--gray-700);
  font-size: .95rem;
  font-weight: 600;
}

.event-price strong {
  color: #148C91;
}

.home-empty-state {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: 2rem;
  color: var(--gray-600);
  text-align: center;
  background: linear-gradient(135deg, rgba(249,250,251,.9), rgba(245,243,255,.72));
  border: 1px dashed rgba(110,89,165,.22);
  border-radius: 18px;
}

.home-empty-state strong {
  color: var(--youth-dark);
  font-size: 1.05rem;
  font-weight: 650;
}

.home-empty-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--youth-primary);
  background: rgba(110,89,165,.1);
  border-radius: 16px;
}

@media (max-width: 960px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-page {
    padding-top: 1rem;
  }

  .home-action-strip {
    grid-template-columns: 1fr;
    margin-top: -.35rem;
  }

  .home-event-card {
    grid-template-columns: 1fr;
  }

  .event-image {
    max-height: 230px;
  }
}

@media (max-width: 520px) {
  .home-card-header,
  .event-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-section-kicker,
  .leaderboard-points-label,
  .event-points {
    white-space: normal;
    line-height: 1.25;
  }
}

/* QR Scan Page */
.scan-container {
  background-color: white; border-radius: .5rem;
  overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,.1);
}
.scan-header { background-color: var(--youth-primary); color: white; text-align: center; padding: 1.5rem; }
.scan-content { padding: 1.5rem; }
.scan-placeholder { background-color: #f0f0f0; border-radius: .5rem; padding: 2rem; margin-bottom: 1.5rem; text-align: center; color: #666; }
.scan-info {
  background-color: rgba(229,222,255,.3); border-radius: .5rem;
  padding: 1rem; font-size: .875rem; color: var(--youth-dark);
  display: flex; align-items: flex-start; margin-top: 1.5rem;
}
.scan-info-icon { margin-right: .5rem; flex-shrink: 0; color: var(--youth-primary); }

.scan-success { text-align: center; }
.success-icon-container {
  background-color: #ecfdf5; border-radius: 9999px;
  width: 4rem; height: 4rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem auto;
}
.success-icon   { color: #10b981; }
.success-title  { font-size: 1.25rem; font-weight: 700; color: #10b981; margin-bottom: .25rem; }
.success-points { color: #666; margin-bottom: 1rem; }
.event-details-card { background-color: #f9fafb; border-radius: .5rem; padding: 1rem; text-align: left; margin-bottom: 1.5rem; }

/* ════════════════════════════════
   16. MISC — overlays, spinners, etc.
════════════════════════════════ */
.overlay {
  display: flex; position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  align-items: center; justify-content: center; z-index: 9999;
}
.img-overlay { max-width: 350px; height: 350px; }
.img-overlay-close {
  position: absolute; top: 50px; right: 50px;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: var(--error-500); cursor: pointer;
  font-size: 20px; line-height: 36px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3); color: #fff;
}
.loading-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top: 2px solid white; border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.icon { width: 20px; height: 20px; }

.success-message {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.9);
  opacity: 0; transition: all .3s ease;
  min-width: 300px; max-width: 90vw;
  padding: 1.5rem 2rem;
  background-color: #e6ffed; border: 2px solid #38c172; color: #1b4332;
  border-radius: 8px; font-size: 1.1rem; font-weight: bold;
  text-align: center; z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.success-message.show {
  opacity: 1; transform: translate(-50%,-50%) scale(1);
  animation: fadeOut 3s ease forwards; animation-delay: 2s;
}
@keyframes fadeOut { to { opacity: 0; transform: translate(-50%,-50%) scale(.9); } }

.hiddenList {
  list-style: none; box-shadow: var(--shadow-xl);
  position: absolute; top: 100%; left: 0;
  width: 100%; background: white; z-index: 1000;
  margin: -10px 0 0 0; padding: 0; font-size: .8em;
}
.hiddenList li:hover { background-color: var(--youth-primary); color: #fff; }


/* ════════════════════════════════
   15. PROFILE MANAGEMENT
════════════════════════════════ */
.status { margin-bottom: 10px; }
.status > .card {
  background-color: var(--youth-white); border-radius: var(--radius-md);
  text-align: center; box-shadow: var(--shadow-sm);
  width: 30%; padding: 20px 0; font-weight: bold;
}
.status > .card span { display: block; font-size: var(--space-5); color: var(--youth-primary); font-weight: bold; }

.status > .card.wz-stat-card {
  text-decoration: none;
  color: #2d3748;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.status > .card.wz-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(110, 89, 165, 0.14);
  border-color: #e5deff;
}
.status > .card.wz-stat-card.active-filter {
  border-color: #6E59A5;
  background-color: #f8f6ff;
  box-shadow: 0 4px 14px rgba(110, 89, 165, 0.18);
}
.status > .card.wz-stat-card .wz-stat-card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #4a5568;
}
.status > .card.wz-stat-card .wz-stat-card-val {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.wz-empty-state {
  padding: 40px 20px !important;
  background: #fbfbfe;
}

.profile_manage .filter .searchContainer { position: relative; }
.profile_manage .filter .profileSuggestion {
  list-style: none; box-shadow: var(--shadow-xl);
  position: absolute; top: 100%; left: 0;
  width: 100%; background: white; z-index: 1000;
  margin: 0; padding: 0; display: none;
  max-height: 200px; overflow-y: auto;
}
.profile_manage .filter .profileSuggestion li { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.profile_manage .filter .profileSuggestion li:hover { background-color: var(--youth-primary); color: #fff; }
.profile_manage .profiles { overflow-x: auto; position: relative; }
.profile_manage .profiles .table { font-size: .9em; min-width: 800px; border-collapse: collapse; position: relative; }
.profile_manage .profiles .table th,
.profile_manage .profiles .table td { padding: 8px 10px; border: 1px solid #e0e0e0; vertical-align: middle; }
.profile_manage .profiles .table th:nth-child(1),
.profile_manage .profiles .table td:nth-child(1) { position: sticky; left: 0; z-index: 10; min-width: 60px; text-align: center; }
.profile_manage .profiles .table td:nth-child(1) { z-index: 5; background-color: var(--youth-primary); color: #fff; font-weight: bold; }
.profile_manage .profiles .table th:nth-child(2),
.profile_manage .profiles .table td:nth-child(2) { position: sticky; left: 60px; background-color: white; z-index: 5; box-shadow: 2px 0 5px rgba(0,0,0,.1); min-width: 150px; }
.profile_manage .profiles .table th:nth-child(2) { z-index: 15; }
.profile_manage .profiles .table thead th { position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 2px -1px rgba(0,0,0,.1); }
.profile_manage .profiles .table thead th:nth-child(1) { z-index: 25; }
.profile_manage .profiles .table thead th:nth-child(2) { position: sticky; top: 0; left: 60px; z-index: 25; box-shadow: 2px 2px 5px rgba(0,0,0,.1); background-color: var(--youth-primary); }
.profile_manage .profiles .table th:nth-child(7),
.profile_manage .profiles .table td:nth-child(7),
.profile_manage .profiles .table th:nth-child(8),
.profile_manage .profiles .table td:nth-child(8) { text-align: center; width: 90px; white-space: nowrap; }
.profile_manage .profiles .table_btn { width: auto; min-width: 3.5em; padding: 6px 8px; font-weight: bold; font-size: .85em; margin: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.profile_manage .profiles .table_btn i { font-size: .9em; }
.profile_manage .profiles .table_btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.profile_manage .profiles .table td:nth-child(2) a { color: var(--youth-primary); text-decoration: none; font-weight: 500; }
.profile_manage .profiles .table td:nth-child(2) a:hover { text-decoration: underline; }
.profile_manage .profiles::-webkit-scrollbar       { height: 8px; }
.profile_manage .profiles::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.profile_manage .profiles::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.profile_manage .profiles::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
.profile_manage .side-menu-container {
  font-weight: bold;
  color: var(--youth-primary);
  position: sticky;
  overflow: visible;
}
.profile_manage .side-menu-container.is-open,
.profile_manage .side-menu-container:has(.side-menu:not(.dis_none)) {
  z-index: 1000 !important;
}
.profile_manage .profile-name-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--youth-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  padding: 2px 4px;
  max-width: 100%;
}
.profile_manage .profile-name-toggle:hover,
.profile_manage .profile-name-toggle:focus { color: var(--youth-secondary); outline: none; }
.profile_manage .profile-name-chevron { font-size: .78rem; transition: transform .18s ease; }
.profile_manage .profile-name-toggle[aria-expanded="true"] .profile-name-chevron { transform: rotate(180deg); }
.profile_manage .side-menu {
  width: 255px;
  max-width: calc(100vw - 20px);
  top: var(--profile-menu-top, calc(100% + 6px));
  left: var(--profile-menu-left, auto);
  right: var(--profile-menu-right, auto);
  position: fixed;
  background-color: #fff;
  border: 1px solid #ece8f8;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(31, 25, 58, .18);
  overflow: hidden;
  z-index: 9999;
}
.profile_manage .side-menu ul { list-style: none; padding: 8px 0; margin: 0; }
.profile_manage .side-menu ul li + li { border-top: 1px solid #f2eff9; }
.profile_manage .side-menu ul li a,
.profile_manage .side-menu ul li .side-menu-action {
  color: #252039 !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 18px;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.profile_manage .side-menu ul li a i,
.profile_manage .side-menu ul li .side-menu-action i {
  color: var(--youth-primary);
  font-size: .88rem;
  width: 16px;
  text-align: center;
}
.profile_manage .side-menu ul li a:hover,
.profile_manage .side-menu ul li .side-menu-action:hover {
  background-color: #f8f5ff;
  color: var(--youth-primary) !important;
  text-decoration: none;
}

/* RTL Sticky Columns & Text Alignment */
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(1),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(1) {
  left: auto;
  right: 0;
}
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(2),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(2) {
  left: auto;
  right: 60px;
  box-shadow: -2px 0 5px rgba(0,0,0,.1);
}
html[dir="rtl"] .profile_manage .profiles .table thead th:nth-child(2) {
  left: auto;
  right: 60px;
  box-shadow: -2px 2px 5px rgba(0,0,0,.1);
}
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(2),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(2),
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(3),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(3),
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(4),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(4),
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(5),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(5),
html[dir="rtl"] .profile_manage .profiles .table th:nth-child(6),
html[dir="rtl"] .profile_manage .profiles .table td:nth-child(6) {
  text-align: right;
}
html[dir="rtl"] .profile_manage .side-menu {
  left: var(--profile-menu-left, auto);
  right: var(--profile-menu-right, auto);
}

@media (max-width: 768px) {
  .profile_manage .status > .card { width: 100%; margin-bottom: 10px; padding: 15px 0; font-size: .85em; }
  .profile_manage .status { flex-direction: column; }
  .profile_manage .profiles .table_btn { min-width: 2.8em; padding: 4px 6px; font-size: .75em; margin: 1px; }
  .profile_manage .profiles .table { font-size: .8em; min-width: 600px; }
  .profile_manage .profiles .table th,
  .profile_manage .profiles .table td { padding: 6px 4px; }
  .profile_manage .profiles .table th:nth-child(1),
  .profile_manage .profiles .table td:nth-child(1) { min-width: 50px; left: 0; background-color: var(--youth-primary); color: #fff; }
  .profile_manage .profiles .table th:nth-child(2),
  .profile_manage .profiles .table td:nth-child(2) { min-width: 120px; left: 50px; }
  .profile_manage .profile-name-toggle {
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    padding: 2px;
    text-align: start;
    white-space: normal;
  }
  .profile_manage .side-menu {
    width: min(220px, calc(100vw - 20px));
    border-radius: 7px;
    box-shadow: 0 10px 28px rgba(31, 25, 58, .18);
  }
  .profile_manage .side-menu ul { padding: 5px 0; }
  .profile_manage .side-menu ul li a,
  .profile_manage .side-menu ul li .side-menu-action {
    gap: 7px;
    padding: 8px 11px;
    font-size: .76rem;
    line-height: 1.35;
  }
  .profile_manage .side-menu ul li a i,
  .profile_manage .side-menu ul li .side-menu-action i {
    width: 14px;
    font-size: .76rem;
  }
  html[dir="rtl"] .profile_manage .profiles .table th:nth-child(1),
  html[dir="rtl"] .profile_manage .profiles .table td:nth-child(1) {
    left: auto;
    right: 0;
  }
  html[dir="rtl"] .profile_manage .profiles .table th:nth-child(2),
  html[dir="rtl"] .profile_manage .profiles .table td:nth-child(2) {
    left: auto;
    right: 50px;
  }
  html[dir="rtl"] .profile_manage .profiles .table thead th:nth-child(2) {
    left: auto;
    right: 50px;
  }
}
@media (max-width: 480px) {
  .profile_manage .profiles .table_btn { min-width: 2.5em; padding: 3px 4px; font-size: .7em; }
  .profile_manage .profiles .table { font-size: .75em; min-width: 500px; }
  .profile_manage .profiles .table th:nth-child(1),
  .profile_manage .profiles .table td:nth-child(1) { min-width: 40px; }
  .profile_manage .profiles .table th:nth-child(2),
  .profile_manage .profiles .table td:nth-child(2) { min-width: 100px; left: 40px; }
  .profile_manage .side-menu {
    width: min(190px, calc(100vw - 18px));
  }
  .profile_manage .side-menu ul li a,
  .profile_manage .side-menu ul li .side-menu-action {
    padding: 7px 9px;
    font-size: .72rem;
  }
  .profile_manage .side-menu ul li a i,
  .profile_manage .side-menu ul li .side-menu-action i {
    width: 13px;
    font-size: .72rem;
  }
  html[dir="rtl"] .profile_manage .profiles .table th:nth-child(1),
  html[dir="rtl"] .profile_manage .profiles .table td:nth-child(1) {
    left: auto;
    right: 0;
  }
  html[dir="rtl"] .profile_manage .profiles .table th:nth-child(2),
  html[dir="rtl"] .profile_manage .profiles .table td:nth-child(2) {
    left: auto;
    right: 40px;
  }
  html[dir="rtl"] .profile_manage .profiles .table thead th:nth-child(2) {
    left: auto;
    right: 40px;
  }
}

.page-container-spaced {
  margin-top: 1.5rem;
}

.form-submit-row {
  padding-top: .5rem;
}

.auth-footer-link {
  margin-top: 1rem;
  text-align: center;
  font-size: .875rem;
}

.check-photo {
  margin-left: 70%;
  font-size: 12px;
}

.nav-inline-form {
  display: inline;
}

.leaderboard-points-label {
  color: var(--gray-600);
  font-size: .78rem;
  font-weight: 650;
}

.status-icon-enabled {
  color: green;
}

.status-icon-disabled {
  color: red;
}

.loading-message {
  color: blue;
}

.scan-shell {
  max-width: 32rem;
  margin: 0 auto;
}

.scan-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: .75rem;
}

.scan-subtitle {
  margin-top: .5rem;
}

.scan-frame {
  position: relative;
}

.scan-pulse {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(110, 89, 165, .5);
  border-radius: .375rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .45;
  }
}

.event-details-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: .5rem;
}

.event-details-muted {
  color: #666;
  margin-bottom: .25rem;
}

.event-details-muted-last {
  margin-bottom: 0;
}

.scan-return-link {
  margin-top: 1rem;
}

.btn-no-width.btn-danger {
  background-color: red;
  color: white;
}

/* Arabic typography
   Centralized here so page-level styles can inherit a consistent readable face. */
html[lang="ar"],
html:lang(ar),
[dir="rtl"] {
  --nav-font: var(--font-arabic);
  --font: var(--font-arabic);
  --mdb-font-body: var(--font-arabic);
  --mdb-font-head: var(--font-arabic);
  direction: rtl;
}

html:not([lang="ar"]):not(:lang(ar))[dir="ltr"] {
  direction: ltr;
}

html[lang="ar"] body,
html:lang(ar) body,
[dir="rtl"] body {
  font-family: var(--font-arabic);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0;
  text-align: start;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] :is(
  h1, h2, h3, h4, h5, h6,
  p, a, span, strong, small,
  button, label, input, textarea, select, option,
  table, th, td, caption,
  .navbar, .nav-link, .nav-link--btn, .menu-name,
  .app, .main, .mdb-wrapper,
  .card, .modal, .alert, .toast, .toast-container, .badge, .pagination,
  .btn, .button, .form-control, .form-input, .form-select,
  .quiz-page, .quiz-card, .quiz-btn-create, .quiz-answer-option,
  .att-table, .report-table, .summary-card, .stat-card,
  .mdb-page-title, .mdb-page-sub, .mdb-sprint-label, .mdb-card, .mdb-table
),
html:lang(ar) :is(
  h1, h2, h3, h4, h5, h6,
  p, a, span, strong, small,
  button, label, input, textarea, select, option,
  table, th, td, caption,
  .navbar, .nav-link, .nav-link--btn, .menu-name,
  .app, .main, .mdb-wrapper,
  .card, .modal, .alert, .toast, .toast-container, .badge, .pagination,
  .btn, .button, .form-control, .form-input, .form-select,
  .quiz-page, .quiz-card, .quiz-btn-create, .quiz-answer-option,
  .att-table, .report-table, .summary-card, .stat-card,
  .mdb-page-title, .mdb-page-sub, .mdb-sprint-label, .mdb-card, .mdb-table
),
[dir="rtl"] :is(
  h1, h2, h3, h4, h5, h6,
  p, a, span, strong, small,
  button, label, input, textarea, select, option,
  table, th, td, caption,
  .navbar, .nav-link, .nav-link--btn, .menu-name,
  .app, .main, .mdb-wrapper,
  .card, .modal, .alert, .toast, .toast-container, .badge, .pagination,
  .btn, .button, .form-control, .form-input, .form-select,
  .quiz-page, .quiz-card, .quiz-btn-create, .quiz-answer-option,
  .att-table, .report-table, .summary-card, .stat-card,
  .mdb-page-title, .mdb-page-sub, .mdb-sprint-label, .mdb-card, .mdb-table
) {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

html[lang="ar"] :is(.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"]),
html:lang(ar) :is(.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"]),
[dir="rtl"] :is(.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"]) {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands";
}

html[lang="ar"] :is(h1, h2, h3, .page-title, .section-title, .auth-title, .quiz-hero-text h1, .mdb-page-title, .scan-title),
html:lang(ar) :is(h1, h2, h3, .page-title, .section-title, .auth-title, .quiz-hero-text h1, .mdb-page-title, .scan-title),
[dir="rtl"] :is(h1, h2, h3, .page-title, .section-title, .auth-title, .quiz-hero-text h1, .mdb-page-title, .scan-title) {
  font-weight: 700;
  line-height: 1.35;
}

html[lang="ar"] :is(label, button, .btn, .button, input, select, textarea, .form-control, .form-input, .form-select),
html:lang(ar) :is(label, button, .btn, .button, input, select, textarea, .form-control, .form-input, .form-select),
[dir="rtl"] :is(label, button, .btn, .button, input, select, textarea, .form-control, .form-input, .form-select) {
  font-weight: 500;
  line-height: 1.55;
}

html[lang="ar"] :is(.navbar .nav-link, .navbar .nav-link--btn, th, thead, .table th, .report-table th),
html:lang(ar) :is(.navbar .nav-link, .navbar .nav-link--btn, th, thead, .table th, .report-table th),
[dir="rtl"] :is(.navbar .nav-link, .navbar .nav-link--btn, th, thead, .table th, .report-table th) {
  font-weight: 600;
  line-height: 1.45;
}

html[lang="ar"] :is(.points-badge, .rank-number, .leaderboard-points, .summary-card-value, .stat-value, .metric-value, .pt),
html:lang(ar) :is(.points-badge, .rank-number, .leaderboard-points, .summary-card-value, .stat-value, .metric-value, .pt),
[dir="rtl"] :is(.points-badge, .rank-number, .leaderboard-points, .summary-card-value, .stat-value, .metric-value, .pt) {
  font-weight: 700;
  line-height: 1.2;
}

html[lang="ar"] :is(input, textarea, select),
html:lang(ar) :is(input, textarea, select),
[dir="rtl"] :is(input, textarea, select) {
  direction: rtl;
  text-align: start;
  unicode-bidi: plaintext;
}

html[lang="ar"] :is(input::placeholder, textarea::placeholder),
html:lang(ar) :is(input::placeholder, textarea::placeholder),
[dir="rtl"] :is(input::placeholder, textarea::placeholder) {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  opacity: .78;
}

html[lang="ar"] :is(input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], .ltr, [dir="ltr"]),
html:lang(ar) :is(input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], .ltr, [dir="ltr"]),
[dir="rtl"] :is(input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], .ltr, [dir="ltr"]) {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

html[lang="ar"] :is(td, th, .table-cell, .report-cell),
html:lang(ar) :is(td, th, .table-cell, .report-cell),
[dir="rtl"] :is(td, th, .table-cell, .report-cell) {
  text-align: start;
  vertical-align: middle;
}

/* ════════════════════════════════
   LANDING PAGE (public marketing page at "/")
════════════════════════════════ */
.landing-body { background: #fff; }

.landing-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.landing-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .9rem 1.5rem;
}
.landing-brand {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--youth-primary); text-decoration: none;
  font-size: 1.3rem; font-weight: 700;
}
.landing-logo { height: 34px; width: auto; object-fit: contain; display: block; }
.landing-nav { display: flex; align-items: center; gap: 1.5rem; }
.landing-nav a {
  color: var(--gray-700); text-decoration: none;
  font-size: .92rem; font-weight: 600;
  transition: color .2s ease;
}
.landing-nav a:hover { color: var(--youth-primary); }
.landing-nav-mobile-extras { display: none; }
.landing-header-actions { display: flex; align-items: center; gap: .6rem; }
.landing-lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .7rem; border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  color: var(--gray-700); text-decoration: none; font-size: .8rem; font-weight: 700;
  transition: all .2s ease;
}
.landing-lang-toggle:hover { border-color: var(--youth-secondary); color: var(--youth-primary); }
.landing-mobile-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: #fff; color: var(--youth-primary);
  font-size: 1.1rem; cursor: pointer;
  transition: all .2s ease;
}
.landing-mobile-toggle:hover {
  background: var(--youth-light);
  border-color: var(--youth-secondary);
}

.landing-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: var(--radius-md);
  font-size: .88rem; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  white-space: nowrap;
}
.landing-btn-primary { background: var(--youth-primary); color: #fff; }
.landing-btn-primary:hover { background: #5d4a8c; }
.landing-btn-gold { background: var(--gold-500); color: #fff; }
.landing-btn-gold:hover { background: var(--gold-600); }
.landing-btn-ghost { background: transparent; color: var(--youth-primary); border-color: var(--gray-200); }
.landing-btn-ghost:hover { border-color: var(--youth-secondary); }
.landing-btn-outline { background: #fff; color: var(--youth-primary); border-color: var(--youth-secondary); }
.landing-btn-outline:hover { background: var(--youth-accent); }
.landing-btn-block { width: 100%; }

main { overflow-x: hidden; }

.landing-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--gray-700); font-size: .95rem; font-weight: 600; margin-bottom: .4rem;
}
.landing-eyebrow i { color: var(--gold-500); }
.landing-eyebrow-center { display: flex; justify-content: center; width: 100%; }

.landing-hero {
  background: linear-gradient(135deg, var(--youth-light) 0%, #fdf6ea 45%, var(--youth-accent) 100%);
  padding: 3rem 1.5rem 4rem;
}
.landing-hero-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.landing-why {
  display: block; border-inline-start: 3px solid var(--gold-500);
  padding-inline-start: .9rem; margin: .5rem 0 1rem;
}
.landing-why-label {
  display: block; color: var(--gold-600); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .2rem;
}
.landing-pill {
  display: inline-block; background: var(--youth-accent); color: var(--youth-primary);
  font-weight: 700; font-size: .82rem; padding: .35rem .9rem; border-radius: 9999px;
  margin-bottom: 1rem;
}
.landing-hero h1 {
  font-size: 2.6rem; line-height: 1.15; color: var(--youth-primary);
  font-weight: 800; margin-bottom: 1rem;
}
.landing-hero-body { color: var(--gray-600); font-size: 1.02rem; line-height: 1.6; margin-bottom: 1.5rem; }
.landing-hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.landing-hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 1rem 0;
}

/* Phone Mockup — Pure CSS & SVG */
.phone-mockup {
  position: relative;
  width: 100%;
  max-width: 330px;
  background: #1A1F2C;
  border-radius: 42px;
  padding: 12px;
  box-shadow: 0 25px 60px -15px rgba(26,31,44,.4), 0 0 0 1px rgba(255,255,255,.1);
  border: 4px solid #2d3345;
  user-select: none;
}
.phone-speaker {
  width: 60px;
  height: 5px;
  background: #374151;
  border-radius: 3px;
  margin: 4px auto 10px;
}
.phone-screen {
  background: #ffffff;
  border-radius: 30px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  overflow: hidden;
  position: relative;
  min-height: 420px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-500);
  padding: 0 .25rem;
}
.phone-status-icons {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
}
.phone-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--gray-100);
}
.phone-app-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.phone-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.phone-church-name {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--youth-dark);
  line-height: 1.2;
}
.phone-meeting-name {
  display: block;
  font-size: .68rem;
  color: var(--youth-primary);
  font-weight: 600;
}
.phone-points-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--gold-surface);
  color: var(--gold-600);
  padding: .25rem .55rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 800;
}
.phone-points-pill small {
  font-size: .65rem;
  font-weight: 600;
}
.phone-qr-scanner {
  background: #0f172a;
  border-radius: 16px;
  padding: 1.25rem .75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.3);
}
.phone-scan-viewport {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 14px;
}
.phone-qr-target {
  font-size: 4.8rem;
  color: rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 0 10px rgba(155, 135, 245, 0.6));
}
.phone-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #9b87f5, #FCF1DD, #9b87f5, transparent);
  box-shadow: 0 0 10px #9b87f5;
  animation: scanLine 2.4s ease-in-out infinite alternate;
}
@keyframes scanLine {
  0% { top: 6%; opacity: 0.6; }
  50% { opacity: 1; }
  100% { top: 92%; opacity: 0.6; }
}
.phone-scan-hint {
  margin-top: .75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: .72rem;
  font-weight: 600;
}
.phone-success-toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--success-50);
  border: 1px solid var(--success-100);
  border-radius: 12px;
  padding: .65rem .8rem;
  box-shadow: 0 2px 6px rgba(16,185,129,.1);
}
.phone-toast-icon {
  color: var(--success-500);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.phone-toast-text strong {
  display: block;
  font-size: .76rem;
  color: var(--success-600);
  font-weight: 700;
  line-height: 1.3;
}
.phone-toast-text span {
  display: block;
  font-size: .66rem;
  color: var(--gray-600);
}
.phone-app-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.phone-church-name {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--youth-dark);
  line-height: 1.2;
  white-space: nowrap;
}
.phone-meeting-name {
  display: block;
  font-size: .7rem;
  color: var(--youth-primary);
  font-weight: 600;
  white-space: nowrap;
}
.phone-floating-chip {
  position: absolute;
  background: #ffffff;
  border-radius: 9999px;
  padding: .45rem .85rem;
  box-shadow: 0 10px 24px -4px rgba(26,31,44,.18), 0 0 0 1px rgba(110,89,165,.1);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .74rem;
  font-weight: 700;
  color: var(--youth-dark);
  white-space: nowrap;
  z-index: 5;
  animation: floatChip 4s ease-in-out infinite alternate;
}
.phone-floating-chip-1 {
  top: 10%;
  inset-inline-end: -24px;
  border-inline-start: 3px solid var(--gold-500);
}
.phone-floating-chip-1 i { color: var(--gold-500); }
.phone-floating-chip-2 {
  bottom: 8%;
  inset-inline-start: -24px;
  border-inline-start: 3px solid var(--youth-secondary);
  animation-delay: 2s;
}
.phone-floating-chip-2 i { color: var(--youth-secondary); }
@keyframes floatChip {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.landing-btn-whatsapp {
  background: #25D366;
  color: #ffffff !important;
  border-color: #25D366;
}
.landing-btn-whatsapp:hover {
  background: #20bd5a;
  border-color: #20bd5a;
  color: #ffffff !important;
}

.landing-mission {
  background: var(--youth-light); padding: 3rem 1.5rem; text-align: center;
}
.landing-mission-quote {
  max-width: 760px; margin: 0 auto; color: var(--youth-primary);
  font-size: 1.5rem; font-weight: 600; line-height: 1.5;
}

.landing-stats { background: var(--youth-accent); padding: 2.2rem 1.5rem; }
.landing-stats-grid {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center;
}
.landing-stat {
  padding: 1.25rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.landing-stat:hover {
  transform: translateY(-2px);
}
.landing-stat-number { font-size: 2.1rem; font-weight: 800; color: var(--youth-primary); }
.landing-stat-label { color: var(--gray-700); font-size: .92rem; font-weight: 600; margin-top: .3rem; }
.landing-stat-highlight {
  background: #ffffff;
  border: 1.5px solid var(--gold-500);
  box-shadow: 0 10px 25px -6px rgba(217, 151, 31, 0.25);
  position: relative;
}
.landing-stat-highlight .landing-stat-number {
  color: var(--gold-600);
}

.landing-section { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.landing-section-tint { background: var(--youth-light); max-width: none; }
.landing-section-tint > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.landing-section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.landing-section-head h2 {
  font-size: 1.9rem; color: var(--youth-primary); font-weight: 800; margin-bottom: .5rem;
}
.landing-section-head p { color: var(--gray-600); font-size: 1rem; }
.landing-divider {
  display: inline-flex; color: var(--gold-500); font-size: .8rem; margin-bottom: .75rem;
}
.landing-divider-center { display: flex; justify-content: center; width: 100%; }

.landing-cards-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem;
}
.landing-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-xl);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
}
.landing-card h3 { color: var(--youth-dark); font-size: 1.08rem; font-weight: 700; margin-bottom: .5rem; }
.landing-card p { color: var(--gray-600); font-size: .92rem; line-height: 1.55; }
.landing-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-lg);
  font-size: 1.1rem; margin-bottom: 1rem;
}
.landing-card-icon-rose  { background: #fee2e2; color: var(--error-600); }
.landing-card-icon-brand { background: var(--brand-100); color: var(--brand-700); }
.landing-card-icon-gold  { background: var(--gold-surface); color: var(--gold-600); }
.landing-card-icon-mint  { background: var(--success-100); color: var(--success-600); }
.landing-card-cta {
  background: var(--youth-primary); color: #fff;
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
}
.landing-card-cta i { font-size: 1.3rem; color: var(--youth-accent); }
.landing-card-cta h3 { color: #fff; }
.landing-card-cta p { color: var(--youth-accent); margin-bottom: .5rem; }

.landing-callout {
  background: #fdecec; border-inline-start: 4px solid var(--error-500);
  color: var(--youth-dark); padding: 1.1rem 1.4rem; border-radius: var(--radius-lg);
  font-size: 1.02rem; font-weight: 600;
}
.landing-callout-mint {
  background: var(--success-50); border-inline-start-color: var(--success-500);
}

.landing-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.landing-step {
  background: #fff; border-radius: var(--radius-xl); padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.landing-step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; font-weight: 800; margin-bottom: 1rem;
}
.landing-step-number-1 { background: var(--gold-surface); color: var(--gold-600); }
.landing-step-number-2 { background: #fee2e2; color: var(--error-600); }
.landing-step-number-3 { background: var(--success-100); color: var(--success-600); }
.landing-step-number-4 { background: var(--youth-accent); color: var(--youth-primary); }
.landing-step h3 { color: var(--youth-dark); font-size: 1.02rem; font-weight: 700; margin-bottom: .4rem; }
.landing-step p { color: var(--gray-600); font-size: .88rem; line-height: 1.55; }

.landing-dioceses-grid {
  max-width: 1200px; margin: 0 auto; display: grid;
  grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.landing-dioceses-copy h2 { font-size: 1.9rem; color: var(--youth-primary); font-weight: 800; margin: .4rem 0 1rem; }
.landing-dioceses-copy > p:not(.landing-eyebrow) { color: var(--gray-600); margin-bottom: 1.25rem; line-height: 1.6; }
.landing-dioceses-stack { display: flex; flex-direction: column; gap: 1rem; }
.landing-dioceses-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; box-shadow: var(--shadow-md);
}
.landing-dioceses-card h3 {
  display: flex; align-items: center; gap: .5rem; color: var(--youth-primary);
  font-size: 1.02rem; font-weight: 700; margin-bottom: .3rem;
}
.landing-dioceses-card h3 i { color: var(--gold-500); font-size: .8rem; }
.landing-dioceses-card p { color: var(--gray-600); font-size: .88rem; }

.landing-pricing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 800px; margin: 0 auto;
}
.landing-pricing-card {
  position: relative; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-sm);
}
.landing-pricing-card-best { border: 2px solid var(--gold-500); box-shadow: var(--shadow-lg); }
.landing-best-value {
  position: absolute; top: -.7rem; left: 1.5rem;
  background: var(--gold-500); color: #fff; font-size: .72rem; font-weight: 800;
  padding: .25rem .7rem; border-radius: 9999px;
}
.landing-pricing-card h3 { color: var(--gray-700); font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.landing-price { font-size: 2.1rem; font-weight: 800; color: var(--youth-primary); }
.landing-price-period { color: var(--gray-500); font-size: .85rem; margin-bottom: .5rem; }
.landing-price-note { color: var(--gray-500); font-size: .85rem; margin-bottom: 1.25rem; }
.landing-price-note-good { color: var(--success-600); font-weight: 600; }
.landing-price-features { list-style: none; margin-bottom: 1.5rem; }
.landing-price-features li {
  display: flex; align-items: center; gap: .55rem; padding: .4rem 0;
  color: var(--gray-700); font-size: .9rem;
}
.landing-price-features i { color: var(--success-500); }

.landing-testimonial {
  max-width: 700px; margin: 0 auto 2.5rem; text-align: center;
  background: var(--youth-light); border-radius: var(--radius-xl); padding: 2rem;
}
.landing-testimonial-quote { font-size: 1.15rem; color: var(--youth-dark); line-height: 1.6; margin-bottom: .75rem; }
.landing-testimonial-church { color: var(--gray-500); font-size: .88rem; }
.landing-partners-label { text-align: center; color: var(--gray-500); font-size: .88rem; margin-bottom: 1rem; }
.landing-partners-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.landing-partner-placeholder {
  border: 1px dashed var(--gray-300); border-radius: var(--radius-lg);
  padding: .9rem 1.5rem; color: var(--gray-400); font-size: .82rem;
}

/* Founder / human contact */
.landing-founder-card {
  max-width: 900px; margin: 1.5rem auto 0;
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  background: var(--youth-light); border-radius: var(--radius-xl);
  padding: 2rem; box-shadow: var(--shadow-sm);
  text-align: start;
}
.landing-founder-image {
  width: 140px; height: 140px; object-fit: cover; object-position: top center;
  border-radius: 50%; border: 4px solid #fff;
  box-shadow: 0 10px 25px -8px rgba(26,31,44,.3), 0 0 0 3px var(--gold-500);
  display: block;
}
.landing-founder-copy h3 { color: var(--youth-primary); font-size: 1.3rem; font-weight: 800; margin: .2rem 0 .1rem; }
.landing-founder-role { color: var(--gold-600); font-weight: 700; font-size: .88rem; margin-bottom: .6rem; }
.landing-founder-service { color: var(--gray-600); font-size: .88rem; line-height: 1.5; }
.landing-founder-blurb { color: var(--youth-primary); font-weight: 600; font-size: .95rem; margin: .75rem 0 1rem; }
.landing-whatsapp-btn { border-color: var(--teal-500); color: var(--teal-500); }
.landing-whatsapp-btn:hover { background: var(--teal-surface); }
.landing-whatsapp-btn i { font-size: 1.05rem; }

.landing-footer-whatsapp {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--teal-500); text-decoration: none; font-weight: 700; font-size: .88rem;
  margin: .6rem 0;
}
.landing-footer-whatsapp:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .landing-founder-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

.landing-final-cta {
  max-width: 1100px; margin: 3rem auto; text-align: center;
  background: linear-gradient(135deg, var(--youth-light) 0%, var(--youth-accent) 55%, var(--gold-surface) 100%);
  border-radius: var(--radius-xl); padding: 3rem 2rem;
  overflow: hidden;
}
.landing-final-cta-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center;
  text-align: start;
}
.landing-final-cta h2 { font-size: 1.9rem; color: var(--youth-primary); font-weight: 800; margin-bottom: .5rem; }
.landing-final-cta p { color: var(--gray-600); margin-bottom: 1.5rem; }
.landing-final-cta-buttons { justify-content: flex-start; }
.landing-final-cta-media {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 280px;
}
.landing-final-cta-glow {
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 35% 30%, rgba(217,151,31,.35) 0%, rgba(217,151,31,0) 55%),
    radial-gradient(circle at 65% 70%, rgba(110,89,165,.35) 0%, rgba(110,89,165,0) 60%);
  filter: blur(18px);
  border-radius: 50%;
}
.landing-final-cta-image {
  position: relative; width: 100%; max-width: 340px; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 20px 45px -15px rgba(26,31,44,.35), 0 0 0 3px var(--gold-500);
}
@media (max-width: 900px) {
  .landing-final-cta-grid { grid-template-columns: 1fr; text-align: center; }
  .landing-final-cta-buttons { justify-content: center; }
  .landing-final-cta-media { min-height: 220px; }
  .landing-final-cta-image { max-width: 240px; }
}

.landing-footer { background: var(--youth-light); padding: 2.5rem 1.5rem; margin-top: 2rem; }
.landing-footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.landing-footer-inner .landing-brand { justify-content: center; margin-bottom: .6rem; }
.landing-footer-inner p { color: var(--gray-600); font-size: .88rem; }
.landing-footer-copyright { margin-top: .3rem; color: var(--gray-400) !important; font-size: .8rem !important; }

@media (max-width: 900px) {
  .landing-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--youth-accent);
    box-shadow: 0 16px 32px rgba(26,31,44,.12);
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    z-index: 450;
  }
  .landing-nav.is-open {
    display: flex;
  }
  .landing-nav a {
    font-size: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--gray-100);
  }
  .landing-nav-mobile-extras {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding-top: .6rem;
  }
  .landing-nav-mobile-extras .landing-btn {
    width: 100%;
    text-align: center;
  }
  .landing-mobile-toggle {
    display: inline-flex;
  }
  .landing-nav-signin,
  .landing-nav-cta {
    display: none;
  }
  .landing-hero-grid, .landing-dioceses-grid { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 2rem; }
  .landing-cards-3, .landing-steps { grid-template-columns: 1fr; }
  .landing-stats-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .landing-pricing-grid { grid-template-columns: 1fr; }
  .phone-mockup { max-width: 295px; }
  .phone-floating-chip-1 { inset-inline-start: -8px; }
  .phone-floating-chip-2 { inset-inline-end: -8px; }
}

@media (max-width: 540px) {
  .landing-header-inner { padding: .7rem 1rem; gap: .5rem; }
  .landing-brand span { display: none; }
  .landing-header-actions { gap: .4rem; }
  .landing-lang-toggle span { display: none; }
  .landing-lang-toggle { padding: .4rem .55rem; }
  .landing-btn { padding: .55rem .8rem; font-size: .82rem; }
  .phone-mockup { max-width: 280px; }
  .phone-floating-chip { font-size: .7rem; padding: .4rem .7rem; }
}

@media (max-width: 360px) {
  .phone-mockup { max-width: 260px; padding: 8px; }
  .phone-screen { padding: .75rem; border-radius: 24px; min-height: 380px; }
  .phone-floating-chip { display: none; }
}

/* ===== home: missed sheep (servants) ===== */
.home-sheep-panel .sheep-hint {
  margin: 0 1rem .5rem;
  color: var(--text-muted, #6b7280);
  font-size: .85rem;
}

.sheep-list {
  list-style: none;
  margin: 0;
  padding: 0 .5rem .75rem;
  max-height: 420px;
  overflow-y: auto;
}

.sheep-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .5rem;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.sheep-item:last-child {
  border-bottom: 0;
}

.sheep-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
}

.sheep-name {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.sheep-name strong,
.sheep-name small {
  display: block;
}

.sheep-name small {
  color: var(--text-muted, #6b7280);
}

.sheep-absent {
  flex: 0 0 auto;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  unicode-bidi: isolate;
}

.sheep-absent b {
  font-size: 1.05rem;
}

/* ===== The Lost Dirham: columns per class + verse ===== */
.home-sheep-panel {
  grid-column: 1 / -1;
}

.sheep-verse {
  margin: .5rem auto 1.25rem;
  padding: 0 1rem;
  max-width: 900px;
  background: none;
  border: 0;
  text-align: center;
}

.sheep-verse p {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 2;
}

.sheep-verse cite {
  display: block;
  margin-top: .5rem;
  color: #92400e;
  font-style: normal;
  font-weight: 800;
  font-size: 1.2rem;
}

@media (max-width: 760px) {
  .sheep-verse p {
    font-size: 1.25rem;
  }
}

.sheep-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.sheep-column {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}

.sheep-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: .55rem .8rem;
  background: #f3f4f6;
  font-size: .95rem;
}

.sheep-column-title small {
  min-width: 24px;
  padding: 0 .5rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  text-align: center;
  font-weight: 800;
}

/* ===== home: events as poster cards ===== */
.home-main-grid:not(:has(.home-leaderboard-panel)) .home-events-panel {
  grid-column: 1 / -1;
}

.home-event-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.home-event-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.home-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(110, 89, 165, .16);
}

.home-event-card .event-img {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 10;
  background: #f3f0fa;
}

.home-event-card .event-image {
  height: 100%;
  min-height: 0;
  max-height: none;
  border-radius: 0;
}

.event-badge {
  position: absolute;
  top: .6rem;
  inset-inline-end: .6rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.event-badge--free { color: #148C91; }
.event-badge--paid { color: #b45309; }

.home-event-card .event-body {
  flex: 1;
  justify-content: flex-start;
  gap: .4rem;
  padding: .85rem 1rem 1rem;
}

.home-event-card .event-title {
  margin: 0;
  font-size: 1.02rem;
}

.home-event-card .event-description {
  flex: 1;
  margin: 0;
  font-size: .86rem;
}

.home-event-card .event-points {
  align-self: flex-start;
  margin-top: .25rem;
}

@media (max-width: 760px) {
  .home-event-list {
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    padding: .75rem;
  }

  .home-event-card .event-image {
    max-height: none;
  }
}

@media (max-width: 460px) {
  .home-event-list {
    grid-template-columns: 1fr;
  }
}

/* ===== The Lost Dirham: smaller lists ===== */
.sheep-verse p {
  font-size: 1.35rem;
  line-height: 1.9;
}

.sheep-verse cite {
  font-size: 1rem;
}

.sheep-columns {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .7rem;
  padding: 0 .8rem .8rem;
}

.sheep-column-title {
  padding: .35rem .6rem;
  font-size: .85rem;
}

.sheep-column .sheep-list {
  max-height: 190px;
  padding: 0 .3rem .3rem;
}

.sheep-column .sheep-item {
  gap: .5rem;
  padding: .3rem .35rem;
  font-size: .85rem;
}

.sheep-column .sheep-absent {
  padding: .1rem .5rem;
  font-size: .8rem;
}

.sheep-column .sheep-absent b {
  font-size: .9rem;
}

.sheep-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 0 1rem .8rem;
  color: #6b7280;
  font-size: .85rem;
  text-align: center;
}

/* home: church and meeting of the signed-in user */
.dashboard-place {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  margin: .45rem 0 0;
  font-size: .8rem;
  color: #6b7280;
}

.dashboard-place-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.dashboard-place-item i {
  color: #6E59A5;
  width: 1em;
  text-align: center;
}
