/* ============================================================
   研约 · 产品模拟页（学生端 / 管理后台）共享样式（质感版）
   ============================================================ */

.app-body {
  background: var(--mist-25);
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 62px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}

.app-topbar--dark {
  background: rgba(7, 14, 34, 0.92);
  border-bottom-color: var(--line-dark);
  color: var(--text-on-dark);
}

.app-topbar-inner {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 100%;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

.app-topbar--dark .app-brand {
  color: var(--text-on-dark);
}

.app-brand:hover {
  text-decoration: none;
}

.app-logo {
  height: 34px;
  width: auto;
  display: block;
}

.app-tabs {
  display: flex;
  gap: 4px;
  height: 100%;
  align-items: center;
}

.app-tabs a {
  position: relative;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.app-tabs a:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
  text-decoration: none;
}

.app-tabs a.is-active {
  background: var(--blue-100);
  color: var(--blue-600);
  font-weight: 600;
}

.app-topbar--dark .app-tabs a {
  color: var(--text-on-dark-muted);
}

.app-topbar--dark .app-tabs a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-on-dark);
}

.app-topbar--dark .app-tabs a.is-active {
  background: rgba(56, 103, 255, 0.22);
  color: #9db6ff;
}

.app-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 13px;
}

.app-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--white);
  font-size: 12.5px;
  color: var(--text-body);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex: none;
}

.app-topbar--dark .app-user {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-dark);
  color: var(--text-on-dark-muted);
}

.app-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.demo-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  color: var(--text-faint);
  background: var(--surface-soft);
  white-space: nowrap;
}

.app-topbar--dark .demo-badge {
  border-color: var(--line-dark);
  color: var(--text-on-dark-muted);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- 页头 ---------- */
.app-page {
  width: min(1320px, calc(100% - 40px));
  margin: 32px auto 72px;
}

.app-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.app-page-head h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 0.03em;
}

.app-page-head p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
  letter-spacing: 0.02em;
}

.app-head-actions {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
}

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.filter-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mist-25);
  min-width: 180px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-search:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(56, 103, 255, 0.12);
}

.filter-search svg {
  flex: none;
  color: var(--text-faint);
}

.filter-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-strong);
}

.filter-search input::placeholder {
  color: var(--text-faint);
}

.chip {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.chip.is-on {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(56, 103, 255, 0.28);
}

/* ---------- 布局：侧栏 + 主区（后台） ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
  width: min(1320px, calc(100% - 40px));
  margin: 28px auto 72px;
  align-items: start;
}

.app-side {
  position: sticky;
  top: 88px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 13px;
  box-shadow: var(--shadow-xs);
}

.app-side-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  padding: 9px 11px 11px;
}

.app-side a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--text-body);
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.18s ease, color 0.18s ease;
}

.app-side a:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.app-side a.is-active {
  background: var(--blue-100);
  color: var(--blue-600);
  font-weight: 600;
}

.app-side .nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
  transition: background 0.18s ease;
}

.app-side a.is-active .nav-dot {
  background: var(--blue-600);
}

/* ---------- 卡片与面板 ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  min-width: 0;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fdfdff, var(--white));
}

.panel-head h2 {
  font-family: var(--font-serif);
  font-size: 16.5px;
  letter-spacing: 0.04em;
}

.panel-head .hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.18em;
}

.panel-body {
  padding: 20px;
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px 20px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.kpi::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue-600), var(--blue-300));
}

.kpi--teal::after {
  background: linear-gradient(180deg, var(--teal-500), var(--teal-400));
}

.kpi--warn::after {
  background: linear-gradient(180deg, #f0a849, #ffd28a);
}

.kpi em {
  display: block;
  font-style: normal;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.kpi span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.kpi .sample {
  display: inline-block;
  margin-top: 11px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  padding: 12px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-body);
  vertical-align: middle;
  white-space: nowrap;
}

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

.data-table tr:hover td {
  background: rgba(56, 103, 255, 0.028);
}

.data-table .strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 12.5px;
}

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

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

/* 进度条 */
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
  width: 92px;
  min-width: 70px;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
}

.bar i.is-teal {
  background: linear-gradient(90deg, var(--teal-500), var(--teal-400));
}

.bar i.is-warn {
  background: linear-gradient(90deg, #f0a849, #ffd28a);
}

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

/* 状态点 */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-body);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}

.status.is-open i { background: var(--teal-500); box-shadow: 0 0 8px rgba(42, 201, 183, 0.5); }
.status.is-check i { background: var(--blue-600); box-shadow: 0 0 8px rgba(56, 103, 255, 0.5); }
.status.is-full i { background: #c4cede; }
.status.is-void i { background: #f0a849; }

/* 学生端实验卡 */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.exp-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.exp-card:hover {
  border-color: rgba(56, 103, 255, 0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.exp-card.is-featured {
  border-color: rgba(56, 103, 255, 0.42);
  background:
    linear-gradient(165deg, rgba(56, 103, 255, 0.055), transparent 55%),
    var(--white);
  box-shadow: var(--shadow-sm);
}

.exp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.exp-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.03em;
}

.exp-card .sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.exp-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--mist-25);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  width: 100%;
  text-align: left;
  color: var(--text-body);
}

.exp-slot:hover {
  border-color: var(--blue-600);
  background: rgba(56, 103, 255, 0.045);
}

.exp-slot.is-picked {
  border-color: var(--blue-600);
  background: var(--blue-100);
  color: var(--blue-600);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--blue-600);
}

.exp-slot .left {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.exp-slot .right {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.exp-slot.is-picked .right {
  color: var(--blue-600);
}

.exp-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

/* 我的记录 */
.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 11px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease;
}

.record-item:hover {
  border-color: rgba(56, 103, 255, 0.25);
}

.record-item h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.record-item p {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 5px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* 核验面板 */
.checkin-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
}

.checkin-code {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  padding: 14px 17px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--mist-25);
  color: var(--text-strong);
}

.checkin-actions {
  display: flex;
  gap: 11px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.checkin-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.9;
}

/* 底部备注 */
.app-footnote {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  line-height: 1.9;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s ease;
  white-space: nowrap;
  flex: none;
}

.back-home:hover {
  color: var(--blue-600);
  text-decoration: none;
}

.app-topbar--dark .back-home {
  color: var(--text-on-dark-muted);
}

.app-topbar--dark .back-home:hover {
  color: var(--teal-400);
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-side {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 9px;
  }

  .app-side-title {
    display: none;
  }

  .app-side a {
    white-space: nowrap;
    margin-bottom: 0;
  }

  .checkin-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .app-tabs {
    display: none;
  }

  .app-topbar-inner {
    gap: 12px;
  }

  .app-topbar-right {
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  .exp-grid {
    grid-template-columns: 1fr;
  }

  .app-page,
  .app-shell,
  .app-topbar-inner {
    width: calc(100% - 28px);
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .kpi em {
    font-size: 24px;
  }

  .app-page-head h1 {
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  .app-topbar-right .demo-badge {
    display: none;
  }

  .app-user {
    padding-right: 8px;
  }
}
