/**
 * Theme: Consultant Dashboard header & footer (site-wide).
 * No CDN – all assets local. Used by _ThemeHeader.cshtml and _ThemeFooter.cshtml.
 */

:root {
  --theme-primary: #ec9213;
  --theme-primary-dark: #b06602;
  --theme-wood-dark: #3e2723;
  --theme-wood-light: #5d4037;
  --theme-bg-dark: #221a10;
  --theme-border-black: #000;
  --theme-header-height: 3.625rem;
  --theme-header-logo-box: 2.35rem;
}

/* Sticky footer: body column fills viewport, footer pins to bottom when content is short */
body.client-layout.theme-layout {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Main wrapper: flex so footer stays at bottom; padding for fixed bottom nav */
body.client-layout {
  --theme-bottom-nav-clearance: calc(4.85rem + env(safe-area-inset-bottom, 0px));
}

.client-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding-bottom: var(--theme-bottom-nav-clearance);
}

.client-main > .theme-footer {
  margin-top: auto;
  flex-shrink: 0;
}

.client-main > .theme-bottom-nav {
  flex-shrink: 0;
}

/* Header: lodge glass bar – always LTR so logo/controls don't swap in RTL */
.theme-header {
  flex: none;
  direction: ltr;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(34, 24, 18, 0.92);
  border-bottom: 1px solid rgba(238, 173, 43, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.theme-header-inner {
  direction: ltr;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: var(--theme-header-height);
  min-height: var(--theme-header-height);
  max-height: var(--theme-header-height);
  gap: 0.65rem;
  min-width: 0;
  overflow: hidden;
}

.theme-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(238, 173, 43, 0.45) 50%, transparent);
  opacity: 0.65;
  pointer-events: none;
}

.theme-header-box {
  position: relative;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.85rem;
}

.theme-header-brand,
.theme-header-center {
  flex-shrink: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.theme-header-brand .theme-header-logo,
.theme-header-center .theme-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  border-radius: 9999px;
  transition: background 0.2s ease;
}

.theme-header-brand .theme-header-logo:hover,
.theme-header-center .theme-header-logo:hover,
.theme-header-brand .theme-header-logo:focus-visible,
.theme-header-center .theme-header-logo:focus-visible {
  background: rgba(238, 173, 43, 0.1);
  outline: none;
}

.theme-header-brand .theme-header-logo-icon,
.theme-header-center .theme-header-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--theme-header-logo-box);
  height: var(--theme-header-logo-box);
  min-width: var(--theme-header-logo-box);
  min-height: var(--theme-header-logo-box);
  max-width: var(--theme-header-logo-box);
  max-height: var(--theme-header-logo-box);
  padding: 0.22rem;
  box-sizing: border-box;
  border-radius: 0.65rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(238, 173, 43, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.22);
}

.theme-header-brand .theme-header-logo-icon .theme-header-logo-img,
.theme-header-center .theme-header-logo-icon .theme-header-logo-img,
.theme-header-brand .theme-header-logo-icon .site-logo-theme-stack.theme-header-logo-img,
.theme-header-center .theme-header-logo-icon .site-logo-theme-stack.theme-header-logo-img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  border-radius: 0.35rem;
}

.theme-header-brand .theme-header-logo-icon .site-logo-theme-stack .site-logo-mark,
.theme-header-center .theme-header-logo-icon .site-logo-theme-stack .site-logo-mark {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
}

.theme-header-brand .theme-header-logo-icon .theme-icon,
.theme-header-center .theme-header-logo-icon .theme-icon {
  color: var(--theme-primary);
  font-size: 1.1rem;
}

.theme-header-brand .theme-header-title,
.theme-header-center .theme-header-title {
  font-size: clamp(0.875rem, 1.5vw + 0.35rem, 1.05rem);
  font-weight: 800;
  color: #eead2b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(11rem, 38vw);
  line-height: 1.1;
}

/* Modals are relocated under main.client-main; must stack above sticky header. */
.client-main > .modal {
  z-index: 1200 !important;
}

.client-main > .modal-backdrop {
  z-index: 1150 !important;
}

/* User badge container - responsive, no overflow; dropdown must not affect document flow */
.theme-header-actions {
  flex-shrink: 0;
  margin-inline-start: 0.5rem;
}

@media (min-width: 768px) {
  .theme-header-actions .btn-sm {
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
  }
}

.user-badge-dropdown {
  position: relative;
  max-width: min(200px, 40vw);
  min-width: 0;
  flex-shrink: 1;
  overflow: visible;
}

@media (min-width: 640px) {
  .user-badge-dropdown {
    max-width: min(280px, 45vw);
  }
}

.theme-header-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.2rem 0.15rem 0.55rem;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 9999px;
  border: 1px solid rgba(236, 146, 19, 0.22);
  min-width: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.theme-header-user:hover,
.theme-header-user:focus-visible {
  background: rgba(0, 0, 0, 0.42);
  border-color: rgba(236, 146, 19, 0.48);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
  outline: none;
}

button.theme-header-user {
  appearance: none;
  -webkit-appearance: none;
}

@media (min-width: 640px) {
  .theme-header-user {
    gap: 0.75rem;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
  }
}

.theme-header-user-info {
  text-align: right;
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 640px) {
  .theme-header-user-info {
    display: none;
  }
}

