/* =========================================================
   SHAGRDIYAH HOME V2 FINAL
   Ã˜ÂªÃ˜ÂµÃ™â€¦Ã™Å Ã™â€¦ Ã˜Â§Ã™â€žÃ˜ÂµÃ™ÂÃ˜Â­Ã˜Â© Ã˜Â§Ã™â€žÃ˜Â±Ã˜Â¦Ã™Å Ã˜Â³Ã™Å Ã˜Â© Ã˜Â§Ã™â€žÃ˜Â¬Ã˜Â¯Ã™Å Ã˜Â¯: Ã˜Â²Ã˜Â¬Ã˜Â§Ã˜Â¬Ã™Å Ã˜Å’ Ã™â€¦Ã˜Â±Ã˜ÂªÃ˜Â¨Ã˜Å’ Ã˜Â£Ã˜Â®Ã™ÂÃ˜Å’ Ã™Ë†Ã™â€¦Ã˜ÂªÃ™â€ Ã˜Â§Ã˜Â³Ã™â€š
   Ã˜Â¶Ã˜Â¹ Ã™Æ’Ã™Ë†Ã˜Â¯ home.html Ã˜Â§Ã™â€žÃ˜Â¬Ã˜Â¯Ã™Å Ã˜Â¯ Ã™â€¦Ã˜Â¹ Ã™â€¡Ã˜Â°Ã˜Â§ Ã˜Â§Ã™â€žÃ™â‚¬ CSS
   ========================================================= */

:root {
  --home-green: #0F4F3C;
  --home-green-2: #164535;
  --home-cream: #F6F3ED;
  --home-card: rgba(255, 253, 248, 0.66);
  --home-card-strong: rgba(255, 253, 248, 0.86);
  --home-border: rgba(255, 255, 255, 0.50);
  --home-line: rgba(15, 79, 60, 0.13);
  --home-text: #1C2B24;
  --home-muted: #5F6A63;
  --home-shadow: 0 18px 46px rgba(15, 79, 60, 0.12);
  --home-radius: 26px;
}

/* Ã˜Â®Ã™â€žÃ™ÂÃ™Å Ã˜Â© Ã˜Â£Ã™â€ Ã˜Â¸Ã™Â Ã™Ë†Ã˜Â£Ã˜Â®Ã™Â */
body::before {
  filter: saturate(0.92) contrast(0.94) brightness(0.76) !important;
}

body::after {
  background:
    radial-gradient(circle at 35% 8%, rgba(255,255,255,0.34), transparent 24rem),
    linear-gradient(180deg, rgba(246,243,237,0.62), rgba(246,243,237,0.52)),
    rgba(255,255,255,0.18) !important;
}

/* Ã™Ë†Ã˜Â¶Ã˜Â¹ Ã™â€žÃ™Å Ã™â€žÃ™Å  Ã˜Â­Ã™â€šÃ™Å Ã™â€šÃ™Å  Ã˜Â¨Ã˜Â¯Ã™â€ž Ã™â€ Ã™ÂÃ˜Â³ Ã˜Â£Ã™â€žÃ™Ë†Ã˜Â§Ã™â€  Ã˜Â§Ã™â€žÃ™â€ Ã™â€¡Ã˜Â§Ã˜Â±Ã™Å  */
body[data-theme="dark"] {
  --home-card: rgba(18, 35, 30, 0.66);
  --home-card-strong: rgba(20, 40, 34, 0.84);
  --home-border: rgba(255,255,255,0.13);
  --home-line: rgba(255,255,255,0.12);
  --home-text: #F8F4EA;
  --home-muted: #CDC7B8;
  color: var(--home-text) !important;
  background: #071A15 !important;
}

body[data-theme="dark"]::before {
  filter: saturate(0.84) contrast(1.05) brightness(0.44) !important;
}

body[data-theme="dark"]::after {
  background:
    radial-gradient(circle at 35% 8%, rgba(31,90,70,0.18), transparent 26rem),
    linear-gradient(180deg, rgba(6,22,18,0.60), rgba(6,22,18,0.76)),
    rgba(0,0,0,0.18) !important;
}

/* Ã˜Â§Ã™â€žÃ™â€¡Ã™Å Ã˜Â¯Ã˜Â± Ã˜Â§Ã™â€žÃ˜Â¹Ã™â€žÃ™Ë†Ã™Å  */
.topbar {
  min-height: 58px !important;
  padding: 0 0 10px !important;
}

.top-profile {
  gap: .55rem !important;
}

.profile-avatar {
  width: 44px !important;
  height: 44px !important;
}

.profile-copy strong {
  color: var(--home-text) !important;
  font-size: .95rem !important;
}

.profile-copy small {
  color: var(--home-muted) !important;
  font-size: .76rem !important;
}

/* Ã˜Â£Ã˜Â²Ã˜Â±Ã˜Â§Ã˜Â± Ã˜Â§Ã™â€žÃ˜ÂªÃ™â€ Ã˜Â¨Ã™Å Ã™â€¡Ã˜Â§Ã˜Âª Ã™Ë†Ã˜Â§Ã™â€žÃ™Ë†Ã˜Â¶Ã˜Â¹ */
.notify-bell,
.floating-theme-toggle,
.theme-moon-btn {
  width: 42px !important;
  height: 42px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid var(--home-border) !important;
  border-radius: 50% !important;
  color: var(--home-green) !important;
  background: rgba(255,253,248,0.74) !important;
  box-shadow: 0 10px 24px rgba(15,79,60,.10) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.floating-theme-toggle {
  position: fixed !important;
  top: 18px !important;
  inset-inline-start: 18px !important;
  z-index: 30 !important;
}

.notify-bell svg,
.floating-theme-toggle svg,
.theme-moon-btn svg {
  width: 21px !important;
  height: 21px !important;
}

.notify-bell span {
  top: -2px !important;
  right: -2px !important;
  width: 18px !important;
  height: 18px !important;
  font-size: .68rem !important;
  background: var(--home-green) !important;
}

body[data-theme="dark"] .notify-bell,
body[data-theme="dark"] .floating-theme-toggle,
body[data-theme="dark"] .theme-moon-btn {
  color: #F8F4EA !important;
  background: rgba(20,40,34,.78) !important;
  border-color: var(--home-border) !important;
}

/* Ã˜Â§Ã™â€žÃ˜ÂµÃ™ÂÃ˜Â­Ã˜Â© Ã˜Â§Ã™â€žÃ˜Â±Ã˜Â¦Ã™Å Ã˜Â³Ã™Å Ã˜Â© Ã˜Â§Ã™â€žÃ˜Â¬Ã˜Â¯Ã™Å Ã˜Â¯Ã˜Â© */
.dashboard-home.home-v2 {
  width: min(100%, 1120px) !important;
  margin-inline: auto !important;
  display: grid !important;
  gap: 16px !important;
  padding: 0 0 28px !important;
}

/* Ã˜Â¥Ã˜Â®Ã™ÂÃ˜Â§Ã˜Â¡ Ã˜Â¹Ã™â€ Ã˜Â§Ã˜ÂµÃ˜Â± Ã˜Â§Ã™â€žÃ˜ÂªÃ˜ÂµÃ™â€¦Ã™Å Ã™â€¦ Ã˜Â§Ã™â€žÃ™â€šÃ˜Â¯Ã™Å Ã™â€¦ Ã˜Â¥Ã˜Â°Ã˜Â§ Ã˜Â¨Ã™â€šÃ™Å Ã˜Âª */
.home-v2 .dashboard-shortcuts,
.home-v2 .welcome-panorama,
.home-v2 .dashboard-grid {
  display: none !important;
}

/* Ã™Æ’Ã™â€žÃ˜Â§Ã˜Â³ Ã™â€¦Ã™Ë†Ã˜Â­Ã˜Â¯ Ã™â€žÃ™â€žÃ™Æ’Ã˜Â±Ã™Ë†Ã˜Âª */
.home-card,
.home-hero-card {
  border: 1px solid var(--home-border) !important;
  border-radius: var(--home-radius) !important;
  background: var(--home-card) !important;
  box-shadow: var(--home-shadow) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.06) !important;
  overflow: hidden !important;
}

/* Ã˜Â§Ã™â€žÃ™â€¡Ã™Å Ã˜Â±Ã™Ë†: Ã˜ÂµÃ˜ÂºÃ™Å Ã˜Â± Ã™Ë†Ã™â€¦Ã˜Â±Ã˜ÂªÃ˜Â¨ */
.home-hero-card {
  min-height: 168px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 270px !important;
  gap: 16px !important;
  align-items: stretch !important;
  padding: 16px !important;
}

.home-hero-main {
  min-height: 136px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  text-align: center !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.48), transparent 15rem),
    rgba(255,253,248,.46) !important;
}

.home-eyebrow,
.home-card-head span {
  color: var(--home-green-2) !important;
  font-size: .84rem !important;
  font-weight: 900 !important;
}

.home-hero-main h2 {
  margin: .15rem 0 .25rem !important;
  color: var(--home-green) !important;
  font-size: clamp(2.6rem, 5vw, 4.5rem) !important;
  line-height: .95 !important;
  letter-spacing: -1px !important;
}

.home-hero-main p {
  margin: 0 !important;
  color: var(--home-green-2) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
}

body[data-theme="dark"] .home-eyebrow,
body[data-theme="dark"] .home-card-head span,
body[data-theme="dark"] .home-hero-main h2,
body[data-theme="dark"] .home-hero-main p {
  color: var(--home-text) !important;
}

/* Ã˜Â§Ã™â€žÃ˜Â·Ã™â€šÃ˜Â³ Ã˜Â¯Ã˜Â§Ã˜Â®Ã™â€ž Ã˜Â§Ã™â€žÃ™â€¡Ã™Å Ã˜Â±Ã™Ë† */
.home-weather-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: space-between !important;
  gap: 10px !important;
  padding: 16px !important;
  border-radius: 22px !important;
  color: #fffaf1 !important;
  background: linear-gradient(160deg, var(--home-green), var(--home-green-2)) !important;
  box-shadow: 0 14px 28px rgba(15,79,60,.20) !important;
}

.home-weather-card span,
.home-weather-card .weather-row,
.home-weather-card p {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  margin: 0 !important;
  text-align: center !important;
}

.home-weather-card strong {
  display: block !important;
  margin-top: .2rem !important;
  text-align: center !important;
  font-size: 2rem !important;
  font-weight: 900 !important;
}

.home-weather-card b {
  font-weight: 900 !important;
}

/* Ã˜Â§Ã™â€žÃ˜Â´Ã˜Â¨Ã™Æ’Ã˜Â§Ã˜Âª */
.home-primary-grid {
  display: grid !important;
  grid-template-columns: 1.35fr .85fr .95fr !important;
  gap: 16px !important;
}

.home-content-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
}

.home-bottom-grid {
  display: grid !important;
  grid-template-columns: 1.15fr .85fr !important;
  gap: 16px !important;
}

.home-card {
  min-height: 168px !important;
  padding: 16px !important;
  color: var(--home-text) !important;
}

.home-card-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.home-card-head h3 {
  margin: .1rem 0 0 !important;
  color: var(--home-green-2) !important;
  font-size: 1.18rem !important;
  font-weight: 900 !important;
}

.home-card-head svg {
  width: 22px !important;
  height: 22px !important;
  color: var(--home-green) !important;
  opacity: .9 !important;
}

body[data-theme="dark"] .home-card-head h3,
body[data-theme="dark"] .home-card-head svg {
  color: var(--home-text) !important;
}

/* Ã˜Â§Ã™â€žÃ™â€šÃ˜Â·Ã˜Â© */
.home-qattah-card {
  color: #fffaf1 !important;
  background: linear-gradient(160deg, rgba(15,79,60,.96), rgba(22,69,53,.96)) !important;
}

.home-qattah-card .home-card-head h3,
.home-qattah-card .home-card-head span,
.home-qattah-card .home-card-head svg {
  color: #fffaf1 !important;
}

.home-qattah-card .qattah-meter {
  width: 122px !important;
  margin: .25rem auto .65rem !important;
}

.home-qattah-card .qattah-meter strong {
  font-size: 1.85rem !important;
}

.home-qattah-card .qattah-numbers {
  margin: .55rem 0 .75rem !important;
}

.home-qattah-card .qattah-numbers span {
  color: rgba(255,250,241,.82) !important;
}

.home-qattah-card .qattah-numbers b {
  color: #fffaf1 !important;
}

/* Ã˜Â§Ã™â€žÃ˜Â£Ã˜Â¹Ã˜Â¶Ã˜Â§Ã˜Â¡ */
.home-mini-card.members-widget strong {
  display: block !important;
  margin: .2rem 0 .55rem !important;
  color: var(--home-green) !important;
  font-size: 3rem !important;
  line-height: 1 !important;
}

body[data-theme="dark"] .home-mini-card.members-widget strong {
  color: var(--home-text) !important;
}

.member-counts {
  color: var(--home-muted) !important;
  margin: .35rem 0 .85rem !important;
}

/* Ã˜Â§Ã™â€žÃ˜Â³Ã™Ë†Ã˜Â§Ã™â€žÃ™Â */
.mini-messages {
  max-height: 92px !important;
  overflow: hidden !important;
  margin-bottom: .85rem !important;
}

/* Ã˜Â§Ã™â€žÃ™â€¦Ã˜Â¨Ã˜Â§Ã˜Â±Ã™Å Ã˜Â§Ã˜Âª Ã™Ë†Ã˜Â§Ã™â€žÃ˜Â£Ã˜Â®Ã˜Â¨Ã˜Â§Ã˜Â± */
.home-feed-card {
  min-height: 330px !important;
}

.home-feed-card .compact-feed {
  max-height: 235px !important;
  overflow: auto !important;
  padding-inline-end: 2px !important;
}

.compact-feed .match-card,
.compact-feed .news-card,
.compact-feed .list-item-card {
  border: 1px solid var(--home-line) !important;
  border-radius: 18px !important;
  background: rgba(255,253,248,.70) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .compact-feed .match-card,
body[data-theme="dark"] .compact-feed .news-card,
body[data-theme="dark"] .compact-feed .list-item-card {
  background: rgba(255,255,255,.07) !important;
  border-color: var(--home-line) !important;
}

/* Ã˜Â§Ã™â€žÃ˜ÂµÃ™Ë†Ã˜Â± Ã˜Â§Ã™â€žÃ™â€¦Ã™Æ’Ã˜Â³Ã™Ë†Ã˜Â±Ã˜Â© Ã˜ÂªÃ™â€šÃ™â€žÃ™â€ž Ã˜Â§Ã™â€žÃ™â€šÃ˜Â¨Ã˜Â­ Ã˜Â¨Ã˜ÂµÃ˜Â±Ã™Å Ã˜Â§Ã™â€¹ */
.news-card img[src=""],
.news-card img:not([src]) {
  display: none !important;
}

.news-card img {
  max-height: 130px !important;
  background: rgba(255,253,248,.7) !important;
}

/* Ã˜Â§Ã™â€žÃ˜ÂµÃ™â€žÃ˜Â§Ã˜Â© Ã™Ë†Ã˜Â§Ã™â€žÃ˜Â§Ã˜Â®Ã˜ÂªÃ˜ÂµÃ˜Â§Ã˜Â±Ã˜Â§Ã˜Âª */
.home-prayer-card {
  min-height: 185px !important;
}

.prayer-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: .35rem !important;
  margin-bottom: .75rem !important;
}

