/* Shared header: header_ classes and IDs isolate every component. */
.header_main,
.header_connect_overlay {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #111a2e;
  line-height: 1.5;
}

body,
body :where(
    h1, h2, h3, h4, h5, h6, p, a, li, strong, b,
    label, button, input, select, textarea, div, span, small
):not(
    [class*="fa-"],
    [class*="icon"],
    [class*="material-symbols"]
) {
    font-family: "Avenir Next", "Segoe UI", system-ui,
        -apple-system, "Helvetica Neue", Arial, sans-serif !important;
}

.header_main *,
.header_main *::before,
.header_main *::after,
.header_connect_overlay *,
.header_connect_overlay *::before,
.header_connect_overlay *::after {
  box-sizing: border-box;
}

.header_main {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #dce5fb;
  box-shadow: 0 3px 12px rgba(20, 40, 80, .025);
}

.header_container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 92px;
  max-width: 1800px;
  padding: 16px 38px;
  margin: 0 auto;
}

.header_brand {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  text-decoration: none;
  color: #111a2e;
}

.header_brand_name {
  font-size: clamp(25px, 2vw, 38px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.9px;
  white-space: nowrap;
}

.header_brand_accent {
  color: #2860ee;
}

.header_brand_product {
  margin-top: 2px;
  color: #2860ee;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  line-height: 1.2;
}

.header_navigation {
  flex: 1;
  min-width: 0;
}

.header_links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header_link_item {
  padding: 0;
  margin: 0;
  list-style: none;
}

.header_link {
  display: inline-block;
  padding: 10px 2px 8px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  color: #111a2e;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}

.header_link:hover,
.header_link.header_link_active {
  color: #2860ee;
}

.header_link.header_link_active {
  border-bottom-color: #2860ee;
}

.header_actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.header_workspace_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 22px;
  min-height: 50px;
  border-radius: 12px;
  background: #111a2e;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}

.header_workspace_button:hover {
  background: #243452;
}

.header_connect_button {
  padding: 10px 0;
  background: none;
  border: 0;
  color: #2860ee;
  font: 500 13px/1.5 'Poppins', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

 .header_profile {
  position: relative;
  min-width: 0;
}

.header_profile_toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  background: #fbfaff;
  box-shadow: 0 3px 10px rgba(17, 26, 46, .05);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.header_profile_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5b43a5;
  font-size: 14px;
}

.header_user_info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  gap: 2px;
}

.header_user_topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.header_user_name {
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.header_user_role_badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7ebff;
  color: #2860ee;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.header_user_meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #53627c;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.header_user_meta_separator {
  color: #9aa7bd;
  font-size: 9px;
}

.header_profile_chevron {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  margin-left: 3px;
  border-right: 1.5px solid #8b97aa;
  border-bottom: 1.5px solid #8b97aa;
  transform: rotate(45deg);
  margin-top: -3px;
}



.header_user_dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid #dce5f5;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(17, 26, 46, .12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 1100;
}

.header_profile:hover .header_user_dropdown,
.header_profile:focus-within .header_user_dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header_profile:hover .header_profile_toggle,
.header_profile:focus-within .header_profile_toggle {
  border-color: #c7d5f6;
  box-shadow: 0 5px 16px rgba(40, 96, 238, .09);
  background: #fbfcff;
  .header_user_name{
    color: #000000;
  }
}

.header_profile:hover .header_profile_chevron,
.header_profile:focus-within .header_profile_chevron {
  transform: rotate(225deg);
  margin-top: 3px;
}

.header_profile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}

.header_account_link {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #253755;
  font-size: 13px;
}

.header_account_link:hover {
  background: #edf3ff;
  color: #2860ee;
}

.header_main a:focus-visible,
.header_main button:focus-visible,
.header_profile_toggle:focus-visible,
.header_connect_overlay button:focus-visible {
  outline: 3px solid #91b0fc;
  outline-offset: 4px;
}

.header_connect_overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(13, 21, 54, .48);
  backdrop-filter: blur(4px);
  z-index: 10000;
  overflow-y: auto;
}

.header_connect_overlay[hidden],
.header_connect_overlay [hidden] {
  display: none !important;
}

.header_modal_box {
  position: relative;
  width: min(100%, 580px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: auto;
  padding: 32px;
  border: 1px solid #dce5f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(13, 21, 54, .2);
}

.header_close_modal {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dce5f5;
  border-radius: 8px;
  background: #f6f8ff;
  color: #53627c;
  font-size: 24px;
  cursor: pointer;
}

.header_connect_title {
  margin: 0 24px 12px 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
}

.header_connect_description {
  margin: 0 0 24px;
  font-size: 13px;
  color: #63728a;
}

.header_field_label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
}

.header_required {
  color: #b43732;
}

.header_connect_input,
.header_connect_textarea {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #fbfcff;
  color: #21334f;
  border: 1px solid #d3ddef;
  border-radius: 9px;
  font: 400 13px/1.6 'Poppins', system-ui, sans-serif;
}

