/* ADMS homepage header layout v23
   Keeps the brand and account controls on the first row and places the
   full desktop navigation on its own row below the logo. */

header.adms-home-header {
  width: 100%;
  max-width: none;
  position: sticky;
  top: 0;
}

header.adms-home-header .adms-home-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

header.adms-home-header .adms-home-brand {
  min-width: 0;
}

header.adms-home-header .adms-v14-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 360px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

header.adms-home-header .adms-v14-logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

header.adms-home-header .adms-v14-logo-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}

header.adms-home-header .adms-v14-logo-copy strong {
  color: #f6f4ee;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: .11em;
  white-space: nowrap;
}

header.adms-home-header .adms-v14-logo-copy small {
  color: #b0aca5;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

html:not(.dark) header.adms-home-header .adms-v14-logo-copy strong { color: #1e1c18; }
html:not(.dark) header.adms-home-header .adms-v14-logo-copy small { color: #6a665e; }
html.dark header.adms-home-header .adms-v14-logo-mark-light { display: none; }
html:not(.dark) header.adms-home-header .adms-v14-logo-mark-dark { display: none; }

header.adms-home-header .adms-home-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

header.adms-home-header .adms-home-nav {
  box-sizing: border-box;
  min-width: 0;
}

header.adms-home-header .adms-home-nav a {
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .18s ease;
}

header.adms-home-header .adms-home-nav a:hover,
header.adms-home-header .adms-home-nav a:focus-visible {
  color: var(--foreground);
}

#adms-home-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#adms-home-menu-button:hover,
#adms-home-menu-button:focus-visible {
  border-color: #ff6b00;
  color: #ff6b00;
}

#adms-home-mobile-menu {
  display: none;
  box-sizing: border-box;
  width: 100%;
  padding: 8px clamp(14px, 3vw, 28px) 20px;
  border-top: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .2);
}

#adms-home-mobile-menu.is-open { display: block; }

#adms-home-mobile-menu nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

#adms-home-mobile-menu nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

#adms-home-mobile-menu nav a:hover,
#adms-home-mobile-menu nav a:focus-visible { color: var(--foreground); }

#adms-home-mobile-menu .adms-home-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 16px;
}

#adms-home-mobile-menu .adms-home-mobile-actions button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

#adms-home-mobile-menu .adms-home-mobile-actions .adms-home-mobile-request {
  border-color: #ff6b00;
  background: #ff6b00;
  color: #160900;
}

@media (min-width: 1181px) {
  header.adms-home-header .adms-home-header-inner {
    display: grid !important;
    grid-template-columns: minmax(280px, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    align-items: center;
    min-height: 104px;
    height: auto !important;
    padding: 9px clamp(18px, 2vw, 32px) 0 !important;
  }

  header.adms-home-header .adms-home-brand { grid-area: brand; }
  header.adms-home-header .adms-home-actions { grid-area: actions; }

  header.adms-home-header .adms-home-nav {
    grid-area: nav;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    margin-top: 7px;
    padding: 10px 0 11px;
    border-top: 1px solid var(--border);
    gap: clamp(10px, 1.22vw, 22px);
    overflow: visible;
  }

  header.adms-home-header .adms-home-nav a {
    padding: 2px 0;
    font-size: clamp(8.5px, .68vw, 10px);
    letter-spacing: .055em;
  }

  #adms-home-mobile-menu { display: none !important; }
}

@media (max-width: 1180px) {
  header.adms-home-header .adms-home-header-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    height: auto !important;
    padding: 9px clamp(14px, 2.5vw, 24px) !important;
    gap: 16px;
  }

  header.adms-home-header .adms-home-brand { flex: 1 1 auto; }
  header.adms-home-header .adms-home-nav { display: none !important; }
  header.adms-home-header .adms-home-actions { flex: 0 0 auto; gap: 9px; }
  header.adms-home-header .adms-home-desktop-action { display: none !important; }
  #adms-home-menu-button { display: inline-flex; }

  .adms-home-status-bar {
    padding: 6px 14px !important;
    font-size: 9px !important;
  }

  .adms-home-status-bar > div:last-child { gap: 14px !important; }
}

@media (max-width: 760px) {
  .adms-home-status-bar > div:last-child { display: none !important; }

  header.adms-home-header .adms-v14-logo-link {
    max-width: min(260px, 62vw);
    gap: 8px;
  }

  header.adms-home-header .adms-v14-logo-mark {
    width: 31px;
    height: 31px;
  }

  header.adms-home-header .adms-v14-logo-copy strong { font-size: 19px; }
  header.adms-home-header .adms-v14-logo-copy small {
    max-width: 190px;
    overflow: hidden;
    font-size: 7px;
    letter-spacing: .08em;
    text-overflow: ellipsis;
  }
}

@media (max-width: 560px) {
  .adms-home-status-bar { display: none !important; }

  header.adms-home-header .adms-home-header-inner {
    min-height: 60px;
    padding: 8px 12px !important;
    gap: 10px;
  }

  header.adms-home-header .adms-home-actions { gap: 7px; }
  header.adms-home-header .adms-v14-logo-link { max-width: 190px; }
  header.adms-home-header .adms-v14-logo-copy strong { font-size: 17px; }
  header.adms-home-header .adms-v14-logo-copy small { display: none; }

  header.adms-home-header .adms-home-actions > button:not(#adms-home-menu-button) {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  #adms-home-menu-button {
    min-width: 54px;
    height: 36px;
    padding: 0 9px;
    font-size: 9px;
  }

  #adms-home-mobile-menu {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 6px 12px 16px;
  }

  #adms-home-mobile-menu nav { grid-template-columns: 1fr; }
  #adms-home-mobile-menu nav a { min-height: 42px; }
  #adms-home-mobile-menu .adms-home-mobile-actions { grid-template-columns: 1fr; }
}