.prayer-strip .stat {
  padding: .55rem .25rem !important;
  border-radius: 14px !important;
  background: rgba(255,253,248,.64) !important;
}

.prayer-strip .stat strong {
  font-size: .92rem !important;
}

.home-shortcuts-card .quick-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: .6rem !important;
}

.home-shortcuts-card .quick-grid a,
.home-shortcuts-card .quick-grid button {
  min-height: 66px !important;
  border-radius: 16px !important;
  color: var(--home-green-2) !important;
  background: rgba(255,253,248,.72) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .home-shortcuts-card .quick-grid a,
body[data-theme="dark"] .home-shortcuts-card .quick-grid button,
body[data-theme="dark"] .prayer-strip .stat {
  color: var(--home-text) !important;
  background: rgba(255,255,255,.08) !important;
}

/* Ã˜Â§Ã™â€žÃ˜Â£Ã˜Â²Ã˜Â±Ã˜Â§Ã˜Â± */
.dashboard-action {
  min-height: 40px !important;
  border-radius: 14px !important;
  color: var(--home-green-2) !important;
  background: rgba(246,243,237,.78) !important;
  text-decoration: none !important;
  font-weight: 900 !important;
}

.home-qattah-card .dashboard-action {
  color: #fffaf1 !important;
  background: rgba(255,253,248,.14) !important;
}

body[data-theme="dark"] .dashboard-action {
  color: var(--home-text) !important;
  background: rgba(255,255,255,.08) !important;
}

/* Ã˜ÂªÃ™â€ Ã˜Â¸Ã™Å Ã™Â Ã™â€¦Ã™â€  Ã˜Â¢Ã˜Â«Ã˜Â§Ã˜Â± Ã˜Â§Ã™â€žÃ˜ÂªÃ˜ÂµÃ™â€¦Ã™Å Ã™â€¦ Ã˜Â§Ã™â€žÃ™â€šÃ˜Â¯Ã™Å Ã™â€¦ */
.home-v2 .panel-head {
  margin-bottom: 0 !important;
}

/* Ã™â€¦Ã™Ë†Ã˜Â¨Ã˜Â§Ã™Å Ã™â€ž Ã™Ë†Ã˜ÂªÃ˜Â§Ã˜Â¨Ã™â€žÃ˜Âª */
@media (max-width: 1100px) {
  .dashboard-home.home-v2 {
    width: 100% !important;
  }

  .home-primary-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .home-qattah-card {
    grid-column: span 2 !important;
  }
}

@media (max-width: 820px) {
  .main {
    padding: 12px !important;
  }

  .home-hero-card,
  .home-primary-grid,
  .home-content-grid,
  .home-bottom-grid {
    grid-template-columns: 1fr !important;
  }

  .home-qattah-card {
    grid-column: auto !important;
  }

  .home-hero-card {
    min-height: auto !important;
  }

  .home-weather-card {
    min-height: 112px !important;
  }

  .home-feed-card {
    min-height: auto !important;
  }

  .home-feed-card .compact-feed {
    max-height: none !important;
  }

  .prayer-strip {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

@media (max-width: 520px) {
  .dashboard-home.home-v2 {
    gap: 12px !important;
  }

  .home-card,
  .home-hero-card {
    border-radius: 22px !important;
    padding: 13px !important;
  }

  .home-hero-main h2 {
    font-size: 2.75rem !important;
  }

  .home-hero-main p {
    font-size: .92rem !important;
  }

  .home-weather-card strong {
    font-size: 1.55rem !important;
  }

  .home-shortcuts-card .quick-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}



/* =========================================================
   SHAGRDIYAH RESPONSIVE POLISH V200
   Bottom navigation + cleaner glass UI for mobile and desktop
   ========================================================= */

:root {
  color-scheme: light;
  --app-bg: #f6f2ea;
  --app-ink: #17261f;
  --app-muted: #667168;
  --app-green: #0f4f3c;
  --app-green-2: #164535;
  --app-gold: #d7bb76;
  --app-line: rgba(20, 78, 60, .14);
  --app-card: rgba(255, 253, 248, .72);
  --app-card-strong: rgba(255, 253, 248, .88);
  --app-nav: rgba(255, 253, 248, .88);
  --app-shadow: 0 18px 50px rgba(15, 79, 60, .13);
  --app-radius: 24px;
}

body {
  color: var(--app-ink) !important;
  background: var(--app-bg) !important;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background: url("../../images/riyadh-skyline-bg.jpg") center bottom / cover no-repeat;
  filter: saturate(.95) contrast(.98) brightness(.72);
  transform: scale(1.01);
}

body::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 5%, rgba(255,255,255,.48), transparent 24rem),
    linear-gradient(180deg, rgba(246,242,234,.72), rgba(246,242,234,.62) 45%, rgba(246,242,234,.74));
}

.app-shell,
.custom-alert,
.modal-backdrop {
  position: relative;
  z-index: 1;
}

/* Dark mode */
body[data-theme="dark"] {
  --app-bg: #061a14;
  --app-ink: #f8f4ea;
  --app-muted: #c9c1b2;
  --app-green: #71d3ac;
  --app-green-2: #f8f4ea;
  --app-line: rgba(255,255,255,.14);
  --app-card: rgba(15, 31, 26, .72);
  --app-card-strong: rgba(18, 39, 32, .88);
  --app-nav: rgba(14, 31, 26, .90);
  --app-shadow: 0 18px 50px rgba(0,0,0,.30);
  background: #061a14 !important;
  color: var(--app-ink) !important;
}

body[data-theme="dark"]::before {
  filter: saturate(.82) contrast(1.05) brightness(.42);
}

body[data-theme="dark"]::after {
  background:
    radial-gradient(circle at 50% 2%, rgba(31,90,70,.24), transparent 28rem),
    linear-gradient(180deg, rgba(6,26,20,.66), rgba(6,26,20,.80));
}

/* Shell: remove big right sidebar completely */
.app-shell {
  display: block !important;
  grid-template-columns: 1fr !important;
  min-height: 100vh !important;
}

.sidebar {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.sidebar .brand,
.sidebar-logout,
.install {
  display: none !important;
}

/* Bottom navigation works on desktop and mobile */
#bottom-nav.nav {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  z-index: 45 !important;
  width: min(760px, calc(100vw - 28px)) !important;
  min-height: 72px !important;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 26px !important;
  background: var(--app-nav) !important;
  box-shadow: 0 18px 46px rgba(15, 79, 60, .16) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.08) !important;
}

#bottom-nav.nav a {
  min-height: 54px !important;
  padding: 6px 4px !important;
  border-radius: 18px !important;
  display: grid !important;
  place-items: center !important;
  gap: 3px !important;
  color: var(--app-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

#bottom-nav.nav a svg {
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
  color: currentColor !important;
}

#bottom-nav.nav a.active {
  color: #fffaf1 !important;
  background: linear-gradient(160deg, #0f4f3c, #164535) !important;
  box-shadow: 0 12px 24px rgba(15,79,60,.22) !important;
}

body[data-theme="dark"] #bottom-nav.nav a.active {
  color: #061a14 !important;
  background: linear-gradient(160deg, #f8f4ea, #d7bb76) !important;
}

/* Show only 5 primary bottom links by default; rest accessible from settings/profile pages */
#bottom-nav.nav a[href="#news"],
#bottom-nav.nav a[href="#members"],
#bottom-nav.nav a[href="#prayer"] {
  display: none !important;
}

/* Main + topbar */
.main {
  min-width: 0 !important;
  width: min(100%, 1180px) !important;
  margin-inline: auto !important;
  padding: 14px clamp(12px, 3vw, 28px) 112px !important;
  background: transparent !important;
}

.topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 35 !important;
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 0 12px !important;
  background: transparent !important;
  backdrop-filter: none !important;
  direction: ltr !important;
}

