/* 《像素网络工程师》教学管理后台 */
:root {
  --bg: #0a0c14;
  --bg-2: #0e1220;
  --panel: #151a29;
  --panel-2: #1a2032;
  --line: #2a3149;
  --line-soft: #20263a;
  --text: #e9eefc;
  --dim: #8fa0bf;
  --dim-2: #66748f;
  --cyan: #73eff7;
  --cyan-dim: #1d3a44;
  --yellow: #ffcd75;
  --green: #a7f070;
  --red: #ef7d57;
  --purple: #c78bd8;
  --blue: #41a6f6;
  --side: 232px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 20% -10%, rgba(65, 166, 246, 0.12), transparent 40%),
    linear-gradient(rgba(115, 239, 247, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 239, 247, 0.025) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code,
.mono {
  font-family: "Cascadia Mono", "Consolas", monospace;
}

/* ---------------- 登录 ---------------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 380px;
  padding: 30px 28px 26px;
  background: var(--panel);
  border: 3px solid #06070d;
  box-shadow:
    inset 0 0 0 2px var(--line),
    0 12px 0 rgba(0, 0, 0, 0.35);
}

.login-logo {
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--cyan);
  text-align: center;
}

.login-title {
  margin: 8px 0 2px;
  text-align: center;
  font-size: 22px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #7a3b26;
}

.login-sub {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  margin-bottom: 22px;
}

.login-card .field {
  margin-bottom: 14px;
}

.login-card .btn {
  width: 100%;
  margin-top: 6px;
}

.login-hint {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--dim-2);
  text-align: center;
  line-height: 1.7;
}

.login-error {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
  margin-bottom: 6px;
}

/* ---------------- 布局 ---------------- */

.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(12, 15, 25, 0.92);
  border-right: 1px solid var(--line-soft);
  padding: 20px 14px 16px;
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 8px 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #2b6a63, #173c3a);
  border: 2px solid #0a0c14;
  box-shadow: inset 0 0 0 2px #3d8f85;
  font-size: 16px;
}

.brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 10px;
  color: var(--dim-2);
  letter-spacing: 1px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: var(--dim);
  border-left: 3px solid transparent;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.nav a:hover {
  background: rgba(115, 239, 247, 0.05);
  color: var(--text);
  text-decoration: none;
}

.nav a.active {
  background: linear-gradient(90deg, rgba(115, 239, 247, 0.14), transparent);
  border-left-color: var(--cyan);
  color: var(--cyan);
}

.nav .ico {
  width: 20px;
  text-align: center;
  font-size: 14px;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  font-size: 10px;
  padding: 0 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--dim);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  color: var(--dim-2);
  line-height: 1.8;
}

.sidebar-foot .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  margin-right: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(167, 240, 112, 0.8);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(10, 12, 20, 0.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.topbar-crumb {
  font-size: 11px;
  color: var(--dim-2);
  margin-top: 1px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--dim);
}

.topbar-right .who {
  color: var(--text);
}

.content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 28px 48px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
}

.page-head h2 {
  font-size: 20px;
  letter-spacing: 1px;
}

.page-head .sub {
  color: var(--dim);
  font-size: 12px;
  padding-bottom: 2px;
}

.page-head .spacer {
  flex: 1;
}

.page-head.compact {
  align-items: center;
  margin-bottom: 14px;
  min-height: 30px;
}

.page-head.compact .sub {
  padding-bottom: 0;
}

/* ---------------- 卡片 / 统计 ---------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}

.card-head h3 {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--cyan);
}

.card-head .spacer {
  flex: 1;
}

.card-head .meta {
  font-size: 11px;
  color: var(--dim-2);
}

.card-body {
  padding: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  padding: 16px 16px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
}

.stat-card.yellow::before {
  background: var(--yellow);
}
.stat-card.green::before {
  background: var(--green);
}
.stat-card.purple::before {
  background: var(--purple);
}

.stat-card .k {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1px;
}

.stat-card .v {
  margin-top: 4px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.stat-card .s {
  margin-top: 4px;
  font-size: 11px;
  color: var(--dim-2);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
}

/* ---------------- 表格 ---------------- */

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.data th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--dim-2);
  padding: 9px 12px;
  background: #121724;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

table.data tr:last-child td {
  border-bottom: none;
}

table.data tbody tr:hover {
  background: rgba(115, 239, 247, 0.035);
}

.cell-title {
  font-weight: 600;
  color: var(--text);
}

