﻿/* Admin console visual alignment: icon rail + menu management card list. */

/* ---- left icon rail ---- */
.admin-sidebar.n-layout-sider {
  width: 72px !important;
  max-width: 72px !important;
  min-width: 72px !important;
  background: #fff !important;
  border-right: 1px solid #eceef3;
}

.admin-sidebar .sidebar-title {
  display: none !important;
}

.admin-sidebar .admin-sidebar-inner {
  padding-top: 14px;
}

.admin-sidebar .menu-list.collapsed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.admin-sidebar .collapsed-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa1b1;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.admin-sidebar .collapsed-item:hover {
  background: #f5f4fb;
  color: #6b7280;
}

.admin-sidebar .collapsed-item.is-active {
  background: #f1ecff;
  color: #5b3df5;
}

.admin-sidebar .collapsed-item .collapsed-icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.admin-sidebar .collapsed-item .active-bar {
  display: none !important;
}

.admin-sidebar .tech-avatar-wrapper {
  margin-bottom: 10px;
}

/* ---- page header ---- */
.admin-header {
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
}

.admin-header .page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header .page-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2430;
  position: relative;
  padding-left: 12px;
}

.admin-header .page-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #3b6cff;
}

.admin-page {
  padding: 16px 20px;
  background: #f7f8fa;
}

/* ---- menu management card list ---- */
.menu-page .n-tabs-nav {
  background: #fff;
  border: 1px solid #e8e9ef;
  border-radius: 10px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.menu-page .menu-tree {
  background: #fff;
  border: 1px solid #e8e9ef;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
}

.menu-page .menu-group {
  border: 0;
  margin: 0;
  padding: 0;
}

.menu-page .menu-row {
  min-height: 56px;
  padding: 0 20px !important;
  border-bottom: 1px solid #f0f1f5;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.menu-page .menu-group:last-child .menu-row:last-child {
  border-bottom: 0;
}

.menu-page .menu-row.level-2,
.menu-page .menu-row.level-3 {
  padding-left: 56px !important;
  background: #fcfcfe;
}

.menu-page .drag-handle,
.menu-page .menu-path {
  display: none !important;
}

.menu-page .menu-icon {
  color: #8a90a0;
  display: inline-flex;
  align-items: center;
  font-size: 18px;
}

.menu-page .menu-icon svg {
  width: 18px;
  height: 18px;
}

.menu-page .menu-name {
  font-size: 14px;
  color: #2b2f36;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-page .menu-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-page .menu-actions > .n-button {
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  --n-height: 28px !important;
  --n-border: 1px solid #e3e4ea !important;
  --n-border-hover: 1px solid #c9cbd6 !important;
  --n-border-focus: 1px solid #c9cbd6 !important;
  --n-border-pressed: 1px solid #c9cbd6 !important;
  --n-color: #ffffff !important;
  --n-color-hover: #ffffff !important;
  --n-color-focus: #ffffff !important;
  --n-color-pressed: #ffffff !important;
  --n-text-color: #5b6270 !important;
  --n-text-color-hover: #2b2f36 !important;
  --n-text-color-focus: #2b2f36 !important;
  --n-text-color-pressed: #2b2f36 !important;
}

.menu-page .menu-row.level-1 .menu-name::after {
  content: "分组";
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: #f0eeff;
  color: #6b5bd2;
  font-size: 12px;
  font-weight: 500;
}

.menu-page .menu-row .n-tag {
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  --n-height: 22px !important;
  --n-border-radius: 4px !important;
  --n-font-size: 12px !important;
}

.qx-group-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f0eeff;
  color: #6b5bd2;
  font-size: 12px;
  font-weight: 500;
}

.qx-renamed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: #e9f8ee;
  color: #2f9e58;
  font-size: 12px;
  white-space: nowrap;
}

.qx-renamed-clear {
  border: 0;
  background: transparent;
  color: #2f9e58;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
}

.qx-rename {
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #e3e4ea;
  background: #fff;
  color: #5b6270;
  font-size: 12px;
  cursor: pointer;
}

.qx-rename:hover {
  border-color: #c9cbd6;
  color: #2b2f36;
}

/* rename dialog */
.qx-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 28, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.qx-modal {
  width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 48px rgba(15, 20, 40, .18);
}

.qx-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2430;
  margin-bottom: 14px;
}

.qx-modal-input {
  width: 100%;
  height: 36px;
  border: 1px solid #e3e4ea;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  color: #2b2f36;
  outline: none;
}

.qx-modal-input:focus {
  border-color: #8b5cf6;
}

.qx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.qx-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #e3e4ea;
  background: #fff;
  color: #5b6270;
}

.qx-btn-primary {
  border-color: #6b4eff;
  background: #6b4eff;
  color: #fff;
}

.qx-btn-primary:hover {
  background: #5b3df5;
}

.llm-test-result {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-left: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.llm-test-result.is-success {
  color: #159a58;
}

.llm-test-result.is-error {
  color: #d94848;
}