.top-actions {
  display: flex !important;
  direction: rtl !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.top-actions h1 {
  color: var(--app-green-2) !important;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem) !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.eyebrow,
.status-pill {
  display: none !important;
}

.top-profile {
  direction: rtl !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 999px !important;
  background: var(--app-card) !important;
  box-shadow: 0 10px 26px rgba(15,79,60,.08) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.profile-avatar {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  border-radius: 50% !important;
  background: rgba(255,253,248,.72) !important;
  overflow: hidden !important;
}

.profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.profile-copy strong {
  color: var(--app-ink) !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
  max-width: 160px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.profile-copy small {
  color: var(--app-muted) !important;
  font-size: .72rem !important;
}

.notify-bell,
.icon-btn,
.floating-theme-toggle,
.theme-moon-btn {
  width: 42px !important;
  height: 42px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 50% !important;
  color: var(--app-green-2) !important;
  background: var(--app-card) !important;
  box-shadow: 0 10px 26px rgba(15,79,60,.08) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.notify-bell svg,
.icon-btn svg,
.floating-theme-toggle svg,
.theme-moon-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.notify-bell span {
  width: 17px !important;
  height: 17px !important;
  top: -2px !important;
  right: -2px !important;
  font-size: .64rem !important;
  background: #0f4f3c !important;
  color: #fff !important;
}

#menuBtn {
  display: none !important;
}

.view {
  padding-top: 0 !important;
}

/* Universal glass cards */
.panel,
.card,
.stat,
.table-wrap,
.chat-box,
.list-item-card,
.content-body,
#chat-box,
.dashboard-card,
.home-card,
.home-hero-card,
.payment-plan-card,
.payment-options,
.payment-total-card {
  border: 1px solid var(--app-line) !important;
  border-radius: var(--app-radius) !important;
  background: var(--app-card) !important;
  box-shadow: var(--app-shadow) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.06) !important;
  color: var(--app-ink) !important;
}

.panel-head h2,
.home-card-head h3,
h1, h2, h3 {
  color: var(--app-green-2) !important;
}

.muted,
.stat span,
.input-group label,
.payment-method-label small,
.payment-total-card span,
.payment-total-card small {
  color: var(--app-muted) !important;
}

/* Homepage old and v2 both become tidy */
.dashboard-home,
.dashboard-home.home-v2 {
  width: min(100%, 1120px) !important;
  margin-inline: auto !important;
  display: grid !important;
  gap: 16px !important;
  padding: 0 0 28px !important;
}

.dashboard-shortcuts {
  display: none !important;
}

.welcome-panorama,
.home-hero-card {
  min-height: 170px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 250px !important;
  align-items: stretch !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 28px !important;
  background: var(--app-card) !important;
  box-shadow: var(--app-shadow) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  overflow: hidden !important;
}

.welcome-center,
.home-hero-main {
  grid-column: auto !important;
  min-height: 138px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  text-align: center !important;
  padding: 0 !important;
  border-radius: 22px !important;
  background: rgba(255,253,248,.42) !important;
  text-shadow: none !important;
}

.welcome-center span,
.home-eyebrow,
.home-card-head span {
  color: var(--app-green-2) !important;
  font-size: .84rem !important;
  font-weight: 900 !important;
}

.welcome-center h2,
.home-hero-main h2 {
  margin: .15rem 0 .28rem !important;
  color: var(--app-green-2) !important;
  font-size: clamp(2.5rem, 5vw, 4.25rem) !important;
  line-height: .94 !important;
  letter-spacing: -1px !important;
}

.welcome-center p,
.home-hero-main p {
  margin: 0 !important;
  color: var(--app-green-2) !important;
  font-size: .98rem !important;
  font-weight: 800 !important;
}

.riyadh-header-art {
  display: none !important;
}

.weather-tile,
.home-weather-card {
  width: auto !important;
  min-height: 138px !important;
  margin: 0 !important;
  align-self: stretch !important;
  display: grid !important;
  align-content: space-between !important;
  gap: 8px !important;
  padding: 15px !important;
  border-radius: 22px !important;
  color: #fffaf1 !important;
  background: linear-gradient(160deg, #0f4f3c, #164535) !important;
  box-shadow: 0 14px 28px rgba(15,79,60,.20) !important;
}

.weather-tile span,
.weather-tile p,
.weather-row,
.home-weather-card span,
.home-weather-card p {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  margin: 0 !important;
  text-align: center !important;
}

.weather-tile strong,
.home-weather-card strong {
  text-align: center !important;
  font-size: 1.75rem !important;
  font-weight: 900 !important;
}

.dashboard-grid,
.home-primary-grid,
.home-content-grid,
.home-bottom-grid {
  display: grid !important;
  gap: 16px !important;
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.dashboard-card:nth-child(1),
.dashboard-card:nth-child(2),
.dashboard-card:nth-child(3) {
  grid-column: span 4 !important;
  min-height: 250px !important;
}

.dashboard-card:nth-child(n+4) {
  grid-column: span 3 !important;
  min-height: 160px !important;
}

.home-primary-grid {
  grid-template-columns: 1.35fr .85fr .95fr !important;
}

.home-content-grid {
  grid-template-columns: 1fr 1fr !important;
}

.home-bottom-grid {
  grid-template-columns: 1.1fr .9fr !important;
}

.dashboard-card,
.home-card {
  min-height: 0 !important;
  padding: 16px !important;
  overflow: hidden !important;
}

.home-card-head,
.panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.home-card-head h3,
.panel-head h2 {
  margin: .1rem 0 0 !important;
  font-size: 1.13rem !important;
  font-weight: 900 !important;
}

.home-card-head svg,
.panel-head svg {
  width: 21px !important;
  height: 21px !important;
  color: var(--app-green-2) !important;
}

/* Qattah card */
.qattah-summary,
.home-qattah-card {
  color: #fffaf1 !important;
  background: linear-gradient(160deg, #0f4f3c, #164535) !important;
  box-shadow: 0 18px 42px rgba(15,79,60,.20) !important;
}

.qattah-summary h2,
.qattah-summary h3,
.qattah-summary span,
.qattah-summary svg,
.home-qattah-card .home-card-head h3,
.home-qattah-card .home-card-head span,
.home-qattah-card .home-card-head svg {
  color: #fffaf1 !important;
}

.qattah-meter {
  width: 118px !important;
  margin: .2rem auto .65rem !important;
}

.qattah-meter strong {
  font-size: 1.85rem !important;
}

.qattah-meter span {
  font-size: .85rem !important;
}

.qattah-numbers {
  margin: .55rem 0 .75rem !important;
}

.qattah-numbers span {
  color: rgba(255,250,241,.82) !important;
}

.qattah-numbers b {
  color: #fffaf1 !important;
}

/* Feeds */
.home-feed-card,
.dashboard-card:nth-child(2),
.dashboard-card:nth-child(3) {
  min-height: 320px !important;
}

.compact-feed {
  max-height: 235px !important;
  overflow: auto !important;
  padding-inline-end: 2px !important;
}

.compact-feed .match-card,
.compact-feed .news-card,
.compact-feed .list-item-card {
  border: 1px solid var(--app-line) !important;
  border-radius: 18px !important;
  background: rgba(255,253,248,.62) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .compact-feed .match-card,
body[data-theme="dark"] .compact-feed .news-card,
body[data-theme="dark"] .compact-feed .list-item-card {
  background: rgba(255,255,255,.06) !important;
}

.news-card img[src=""],
.news-card img:not([src]) {
  display: none !important;
}

.news-card img {
  max-height: 130px !important;
}

/* Prayer + shortcuts */
.prayer-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: .35rem !important;
}

.prayer-strip .stat {
  padding: .55rem .25rem !important;
  border-radius: 14px !important;
  background: rgba(255,253,248,.62) !important;
  box-shadow: none !important;
}

.prayer-strip .stat strong {
  font-size: .9rem !important;
}

.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .6rem !important;
}

.quick-grid a,
.quick-grid button {
  min-height: 64px !important;
  border-radius: 16px !important;
  color: var(--app-green-2) !important;
  background: rgba(255,253,248,.62) !important;
  box-shadow: none !important;
}

/* Payment page: less bulky */
.payment-screen {
  width: min(100%, 980px) !important;
  margin-inline: auto !important;
  gap: 16px !important;
}

.payment-plan-card {
  grid-template-columns: 92px minmax(0, 1fr) minmax(128px, 180px) !important;
  align-items: center !important;
  padding: 18px !important;
  border-radius: 28px !important;
  color: #fffaf1 !important;
  background: linear-gradient(160deg, #0f4f3c, #164535) !important;
}

.plan-wallet {
  width: 78px !important;
  height: 78px !important;
}

.plan-wallet svg {
  width: 42px !important;
  height: 42px !important;
}

.plan-copy h2,
.payment-options h2 {
  font-size: 1.3rem !important;
}

.plan-price {
  min-height: 92px !important;
  border-radius: 18px !important;
}

.plan-price strong {
  font-size: 1.65rem !important;
}

.payment-method {
  min-height: 82px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 20px !important;
  background: rgba(255,253,248,.66) !important;
  box-shadow: none !important;
}

.payment-brand {
  width: 104px !important;
  height: 52px !important;
}

/* Auth pages stay centered and clean */
body:not(.is-authenticated) .main {
  width: 100% !important;
  padding: 16px !important;
}

body:not(.is-authenticated) .view {
  min-height: calc(100vh - 32px) !important;
  display: grid !important;
  place-items: center !important;
}

.auth-layout {
  width: min(100%, 980px) !important;
  min-height: auto !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px) !important;
  gap: 16px !important;
}

.auth-brand,
.auth-layout .content-body {
  border-radius: 28px !important;
  background: var(--app-card) !important;
  border: 1px solid var(--app-line) !important;
  box-shadow: var(--app-shadow) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

/* Responsive */
@media (min-width: 1000px) {
  #bottom-nav.nav {
    width: min(680px, calc(100vw - 40px)) !important;
  }
}

@media (max-width: 980px) {
  .main {
    padding-inline: 12px !important;
  }

  .welcome-panorama,
  .home-hero-card,
  .home-primary-grid,
  .home-content-grid,
  .home-bottom-grid,
  .auth-layout,
  .payment-plan-card {
    grid-template-columns: 1fr !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-card:nth-child(n) {
    grid-column: auto !important;
    min-height: auto !important;
  }

  .home-feed-card,
  .dashboard-card:nth-child(2),
  .dashboard-card:nth-child(3) {
    min-height: auto !important;
  }

  .compact-feed {
    max-height: none !important;
  }

  .weather-tile,
  .home-weather-card {
    min-height: 110px !important;
  }

  .payment-plan-card {
    text-align: center !important;
  }

  .plan-wallet {
    margin-inline: auto !important;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 10px 10px 104px !important;
  }

  .topbar {
    min-height: 54px !important;
    padding-bottom: 8px !important;
  }

  .profile-copy,
  .top-profile > svg {
    display: none !important;
  }

  .top-profile {
    padding: 4px !important;
  }

  .notify-bell {
    width: 40px !important;
    height: 40px !important;
  }

  #bottom-nav.nav {
    width: calc(100vw - 18px) !important;
    min-height: 66px !important;
    border-radius: 22px !important;
    padding: 7px !important;
  }

  #bottom-nav.nav a {
    min-height: 50px !important;
    border-radius: 16px !important;
    font-size: .70rem !important;
  }

  #bottom-nav.nav a svg {
    width: 19px !important;
    height: 19px !important;
  }

  .dashboard-home,
  .dashboard-home.home-v2 {
    gap: 12px !important;
  }

  .welcome-panorama,
  .home-hero-card,
  .dashboard-card,
  .home-card,
  .panel,
  .card,
  .content-body {
    border-radius: 22px !important;
    padding: 13px !important;
  }

  .welcome-center h2,
  .home-hero-main h2 {
    font-size: 2.65rem !important;
  }

  .welcome-center p,
  .home-hero-main p {
    font-size: .9rem !important;
  }

  .weather-tile strong,
  .home-weather-card strong {
    font-size: 1.45rem !important;
  }

  .prayer-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .payment-method {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .payment-method-label {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .payment-radio {
    margin-inline: auto !important;
  }
}

/* Make hidden main content appear after JS exactly as before */
#main-content {
  display: none;
}


/* =========================================================
   SHAGRDIYAH DARK + DESERT PATCH V210
   إصلاح الخلفية الأصلية + تحسين الوضع الليلي + إرجاع الشعار
   ========================================================= */

:root {
  --desert-bg-url: url("../../images/shagrdiyah-desert-bg.png");
}

/* الخلفية الأصلية الصح */
body::before {
  z-index: 0 !important;
  background: var(--desert-bg-url) center bottom / cover no-repeat !important;
  filter: none !important;
  transform: none !important;
}

body::after {
  z-index: 0 !important;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,.30), transparent 28rem),
    linear-gradient(180deg, rgba(255,250,242,.44), rgba(255,250,242,.25) 48%, rgba(255,250,242,.42)) !important;
}

/* وضع ليلي واضح ومقروء بدون ما يدفن النص */
body[data-theme="dark"] {
  --bg: #061812 !important;
  --surface: #10251d !important;
  --surface-strong: #173428 !important;
  --ink: #ffffff !important;
  --muted: #d8d8d8 !important;
  --line: rgba(255,255,255,.14) !important;

  --app-bg: #061812 !important;
  --app-ink: #ffffff !important;
  --app-muted: #d8d8d8 !important;
  --app-green: #7de2b6 !important;
  --app-green-2: #ffffff !important;
  --app-line: rgba(255,255,255,.14) !important;
  --app-card: rgba(12, 31, 24, .78) !important;
  --app-card-strong: rgba(16, 41, 32, .92) !important;
  --app-nav: rgba(12, 31, 24, .92) !important;

  color: #fff !important;
  background: #061812 !important;
}

body[data-theme="dark"]::before {
  background: var(--desert-bg-url) center bottom / cover no-repeat !important;
  filter: brightness(.38) saturate(.82) contrast(1.02) !important;
}

body[data-theme="dark"]::after {
  background:
    radial-gradient(circle at 50% 4%, rgba(31,90,70,.26), transparent 28rem),
    linear-gradient(180deg, rgba(6,24,18,.72), rgba(6,24,18,.83) 50%, rgba(6,24,18,.72)) !important;
}

/* كل النصوص المهمة بالليلي */
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] p,
body[data-theme="dark"] strong,
body[data-theme="dark"] .profile-copy strong,
body[data-theme="dark"] .top-actions h1,
body[data-theme="dark"] .welcome-center h2,
body[data-theme="dark"] .welcome-center p,
body[data-theme="dark"] .welcome-center span,
body[data-theme="dark"] .home-hero-main h2,
body[data-theme="dark"] .home-hero-main p,
body[data-theme="dark"] .home-eyebrow,
body[data-theme="dark"] .home-card-head h3,
body[data-theme="dark"] .panel-head h2 {
  color: #fff !important;
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .profile-copy small,
body[data-theme="dark"] .mini-messages b,
body[data-theme="dark"] .match-card .muted,
body[data-theme="dark"] .news-card .muted,
body[data-theme="dark"] .payment-method-label small,
body[data-theme="dark"] .payment-total-card small,
body[data-theme="dark"] .payment-total-card span {
  color: #d8d8d8 !important;
}

/* كروت الليل */
body[data-theme="dark"] .panel,
body[data-theme="dark"] .card,
body[data-theme="dark"] .stat,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .chat-box,
body[data-theme="dark"] .list-item-card,
body[data-theme="dark"] .content-body,
body[data-theme="dark"] #chat-box,
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .home-card,
body[data-theme="dark"] .home-hero-card,
body[data-theme="dark"] .payment-options,
body[data-theme="dark"] .payment-total-card,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .alert-content {
  color: #fff !important;
  border-color: rgba(255,255,255,.14) !important;
  background: rgba(12, 31, 24, .78) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.32) !important;
}

body[data-theme="dark"] .compact-feed .match-card,
body[data-theme="dark"] .compact-feed .news-card,
body[data-theme="dark"] .compact-feed .list-item-card,
body[data-theme="dark"] .quick-grid a,
body[data-theme="dark"] .quick-grid button,
body[data-theme="dark"] .prayer-strip .stat,
body[data-theme="dark"] .dashboard-action {
  color: #fff !important;
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(255,255,255,.12) !important;
}

/* إرجاع الشعار داخل الهيرو */
.home-hero-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: .55rem;
  filter: drop-shadow(0 14px 22px rgba(15, 79, 60, .14));
}

body[data-theme="dark"] .home-hero-logo {
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.35));
}

.home-hero-main,
.welcome-center {
  padding-block: 1rem !important;
}

/* تحسين صندوق المستخدم والجرس */
.top-profile {
  cursor: pointer !important;
  user-select: none !important;
}

.top-profile:hover,
.notify-bell:hover,
.floating-theme-toggle:hover {
  transform: translateY(-1px);
}

.notify-bell,
.floating-theme-toggle,
.theme-moon-btn,
.icon-btn {
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

body[data-theme="dark"] .top-profile,
body[data-theme="dark"] .notify-bell,
body[data-theme="dark"] .floating-theme-toggle,
body[data-theme="dark"] .theme-moon-btn,
body[data-theme="dark"] .icon-btn {
  color: #fff !important;
  background: rgba(12, 31, 24, .82) !important;
  border-color: rgba(255,255,255,.14) !important;
}

body[data-theme="dark"] .notify-bell span {
  color: #061812 !important;
  background: #f6e3a8 !important;
}

/* تحسين شريط التنقل السفلي بالليلي */
body[data-theme="dark"] #bottom-nav.nav {
  background: rgba(12, 31, 24, .94) !important;
  border-color: rgba(255,255,255,.16) !important;
}

body[data-theme="dark"] #bottom-nav.nav a {
  color: #d8d8d8 !important;
}

body[data-theme="dark"] #bottom-nav.nav a.active {
  color: #061812 !important;
  background: linear-gradient(160deg, #fff3c9, #d7bb76) !important;
}

/* لا تخلي بطاقات الأخبار والمباريات باهتة */
body[data-theme="dark"] .match-teams,
body[data-theme="dark"] .match-score,
body[data-theme="dark"] .news-card h3,
body[data-theme="dark"] .news-card h2 {
  color: #fff !important;
}

body[data-theme="dark"] .badge {
  color: #fff3c9 !important;
  background: rgba(255,243,201,.10) !important;
}

@media (max-width: 640px) {
  .home-hero-logo {
    width: 72px;
    height: 72px;
  }
}

/* =========================================================
   SHAGRDIYAH V211 HEADER HERO FIXES
   إصلاح الهيدر + الجرس + الشعار + هيرو الرئيسية
   ========================================================= */

/* الجرس يفتح صفحة التنبيهات، والسهم بجانب الاسم مخفي */
.top-profile > svg,
#top-profile > svg,
.top-profile [data-lucide="chevron-down"] {
  display: none !important;
}

.notify-bell {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* عنوان الصفحة لا يظهر فوق الرئيسية حتى لا يتكرر مع محتوى الصفحة */
body:has(#home-welcome-title) .top-actions {
  display: none !important;
}

.topbar {
  min-height: 58px !important;
  padding: 6px 0 10px !important;
  align-items: center !important;
}

.top-actions h1,
#pageTitle {
  font-size: clamp(1.15rem, 2vw, 1.55rem) !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  color: var(--app-green-2, #fff) !important;
}

/* تصغير هيرو الاستراحة وإظهاره بشكل احترافي بدل المربع الضخم */
.dashboard-home.home-v2,
.dashboard-home {
  gap: 14px !important;
}

.home-hero-card,
.dashboard-home .home-hero-card {
  min-height: 168px !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 240px !important;
  gap: 14px !important;
  align-items: stretch !important;
  padding: 14px !important;
  border-radius: 28px !important;
  background: rgba(255, 253, 248, .12) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}

.home-hero-main,
.dashboard-home .home-hero-main {
  min-height: 140px !important;
  padding: 14px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 4px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.34) !important;
  color: #fff !important;
}

body[data-theme="dark"] .home-hero-main,
body[data-theme="dark"] .dashboard-home .home-hero-main {
  background: rgba(255,255,255,.34) !important;
}

.home-hero-logo,
.dashboard-home .home-hero-logo {
  width: 118px !important;
  height: 118px !important;
  object-fit: contain !important;
  margin: -2px 0 0 !important;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.20)) !important;
}

.home-eyebrow,
.home-hero-main .home-eyebrow,
.home-hero-main span {
  color: #fff !important;
  font-size: .9rem !important;
  font-weight: 900 !important;
  opacity: .96 !important;
}

.home-hero-main h2,
#home-welcome-title,
.dashboard-home .home-hero-main h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(3rem, 5vw, 4.4rem) !important;
  line-height: .92 !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
}

.home-hero-main p,
.dashboard-home .home-hero-main p {
  margin: 2px 0 0 !important;
  color: rgba(255,255,255,.95) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
}

.home-weather-card,
.dashboard-home .home-weather-card,
.weather-tile {
  min-height: 140px !important;
  max-height: 168px !important;
  padding: 14px !important;
  border-radius: 22px !important;
  background: linear-gradient(160deg, #0F4F3C, #164535) !important;
}

.home-weather-card strong,
.weather-tile strong {
  font-size: clamp(1.65rem, 3vw, 2.15rem) !important;
}

.home-weather-card .weather-row b,
.weather-row b {
  font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
}

/* تحسين صندوق الاسم والجرس */
.top-profile {
  min-height: 54px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: rgba(8, 28, 22, .72) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}

.profile-copy strong,
.profile-copy small {
  color: #fff !important;
}

.notify-bell {
  background: rgba(8, 28, 22, .72) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: #fff !important;
}

.notify-bell span {
  color: #0f261e !important;
  background: #f6e3a8 !important;
}

/* على الجوال نخلي الهيرو بطاقة واحدة مرتبة */
@media (max-width: 820px) {
  .home-hero-card,
  .dashboard-home .home-hero-card {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .home-hero-logo,
  .dashboard-home .home-hero-logo {
    width: 96px !important;
    height: 96px !important;
  }

  .home-hero-main h2,
  #home-welcome-title {
    font-size: 3rem !important;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 52px !important;
  }

  .home-hero-main,
  .dashboard-home .home-hero-main {
    min-height: 126px !important;
  }

  .home-hero-logo,
  .dashboard-home .home-hero-logo {
    width: 88px !important;
    height: 88px !important;
  }

  .home-hero-main h2,
  #home-welcome-title {
    font-size: 2.75rem !important;
  }
}


/* =========================================================
   SHAGRDIYAH V212 HOME TOP WIDGETS
   الطقس + مواقيت الصلاة أول شيء تحت الهيدر
   ========================================================= */

.home-v212 {
  gap: 14px !important;
}

/* أول صف تحت الهيدر: الطقس والصلاة جنب بعض */
.home-v212 .home-top-widgets {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
  order: 1 !important;
}

.home-v212 .home-top-widgets .home-weather-card,
.home-v212 .home-top-widgets .home-prayer-card {
  min-height: 178px !important;
  margin: 0 !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 26px !important;
  box-shadow: var(--app-shadow) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.06) !important;
}

