/* Unify 展示壳：PHP 顶栏横导航；菜单紧跟品牌靠左，工具栏靠右。 */

html[data-tt-shell="unify"] {
  --app-header-height: 4.5rem;
}

html[data-tt-shell="unify"],
html[data-tt-shell="unify"] body,
html[data-tt-shell="unify"] #app {
  min-height: 100%;
  height: 100%;
}

html[data-tt-shell="unify"] body {
  background-color: var(--tt-tone-bg, var(--bs-gray-100, #f5f7fa));
  color: var(--tt-tone-fg, var(--bs-gray-800, #51596c));
}

.un-root {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--tt-tone-bg, var(--bs-gray-100, #f5f7fa));
}

.unify-container {
  max-width: 1400px;
}

#header.unify-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--tt-tone-surface, #fff);
  box-shadow: 0 1px 8px var(--tt-tone-shadow, rgba(45, 55, 75, 0.08));
  min-height: 4.5rem;
}

#header.unify-header .container {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
}

#header.unify-header .navbar-nav-wrap {
  width: 100%;
  min-height: 4.5rem;
}

@media (min-width: 992px) {
  #header.unify-header .navbar-nav-wrap {
    flex-wrap: nowrap;
  }

  #header.unify-header .navbar-collapse {
    flex-grow: 1;
  }

  #header.unify-header .navbar-nav {
    width: auto;
    justify-content: flex-start;
    margin-left: 1.75rem;
  }
}

.unify-header-brand {
  display: flex;
  align-items: center;
  padding: 0 0.25rem 0 0;
  height: 100%;
  flex-shrink: 0;
}

.unify-header-divider {
  width: 1px;
  height: 28px;
  background-color: rgba(45, 55, 75, 0.12);
  margin: 0 14px;
}

.unify-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.unify-header-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bs-gray-900, #2d374b);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

#header.unify-header .navbar-nav .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.navbar-nav-wrap-secondary-content {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#header.unify-header .tt-chrome {
  margin-left: 0;
}

#content {
  flex: 1 1 auto;
}

.unify-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--tt-tone-border, var(--bs-gray-300, #dce0e5));
}

.unify-subnav a {
  padding: 0.4rem 0.9rem;
  color: var(--bs-gray-700, #677788);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.unify-subnav a:hover,
.unify-subnav a.active {
  color: #07853a;
  background-color: rgba(189, 197, 209, 0.2);
}

.unify-stage {
  min-height: 12rem;
}

/* 只用 Unify 自带的 hs-mega-menu / dropdown-menu 样式，这里只负责悬停显示 */
#header.unify-header .navbar-nav-wrap {
  position: relative;
}

#header.unify-header .hs-has-mega-menu {
  position: static;
}

@media (min-width: 992px) {
  #header.unify-header .hs-has-mega-menu:hover > .hs-mega-menu,
  #header.unify-header .hs-has-mega-menu:focus-within > .hs-mega-menu {
    display: block;
  }
}

@media (max-width: 991.98px) {
  #header.unify-header .hs-has-mega-menu.open > .hs-mega-menu,
  #header.unify-header .hs-mega-menu.show {
    display: block;
    position: static;
  }
}

