/* =========================================================================
   Bai Lab Portal — Layout Shell
   来源: GEM-DTA Server styles.css
   ========================================================================= */

/* ---- Utility Bar (dark top strip) ---- */
.utility-bar {
  background: #07223f;
  color: #c9d4e6;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.utility-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 7px 28px;
}

.utility-bar a { color: #c9d4e6; }
.utility-bar a:hover { color: #fff; }

.utility-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.utility-bar-right span + span::before {
  content: "·";
  margin-right: 18px;
  color: rgba(255, 255, 255, 0.3);
}

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
  vertical-align: 1px;
}

/* ---- Site Header (sticky) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 14px 28px;
}

/* ---- Brand Lockup ---- */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  text-decoration: none;
}
.brand-lockup:hover { text-decoration: none; }

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(24, 87, 196, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

/* ---- Navigation ---- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.nav-link-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.nav-link-trigger {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-caret {
  margin-left: 4px;
  opacity: 0.7;
  transition: transform var(--transition);
}

/* ---- Dropdown Menu ---- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* invisible bridge so cursor can travel from trigger to menu without losing hover */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: background var(--transition);
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.nav-dropdown-item.is-active {
  background: var(--primary-soft);
}

.nav-dropdown-title {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-dropdown-item:hover .nav-dropdown-title,
.nav-dropdown-item.is-active .nav-dropdown-title {
  color: var(--primary);
}

.nav-dropdown-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ---- Dropdown Category Separator ---- */
.nav-dropdown-category,
.nav-dropdown-category-label {
  display: block;
  padding: 10px 12px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

.nav-dropdown-divider {
  margin: 6px 0;
  border: none;
  border-top: 1px solid var(--line);
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 16px 28px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 8px; color: var(--line-strong); }
.breadcrumbs .current { color: var(--ink); }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, #0a2540 0%, #07223f 100%);
  color: #c9d4e6;
  border-top: 4px solid;
  border-image: linear-gradient(90deg, var(--primary), var(--teal)) 1;
}

.site-footer-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 44px 28px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col p, .footer-col ul {
  margin: 0;
  color: #aab6c8;
  font-size: 0.88rem;
  line-height: 1.75;
}

.footer-col ul { padding: 0; list-style: none; }
.footer-col li { margin-bottom: 6px; }

.footer-col a { color: #c9d4e6; }
.footer-col a:hover { color: #fff; }

.footer-brand .brand-title { color: #fff; font-size: 1.1rem; }
.footer-brand .brand-sub { color: #aab6c8; }

.site-footer-bottom {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 16px 28px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: #8c97a8;
  font-size: 0.8rem;
}

/* ---- Site Shell ---- */
.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }
