/* Shared Haikantong shell for every archived ERP page. */
#navp > li.hkt-shell-nav {
  position: relative;
}

#navp .hkt-nav-mega-inline,
#navp > li.hkt-shell-nav > [data-menuname] {
  display: none !important;
}

.hkt-shell-menu {
  position: fixed;
  z-index: 100000;
  display: none;
  box-sizing: border-box;
  max-height: min(68vh, 620px);
  padding: 18px 20px;
  overflow: auto;
  color: #333 !important;
  text-align: left;
  background: #fff !important;
  border: 1px solid #e5e5e5;
  border-top: 3px solid #fb9332;
  box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
}

#navp > li.hkt-shell-nav:hover > .hkt-shell-menu,
#navp > li.hkt-shell-nav:focus-within > .hkt-shell-menu,
.hkt-shell-menu.hkt-menu-open {
  display: block !important;
}

.hkt-shell-menu.hkt-menu-wide {
  right: 14px;
  left: 14px !important;
}

.hkt-shell-menu.hkt-menu-compact {
  width: min(680px, calc(100vw - 28px));
}

.hkt-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px 26px;
}

.hkt-menu-group,
.hkt-menu-platform-content {
  min-width: 0;
}

.hkt-menu-title {
  min-height: 24px;
  margin: 0 0 9px;
  padding-bottom: 7px;
  overflow: hidden;
  color: #222 !important;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #eee;
}

.hkt-menu-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px 14px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.hkt-menu-links li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.hkt-shell-menu .hkt-menu-links a {
  display: block !important;
  box-sizing: border-box;
  min-height: 31px;
  padding: 6px 8px !important;
  overflow: hidden;
  color: #555 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 19px !important;
  text-decoration: none !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent !important;
  border: 0 !important;
  border-radius: 2px;
}

.hkt-shell-menu .hkt-menu-links a:hover,
.hkt-shell-menu .hkt-menu-links a:focus {
  color: #e66f00 !important;
  background: #fff3e7 !important;
}

.hkt-platform-menu {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 300px;
  margin: -18px -20px;
}

.hkt-platform-tabs {
  max-height: min(68vh, 620px);
  margin: 0 !important;
  padding: 10px 0 !important;
  overflow-y: auto;
  list-style: none !important;
  background: #f7f7f7;
  border-right: 1px solid #e5e5e5;
}

.hkt-platform-tabs li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.hkt-platform-tab {
  display: block;
  width: 100%;
  min-height: 39px;
  padding: 9px 15px;
  overflow: hidden;
  color: #444;
  font: 400 13px/20px Arial, "Microsoft YaHei", sans-serif;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
}

.hkt-platform-tab:hover,
.hkt-platform-tab.hkt-active {
  color: #e66f00;
  background: #fff !important;
  border-left-color: #fb9332 !important;
}

.hkt-platform-panels {
  min-width: 0;
  padding: 19px 22px;
  background: #fff;
}

.hkt-menu-platform-content {
  display: none;
  color: #333 !important;
  background: #fff !important;
}

.hkt-menu-platform-content.hkt-active {
  display: block;
  color: #333 !important;
  background: #fff !important;
}

.hkt-menu-platform-content .hkt-menu-links {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#hkt-language-switch {
  position: relative;
}

#hkt-language-switch > button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0 8px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
}

#hkt-language-switch > button::before {
  margin-right: 5px;
  color: #fb9332;
  font-size: 15px;
  content: "文";
}

#hkt-language-switch > button::after {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.hkt-language-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 100001;
  display: none;
  min-width: 128px;
  margin: 0 !important;
  padding: 5px 0 !important;
  list-style: none !important;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 5px 15px rgb(0 0 0 / 15%);
}

#hkt-language-switch:hover .hkt-language-menu,
#hkt-language-switch:focus-within .hkt-language-menu,
#hkt-language-switch.hkt-language-open .hkt-language-menu {
  display: block;
}

.hkt-action-layer {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(0 0 0 / 42%);
}

.hkt-action-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  color: #333;
  background: #fff;
  border: 1px solid #d9d9d9;
  box-shadow: 0 14px 38px rgb(0 0 0 / 25%);
}

.hkt-action-dialog > header,
.hkt-action-dialog > footer {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 18px;
}

.hkt-action-dialog > header {
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.hkt-action-dialog > header h3 {
  margin: 0;
  color: #222;
  font-size: 16px;
  font-weight: 600;
}

.hkt-action-close {
  width: 30px;
  height: 30px;
  color: #777;
  font-size: 22px;
  line-height: 28px;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.hkt-action-body {
  padding: 18px;
}

.hkt-action-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.hkt-action-row label {
  color: #555;
  text-align: right;
}

.hkt-action-row input,
.hkt-action-row select,
.hkt-action-row textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.hkt-action-row textarea {
  min-height: 82px;
  resize: vertical;
}

.hkt-action-dialog > footer {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #eee;
}

.hkt-action-dialog > footer button {
  min-width: 78px;
  min-height: 34px;
  padding: 7px 16px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.hkt-action-dialog > footer .hkt-action-confirm {
  color: #fff;
  background: #fb9332;
  border-color: #fb9332;
}

.hkt-shell-toast {
  position: fixed;
  top: 112px;
  left: 50%;
  z-index: 120001;
  min-width: 180px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 16px;
  color: #fff;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  background: rgb(30 30 30 / 88%);
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hkt-shell-toast.hkt-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hkt-filter-selected {
  color: #e66f00 !important;
  font-weight: 600 !important;
  border-bottom-color: #fb9332 !important;
}

.hkt-created-record {
  margin: 12px 20px;
  padding: 12px 14px;
  color: #333;
  background: #f8fff3;
  border: 1px solid #cce6bc;
}

.hkt-language-menu li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hkt-language-menu button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 7px 14px;
  color: #333;
  font: 400 13px/20px Arial, "Microsoft YaHei", sans-serif;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 0;
}

.hkt-language-menu button:hover,
.hkt-language-menu button.active {
  color: #e66f00;
  background: #fff3e7;
}

@media (max-width: 1100px) {
  .hkt-shell-menu {
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
  }

  .hkt-platform-menu {
    grid-template-columns: 150px minmax(0, 1fr);
  }
}