.unify-footer {
  color: var(--tt-tone-fg, var(--bs-gray-600, #8c98a4));
  font-size: 0.8125rem;
}

.unify-footer p {
  color: inherit;
}

html[data-tt-shell="unify"] .tt-plugin-stage > .hello,
html[data-tt-shell="unify"] .tt-plugin-stage > .page {
  max-width: none;
  width: 100%;
  color: inherit;
  font-family: inherit;
  display: grid;
  gap: 1rem;
  background: var(--tt-tone-surface, #fff);
  border-radius: 0.75rem;
  box-shadow: 0 0.375rem 0.875rem var(--tt-tone-shadow, rgba(140, 152, 164, 0.08));
  padding: 1.75rem 1.75rem 2rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage > .tt-plugin-page {
  max-width: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
}

html[data-tt-shell="unify"] .tt-plugin-page .card {
  background: var(--tt-tone-surface, #fff);
  border-color: var(--tt-tone-border, var(--bs-gray-200, #f3f6f9));
  border-radius: 0.75rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello h1,
html[data-tt-shell="unify"] .tt-plugin-stage .page h1,
html[data-tt-shell="unify"] .tt-plugin-stage .ctrl-head h1 {
  color: var(--tt-tone-fg, var(--bs-gray-900, #2d374b));
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello h2,
html[data-tt-shell="unify"] .tt-plugin-stage .page h2 {
  font-size: 1.05rem;
  margin: 0.5rem 0;
  font-weight: 600;
}

html[data-tt-shell="unify"] .tt-plugin-stage .muted,
html[data-tt-shell="unify"] .tt-plugin-stage .ctrl-head p {
  color: var(--bs-gray-600, #8c98a4);
  font-size: 0.875rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage nav.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--tt-tone-border, var(--bs-gray-300, #dce0e5));
}

html[data-tt-shell="unify"] .tt-plugin-stage nav.nav a {
  padding: 0.4rem 0.9rem;
  color: var(--bs-gray-700, #677788);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage nav.nav a.router-link-exact-active,
html[data-tt-shell="unify"] .tt-plugin-stage nav.nav a.router-link-active {
  color: #07853a;
  background-color: rgba(10, 191, 83, 0.1);
}

html[data-tt-shell="unify"] .tt-plugin-stage form.row,
html[data-tt-shell="unify"] .tt-plugin-stage form.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

html[data-tt-shell="unify"] .tt-plugin-stage form.stack {
  flex-direction: column;
  align-items: stretch;
  max-width: 28rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-tt-shell="unify"] .tt-plugin-stage .page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-tt-shell="unify"] .tt-plugin-stage .hello select,
html[data-tt-shell="unify"] .tt-plugin-stage .page select,
html[data-tt-shell="unify"] .tt-plugin-stage .hello textarea,
html[data-tt-shell="unify"] .tt-plugin-stage .page textarea {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--tt-tone-border, var(--bs-gray-300, #dce0e5));
  border-radius: 0.5rem;
  background: var(--tt-tone-surface, #fff);
  color: inherit;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello input:focus,
html[data-tt-shell="unify"] .tt-plugin-stage .page input:focus,
html[data-tt-shell="unify"] .tt-plugin-stage .hello select:focus,
html[data-tt-shell="unify"] .tt-plugin-stage .page select:focus {
  outline: 0;
  border-color: #0abf53;
  box-shadow: 0 0 0 0.2rem rgba(10, 191, 83, 0.18);
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello button:not(.link):not(.ghost):not(.tt-shell-home-card),
html[data-tt-shell="unify"] .tt-plugin-stage .page button:not(.link):not(.ghost):not(.tt-shell-home-card) {
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 0.5rem;
  background: #0abf53;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello button:not(.link):not(.ghost):hover,
html[data-tt-shell="unify"] .tt-plugin-stage .page button:not(.link):not(.ghost):hover {
  background: #07853a;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello button.link,
html[data-tt-shell="unify"] .tt-plugin-stage .page button.link,
html[data-tt-shell="unify"] .tt-plugin-stage .page a.link {
  background: none;
  color: #0abf53;
  border: 0;
  padding: 0;
  min-height: 0;
  font-weight: 600;
  cursor: pointer;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello button.ghost,
html[data-tt-shell="unify"] .tt-plugin-stage .page button.ghost {
  background: #fff;
  color: var(--bs-gray-700, #677788);
  border: 1px solid var(--bs-gray-300, #dce0e5);
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 0.5rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello table,
html[data-tt-shell="unify"] .tt-plugin-stage .page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0.25rem;
  background: transparent;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello th,
html[data-tt-shell="unify"] .tt-plugin-stage .hello td,
html[data-tt-shell="unify"] .tt-plugin-stage .page th,
html[data-tt-shell="unify"] .tt-plugin-stage .page td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--bs-gray-200, #f3f6f9);
  font-size: 0.9rem;
  background: transparent;
  color: inherit;
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello thead th,
html[data-tt-shell="unify"] .tt-plugin-stage .page thead th {
  color: var(--bs-gray-600, #8c98a4);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--tt-tone-muted, var(--bs-gray-100, #f5f7fa));
}

html[data-tt-shell="unify"] .tt-plugin-stage .hello tbody tr:hover td,
html[data-tt-shell="unify"] .tt-plugin-stage .page tbody tr:hover td {
  background: rgba(10, 191, 83, 0.04);
}

html[data-tt-shell="unify"] .tt-plugin-stage .hits,
html[data-tt-shell="unify"] .tt-plugin-stage .tiles {
  display: grid;
  gap: 0.65rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .tiles {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

html[data-tt-shell="unify"] .tt-plugin-stage a.hit,
html[data-tt-shell="unify"] .tt-plugin-stage a.tile,
html[data-tt-shell="unify"] .tt-plugin-stage .tile {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--bs-gray-200, #f3f6f9);
  border-radius: 0.5rem;
  background: var(--tt-tone-surface, #fff);
  text-decoration: none;
  color: inherit;
}

html[data-tt-shell="unify"] .tt-plugin-stage a.hit:hover,
html[data-tt-shell="unify"] .tt-plugin-stage a.tile:hover {
  border-color: #0abf53;
}

html[data-tt-shell="unify"] .tt-plugin-stage .bubble {
  background: var(--tt-tone-muted, var(--bs-gray-100, #f5f7fa));
  border: 1px solid var(--bs-gray-200, #f3f6f9);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
}

html[data-tt-shell="unify"] .tt-plugin-stage .bubble.me {
  border-color: rgba(10, 191, 83, 0.35);
  background: rgba(10, 191, 83, 0.08);
}

html[data-tt-shell="unify"] .tt-plugin-stage .error {
  color: var(--bs-danger, #692340);
}

@media (max-width: 991.98px) {
  #header.unify-header .navbar-nav-wrap-secondary-content {
    margin-left: auto;
  }

  html[data-tt-shell="unify"] .tt-plugin-stage > .hello,
  html[data-tt-shell="unify"] .tt-plugin-stage > .page {
    padding: 1.15rem;
    border-radius: 0.5rem;
  }
}
