:root {
  --navy: #16386e;
  --navy-2: #1d4a8a;
  --navy-soft: #eaf1fb;
  --ink: #16305c;
  --text: #333c4d;
  --text-2: #5c6678;
  --muted: #98a1b0;
  --line: #e8ebf1;
  --line-2: #dfe4ed;
  --bg: #eef1f5;
  --card: #ffffff;
  --green: #2f6b46;
  --green-bg: #eff7f1;
  --green-line: #d7e8db;
  --danger: #b4423a;
  --shadow-1: 0 1px 2px rgba(22, 48, 92, .04), 0 6px 18px rgba(22, 48, 92, .05);
  --shadow-2: 0 2px 4px rgba(22, 48, 92, .06), 0 14px 34px rgba(22, 48, 92, .10);
  --r: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
b { font-weight: 650; }
[hidden] { display: none !important; }

/* ───────────── 顶栏 ───────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1320px; margin: 0 auto; padding: 13px 26px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
  background: linear-gradient(150deg, #1d4a8a, #16386e);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(22, 56, 110, .25);
}
.mark svg { width: 20px; height: 20px; }
.brand-t h1 { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.brand-t p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.search {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 9px 0 10px; min-width: 232px;
  background: #f6f8fb; border: 1px solid var(--line-2); border-radius: 9px;
  transition: .15s;
}
.search:focus-within { background: #fff; border-color: #b9cdea; box-shadow: 0 0 0 3px rgba(29, 74, 138, .08); }
.search svg { width: 15px; height: 15px; color: #9aa5b6; flex: 0 0 15px; }
.search input { border: 0; background: none; outline: none; width: 100%; font-size: 13px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  font-size: 10.5px; color: #a7b0c0; border: 1px solid #e4e8f0; border-radius: 4px;
  padding: 0 4px; background: #fff; white-space: nowrap;
}

.sel {
  height: 34px; padding: 0 26px 0 11px; font-size: 13px;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'><path d='M6 9.5l6 6 6-6' stroke='%239aa5b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
  outline: none; transition: .15s;
}
.sel:hover { border-color: #c4d2e6; }
.sel:focus { border-color: #b9cdea; box-shadow: 0 0 0 3px rgba(29, 74, 138, .08); }

.btn {
  height: 34px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: #fff; border-radius: 9px;
  font-size: 13px; color: var(--text); white-space: nowrap; transition: .15s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #c4d2e6; background: #fbfcfe; }
.btn:active { transform: translateY(.5px); }
.btn.solid {
  background: linear-gradient(160deg, #1d4a8a, #16386e);
  border-color: #16386e; color: #fff;
  box-shadow: 0 3px 10px rgba(22, 56, 110, .22);
}
.btn.solid:hover { background: linear-gradient(160deg, #235593, #1a3f79); }
.btn.ghost { padding: 0 9px; color: var(--text-2); }
.btn.mini, .mini {
  height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px;
  border: 1px solid #d7e1f0; background: #f4f8fe; color: var(--navy-2);
}
.btn.danger-ghost { border-color: #efdcd9; color: var(--danger); background: #fff; }
.btn.danger-ghost:hover { background: #fdf3f2; border-color: #e6c6c1; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.meta-bar {
  max-width: 1320px; margin: 0 auto; padding: 0 26px 11px;
  display: flex; align-items: center; gap: 14px;
}
.counts { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.counts b { color: var(--ink); font-weight: 700; }
.counts .sp { color: #d3d8e2; }
.meta-bar .tip { margin-left: auto; font-size: 11.5px; color: #aab2c0; }

/* ───────────── 卡片网格 ───────────── */
.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 26px 60px; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(336px, 1fr));
}

