/* Keep the legacy header geometry; only style the design-specific additions. */
.top_nav { display: none !important; }
.header { z-index: 10000; top: 0 !important; border-top: 0; }
.header #logo {
  display: block !important;
  width: 139px;
  min-height: 70px;
  background-image: url("/admin_theme/static/src/images/logo.png") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: 139px auto !important;
}

.navbar-default .navbar-nav > li > a.but_medium1.hidigi-header-login {
  background: #fff !important;
  border: 1px solid #3fc35f !important;
  color: #2a363f !important;
  margin-right: 10px;
}
.navbar-default .navbar-nav > li > a.but_medium1.hidigi-header-login:hover {
  background: #f4fcf6 !important;
  color: #2a363f !important;
}
.hidigi-software-toggle { white-space: nowrap; }
.hidigi-software-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 3px 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.hidigi-software-toggle::before,
.hidigi-software-toggle::after {
  display: none !important;
  content: none !important;
}
#sales-features,#inventory-management,#customer-management,#revenue-reports,#tax-declaration,#accounting-books,#attendance,#schedule,#payroll,#commission{scroll-margin-top:96px}

/* The design's industry panel opens on click below the existing header. */
.hidigi-software-menu > .dropdown-menu {
  position: fixed !important;
  /* The panel belongs directly below the visible header, not the text link. */
  top: var(--hidigi-software-menu-top, 110px) !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: 0 8px 18px rgba(42, 54, 63, .12);
  z-index: 9999;
}
.hidigi-software-menu.is-open > .dropdown-menu,
.hidigi-software-menu.open > .dropdown-menu,
.hidigi-software-menu:target > .dropdown-menu,
.yamm ul.nav li.hidigi-software-menu:hover > .dropdown-menu {
  display: block !important;
  transform-origin: top center;
  animation: hidigi-software-menu-slide-down .18s ease-out both;
}
@keyframes hidigi-software-menu-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hidigi-software-menu.is-open > .dropdown-menu,
  .hidigi-software-menu.open > .dropdown-menu,
  .hidigi-software-menu:target > .dropdown-menu { animation: none; }
}
.hidigi-software-mega { padding: 20px 24px 24px; border-top: 4px solid #3fc35f; background: #fff; }
.hidigi-software-mega__content { display: flex; max-width: 1160px; margin: 0 auto; }
.hidigi-software-mega__industries { display: grid; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; padding: 0 28px 0 0; }
.hidigi-software-mega__industries a { display: flex; align-items: center; min-height: 56px; color: #454545; font: 400 14px/20px Roboto, Arial, sans-serif; text-decoration: none; }
.hidigi-software-mega__industries a:hover { color: #3fc35f; }
.hidigi-software-icon { display: flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; margin-right: 12px; padding-right: 12px; border-right: 1px solid #dee2e6; }
.hidigi-software-icon img { display: block; }
/* The household lamp artwork is supplied upside down; correct its orientation
   only in the redesigned software dropdown. */
.hidigi-software-icon img[src$="/home.svg"] { transform: rotate(180deg); }
.hidigi-software-mega__offer { width: 268px; min-height: 224px; padding: 24px 18px; background: #f6f6f6; color: #2a363f; text-align: center; }
.hidigi-software-mega__offer span { display: block; font: 600 13px/18px Roboto, Arial, sans-serif; }
.hidigi-software-mega__offer strong { display: block; margin: 7px 0 9px; font: 700 38px/42px Roboto, Arial, sans-serif; }
.hidigi-software-mega__offer p { margin: 0 0 17px; white-space: nowrap; font: 400 12px/20px Roboto, Arial, sans-serif; }
.hidigi-software-mega__offer a { display: inline-block; padding: 10px 17px; border-radius: 5px; background: #3fc35f; color: #fff; font: 700 12px/14px Roboto, Arial, sans-serif; text-decoration: none; }
.hidigi-software-mega__offer a:hover { background: #32af51; color: #fff; }

@media (min-width: 1000px) {
  /* Keep the desktop navigation and its two actions on one horizontal row. */
  .header .logo { width: 14%; }
  .header .menu_main { width: 86%; }
  .header #navbar-collapse-1 { display: block !important; float: none !important; }
  .header #navbar-collapse-1 nav { display: block !important; }
  .header .navbar-nav {
    display: flex !important;
    width: 100%;
    float: none !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between;
  }
  .header .navbar-nav > li { float: none; flex: 0 0 auto; }
  .header .navbar-nav > li > a {
    white-space: nowrap;
    font-size: 17px !important;
    text-transform: none !important;
    font-weight: 500 !important;
  }
  .header #logo {
    width: 139px;
    min-height: 70px;
    background-size: 139px auto !important;
    background-position: left center !important;
    transition: width .18s ease, min-height .18s ease, background-size .18s ease;
  }
  /* Original compact-header behavior: the header contracts naturally from
     the legacy navigation; only the logo artwork scales inside it. */
  body.compact .header #logo {
    background-size: 80% !important;
    background-position: left 9px !important;
  }
  .header .navbar-nav > li > a.but_medium1 { margin-top: 0 !important; }

  /* Header actions from the desktop design. */
  .navbar-default .navbar-nav > li > a.but_medium1 {
    display: flex !important;
    height: 40px;
    padding: 0 20px !important;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font: 500 16px/1 Roboto, Arial, sans-serif !important;
    letter-spacing: 0;
    text-transform: none !important;
  }
  .navbar-default .navbar-nav > li > a.but_medium1.hidigi-header-login {
    width: 120px;
    margin-right: 0;
    margin-left: 15px;
  }
  .navbar-default .navbar-nav > li > a.but_medium1:not(.hidigi-header-login) {
    width: 155px;
    background: #3fc35f !important;
    border-color: #3fc35f !important;
    color: #fff !important;
  }

  /* Match the legacy menu behavior: the software panel is hover-only. */
  .yamm ul.nav li.hidigi-software-menu:hover > ul.dropdown-menu { display: block !important; }
  /* Keep the parent hovered while the pointer travels through the empty part
     of the header between its trigger and the full-width dropdown. */
  .hidigi-software-menu::after {
    position: fixed;
    z-index: 10000;
    top: var(--hidigi-software-toggle-bottom, 0px);
    left: var(--hidigi-software-toggle-left, 0px);
    width: var(--hidigi-software-toggle-width, 0px);
    height: max(0px, calc(var(--hidigi-software-menu-top, 0px) - var(--hidigi-software-toggle-bottom, 0px)));
    content: "";
  }
}
@media (max-width: 999px) {
  /* Do not alter the legacy collapse geometry on phones.  It is governed by
     responsive-leyouts.css exactly as it was before the desktop redesign. */
  .header .navbar-header { height: 62px; }
  .header #logo { margin-top: 0; }
  .header .menu_main {
    width: 100vw !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
  }
  .header #navbar-collapse-1 {
    float: none !important;
    width: 100vw !important;
    margin: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  /* Let Bootstrap animate the collapse height.  The nav itself establishes the
     full viewport target height, so the opened menu still fills the screen. */
  .header #navbar-collapse-1.navbar-collapse {
    max-height: calc(100vh - 62px) !important;
    max-height: calc(100dvh - 62px) !important;
    overflow-y: auto !important;
  }
  .header #navbar-collapse-1.navbar-collapse > nav {
    min-height: calc(100vh - 62px);
    min-height: calc(100dvh - 62px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .hidigi-software-menu > .dropdown-menu { display: none; position: static !important; width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .hidigi-software-menu.open > .dropdown-menu { display: block !important; }
  .hidigi-software-caret { display: none; }
  .hidigi-software-mega { display: none; }
  .menu_main .section-box.last .hidigi-mobile-login {
    display: block !important;
    width: max-content;
    margin-top: 12px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #3fc35f !important;
    text-decoration: underline !important;
  }
  .menu_main .section-box.last .hidigi-mobile-login:hover {
    background: transparent !important;
    color: #2a363f !important;
  }
  .hidigi-software-mobile-original .section-box > a > span {
    display: inline-flex !important;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
  }
  .hidigi-software-mobile-original .section-box > a > span > img {
    display: block;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    background: transparent !important;
    /* Match the light-gray mobile menu labels instead of the dark SVG stroke. */
    filter: brightness(0) invert(1) opacity(.68);
  }
  .hidigi-software-mobile-original .section-box > a > span > img[src$="home.svg"] {
    transform: rotate(180deg);
  }
}
@media (max-width: 480px) {
  .header #logo {
    width: 112px;
    min-height: 58px;
    background-size: 112px auto !important;
  }
}
@media (min-width: 1000px) { .hidigi-software-mobile-original { display: none; } }
