
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: #333;
  overflow: hidden;
}

.app { display: flex; flex-direction: column; height: 100vh; min-width: 1100px; }

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e8eaee;
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex: none;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3d8bff, #2f7bff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 15px; font-weight: 700; color: #22303f; }
.brand-sub { font-size: 11px; color: #8a90a0; letter-spacing: .5px; }

.topbar .spacer { flex: 1; }

.top-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  margin-left: 28px;
  user-select: none;
}
.top-item:hover { color: #2f7bff; }
.top-item svg { display: block; }
.top-item.shop { color: #333; font-weight: 600; }
.top-item.shop .caret { font-size: 10px; color: #8a90a0; margin-left: 2px; }

.user-wrap { position: relative; }
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(30,40,60,.16);
  border: 1px solid #eceef2;
  padding: 6px;
  display: none;
  z-index: 60;
}
.user-menu.show { display: block; }
.user-menu .menu-item {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 6px;
  color: #444;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.user-menu .menu-item:hover { background: #f0f5ff; color: #2f7bff; }
.user-menu .menu-item svg { flex: none; }
.user-menu .menu-item .mi-label { color: #8a90a0; font-size: 13px; }
.user-menu .menu-item .mi-no {
  color: #444; font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 108px;
}
.user-menu .menu-item:hover .mi-no { color: #2f7bff; }
.user-menu .menu-sep { height: 1px; background: #f0f1f4; margin: 4px 8px; }

.modal.modal-simple { width: 360px; }
.shopno-box {
  background: #f7f9fc;
  border: 1px solid #eceff5;
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
}
.shopno-box .shopno-label { font-size: 13px; color: #8a90a0; margin-bottom: 8px; }
.shopno-box .shopno-value {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  letter-spacing: 1.2px;
  font-variant-numeric: tabular-nums;
  user-select: all;
  word-break: break-all;
}
.shopno-box .shopno-sub { font-size: 12.5px; color: #98a0ad; margin-top: 10px; }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20,28,44,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  width: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(20,30,55,.25);
  overflow: hidden;
  animation: modalIn .18s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-head {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #f0f1f4;
}
.modal-head .m-title { font-size: 16px; font-weight: 600; color: #222; }
.modal-head .m-close {
  width: 26px; height: 26px;
  border: none; background: transparent;
  color: #9aa0ab; font-size: 18px; line-height: 1;
  cursor: pointer; border-radius: 6px; font-family: inherit;
}
.modal-head .m-close:hover { background: #f2f3f6; color: #555; }
.modal-body { padding: 22px 24px 6px; }
.modal-body .field { margin-bottom: 18px; }
.modal-body .field label { display: block; font-size: 13px; color: #555; margin-bottom: 7px; }
.modal-body .field input {
  width: 100%;
  height: 40px;
  border: 1px solid #d3d7de;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.modal-body .field input:focus {
  border-color: #2f7bff;
  box-shadow: 0 0 0 3px rgba(47,123,255,.12);
}
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 24px 20px; }
.modal-foot button {
  height: 36px;
  padding: 0 22px;
  border-radius: 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.modal-foot .btn-cancel { background: #fff; border: 1px solid #ccd1d9; color: #555; }
.modal-foot .btn-cancel:hover { border-color: #2f7bff; color: #2f7bff; }
.modal-foot .btn-ok { background: linear-gradient(135deg, #3d8bff, #2f7bff); border: none; color: #fff; }
.modal-foot .btn-ok:hover { filter: brightness(1.06); }
.modal-foot .btn-ok:disabled { opacity: .6; cursor: not-allowed; filter: none; }

#toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(28,34,48,.88);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  z-index: 200;
  max-width: 70vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.toast-area {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: 70vw;
}
.toast-area .toast {
  background: rgba(28,34,48,.9);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(20,30,55,.22);
}
.toast-area .toast.t-err { background: rgba(190,44,44,.94); }
.toast-area .toast.t-ok { background: rgba(14,140,90,.94); }

.main { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 200px;
  flex: none;
  background: #16203a;
  overflow-y: auto;
  padding-bottom: 30px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #33405f; border-radius: 3px; }

.nav-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #e8ecf5;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  background: #253052;
  margin-bottom: 3px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: #2f3d66; }
.nav-item.top-level { font-weight: 600; }
.nav-item.group-head { font-weight: 600; }
.nav-item .arrow {
  font-size: 11px;
  color: #aeb8d6;
  transition: transform .2s;
}
.nav-item.group-head.collapsed .arrow { transform: rotate(-90deg); }
.nav-children { overflow: hidden; }
.nav-children.collapsed { display: none; }
.nav-item.child { padding-left: 34px; font-size: 14px; font-weight: 400; background: #202b4b; }
.nav-item.child:hover { background: #2a3760; }

.nav-item.active,
.nav-item.group-head.active,
.nav-item.child.active { background: #2f7bff; color: #fff; }
.nav-item.active:hover { background: #2f7bff; }
.nav-item .dev-badge {
  font-size: 10px;
  color: #8fa3cf;
  border: 1px solid #3d4a74;
  border-radius: 8px;
  padding: 1px 6px;
  line-height: 1.4;
}
.nav-item.active .dev-badge { color: #dbe7ff; border-color: rgba(255,255,255,.4); }

.content { flex: 1; min-width: 0; background: #eef0f4; position: relative; }
.content iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #eef0f4;
}
.dev-view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #98a0ad;
  background: #eef0f4;
}
.dev-view.show { display: flex; }
.dev-view .dev-title { font-size: 20px; color: #6b7280; font-weight: 600; letter-spacing: 2px; }
.dev-view .dev-sub { font-size: 13px; color: #a6adb8; }

/* ===== 导出记录弹窗（账号菜单入口，两端同一套） ===== */
.xr-mask { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; background: rgba(17, 24, 39, .38); }
/* display:flex 会压过 UA 的 [hidden]{display:none}，不补这条弹窗关不掉 */
.xr-mask[hidden] { display: none !important; }
.xr-empty[hidden] { display: none !important; }
.xr-box { width: 660px; max-width: 94vw; max-height: 82vh; display: flex; flex-direction: column; border-radius: 10px; background: #fff; overflow: hidden; font-size: 13px; box-shadow: 0 16px 48px rgba(15, 23, 42, .22); }
.xr-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #eef0f4; }
.xr-title { font-size: 15px; font-weight: 600; color: #1a1d24; }
.xr-close { width: 26px; height: 26px; border: none; border-radius: 6px; background: transparent; color: #9aa0ab; font-size: 19px; line-height: 1; cursor: pointer; }
.xr-close:hover { background: #f2f4f7; color: #5a6270; }
.xr-body { flex: 1; min-height: 0; overflow: auto; padding: 0 18px; }
.xr-table { width: 100%; border-collapse: collapse; }
.xr-table th { position: sticky; top: 0; z-index: 1; padding: 11px 6px; background: #fff; border-bottom: 1px solid #eef0f4; font-size: 12px; font-weight: 500; color: #8a919c; text-align: left; white-space: nowrap; }
.xr-table td { padding: 11px 6px; border-bottom: 1px solid #f4f6f9; color: #333; vertical-align: middle; }
.xr-table .xr-c-s { width: 96px; }
.xr-table .xr-c-n { width: 76px; }
.xr-table .xr-c-t { width: 104px; }
.xr-table .xr-c-a { width: 56px; }
.xr-name { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-state { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11.5px; line-height: 17px; white-space: nowrap; }
.xr-state.doing { background: #eef5ff; color: #1667dc; }
.xr-state.ok { background: #eafaf1; color: #12a15a; }
.xr-state.fail { background: #fdeeee; color: #d64545; }
.xr-num, .xr-time { font-variant-numeric: tabular-nums; }
.xr-num { color: #4a5058; }
.xr-time { color: #6b7280; }
.xr-link { padding: 0; border: none; background: none; color: #1667dc; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.xr-link:hover { text-decoration: underline; }
.xr-muted { color: #c0c5cd; }
.xr-empty { padding: 46px 0; text-align: center; color: #98a0ad; }
.xr-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 14px; border-top: 1px solid #eef0f4; }
.xr-tip { font-size: 12px; color: #98a0ab; }
.xr-pager { display: inline-flex; align-items: center; gap: 8px; }
.xr-pg { height: 26px; padding: 0 10px; border: 1px solid #dfe3ea; border-radius: 6px; background: #fff; color: #4a5058; font-size: 12px; font-family: inherit; cursor: pointer; }
.xr-pg:hover:not([disabled]) { border-color: #1667dc; color: #1667dc; }
.xr-pg[disabled] { opacity: .5; cursor: default; }
.xr-pgno { font-size: 12px; color: #4a5058; font-variant-numeric: tabular-nums; }