.header_connect_textarea {
  min-height: 115px;
  resize: vertical;
}

.header_connect_input:focus,
.header_connect_textarea:focus {
  outline: none;
  border-color: #2860ee;
  box-shadow: 0 0 0 3px rgba(40, 96, 238, .12);
}

.header_connect_submit {
  padding: 12px 24px;
  border: 0;
  border-radius: 9px;
  background: #2860ee;
  color: #fff;
  font: 600 13px/1.5 'Poppins', system-ui, sans-serif;
  cursor: pointer;
}

.header_connect_submit:disabled {
  opacity: .65;
  cursor: wait;
}

.header_connect_success,
.header_connect_error {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #c9e5d6;
  border-radius: 9px;
  background: #edf8f2;
  color: #276848;
  font-size: 13px;
}

.header_connect_error {
  border-color: #f0cecc;
  background: #fff2f1;
  color: #a33934;
}

@media (max-width: 1500px) {
  .header_container {
    gap: 22px;
    padding: 15px 26px;
  }

  .header_links {
    gap: 10px 16px;
  }

  .header_link {
    font-size: 12px;
  }

  .header_actions {
    gap: 20px;
  }

  .header_profile {
    min-width: 0;
  }

  .header_workspace_button {
    padding: 13px 16px;
    font-size: 12px;
  }
}

@media (max-width: 1100px) {
  .header_container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .header_navigation {
    order: 3;
    flex-basis: 100%;
  }

  .header_links {
    justify-content: flex-start;
  }

  .header_brand_name {
    font-size: 29px;
  }

  .header_profile {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .header_container {
    padding: 14px 16px;
    gap: 14px;
  }

  .header_brand_name {
    font-size: 27px;
  }

  .header_actions {
    width: 100%;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header_profile {
    flex: 1;
    min-width: 0;
  }

  .header_navigation {
    overflow-x: auto;
  }

  .header_links {
    flex-wrap: nowrap;
    gap: 18px;
  }

  .header_link {
    font-size: 12px;
  }

  .header_connect_overlay {
    padding: 14px;
  }

  .header_modal_box {
    padding: 26px 20px;
    max-height: calc(100vh - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .header_main *,
  .header_connect_overlay * {
    transition: none !important;
  }
}

/* Preserve the shared page/footer layout without global typography rules. */
body:has(> .header_main) {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body:has(> .header_main)>main {
  flex: 1;
}

.header_brand_logo {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 600px) {
    .header_brand_logo {
        width: 150px;
    }
}

/* =====================================================
   TEAM SETUP HOVER DROPDOWN
   ===================================================== */

.header_team_setup {
    position: relative;
}

.header_team_setup_toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-family:"Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    background: transparent;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.header_team_setup_chevron {
    width: 6px;
    height: 6px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg);
    margin-top: -3px;

    transition: transform .18s ease;
}

.header_team_setup:hover .header_team_setup_chevron {
    transform: rotate(225deg);
    margin-top: 3px;
}


/* Dropdown */

.header_team_setup_dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 7px;

    background: #ffffff;
    border: 1px solid #dce5f5;
    border-radius: 10px;

    box-shadow: 0 12px 30px rgba(17, 26, 46, .12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, -4px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;

    z-index: 1200;
}


/* Show ONLY on hover */

.header_team_setup:hover .header_team_setup_dropdown,
.header_team_setup:focus-within .header_team_setup_dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(-50%, 0);
}


/* Hover bridge */

.header_team_setup::after {
    content: "";
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    height: 8px;
}


/* Dropdown links */

.header_team_setup_dropdown_link {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px 11px;

    border-radius: 7px;

    color: #253755;
    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    white-space: nowrap;

    transition:
        background .18s ease,
        color .18s ease;
}

.header_team_setup_dropdown_link i {
    width: 16px;
    color: #5b6f92;
    text-align: center;
}

.header_team_setup_dropdown_link:hover {
    background: #edf3ff;
    color: #2860ee;
}

.header_team_setup_dropdown_link:hover i {
    color: #2860ee;
}

/* Minimal midess footer — social icons + copyright + Book a Demo.
   Append to static/css/midess_header_footer.css */
.midess_footer_simple {
  background: #1b253f;
  border-top: 1px solid #e4eaf3;
  padding: 18px clamp(16px, 4vw, 48px);
}

.midess_footer_simple_row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.midess_footer_simple_copy {
  margin: 0;
  font-size: 13px;
  color: #758195;
}

.midess_footer_simple_social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.midess_footer_simple_social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4eaf3;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.midess_footer_simple_social a:hover {
  background: #2456e6;
  border-color: #2456e6;
  color: #fff;
}

.midess_footer_simple_demo {
  display: inline-block;
  background: #2456e6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(36, 86, 230, .25);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.midess_footer_simple_demo:hover {
  background: #1b46c9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(36, 86, 230, .30);
}

@media (max-width: 640px) {
  .midess_footer_simple_row {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
