:root {
  --green: #20bf6b;
  --green-dark: #11a85a;
  --ink: #2d3138;
  --muted: #898f98;
  --line: #e6e9ed;
  --panel: #fff;
  --soft-blue: #edf8ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--ink);
  background: #f5f7f9;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.baoku-page { min-width: 1080px; overflow: hidden; }
.baoku-wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.baoku-header {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid #eef0f2;
  box-shadow: 0 2px 12px rgba(41, 50, 61, .04);
  position: relative;
  z-index: 5;
}
.baoku-header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.baoku-logo { display: flex; align-items: center; width: 190px; gap: 10px; flex: none; }
.baoku-logo-image {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 9px;
  object-fit: contain;
  background: #fff;
}
.baoku-logo-mark { width: 39px; height: 39px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; transform: rotate(3deg); }
.baoku-logo-mark i { border-radius: 11px 3px 11px 3px; display: block; }
.baoku-logo-mark i:nth-child(1) { background: #20c38b; }
.baoku-logo-mark i:nth-child(2) { background: #2cbcf1; transform: rotate(90deg); }
.baoku-logo-mark i:nth-child(3) { background: #f3b725; transform: rotate(90deg); }
.baoku-logo-mark i:nth-child(4) { background: #f08b35; }
.baoku-logo-copy { display: flex; flex-direction: column; line-height: 1.2; }
.baoku-logo-copy strong { font-size: 17px; white-space: nowrap; }
.baoku-logo-copy small {
  color: #727b85;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .04em;
  margin-top: 3px;
}
.baoku-nav { height: 100%; display: flex; align-items: center; gap: 33px; flex: 1; }
.baoku-nav a { height: 100%; display: flex; align-items: center; border-bottom: 3px solid transparent; font-size: 15px; color: #565b62; white-space: nowrap; }
.baoku-nav a:hover, .baoku-nav a.active { color: #1d1f22; border-bottom-color: var(--green); }
.baoku-search { width: 278px; height: 36px; display: grid; grid-template-columns: 1fr 64px; background: #f6f7f8; }
.baoku-search input { min-width: 0; border: 1px solid #f0f1f2; background: transparent; padding: 0 13px; outline: none; color: #555; }
.baoku-search button { border: 0; color: #fff; background: var(--green); cursor: pointer; }
.baoku-search button:hover { background: var(--green-dark); }
.baoku-safe-link { white-space: nowrap; font-size: 13px; color: #555; }
.baoku-safe-link span { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #ffd52d, #21c169); font-weight: bold; margin-right: 4px; }

.baoku-main { height: calc(100vh - 62px); min-height: 650px; display: flex; flex-direction: column; }
.baoku-hero {
  height: 260px;
  flex: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), transparent 30%),
    linear-gradient(115deg, #eefaff 0%, #eaf7ff 44%, #f5fbff 100%);
  overflow: hidden;
}
.baoku-hero-inner { height: 100%; display: flex; align-items: center; justify-content: center; gap: 72px; }
.baoku-hero-art {
  width: 450px;
  height: 224px;
  position: relative;
  overflow: visible;
}
.baoku-hero-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 38% center;
  transform: scale(1.03);
  filter: saturate(.94) contrast(.98);
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 46% 50%, #000 54%, rgba(0,0,0,.92) 68%, rgba(0,0,0,.5) 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 88% 82% at 46% 50%, #000 54%, rgba(0,0,0,.92) 68%, rgba(0,0,0,.5) 82%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.mock-window { position: absolute; width: 330px; height: 190px; left: 0; top: 14px; background: #fff; border: 1px solid #dcebf2; box-shadow: 0 18px 34px rgba(74, 139, 173, .18); }
.mock-top { height: 35px; background: linear-gradient(90deg, #20c476, #20d8a7); display: flex; align-items: center; gap: 14px; padding: 0 12px; }
.mock-top span { width: 28px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.7); }
.mock-side { position: absolute; top: 35px; bottom: 0; width: 74px; background: #f5fafb; padding: 15px 12px; }
.mock-side b { height: 7px; display: block; margin-bottom: 14px; background: #d8e7e7; border-radius: 5px; }
.mock-content { margin-left: 74px; padding: 18px 16px; }
.mock-title { width: 68px; height: 8px; background: #2fd08b; margin-bottom: 12px; }
.mock-app { height: 34px; border-top: 1px solid #eef2f2; display: grid; grid-template-columns: 29px 1fr 36px; gap: 8px; align-items: center; }
.mock-app i { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: #29bd78; color: #fff; font-size: 8px; font-style: normal; }
.mock-app span { height: 6px; background: #e1e8e8; border-radius: 5px; }
.mock-app button { border: 0; color: #1eb86a; background: #eafff4; font-size: 9px; padding: 4px 2px; }
.mock-person { position: absolute; right: -42px; bottom: -10px; width: 100px; height: 130px; border-radius: 48px 48px 18px 18px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 42px; background: linear-gradient(145deg, #51baff, #537df1); box-shadow: -10px 15px 28px rgba(44, 115, 194, .22); }
.baoku-hero-copy { width: 510px; }
.baoku-hero-copy p { margin: 0 0 7px; font-size: 18px; }
.baoku-hero-copy h1 { margin: 0 0 10px; font-size: 32px; letter-spacing: -1px; }
.baoku-install { width: 238px; height: 54px; display: flex; align-items: center; justify-content: center; gap: 15px; color: #fff; background: linear-gradient(90deg, #20d679, #16c66b); font-size: 23px; font-weight: bold; box-shadow: 0 9px 18px rgba(32, 191, 107, .2); }
.baoku-install:hover { transform: translateY(-1px); }
.baoku-install span { font-size: 31px; font-family: sans-serif; line-height: 1; }
.baoku-hero-copy small { display: block; color: #686e75; margin-top: 0; }

.baoku-dashboard { flex: 1; min-height: 0; display: grid; grid-template-columns: 268px minmax(0, 1fr) 265px; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.baoku-panel { min-height: 0; background: var(--panel); border: 1px solid #e1e5e9; display: flex; flex-direction: column; }
.baoku-panel-title { height: 55px; flex: none; border-bottom: 1px solid var(--line); padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.baoku-panel-title > div { display: flex; align-items: baseline; gap: 10px; }
.baoku-panel-title h2 { margin: 0; font-size: 19px; }
.baoku-panel-title span, .baoku-panel-title a { color: #7d858e; font-size: 12px; font-weight: 500; }
.baoku-category-list { padding: 10px 14px; flex: 1; min-height: 0; }
.baoku-category-list a { height: 38px; border-radius: 3px; display: grid; grid-template-columns: 28px 1fr 16px; align-items: center; padding: 0 9px; color: #575d64; font-size: 14px; }
.baoku-category-list a:hover, .baoku-category-list a.active { background: #effcf5; color: #14ae5c; }
.baoku-category-list svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #15b866;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.baoku-category-list svg use[href$="#all"],
.baoku-category-list svg use[href$="#windows"] {
  fill: #15b866;
  stroke: none;
}
.baoku-category-list i { color: #bbb; font-style: normal; }
.baoku-submit { background: linear-gradient(135deg, #f4fff9, #edf9ff); padding: 13px 15px; margin: 0 14px 14px; display: grid; gap: 5px; }
.baoku-submit strong { font-size: 13px; }
.baoku-submit span { color: #6f7983; font-size: 12px; font-weight: 500; line-height: 1.5; }
.baoku-submit b { color: #15ad5e; font-size: 13px; letter-spacing: .03em; }

.baoku-software { overflow: hidden; }
.baoku-app-grid { padding: 16px 20px 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; flex: 1; min-height: 0; align-content: start; }
.baoku-app { min-width: 0; height: 85px; display: grid; grid-template-columns: 55px minmax(0, 1fr) 66px; gap: 12px; align-items: center; padding: 8px; border-radius: 4px; }
.baoku-app:hover { background: #f7fafb; }
.baoku-app-icon, .rank-icon { background: linear-gradient(145deg, var(--app-color), #55b8ec); overflow: hidden; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; }
.baoku-app-icon { width: 55px; height: 55px; border-radius: 12px; box-shadow: 0 5px 12px color-mix(in srgb, var(--app-color) 25%, transparent); }
.baoku-app-icon img, .rank-icon img { width: 100%; height: 100%; object-fit: cover; }
.baoku-app-info { min-width: 0; }
.baoku-app-info h3 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.baoku-app-info small { display: block; margin-top: 8px; color: #858e98; font-size: 11px; font-weight: 500; }
.baoku-app-actions { display: grid; gap: 5px; opacity: 0; transition: .15s; }
.baoku-app:hover .baoku-app-actions,
.baoku-app:focus-within .baoku-app-actions { opacity: 1; }
.baoku-app-actions a,
.baoku-detail-btn {
  height: 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
}
.baoku-detail-btn { border: 1px solid #d9e0e4; color: #64717c; background: #f7f9fa; }
.baoku-app-actions a { border: 1px solid #21be6b; color: #fff; background: #19b862; }
.baoku-pager { height: 38px; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 0 20px; border-top: 1px solid #f1f2f3; font-size: 11px; color: #999; }
.baoku-pager a { padding: 4px 9px; border: 1px solid #ddd; color: #666; }
.baoku-empty { margin: auto; color: #999; font-size: 13px; }

.baoku-ranking-list { padding: 5px 13px; flex: 1; min-height: 0; overflow: hidden; }
.baoku-ranking-list > a { min-width: 0; height: 55px; display: grid; grid-template-columns: 25px 38px minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-bottom: 1px solid #f0f1f2; }
.baoku-ranking-list > a:last-child { border-bottom: 0; }
.baoku-ranking-list > a > b { width: 22px; height: 25px; display: flex; align-items: center; justify-content: center; color: #fff; background: #c7cdd3; clip-path: polygon(50% 0, 100% 24%, 88% 82%, 50% 100%, 12% 82%, 0 24%); font-size: 11px; }
.baoku-ranking-list .rank-1 { background: #ffc42b; }
.baoku-ranking-list .rank-2 { background: #aab8c5; }
.baoku-ranking-list .rank-3 { background: #ff9a47; }
.rank-icon { width: 38px; height: 38px; border-radius: 9px; font-size: 8px; }
.rank-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: normal; }
.rank-copy small { color: #7f8993; font-size: 11px; font-weight: 500; }
.baoku-ranking-list > a > i { color: #15b962; font-size: 11px; font-style: normal; opacity: 0; }
.baoku-ranking-list > a:hover > i { opacity: 1; }
.baoku-modal[hidden] { display: none !important; }
.modal-open { overflow: hidden; }
.baoku-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.baoku-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 34, 45, .46); backdrop-filter: blur(5px); }
.baoku-modal-card {
  width: min(500px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(28, 55, 72, .2);
  position: relative;
  animation: baoku-modal-in .18s ease-out;
}
.baoku-modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: #70808c; background: #f1f4f5; cursor: pointer; font-size: 20px; }
.baoku-modal-kicker { color: #16aa5b; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.baoku-modal-card h2 { margin: 8px 42px 12px 0; font-size: 23px; }
.baoku-modal-card > p { margin: 0; color: #65727e; font-size: 14px; line-height: 1.8; }
.baoku-modal-meta { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e9edef; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.baoku-modal-meta span { display: grid; gap: 5px; }
.baoku-modal-meta b { color: #929ba3; font-size: 11px; font-weight: 500; }
.baoku-modal-meta i { color: #344454; font-size: 13px; font-style: normal; font-weight: 600; }
@keyframes baoku-modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-height: 820px) {
  .baoku-hero { height: 225px; }
  .baoku-hero-art { transform: scale(.9); }
  .baoku-dashboard { padding-top: 12px; padding-bottom: 12px; }
  .baoku-app { height: 72px; }
  .baoku-app-icon { width: 48px; height: 48px; }
  .baoku-ranking-list > a { height: 48px; }
}

@media (max-width: 1080px) {
  .baoku-page { min-width: 0; overflow: auto; }
  .baoku-main { height: auto; min-height: calc(100vh - 62px); }
  .baoku-nav { display: none; }
  .baoku-search { margin-left: auto; }
  .baoku-hero-inner { gap: 25px; }
  .baoku-hero-copy { width: 46%; }
  .baoku-dashboard { grid-template-columns: 230px minmax(0, 1fr); }
  .baoku-ranking { display: none; }
}

@media (max-width: 720px) {
  .baoku-wrap { width: calc(100% - 24px); }
  .baoku-header { height: auto; }
  .baoku-header-inner { padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .baoku-logo { width: 100%; }
  .baoku-search { width: calc(100% - 105px); margin: 0; }
  .baoku-main { min-height: 0; }
  .baoku-hero { height: 240px; }
  .baoku-hero-art { display: none; }
  .baoku-hero-copy { width: 100%; text-align: center; }
  .baoku-hero-copy h1 { font-size: 27px; }
  .baoku-install { margin: 0 auto; }
  .baoku-dashboard { display: block; padding: 12px 0; }
  .baoku-category { margin-bottom: 12px; }
  .baoku-category-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .baoku-submit { display: none; }
  .baoku-software { min-height: 520px; }
  .baoku-app-grid { grid-template-columns: 1fr; }
  .baoku-app-actions { opacity: 1; }
}

/* Admin console */
.admin-body {
  --admin-green: #18b566;
  --admin-green-dark: #0f9651;
  --admin-ink: #16243a;
  --admin-muted: #7b8797;
  --admin-border: #e4e9ed;
  min-width: 1120px;
  height: 100vh;
  overflow: hidden;
  color: var(--admin-ink);
  background: #f4f7f8;
}
.admin-body button,
.admin-body input,
.admin-body select,
.admin-body textarea { font-family: inherit; }
.admin-shell { height: 100%; display: grid; grid-template-columns: 208px minmax(0, 1fr); }
.admin-sidebar {
  min-height: 0;
  padding: 0 13px 18px;
  color: #dbe7e3;
  background: #18292f;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 24px rgba(23, 39, 45, .08);
  z-index: 2;
}
.admin-brand {
  height: 72px;
  padding: 0 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex;
  align-items: center;
  gap: 11px;
}
.admin-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #22d377, #0ca75a);
  box-shadow: 0 7px 16px rgba(15, 181, 97, .22);
  font-weight: 800;
  font-size: 13px;
}
.admin-brand-copy { min-width: 0; display: flex; flex-direction: column; }
.admin-brand-copy strong { color: #fff; font-size: 15px; }
.admin-brand-copy small { margin-top: 4px; color: #748d86; font-size: 8px; letter-spacing: .12em; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a {
  height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: #b8c8c4;
  font-size: 13px;
  transition: background .16s, color .16s, transform .16s;
}
.admin-sidebar nav a::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 11px;
  border: 2px solid #658079;
  border-radius: 50%;
}
.admin-sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-sidebar nav a.on {
  color: #fff;
  background: var(--admin-green);
  box-shadow: 0 8px 18px rgba(24, 181, 102, .18);
}
.admin-sidebar nav a.on::before { border-color: #fff; background: #fff; }
.admin-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.admin-head {
  height: 72px;
  flex: 0 0 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255,255,255,.97);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-head > div { display: flex; align-items: center; gap: 13px; }
.admin-head-eyebrow {
  padding: 5px 7px;
  border-radius: 4px;
  color: var(--admin-green-dark);
  background: #eaf9f1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.admin-head h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.admin-head p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6f7c8c;
  font-size: 12px;
}
.admin-head p i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--admin-green);
  box-shadow: 0 0 0 4px rgba(24,181,102,.12);
}
.admin-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 24px;
  scrollbar-color: #cbd5d9 transparent;
  scrollbar-width: thin;
}
.admin-content::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-content::-webkit-scrollbar-thumb { border-radius: 10px; background: #cbd5d9; }
.panel {
  margin: 0 0 16px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(27, 53, 67, .045);
}
.panel-head {
  min-height: 55px;
  padding: 0 18px;
  border-bottom: 1px solid #edf0f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: var(--admin-green);
}
.panel-head h2,
.panel-head h3 { margin: 0 auto 0 0; font-size: 16px; }
.admin-stats {
  margin: 0;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: #fbfcfd;
}
.admin-stats > div {
  min-height: 78px;
  padding: 13px 15px;
  border: 1px solid #e7ecef;
  border-radius: 9px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.admin-stats > div::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(24,181,102,.06);
}
.admin-stats b { display: block; margin-bottom: 5px; color: var(--admin-green-dark); font-size: 23px; line-height: 1; }
.admin-stats span { color: var(--admin-muted); font-size: 11px; }
.row { display: flex; align-items: center; gap: 10px; }
.inline { display: inline-flex; align-items: center; gap: 7px; }
.filterbar {
  padding: 10px 18px;
  border-top: 1px solid #edf0f2;
  border-bottom: 1px solid #edf0f2;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.filterbar a {
  padding: 6px 10px;
  border: 1px solid #e6eaed;
  border-radius: 6px;
  color: #667383;
  background: #fff;
  font-size: 11px;
}
.filterbar a:hover { color: var(--admin-green-dark); border-color: #bde6cf; }
.filterbar a.on { color: #fff; border-color: var(--admin-green); background: var(--admin-green); }
.panel > .meta {
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid #edf0f2;
  color: #7b8797;
  background: #f8fafb;
  font-size: 11px;
}
.input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e0e4;
  border-radius: 6px;
  background: #fff;
  color: #34404b;
  outline: none;
  font-size: 12px;
}
textarea.input { height: auto; min-height: 76px; padding-top: 9px; resize: vertical; }
.input:focus { border-color: var(--admin-green); box-shadow: 0 0 0 3px rgba(24,181,102,.09); }
.btn {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--admin-green);
  border-radius: 6px;
  color: #fff;
  background: var(--admin-green);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}
.btn:hover { border-color: var(--admin-green-dark); background: var(--admin-green-dark); }
.btn.light { color: #11864b; border-color: #bce7cf; background: #effaf4; }
.btn.gray { color: #596573; border-color: #d9e0e4; background: #f5f7f8; }
.btn.red,
.btn.danger { color: #fff; border-color: #e35e63; background: #e9686d; }
.btn.mini { min-height: 27px; padding: 0 8px; font-size: 10px; }
.notice {
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid #bfe8d1;
  border-radius: 8px;
  color: #117b46;
  background: #effbf4;
}
.notice.danger { color: #a43b3b; border-color: #efc4c4; background: #fff2f2; }
.table-wrap { width: 100%; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 11px; }
.table th {
  height: 38px;
  padding: 7px 10px;
  color: #768393;
  background: #f6f8f9;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
}
.table td {
  height: 60px;
  padding: 8px 10px;
  border-top: 1px solid #edf0f2;
  vertical-align: middle;
  color: #405061;
}
.table tr:hover td { background: #f9fcfa; }
.actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.mini-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #e4e9ec;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--logo-color, #20b96a), #55b8ec);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
.mini-logo img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mini-logo span { max-width: 34px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-logo-large { width: 52px; height: 52px; flex-basis: 52px; border-radius: 12px; font-size: 11px; }
.ai-cell { max-width: 250px; line-height: 1.4; color: #6e7780; }
.resource-table { table-layout: fixed; min-width: 1060px; }
.resource-table th:nth-child(1) { width: 56px; }
.resource-table th:nth-child(2) { width: 180px; }
.resource-table th:nth-child(3) { width: 118px; }
.resource-table th:nth-child(4) { width: 126px; }
.resource-table th:nth-child(5) { width: 88px; }
.resource-table th:nth-child(6) { width: 220px; }
.resource-table th:nth-child(7) { width: 132px; }
.resource-table th:nth-child(8) { width: 112px; }
.resource-table td { overflow: hidden; }
.resource-name b,
.resource-name .meta { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.resource-name b { color: #243347; font-size: 12px; }
.resource-name .meta { margin-top: 5px; color: #8b95a0; }
.resource-table .inline { max-width: 100%; }
.resource-table .logo-path-input { width: 138px; min-width: 0; }
.resource-table .actions { align-content: center; }
.resource-table .actions .btn { min-height: 27px; padding: 0 8px; font-size: 10px; }
.type-logo-table { table-layout: fixed; }
.type-logo-table th:nth-child(1) { width: 110px; }
.type-logo-table th:nth-child(2) { width: 100px; }
.type-logo-table td { vertical-align: top; }
.type-logo-table td:nth-child(1),
.type-logo-table td:nth-child(2) { padding-top: 18px; }
.tag-ok,
.tag-warn,
.tag-danger {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  white-space: nowrap;
}
.tag-ok { color: #13854c; background: #eaf9f1; }
.tag-warn { color: #9a6a12; background: #fff5dd; }
.tag-danger { color: #b14545; background: #fff0f0; }
.pager {
  min-height: 46px;
  padding: 8px 16px;
  border-top: 1px solid #edf0f2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #889199;
  font-size: 11px;
}
.pager a {
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid #dce2e5;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.pager a:hover { color: var(--admin-green-dark); border-color: #bde6cf; }
.pager a.on { color: #fff; border-color: var(--admin-green); background: var(--admin-green); }
.admin-login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; }
.admin-login {
  width: 390px;
  padding: 38px;
  border: 1px solid #e0e6e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(27, 48, 68, .12);
}
.admin-login::before {
  content: "";
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff url("brand-logo.png") center / contain no-repeat;
}
.admin-login h2 { margin: 0 0 24px; text-align: center; font-size: 22px; }
.admin-login .input { width: 100%; margin-bottom: 14px; }
.admin-login .btn { width: 100%; }

@media (max-width: 1280px) {
  .admin-shell { grid-template-columns: 188px minmax(0, 1fr); }
  .admin-content { padding: 14px; }
  .admin-head { padding: 0 18px; }
  .admin-stats { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}

/* Rebuilt admin UI */
.nx-body {
  --nx-green: #18b566;
  --nx-green-dark: #0b9650;
  --nx-text: #182337;
  --nx-muted: #7d8998;
  --nx-border: #e4e9ed;
  min-width: 1180px;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--nx-text);
  background: #f4f7f8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.nx-body button,
.nx-body input,
.nx-body select,
.nx-body textarea { font: inherit; }
.nx-app { height: 100%; display: grid; grid-template-columns: 214px minmax(0, 1fr); }
.nx-side {
  min-height: 0;
  padding: 0 14px 18px;
  background: #17282e;
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 22px rgba(20, 42, 49, .08);
  position: relative;
  z-index: 2;
}
.nx-brand {
  height: 76px;
  margin-bottom: 15px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}
.nx-brand-image {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}
.nx-brand-logo { width: 38px; height: 38px; flex: 0 0 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; transform: rotate(3deg); }
.nx-brand-logo i { display: block; border-radius: 10px 3px 10px 3px; }
.nx-brand-logo i:nth-child(1) { background: #21c38c; }
.nx-brand-logo i:nth-child(2) { background: #2ebcf0; transform: rotate(90deg); }
.nx-brand-logo i:nth-child(3) { background: #f2b62b; transform: rotate(90deg); }
.nx-brand-logo i:nth-child(4) { background: #ef8b37; }
.nx-brand > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.nx-brand strong { font-size: 15px; }
.nx-brand small { margin-top: 4px; color: #789089; font-size: 10px; }
.nx-nav { display: grid; gap: 6px; }
.nx-nav a {
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #b9cac5;
  font-size: 13px;
  transition: .16s ease;
}
.nx-nav a b {
  width: 25px;
  height: 25px;
  border: 1px solid #526b65;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #80958f;
  font-size: 10px;
}
.nx-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nx-nav a.on { color: #fff; background: var(--nx-green); box-shadow: 0 8px 18px rgba(24,181,102,.18); }
.nx-nav a.on b { color: #fff; border-color: rgba(255,255,255,.55); }
.nx-side-bottom { margin-top: auto; display: grid; gap: 5px; }
.nx-side-bottom a {
  height: 39px;
  padding: 0 12px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8ea29c;
  font-size: 12px;
}
.nx-side-bottom a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nx-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.nx-top {
  height: 76px;
  flex: 0 0 76px;
  padding: 0 22px;
  border-bottom: 1px solid var(--nx-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nx-top > div:first-child { display: flex; align-items: center; gap: 13px; }
.nx-top small { padding: 5px 7px; border-radius: 4px; color: var(--nx-green-dark); background: #eaf9f1; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.nx-top h1 { margin: 0; font-size: 19px; }
.nx-top-actions { display: flex; align-items: center; gap: 12px; }
.nx-health { color: #71808e; font-size: 11px; }
.nx-health i { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; display: inline-block; background: var(--nx-green); box-shadow: 0 0 0 4px rgba(24,181,102,.1); }
.nx-top-actions a { padding: 8px 12px; border: 1px solid #dce3e6; border-radius: 6px; color: #52616e; font-size: 11px; }
.nx-content { flex: 1; min-height: 0; padding: 16px 18px 18px; overflow: auto; }
.nx-notice { margin-bottom: 10px; padding: 10px 13px; border: 1px solid #bfe7d0; border-radius: 8px; color: #107b45; background: #effaf4; font-size: 12px; }
.nx-notice.error { color: #a63f43; border-color: #efc7c9; background: #fff2f2; }
.nx-stats { height: 92px; margin-bottom: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.nx-stats article {
  padding: 13px 16px;
  border: 1px solid var(--nx-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(25, 50, 63, .035);
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  position: relative;
  overflow: hidden;
}
.nx-stats article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--nx-green); }
.nx-stats span { color: #64717f; font-size: 11px; }
.nx-stats strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--nx-green-dark); font-size: 27px; line-height: 1; }
.nx-stats strong.warn { color: #e16a4a; }
.nx-stats small { margin-top: 7px; color: #a0a8b0; font-size: 9px; }
.nx-workspace { height: calc(100vh - 196px); min-height: 560px; display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 12px; }
.nx-card { border: 1px solid var(--nx-border); border-radius: 10px; background: #fff; box-shadow: 0 7px 24px rgba(25, 50, 63, .04); overflow: hidden; }
.nx-card-head { height: 53px; padding: 0 16px; border-bottom: 1px solid #edf0f2; display: flex; align-items: center; justify-content: space-between; }
.nx-card-head > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.nx-card-head h2 { margin: 0; font-size: 15px; }
.nx-card-head span { color: #96a0aa; font-size: 10px; }
.nx-resource-card { min-width: 0; display: flex; flex-direction: column; }
.nx-toolbar { height: 48px; flex: 0 0 48px; padding: 0 14px; background: #fafcfc; border-bottom: 1px solid #edf0f2; display: flex; align-items: center; justify-content: space-between; }
.nx-toolbar > span { color: #9aa3ac; font-size: 9px; }
.nx-filters { display: flex; gap: 6px; }
.nx-filters a { padding: 6px 9px; border: 1px solid #e1e6e9; border-radius: 5px; color: #677582; background: #fff; font-size: 10px; }
.nx-filters a b { margin-left: 3px; font-weight: normal; }
.nx-filters a.on { color: #fff; border-color: var(--nx-green); background: var(--nx-green); }
.nx-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.nx-table { width: 100%; min-width: 1050px; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.nx-table th { height: 34px; padding: 6px 9px; color: #7b8794; background: #f5f7f8; text-align: left; font-weight: 600; }
.nx-table td { height: 62px; padding: 7px 9px; border-top: 1px solid #edf0f2; vertical-align: middle; color: #40505f; overflow: hidden; }
.nx-table tr:hover td { background: #f9fcfa; }
.nx-table th:nth-child(1) { width: 230px; }
.nx-table th:nth-child(2) { width: 90px; }
.nx-table th:nth-child(3) { width: 82px; }
.nx-table th:nth-child(4) { width: 70px; }
.nx-table th:nth-child(5) { width: 190px; }
.nx-table th:nth-child(6) { width: 88px; }
.nx-table th:nth-child(7) { width: 90px; }
.nx-table td > small { margin-top: 5px; display: block; color: #929ca6; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-software { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 9px; align-items: center; }
.nx-software > span:last-child { min-width: 0; }
.nx-software strong,
.nx-software small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-software strong { color: #263648; font-size: 11px; }
.nx-software small { margin-top: 5px; color: #8c97a2; font-size: 8px; }
.nx-logo,
.nx-rank-logo,
.nx-type-preview { overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, var(--logo), #4fb9ec); font-weight: 700; }
.nx-logo { width: 40px; height: 40px; border: 1px solid #e2e8eb; border-radius: 10px; font-size: 8px; }
.nx-logo img,
.nx-rank-logo img,
.nx-type-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.nx-tag { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 8px; }
.nx-tag.ok { color: #11804a; background: #eaf9f1; }
.nx-tag.bad { color: #b54b4f; background: #fff0f0; }
.nx-category { color: #526273; white-space: nowrap; }
.nx-logo-form { display: grid; grid-template-columns: minmax(0, 1fr) 27px 27px; gap: 5px; }
.nx-logo-form input { min-width: 0; height: 28px; padding: 0 7px; border: 1px solid #dbe2e5; border-radius: 5px; outline: none; font-size: 9px; }
.nx-logo-form input:focus { border-color: var(--nx-green); }
.nx-icon-btn { width: 27px; height: 28px; padding: 0; border: 1px solid #c9e8d7; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #148c50; background: #effaf4; cursor: pointer; font-size: 11px; }
.nx-text-btn { padding: 5px 8px; border: 1px solid #bde6cf; border-radius: 5px; color: #13864d; background: #effaf4; cursor: pointer; font-size: 9px; }
.nx-actions { display: flex; gap: 5px; align-items: center; }
.nx-actions a,
.nx-actions button { padding: 5px 7px; border: 0; border-radius: 5px; color: #fff; background: var(--nx-green); cursor: pointer; font-size: 9px; white-space: nowrap; }
.nx-actions button { background: #ea6a6f; }
.nx-pager { height: 45px; flex: 0 0 45px; padding: 0 14px; border-top: 1px solid #edf0f2; display: flex; align-items: center; justify-content: space-between; }
.nx-pager > span { color: #939da6; font-size: 9px; }
.nx-pager > div { display: flex; gap: 4px; }
.nx-pager a { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid #dce3e6; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #64717d; font-size: 9px; }
.nx-pager a.on { color: #fff; border-color: var(--nx-green); background: var(--nx-green); }
.nx-btn { min-height: 33px; padding: 0 13px; border: 1px solid var(--nx-green); border-radius: 6px; color: #fff; background: var(--nx-green); cursor: pointer; font-weight: 600; font-size: 11px; }
.nx-btn:hover { border-color: var(--nx-green-dark); background: var(--nx-green-dark); }
.nx-btn.ghost { color: #12854b; border-color: #bce6ce; background: #effaf4; }
.nx-rank-card { display: flex; flex-direction: column; }
.nx-rank-list { flex: 1; min-height: 0; padding: 5px 12px; overflow: hidden; }
.nx-rank-list > p { color: #999; text-align: center; font-size: 11px; }
.nx-rank-row { height: 57px; display: grid; grid-template-columns: 20px 36px minmax(0, 1fr) 32px; gap: 7px; align-items: center; border-bottom: 1px solid #edf0f2; }
.nx-rank-row:last-child { border-bottom: 0; }
.nx-rank-row > b { color: #a0a9b1; text-align: center; font-size: 10px; }
.nx-rank-row > b.top { color: #f49b31; font-size: 13px; }
.nx-rank-logo { width: 36px; height: 36px; border-radius: 9px; font-size: 7px; }
.nx-rank-row > span:nth-child(3) { min-width: 0; }
.nx-rank-row strong,
.nx-rank-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-rank-row strong { color: #344456; font-size: 10px; }
.nx-rank-row small { margin-top: 4px; color: #98a2ab; font-size: 8px; }
.nx-rank-row em { color: var(--nx-green-dark); text-align: right; font-style: normal; font-size: 10px; }
.nx-form-card { max-width: 980px; }
.nx-form { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nx-form label { display: grid; gap: 7px; color: #536171; font-size: 11px; }
.nx-form label.wide,
.nx-form-actions.wide { grid-column: 1 / -1; }
.nx-form input,
.nx-form textarea,
.nx-form select,
.nx-type-grid input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #dbe2e5;
  border-radius: 6px;
  color: #344354;
  background: #fff;
  outline: none;
  font-size: 11px;
}
.nx-form textarea { height: 100px; padding-top: 10px; resize: vertical; }
.nx-form input:focus,
.nx-form textarea:focus,
.nx-type-grid input:focus { border-color: var(--nx-green); box-shadow: 0 0 0 3px rgba(24,181,102,.08); }
.nx-form-actions { padding-top: 5px; display: flex; gap: 9px; align-items: center; }
.nx-cancel,
.nx-back { color: #697683; font-size: 11px; }
.nx-two-cards { max-width: 1040px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.nx-scan-card { padding: 34px; text-align: center; }
.nx-scan-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--nx-green); font-size: 27px; }
.nx-scan-card h2 { margin: 0 0 10px; font-size: 17px; }
.nx-scan-card p { margin: 0 0 20px; color: #7c8793; line-height: 1.7; font-size: 11px; }
.nx-type-card { max-width: 1200px; }
.nx-type-grid { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nx-type-grid article { padding: 14px; border: 1px solid #e5eaed; border-radius: 9px; background: #fbfcfc; }
.nx-type-preview { width: 50px; height: 50px; float: left; margin-right: 11px; border-radius: 12px; font-size: 9px; }
.nx-type-title { height: 50px; display: flex; flex-direction: column; justify-content: center; }
.nx-type-title strong { font-size: 15px; }
.nx-type-title span { margin-top: 4px; color: #939da6; font-size: 9px; }
.nx-type-grid form { clear: both; padding-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.nx-type-grid form input:nth-of-type(3),
.nx-type-grid form input[type="file"],
.nx-type-grid form .nx-btn { grid-column: 1 / -1; }
.nx-type-grid input[type="file"] { padding: 7px; }
.nx-type-grid .nx-reset { border: 0; color: #79848e; background: transparent; cursor: pointer; font-size: 9px; text-align: left; }
.nx-empty { padding: 40px; border: 1px solid var(--nx-border); border-radius: 10px; color: #8e98a1; background: #fff; text-align: center; }

@media (max-width: 1380px) {
  .nx-app { grid-template-columns: 190px minmax(0, 1fr); }
  .nx-workspace { grid-template-columns: minmax(0, 1fr) 235px; }
  .nx-content { padding: 13px; }
  .nx-stats { gap: 8px; }
}

/* Admin font scale */
.nx-brand strong { font-size: 17px; }
.nx-brand small { font-size: 11px; }
.nx-nav a { font-size: 14px; }
.nx-nav a b { font-size: 11px; }
.nx-side-bottom a { font-size: 13px; }
.nx-top small { font-size: 9px; }
.nx-top h1 { font-size: 21px; }
.nx-health,
.nx-top-actions a { font-size: 12px; }
.nx-notice { font-size: 13px; }
.nx-stats span { font-size: 13px; }
.nx-stats strong { font-size: 29px; }
.nx-stats small { font-size: 11px; }
.nx-card-head h2 { font-size: 17px; }
.nx-card-head span { font-size: 12px; }
.nx-toolbar > span { font-size: 11px; }
.nx-filters a { font-size: 12px; }
.nx-table { font-size: 12px; }
.nx-table th { font-size: 12px; }
.nx-table td > small { font-size: 10px; }
.nx-software strong { font-size: 13px; }
.nx-software small { font-size: 10px; }
.nx-tag { font-size: 10px; }
.nx-category { font-size: 12px; }
.nx-logo-form input { font-size: 11px; }
.nx-icon-btn { font-size: 13px; }
.nx-text-btn { font-size: 11px; }
.nx-actions a,
.nx-actions button { font-size: 11px; }
.nx-pager > span,
.nx-pager a { font-size: 11px; }
.nx-btn { font-size: 12px; }
.nx-rank-row > b { font-size: 11px; }
.nx-rank-row > b.top { font-size: 14px; }
.nx-rank-row strong { font-size: 12px; }
.nx-rank-row small { font-size: 10px; }
.nx-rank-row em { font-size: 12px; }
.nx-form label { font-size: 13px; }
.nx-form input,
.nx-form textarea,
.nx-form select,
.nx-type-grid input { font-size: 12px; }
.nx-scan-card p { font-size: 12px; }
.nx-type-title strong { font-size: 16px; }
.nx-type-title span { font-size: 11px; }
.nx-type-grid .nx-reset,
.nx-back,
.nx-cancel { font-size: 11px; }