.card {
  position: relative; background: var(--card); border-radius: var(--r);
  padding: 26px 26px 24px; border: 1px solid #e7ebf2;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: default; outline: none;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #dbe3f0; }
.card:focus-visible { box-shadow: 0 0 0 3px rgba(29, 74, 138, .16), var(--shadow-2); }
.card.is-off { background: #fcfcfd; }
.card.is-off .nm { color: #6d7788; }

.card .bar {
  position: absolute; top: 11px; left: 12px; right: 12px; height: 11px;
  border-radius: 5px;
  background: linear-gradient(90deg, #17396f, #1b4a8d 55%, #17396f);
  box-shadow: 0 2px 6px rgba(22, 56, 110, .18);
}
.card.is-off .bar { background: linear-gradient(90deg, #97a1b0, #aab3c1 55%, #97a1b0); }

.kicker {
  display: flex; align-items: center; gap: 6px;
  margin: 12px 0 14px;
  font-size: 11.5px; color: #8d96a5; letter-spacing: .04em;
}
.kicker .no { font-variant-numeric: tabular-nums; letter-spacing: .06em; color: #7e8798; }
.kicker .dot { color: #c3c9d4; }

.head { display: flex; align-items: flex-start; gap: 14px; }
.ava {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #1d3f75;
  background: #e9f1fd;
  box-shadow: inset 0 0 0 1px rgba(29, 63, 117, .06);
  user-select: none;
}
.who { flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.nm {
  font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: .01em;
  line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sub {
  margin-top: 5px; font-size: 13px; color: #6b7688;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sub .d { color: #c9cfd9; margin: 0 5px; }

.edit {
  margin-left: auto; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 8px; padding: 0;
  border: 1px solid #e4e9f2; background: #fff; color: #8d97a9;
  display: grid; place-items: center; opacity: 0; transition: .15s;
}
.edit svg { width: 13px; height: 13px; }
.card:hover .edit, .card:focus-within .edit { opacity: 1; }
.edit:hover { color: var(--navy-2); border-color: #bfd3ee; background: #f4f8fe; }

.hr {
  height: 1px; margin: 18px 0 16px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}

.rows { display: flex; flex-direction: column; gap: 11px; }
.r { display: grid; grid-template-columns: 74px 1fr; align-items: baseline; gap: 8px; }
.r .k { font-size: 12.5px; color: #96a0af; white-space: nowrap; }
.r .v { font-size: 13px; color: #2f394a; min-width: 0; line-height: 1.5; }
.r .v .sep { color: #d5dbe5; margin: 0 8px; font-weight: 300; }
.r .v .stars { letter-spacing: 1.5px; color: #3b4557; font-size: 12.5px; }
.r .v .stars .e { color: #cdd4e0; }
.r .v .dash { color: #aab2c0; }
.r .v .muted { color: #8c96a6; }

.tagline {
  margin-top: 15px; font-size: 11.5px; color: #96a0af; letter-spacing: .04em;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4.5px 12px; border-radius: 8px;
  font-size: 12.5px; color: #33405a;
  background: #f4f7fc; border: 1px solid #dfe7f4;
  max-width: 100%;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.teach { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.chip.teach em { font-style: normal; font-size: 11px; color: #86a18c; }
.chip.empty { background: #fafbfd; border-style: dashed; color: #aab2c0; }

/* ───────────── 空状态 ───────────── */
.empty {
  text-align: center; padding: 78px 20px 90px; color: var(--text-2);
}
.empty-ico {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  color: #9aa5b6; box-shadow: var(--shadow-1);
}
.empty-ico svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; color: var(--ink); font-weight: 650; }
.empty p { font-size: 13px; color: var(--muted); margin-top: 7px; }
.empty-a { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ───────────── 抽屉 ───────────── */
.mask {
  position: fixed; inset: 0; background: rgba(20, 30, 48, .34);
  backdrop-filter: blur(1.5px); z-index: 40;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 94vw;
  background: #fff; z-index: 41; display: flex; flex-direction: column;
  box-shadow: -18px 0 50px rgba(20, 30, 48, .16);
  animation: slide .22s cubic-bezier(.22, .8, .3, 1);
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }

.d-head {
  padding: 18px 22px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 12px;
}
.d-kicker { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.d-head h2 { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.x {
  margin-left: auto; width: 30px; height: 30px; border-radius: 9px; padding: 0;
  border: 1px solid transparent; background: none; color: #8d97a9;
  display: grid; place-items: center;
}
.x svg { width: 16px; height: 16px; }
.x:hover { background: #f3f6fa; color: var(--text); }

.d-body { padding: 6px 22px 26px; overflow: auto; flex: 1; }
.fset { padding: 16px 0 4px; border-bottom: 1px dashed #eef1f6; }
.fset:last-child { border-bottom: 0; }
.fset h4 {
  font-size: 12.5px; color: #7b8595; font-weight: 650;
  letter-spacing: .02em; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.fset h4 .mini { margin-left: auto; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.f:last-child { margin-bottom: 0; }
.f span { font-size: 12px; color: #7b8595; }
.f span b { color: #c0604f; font-weight: 600; }
.f span i { font-style: normal; color: #aab2c0; font-size: 11px; margin-left: 4px; }
.f2 { grid-column: 1 / -1; }

.inp {
  width: 100%; min-height: 34px; padding: 7px 10px;
  border: 1px solid #dfe4ed; border-radius: 8px; background: #fff;
  font-size: 13px; outline: none; transition: .15s;
}
.inp:hover { border-color: #c9d5e6; }
.inp:focus { border-color: #9fbedf; box-shadow: 0 0 0 3px rgba(29, 74, 138, .08); }
.inp::placeholder { color: #b3bccb; }
textarea.ta { resize: vertical; line-height: 1.6; min-height: 38px; }

.stars-pick { display: flex; gap: 2px; height: 34px; align-items: center; }
.stars-pick button {
  border: 0; background: none; padding: 0 2px; font-size: 20px; line-height: 1;
  color: #d8dde7; transition: .1s;
}
.stars-pick button.on { color: #3b4557; }
.stars-pick button:hover { transform: scale(1.08); }

.skill-edit { display: flex; flex-direction: column; gap: 8px; }
.sk-row { display: flex; align-items: center; gap: 8px; }
.sk-row .name { flex: 1; }
.sk-row .lv { width: 82px; }
.sk-row .teach-lab {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: #6b7688; white-space: nowrap; cursor: pointer;
}
.sk-row .teach-lab input { accent-color: var(--green); width: 14px; height: 14px; }
.sk-row .del {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; padding: 0;
  border: 1px solid #edeff4; background: #fff; color: #a3acba; display: grid; place-items: center;
}
.sk-row .del:hover { color: var(--danger); border-color: #efdcd9; background: #fdf6f5; }
.sk-row .del svg { width: 13px; height: 13px; }
.sk-empty { font-size: 12.5px; color: #aab2c0; padding: 6px 0; }
.hint { font-size: 11.5px; color: #a7b0c0; margin-top: 8px; }

.d-foot {
  padding: 12px 22px; border-top: 1px solid var(--line); background: #fcfdff;
  display: flex; align-items: center; gap: 8px;
}
.grow { flex: 1; }

/* ───────────── 弹窗 ───────────── */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(20, 30, 48, .38); padding: 24px;
  animation: fade .16s ease;
}
.m-card {
  width: 720px; max-width: 96vw; max-height: 86vh; background: #fff;
  border-radius: 14px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(20, 30, 48, .24);
}
.m-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.m-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.m-body { padding: 16px 20px; overflow: auto; }
.m-foot {
  padding: 12px 20px; border-top: 1px solid var(--line); background: #fcfdff;
  display: flex; justify-content: flex-end; gap: 8px;
}

.imp-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 8px; font-size: 12.5px;
  background: #f6f8fb; border: 1px solid #e6ebf3; color: #4a5568;
}
.pill b { color: var(--ink); }
.pill.new { background: #f2f8f4; border-color: #d9e9dd; color: #3f6b4d; }
.pill.upd { background: #f3f7fd; border-color: #dde7f5; color: #2f5488; }
.pill.warn { background: #fdf7ec; border-color: #f0e3c8; color: #8a6a24; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 600; color: #8b95a5; font-size: 11.5px;
  padding: 0 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 8px; border-bottom: 1px solid #f2f4f8; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .t-name { font-weight: 650; color: var(--ink); }
.badge {
  display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px;
  background: #f2f8f4; color: #3f6b4d; border: 1px solid #dbeade;
}
.badge.upd { background: #f3f7fd; color: #2f5488; border-color: #dde7f5; }
.issues { margin-top: 14px; font-size: 12px; color: #8a6a24; background: #fdfaf2;
  border: 1px solid #f3e8cd; border-radius: 9px; padding: 10px 12px; }
.issues p { margin: 2px 0; }
.doc-note { margin-top: 12px; font-size: 11.5px; color: #a7b0c0; }

/* 菜单 */
.menu {
  position: fixed; z-index: 45; background: #fff; border: 1px solid var(--line-2);
  border-radius: 11px; padding: 5px; min-width: 196px;
  box-shadow: 0 14px 38px rgba(20, 30, 48, .16);
  animation: fade .12s ease;
}
.menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--text);
}
.menu button:hover { background: #f4f7fb; }
.menu .danger-t { color: var(--danger); }
.menu .danger-t:hover { background: #fdf4f3; }
.menu-sep { height: 1px; background: #f0f2f7; margin: 4px 6px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #1e2a3d; color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 9px; z-index: 80;
  box-shadow: 0 12px 30px rgba(20, 30, 48, .3);
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ───────────── 响应式 ───────────── */
@media (max-width: 900px) {
  .top-in { padding: 12px 16px; }
  .meta-bar { padding: 0 16px 10px; }
  .wrap { padding: 16px 16px 50px; }
  .grid { grid-template-columns: 1fr; }
  .brand-t p { display: none; }
  .search { min-width: 150px; }
  .search kbd { display: none; }
  .btn span.lbl { display: none; }
  .edit { opacity: 1; }
  .meta-bar .tip { display: none; }
}
@media (max-width: 560px) {
  .card { padding: 22px 18px 20px; }
  .tools .sel { max-width: 118px; }
  .r { grid-template-columns: 66px 1fr; }
  .d-body { padding: 4px 16px 22px; }
  .d-head, .d-foot { padding-left: 16px; padding-right: 16px; }
}