.home-v212 .home-top-widgets .home-weather-card {
  width: auto !important;
  align-self: stretch !important;
  display: grid !important;
  align-content: space-between !important;
  padding: 20px !important;
  color: #fffaf1 !important;
  background: linear-gradient(160deg, #0f4f3c, #164535) !important;
}

.home-v212 .home-top-widgets .home-weather-card strong {
  font-size: 2.2rem !important;
  line-height: 1 !important;
}

.home-v212 .home-top-widgets .home-weather-card b {
  font-weight: 900 !important;
}

.home-v212 .home-top-widgets .home-prayer-card {
  padding: 18px !important;
  background: var(--app-card) !important;
  color: var(--app-ink) !important;
}

.home-v212 .home-top-widgets .prayer-strip {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 12px !important;
}

.home-v212 .home-top-widgets .prayer-strip .stat {
  min-height: 64px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  padding: 8px 6px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 16px !important;
  background: rgba(255,253,248,.56) !important;
  box-shadow: none !important;
}

.home-v212 .home-top-widgets .prayer-strip .stat strong {
  font-size: 1rem !important;
  color: var(--app-green-2) !important;
}

body[data-theme="dark"] .home-v212 .home-top-widgets .prayer-strip .stat {
  background: rgba(255,255,255,.06) !important;
}

body[data-theme="dark"] .home-v212 .home-top-widgets .prayer-strip .stat strong {
  color: #fff !important;
}

/* الهيرو صار بطاقة هوية صغيرة بعد الطقس والصلاة */
.home-v212 .home-hero-card {
  order: 2 !important;
  min-height: 132px !important;
  display: block !important;
  padding: 12px !important;
  border-radius: 26px !important;
}

.home-v212 .home-hero-main {
  min-height: 108px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  border-radius: 22px !important;
  background: rgba(255,253,248,.38) !important;
}

.home-v212 .home-hero-logo {
  width: 76px !important;
  height: 76px !important;
  margin: 0 0 2px !important;
  object-fit: contain !important;
}

.home-v212 .home-hero-main h2 {
  font-size: clamp(2.2rem, 4vw, 3.35rem) !important;
  margin: 0 !important;
  line-height: .95 !important;
}

.home-v212 .home-hero-main p {
  font-size: .95rem !important;
  margin: 0 !important;
}

.home-v212 .home-primary-grid {
  order: 3 !important;
}

.home-v212 .home-content-grid {
  order: 4 !important;
}

.home-v212 .home-bottom-grid {
  order: 5 !important;
  grid-template-columns: 1fr !important;
}

.home-v212 .home-shortcuts-card {
  min-height: 132px !important;
}

/* الجوال: الطقس والصلاة فوق بعض، وبعدين الشعار */
@media (max-width: 860px) {
  .home-v212 .home-top-widgets {
    grid-template-columns: 1fr !important;
  }

  .home-v212 .home-top-widgets .home-weather-card {
    min-height: 128px !important;
  }

  .home-v212 .home-top-widgets .home-prayer-card {
    min-height: 0 !important;
  }

  .home-v212 .home-top-widgets .prayer-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-v212 .home-hero-logo {
    width: 68px !important;
    height: 68px !important;
  }
}

@media (max-width: 520px) {
  .home-v212 .home-top-widgets {
    gap: 12px !important;
  }

  .home-v212 .home-top-widgets .home-weather-card,
  .home-v212 .home-top-widgets .home-prayer-card,
  .home-v212 .home-hero-card {
    border-radius: 22px !important;
  }

  .home-v212 .home-top-widgets .home-weather-card strong {
    font-size: 1.7rem !important;
  }

  .home-v212 .home-hero-main h2 {
    font-size: 2.45rem !important;
  }
}



/* =========================================================
   SHAGRDIYAH V213 PREMIUM UI REDESIGN
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #ebe7dc;
  --surface: rgba(255, 252, 244, 0.78);
  --surface-strong: rgba(255, 252, 244, 0.92);
  --ink: #16221c;
  --muted: #697168;
  --gold: #d7bb76;
  --gold-strong: #a98234;
  --date: #315f4d;
  --line: rgba(45, 55, 48, 0.12);
  --shadow: 0 18px 44px rgba(12, 20, 16, 0.12);
  --radius: 18px;
  --app-line: rgba(255, 255, 255, 0.16);
  --app-card: rgba(255, 252, 244, 0.76);
  --app-card-strong: rgba(255, 252, 244, 0.9);
  --app-ink: #16221c;
  --app-muted: #697168;
  --app-green-2: #315f4d;
}

body,
body[data-theme="dark"] {
  min-height: 100vh;
  color: var(--ink) !important;
  background: #07130f !important;
  letter-spacing: 0 !important;
}

body::before,
body[data-theme="dark"]::before {
  background: url("../../images/shagrdiyah-desert-bg.png") center bottom / cover no-repeat !important;
  filter: brightness(0.78) saturate(0.9) contrast(1.04) !important;
}

body::after,
body[data-theme="dark"]::after {
  background: linear-gradient(180deg, rgba(7, 19, 15, 0.66), rgba(7, 19, 15, 0.72) 48%, rgba(7, 19, 15, 0.62)) !important;
}

body[data-theme="dark"] {
  --bg: #07130f !important;
  --surface: rgba(13, 24, 20, 0.74) !important;
  --surface-strong: rgba(19, 34, 28, 0.92) !important;
  --ink: #fffaf1 !important;
  --muted: #c7cec7 !important;
  --line: rgba(255, 255, 255, 0.14) !important;
  --date: #d7bb76 !important;
  --gold: #d7bb76 !important;
  --gold-strong: #f0d991 !important;
  --app-card: rgba(13, 24, 20, 0.74) !important;
  --app-card-strong: rgba(19, 34, 28, 0.92) !important;
  --app-ink: #fffaf1 !important;
  --app-muted: #c7cec7 !important;
  --app-green-2: #f0d991 !important;
}

.splash,
body[data-theme="dark"] .splash {
  color: #fffaf1 !important;
  background: #07130f !important;
}

.splash::before {
  background: linear-gradient(180deg, rgba(7, 19, 15, 0.5), rgba(7, 19, 15, 0.88)), url("../../images/shagrdiyah-desert-bg.png") center bottom / cover no-repeat !important;
}

.splash-card {
  width: min(86vw, 340px) !important;
  min-height: 300px !important;
  border-radius: 24px !important;
  border-color: rgba(215, 187, 118, 0.28) !important;
  background: rgba(12, 24, 19, 0.68) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34) !important;
}

.splash img {
  width: 132px !important;
  height: 132px !important;
  object-fit: contain !important;
}

.splash strong {
  color: #fffaf1 !important;
  font-size: clamp(1.7rem, 6vw, 2.2rem) !important;
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr) !important;
}

.sidebar {
  background: linear-gradient(180deg, rgba(13, 24, 20, 0.92), rgba(8, 18, 14, 0.94)) !important;
  border: 1px solid rgba(215, 187, 118, 0.16) !important;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}

.brand img {
  width: 112px !important;
  height: 112px !important;
  object-fit: contain !important;
}

.nav a {
  color: rgba(255, 250, 241, 0.76) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

.nav a.active,
.nav a:hover {
  color: #f7e6ad !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(215, 187, 118, 0.18) !important;
  box-shadow: none !important;
}

.topbar {
  min-height: 62px !important;
  padding: 0 0 14px !important;
}

.top-profile {
  gap: 0.65rem !important;
  padding: 6px 8px 6px 12px !important;
  border-radius: 999px !important;
  color: #fffaf1 !important;
  background: rgba(10, 22, 17, 0.72) !important;
  border: 1px solid rgba(215, 187, 118, 0.18) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
}

.profile-avatar {
  width: 48px !important;
  height: 48px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(215, 187, 118, 0.18) !important;
}

.profile-copy strong,
.profile-copy small {
  color: #fffaf1 !important;
}

.notify-bell {
  width: 42px !important;
  height: 42px !important;
  color: #f3df9e !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(215, 187, 118, 0.16) !important;
}

.notify-bell svg {
  width: 22px !important;
  height: 22px !important;
}

.notification-count {
  width: 19px !important;
  height: 19px !important;
  top: -2px !important;
  right: -2px !important;
  color: #07130f !important;
  background: #d7bb76 !important;
}

.panel,
.card,
.stat,
.table-wrap,
.chat-box,
.list-item-card,
.content-body,
#chat-box,
.home-card,
.home-hero-card,
.payment-options,
.payment-total-card,
.modal,
.alert-content {
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .card,
body[data-theme="dark"] .stat,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .chat-box,
body[data-theme="dark"] .list-item-card,
body[data-theme="dark"] .content-body,
body[data-theme="dark"] #chat-box,
body[data-theme="dark"] .home-card,
body[data-theme="dark"] .home-hero-card,
body[data-theme="dark"] .payment-options,
body[data-theme="dark"] .payment-total-card,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .alert-content {
  color: #fffaf1 !important;
  background: rgba(13, 24, 20, 0.74) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .input-group label,
body[data-theme="dark"] .payment-method-label small,
body[data-theme="dark"] .payment-total-card small,
body[data-theme="dark"] .payment-total-card span {
  color: #c7cec7 !important;
}

.home-v212 .home-top-widgets .home-weather-card {
  background: linear-gradient(150deg, #111c17, #25372d) !important;
  border-color: rgba(215, 187, 118, 0.18) !important;
}

.home-v212 .home-top-widgets .home-prayer-card,
.home-v212 .home-hero-card,
.home-v212 .home-card {
  border-radius: 20px !important;
}

.home-v212 .home-hero-card {
  min-height: 214px !important;
  padding: 14px !important;
  background: rgba(13, 24, 20, 0.58) !important;
}

.home-v212 .home-hero-main {
  min-height: 186px !important;
  gap: 6px !important;
  background: linear-gradient(150deg, rgba(20, 34, 28, 0.82), rgba(10, 22, 17, 0.74)) !important;
  border: 1px solid rgba(215, 187, 118, 0.18) !important;
}

.home-v212 .home-hero-logo {
  width: clamp(118px, 14vw, 168px) !important;
  height: clamp(118px, 14vw, 168px) !important;
  margin: 0 !important;
}

.home-hero-main h2,
#home-welcome-title,
.home-hero-main p,
.home-eyebrow {
  color: #fffaf1 !important;
  letter-spacing: 0 !important;
}

.home-v212 .home-hero-main h2 {
  font-size: clamp(2.7rem, 5vw, 4.2rem) !important;
}

.home-v212 .home-hero-main p {
  color: rgba(255, 250, 241, 0.82) !important;
  font-size: 1.04rem !important;
}

.home-primary-grid,
.home-content-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}

.qattah-summary,
.payment-plan-card {
  color: #fffaf1 !important;
  background: linear-gradient(150deg, #0b1712, #1b2a23) !important;
  border: 1px solid rgba(215, 187, 118, 0.18) !important;
}

.qattah-meter {
  width: 118px !important;
  background: radial-gradient(circle, #16231d 48%, transparent 50%), conic-gradient(#d7bb76 0 var(--value, 0%), rgba(255,255,255,0.16) var(--value, 0%) 100%) !important;
}

.payment-plan-card {
  min-height: 0 !important;
  grid-template-columns: 82px minmax(0, 1fr) minmax(126px, 170px) !important;
  padding: 1rem !important;
  border-radius: 20px !important;
}

.plan-wallet {
  width: 76px !important;
  height: 76px !important;
  color: #d7bb76 !important;
}

.plan-wallet svg {
  width: 42px !important;
  height: 42px !important;
}

.plan-price {
  min-height: 92px !important;
  border-color: rgba(215, 187, 118, 0.18) !important;
}

.plan-price strong,
.payment-total-card strong {
  color: #d7bb76 !important;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem) !important;
}

.payment-method {
  min-height: 78px !important;
  padding: 0.8rem 1rem !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(215, 187, 118, 0.14) !important;
  transform: none !important;
}

.payment-brand {
  width: 92px !important;
  height: 44px !important;
  flex-basis: 92px !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
}

.apple-brand {
  gap: 0.18rem !important;
  color: #050505 !important;
  background: #fff !important;
}

.stc-brand {
  color: #fff !important;
  background: linear-gradient(135deg, #4b2179, #742f98) !important;
}

.stc-brand b {
  color: #fff !important;
}

.coming-soon,
.badge {
  min-height: 26px !important;
  border-radius: 999px !important;
  color: #f0d991 !important;
  background: rgba(215, 187, 118, 0.12) !important;
}

.pay-now-button {
  min-height: 54px !important;
  color: #aab3ad !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.chat-page {
  gap: 12px !important;
}

#chat-box {
  min-height: 58vh !important;
  padding: 1rem !important;
  background: rgba(8, 18, 14, 0.62) !important;
}

.message {
  border-radius: 16px 16px 16px 6px !important;
  color: var(--ink) !important;
  background: rgba(255, 252, 244, 0.86) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
}

.message.mine {
  border-radius: 16px 16px 6px 16px !important;
  color: #07130f !important;
  background: #d7bb76 !important;
}

body[data-theme="dark"] .message {
  color: #fffaf1 !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body[data-theme="dark"] .message.mine {
  color: #07130f !important;
  background: #d7bb76 !important;
}

#chat-form {
  padding: 0.5rem !important;
  border-radius: 18px !important;
  background: rgba(8, 18, 14, 0.62) !important;
  border: 1px solid rgba(215, 187, 118, 0.16) !important;
}

.input-group input,
.input-group textarea,
.input-group select,
.field,
#chat-input {
  color: var(--ink) !important;
  background: rgba(255, 252, 244, 0.9) !important;
  border-color: rgba(45, 55, 48, 0.14) !important;
}

body[data-theme="dark"] .input-group input,
body[data-theme="dark"] .input-group textarea,
body[data-theme="dark"] .input-group select,
body[data-theme="dark"] .field,
body[data-theme="dark"] #chat-input {
  color: #fffaf1 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.btn,
.primary,
.ghost,
.dashboard-action,
.service-link {
  letter-spacing: 0 !important;
}

.btn,
.primary {
  color: #07130f !important;
  background: #d7bb76 !important;
}

.dashboard-action,
.service-link,
.link-text a {
  color: var(--gold-strong) !important;
}

.match-card {
  min-height: 118px !important;
  padding: 0.72rem !important;
  gap: 0.38rem !important;
}

.matches-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)) !important;
}

.match-teams {
  align-items: center !important;
  gap: 0.4rem !important;
  font-size: 0.86rem !important;
}

.team-logo {
  width: 24px !important;
  height: 24px !important;
  flex-basis: 24px !important;
}

.match-score {
  color: var(--gold-strong) !important;
  font-size: 1.04rem !important;
}

.auth-layout .content-body,
.auth-brand {
  background: rgba(13, 24, 20, 0.72) !important;
  color: #fffaf1 !important;
  border-color: rgba(215, 187, 118, 0.16) !important;
}

.auth-brand span,
.auth-brand h2,
.auth-brand p,
.auth-layout .content-body h2 {
  color: #fffaf1 !important;
}

.auth-logo,
.auth-form-logo {
  object-fit: contain !important;
}

.profile-admin-note {
  margin: 0 0 0.85rem !important;
  padding: 0.85rem !important;
  border-radius: 14px !important;
  color: var(--muted) !important;
  background: rgba(215, 187, 118, 0.1) !important;
  border: 1px solid rgba(215, 187, 118, 0.16) !important;
}

.profile-form input[readonly] {
  cursor: default !important;
  opacity: 0.86 !important;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .main {
    padding: 14px 14px 92px !important;
  }

  body.is-authenticated .sidebar {
    position: fixed !important;
    inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px !important;
    z-index: 45 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 7px !important;
    border-radius: 20px !important;
    transform: none !important;
  }

  body.is-authenticated .sidebar .brand,
  body.is-authenticated .sidebar .sidebar-logout {
    display: none !important;
  }

  body.is-authenticated #bottom-nav.nav {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(72px, 1fr) !important;
    grid-template-columns: none !important;
    gap: 4px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  body.is-authenticated #bottom-nav.nav::-webkit-scrollbar {
    display: none !important;
  }

  #bottom-nav.nav a {
    min-height: 58px !important;
    padding: 6px 8px !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 3px !important;
    border-radius: 14px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  #bottom-nav.nav a svg {
    margin: 0 !important;
    width: 19px !important;
    height: 19px !important;
  }

  .topbar {
    justify-content: flex-start !important;
  }

  .payment-plan-card {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .payment-method {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .payment-method-label {
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  body:not(.is-authenticated) .main {
    padding: 12px !important;
  }

  .auth-layout {
    gap: 12px !important;
  }

  .auth-brand {
    min-height: 280px !important;
    padding: 24px 18px !important;
  }

  .auth-brand h2 {
    font-size: 2.8rem !important;
  }

  .home-v212 .home-hero-logo {
    width: 112px !important;
    height: 112px !important;
  }

  .home-v212 .home-hero-main h2 {
    font-size: 2.85rem !important;
  }

  .home-v212 .home-top-widgets .prayer-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .panel-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* V213 final auth and contrast guardrails */
body:not(.is-authenticated) .topbar,
body:not(.is-authenticated) .sidebar {
  display: none !important;
}

body:not(.is-authenticated) .main {
  min-height: 100vh !important;
  padding: clamp(14px, 3vw, 32px) !important;
}

body:not(.is-authenticated) .view {
  min-height: calc(100vh - clamp(28px, 6vw, 64px)) !important;
  display: grid !important;
  align-items: center !important;
}

body:not(.is-authenticated) .auth-layout .content-body,
body:not(.is-authenticated) .auth-brand {
  color: #fffaf1 !important;
  background: rgba(12, 22, 18, 0.78) !important;
  border-color: rgba(215, 187, 118, 0.22) !important;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.28) !important;
}

