/* A8BM Header & Footer — matches student-portal HTML reference */
:root {
  --a8bm-hf-bg: #f6f6f7;
  --a8bm-hf-surface: #ffffff;
  --a8bm-hf-text: #18181b;
  --a8bm-hf-muted: #a1a1aa;
  --a8bm-hf-border: #e4e4e7;
  --a8bm-hf-accent: #18181b;
  --a8bm-hf-red: #ff3b30;
  --a8bm-hf-safe-top: env(safe-area-inset-top, 0px);
  --a8bm-hf-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.a8bm-hf-header {
  position: relative;
  z-index: 40;
  width: 100%;
  height: 64px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(228, 228, 231, 0.7);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.a8bm-hf-header.a8bm-hf-sticky {
  position: relative;
  top: auto;
}
@media (min-width: 1024px) {
  .a8bm-hf-header.a8bm-hf-sticky {
    position: sticky;
    top: var(--a8bm-hf-safe-top);
  }
}
.a8bm-hf-header.a8bm-hf-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.a8bm-hf-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(228, 228, 231, 0.8);
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.a8bm-hf-header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .a8bm-hf-header-inner { padding: 0 24px; }
}
@media (min-width: 1024px) {
  .a8bm-hf-header-inner { padding: 0 32px; }
}

.a8bm-hf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.a8bm-hf-logo-mark {
  height: 32px;
  width: 32px;
  border-radius: 10px;
  background: #18181b;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.a8bm-hf-logo-text {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 17px;
  color: #18181b;
}
.a8bm-hf-live {
  display: none;
  margin-left: 4px;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 9999px;
  background: #18181b;
  color: #fff;
  letter-spacing: 0.05em;
}
@media (min-width: 768px) {
  .a8bm-hf-live { display: inline-flex; }
}

.a8bm-hf-nav {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 6px;
}
@media (min-width: 1024px) {
  .a8bm-hf-nav { display: flex; }
}
.a8bm-hf-nav-link {
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #71717a;
  text-decoration: none;
  transition: all 0.2s;
}
.a8bm-hf-nav-link:hover {
  color: #18181b;
  background: #f4f4f5;
}
.a8bm-hf-nav-link.is-active {
  background: #18181b;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.a8bm-hf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.a8bm-hf-icon-btn {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #3f3f46;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.a8bm-hf-icon-btn:hover { background: #fafafa; }
.a8bm-hf-icon-btn.is-open {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.a8bm-hf-menu-toggle {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
@media (min-width: 1024px) {
  .a8bm-hf-menu-toggle { display: none; }
}
.a8bm-hf-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  line-height: 1;
}

.a8bm-hf-avatar {
  height: 36px;
  width: 36px;
  border-radius: 9999px;
  overflow: hidden;
  background: #18181b;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
  border: none;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 1px #e4e4e7, 0 0 0 3px #fff;
  transition: box-shadow 0.2s;
}
.a8bm-hf-avatar:hover { box-shadow: 0 0 0 1px #d4d4d8, 0 0 0 3px #fff; }
.a8bm-hf-avatar-lg {
  height: 40px;
  width: 40px;
  font-size: 13px;
  box-shadow: none;
}
.a8bm-hf-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 10px;
  width: 10px;
  border-radius: 9999px;
  background: #10b981;
  border: 2px solid #fff;
}

.a8bm-hf-dropdown-wrap { position: relative; }
.a8bm-hf-dropdown {
  position: absolute;
  right: 0;
  top: 48px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 50;
  animation: a8bm-hf-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}
.a8bm-hf-notif-panel { width: 320px; max-width: 88vw; border-radius: 20px; }
.a8bm-hf-account-panel { width: 240px; max-width: 70vw; }
@keyframes a8bm-hf-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.a8bm-hf-dropdown-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f4f4f5;
}
.a8bm-hf-dropdown-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.a8bm-hf-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 9999px;
  background: #18181b;
  color: #fff;
}
.a8bm-hf-notif-list { padding: 8px; max-height: 320px; overflow-y: auto; }
.a8bm-hf-notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.a8bm-hf-notif-item:hover { background: #fafafa; }
.a8bm-hf-notif-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  margin-top: 8px;
  flex-shrink: 0;
  background: #d4d4d8;
}
.a8bm-hf-notif-dot.amber { background: #fbbf24; }
.a8bm-hf-notif-dot.green { background: #34d399; }
.a8bm-hf-notif-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #18181b;
  line-height: 1.2;
}
.a8bm-hf-notif-desc {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a8bm-hf-notif-time {
  margin: 6px 0 0;
  font-size: 11px;
  color: #a1a1aa;
}
.a8bm-hf-empty {
  margin: 16px;
  text-align: center;
  font-size: 13px;
  color: #a1a1aa;
}
.a8bm-hf-dropdown-foot {
  padding: 8px;
  border-top: 1px solid #f4f4f5;
}
.a8bm-hf-btn-ghost {
  width: 100%;
  padding: 10px;
  border-radius: 9999px;
  border: none;
  background: #fafafa;
  font-size: 12.5px;
  font-weight: 500;
  color: #3f3f46;
  cursor: pointer;
}
.a8bm-hf-btn-ghost:hover { background: #f4f4f5; }

.a8bm-hf-account-head {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #f4f4f5;
}
.a8bm-hf-account-name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a8bm-hf-account-meta {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #71717a;
}
.a8bm-hf-account-links { padding: 8px; }
.a8bm-hf-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #3f3f46;
  text-decoration: none;
  transition: background 0.15s;
}
.a8bm-hf-menu-link:hover { background: #fafafa; }
.a8bm-hf-logout { color: #52525b; }

/* Mobile nav drawer under header */
.a8bm-hf-mobile-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e4e4e7;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
  padding: 16px;
  animation: a8bm-hf-slide 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes a8bm-hf-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 1024px) {
  .a8bm-hf-mobile-nav { display: none !important; }
}
.a8bm-hf-mobile-label {
  margin: 0 0 4px;
  padding: 0 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
}
.a8bm-hf-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #52525b;
  text-decoration: none;
  transition: all 0.15s;
}
.a8bm-hf-mobile-link:hover,
.a8bm-hf-mobile-link.is-active {
  background: #18181b;
  color: #fff;
}
.a8bm-hf-mobile-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  border-top: 1px solid #f4f4f5;
}
.a8bm-hf-pulse {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background: #10b981;
  animation: a8bm-hf-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes a8bm-hf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Desktop footer */
.a8bm-hf-footer {
  display: none;
  height: 56px;
  align-items: center;
  border-top: 1px solid rgba(228, 228, 231, 0.8);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  font-family: Inter, system-ui, sans-serif;
}
@media (min-width: 1024px) {
  .a8bm-hf-footer { display: flex; }
}
.a8bm-hf-footer-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.a8bm-hf-copy {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
}
.a8bm-hf-footer-links {
  display: flex;
  gap: 20px;
}
.a8bm-hf-footer-links a {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  text-decoration: none;
}
.a8bm-hf-footer-links a:hover { color: #18181b; }
.a8bm-hf-portal-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: #a1a1aa;
}

/* Mobile bottom dock */
.a8bm-hf-dock {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
  justify-content: center;
  padding: 0 12px;
  padding-bottom: max(16px, var(--a8bm-hf-safe-bottom));
  font-family: Inter, system-ui, sans-serif;
}
@media (min-width: 1024px) {
  .a8bm-hf-dock { display: none !important; }
}
.a8bm-hf-dock-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(228, 228, 231, 0.8);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.32), 0 4px 16px rgba(0, 0, 0, 0.08);
  max-width: 380px;
  width: 100%;
  justify-content: space-between;
}
.a8bm-hf-dock-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 9999px;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 640px) {
  .a8bm-hf-dock-item {
    flex-direction: row;
    gap: 6px;
    font-size: 11.5px;
    padding: 10px 14px;
  }
}
.a8bm-hf-dock-item.is-active {
  background: #18181b;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.a8bm-hf-dock-item:not(.is-active):hover { color: #3f3f46; }
.a8bm-hf-dock-dot {
  position: absolute;
  top: 6px;
  right: 12px;
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background: #ff3b30;
  border: 1px solid #fff;
}

/* Body padding when dock is present on mobile */
body.a8bm-hf-has-dock {
  padding-bottom: calc(72px + var(--a8bm-hf-safe-bottom, 0px));
}
@media (min-width: 1024px) {
  body.a8bm-hf-has-dock { padding-bottom: 0; }
}
/* Never let chrome steal clicks from modals / floor lists */
.a8bm-hf-dock {
  z-index: 40;
}
body.a8bm-ui-modal-open .a8bm-hf-dock,
body.a8bm-ui-modal-open .a8bm-support-root,
html.a8bm-modal-open .a8bm-hf-dock,
html.a8bm-modal-open .a8bm-support-root {
  visibility: hidden !important;
  pointer-events: none !important;
}
.a8bm-ui-modal-overlay,
.a8bm-ui-room-modal,
#a8bm-ui-room-modal {
  z-index: 1000000 !important;
  pointer-events: auto !important;
}