.cell-sub {
  font-size: 11px;
  color: var(--dim-2);
  margin-top: 1px;
}

.cell-id {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  color: var(--dim);
}

.cell-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  background: #1f2a44;
  border: 1px solid var(--line);
  color: var(--cyan);
  font-weight: 700;
  font-size: 12px;
}

/* ---------------- 徽标 / 进度 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  font-size: 10.5px;
  border: 1px solid var(--line);
  color: var(--dim);
  background: #121724;
  white-space: nowrap;
}

.badge.ok {
  border-color: #3f6b3a;
  color: var(--green);
  background: rgba(167, 240, 112, 0.07);
}
.badge.off {
  border-color: #5a3a35;
  color: var(--red);
  background: rgba(239, 125, 87, 0.07);
}
.badge.cyan {
  border-color: #2d5960;
  color: var(--cyan);
  background: rgba(115, 239, 247, 0.07);
}
.badge.yellow {
  border-color: #6b5a2f;
  color: var(--yellow);
  background: rgba(255, 205, 117, 0.07);
}
.badge.purple {
  border-color: #5b3f68;
  color: var(--purple);
  background: rgba(199, 139, 216, 0.07);
}

.bar {
  height: 7px;
  background: #0d1120;
  border: 1px solid var(--line);
  overflow: hidden;
  min-width: 70px;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2b6a63, var(--cyan));
}

.bar.low > i {
  background: linear-gradient(90deg, #6b4a2a, var(--yellow));
}

.bar-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-line .num {
  font-family: "Cascadia Mono", monospace;
  font-size: 11px;
  color: var(--dim);
  min-width: 54px;
  text-align: right;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 12px;
  background: var(--panel-2);
  border: 1px solid #3a4463;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s, transform 0.05s;
}

.btn:hover {
  border-color: var(--cyan);
  background: #202a44;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: #1f5b55;
  border-color: #2f8f86;
  color: #eafffb;
}

.btn.primary:hover {
  background: #276d66;
}

.btn.danger {
  background: #46222a;
  border-color: #7a3b46;
  color: #ffc9d2;
}

.btn.danger:hover {
  background: #5a2a35;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--dim);
}

.btn.sm {
  min-height: 24px;
  padding: 1px 8px;
  font-size: 11px;
}

.btn.icon {
  width: 26px;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar .spacer {
  flex: 1;
}

/* ---------------- 表单 ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field > label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 32px;
  padding: 4px 9px;
  background: #0d1120;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(115, 239, 247, 0.12);
}

.textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

input[type="file"].input {
  padding: 5px 6px;
  font-size: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 2px 10px;
  background: #1f2a44;
  border: 1px solid #3a4463;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  border-color: var(--cyan);
}

.textarea.code {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.field .hint {
  font-size: 10.5px;
  color: var(--dim-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.form-actions .spacer {
  flex: 1;
}

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

.check {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  background: #10141f;
  cursor: pointer;
  font-size: 12px;
}

.check:hover {
  border-color: var(--line);
}

.check input {
  margin-top: 3px;
  accent-color: #2b8f84;
}

.check .cap {
  display: block;
  color: var(--dim-2);
  font-size: 10px;
}

/* ---------------- 标签页 ---------------- */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 12.5px;
}

.tab:hover {
  color: var(--text);
}

.tab.on {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgba(115, 239, 247, 0.04);
}

/* ---------------- 弹窗 / 提示 ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 12, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.12s;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  width: 520px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid #05070d;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 14px 0 rgba(0, 0, 0, 0.35);
}

.modal.wide {
  width: 760px;
}

.modal-head {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.modal-head h3 {
  font-size: 14px;
  letter-spacing: 1px;
}

.modal-head .x {
  margin-left: auto;
  width: 24px;
  height: 24px;
  background: #3a2430;
  border: 1px solid #6d4050;
  color: #ffc9d2;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  background: #11151f;
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  padding: 9px 14px;
  background: #121724;
  border: 1px solid var(--cyan);
  border-left-width: 3px;
  font-size: 12px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  animation: slide 0.18s;
}

.toast.err {
  border-color: var(--red);
}
.toast.ok {
  border-color: var(--green);
}

@keyframes slide {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
}

/* ---------------- 其它 ---------------- */

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--dim-2);
  font-size: 13px;
}

.loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.45;
  }
}

.error-box {
  padding: 12px 14px;
  border: 1px solid #6d3a33;
  background: rgba(239, 125, 87, 0.08);
  color: #ffb59e;
  font-size: 12px;
}