.theme-header-user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #e7e5e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.theme-header-user-role {
  font-size: 0.75rem;
  color: var(--theme-primary);
}

.theme-header-user-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  border: 2px solid rgba(236, 146, 19, 0.72);
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(236, 146, 19, 0.14);
  flex-shrink: 0;
}

/* Header user dropdown - overlay only, never in document flow; no scrolling of page */
.theme-header-dropdown {
  display: none;
  position: fixed !important;
  top: auto;
  right: auto;
  left: auto;
  margin-top: 0;
  min-width: 12rem;
  max-width: min(92vw, 16rem);
  max-height: min(70vh, 400px);
  overflow-y: auto;
  background: var(--theme-wood-dark);
  border: 1px solid rgba(236, 146, 19, 0.4);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 1400;
  padding: 0.25rem 0;
  pointer-events: auto;
}

.theme-header-dropdown.is-open {
  display: block !important;
}

.theme-header-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #e7e5e4;
  text-decoration: none;
  font-size: 0.875rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.theme-header-dropdown .dropdown-item:hover {
  background: rgba(236, 146, 19, 0.2);
  color: var(--theme-primary);
}

.theme-header-dropdown .dropdown-item i {
  width: 1.25rem;
  color: var(--theme-primary);
}

.theme-header-dropdown .dropdown-divider {
  height: 1px;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.1);
}

.theme-header-dropdown .logout-item {
  color: #fca5a5;
}

.theme-header-dropdown .logout-item:hover {
  color: #f87171;
}

/* Light mode: dropdown must be clearly visible (solid background, contrast) */
[data-theme="light"] .theme-header-dropdown {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .theme-header-dropdown .dropdown-item {
  color: #334155;
}
[data-theme="light"] .theme-header-dropdown .dropdown-item:hover {
  background: rgba(236, 146, 19, 0.12);
  color: var(--theme-primary-dark, #b06602);
}
[data-theme="light"] .theme-header-dropdown .dropdown-item i {
  color: var(--theme-primary);
}
[data-theme="light"] .theme-header-dropdown .dropdown-divider {
  background: #e2e8f0;
}
[data-theme="light"] .theme-header-dropdown .logout-item {
  color: #dc2626;
}
[data-theme="light"] .theme-header-dropdown .logout-item:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

[data-theme="light"] .theme-bottom-nav-profile-link {
  color: #64748b;
}
[data-theme="light"] .theme-bottom-nav-profile-link:hover,
[data-theme="light"] .theme-bottom-nav-profile-link:focus {
  color: var(--theme-primary-dark, #b06602);
  text-decoration: none;
}
[data-theme="light"] .theme-bottom-nav-profile-avatar {
  border-color: rgba(236, 146, 19, 0.6);
}

/* Language toggle pill in header */
.language-toggle-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.language-toggle-pill .language-option {
  padding: 0 0.35rem;
  z-index: 1;
  color: rgba(236, 146, 19, 0.8);
}

.language-toggle-pill.is-fa .language-option-en,
.language-toggle-pill.is-en .language-option-fa {
  color: #a8a29e;
}

/* Footer: lodge glass trail */
.theme-footer {
  flex: none;
  position: relative;
  margin-top: auto;
  overflow: hidden;
  background: rgba(28, 18, 12, 0.94);
  border-top: 1px solid rgba(238, 173, 43, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -8px 24px rgba(0, 0, 0, 0.18);
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.theme-footer-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(238, 173, 43, 0.07) 0%, transparent 42%),
    radial-gradient(ellipse 80% 120% at 50% 100%, rgba(238, 173, 43, 0.08) 0%, transparent 70%);
}

.theme-footer-foliage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.14;
  pointer-events: none;
}

.theme-footer-foliage .material-icons,
.theme-footer-foliage .theme-icon,
.theme-footer-foliage .fa-leaf {
  position: absolute;
  font-size: 2.5rem;
  color: #166534;
}

.theme-footer-foliage .grass-1 { bottom: -0.75rem; left: -0.5rem; transform: rotate(-45deg); }
.theme-footer-foliage .grass-2 { bottom: -0.85rem; left: 4rem; transform: rotate(-12deg); font-size: 2rem; }
.theme-footer-foliage .grass-3 { bottom: -0.85rem; right: 2rem; transform: rotate(12deg); }
.theme-footer-foliage .grass-4 { bottom: -0.75rem; right: 6rem; transform: rotate(45deg); font-size: 2rem; }

.theme-footer-inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin-inline: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  color: rgba(232, 223, 213, 0.88);
}

.theme-footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.theme-footer-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 4.25rem;
  padding: 0.45rem 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(238, 173, 43, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(254, 243, 199, 0.88);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.theme-footer-link:hover,
.theme-footer-link:focus-visible {
  color: #f5d78e;
  background: rgba(238, 173, 43, 0.12);
  border-color: rgba(238, 173, 43, 0.32);
  outline: none;
}

.theme-footer-link:active {
  transform: scale(0.98);
}

.theme-footer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eead2b;
  font-size: 0.95rem;
}

.theme-footer-link-label {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  text-align: center;
}

.theme-footer-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgba(232, 223, 213, 0.62);
}

.theme-footer-copyright i {
  font-size: 0.75rem;
  color: rgba(238, 173, 43, 0.75);
}

