:root {
  --bidlab-blue: #2f5bd5;
  --bidlab-blue-dark: #1e3fa8;
  --bidlab-blue-hover: #3a68e3;
  --bidlab-navy: #13233f;
  --bidlab-bg: #f4f6f9;
  --bidlab-border: #e4e8ef;
  --bidlab-muted: #737b88;
  --header-height: 136px;
  --sticky-top: calc(var(--header-height) + 16px);
}

.portal-head .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.portal-head .portal-wrap {
  width: min(1460px, calc(100% - 56px));
  margin: 0 auto;
}

.portal-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--bidlab-border);
}

.portal-head .head-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 76px;
  padding: 8px 0;
}

.portal-head .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.portal-head .brand img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.portal-head .brand span {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bidlab-muted);
}

.portal-head .global-search {
  display: flex;
  width: min(560px, 100%);
  height: 44px;
  margin: 0 auto;
  border: 1px solid var(--bidlab-blue);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.portal-head .global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.portal-head .global-search button {
  width: 72px;
  border: 0;
  background: var(--bidlab-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.portal-head .search-toggle {
  display: none;
}

.portal-head .util-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
}

.portal-head .util-links a {
  color: #333;
}

.portal-head .util-links a.is-current {
  color: var(--bidlab-blue);
}

.portal-head .util-links a.util-admin {
  color: var(--bidlab-blue);
  padding: 4px 8px;
  border: 1px solid #c9d6f5;
  border-radius: 4px;
  background: #f4f7ff;
}

.portal-head .util-auth {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-head .util-hello {
  color: #2f5bd5;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .portal-head .mobile-utils .util-auth {
    display: grid;
  }

  .portal-head .mobile-utils .util-hello {
    color: #fff;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
  }
}

.portal-head .gnb {
  background: var(--bidlab-blue);
  position: relative;
  overflow: visible;
}

.portal-head .gnb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 24px;
  overflow: visible;
}

.portal-head .gnb-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  overflow: visible;
}

.portal-head .gnb-item {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
}

.portal-head .gnb-nav .gnb-top {
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 10px;
  border: 0;
  display: block;
}

.portal-head .gnb-nav .gnb-top:hover {
  background: var(--bidlab-blue-hover);
}

.portal-head .gnb-nav .gnb-top.is-current {
  background: var(--bidlab-blue-hover);
}

.portal-head .mega-panel,
.portal-head .mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  width: max-content;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 8px 0;
  background: #ffffff;
  color: #222222;
  border: 1px solid var(--bidlab-border);
  opacity: 1;
  visibility: visible;
  z-index: 9999;
}

.portal-head .gnb-item:hover .mega-panel,
.portal-head .gnb-item:focus-within .mega-panel,
.portal-head .gnb-item.open .mega-panel {
  display: grid;
}

@media (min-width: 1025px) {
  .portal-head .mega-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
  }
}

.portal-head .mega-panel a,
.portal-head .mega-menu a {
  display: block;
  color: #333333 !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  padding: 8px 16px;
  opacity: 1;
  visibility: visible;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}

.portal-head .mega-panel a:hover,
.portal-head .mega-menu a:hover {
  background: #f5f7fb;
  color: var(--bidlab-blue) !important;
}

.portal-head .mega-panel a.is-current,
.portal-head .mega-menu a.is-current {
  color: var(--bidlab-blue) !important;
  font-weight: 600;
}

.portal-head .gnb-sns {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.portal-head .gnb-sns a {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.portal-head .menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.portal-head .menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 8px;
  background: var(--bidlab-blue);
}

@media (max-width: 1024px) {
  .portal-head .head-row {
    grid-template-columns: 1fr auto;
  }

  .portal-head .global-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .portal-head .menu-toggle {
    display: block;
  }

  .portal-head .gnb-sns {
    display: none;
  }

  .portal-head .gnb-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bidlab-blue-dark);
    flex-direction: column;
    z-index: 51;
  }

  .portal-head .gnb-nav.open {
    display: flex;
  }

  .portal-head .gnb-nav .gnb-top,
  .portal-head .gnb-nav a {
    padding: 12px 16px;
  }

  .portal-head .mega-panel {
    position: static;
    border: 0;
    background: #16348a;
    min-width: 0;
    padding: 0 0 8px;
  }

  .portal-head .mega-panel a {
    color: #dbe7ff !important;
    padding: 8px 24px;
  }

  .portal-head .gnb-item:hover .mega-panel {
    display: none;
  }

  .portal-head .gnb-item.open .mega-panel {
    display: grid;
  }
}