body:not(.is-authenticated) .auth-layout .content-body h2,
body:not(.is-authenticated) .auth-brand h2,
body:not(.is-authenticated) .auth-brand span,
body:not(.is-authenticated) .auth-brand p,
body:not(.is-authenticated) .link-text {
  color: #fffaf1 !important;
}

body:not(.is-authenticated) .auth-layout .input-group label {
  color: rgba(255, 250, 241, 0.82) !important;
}

body:not(.is-authenticated) .auth-layout .input-group input {
  color: #14231d !important;
  background: rgba(255, 252, 244, 0.94) !important;
}

body:not(.is-authenticated) #recaptcha-container,
body:not(.is-authenticated) #recaptcha-container-register {
  position: fixed !important;
  inset-inline-end: 12px !important;
  bottom: 12px !important;
  z-index: 4 !important;
  width: 256px !important;
  min-height: 60px !important;
  margin: 0 !important;
  opacity: 0.7 !important;
  transform: scale(0.72) !important;
  transform-origin: bottom right !important;
}

.home-v212 .home-hero-card,
body[data-theme="dark"] .home-v212 .home-hero-card {
  background: rgba(7, 19, 15, 0.68) !important;
}

.home-v212 .home-hero-main,
body[data-theme="dark"] .home-v212 .home-hero-main {
  background: linear-gradient(150deg, rgba(12, 24, 19, 0.96), rgba(24, 39, 31, 0.92)) !important;
}

/* V214 compact home header and first-row widgets */
body.is-authenticated:has(.home-v212) .main {
  padding-top: 12px !important;
}

body.is-authenticated:has(.home-v212) .topbar {
  min-height: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
  align-items: center !important;
}

body.is-authenticated:has(.home-v212) .top-profile {
  min-height: 44px !important;
  height: 44px !important;
  padding: 4px 7px 4px 10px !important;
  gap: 0.45rem !important;
}

body.is-authenticated:has(.home-v212) .profile-avatar {
  width: 36px !important;
  height: 36px !important;
}

body.is-authenticated:has(.home-v212) .notify-bell {
  width: 36px !important;
  height: 36px !important;
}

body.is-authenticated:has(.home-v212) .notify-bell svg {
  width: 19px !important;
  height: 19px !important;
}

body.is-authenticated:has(.home-v212) .profile-copy strong {
  font-size: 0.92rem !important;
  line-height: 1.05 !important;
}

body.is-authenticated:has(.home-v212) .profile-copy small {
  font-size: 0.68rem !important;
  line-height: 1.05 !important;
}

body.is-authenticated:has(.home-v212) .floating-theme-toggle {
  top: 12px !important;
  width: 38px !important;
  height: 38px !important;
}

.home-v212 {
  gap: 10px !important;
}

.home-v212 .home-top-widgets {
  order: 1 !important;
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.18fr) !important;
  gap: 10px !important;
  margin-top: 0 !important;
}

.home-v212 .home-top-widgets .home-weather-card,
.home-v212 .home-top-widgets .home-prayer-card {
  min-height: 132px !important;
  max-height: 150px !important;
  border-radius: 20px !important;
}

.home-v212 .home-top-widgets .home-weather-card {
  padding: 14px 16px !important;
}

.home-v212 .home-top-widgets .home-weather-card strong {
  font-size: 1.7rem !important;
}

.home-v212 .home-top-widgets .home-weather-card .weather-row b {
  font-size: 1.08rem !important;
}

.home-v212 .home-top-widgets .home-prayer-card {
  padding: 14px 16px !important;
}

.home-v212 .home-top-widgets .home-card-head {
  margin-bottom: 4px !important;
}

.home-v212 .home-top-widgets .prayer-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 4px 0 8px !important;
}

.home-v212 .home-top-widgets .prayer-strip .stat {
  min-height: 48px !important;
  padding: 6px 4px !important;
  border-radius: 12px !important;
}

.home-v212 .home-top-widgets .prayer-strip .stat strong {
  font-size: 0.88rem !important;
}

.home-v212 .home-hero-card {
  order: 2 !important;
  min-height: 164px !important;
  margin-top: 0 !important;
}

.home-v212 .home-hero-main {
  min-height: 136px !important;
}

.home-v212 .home-hero-logo {
  width: clamp(96px, 9vw, 128px) !important;
  height: clamp(96px, 9vw, 128px) !important;
}

@media (max-width: 860px) {
  .home-v212 .home-top-widgets {
    grid-template-columns: 1fr !important;
  }

  .home-v212 .home-top-widgets .home-weather-card,
  .home-v212 .home-top-widgets .home-prayer-card {
    max-height: none !important;
  }
}

/* V215 requested home order, header logo, and splash logo refinements */
.splash-card {
  min-height: 420px !important;
  width: min(88vw, 430px) !important;
  gap: 1.1rem !important;
}

.splash img {
  width: clamp(210px, 28vw, 300px) !important;
  height: clamp(210px, 28vw, 300px) !important;
  margin: 0 !important;
  object-fit: contain !important;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.36)) !important;
}

.splash strong {
  font-size: clamp(2rem, 5vw, 2.8rem) !important;
}

.topbar {
  direction: rtl !important;
}

.top-profile {
  direction: rtl !important;
  flex-direction: row !important;
}

.top-profile .profile-avatar {
  order: 1 !important;
}

.top-profile .profile-copy {
  order: 2 !important;
  text-align: right !important;
}

.top-profile .notify-bell {
  order: 3 !important;
  margin-inline-start: 0.3rem !important;
}

body.is-authenticated:has(.home-v212) .topbar {
  min-height: 54px !important;
  height: 54px !important;
  justify-content: flex-start !important;
}

body.is-authenticated:has(.home-v212) .top-profile {
  min-height: 52px !important;
  height: 52px !important;
  padding: 5px 7px 5px 12px !important;
  gap: 0.55rem !important;
}

body.is-authenticated:has(.home-v212) .profile-avatar {
  width: 46px !important;
  height: 46px !important;
}

body.is-authenticated:has(.home-v212) .profile-avatar img,
.profile-avatar img,
.brand img,
.auth-logo,
.auth-form-logo,
.profile-photo-card img {
  object-fit: contain !important;
}

body.is-authenticated:has(.home-v212) .profile-copy strong {
  font-size: 1rem !important;
}

body.is-authenticated:has(.home-v212) .profile-copy small {
  font-size: 0.72rem !important;
}

body.is-authenticated:has(.home-v212) .notify-bell {
  width: 40px !important;
  height: 40px !important;
}

.brand img {
  width: 132px !important;
  height: 132px !important;
}

.auth-logo {
  width: clamp(170px, 18vw, 260px) !important;
  height: clamp(170px, 18vw, 260px) !important;
}

.auth-form-logo {
  width: 118px !important;
  height: 118px !important;
}

.profile-photo-card img {
  width: 152px !important;
  height: 152px !important;
}

.home-v212 .home-app-title-card {
  order: 1 !important;
  min-height: 118px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(215, 187, 118, 0.18) !important;
  border-radius: 22px !important;
  color: #fffaf1 !important;
  background: linear-gradient(150deg, rgba(12, 24, 19, 0.94), rgba(18, 32, 26, 0.9)) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
}

.home-v212 .home-title-logo {
  width: clamp(86px, 8vw, 122px) !important;
  height: clamp(86px, 8vw, 122px) !important;
  object-fit: contain !important;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28)) !important;
}

.home-v212 .home-app-title-card h2 {
  margin: 0 !important;
  color: #fffaf1 !important;
  font-size: clamp(2.1rem, 4.2vw, 3.45rem) !important;
  line-height: 0.95 !important;
}

.home-v212 .home-app-title-card span {
  display: block !important;
  margin-bottom: 0.18rem !important;
  color: rgba(255, 250, 241, 0.78) !important;
  font-weight: 900 !important;
}

.home-v212 .home-top-widgets {
  order: 2 !important;
  grid-template-columns: minmax(420px, 1.18fr) minmax(260px, 0.82fr) !important;
}

.home-v212 .home-prayer-card {
  order: 1 !important;
}

.home-v212 .home-weather-card {
  order: 2 !important;
}

.home-v212 .home-hero-card {
  display: none !important;
}

.home-v212 .home-primary-grid {
  order: 3 !important;
}

.home-v212 .home-content-grid {
  order: 4 !important;
}

@media (max-width: 860px) {
  .home-v212 .home-app-title-card {
    min-height: 112px !important;
    justify-content: flex-start !important;
  }

  .home-v212 .home-top-widgets {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .home-v212 .home-app-title-card {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex-direction: column !important;
    min-height: 170px !important;
    gap: 0.4rem !important;
  }

  .home-v212 .home-title-logo {
    width: 102px !important;
    height: 102px !important;
  }

  .home-v212 .home-app-title-card h2 {
    font-size: 2.25rem !important;
  }

  .auth-logo {
    width: 150px !important;
    height: 150px !important;
  }
}

/* V216 make the home title block compact and logo-forward */
body.is-authenticated:has(.home-v212) .profile-avatar {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
}

body.is-authenticated:has(.home-v212) .top-profile {
  min-height: 58px !important;
  height: 58px !important;
  padding: 4px 6px 4px 12px !important;
}

body.is-authenticated:has(.home-v212) .topbar {
  min-height: 58px !important;
  height: 58px !important;
  margin-bottom: 8px !important;
}

.home-v212 .home-app-title-card {
  min-height: 104px !important;
  padding: 12px 18px !important;
  gap: 0.9rem !important;
  justify-content: center !important;
}

.home-v212 .home-title-logo {
  width: clamp(100px, 8vw, 132px) !important;
  height: clamp(100px, 8vw, 132px) !important;
  flex: 0 0 auto !important;
}

.home-v212 .home-app-title-card h2 {
  font-size: clamp(1.9rem, 3vw, 2.85rem) !important;
  line-height: 1 !important;
}

.home-v212 .home-app-title-card span {
  font-size: clamp(0.82rem, 1.2vw, 0.98rem) !important;
  line-height: 1.35 !important;
}

@media (max-width: 520px) {
  body.is-authenticated:has(.home-v212) .topbar {
    min-height: 54px !important;
    height: 54px !important;
  }

  body.is-authenticated:has(.home-v212) .top-profile {
    min-height: 52px !important;
    height: 52px !important;
  }

  body.is-authenticated:has(.home-v212) .profile-avatar {
    width: 48px !important;
    height: 48px !important;
    flex-basis: 48px !important;
  }

  .home-v212 .home-app-title-card {
    min-height: 132px !important;
    padding: 12px !important;
    gap: 0.22rem !important;
  }

  .home-v212 .home-title-logo {
    width: 112px !important;
    height: 112px !important;
  }

  .home-v212 .home-app-title-card h2 {
    font-size: 1.9rem !important;
  }

  .home-v212 .home-app-title-card span {
    font-size: 0.78rem !important;
    max-width: 18rem !important;
  }
}

/* V217 reduce the app-title typography footprint */
.home-v212 .home-app-title-card {
  min-height: 96px !important;
}

.home-v212 .home-app-title-card h2 {
  font-size: clamp(1.65rem, 2.4vw, 2.15rem) !important;
  white-space: nowrap !important;
}

.home-v212 .home-title-logo {
  width: clamp(92px, 7vw, 112px) !important;
  height: clamp(92px, 7vw, 112px) !important;
}

@media (max-width: 520px) {
  .home-v212 .home-app-title-card {
    min-height: 126px !important;
  }

  .home-v212 .home-title-logo {
    width: 96px !important;
    height: 96px !important;
  }

  .home-v212 .home-app-title-card h2 {
    max-width: 100% !important;
    font-size: 1.28rem !important;
    line-height: 1.12 !important;
    white-space: normal !important;
  }
}

/* V220 Estraha reference home, day/night theme, notifications, and app icon */
:root {
  --es-bg: #f8f5ef;
  --es-bg-soft: #f2eee6;
  --es-card: rgba(255, 255, 255, 0.78);
  --es-card-strong: rgba(255, 255, 255, 0.92);
  --es-border: rgba(30, 35, 30, 0.11);
  --es-ink: #1c211d;
  --es-muted: #555b52;
  --es-accent: #78915a;
  --es-accent-soft: rgba(120, 145, 90, 0.16);
  --es-icon-bg: rgba(228, 226, 213, 0.78);
  --es-shadow: 0 16px 34px rgba(39, 40, 33, 0.11);
}

body[data-theme="dark"] {
  --es-bg: #101413;
  --es-bg-soft: #171b19;
  --es-card: rgba(31, 34, 31, 0.72);
  --es-card-strong: rgba(32, 35, 32, 0.9);
  --es-border: rgba(255, 255, 255, 0.11);
  --es-ink: #f4f1ea;
  --es-muted: #c9c5bc;
  --es-accent: #9ab66f;
  --es-accent-soft: rgba(154, 182, 111, 0.16);
  --es-icon-bg: rgba(67, 72, 55, 0.56);
  --es-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body.is-authenticated:has(.estraha-reference-home) {
  color: var(--es-ink) !important;
  background:
    radial-gradient(circle at 50% 6%, rgba(120, 145, 90, 0.16), transparent 26rem),
    radial-gradient(circle at 12% 24%, rgba(0, 0, 0, 0.04), transparent 18rem),
    linear-gradient(180deg, var(--es-bg), var(--es-bg-soft)) !important;
  background-attachment: scroll !important;
}

body.is-authenticated:has(.estraha-reference-home) .app-shell {
  display: block !important;
  min-height: 100vh !important;
}

body.is-authenticated:has(.estraha-reference-home) .topbar {
  display: none !important;
}

body.is-authenticated:has(.estraha-reference-home) .sidebar {
  display: contents !important;
}

body.is-authenticated:has(.estraha-reference-home) .brand,
body.is-authenticated:has(.estraha-reference-home) .sidebar-logout {
  display: none !important;
}

body.is-authenticated:has(.estraha-reference-home) .main {
  width: min(100%, 470px) !important;
  margin: 0 auto !important;
  padding: 18px 16px 118px !important;
}

body.is-authenticated:has(.estraha-reference-home) .view {
  padding-top: 0 !important;
}

.estraha-reference-home,
.estraha-reference-home * {
  letter-spacing: 0 !important;
}

.estraha-reference-home {
  display: grid !important;
  gap: 18px !important;
  color: var(--es-ink) !important;
}

.home-reference-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
}

.home-reference-icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--es-ink);
  background: transparent;
  text-decoration: none;
}

