koalcore-header { display: block; width: 100%; z-index: 50; position: sticky; top: 0; }
header.nav {
  position: relative; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11,18,32,.78);
  border-bottom: 1px solid var(--line, #25354f);
}
.nav-wrap { 
  width: min(1120px, 92vw); 
  margin: 0 auto; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 64px; 
  gap: 20px;
}
.nav-wrap .brand { 
  display: flex; align-items: center; gap: .6rem; 
  font-weight: 700; letter-spacing: .02em; 
  color: var(--ink, #e8eef7); text-decoration: none; 
}
.nav-wrap .brand .logo { width: 34px; height: 34px; opacity: 1; border-radius: 6px; }

/* Desktop Navigation */
.desktop-nav { display: flex; gap: 1.6rem; align-items: center; }
.desktop-nav a { color: var(--muted, #9fb0c8); font-size: .92rem; font-weight: 500; text-decoration: none; transition: color .2s; }
.desktop-nav a:hover { color: var(--ink, #e8eef7); }

.dropdown { position: relative; display: inline-block; }
.drop-label { cursor: pointer; color: var(--teal, #2dd4bf); font-size: .92rem; font-weight: 500; }
.dropdown .drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel, #16233c);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line, #25354f);
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.6);
  min-width: 130px;
}
.dropdown:hover .drop-menu { display: flex !important; }
.drop-menu a { color: var(--muted, #9fb0c8) !important; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.drop-menu a:hover { color: var(--ink, #e8eef7) !important; background: var(--bg-soft, #111c30); }

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line, #25354f);
  color: var(--ink, #e8eef7);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.mobile-menu-btn:hover {
  background: rgba(45,212,191,0.1);
  border-color: var(--teal, #2dd4bf);
  color: var(--teal, #2dd4bf);
}

/* Mobile Drawer Elements */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: min(290px, 82vw);
  height: 100vh;
  background: #0f182a;
  border-left: 1px solid var(--line, #25354f);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 32px;
  box-shadow: -10px 0 30px rgba(0,0,0,0.7);
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(-300px);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line, #25354f);
  margin-bottom: 20px;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink, #e8eef7);
  font-size: 1.1rem;
}
.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--muted, #9fb0c8);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.drawer-close-btn:hover {
  color: var(--teal, #2dd4bf);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal, #2dd4bf);
  font-weight: 700;
  margin-bottom: 4px;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1dbe8;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  transition: all .15s;
}
.drawer-nav a:hover {
  background: rgba(45,212,191,0.08);
  color: var(--teal, #2dd4bf);
}
.drawer-sublink {
  background: rgba(11,18,32,0.4);
  border: 1px solid rgba(255,255,255,0.04);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .nav-wrap {
    width: 92vw;
  }

  /* Global mobile typography & touch targets */
  body {
    font-size: 16px;
  }
  
  /* Modal responsive fits */
  .modal-card {
    width: 95vw !important;
    padding: 18px 16px !important;
    max-height: 90vh !important;
  }
  
  /* Tables horizontally scrollable */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Auth Buttons & Links */
.auth-link {
  background: rgba(45,212,191,0.12);
  border: 1px solid rgba(45,212,191,0.35);
  color: var(--teal, #2dd4bf) !important;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}
.auth-link:hover {
  background: var(--teal, #2dd4bf);
  color: #0b1220 !important;
}
.auth-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.auth-btn:hover {
  background: #ef4444;
  color: #fff;
}
.drawer-auth-btn {
  border: 1px solid var(--line, #25354f);
  background: rgba(255,255,255,0.03);
  width: 100%;
  text-align: left;
}