.theme-footer-enamad {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-footer-enamad img {
  max-height: 2.5rem;
  width: auto;
  display: block;
}

.theme-footer-enamad--coming-soon {
  pointer-events: none;
}

.theme-footer-enamad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(134, 239, 172, 0.28);
  background: rgba(22, 101, 52, 0.18);
  color: rgba(232, 223, 213, 0.92);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-footer-enamad-icon {
  color: #86efac;
  font-size: 0.85rem;
}

.theme-footer-enamad-text {
  opacity: 0.95;
}

.theme-footer-enamad--placeholder {
  display: none;
}

@media (min-width: 640px) {
  .theme-footer-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .theme-footer-link-label {
    font-size: 0.75rem;
  }

  .theme-footer-copyright {
    font-size: 0.75rem;
  }
}

@media (min-width: 992px) {
  .theme-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
  }

  .theme-footer-links {
    flex: 1 1 auto;
    max-width: 42rem;
  }

  .theme-footer-meta {
    flex: 0 0 auto;
    align-items: flex-end;
    text-align: end;
    gap: 0.5rem;
    max-width: min(100%, 22rem);
  }

  .theme-footer-copyright {
    justify-content: flex-end;
  }
}

/* Bottom-nav clearance lives on .client-main only — do not pad footer too */