.notice {
  padding: 9px 12px;
  border-left: 3px solid var(--line);
  background: #10141f;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.7;
}

.notice b {
  color: var(--yellow);
}

.hidden {
  display: none !important;
}

.field-hint {
  font-size: 10.5px;
  color: var(--dim-2);
  min-height: 14px;
}

.stars {
  color: var(--yellow);
  letter-spacing: 1px;
  font-size: 12px;
  white-space: nowrap;
}

/* 概览：关卡条形图 */
.level-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.15fr) minmax(70px, 1fr) 46px 40px 32px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.level-row:last-child {
  border-bottom: none;
}

.level-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-num {
  font-family: "Cascadia Mono", monospace;
  font-size: 11px;
  color: var(--dim);
  text-align: right;
}

.level-avg {
  font-size: 11px;
  color: var(--yellow);
  text-align: right;
}

.level-edit {
  font-size: 11px;
  color: var(--cyan);
  text-align: right;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.recent-row:last-child {
  border-bottom: none;
}

.recent-row:hover {
  background: rgba(115, 239, 247, 0.035);
  text-decoration: none;
}

.recent-main {
  flex: 1;
  min-width: 0;
}

.recent-stars {
  flex: 0 0 auto;
  color: var(--yellow);
  font-family: "Cascadia Mono", monospace;
}

.recent-time {
  font-size: 10.5px;
  color: var(--dim-2);
  white-space: nowrap;
}

.order-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.k-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.k-chip {
  display: inline-block;
  padding: 0 6px;
  font-size: 10px;
  line-height: 16px;
  color: var(--cyan);
  background: #16222c;
  border: 1px solid #2d5960;
  white-space: nowrap;
}

.k-chip.dim {
  color: var(--dim-2);
  background: #121724;
  border-color: var(--line-soft);
}

.user-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.user-cell {
  color: inherit;
  text-decoration: none;
}

.user-cell:hover {
  text-decoration: none;
}

.user-cell:hover .cell-title {
  color: var(--cyan);
}

.progress-row .codex-mini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.card-head .input,
.card-head .select {
  width: auto;
  min-width: 120px;
  min-height: 28px;
  padding: 2px 8px;
  font-size: 12px;
}

.card-head .input {
  width: 220px;
}

.muted {
  color: var(--dim);
}

.small {
  font-size: 11px;
}

.mt {
  margin-top: 14px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kv {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 6px 10px;
  font-size: 12px;
}

.kv .k {
  color: var(--dim-2);
}

.kv .v {
  color: var(--text);
}

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

.k-card {
  padding: 12px;
  background: #11151f;
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.k-card .top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.k-card .no {
  font-size: 10px;
  color: var(--dim-2);
  font-family: "Cascadia Mono", monospace;
}

.k-card .icon {
  margin-left: auto;
  font-size: 16px;
}

.k-card h4 {
  margin: 0;
  font-size: 13px;
  color: var(--yellow);
}

.k-card p {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.k-card .bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) 92px 90px 1fr;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  background: #10141f;
  font-size: 12px;
}

.progress-row .t {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row select {
  min-height: 26px;
  padding: 1px 6px;
}

.log {
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  background: #070a10;
  border: 1px solid var(--line);
  color: #9ef5b6;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* XLSX 批量导入 */
.drop-zone {
  padding: 22px 16px;
  text-align: center;
  background: #10141f;
  border: 2px dashed var(--line);
  color: var(--dim);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.drop-zone:hover,
.drop-zone.over {
  border-color: var(--cyan);
  background: rgba(115, 239, 247, 0.05);
  color: var(--text);
}

.drop-zone .drop-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.drop-zone .small {
  margin-top: 4px;
}

.check-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.check-row .check {
  flex: 1;
  min-width: 240px;
}

.import-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.import-table {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line-soft);
}

.import-table table.data {
  min-width: 100%;
}

.import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-table tr.import-bad td {
  background: rgba(239, 125, 87, 0.06);
}

.login-dev {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  color: var(--dim);
  font-size: 11px;
  text-align: center;
}

.login-credit {
  margin-top: 10px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--dim-2);
}

.dev-line {
  margin-top: 4px;
  color: #7d8cab;
  font-size: 9.5px;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    overflow-x: auto;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }
  .brand {
    padding: 0;
    flex: 0 0 auto;
  }
  .brand-text {
    display: none;
  }
  .nav {
    flex-direction: row;
    gap: 2px;
  }
  .nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 8px 10px;
  }
  .nav a.active {
    border-left: none;
    border-bottom-color: var(--cyan);
    background: none;
  }
  .nav-label {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  .content {
    padding: 16px 14px 40px;
  }
  .topbar {
    padding: 10px 14px;
  }
  .topbar-crumb {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .progress-row {
    grid-template-columns: 1fr 80px;
  }
  .progress-row .codex-mini {
    display: none;
  }
}

/* ---------------- 课程副本 ---------------- */
.curriculum-tables {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tabs-wrap {
  margin-top: 14px;
}

.tab .tab-count {
  margin-left: 8px;
  font-family: "Cascadia Mono", monospace;
  font-size: 10px;
  color: var(--dim-2);
}

.tab.on .tab-count {
  color: var(--cyan);
}

.tag-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.curriculum-tables .data td {
  vertical-align: middle;
}

.card-progress-list {
  max-height: 360px;
  overflow-y: auto;
}

.card-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.card-progress-row:last-child {
  border-bottom: none;
}

.card-progress-row .cp-main {
  flex: 1;
  min-width: 0;
}

.card-progress-row .cp-stars {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 1px;
  color: #ffcd75;
}

.card-progress-row .cp-meta {
  flex: 0 0 auto;
  font-family: "Cascadia Mono", monospace;
  font-size: 10px;
  color: var(--dim-2);
}

/* ---------------- 两级菜单 / 副本关卡 ---------------- */
.nav-group {
  margin: 2px 0 4px;
}

.nav-parent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-left: 3px solid transparent;
  color: var(--dim);
  font-size: 13px;
}

.nav-group.active .nav-parent {
  color: var(--text);
}

.nav-chevron {
  margin-left: auto;
  font-size: 9px;
  color: var(--dim-2);
}

.nav .nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
}

.nav .nav-child {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 38px;
  border-left: 3px solid transparent;
  color: var(--dim-2);
  font-size: 12px;
  text-decoration: none;
}

.nav .nav-child:hover {
  color: var(--text);
  background: rgba(115, 239, 247, 0.04);
  text-decoration: none;
}

.nav .nav-child.active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(115, 239, 247, 0.1), transparent);
}

