/* Shared responsive header for base.html and machina/board_base.html. */
.site-header {
  --header-accent: #e3263f;
  --header-bg: #101217;
  --header-line: rgba(255, 255, 255, .1);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-header .site-nav {
  background: linear-gradient(110deg, rgba(13, 15, 20, .98), rgba(28, 31, 39, .97)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(5, 7, 10, .28);
  min-height: 72px;
  padding: 0 !important;
  position: relative;
}

.site-header .site-nav::after {
  background: linear-gradient(90deg, transparent, var(--header-accent) 22%, var(--header-accent) 78%, transparent);
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  opacity: .8;
  position: absolute;
  right: 0;
}

.site-nav__inner {
  align-items: center;
  display: flex;
  margin: 0 auto;
  max-width: 1520px;
  min-width: 0;
  padding: 10px 24px;
  width: 100%;
}

.site-header .site-brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 11px;
  margin: 0 26px 0 0;
  padding: 0;
  white-space: nowrap;
}

.site-brand__mark {
  align-items: center;
  background: linear-gradient(145deg, #ef314a, #a90f23);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px 4px 12px 4px;
  box-shadow: 0 7px 18px rgba(205, 25, 45, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #fff;
  display: inline-flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  line-height: 1;
  transform: skew(-4deg);
  width: 42px;
}

.site-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
  min-width: 0;
}

.site-brand__name {
  color: #fff;
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.site-brand__tagline {
  color: rgba(255, 255, 255, .52);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-top: 5px;
}

.site-header .site-nav__collapse {
  align-items: center;
  min-width: 0;
}

.site-nav__links {
  align-items: center;
  flex: 0 1 auto;
  gap: 2px;
  min-width: 0;
}

.site-header .site-nav__link {
  align-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, .72) !important;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 650;
  gap: 7px;
  line-height: 1;
  padding: 12px 9px !important;
  position: relative;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}

.site-header .site-nav__link::after {
  background: var(--header-accent);
  border-radius: 2px;
  bottom: 4px;
  content: "";
  height: 2px;
  left: 50%;
  opacity: 0;
  position: absolute;
  transform: translateX(-50%) scaleX(.4);
  transition: opacity .18s ease, transform .18s ease;
  width: 18px;
}

.site-header .site-nav__link i {
  color: rgba(255, 255, 255, .48);
  font-size: .86rem;
  transition: color .18s ease;
}

.site-header .site-nav__link:hover,
.site-header .site-nav__link:focus,
.site-header .site-nav__link.is-active {
  background: rgba(255, 255, 255, .07);
  color: #fff !important;
  transform: translateY(-1px);
}

.site-header .site-nav__link:hover i,
.site-header .site-nav__link:focus i,
.site-header .site-nav__link.is-active i,
.site-header .ghost-nav-link i { color: #ff5369; }

.site-header .site-nav__link.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.site-search {
  align-items: center;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 13px;
  display: flex;
  flex: 1 1 230px;
  height: 42px;
  margin: 0 12px 0 auto;
  max-width: 285px;
  min-width: 190px;
  position: relative;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.site-search:focus-within {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 83, 105, .7);
  box-shadow: 0 0 0 3px rgba(227, 38, 63, .13);
}

.site-search__icon {
  color: rgba(255, 255, 255, .42);
  font-size: .76rem;
  left: 13px;
  pointer-events: none;
  position: absolute;
}

.site-search__input {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-size: .84rem;
  height: 100%;
  min-width: 0;
  outline: 0;
  padding: 0 40px 0 36px;
  width: 100%;
}

.site-search__input::placeholder { color: rgba(255, 255, 255, .42); }
.site-search__input::-webkit-search-cancel-button { display: none; }

.site-search__submit {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, .76);
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  position: absolute;
  right: 5px;
  transition: background-color .18s ease, color .18s ease;
  width: 30px;
}

.site-search__submit:hover,
.site-search__submit:focus { background: var(--header-accent); color: #fff; outline: 0; }
.site-search__advanced { display: none; }
.site-search-suggestions {
  background: #fff;
  border: 1px solid rgba(20, 24, 28, .12);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(8, 12, 16, .22);
  left: 0;
  max-height: 320px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1080;
}
.site-search-suggestions[hidden] { display: none; }
.site-header .site-search-suggestions__item {
  border-bottom: 1px solid #eef0f2;
  color: #24282d !important;
  display: block;
  padding: 9px 12px;
  text-decoration: none !important;
}
.site-header .site-search-suggestions__item:last-child { border-bottom: 0; }
.site-header .site-search-suggestions__item:hover,
.site-header .site-search-suggestions__item:focus { background: #f7f0f1; outline: 0; }
.site-header .site-search-suggestions__item span,
.site-header .site-search-suggestions__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header .site-search-suggestions__item span { font-size: .78rem; font-weight: 750; }
.site-header .site-search-suggestions__item small { color: #858b91; font-size: .66rem; margin-top: 2px; }

.site-header__actions {
  align-items: center;
  flex: 0 0 auto;
  gap: 3px;
}

.site-header .site-action,
.site-header .site-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: rgba(255, 255, 255, .7) !important;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 42px;
  justify-content: center;
  margin: 0;
  padding: 0 !important;
  position: relative;
  transition: background-color .18s ease, color .18s ease;
  width: 42px;
}

.site-header .site-action:hover,
.site-header .site-action:focus,
.site-header .site-icon-button:hover,
.site-header .site-icon-button:focus {
  background: rgba(255, 255, 255, .09);
  color: #fff !important;
  outline: 0;
}

.site-action__icon { align-items: center; display: inline-flex; font-size: 1rem; justify-content: center; position: relative; }
.site-action__label { display: none; }

.site-badge,
.site-header .mc-nav-badge,
.site-header .notification_badge {
  align-items: center;
  background: var(--header-accent) !important;
  border: 2px solid #171a20;
  border-radius: 999px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .26);
  color: #fff !important;
  display: inline-flex;
  font-size: .58rem;
  font-weight: 800;
  height: 17px;
  justify-content: center;
  line-height: 1;
  min-width: 17px;
  padding: 0 4px;
  position: absolute;
  right: -9px;
  top: -9px;
}

.site-header .site-icon-button > .site-badge { right: 1px; top: 2px; }
.site-account { margin-left: 4px; }

.site-header .site-account__toggle {
  align-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  display: inline-flex;
  gap: 9px;
  min-height: 44px;
  padding: 5px 9px 5px 5px !important;
}

.site-header .site-account__toggle:hover,
.site-header .site-account__toggle:focus {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 255, 255, .15);
  color: #fff !important;
}

.site-header .site-account__toggle::after { border-top-color: rgba(255, 255, 255, .45); margin-left: 1px; }

.site-account__avatar {
  background: #2b2f38;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  display: block;
  height: 32px;
  object-fit: cover;
  width: 32px;
}

.site-account__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  max-width: 92px;
  min-width: 0;
}

.site-account__copy small {
  color: rgba(255, 255, 255, .42);
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.site-account__copy strong {
  color: #fff;
  font-size: .79rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header .dropdown-menu {
  background: #fff;
  border: 1px solid rgba(17, 20, 26, .1);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(6, 8, 12, .28), 0 3px 10px rgba(6, 8, 12, .1);
  margin-top: 10px;
  overflow: hidden;
  padding: 7px;
}

.site-header .dropdown-menu.notifications {
  left: auto;
  max-width: min(380px, calc(100vw - 24px));
  padding: 0;
  right: 0;
}

.site-header .dropdown-item {
  align-items: center;
  border-radius: 8px;
  color: #292d34 !important;
  display: flex;
  font-size: .8rem;
  font-weight: 600;
  gap: 10px;
  padding: 9px 10px;
}

.site-header .dropdown-item > i { color: #7c838e; text-align: center; width: 17px; }
.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus { background: #f1f3f5; color: #11151a !important; }
.site-header .dropdown-menu.notifications .notif-item { border-radius: 0; }
.site-header .dropdown-menu.notifications .notif-item.unread { background: #fdf3f4; }
.site-account__menu { min-width: 245px; }

.site-account__summary {
  align-items: center;
  display: flex;
  gap: 11px;
  padding: 8px 9px 6px;
}

.site-account__summary-avatar { border-radius: 11px; height: 38px; object-fit: cover; width: 38px; }
.site-account__summary span { display: flex; flex-direction: column; min-width: 0; }
.site-account__summary strong { color: #1d2128; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account__summary small { color: #8a919b; font-size: .67rem; margin-top: 2px; }
.site-header .site-account__logout,
.site-header .site-account__logout > i { color: #bd152b !important; }

.site-auth-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  margin-left: 2px;
}

.site-header .site-auth-actions a { border-radius: 10px; font-size: .82rem; font-weight: 750; padding: 10px 13px; }
.site-header .site-auth-actions__login { color: rgba(255, 255, 255, .78) !important; }
.site-header .site-auth-actions__login:hover { background: rgba(255, 255, 255, .08); color: #fff !important; }
.site-header .site-auth-actions__signup { background: var(--header-accent); box-shadow: 0 6px 15px rgba(205, 25, 45, .22); color: #fff !important; }
.site-header .site-auth-actions__signup:hover { background: #f02b46; color: #fff !important; transform: translateY(-1px); }
.site-header__quick { align-items: center; gap: 2px; margin-right: 4px; }

.site-header .site-menu-toggle {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 11px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.site-header .site-menu-toggle:focus { box-shadow: 0 0 0 3px rgba(227, 38, 63, .2); outline: 0; }
.site-menu-toggle__lines { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.site-menu-toggle__lines span { background: #fff; border-radius: 2px; display: block; height: 2px; transition: transform .18s ease, opacity .18s ease; width: 100%; }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__lines span:first-child { transform: translateY(6px) rotate(45deg); }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__lines span:nth-child(2) { opacity: 0; }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__lines span:last-child { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 1200px) {
  .site-header .site-menu-toggle { display: none; }
}

@media (max-width: 1399.98px) and (min-width: 1200px) {
  .site-nav__inner { padding-left: 16px; padding-right: 16px; }
  .site-header .site-brand { margin-right: 14px; }
  .site-brand__tagline { display: none; }
  .site-header .site-nav__link { gap: 5px; padding-left: 7px !important; padding-right: 7px !important; }
  .site-search { margin-left: 8px; min-width: 170px; }
  .site-account__copy { max-width: 72px; }
}

@media (max-width: 1199.98px) {
  .site-header .site-nav { min-height: 64px; }
  .site-nav__inner { flex-wrap: wrap; padding: 9px 18px; }
  .site-header .site-brand { margin-right: 10px; }
  .site-header .site-nav__collapse {
    background: linear-gradient(155deg, #1a1d24, #121419);
    border: 1px solid var(--header-line);
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .42);
    flex-basis: 100%;
    margin-top: 10px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 10px;
    width: 100%;
  }
  .site-nav__links { align-items: stretch; gap: 2px; width: 100%; }
  .site-header .site-nav__link { font-size: .92rem; padding: 12px !important; width: 100%; }
  .site-header .site-nav__link::after { bottom: 50%; height: 20px; left: 3px; transform: translateY(50%) scaleY(.4); width: 3px; }
  .site-header .site-nav__link.is-active::after { transform: translateY(50%) scaleY(1); }
  .site-header .site-nav__link i { text-align: center; width: 20px; }
  .site-search { flex: 0 0 auto; margin: 10px 0 8px; max-width: none; width: 100%; }
  .site-search__advanced { color: rgba(255, 255, 255, .5) !important; display: block; font-size: .65rem; position: absolute; right: 44px; top: 47px; }
  .site-header__actions { align-items: stretch; border-top: 1px solid var(--header-line); gap: 2px; margin-top: 17px; padding-top: 9px; width: 100%; }
  .site-header .site-action { gap: 12px; height: 44px; justify-content: flex-start; padding: 0 12px !important; width: 100%; }
  .site-action__label { display: inline; font-size: .9rem; font-weight: 650; }
  .site-header .site-action__icon { width: 20px; }
  .site-account { margin: 3px 0 0; }
  .site-header .site-account__toggle { justify-content: flex-start; min-height: 50px; width: 100%; }
  .site-account__copy { max-width: none; }
  .site-header .dropdown-menu { float: none; margin: 6px 0; position: static; width: 100%; }
  .site-header .dropdown-menu.notifications { max-width: none; min-width: 0; }
  .site-header .ntf-list { max-height: 320px; }
  .site-auth-actions { border-top: 1px solid var(--header-line); margin-top: 17px; padding-top: 10px; width: 100%; }
  .site-header .site-auth-actions a { text-align: center; width: 50%; }
}

@media (max-width: 575.98px) {
  .site-nav__inner { padding: 8px 12px; }
  .site-brand__mark { border-radius: 10px 3px 10px 3px; font-size: 22px; height: 37px; width: 37px; }
  .site-header .site-brand { gap: 8px; }
  .site-brand__name { font-size: .82rem; max-width: 148px; overflow: hidden; text-overflow: ellipsis; }
  .site-brand__tagline { display: none; }
  .site-header .site-icon-button { height: 38px; width: 38px; }
  .site-header .site-menu-toggle { height: 38px; width: 38px; }
  .site-header__quick { margin-right: 2px; }
  .site-header .dropdown-menu.notifications .notif-item { padding-left: 11px; padding-right: 11px; }
}

@media (max-width: 374.98px) {
  .site-brand__name { max-width: 112px; }
  .site-header .site-brand { margin-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after { scroll-behavior: auto !important; transition: none !important; }
}
