/*
 * Mozark unified header — one dark global bar + one light context sub-bar.
 * Visual source: https://dx.mozark.ai/v2/benchmark (.app-header + .dx-header).
 * Copied into netx/, erp/ and mozark_appx_website/src/styles/ — keep the copies identical.
 */
.mzh, .mzh * { box-sizing: border-box; }
.mzh {
  --mzh-ink: #00092c;
  --mzh-blue: #002dde;
  --mzh-border: rgba(0, 9, 44, .08);
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  font-family: var(--mzh-font, Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: var(--mzh-ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.mzh a { text-decoration: none; }
.mzh button { font-family: inherit; }
.mzh :focus-visible { outline: 2px solid #8aa2ff; outline-offset: 2px; }

/* ---------- dark global bar (DX .app-header) ---------- */
.mzh-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  padding: 0 28px;
  background: #00092c;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.mzh-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.mzh-logo img { display: block; height: 22px; width: auto; }
.mzh-burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 0; border-radius: 9999px;
  background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.mzh-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mzh-link, .mzh-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 0; border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, .88);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.mzh-link:hover, .mzh-trigger:hover, .mzh-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.mzh-chev { width: 10px; height: 10px; transition: transform .2s; }
.mzh-trigger[aria-expanded="true"] .mzh-chev { transform: rotate(180deg); }
.mzh-cta {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 0; border-radius: 9999px;
  min-width: 132px;
  padding: 9px 18px;
  background: #002dde; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .005em; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.mzh-cta:hover { background: #0022b0; color: #fff; transform: translateY(-2px); }

/* drop-down panels (DX .site-nav__panel) */
.mzh-menu { position: relative; flex-shrink: 0; }
.mzh-panel-wrap { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 60; padding-top: 14px; display: none; }
.mzh-menu.is-open > .mzh-panel-wrap { display: block; }
@media (hover: hover) and (min-width: 901px) {
  .mzh-menu:hover > .mzh-panel-wrap { display: block; }
  .mzh-menu:hover > .mzh-trigger { background: rgba(255, 255, 255, .12); color: #fff; }
  .mzh-menu:hover .mzh-chev { transform: rotate(180deg); }
}
.mzh-panel {
  min-width: 200px;
  background: #fff;
  border: 1px solid #e3e7f3;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 22px 50px rgba(0, 9, 44, .17);
}
.mzh-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  color: #00092c;
  transition: background-color .15s;
}
.mzh-item:hover { background: #eef3ff; color: #00092c; }
.mzh-item-icon {
  display: grid; flex-shrink: 0; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: #eef3ff; color: #002dde;
}
.mzh-item-icon svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mzh-item-title { display: block; font-size: 12.5px; line-height: 1.3; font-weight: 600; }
.mzh-item-desc { display: block; margin-top: 1px; font-size: 11px; line-height: 1.35; font-weight: 400; color: #333e63; }

/* ---------- light context sub-bar (DX .dx-header) ---------- */
.mzh-sub {
  min-height: 53px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 8px 28px;
  /* translucent + blurred so page content shows through while scrolling (as the old appx header did) */
  background: rgba(250, 251, 250, .62);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--mzh-border);
}
.mzh-sub-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mzh-home {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(215, 226, 245, .9);
  color: #002dde;
  box-shadow: 0 2px 8px rgba(0, 20, 80, .08), 0 1px 3px rgba(0, 0, 0, .04);
  transition: background .15s;
}
.mzh-home:hover { background: #e3ebfa; color: #002dde; }
.mzh-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mzh-tabs {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px;
  background: rgba(241, 244, 251, .72);
  border-radius: 9999px;
  border: 1px solid rgba(215, 226, 245, .9);
  min-width: 0;
}
.mzh-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px;
  border: 0; border-radius: 9999px;
  background: transparent;
  color: #334155;
  font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: .15s;
}
.mzh-tab:hover { color: #00092c; background: rgba(255, 255, 255, .5); }
.mzh-tab.is-active, .mzh-tab[aria-current="page"] {
  background: #fff;
  color: #002dde;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 20, 80, .08), 0 1px 3px rgba(0, 0, 0, .04);
}
.mzh-tab .mzh-chev { width: 10px; height: 10px; color: rgba(0, 9, 44, .45); }
.mzh-tab[aria-expanded="true"] .mzh-chev { color: #002dde; }
.mzh-sub .mzh-menu > .mzh-panel-wrap { left: 0; transform: none; }
.mzh-sub .mzh-menu:hover > .mzh-tab { color: #00092c; background: rgba(255, 255, 255, .5); }
.mzh-sub .mzh-menu:hover .mzh-chev { transform: rotate(180deg); }
.mzh-sub-cta { flex-shrink: 0; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .mzh-burger { display: block; }
  .mzh-nav {
    position: absolute; inset-inline: 12px; top: calc(100% + 8px); z-index: 200;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100vh - 100px); overflow: hidden auto;
    margin-left: 0; padding: 12px 14px 16px;
    background: #fff; border: 1px solid #e3e7f3; border-radius: 16px;
    box-shadow: 0 24px 50px rgba(0, 9, 44, .3);
  }
  .mzh-nav.is-open { display: flex; }
  .mzh-link, .mzh-trigger { width: 100%; color: #333e63; text-align: left; }
  .mzh-link:hover, .mzh-trigger:hover { color: #00092c; background: #f3f6ff; }
  .mzh-menu { width: 100%; }
  .mzh-panel-wrap { position: static; transform: none; padding-top: 2px; }
  .mzh-panel { min-width: 0; box-shadow: none; border: 0; background: #f6f8ff; width: 100% !important; }
  .mzh-cta { margin: 12px 16px 0; align-self: flex-start; }
  .mzh-sub { gap: 12px; }
  .mzh-sub-left { flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .mzh-tabs { flex-shrink: 0; }
  /* the tab row scrolls sideways, so its drop-downs are fixed under the bars instead of clipped */
  .mzh-sub .mzh-menu > .mzh-panel-wrap { position: fixed; left: 12px; right: 12px; top: 112px; transform: none; padding-top: 0; }
  .mzh-sub .mzh-panel { width: auto !important; box-shadow: 0 22px 50px rgba(0, 9, 44, .17); border: 1px solid #e3e7f3; background: #fff; }
  .mzh-sub-left::-webkit-scrollbar { display: none; }
}
@media (max-width: 768px) { .mzh-top { padding: 0 12px; } .mzh-sub { padding: 8px 12px; } }
@media (max-width: 560px) {
  .mzh-sub { padding: 8px 12px; }
  .mzh-tab { padding: 6px 12px; font-size: 12.5px; }
  .mzh-sub-cta { min-width: 0; padding: 9px 14px; }
  .mzh-home { display: none; }
}

/* ---------- Book a demo dialog (DX popup / mozark.ai ContactModal) ---------- */
.mzh-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 9, 44, .62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-family: var(--mzh-font, Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: #00092c;
}
.mzh-modal.is-open { display: flex; }
.mzh-modal, .mzh-modal * { box-sizing: border-box; }
.mzh-card {
  position: relative;
  width: min(580px, 100%); max-height: 92vh; overflow: auto;
  padding: 42px 40px 36px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 40px 90px rgba(0, 9, 44, .45);
}
.mzh-x {
  position: absolute; top: 20px; right: 22px;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 0; border-radius: 9999px;
  background: #e8edff; color: #002dde;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.mzh-x:hover { background: #002dde; color: #fff; }
.mzh-card h2 { margin: 0 50px 8px 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.035em; color: #00092c; }
.mzh-card .mzh-intro { margin: 0 0 24px; font-size: 14px; color: #333e63; }
.mzh-field { display: grid; gap: 6px; margin: 0 0 14px; font-size: 13px; font-weight: 600; }
.mzh-field input, .mzh-field select, .mzh-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #e3e7f3; border-radius: 14px;
  background: #fff; color: #00092c;
  font-family: inherit; font-size: 14px; font-weight: 400;
  transition: border-color .2s;
}
.mzh-field textarea { resize: vertical; }
.mzh-field input:focus, .mzh-field select:focus, .mzh-field textarea:focus { outline: none; border-color: #002dde; }
.mzh-field input[aria-invalid="true"] { border-color: #b53d00; }
.mzh-fine { margin: 6px 0 16px; font-size: 12.5px; color: #333e63; }
.mzh-fine a { color: #002dde; font-weight: 600; }
.mzh-err { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #b53d00; }
.mzh-submit, .mzh-close-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px;
  border: 0; border-radius: 9999px;
  background: #002dde; color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .2s;
}
.mzh-submit:hover, .mzh-close-btn:hover { background: #0022b0; }
.mzh-submit:disabled { opacity: .6; cursor: default; }
.mzh-close-btn { background: #fff; color: #002dde; box-shadow: inset 0 0 0 2px #002dde; }
.mzh-close-btn:hover { background: #e8edff; }
@media (max-width: 700px) { .mzh-card { padding: 36px 24px 28px; } }
body.mzh-lock { overflow: hidden; }
