
:root {
  --vp3-black: #111111;
  --vp3-text: #1c1c1c;
  --vp3-muted: #62676f;
  --vp3-line: #e7e7e7;
  --vp3-white: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", sans-serif; color: var(--vp3-text); }
body, button, input, select, textarea { font-family: "Manrope", sans-serif; }
h1, h2, .display-title { font-family: "DM Serif Display", serif; font-weight: 400; color: var(--vp3-black); letter-spacing: -.025em; }
h1 span, h2 span, h3 span, .brand span, .registry-brand span { color: inherit !important; font: inherit !important; }
a { color: inherit; text-decoration: none; }
.global-header { position: sticky; top: 0; z-index: 1000; width: 100%; background: #fff; border-bottom: 1px solid var(--vp3-line); }
.global-header__inner { width: min(1180px, calc(100% - 40px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.global-brand { flex: 0 0 auto; color: #111; font-family: "Manrope", sans-serif; font-size: 1.35rem; line-height: 1; font-weight: 800; letter-spacing: -.055em; }
.global-nav { display: flex; align-items: center; justify-content: center; gap: 26px; margin-left: auto; }
.global-nav a, .global-signin { color: #252525; font-size: .84rem; font-weight: 700; }
.global-nav a:hover, .global-signin:hover { color: #000; }
.global-actions { display: flex; align-items: center; gap: 18px; }
.global-cta { display: inline-flex; min-height: 42px; padding: 0 18px; align-items: center; justify-content: center; color: #fff; background: #111; border-radius: 999px; font-size: .84rem; font-weight: 800; }
.global-menu-toggle { display: none; width: 42px; height: 42px; margin-left: auto; padding: 10px; border: 1px solid var(--vp3-line); background: #fff; border-radius: 10px; }
.global-menu-toggle span { display: block; height: 2px; margin: 4px 0; background: #111; }
.global-footer { background: #fff; border-top: 1px solid var(--vp3-line); color: #252525; }
.global-footer__inner { width: min(1180px, calc(100% - 40px)); min-height: 112px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.global-footer p { margin: 0; color: var(--vp3-muted); font-size: .9rem; }
.global-footer nav { display: flex; gap: 22px; margin-left: auto; font-size: .84rem; font-weight: 700; }
.global-brand--footer { color: #111 !important; }
@media (max-width: 980px) {
  .global-header__inner { min-height: 70px; }
  .global-menu-toggle { display: block; }
  .global-nav { display: none; position: absolute; top: 70px; left: 20px; right: 20px; margin: 0; padding: 18px; flex-direction: column; align-items: flex-start; background: #fff; border: 1px solid var(--vp3-line); border-radius: 14px; box-shadow: 0 20px 45px rgba(0,0,0,.1); }
  .global-nav.is-open { display: flex; }
  .global-actions { margin-left: 0; }
}
@media (max-width: 620px) {
  .global-header__inner, .global-footer__inner { width: min(100% - 28px, 1180px); }
  .global-signin { display: none; }
  .global-cta { min-height: 40px; padding: 0 14px; }
  .global-footer__inner { padding: 28px 0; align-items: flex-start; flex-direction: column; gap: 12px; }
  .global-footer nav { margin-left: 0; flex-wrap: wrap; }
}

/* Edge-to-edge shared chrome */
.global-header__inner {
  width: 100%;
  max-width: none;
  padding-inline: clamp(24px, 3.2vw, 56px);
}
.global-footer__inner {
  width: 100%;
  max-width: none;
  padding-inline: clamp(24px, 3.2vw, 56px);
}
@media (max-width: 620px) {
  .global-header__inner,
  .global-footer__inner {
    width: 100%;
    padding-inline: 18px;
  }
}

/* Authenticated application header */
.global-header--app .global-header__inner { min-height: 68px; }
.global-app-label { padding-left: 16px; border-left: 1px solid var(--vp3-line); color: #73777e; font-size: .76rem; font-weight: 750; letter-spacing: .02em; }
.global-app-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.global-app-link { color: #202124; font-size: .8rem; font-weight: 750; }
.global-app-link--muted { color: #777c84; }
.global-header--app .global-menu-toggle { margin-left: 8px; }

/* Animated hamburger state */
.global-menu-toggle { cursor: pointer; }
.global-menu-toggle span { transition: transform .2s ease, opacity .2s ease; }
.global-menu-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.global-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.global-menu-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-mobile-close { display: none; position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 1px solid #e3e5e8; border-radius: 10px; background: #fff; color: #15171a; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.dashboard-sidebar-overlay { display: none; position: fixed; inset: 68px 0 0; z-index: 1240; border: 0; background: rgba(17, 19, 24, .38); backdrop-filter: blur(2px); }
.dashboard-sidebar-overlay.is-visible { display: block; }
body.dashboard-menu-open { overflow: hidden; }

@media (max-width: 980px) {
  .global-header--public .global-menu-toggle { order: 4; }
  .global-header--public .global-actions { margin-left: auto; }
  .global-header--public .global-nav { top: 70px; left: 0; right: 0; padding: 22px 20px 26px; border: 0; border-top: 1px solid var(--vp3-line); border-bottom: 1px solid var(--vp3-line); border-radius: 0; box-shadow: 0 18px 38px rgba(0,0,0,.08); }
  .global-header--public .global-nav a { width: 100%; padding: 10px 2px; font-size: .95rem; }
  .global-header--app .dashboard-menu-toggle { display: block; }
}

@media (max-width: 760px) {
  .global-header--app .global-app-actions { display: none; }
  .global-header--app .global-app-label { margin-right: auto; }
  .app-sidebar { display: flex !important; position: fixed !important; top: 68px !important; left: 0; bottom: 0; width: min(88vw, 310px); height: calc(100vh - 68px) !important; padding-top: 62px !important; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 18px 0 50px rgba(25,28,34,.16); z-index: 1250 !important; overflow-y: auto; }
  .app-sidebar.is-open { transform: translateX(0); }
  .sidebar-mobile-close { display: grid; place-items: center; }
}

/* Public mobile navigation drawer */
.global-nav__head,
.global-nav__account { display: none; }

@media (max-width: 980px) {
  body.public-menu-open { overflow: hidden; }
  body.public-menu-open::after {
    content: "";
    position: fixed;
    inset: 70px 0 0;
    z-index: 1080;
    background: rgba(15, 18, 24, .38);
    backdrop-filter: blur(3px);
  }
  .global-header--public .global-header__inner { min-height: 70px; }
  .global-header--public .global-actions { display: none; }
  .global-header--public .public-menu-toggle { display: grid; place-content: center; width: 46px; height: 46px; margin-left: auto; padding: 11px; border-radius: 14px; }
  .global-header--public .global-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 1100;
    width: min(88vw, 360px);
    padding: 0 24px 28px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: -24px 0 70px rgba(17, 21, 29, .18);
    transform: translateX(105%);
    transition: transform .24s ease;
    overflow-y: auto;
  }
  .global-header--public .global-nav.is-open { transform: translateX(0); }
  .global-nav__head {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid #eceef1;
    color: #111;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
  }
  .public-menu-close {
    width: 42px;
    height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
  }
  .global-header--public .global-nav > a {
    width: 100%;
    padding: 15px 4px;
    border-bottom: 1px solid #f0f1f3;
    color: #17191d;
    font-size: 1rem;
    font-weight: 700;
  }
  .global-nav__account {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 28px;
  }
  .global-nav__signin,
  .global-nav__cta {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: .92rem;
    font-weight: 800;
  }
  .global-nav__signin { border: 1px solid #dfe2e6; background: #fff; color: #111; }
  .global-nav__cta { background: #111; color: #fff; }
}

@media (max-width: 620px) {
  .global-header--public .global-header__inner { padding-inline: 20px; }
  .global-brand { font-size: 1.45rem; }
}

/* Mobile public header — always visible */
@media (max-width: 980px) {
  .global-header.global-header--public {
    display: block !important;
    position: sticky !important;
    top: 0;
    z-index: 1300;
    width: 100%;
    min-height: 72px;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
  }
  .global-header--public .global-header__inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
  }
  .global-header--public .global-brand {
    display: inline-flex !important;
    align-items: center;
    justify-self: start;
    margin: 0;
    color: #111 !important;
    font-size: 1.42rem;
    font-weight: 800;
    line-height: 1;
  }
  .global-header--public .global-actions {
    display: none !important;
  }
  .global-header--public .public-menu-toggle {
    display: inline-grid !important;
    place-content: center;
    justify-self: end;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 10px;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    background: #fff;
  }
  .global-header--public .public-menu-toggle span {
    width: 23px;
    height: 2px;
    margin: 3px 0;
    background: #111;
    border-radius: 999px;
  }
  .global-header--public .global-nav {
    top: 0;
    height: 100dvh;
  }
  body.public-menu-open::after {
    inset: 0;
  }
}

/* Header render safeguard: the shared header must remain visible on public pages. */
body:not(.account-dashboard):not(.admin-dashboard) > .global-header,
body:not(.account-dashboard):not(.admin-dashboard) .global-header--public {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