.nav-child-dot {
  color: var(--line);
  font-size: 14px;
  line-height: 1;
}

.level-subnav {
  margin: 14px 0 14px;
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.copy-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: linear-gradient(160deg, #1e263a, #171b2a);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px #252d45;
}

.copy-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-no {
  padding: 1px 6px;
  font-family: "Cascadia Mono", monospace;
  font-size: 10px;
  color: var(--ink);
  background: var(--cyan);
}

.copy-book {
  font-size: 10px;
  color: var(--dim-2);
}

.copy-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.copy-points {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.copy-tasks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

.copy-task {
  display: block;
  padding: 4px 6px;
  font-size: 11px;
  color: #b9c8e0;
  background: #121726;
  border: 1px solid #2b3350;
  text-decoration: none;
}

.copy-task:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-decoration: none;
}

.copy-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.copy-foot a {
  margin-left: auto;
  color: var(--cyan);
}

@media (max-width: 900px) {
  .copy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .copy-grid {
    grid-template-columns: 1fr;
  }
}

.level-subnav a {
  text-decoration: none;
}

.copy-no {
  min-width: 30px;
  text-align: center;
  color: var(--cyan);
  background: #102a30;
  border: 1px solid #2f6b73;
  font-weight: 700;
}

.nav-parent {
  cursor: pointer;
}

.copy-indicators {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.copy-indicator-label {
  font-size: 9px;
  color: #71809c;
  letter-spacing: 1px;
}

.k-card .used-by {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  line-height: 1.5;
  color: #8ea0bd;
}

.empty-cell {
  padding: 22px 12px;
  text-align: center;
  color: var(--dim-2);
  font-size: 12px;
}

.check-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #121726;
  border: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--dim);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
}

.check-issue {
  display: grid;
  grid-template-columns: auto 150px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  background: #141a29;
  border-left: 3px solid var(--line);
}

.check-issue.error {
  border-left-color: #ff6b6b;
}

.check-issue.warning {
  border-left-color: var(--yellow);
}

.check-issue .where {
  font-size: 11px;
  color: var(--dim-2);
  line-height: 1.5;
}

.check-issue .msg {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

.unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.icon-btn {
  min-width: 28px;
  padding: 0 6px;
  text-align: center;
}
