/* ---------- shared site header ---------- */
/* Compact universal nav used across /home /crm /calendar /dashboard.
   Brand: "Mikey Pool's Swim Club".
   Hamburger (left) opens a slide-out menu with links to all internal pages.
   Page-specific actions are injected into #sh-actions by each page. */

:root {
  --sh-navy: #0a3a5a;
  --sh-blue: #418CCA;
  --sh-blue-dark: #3B75B6;
  --sh-text: #1f2937;
  --sh-muted: #6b7280;
  --sh-border: rgba(255,255,255,0.14);
  --sh-bg: rgba(10,58,90,0.96);
}

.site-header {
  height: 52px;
  background: var(--sh-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(14px, 2.5vw, 28px);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  flex-shrink: 0;
}
.site-header * { box-sizing: border-box; }

.sh-left, .sh-right { display: flex; align-items: center; gap: 8px; }

.sh-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  font-size: 12px; line-height: 1;
  padding: 4px 6px;
}
.sh-brand .lg {
  width: 32px; height: 32px;
  background: transparent;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.sh-brand .lg img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.sh-brand .nm { white-space: nowrap; }
.sh-brand .nm .sm { display: block; font-size: 8.5px; letter-spacing: 0.22em; opacity: 0.6; margin-top: 2px; font-weight: 500; }
@media (max-width: 540px) { .sh-brand .nm .sm { display: none; } }

.sh-hamburger {
  width: 36px; height: 36px;
  background: transparent; border: 1px solid var(--sh-border);
  border-radius: 4px; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.sh-hamburger:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.sh-hamburger .bars { display: flex; flex-direction: column; gap: 4px; }
.sh-hamburger .bars span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px; }

#sh-actions { display: flex; align-items: center; gap: 8px; }
#sh-actions .sh-btn, .sh-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: transparent; color: #fff;
  border: 1px solid var(--sh-border); border-radius: 4px;
  font-family: inherit; font-weight: 600; font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.sh-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
.sh-btn.icon { padding: 6px 9px; font-size: 13px; }
.sh-btn.primary { background: var(--sh-blue); border-color: var(--sh-blue); }
.sh-btn.primary:hover { background: var(--sh-blue-dark); border-color: var(--sh-blue-dark); }

.sh-btn .label-desk { display: none; }
@media (min-width: 600px) { .sh-btn .label-desk { display: inline; } }

/* ---------- slide-out menu ---------- */
.sh-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 16, 30, 0.5);
  backdrop-filter: blur(2px);
  z-index: 250;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
}
.sh-overlay.open { opacity: 1; pointer-events: auto; }

.sh-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(320px, 86vw);
  background: #fff;
  z-index: 260;
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
  box-shadow: 6px 0 32px rgba(0, 0, 0, 0.25);
}
.sh-drawer.open { transform: translateX(0); }

.sh-drawer-head {
  background: var(--sh-navy);
  color: #fff;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sh-drawer-head .ttl { font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.sh-drawer-head .ttl .small { display: block; font-size: 9px; letter-spacing: 0.24em; opacity: 0.65; margin-top: 3px; font-weight: 500; }
.sh-drawer-close {
  background: transparent; border: 1px solid rgba(255,255,255,0.25);
  color: #fff; width: 32px; height: 32px; border-radius: 4px;
  cursor: pointer; font-size: 18px; line-height: 1;
}
.sh-drawer-close:hover { background: rgba(255,255,255,0.1); }

.sh-menu { flex: 1; overflow-y: auto; padding: 12px 0; }
.sh-menu .group {
  padding: 14px 22px 6px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sh-muted);
}
.sh-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 22px;
  color: var(--sh-text); text-decoration: none;
  font-size: 14px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.sh-menu a:hover { background: #f0f5fb; color: var(--sh-blue-dark); border-left-color: var(--sh-blue); }
.sh-menu a.current { background: #e8f1fb; color: var(--sh-blue-dark); border-left-color: var(--sh-blue); }
.sh-menu a .ic { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; opacity: 0.85; }
.sh-menu a .lab { flex: 1; }
.sh-menu a .sub { font-size: 10.5px; color: var(--sh-muted); font-weight: 500; letter-spacing: 0.04em; }
.sh-menu a:hover .sub, .sh-menu a.current .sub { color: var(--sh-blue); }

.sh-drawer-foot {
  border-top: 1px solid var(--sh-border, #e5e7eb);
  padding: 14px 22px;
  flex-shrink: 0;
}
.sh-signout {
  display: block; width: 100%;
  padding: 10px 14px;
  background: #fff; color: #b91c1c;
  border: 1px solid #fecaca; border-radius: 4px;
  font-family: inherit; font-weight: 600; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.sh-signout:hover { background: #fee2e2; border-color: #ef4444; }

body.sh-locked { overflow: hidden; }