/* ---- Light theme: header, footer, bottom nav (other pages – theme layout) ---- */
[data-theme="light"] .theme-header {
  background: rgba(255, 248, 238, 0.92);
  border-bottom-color: rgba(196, 168, 130, 0.65);
  box-shadow:
    0 8px 22px rgba(93, 64, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .theme-header::after {
  opacity: 0.75;
}

[data-theme="light"] .theme-header-box {
  box-shadow: none;
}

[data-theme="light"] .theme-header-brand .theme-header-logo:hover,
[data-theme="light"] .theme-header-center .theme-header-logo:hover {
  background: rgba(238, 173, 43, 0.12);
}

[data-theme="light"] .theme-header-brand .theme-header-logo-icon,
[data-theme="light"] .theme-header-center .theme-header-logo-icon,
html:not(.dark) .theme-header-brand .theme-header-logo-icon,
html:not(.dark) .theme-header-center .theme-header-logo-icon {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(196, 168, 130, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 3px 10px rgba(93, 64, 55, 0.1);
}

[data-theme="light"] .theme-header-brand .theme-header-title,
[data-theme="light"] .theme-header-center .theme-header-title {
  color: #8b5a14;
  text-shadow: none;
}

html.dark .theme-header,
[data-theme="dark"] .theme-header {
  background: rgba(22, 14, 10, 0.94);
  border-bottom-color: rgba(238, 173, 43, 0.2);
}

[data-theme="light"] .theme-footer {
  background: rgba(255, 248, 238, 0.94);
  border-top-color: rgba(196, 168, 130, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 -6px 20px rgba(93, 64, 55, 0.08);
}

[data-theme="light"] .theme-footer-glow {
  background:
    linear-gradient(to top, rgba(238, 173, 43, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse 80% 120% at 50% 100%, rgba(176, 102, 2, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .theme-footer-inner {
  color: #5d4e37;
}

[data-theme="light"] .theme-footer-link {
  color: #6b5a48;
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(196, 168, 130, 0.45);
}

[data-theme="light"] .theme-footer-link:hover,
[data-theme="light"] .theme-footer-link:focus-visible {
  color: #8b5a14;
  background: rgba(238, 173, 43, 0.14);
  border-color: rgba(176, 102, 2, 0.35);
}

[data-theme="light"] .theme-footer-link-icon {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(196, 168, 130, 0.4);
  color: #b06602;
}

[data-theme="light"] .theme-footer-foliage .material-icons,
[data-theme="light"] .theme-footer-foliage .theme-icon,
[data-theme="light"] .theme-footer-foliage .fa-leaf {
  color: #166534;
  opacity: 0.35;
}

[data-theme="light"] .theme-footer-copyright {
  color: #6b5a48;
}

[data-theme="light"] .theme-footer-enamad-badge,
html:not(.dark) .theme-footer-enamad-badge {
  border-color: rgba(22, 101, 52, 0.22);
  background: rgba(220, 252, 231, 0.72);
  color: #44403c;
}

[data-theme="light"] .theme-footer-enamad-icon,
html:not(.dark) .theme-footer-enamad-icon {
  color: #15803d;
}

html.dark .theme-footer,
[data-theme="dark"] .theme-footer {
  background: rgba(18, 12, 8, 0.96);
  border-top-color: rgba(238, 173, 43, 0.18);
}

[data-theme="light"] .theme-bottom-nav {
  background: rgba(255, 251, 245, 0.88);
  border-color: rgba(196, 168, 130, 0.65);
  box-shadow:
    0 10px 28px rgba(93, 64, 55, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .theme-bottom-nav-item {
  color: #6b5a48;
}

[data-theme="light"] .theme-bottom-nav-item:hover,
[data-theme="light"] .theme-bottom-nav-item:focus {
  color: var(--theme-primary-dark, #b06602);
  background: rgba(236, 146, 19, 0.1);
  text-decoration: none;
}

[data-theme="light"] .theme-bottom-nav-item.is-active {
  color: #8b5a14;
  background: rgba(236, 146, 19, 0.16);
}

[data-theme="light"] .theme-bottom-nav-center {
  color: #2a1a0d;
  background: linear-gradient(180deg, #f5c84a 0%, #eead2b 52%, #d89412 100%);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 8px 20px rgba(176, 102, 2, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .theme-bottom-nav-icon-wrap {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(196, 168, 130, 0.45);
}

[data-theme="light"] .theme-bottom-nav-item.is-active .theme-bottom-nav-icon-wrap:not(.theme-bottom-nav-icon-wrap--center):not(.theme-bottom-nav-icon-wrap--avatar) {
  background: rgba(236, 146, 19, 0.18);
  border-color: rgba(176, 102, 2, 0.35);
  color: #8b5a14;
}

/* Theme toggle in nav: visible on light background */
[data-theme="light"] .theme-bottom-nav .theme-toggle-btn {
  color: #6b5a48 !important;
}
[data-theme="light"] .theme-bottom-nav .theme-toggle-btn:hover,
[data-theme="light"] .theme-bottom-nav .theme-toggle-btn:focus {
  color: var(--theme-primary-dark, #b06602) !important;
  background-color: rgba(236, 146, 19, 0.12) !important;
}
[data-theme="light"] .theme-bottom-nav .theme-toggle-btn .theme-toggle-icon,
[data-theme="light"] .theme-bottom-nav .theme-toggle-btn .theme-bottom-nav-label {
  color: inherit;
}

/* ---- Fixed bottom nav: floating lodge bar (mobile-first) ---- */
.theme-bottom-nav {
  direction: ltr;
  position: fixed;
  left: 0.65rem;
  right: 0.65rem;
  bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  padding: 0.35rem 0.4rem;
  border-radius: 1.15rem;
  background: rgba(34, 24, 18, 0.88);
  border: 1px solid rgba(238, 173, 43, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.theme-bottom-nav-track {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.15rem;
  width: 100%;
}

.theme-bottom-nav-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.2rem 0.15rem 0.15rem;
  color: rgba(232, 223, 213, 0.78);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-bottom-nav-item:hover,
.theme-bottom-nav-item:focus-visible {
  color: #f5d78e;
  background: rgba(238, 173, 43, 0.1);
  outline: none;
  text-decoration: none;
}

.theme-bottom-nav-item.is-active {
  color: #eead2b;
  background: rgba(238, 173, 43, 0.12);
}

.theme-bottom-nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-bottom-nav-icon-wrap i {
  font-size: 1rem;
  line-height: 1;
}

.theme-bottom-nav-item.is-active .theme-bottom-nav-icon-wrap:not(.theme-bottom-nav-icon-wrap--center):not(.theme-bottom-nav-icon-wrap--avatar) {
  background: rgba(238, 173, 43, 0.16);
  border-color: rgba(238, 173, 43, 0.35);
  color: #f5d78e;
}

.theme-bottom-nav-center {
  position: relative;
  top: -0.55rem;
  flex: 0 0 auto;
  min-width: 3.5rem;
  min-height: 0;
  padding-bottom: 0;
  color: #2a1a0d;
}

.theme-bottom-nav-icon-wrap--center {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #f5c84a 0%, #eead2b 52%, #c8870f 100%);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 8px 22px rgba(238, 173, 43, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #2a1a0d;
}

.theme-bottom-nav-icon-wrap--center i {
  font-size: 1.2rem;
}

.theme-bottom-nav-center .theme-bottom-nav-label {
  color: #eead2b;
  font-weight: 700;
}

.theme-bottom-nav-center.is-active .theme-bottom-nav-icon-wrap--center {
  box-shadow:
    0 10px 26px rgba(238, 173, 43, 0.48),
    0 0 0 3px rgba(238, 173, 43, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.theme-bottom-nav-label {
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding-inline: 0.1rem;
}

.theme-bottom-nav-item--utility .theme-bottom-nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-bottom-nav-item--utility {
  flex: 0 0 2.35rem;
  min-width: 2.35rem;
  min-height: 2.85rem;
  padding-inline: 0;
}

.theme-bottom-nav-item--utility .theme-bottom-nav-icon-wrap {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
}

/* Profile link in bottom nav */
.theme-bottom-nav-profile-link {
  text-decoration: none;
  color: rgba(232, 223, 213, 0.78);
}

.theme-bottom-nav-icon-wrap--avatar {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 9999px;
  overflow: hidden;
  background: transparent;
}

.theme-bottom-nav-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  border: 2px solid rgba(238, 173, 43, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-bottom-nav-profile-link:hover,
.theme-bottom-nav-profile-link:focus-visible {
  text-decoration: none;
}

.theme-bottom-nav-profile-link:hover .theme-bottom-nav-profile-avatar,
.theme-bottom-nav-profile-link:focus-visible .theme-bottom-nav-profile-avatar,
.theme-bottom-nav-profile-link.is-active .theme-bottom-nav-profile-avatar {
  border-color: #eead2b;
  box-shadow: 0 0 0 2px rgba(238, 173, 43, 0.22);
}

.theme-bottom-nav .theme-toggle-btn,
.theme-bottom-nav .language-toggle-btn {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  flex-direction: column;
  font-size: inherit !important;
}

/* Compact bottom nav: phones below 390px (covers 320px iPhone SE and small Android) */
@media (max-width: 389.98px) {
  body.client-layout {
    --theme-bottom-nav-clearance: calc(4.15rem + env(safe-area-inset-bottom, 0px));
  }

  .theme-bottom-nav {
    left: 0.4rem;
    right: 0.4rem;
    bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
    padding: 0.28rem 0.2rem;
    border-radius: 1rem;
  }

  .theme-bottom-nav-track {
    gap: 0.05rem;
  }

  .theme-bottom-nav-item:not(.theme-bottom-nav-center) {
    min-height: 2.5rem;
    padding: 0.12rem 0.04rem 0.1rem;
    gap: 0;
  }

  .theme-bottom-nav-item:not(.theme-bottom-nav-center):not(.theme-bottom-nav-item--utility) .theme-bottom-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .theme-bottom-nav-icon-wrap {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
  }

  .theme-bottom-nav-icon-wrap i {
    font-size: 0.9rem;
  }

  .theme-bottom-nav-item--utility {
    flex: 0 0 1.9rem;
    min-width: 1.9rem;
    min-height: 2.4rem;
  }

  .theme-bottom-nav-item--utility .theme-bottom-nav-icon-wrap {
    width: 1.85rem;
    height: 1.85rem;
  }

  .theme-bottom-nav-icon-wrap--avatar {
    width: 1.85rem;
    height: 1.85rem;
  }

  .theme-bottom-nav-center {
    top: -0.4rem;
    min-width: 2.85rem;
    gap: 0.12rem;
  }

  .theme-bottom-nav-icon-wrap--center {
    width: 2.65rem;
    height: 2.65rem;
  }

  .theme-bottom-nav-icon-wrap--center i {
    font-size: 1.05rem;
  }

  .theme-bottom-nav-center .theme-bottom-nav-label {
    font-size: 0.5625rem;
    max-width: 3.25rem;
  }
}

@media (max-width: 359.98px) {
  body.client-layout {
    --theme-bottom-nav-clearance: calc(3.85rem + env(safe-area-inset-bottom, 0px));
  }

  .theme-bottom-nav {
    left: 0.3rem;
    right: 0.3rem;
    padding: 0.24rem 0.12rem;
  }

  .theme-bottom-nav-track {
    gap: 0;
  }

  .theme-bottom-nav-item:not(.theme-bottom-nav-center) {
    min-height: 2.35rem;
  }

  .theme-bottom-nav-icon-wrap {
    width: 1.7rem;
    height: 1.7rem;
  }

  .theme-bottom-nav-icon-wrap i {
    font-size: 0.82rem;
  }

  .theme-bottom-nav-item--utility {
    flex: 0 0 1.7rem;
    min-width: 1.7rem;
  }

  .theme-bottom-nav-item--utility .theme-bottom-nav-icon-wrap {
    width: 1.7rem;
    height: 1.7rem;
  }

  .theme-bottom-nav-icon-wrap--avatar {
    width: 1.7rem;
    height: 1.7rem;
  }

  .theme-bottom-nav-center {
    top: -0.32rem;
    min-width: 2.5rem;
  }

  .theme-bottom-nav-icon-wrap--center {
    width: 2.35rem;
    height: 2.35rem;
  }

  .theme-bottom-nav-icon-wrap--center i {
    font-size: 0.95rem;
  }

  .theme-bottom-nav-center .theme-bottom-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 319.98px) {
  body.client-layout {
    --theme-bottom-nav-clearance: calc(3.55rem + env(safe-area-inset-bottom, 0px));
  }

  .theme-bottom-nav {
    left: 0.2rem;
    right: 0.2rem;
    bottom: calc(0.32rem + env(safe-area-inset-bottom, 0px));
    padding: 0.2rem 0.08rem;
    border-radius: 0.9rem;
  }

  .theme-bottom-nav-center {
    top: -0.28rem;
    min-width: 2.25rem;
  }

  .theme-bottom-nav-icon-wrap--center {
    width: 2.15rem;
    height: 2.15rem;
  }

  .theme-bottom-nav-icon-wrap--center i {
    font-size: 0.88rem;
  }

  .theme-bottom-nav-icon-wrap {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.5rem;
  }

  .theme-bottom-nav-icon-wrap i {
    font-size: 0.75rem;
  }

  .theme-bottom-nav-item--utility {
    flex: 0 0 1.55rem;
    min-width: 1.55rem;
  }

  .theme-bottom-nav-item--utility .theme-bottom-nav-icon-wrap {
    width: 1.55rem;
    height: 1.55rem;
  }

  .theme-bottom-nav-icon-wrap--avatar {
    width: 1.55rem;
    height: 1.55rem;
  }

  .theme-bottom-nav-profile-avatar {
    border-width: 1.5px;
  }
}

@media (min-width: 390px) {
  .theme-bottom-nav {
    left: 0.85rem;
    right: 0.85rem;
  }

  .theme-bottom-nav-item {
    font-size: 0.6875rem;
  }

  .theme-bottom-nav-icon-wrap {
    width: 2.15rem;
    height: 2.15rem;
  }
}

@media (min-width: 640px) {
  .theme-bottom-nav {
    left: 1rem;
    right: 1rem;
    padding: 0.4rem 0.55rem;
  }

  .theme-bottom-nav-item {
    font-size: 0.6875rem;
    padding-inline: 0.2rem;
  }
}

/* Homepage header/mobile styles live in home-theme.css (decoupled from global theme header). */

/* ============================================
   Client layout: desktop header nav (lg+)
   Homepage (.home-page-layout) is NOT affected.
   ============================================ */

.theme-header-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 0.5rem;
}

.theme-header-nav {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0.5rem;
}

.theme-header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: #d6d3d1;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  max-width: 100%;
}

.theme-header-nav-icon {
  font-size: 0.8rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.theme-header-nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-header-nav-link:hover,
.theme-header-nav-link:focus {
  color: var(--theme-primary, #ec9213);
  background: rgba(236, 146, 19, 0.12);
  text-decoration: none;
}

.theme-header-nav-link.is-active {
  color: var(--theme-primary, #ec9213);
  background: rgba(236, 146, 19, 0.18);
}

.theme-header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.theme-header-utilities {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.theme-header-utility-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(232, 223, 213, 0.88);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.theme-header-utility-btn:hover,
.theme-header-utility-btn:focus-visible {
  color: #f5d78e;
  background: rgba(238, 173, 43, 0.14);
  border-color: rgba(238, 173, 43, 0.35);
  outline: none;
}

.theme-header-utility-btn:active {
  transform: scale(0.96);
}

.theme-header-utility-btn .theme-toggle-icon {
  font-size: 0.95rem;
}

.theme-header-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.theme-header-lang-option {
  opacity: 0.45;
}

.theme-header-lang-pill.is-fa .theme-header-lang-option:first-child,
.theme-header-lang-pill.is-en .theme-header-lang-option:last-child {
  opacity: 1;
  color: var(--theme-primary, #ec9213);
}

.theme-header-actions--guest {
  display: none;
  align-items: center;
  gap: 0.4rem;
}

.theme-header-actions--auth {
  display: none;
}

.theme-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-header-btn--ghost {
  color: #e7e5e4;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.theme-header-btn--ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.theme-header-btn--primary {
  color: #1a160c;
  background: var(--theme-primary, #ec9213);
  border-color: rgba(236, 146, 19, 0.6);
}

.theme-header-btn--primary:hover {
  color: #1a160c;
  background: #f0a830;
  text-decoration: none;
}

.theme-header-actions--guest,
.theme-header-actions--auth {
  display: flex;
}

@media (max-width: 767.98px) {
  .theme-header-user-info {
    display: none;
  }

  .theme-header-user {
    padding: 0.12rem;
    border-radius: 50%;
  }

  .theme-header-user-avatar {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (max-width: 991.98px) {
  .theme-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    justify-content: stretch;
  }

  .theme-header-brand {
    grid-column: 1;
    justify-self: center;
    flex: 1;
    min-width: 0;
    pointer-events: auto;
    max-width: 100%;
  }

  .theme-header-end {
    grid-column: 2;
    position: static;
    transform: none;
    inset-inline-end: auto;
    top: auto;
    margin-inline-start: 0;
    z-index: 2;
    pointer-events: auto;
    flex-shrink: 0;
  }

  .theme-header-notifications,
  .theme-header-actions,
  .user-badge-dropdown {
    position: relative;
    z-index: 3;
  }

  .theme-header-utility-btn,
  .theme-header-user,
  .theme-header-notifications .theme-header-utility-btn,
  .theme-header-notifications .theme-header-bell-btn,
  button.theme-header-user {
    min-width: 2.25rem;
    min-height: 2.25rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .theme-header-brand .theme-header-title {
    max-width: min(9rem, 42vw);
  }

  .theme-header-brand .theme-header-logo {
    padding: 0.15rem 0.45rem 0.15rem 0.15rem;
  }

  .theme-header-actions--guest .theme-header-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .theme-header-brand .theme-header-title {
    max-width: min(7rem, 34vw);
    font-size: 0.8125rem;
  }
}

@media (max-width: 359px) {
  .theme-header-brand .theme-header-title {
    display: none;
  }

  .theme-header-brand .theme-header-logo {
    padding-inline: 0.15rem;
  }
}

@media (min-width: 992px) {
  .theme-header-inner {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-height: var(--theme-header-height);
    height: var(--theme-header-height);
    max-height: var(--theme-header-height);
    padding: 0;
  }

  .theme-header-nav {
    display: flex;
    order: 2;
    padding: 0;
  }

  .theme-header-brand {
    flex-shrink: 0;
    order: 1;
  }

  .theme-header-end {
    flex-shrink: 0;
    order: 3;
    margin-inline-start: 0;
  }

  .theme-header-utilities {
    display: flex;
    flex-shrink: 0;
  }

  .theme-header-brand .theme-header-title {
    max-width: 11rem;
  }

  .theme-header-nav-link {
    font-size: 0.8125rem;
    padding: 0.4rem 0.7rem;
  }

  /* Client pages only: top nav on desktop, bottom bar on mobile */
  body.client-layout .theme-bottom-nav {
    display: none !important;
  }

  body.client-layout .client-main {
    padding-bottom: 0 !important;
  }
}

@media (min-width: 1200px) {
  .theme-header-nav {
    gap: 0.5rem;
  }

  .theme-header-nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.85rem;
  }
}

/* Header controls: override global .theme-toggle-btn / .language-toggle-btn !important */
.theme-header .theme-header-utility-btn.theme-toggle-btn {
  width: 2.15rem !important;
  height: 2.15rem !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border-radius: 0.65rem !important;
  background: rgba(0, 0, 0, 0.24) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(232, 223, 213, 0.88) !important;
}

.theme-header .theme-header-utility-btn.theme-toggle-btn:hover,
.theme-header .theme-header-utility-btn.theme-toggle-btn:focus-visible {
  background: rgba(238, 173, 43, 0.14) !important;
  border-color: rgba(238, 173, 43, 0.35) !important;
  color: #f5d78e !important;
  transform: scale(0.96);
}

.theme-header .theme-header-utility-btn.language-toggle-btn {
  width: 2.15rem !important;
  height: 2.15rem !important;
  padding: 0 !important;
  border-radius: 0.65rem !important;
  color: rgba(232, 223, 213, 0.88) !important;
}

.theme-header .theme-header-lang-pill {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.theme-header .theme-header-lang-option {
  color: #a8a29e;
}

/* Light theme: header auth, nav, utilities (all breakpoints) */
[data-theme="light"] .theme-header-nav-link {
  color: #57534e;
}

[data-theme="light"] .theme-header-nav-link:hover,
[data-theme="light"] .theme-header-nav-link:focus,
[data-theme="light"] .theme-header-nav-link.is-active {
  color: var(--theme-primary-dark, #b06602);
  background: rgba(236, 146, 19, 0.14);
}

[data-theme="light"] .theme-header .theme-header-utility-btn.theme-toggle-btn,
[data-theme="light"] .theme-header .theme-header-utility-btn.language-toggle-btn,
[data-theme="light"] .theme-header .theme-header-bell-btn {
  color: #6b5a48 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(196, 168, 130, 0.55) !important;
}

[data-theme="light"] .theme-header .theme-header-utility-btn.theme-toggle-btn:hover,
[data-theme="light"] .theme-header .theme-header-utility-btn.theme-toggle-btn:focus,
[data-theme="light"] .theme-header .theme-header-utility-btn.language-toggle-btn:hover,
[data-theme="light"] .theme-header .theme-header-utility-btn.language-toggle-btn:focus {
  color: var(--theme-primary-dark, #b06602) !important;
  background: rgba(236, 146, 19, 0.12) !important;
  border-color: rgba(236, 146, 19, 0.35) !important;
}

[data-theme="light"] .theme-header .theme-header-lang-option {
  color: #a8a29e;
}

[data-theme="light"] .theme-header .theme-header-lang-pill.is-fa .theme-header-lang-option:first-child,
[data-theme="light"] .theme-header .theme-header-lang-pill.is-en .theme-header-lang-option:last-child {
  color: var(--theme-primary-dark, #b06602);
}

[data-theme="light"] .theme-header-user {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-header-user-name {
  color: #44403c;
}

[data-theme="light"] .theme-header-btn--ghost {
  color: #44403c;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-header-btn--ghost:hover {
  color: #1c1917;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .theme-header-btn--primary {
  color: #fff;
  background: var(--theme-primary-dark, #b06602);
  border-color: rgba(176, 102, 2, 0.45);
}

[data-theme="light"] .theme-header-btn--primary:hover {
  color: #fff;
  background: #9a5a02;
}

/* Dark theme: reinforce readable header chrome */
[data-theme="dark"] .theme-header-nav-link {
  color: #d6d3d1;
}

[data-theme="dark"] .theme-header-nav-link:hover,
[data-theme="dark"] .theme-header-nav-link:focus,
[data-theme="dark"] .theme-header-nav-link.is-active {
  color: var(--theme-primary, #ec9213);
  background: rgba(236, 146, 19, 0.14);
}

[data-theme="dark"] .theme-header-user-name {
  color: #f5f5f4;
}

[data-theme="dark"] .theme-header .theme-header-lang-option {
  color: #78716c;
}

[data-theme="dark"] .theme-header .theme-header-lang-pill.is-fa .theme-header-lang-option:first-child,
[data-theme="dark"] .theme-header .theme-header-lang-pill.is-en .theme-header-lang-option:last-child {
  color: var(--theme-primary, #ec9213);
}

/* Dashboard routes: compact header controls, visible utilities on mobile */
.client-main.client-dashboard-page .theme-header-end,
.client-main.owner-dashboard-page .theme-header-end,
.client-main.consultant-dashboard-page .theme-header-end {
  gap: 0.35rem;
}

.client-main.client-dashboard-page .theme-header-utilities,
.client-main.owner-dashboard-page .theme-header-utilities,
.client-main.consultant-dashboard-page .theme-header-utilities {
  display: flex;
}

.client-main.client-dashboard-page .theme-header-notifications,
.client-main.owner-dashboard-page .theme-header-notifications,
.client-main.consultant-dashboard-page .theme-header-notifications,
.client-main.client-dashboard-page .user-badge-dropdown,
.client-main.owner-dashboard-page .user-badge-dropdown,
.client-main.consultant-dashboard-page .user-badge-dropdown {
  flex-shrink: 0;
}

.client-main.client-dashboard-page .theme-header-dropdown,
.client-main.owner-dashboard-page .theme-header-dropdown,
.client-main.consultant-dashboard-page .theme-header-dropdown,
.client-main.client-dashboard-page .notification-dropdown,
.client-main.owner-dashboard-page .notification-dropdown,
.client-main.consultant-dashboard-page .notification-dropdown {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

@media (max-width: 991.98px) {
  .client-main.client-dashboard-page .theme-header-inner,
  .client-main.owner-dashboard-page .theme-header-inner,
  .client-main.consultant-dashboard-page .theme-header-inner {
    gap: 0.25rem;
  }

  .client-main.client-dashboard-page .theme-header-end,
  .client-main.owner-dashboard-page .theme-header-end,
  .client-main.consultant-dashboard-page .theme-header-end {
    gap: 0.2rem;
  }

  .client-main.client-dashboard-page .theme-header-utility-btn,
  .client-main.owner-dashboard-page .theme-header-utility-btn,
  .client-main.consultant-dashboard-page .theme-header-utility-btn,
  .client-main.client-dashboard-page .theme-header-bell-btn,
  .client-main.owner-dashboard-page .theme-header-bell-btn,
  .client-main.consultant-dashboard-page .theme-header-bell-btn {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
  }
}

/* ============================================
   Header chrome: bell, user badge, utilities
   ============================================ */

.theme-header-end {
  gap: 0.35rem;
}

.theme-header-notifications {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-header-bell-btn {
  position: relative;
  overflow: visible;
}

.theme-header-bell-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.theme-header-bell-btn .theme-header-bell-icon i {
  display: block;
}

.theme-header-bell-badge {
  position: absolute;
  top: 1px;
  inset-inline-end: 1px;
  min-width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border-radius: 999px;
  background: #ef4444;
  border: 1.5px solid rgba(34, 26, 16, 0.9);
  color: #fff;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.theme-header-bell-badge:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-bell.has-unread .theme-header-bell-badge {
  min-width: 0.85rem;
  height: 0.85rem;
  font-size: 0.52rem;
  padding: 0 0.15rem;
  top: -2px;
  inset-inline-end: -2px;
  animation: theme-bell-badge-pop 0.35s ease;
}

.notification-bell:not(.has-unread) .theme-header-bell-btn {
  color: #a8a29e;
}

.notification-bell:not(.has-unread) .theme-header-bell-btn:hover,
.notification-bell:not(.has-unread) .theme-header-bell-btn:focus-visible {
  color: var(--theme-primary, #ec9213);
  background: rgba(236, 146, 19, 0.1);
  border-color: rgba(236, 146, 19, 0.3);
}

.notification-bell.has-unread .theme-header-bell-btn {
  color: var(--theme-primary, #ec9213);
  background: rgba(236, 146, 19, 0.16);
  border-color: rgba(236, 146, 19, 0.52);
  box-shadow: 0 0 0 2px rgba(236, 146, 19, 0.12), 0 2px 10px rgba(236, 146, 19, 0.18);
}

.notification-bell.has-unread .theme-header-bell-btn:hover,
.notification-bell.has-unread .theme-header-bell-btn:focus-visible {
  background: rgba(236, 146, 19, 0.24);
  border-color: rgba(236, 146, 19, 0.65);
  transform: translateY(-1px);
}

.notification-bell.has-unread .theme-header-bell-icon {
  animation: theme-bell-ring 0.55s ease;
}

@keyframes theme-bell-badge-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes theme-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}

@media (max-width: 767.98px) {
  .theme-header-user {
    padding: 0.12rem;
    border-radius: 50%;
    gap: 0;
  }

  .theme-header-user-avatar {
    width: 1.75rem;
    height: 1.75rem;
  }

  .theme-header-end {
    gap: 0.25rem;
  }
}

@media (min-width: 992px) {
  .theme-header-end {
    gap: 0.45rem;
  }

  .theme-header-utilities {
    gap: 0.35rem;
  }
}

[data-theme="light"] .theme-header-bell-btn {
  color: #78716c;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .notification-bell:not(.has-unread) .theme-header-bell-btn:hover,
[data-theme="light"] .notification-bell:not(.has-unread) .theme-header-bell-btn:focus-visible {
  color: var(--theme-primary-dark, #b06602);
  background: rgba(236, 146, 19, 0.1);
  border-color: rgba(236, 146, 19, 0.28);
}

[data-theme="light"] .notification-bell.has-unread .theme-header-bell-btn {
  color: var(--theme-primary-dark, #b06602);
  background: rgba(236, 146, 19, 0.14);
  border-color: rgba(236, 146, 19, 0.42);
  box-shadow: 0 0 0 2px rgba(236, 146, 19, 0.1), 0 2px 8px rgba(176, 102, 2, 0.12);
}

[data-theme="light"] .theme-header-bell-badge {
  border-color: #faf8f5;
}

[data-theme="light"] .theme-header-user {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(176, 102, 2, 0.22);
  box-shadow: 0 2px 10px rgba(62, 39, 35, 0.08);
}

[data-theme="light"] .theme-header-user:hover,
[data-theme="light"] .theme-header-user:focus-visible {
  background: #fff;
  border-color: rgba(176, 102, 2, 0.42);
  box-shadow: 0 4px 14px rgba(62, 39, 35, 0.12);
}

[data-theme="light"] .theme-header-user-avatar {
  border-color: rgba(176, 102, 2, 0.65);
  box-shadow: 0 0 0 2px rgba(236, 146, 19, 0.12);
}