.home-reference-icon-button svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.home-reference-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 2px 8px 14px;
}

.estraha-reference-home .home-title-logo {
  width: min(46vw, 184px) !important;
  height: auto !important;
  max-height: 168px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 18px 34px rgba(37, 45, 30, 0.18)) !important;
}

.home-reference-hero h2 {
  margin: 0;
  color: var(--es-ink);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
}

.home-reference-hero p {
  margin: 0;
  color: var(--es-muted);
  font-size: 1.02rem;
  font-weight: 500;
}

.home-reference-widgets {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

.home-reference-card {
  border: 1px solid var(--es-border) !important;
  border-radius: 18px !important;
  color: var(--es-ink) !important;
  background: var(--es-card) !important;
  box-shadow: var(--es-shadow) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
}

.home-reference-card-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.home-reference-card-title h3,
.reference-section-head h3 {
  margin: 0;
  color: var(--es-accent);
  font-size: 1.24rem;
  font-weight: 900;
}

.home-reference-card-title svg {
  width: 24px;
  height: 24px;
  color: var(--es-accent);
}

.home-prayer-card,
.home-weather-card {
  min-height: 154px !important;
  padding: 16px 14px !important;
}

.reference-prayer-strip {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin: 0 0 12px !important;
}

.reference-prayer-strip .stat {
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

.reference-prayer-strip .stat span {
  display: block;
  color: var(--es-ink) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.reference-prayer-strip .stat strong {
  display: block;
  margin-top: 7px;
  color: var(--es-ink) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  white-space: nowrap;
}

.reference-weather-body {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
}

.reference-weather-icon {
  width: 72px !important;
  height: 72px !important;
  color: #e3b12d;
  stroke-width: 1.6;
}

.reference-weather-body > div {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.reference-weather-body strong {
  color: var(--es-ink);
  font-size: 3.1rem;
  font-weight: 400;
  line-height: 1;
}

.reference-weather-body span,
.reference-weather-body small,
.reference-date {
  color: var(--es-muted);
}

.reference-weather-body small {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.86rem;
}

.reference-weather-body small svg {
  width: 16px;
  height: 16px;
  color: var(--es-accent);
}

.reference-date {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

.reference-date p {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.reference-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.reference-section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--es-accent);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.reference-section-link svg {
  width: 18px;
  height: 18px;
}

.reference-match-card {
  min-height: 96px;
  padding: 0 !important;
  overflow: hidden;
}

.reference-match-card .match-card {
  min-height: 96px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 18px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.reference-match-card .match-card:not(:first-child) {
  border-top: 1px solid var(--es-border) !important;
}

.reference-match-card .badge,
.reference-match-card .muted:last-child {
  display: none !important;
}

.reference-match-card .muted {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  color: var(--es-muted) !important;
  text-align: center;
  font-size: 0.82rem !important;
}

.reference-match-card .match-score {
  grid-column: 2;
  grid-row: 2;
  color: var(--es-ink) !important;
  font-size: 1.7rem !important;
  font-weight: 900 !important;
  text-align: center;
}

.reference-match-card .match-teams {
  display: contents !important;
}

.reference-match-card .match-teams span {
  min-width: 0;
  display: grid !important;
  justify-items: center;
  gap: 8px !important;
  color: var(--es-ink);
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

.reference-match-card .match-teams span:first-child {
  grid-column: 3;
  grid-row: 1 / 3;
}

.reference-match-card .match-teams span:last-child {
  grid-column: 1;
  grid-row: 1 / 3;
}

.reference-match-card .team-logo {
  width: 54px !important;
  height: 54px !important;
  flex: 0 0 54px !important;
  object-fit: contain !important;
  background: rgba(255, 255, 255, 0.48) !important;
}

.reference-qattah-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  padding: 0 !important;
}

.reference-qattah-action {
  min-height: 124px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 16px 8px;
  color: var(--es-ink);
  text-align: center;
  text-decoration: none;
  border-inline-start: 1px solid var(--es-border);
}

.reference-qattah-action:nth-child(4) {
  border-inline-start: 0;
}

.reference-qattah-action span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--es-accent);
  background: var(--es-icon-bg);
}

.reference-qattah-action svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.reference-qattah-action strong {
  font-size: 0.95rem;
}

.reference-qattah-action small {
  color: var(--es-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.reference-qattah-summary {
  display: none;
}

.reference-chat-list {
  overflow: hidden;
}

.reference-chat-list span {
  min-height: 62px;
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--es-border);
  color: var(--es-ink);
  font-weight: 900;
}

.reference-chat-list span::before {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: center;
  border-radius: 50%;
  background: var(--es-accent);
}

.reference-chat-list span:last-child {
  border-bottom: 0;
}

.reference-chat-list b {
  display: block;
  min-width: 0;
  color: var(--es-muted);
  font-size: 0.88rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-hidden-feed {
  display: none !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav {
  position: fixed !important;
  z-index: 40 !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 32px), 470px) !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  border: 1px solid var(--es-border) !important;
  border-radius: 22px !important;
  background: var(--es-card-strong) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(18px) saturate(1.1) !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link {
  min-height: 66px !important;
  display: none !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 4px !important;
  padding: 7px 4px !important;
  border-radius: 14px !important;
  color: var(--es-ink) !important;
  text-align: center !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#home"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#chat"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#matches"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#payments"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#settings"] {
  display: grid !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#payments"] {
  grid-column: 2;
  grid-row: 1;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#matches"] {
  grid-column: 3;
  grid-row: 1;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#chat"] {
  grid-column: 4;
  grid-row: 1;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#home"] {
  grid-column: 5;
  grid-row: 1;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#settings"] {
  grid-column: 1;
  grid-row: 1;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#payments"] span {
  font-size: 0;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#payments"] span::before {
  content: "القطة";
  font-size: 0.82rem;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#settings"] span {
  font-size: 0;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#settings"] span::before {
  content: "المزيد";
  font-size: 0.82rem;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link.active {
  background: var(--es-accent-soft) !important;
  color: var(--es-ink) !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav svg {
  width: 30px !important;
  height: 30px !important;
  stroke-width: 1.7 !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav span {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 600;
}

.notify-bell,
.notification-toggle {
  color: var(--es-accent) !important;
}

.notification-toggle[aria-pressed="true"] {
  color: var(--es-accent) !important;
  background: var(--es-accent-soft) !important;
}

body[data-theme="dark"] .estraha-reference-home .home-title-logo,
body[data-theme="dark"] .splash img,
body[data-theme="dark"] .brand img,
body[data-theme="dark"] .auth-logo,
body[data-theme="dark"] .auth-form-logo {
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.48)) brightness(1.08) contrast(1.05) !important;
}

@media (min-width: 760px) {
  body.is-authenticated:has(.estraha-reference-home) .main {
    width: min(100%, 760px) !important;
  }

  body.is-authenticated:has(.estraha-reference-home) #bottom-nav {
    width: min(calc(100vw - 48px), 760px) !important;
  }
}

@media (max-width: 430px) {
  body.is-authenticated:has(.estraha-reference-home) .main {
    padding-inline: 12px !important;
  }

  .home-reference-widgets {
    grid-template-columns: 1fr !important;
  }

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

  .reference-qattah-action:nth-child(2) {
    border-inline-start: 0;
  }

  .reference-qattah-action:nth-child(4) {
    border-inline-start: 0;
    border-top: 1px solid var(--es-border);
  }

  .reference-qattah-action:nth-child(3) {
    border-top: 1px solid var(--es-border);
  }

  .reference-match-card .match-card {
    padding-inline: 12px !important;
  }
}

/* V221 light-reference correction: clean off-white home, compact hero, fixed bottom nav */
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]),
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .app-shell,
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .main,
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .view {
  color: #20231f !important;
  background: #fbf8f2 !important;
  background-color: #fbf8f2 !important;
  background-image: none !important;
  background-attachment: scroll !important;
}

body.is-authenticated:has(.estraha-reference-home) .main {
  width: min(100%, 470px) !important;
  min-height: 100vh !important;
  padding: 22px 18px calc(128px + env(safe-area-inset-bottom)) !important;
}

.estraha-reference-home {
  gap: 14px !important;
}

.home-reference-topbar {
  min-height: 44px !important;
  margin-bottom: 0 !important;
}

.home-reference-hero {
  gap: 5px !important;
  padding: 0 8px 10px !important;
  min-height: 0 !important;
}

.estraha-reference-home .home-title-logo {
  width: min(58vw, 240px) !important;
  height: auto !important;
  max-height: 218px !important;
  display: block !important;
  object-fit: contain !important;
}

.home-reference-hero h2 {
  font-size: clamp(1.65rem, 6vw, 2.05rem) !important;
  line-height: 1.16 !important;
  margin: 0 !important;
}

.home-reference-hero p {
  font-size: 1rem !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .home-reference-card {
  color: #20231f !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(32, 35, 31, 0.1) !important;
  box-shadow: 0 12px 26px rgba(55, 51, 43, 0.08) !important;
}

body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .home-reference-card-title h3,
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .reference-section-head h3,
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .reference-section-link,
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) .home-reference-card-title svg {
  color: #657b4d !important;
}

.home-reference-widgets {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

.home-prayer-card,
.home-weather-card {
  min-height: 150px !important;
  max-height: none !important;
  padding: 16px 14px !important;
}

.home-reference-card-title {
  margin-bottom: 13px !important;
}

.home-reference-card-title h3,
.reference-section-head h3 {
  font-size: 1.14rem !important;
}

.reference-prayer-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.reference-weather-body {
  grid-template-columns: 68px 1fr !important;
  gap: 10px !important;
}

.reference-weather-icon {
  width: 64px !important;
  height: 64px !important;
}

.reference-weather-body strong {
  font-size: 2.7rem !important;
}

.reference-section-head {
  margin-top: 4px !important;
}

.reference-match-card {
  min-height: 96px !important;
}

body.is-authenticated:has(.estraha-reference-home) #bottom-nav {
  position: fixed !important;
  z-index: 80 !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  transform: translateX(-50%) !important;
  width: min(100vw, 470px) !important;
  margin: 0 !important;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
  border-inline: 1px solid rgba(32, 35, 31, 0.1) !important;
  border-block-start: 1px solid rgba(32, 35, 31, 0.1) !important;
  border-block-end: 0 !important;
  border-radius: 22px 22px 0 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 -10px 26px rgba(55, 51, 43, 0.1) !important;
}

body[data-theme="dark"].is-authenticated:has(.estraha-reference-home) #bottom-nav {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(31, 34, 31, 0.96) !important;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.3) !important;
}

@media (min-width: 760px) {
  body.is-authenticated:has(.estraha-reference-home) .main {
    width: min(100%, 760px) !important;
  }

  body.is-authenticated:has(.estraha-reference-home) #bottom-nav {
    width: min(100vw, 760px) !important;
  }
}

@media (max-width: 430px) {
  body.is-authenticated:has(.estraha-reference-home) .main {
    padding-inline: 12px !important;
  }

  .estraha-reference-home {
    gap: 13px !important;
  }

  .estraha-reference-home .home-title-logo {
    width: min(64vw, 224px) !important;
    max-height: 200px !important;
  }

  .home-reference-hero h2 {
    font-size: 1.58rem !important;
  }

  .home-reference-hero p {
    font-size: 0.94rem !important;
  }

  .home-reference-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .home-prayer-card,
  .home-weather-card {
    min-height: 148px !important;
    padding: 14px 11px !important;
  }

  .home-reference-card-title {
    gap: 5px !important;
    margin-bottom: 10px !important;
  }

  .home-reference-card-title h3 {
    font-size: 0.98rem !important;
  }

  .home-reference-card-title svg {
    width: 20px !important;
    height: 20px !important;
  }

  .reference-prayer-strip {
    gap: 3px !important;
  }

  .reference-prayer-strip .stat span {
    font-size: 0.6rem !important;
  }

  .reference-prayer-strip .stat strong {
    font-size: 0.62rem !important;
  }

  .reference-weather-body {
    grid-template-columns: 46px 1fr !important;
    gap: 7px !important;
  }

  .reference-weather-icon {
    width: 44px !important;
    height: 44px !important;
  }

  .reference-weather-body strong {
    font-size: 2.25rem !important;
  }

  .reference-weather-body span,
  .reference-weather-body small,
  .reference-date {
    font-size: 0.72rem !important;
  }
}

/* V222 splash screen matching the light ES reference */
.splash,
body[data-theme="dark"] .splash {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  place-items: center !important;
  padding: max(28px, env(safe-area-inset-top)) 24px max(38px, env(safe-area-inset-bottom)) !important;
  color: #1f3627 !important;
  background: #fbf8f2 !important;
  background-image: none !important;
  overflow: hidden !important;
}

.splash::before,
body[data-theme="dark"] .splash::before {
  content: none !important;
}

.splash-card {
  width: min(100%, 430px) !important;
  height: min(100%, 880px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(110px, 1fr) auto auto auto minmax(120px, 1fr) auto !important;
  justify-items: center !important;
  align-content: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #1f3627 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.splash-logo-frame {
  align-self: end;
  width: min(88vw, 360px);
  height: clamp(250px, 38vh, 360px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.splash-logo-frame img,
.splash img {
  width: min(94vw, 390px) !important;
  height: clamp(310px, 48vh, 460px) !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: 50% 46% !important;
  aspect-ratio: auto !important;
  filter: drop-shadow(0 18px 28px rgba(31, 54, 39, 0.1)) !important;
}

.splash strong {
  margin-top: 10px !important;
  color: #1f3627 !important;
  font-size: clamp(2.15rem, 8.2vw, 2.75rem) !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.splash span {
  margin-top: 16px !important;
  color: rgba(31, 54, 39, 0.68) !important;
  font-size: clamp(1rem, 4vw, 1.2rem) !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  text-align: center !important;
  white-space: normal !important;
}

.splash-ornament {
  width: min(52vw, 210px);
  height: 34px;
  margin-top: 34px;
  position: relative;
  color: #8da06f;
}

.splash-ornament::before,
.splash-ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: rgba(141, 160, 111, 0.65);
}

.splash-ornament::before {
  inset-inline-start: 0;
}

.splash-ornament::after {
  inset-inline-end: 0;
}

.splash-ornament {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 20%, currentColor 21% 23%, transparent 24%) center / 54px 20px no-repeat;
}

.splash-ornament::marker {
  content: "";
}

.splash-ornament + .splash-loading {
  align-self: end;
}

.splash-loading {
  width: min(76vw, 360px);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.splash-loading p {
  margin: 0;
  color: #526a46;
  font-size: 1.02rem;
  font-weight: 600;
}

.splash-progress {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 54, 39, 0.08);
}

.splash-progress span {
  display: block;
  width: 46%;
  height: 100%;
  margin: 0 !important;
  border-radius: inherit;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  background: linear-gradient(90deg, #768f58, #9caf7f);
  animation: splash-progress-fill 3.2s ease-in-out infinite;
}

@keyframes splash-progress-fill {
  0% { width: 22%; }
  55% { width: 58%; }
  100% { width: 82%; }
}

@media (max-width: 430px) {
  .splash-card {
    grid-template-rows: minmax(92px, 1fr) auto auto auto minmax(100px, 1fr) auto !important;
  }

  .splash-logo-frame {
    width: min(88vw, 340px);
    height: clamp(230px, 36vh, 330px);
  }

  .splash-logo-frame img,
  .splash img {
    width: min(94vw, 370px) !important;
    height: clamp(300px, 47vh, 430px) !important;
  }
}

/* V223 exact provided logo assets and fixed logo sizing */
.home-hero-logo,
.estraha-reference-home .home-hero-logo,
.estraha-reference-home .home-title-logo.home-hero-logo,
.home-v212 .home-title-logo.home-hero-logo {
  width: 145px !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

@media (min-width: 768px) {
  .home-hero-logo,
  .estraha-reference-home .home-hero-logo,
  .estraha-reference-home .home-title-logo.home-hero-logo,
  .home-v212 .home-title-logo.home-hero-logo {
    width: 160px !important;
  }
}

@media (min-width: 1024px) {
  .home-hero-logo,
  .estraha-reference-home .home-hero-logo,
  .estraha-reference-home .home-title-logo.home-hero-logo,
  .home-v212 .home-title-logo.home-hero-logo {
    width: 180px !important;
  }
}

body[data-theme="dark"] .auth-layout .content-body,
body[data-theme="dark"] .auth-layout .auth-brand {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(12, 31, 24, 0.78) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32) !important;
}

body[data-theme="dark"] .auth-layout .auth-brand h2,
body[data-theme="dark"] .auth-layout .auth-brand span,
body[data-theme="dark"] .auth-layout .auth-brand p,
body[data-theme="dark"] .auth-layout .content-body h2,
body[data-theme="dark"] .auth-layout .link-text {
  color: #fff !important;
}

/* Estraha polish pass: final route chrome, splash, chat and qattah styling */
#splash {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  color: #1f3f2e !important;
  background: #F7F4EC !important;
  background-image: none !important;
  opacity: 1;
}

#splash[style*="display: none"] {
  display: none !important;
}

#splash::before,
#splash::after {
  content: none !important;
  display: none !important;
}

#splash .splash-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  text-align: center !important;
  color: #1f3f2e !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#splash .splash-logo {
  width: 390px !important;
  max-width: 75vw !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto -8px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

#splash .splash-card strong {
  margin: 0 !important;
  color: #1f3f2e !important;
  font-size: clamp(2rem, 7vw, 3.4rem) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
}

#splash .splash-card span {
  margin: 0 !important;
  color: #617066 !important;
  font-size: clamp(0.95rem, 3vw, 1.15rem) !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

@media (max-width: 520px) {
  #splash .splash-logo {
    width: 330px !important;
    max-width: 75vw !important;
    margin-bottom: -6px !important;
  }
}

body.is-authenticated .topbar {
  min-height: 70px !important;
  display: flex !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 110 !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 0 12px !important;
  margin: 0 0 10px !important;
  color: var(--es-ink, #1f2a21) !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

body.is-authenticated:has(.estraha-reference-home) .topbar {
  display: none !important;
}

body.is-authenticated .top-actions {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(90, 101, 78, 0.14) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: 0 12px 30px rgba(55, 51, 43, 0.08) !important;
}

body[data-theme="dark"].is-authenticated .top-actions {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(31, 34, 31, 0.72) !important;
}

.topbar-logo,
.app-page-logo {
  width: 58px !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  flex: 0 0 auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.topbar-title-copy {
  min-width: 0;
}

.topbar-title-copy h1 {
  margin: 0 !important;
  font-size: clamp(1.2rem, 3.2vw, 1.6rem) !important;
  line-height: 1.15 !important;
  color: inherit !important;
}

body.is-authenticated .status-pill {
  display: none !important;
}

.app-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 101, 78, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 32px rgba(55, 51, 43, 0.08);
}

body[data-theme="dark"] .app-page-header {
  color: #f5f1e8;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(31, 34, 31, 0.76);
}

.app-page-header > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-page-header span {
  display: block;
  color: #6b765f;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-theme="dark"] .app-page-header span {
  color: rgba(245, 241, 232, 0.68);
}

.app-page-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  line-height: 1.15;
}

.app-page-header > i,
.app-page-header > svg {
  color: #6f805a;
}

.auth-greeting {
  display: block;
  width: 100%;
  text-align: center;
  margin: 8px auto 28px;
  color: var(--muted);
  font-weight: 800;
}

body[data-theme="dark"] .auth-greeting {
  color: rgba(255, 250, 241, 0.78);
}

.chat-page {
  display: grid;
  gap: 12px;
}

.chat-toolbar {
  display: grid;
  gap: 10px;
}

.chat-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(90, 101, 78, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.chat-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.chat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chat-chips button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(90, 101, 78, 0.14);
  border-radius: 999px;
  color: #526244;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.chat-chips button.active {
  color: #1f2a21;
  background: rgba(216, 222, 195, 0.92);
}

#chat-box.messages {
  min-height: min(54vh, 540px);
  max-height: min(62vh, 620px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 22px;
}

.chat-message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-message-row.is-me {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1f3f2e;
  background: #e6ead8;
  font-weight: 900;
  overflow: hidden;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-message-stack {
  max-width: min(76%, 520px);
}

.chat-message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-message-meta strong {
  color: inherit;
}

.chat-message-row .message {
  border-radius: 18px 18px 18px 6px;
}

.chat-message-row.is-me .message {
  border-radius: 18px 18px 6px 18px;
}

#chat-form {
  position: sticky;
  bottom: calc(94px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(90, 101, 78, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(55, 51, 43, 0.1);
}

#chat-form input {
  flex: 1;
  min-width: 0;
}

.payment-status-panel {
  margin-top: 14px;
}

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

.payment-summary-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(90, 101, 78, 0.12);
  border-radius: 18px;
  background: rgba(247, 244, 236, 0.78);
}

.payment-summary-card span,
.payment-summary-card small {
  color: var(--muted);
  font-weight: 700;
}

.payment-summary-card strong {
  font-size: clamp(1.45rem, 5vw, 2.2rem);
  line-height: 1;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.paid {
  color: #315a2d;
  background: #e7efdc;
}

.status-badge.pending {
  color: #946015;
  background: #fff0d2;
}

.status-badge.overdue {
  color: #a53224;
  background: #ffe3de;
}

.payment-method strong {
  color: inherit;
}

.notification-count.hidden,
.notification-count:empty {
  display: none !important;
}

.stat-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(90, 101, 78, 0.12);
  border-radius: 18px;
  background: rgba(247, 244, 236, 0.78);
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  color: var(--green);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1;
}

@media (max-width: 640px) {
  .topbar-logo,
  .app-page-logo {
    width: 46px !important;
  }

  body.is-authenticated .top-profile {
    max-width: 46vw;
  }

  .app-page-header {
    border-radius: 18px;
  }

  .payment-summary-grid {
    grid-template-columns: 1fr;
  }

  .chat-message-stack {
    max-width: 82%;
  }
}

.link-text,
.link-text a {
  position: relative !important;
  z-index: 50 !important;
  pointer-events: auto !important;
}

.auth-layout,
.content-body {
  pointer-events: auto !important;
}

/* Final bottom navigation: fixed, centered, five clean sections */
body.is-authenticated .main,
body.is-authenticated #page-content {
  padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
}

body.is-authenticated #bottom-nav.nav {
  position: fixed !important;
  z-index: 120 !important;
  inset-inline: auto !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  width: min(100vw, 760px) !important;
  min-height: 92px !important;
  display: grid !important;
  direction: ltr !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  border: 1px solid rgba(90, 101, 78, 0.12) !important;
  border-bottom: 0 !important;
  border-radius: 24px 24px 0 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 -14px 30px rgba(55, 51, 43, 0.12) !important;
  overflow: visible !important;
  backdrop-filter: blur(18px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.1) !important;
}

body.is-authenticated #bottom-nav.nav::after {
  content: "" !important;
  position: absolute !important;
  left: -1px !important;
  right: -1px !important;
  bottom: -34px !important;
  height: 34px !important;
  display: block !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-inline: 1px solid rgba(90, 101, 78, 0.12) !important;
  pointer-events: none !important;
}

body[data-theme="dark"].is-authenticated #bottom-nav.nav {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(31, 34, 31, 0.96) !important;
  box-shadow: 0 -16px 34px rgba(0, 0, 0, 0.34) !important;
}

body[data-theme="dark"].is-authenticated #bottom-nav.nav::after {
  background: rgba(31, 34, 31, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.is-authenticated #bottom-nav.nav .nav-link {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 70px !important;
  display: none !important;
  direction: rtl !important;
  place-items: center !important;
  align-content: center !important;
  gap: 4px !important;
  padding: 8px 2px !important;
  border-radius: 16px !important;
  color: var(--es-ink, #1f2a21) !important;
  text-align: center !important;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.is-authenticated #bottom-nav.nav .nav-link[href="#settings"] { grid-column: 1 !important; }
body.is-authenticated #bottom-nav.nav .nav-link[href="#payments"] { grid-column: 2 !important; }
body.is-authenticated #bottom-nav.nav .nav-link[href="#matches"] { grid-column: 3 !important; }
body.is-authenticated #bottom-nav.nav .nav-link[href="#chat"] { grid-column: 4 !important; }
body.is-authenticated #bottom-nav.nav .nav-link[href="#home"] { grid-column: 5 !important; }

body.is-authenticated #bottom-nav.nav .nav-link[href="#home"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#chat"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#matches"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#payments"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#settings"] {
  display: grid !important;
}

body.is-authenticated #bottom-nav.nav .nav-link[href="#news"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#members"],
body.is-authenticated #bottom-nav.nav .nav-link[href="#prayer"] {
  display: none !important;
}

body.is-authenticated #bottom-nav.nav .nav-link svg {
  width: 29px !important;
  height: 29px !important;
  stroke-width: 1.8 !important;
}

body.is-authenticated #bottom-nav.nav .nav-link span {
  max-width: 100% !important;
  overflow: hidden !important;
  color: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body.is-authenticated #bottom-nav.nav .nav-link.active {
  color: #1f2a21 !important;
  background: rgba(216, 222, 195, 0.9) !important;
}

body[data-theme="dark"].is-authenticated #bottom-nav.nav .nav-link {
  color: #f5f1e8 !important;
}

body[data-theme="dark"].is-authenticated #bottom-nav.nav .nav-link.active {
  color: #1f2a21 !important;
  background: rgba(216, 222, 195, 0.9) !important;
}

@media (max-width: 520px) {
  body.is-authenticated .main,
  body.is-authenticated #page-content {
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  }

  body.is-authenticated #bottom-nav.nav {
    min-height: 86px !important;
    padding-inline: 10px !important;
    border-radius: 22px 22px 0 0 !important;
  }

  body.is-authenticated #bottom-nav.nav .nav-link {
    min-height: 64px !important;
    border-radius: 14px !important;
  }

  body.is-authenticated #bottom-nav.nav .nav-link svg {
    width: 27px !important;
    height: 27px !important;
  }

  body.is-authenticated #bottom-nav.nav .nav-link span {
    font-size: 0.78rem !important;
  }
}

/* Chat page RTL layout fix */
.chat-page {
  direction: rtl !important;
  display: grid !important;
  gap: 14px !important;
  padding-bottom: 24px !important;
}

.chat-page .app-page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  direction: rtl !important;
  text-align: right !important;
}

.chat-page .app-page-header > div {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-direction: row !important;
}

.chat-page .app-page-logo {
  width: 48px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
}

.chat-page .app-page-header h2,
.chat-page .app-page-header span {
  text-align: right !important;
}

.chat-page .service-link {
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}

.chat-page .chat-toolbar {
  display: grid !important;
  gap: 12px !important;
}

.chat-page .chat-search {
  width: 100% !important;
}

.chat-page .chat-search input {
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
}

.chat-page .chat-chips {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
}

.chat-page .chat-chips button {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

#chat-box.messages {
  direction: rtl !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding-bottom: 90px !important;
}

.chat-message-row {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  direction: rtl !important;
}

.chat-message-row.is-me {
  flex-direction: row !important;
  justify-content: flex-start !important;
}

.chat-message-row .message {
  max-width: min(75%, 520px) !important;
  text-align: right !important;
  direction: rtl !important;
}

.chat-message-stack {
  text-align: right !important;
}

.chat-message-meta {
  justify-content: flex-start !important;
  direction: rtl !important;
}

.chat-message-row.is-me .message {
  text-align: right !important;
}

#chat-form {
  position: sticky !important;
  bottom: 86px !important;
  z-index: 40 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  direction: rtl !important;
}

#chat-input {
  flex: 1 !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Internal pages header RTL fix - exclude home/auth */
.view > :not(.dashboard-home):not(.auth-layout) .app-page-header {
  direction: rtl !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  text-align: right !important;
}

.view > :not(.dashboard-home):not(.auth-layout) .app-page-header > div {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.view > :not(.dashboard-home):not(.auth-layout) .app-page-logo {
  width: 44px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.view > :not(.dashboard-home):not(.auth-layout) .app-page-header h2,
.view > :not(.dashboard-home):not(.auth-layout) .app-page-header span {
  text-align: right !important;
  margin: 0 !important;
}

.view > :not(.dashboard-home):not(.auth-layout) .app-page-header .service-link {
  flex: 0 0 auto !important;
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}

/* Compact Qattah page redesign */
.compact-qattah-page {
  display: grid !important;
  gap: 14px !important;
  padding-bottom: 24px !important;
}

.compact-qattah-page .payment-status-panel,
.compact-qattah-page .panel,
.compact-qattah-page .payment-secure {
  margin: 0 !important;
}

.compact-qattah-page .payment-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.compact-qattah-page .payment-summary-card {
  min-height: auto !important;
  padding: 14px 10px !important;
  border-radius: 18px !important;
  text-align: center !important;
}

.compact-qattah-page .payment-summary-card strong {
  font-size: clamp(1.8rem, 7vw, 2.6rem) !important;
  line-height: 1 !important;
  margin: 6px 0 !important;
}

.compact-payment-note {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 16px !important;
  border-radius: 22px !important;
  text-align: right !important;
}

.compact-payment-note svg {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 auto !important;
}

.compact-payment-methods .payment-methods {
  display: grid !important;
  gap: 10px !important;
}

.compact-payment-methods .payment-method {
  min-height: auto !important;
  padding: 12px !important;
  border-radius: 18px !important;
}

.compact-payment-methods .payment-brand {
  width: 72px !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  font-size: .85rem !important;
}

@media (max-width: 520px) {
  .compact-qattah-page .payment-summary-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .compact-qattah-page .payment-summary-card {
    padding: 12px 6px !important;
  }

  .compact-qattah-page .payment-summary-card span,
  .compact-qattah-page .payment-summary-card small {
    font-size: .78rem !important;
  }
}

/* remove dark strip above */
body.is-authenticated .main::before,
body.is-authenticated .topbar::before {
  display: none !important;
  content: none !important;
}

body.is-authenticated .topbar-logo {
  transform: scale(1.05) !important;
  transform-origin: center !important;
}

/* keep profile compact on left */
body.is-authenticated .top-profile {
  max-width: max-content !important;
}

/* push page content below fixed header */
body.is-authenticated .main {
  padding-top: 130px !important;
}

/* remove dark top strip */
body.is-authenticated .main::before,
body.is-authenticated .main::after,
body.is-authenticated .topbar::before,
body.is-authenticated .topbar::after {
  display: none !important;
  content: none !important;
}


/* Safe reset after header experiments */
body.is-authenticated .main {
  height: auto !important;
  overflow: visible !important;
  display: block !important;
  padding-top: 0 !important;
}

body.is-authenticated #page-content {
  overflow: visible !important;
  padding-bottom: 76px !important;
}

body.is-authenticated .topbar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body.is-authenticated .topbar-title-copy,
body.is-authenticated #pageTitle,
body.is-authenticated #todayLabel,
body.is-authenticated #onlineState {
  display: none !important;
}

body.is-authenticated .topbar-logo {
  width: 82px !important;
  max-width: 82px !important;
  height: auto !important;
}


/* Final bottom nav cleanup */
body.is-authenticated #bottom-nav.nav .nav-link[href="#payments"] span::before,
body.is-authenticated #bottom-nav.nav .nav-link[href="#settings"] span::before {
  content: none !important;
  display: none !important;
}

body.is-authenticated #page-content {
  padding-bottom: 76px !important;
}

body.is-authenticated .view > section {
  margin-bottom: 0 !important;
}

/* Make bottom nav same on all pages */
body.is-authenticated #bottom-nav.nav {
  height: auto !important;
  min-height: unset !important;
  margin: 0 auto !important;
  bottom: 0 !important;
}

body.is-authenticated #page-content {
  padding-bottom: 76px !important;
}

body.is-authenticated #bottom-nav.nav .nav-link[href="#payments"] span::before,
body.is-authenticated #bottom-nav.nav .nav-link[href="#settings"] span::before {
  content: none !important;
  display: none !important;
}

/* Mobile chat cleanup */
@media (max-width: 600px) {
  .chat-page {
    gap: 10px !important;
    padding-bottom: 0 !important;
  }

  #chat-box.messages {
    min-height: 360px !important;
    max-height: 48vh !important;
    overflow-y: auto !important;
    padding: 14px 12px !important;
    border-radius: 22px !important;
  }

  .chat-message-row {
    max-width: 100% !important;
    overflow: visible !important;
  }

  .chat-message-row .message {
    max-width: 78% !important;
    width: fit-content !important;
    min-width: 44px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-height: 1.6 !important;
  }

  .chat-message-row.is-me .message {
    background: #d8bb76 !important;
    color: #fffaf0 !important;
  }

  #chat-form {
    position: sticky !important;
    bottom: 96px !important;
    z-index: 20 !important;
    margin: 8px 0 0 !important;
    padding: 10px !important;
    border-radius: 20px !important;
  }

  #chat-input {
    min-height: 46px !important;
    font-size: 1rem !important;
  }

  #chat-form button,
  #chat-form .btn {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    border-radius: 18px !important;
  }

  body.is-authenticated #page-content {
    padding-bottom: 96px !important;
  }
}

/* Clean mobile chat final */
.clean-chat-page {
  display: grid !important;
  gap: 10px !important;
  direction: rtl !important;
  padding-bottom: 76px !important;
}

.clean-chat-page .app-page-header {
  display: none !important;
}

.chat-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.78) !important;
}

.chat-title-row span {
  color: #6d765f !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
}

.chat-title-row h2 {
  margin: 2px 0 0 !important;
  font-size: 1.25rem !important;
  color: #1f2f22 !important;
}

.clean-chat-page .chat-search {
  width: 100% !important;
  min-height: 48px !important;
  padding: 0 12px !important;
  border-radius: 18px !important;
}

.clean-chat-page .chat-search input {
  width: 100% !important;
  height: 48px !important;
  text-align: right !important;
  direction: rtl !important;
}

.clean-chat-page #chat-box.messages {
  min-height: 320px !important;
  max-height: 45vh !important;
  overflow-y: auto !important;
  padding: 12px !important;
  border-radius: 22px !important;
}

.clean-chat-page .chat-message-row .message,
.clean-chat-page .message {
  max-width: 78% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.55 !important;
  padding: 10px 13px !important;
  border-radius: 16px !important;
}

.clean-chat-page .chat-message-row.is-me .message {
  background: #d8bb76 !important;
  color: #fffaf0 !important;
}

.clean-chat-page #chat-form {
  position: sticky !important;
  bottom: 8px !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.86) !important;
}

.clean-chat-page #chat-input {
  flex: 1 !important;
  min-height: 46px !important;
  text-align: right !important;
  direction: rtl !important;
}

.clean-chat-page #chat-form button {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  border-radius: 16px !important;
}


/* Chat final dark theme */
.chat-title-row,
.clean-chat-page .chat-search,
.clean-chat-page #chat-form{
  background: rgba(12,24,19,.82) !important;
  border: 1px solid rgba(215,187,118,.15) !important;
}

.clean-chat-page #chat-input,
.clean-chat-page .chat-search input{
  background: transparent !important;
  color: #ffffff !important;
}

.clean-chat-page #chat-input::placeholder,
.clean-chat-page .chat-search input::placeholder{
  color: rgba(255,255,255,.65) !important;
}

.chat-title-row span{
  display:none !important;
}

.chat-title-row h2{
  color:#ffffff !important;
  font-size:1.35rem !important;
  margin:0 !important;
}

.clean-chat-page .chat-search svg,
.clean-chat-page #chat-form svg{
  color:#d7bb76 !important;
}

.clean-chat-page #chat-form{
  box-shadow:none !important;
}

.clean-chat-page #chat-input{
  border:none !important;
  outline:none !important;
}


#home-announcement-card{
  overflow:hidden !important;
  white-space:nowrap !important;
  padding:12px 16px !important;
}

.announcement-marquee{
  width:100%;
  overflow:hidden;
  position:relative;
}

.announcement-marquee span{
  display:inline-block;
  white-space:nowrap;
  padding-left:100%;
  animation: estrahaMarquee 18s linear infinite;
  font-weight:700;
}

@keyframes estrahaMarquee{
  from{
    transform:translateX(0);
  }
  to{
    transform:translateX(-100%);
  }
}

/* Audit cleanup: one active background, route chrome, and admin spacing */
:root {
  --theme-bg-color: #07130f;
  --active-bg-image: var(--theme-bg-image, url("../../images/shagrdiyah-desert-bg.png"));
  --active-bg-position: center bottom;
}

body {
  background-color: var(--theme-bg-color, #07130f) !important;
  background-image: none !important;
  background-attachment: scroll !important;
  background-size: auto !important;
  overflow-x: hidden !important;
}

body::before,
body[data-theme="dark"]::before {
  background-image: var(--active-bg-image) !important;
  background-position: var(--active-bg-position) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  transform: none !important;
}

body.theme-custom-bg::before,
body[data-theme="dark"].theme-custom-bg::before {
  background-image: var(--theme-bg-image) !important;
  background-position: center !important;
}

body.is-authenticated:has(.estraha-reference-home),
body.is-authenticated:has(.estraha-reference-home):not([data-theme="dark"]) {
  background-attachment: scroll !important;
}

body.is-authenticated .main {
  width: min(100%, 760px) !important;
  padding-inline: clamp(12px, 4vw, 22px) !important;
  padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}

body.is-authenticated #page-content {
  padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}

body.is-authenticated .sidebar {
  display: contents !important;
  transform: none !important;
}

body.is-authenticated .sidebar .brand,
body.is-authenticated .sidebar-logout {
  display: none !important;
}

body.is-authenticated #bottom-nav,
body.is-authenticated #bottom-nav.nav,
body.is-authenticated:has(.estraha-reference-home) #bottom-nav {
  display: grid !important;
  position: fixed !important;
  z-index: 120 !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 0 !important;
  width: min(100vw, 760px) !important;
  height: auto !important;
  min-height: 86px !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  overflow: visible !important;
}

body.is-authenticated #bottom-nav::after,
body.is-authenticated #bottom-nav.nav::after,
body.is-authenticated:has(.estraha-reference-home) #bottom-nav::after {
  bottom: -28px !important;
  height: 28px !important;
}

body.is-authenticated #bottom-nav .nav-link,
body.is-authenticated #bottom-nav.nav .nav-link,
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link {
  min-width: 0 !important;
  min-height: 62px !important;
  padding: 7px 2px !important;
  grid-row: 1 !important;
}

body.is-authenticated #bottom-nav .nav-link[href="#home"],
body.is-authenticated #bottom-nav .nav-link[href="#chat"],
body.is-authenticated #bottom-nav .nav-link[href="#matches"],
body.is-authenticated #bottom-nav .nav-link[href="#payments"],
body.is-authenticated #bottom-nav .nav-link[href="#settings"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#home"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#chat"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#matches"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#payments"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#settings"] {
  display: grid !important;
}

body.is-authenticated #bottom-nav .nav-link[href="#news"],
body.is-authenticated #bottom-nav .nav-link[href="#members"],
body.is-authenticated #bottom-nav .nav-link[href="#prayer"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#news"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#members"],
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link[href="#prayer"] {
  display: none !important;
}

body.is-authenticated #bottom-nav .nav-link svg,
body.is-authenticated #bottom-nav.nav .nav-link svg,
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link svg {
  width: 26px !important;
  height: 26px !important;
}

body.is-authenticated #bottom-nav .nav-link span,
body.is-authenticated #bottom-nav.nav .nav-link span,
body.is-authenticated:has(.estraha-reference-home) #bottom-nav .nav-link span {
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 0.76rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.app-page-header,
.panel,
.list-item-card,
.service-card,
.stat-card,
.payment-summary-card,
.home-reference-card,
.chat-title-row,
.clean-chat-page .chat-search,
.clean-chat-page #chat-form {
  max-width: 100%;
}

.admin-notifications-page {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.admin-notifications-page .admin-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(90, 101, 78, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(55, 51, 43, 0.08);
  scrollbar-width: none;
}

.admin-notifications-page .admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-notifications-page .tab-btn {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #59665f;
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.admin-notifications-page .tab-btn.active {
  color: #1f2a21;
  border-color: rgba(120, 145, 90, 0.18);
  background: rgba(216, 222, 195, 0.9);
}

body[data-theme="dark"] .admin-notifications-page .admin-tabs {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(31, 34, 31, 0.86);
}

body[data-theme="dark"] .admin-notifications-page .tab-btn {
  color: #f5f1e8;
}

body[data-theme="dark"] .admin-notifications-page .tab-btn.active {
  color: #1f2a21;
  background: rgba(216, 222, 195, 0.9);
}

.admin-notifications-page .panel {
  margin: 0 !important;
}

.admin-notifications-page .panel-head {
  align-items: flex-start;
  gap: 8px;
}

.admin-notifications-page .panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-notifications-page .section-stack {
  gap: 12px;
}

.admin-notifications-page input,
.admin-notifications-page textarea,
.admin-notifications-page select {
  max-width: 100%;
}

.admin-test-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.admin-test-grid .btn,
.admin-notifications-page form > .btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

#admin-notification-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-weight: 800;
}

#admin-notification-status[data-status="pending"] {
  color: #6b765f;
}

#admin-notification-status[data-status="success"] {
  color: #2E7A5E;
}

#admin-notification-status[data-status="error"] {
  color: #b86243;
}

@media (max-width: 640px) {
  body.is-authenticated .main {
    padding-inline: 12px !important;
    padding-bottom: calc(116px + env(safe-area-inset-bottom)) !important;
  }

  body.is-authenticated #page-content {
    padding-bottom: calc(116px + env(safe-area-inset-bottom)) !important;
  }

  .app-page-header {
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 10px !important;
  }

  .app-page-header h2 {
    font-size: 1.22rem !important;
  }

  .panel {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .panel-head {
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .cards-grid,
  .payment-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-test-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-notifications-page {
    overflow-x: hidden;
  }

  .admin-notifications-page .admin-tabs {
    margin-inline: -4px;
    padding-inline: 6px;
    scroll-padding-inline: 6px;
  }

  .admin-notifications-page .tab-btn {
    min-width: max(108px, max-content);
    justify-content: center;
  }

  .admin-notifications-page .list-item-card,
  .admin-notifications-page .panel-head,
  .admin-notifications-page .flex {
    min-width: 0;
    flex-wrap: wrap;
  }

  .list-item-card {
    gap: 10px !important;
  }

  body.is-authenticated #bottom-nav.nav {
    min-height: 82px !important;
    padding-inline: 8px !important;
  }

  body.is-authenticated #bottom-nav.nav .nav-link {
    min-height: 58px !important;
  }
}

/* CHAT_FULL_HEIGHT_FIX_START */
body.is-authenticated #page-content:has(.clean-chat-page) {
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

.clean-chat-page {
  min-height: calc(100vh - 112px) !important;
  height: calc(100dvh - 112px) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  align-content: stretch !important;
  gap: 10px !important;
  overflow: hidden !important;
  padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
}

.clean-chat-page #chat-box.messages {
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.clean-chat-page #chat-form {
  position: static !important;
  inset: auto !important;
  align-self: end !important;
  margin: 0 !important;
}

@media (max-width: 600px) {
  .clean-chat-page {
    min-height: calc(100vh - 88px) !important;
    height: calc(100dvh - 88px) !important;
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }
}
/* CHAT_FULL_HEIGHT_FIX_END */

/* CENTER_GLOBAL_ALERT_START */
#custom-alert.custom-alert {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  width: 100vw !important;
  height: 100dvh !important;
  align-items: center !important;
  justify-content: center !important;
  place-items: center !important;
  padding: 20px !important;
  margin: 0 !important;
  overflow: auto !important;
  background: rgba(0, 0, 0, 0.55) !important;
}

#custom-alert[style*="display: block"],
#custom-alert[style*="display:block"],
#custom-alert[style*="display: flex"],
#custom-alert[style*="display:flex"],
#custom-alert[style*="display: grid"],
#custom-alert[style*="display:grid"],
#custom-alert.show,
#custom-alert.active,
#custom-alert.visible {
  display: grid !important;
}

#custom-alert .alert-content {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: min(92vw, 420px) !important;
  max-height: 80dvh !important;
  margin: auto !important;
  padding: 22px 18px !important;
  border-radius: 22px !important;
  text-align: center !important;
  overflow-y: auto !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35) !important;
}

#custom-alert #alert-message {
  margin: 0 0 18px !important;
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
}

#custom-alert .alert-buttons {
  display: flex !important;
  justify-content: center !important;
}
/* CENTER_GLOBAL_ALERT_END */
