/* ============================================================
 * mixvm-home.css · 米思齐图形化编程「首页」（作品页）
 * 视觉对齐云星3D 首页：蓝色顶栏 + 左侧导航 + 作品卡片网格。
 * 由 patched/mixvm-shell-home.html 引用；部署时与 HTML/JS 一起定向 cp。
 * ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: Arial, "Microsoft YaHei", Helvetica, sans-serif;
  color: #263f57;
  background: #f4f7f9;
}

button { font-family: inherit; }

/* ---------- 外层 ---------- */
.mis-shell {
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  overflow: auto;
  background: #f4f7f9;
}

/* ---------- 顶栏 ---------- */
.mis-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(280px, 620px) minmax(210px, 1fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  height: 64px;
  min-height: 64px;
  padding: 0 14px;
  color: #ffffff;
  background: #0e69f1;
}

.mis-brand {
  display: inline-flex;
  width: max-content;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  text-decoration: none;
}

.mis-brand svg { width: 38px; height: 38px; flex: 0 0 auto; }

.mis-brand span {
  overflow: hidden;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mis-brand:hover { opacity: 0.85; }

.mis-search {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #5f7387;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(7, 48, 113, 0.16);
}

.mis-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #243d56;
  background: transparent;
  font-size: 14px;
}

.mis-topbar-actions {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mis-account {
  display: inline-flex;
  max-width: 170px;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  overflow: hidden;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  font-size: 13px;
  cursor: default;
}

.mis-logout {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  cursor: pointer;
}

.mis-logout:hover { background: rgba(255, 255, 255, 0.28); }

.mis-primary {
  display: inline-flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  color: #0e69f1;
  background: #ffffff;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
  font-size: 14px;
}

.mis-primary:hover { background: #edf4ff; }

/* ---------- 布局 ---------- */
.mis-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.mis-sidebar {
  position: sticky;
  top: 64px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: start;
  width: 100%;
  height: calc(100vh - 64px);
  padding: 18px 12px;
  background: #ffffff;
  border-right: 1px solid #d9e3ea;
}

.mis-nav-stack { display: grid; gap: 8px; }

.mis-nav-item {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  color: #40586f;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.mis-nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mis-nav-item:hover,
.mis-nav-item.active { color: #0e69f1; background: #edf4ff; }
.mis-nav-item:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px #0e69f1; }

.mis-sidebar-footer { display: grid; gap: 8px; }

.mis-settings-button { color: #536a80; }

.mis-main { min-width: 0; padding: 22px; }

/* ---------- 主区顶部（标题 + 统计 + 视图切换） ---------- */
.mis-main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mis-main-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #1e3a54;
}

.mis-main-head .mis-count {
  color: #6d8193;
  font-size: 13px;
}

.mis-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mis-seg {
  display: inline-flex;
  padding: 3px;
  background: #eaf0f6;
  border-radius: 8px;
}

.mis-seg button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: #5f7387;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.mis-seg button.active {
  color: #0e69f1;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(12, 52, 120, 0.12);
}

.mis-select {
  height: 34px;
  padding: 0 10px;
  color: #40586f;
  background: #fff;
  border: 1px solid #d9e3eb;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 作品卡片 ---------- */
.mis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 15px;
}

.mis-row { display: grid; gap: 10px; }

.mis-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #d9e3eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 52, 71, 0.05);
  transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.mis-card:hover {
  border-color: #bcd3ea;
  box-shadow: 0 8px 22px -10px rgba(20, 60, 110, 0.35);
  transform: translateY(-2px);
}

.mis-card-open {
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto auto;
  gap: 9px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.mis-row .mis-card-open {
  grid-template-columns: 126px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
}

.mis-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: #eef5ff;
}

.mis-row .mis-preview { grid-row: 1 / span 2; }

.mis-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mis-preview .mis-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9db6cf;
}

.mis-card-title {
  min-width: 0;
  overflow: hidden;
  color: #263f57;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mis-card-meta {
  min-width: 0;
  overflow: hidden;
  color: #6d8193;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mis-card-menu-trigger {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #5f7387;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe5ee;
  border-radius: 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
}

.mis-card:hover .mis-card-menu-trigger,
.mis-card.menu-open .mis-card-menu-trigger { opacity: 1; }
.mis-card-menu-trigger:hover { background: #edf4ff; color: #0e69f1; }

.mis-card-menu {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 20;
  width: 132px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #d9e3eb;
  border-radius: 9px;
  box-shadow: 0 12px 30px -10px rgba(11, 42, 74, 0.3);
}

.mis-card-menu[hidden] { display: none; }

.mis-card-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  color: #40586f;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.mis-card-menu button:hover { color: #0e69f1; background: #edf4ff; }
.mis-card-menu button.delete { color: #c0392b; }
.mis-card-menu button.delete:hover { color: #fff; background: #e74c3c; }

/* ---------- 空态 / 占位板块 ---------- */
.mis-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 60px 20px;
  color: #6d8193;
  text-align: center;
}

.mis-empty strong { color: #26445e; font-size: 16px; }

.mis-coming {
  display: grid;
  place-items: center;
  padding: 80px 20px;
  color: #8aa0b4;
}

.mis-coming strong { color: #26445e; font-size: 18px; }

/* ---------- 侧边栏底部「导航」二级菜单（与编辑器壳层同一形态） ---------- */
.mis-nav-wrap { position: relative; margin-top: auto; width: 100%; }

@keyframes misNavMenuIn {
  from { opacity: 0; transform: translateX(10px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.mis-nav-menu {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  z-index: 90020;
  width: 280px;
  padding: 12px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(240, 246, 255, 0.96) 50%, rgba(228, 239, 254, 0.96) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid #cfdff4;
  border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(11, 42, 74, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: misNavMenuIn 0.18s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.mis-nav-menu::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  background: rgba(234, 242, 254, 0.98);
  border-bottom: 1px solid #cfdff4;
  border-left: 1px solid #cfdff4;
  transform: rotate(45deg);
  border-bottom-left-radius: 3px;
}

.mis-nav-menu[hidden] { display: none; }

.mis-nav-menu-title {
  padding: 6px 10px 10px;
  color: #7b93ab;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.mis-nav-item-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mis-nav-item-row:hover { background: #fff; box-shadow: 0 6px 18px -6px rgba(12, 52, 120, 0.22); transform: translateY(-1px); }

.mis-nav-thumb {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 14px -6px rgba(14, 105, 241, 0.5);
}

.mis-nav-thumb svg { width: 20px; height: 20px; }
.mis-nav-thumb-iot { background: linear-gradient(135deg, #12b5a6, #0e8f83); box-shadow: 0 6px 14px -6px rgba(18, 181, 166, 0.55); }
.mis-nav-thumb-3d { background: linear-gradient(135deg, #4a8df8, #0e69f1); }
.mis-nav-thumb-circuit { background: linear-gradient(135deg, #26a69a, #009688); }

.mis-nav-text { display: grid; min-width: 0; gap: 3px; }
.mis-nav-text strong { color: #22394f; font-size: 14px; font-weight: 800; }
.mis-nav-text em { color: #8aa0b4; font-size: 12px; font-style: normal; }
.mis-nav-item-row:hover .mis-nav-text strong { color: #1677c9; }

/* ---------- 登录门禁（与编辑器壳层同款全屏登录页） ---------- */
.mis-gate {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #0e69f1 0%, #0a4fc0 55%, #0a3d96 100%);
}

.mis-gate[hidden] { display: none; }

.mis-gate-card {
  width: 100%;
  max-width: 380px;
  padding: 34px 32px 26px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(6, 40, 100, 0.35);
  text-align: center;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.mis-gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0e69f1;
  font-size: 22px;
  font-weight: 800;
}

.mis-gate-brand svg { width: 34px; height: 34px; }

.mis-gate-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 14px;
  padding: 4px;
  background: #eef3fa;
  border-radius: 10px;
}

.mis-gate-tab {
  flex: 1;
  height: 36px;
  color: #5f7387;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.mis-gate-tab.active { color: #0e69f1; background: #fff; box-shadow: 0 1px 4px rgba(12, 52, 120, 0.12); }

.mis-gate-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.6; color: #5f7387; }

.mis-gate-form { display: flex; flex-direction: column; gap: 12px; }

.mis-gate-field {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  color: #8aa0b4;
  background: #f4f7fb;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
}

.mis-gate-field:focus-within { border-color: #0e69f1; box-shadow: 0 0 0 3px rgba(14, 105, 241, 0.14); }

.mis-gate-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #1c2b3a;
  background: transparent;
  font-size: 14px;
}

.mis-gate-field input::placeholder { color: #9fb0c0; }

.mis-gate-role-switch { display: flex; gap: 8px; height: auto; padding: 4px; background: #eef3fa; border: 1px solid #dfe7f0; }
.mis-gate-role { flex: 1; height: 36px; color: #5f7387; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; }
.mis-gate-role.active { color: #0e69f1; background: #fff; box-shadow: 0 1px 4px rgba(12, 52, 120, 0.12); }
.mis-gate-select { flex: 1; min-width: 0; height: 30px; border: 0; outline: 0; background: transparent; font-size: 13px; color: #1c2b3a; }

.mis-gate-error { display: none; padding: 9px 12px; color: #c62828; background: #fdecec; border-radius: 7px; font-size: 13px; text-align: left; }

.mis-gate-submit {
  display: inline-flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
  color: #fff;
  background: #0e69f1;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.mis-gate-submit:hover:not(:disabled) { background: #0a5cd8; }
.mis-gate-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.mis-gate-footer { margin-top: 20px; font-size: 12px; line-height: 1.6; color: #8aa0b4; }
.mis-gate-link { padding: 0; color: #0e69f1; background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.mis-gate-link:hover { text-decoration: underline; }
.mis-gate-sep { margin: 0 6px; color: #c3cedb; }
.mis-gate-sms-btn { flex: 0 0 auto; margin-left: 8px; height: 30px; padding: 0 10px; color: #009688; background: #e0f2f1; border: 0; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; }
.mis-gate-sms-btn:hover:not(:disabled) { background: #b2dfdb; }
.mis-gate-sms-btn:disabled { color: #9aa7b4; background: #eef1f4; cursor: not-allowed; }
.mis-gate-wechat { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef1f5; text-align: left; }
.mis-gate-wechat img { width: 84px; height: 84px; flex: 0 0 auto; object-fit: contain; border-radius: 8px; background: #f4f7fb; }
.mis-gate-wechat div { display: flex; flex-direction: column; gap: 4px; color: #5f7387; font-size: 12px; line-height: 1.5; }
.mis-gate-wechat strong { color: #1c2b3a; font-size: 13px; }

/* ---------- toast / dialog ---------- */
.mis-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 100001;
  transform: translateX(-50%);
  padding: 10px 22px;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.mis-toast.ok { background: #2ecc71; }
.mis-toast.err { background: #e74c3c; }

.mis-dialog-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100010;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
}

.mis-dialog {
  width: 380px;
  max-width: 92vw;
  padding: 22px 26px 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  color: #333;
  font-size: 14px;
}

.mis-dialog h3 { margin: 0 0 10px; font-size: 16px; text-align: center; }
.mis-dialog p { margin: 4px 0 16px; text-align: center; color: #444; word-break: break-word; }
.mis-dialog input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 14px; outline: 0; background: #fff; color: #333; }
.mis-dialog-actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* 新建作品时的「选择开发板」弹窗 */
.mis-board-picker { width: 520px; }
.mis-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow: auto;
  padding: 2px;
}
.mis-board-card {
  padding: 10px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mis-board-card:hover { border-color: #009688; background: #f2fbf9; }
.mis-board-card.is-common { border-color: #009688; background: #e8f7f5; font-weight: 700; }
.mis-dialog-actions button { padding: 7px 20px; border: 0; border-radius: 4px; cursor: pointer; font-size: 13px; }
.mis-dialog-actions .cancel { color: #333; background: #ddd; }
.mis-dialog-actions .ok { color: #fff; background: #2ecc71; }
.mis-dialog-actions .ok.danger { background: #e74c3c; }

/* ---------- 课堂 / 列表行 / 按钮 ---------- */
.mis-notice {
  margin: 0 0 14px;
  padding: 10px 14px;
  color: #a94442;
  background: #fdecec;
  border-radius: 8px;
  font-size: 13px;
}

/* 课堂权限提示条（黄色，每次打开课堂页都显示） */
.mis-notice-warn {
  color: #8a6d1f;
  background: #fff8e1;
  border: 1px solid #f0dfa8;
}

/* 黄色提示里的「客服」链接（点击弹客服二维码） */
.mis-notice-link {
  margin-left: 2px;
  color: #0e69f1;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.mis-notice-link:hover {
  color: #0b57c9;
}

.mis-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  color: #40586f;
  background: #fff;
  border: 1px solid #d9e3eb;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.mis-btn:hover { color: #0e69f1; border-color: #bcd3ea; background: #f5f9ff; }
.mis-btn-primary { color: #fff; background: #0e69f1; border-color: #0e69f1; }
.mis-btn-primary:hover { color: #fff; background: #0a5cd8; border-color: #0a5cd8; }
.mis-btn-ghost { color: #536a80; background: transparent; }
.mis-btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.mis-btn-sm.danger { color: #c0392b; }
.mis-btn-sm.danger:hover { color: #fff; background: #e74c3c; border-color: #e74c3c; }

.mis-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.mis-detail-head h1 { margin: 0; font-size: 20px; font-weight: 800; color: #1e3a54; }

.mis-cls-idtag {
  padding: 3px 9px;
  color: #0e69f1;
  background: #eaf2fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mis-tabs { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: #eaf0f6; border-radius: 10px; }

.mis-tab {
  height: 34px;
  padding: 0 14px;
  color: #5f7387;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.mis-tab.active { color: #0e69f1; background: #fff; box-shadow: 0 1px 4px rgba(12, 52, 120, 0.12); }

.mis-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.mis-search-inline {
  height: 34px;
  min-width: 200px;
  padding: 0 12px;
  color: #243d56;
  background: #fff;
  border: 1px solid #d9e3eb;
  border-radius: 7px;
  font-size: 13px;
  outline: 0;
}

.mis-search-inline:focus { border-color: #0e69f1; box-shadow: 0 0 0 3px rgba(14, 105, 241, 0.12); }

.mis-rows { display: grid; gap: 10px; }

.mis-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d9e3eb;
  border-radius: 8px;
}

.mis-row-main { display: grid; min-width: 0; gap: 3px; }
.mis-row-main strong { color: #263f57; font-size: 14px; font-weight: 800; }
.mis-row-main em { color: #6d8193; font-size: 12px; font-style: normal; }
.mis-row-actions { display: inline-flex; gap: 8px; margin-left: auto; }

.mis-cls-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #0e69f1;
  background: linear-gradient(160deg, #eef5ff, #dce9fd);
}

.mis-cls-preview em { font-size: 26px; font-weight: 800; font-style: normal; letter-spacing: 0.04em; }
.mis-cls-preview i { color: #7ea7e8; font-size: 26px; font-weight: 300; font-style: normal; letter-spacing: 0.04em; }

.mis-preview-dialog { width: 640px; max-width: 92vw; text-align: left; }
.mis-preview-sub { margin: 0 0 12px; color: #6d8193; font-size: 12px; text-align: left; }
.mis-preview-thumb { margin-bottom: 10px; overflow: hidden; background: #eef5ff; border-radius: 8px; }
.mis-preview-thumb img { display: block; width: 100%; max-height: 240px; object-fit: contain; }

.mis-preview-code {
  max-height: 260px;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  color: #33475b;
  background: #f6f9fc;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 回收站 / 挑战 ---------- */
.mis-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5edf3;
}

.mis-card-actions .mis-btn { flex: 1; justify-content: center; }
.mis-card-open.as-static { cursor: default; }

.mis-ch-preview { display: grid; place-items: center; background: linear-gradient(160deg, #eef5ff, #dce9fd); }

.mis-ch-level {
  padding: 4px 12px;
  color: #0e69f1;
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px -2px rgba(14, 105, 241, 0.4);
}

.mis-steps {
  margin: 0 0 4px;
  padding-left: 22px;
  color: #33475b;
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

/* ---------- 表格式列表（课堂 / 学员 / 设计，样式对齐云星3D 课堂面板） ---------- */
.mis-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mis-list-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mis-list-title svg { flex: 0 0 auto; color: #0e69f1; }
.mis-list-title h1 { margin: 0; color: #1e3a54; font-size: 20px; font-weight: 800; }
.mis-list-title span { color: #8aa0b4; font-size: 13px; }

.mis-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  color: #ffffff;
  background: #0e69f1;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.mis-primary-btn:hover { background: #0a5cd8; }

.mis-table {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e9f1;
  border-radius: 12px;
}

.mis-table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #40586c;
  border-bottom: 1px solid #edf1f6;
  font-size: 13px;
}

.mis-table-row:last-child { border-bottom: 0; }

.mis-table-head {
  padding: 9px 16px;
  color: #8aa0b4;
  background: #f4f7fb;
  border-bottom: 1px solid #e2e9f1;
  font-size: 12px;
  font-weight: 700;
}

/* 课堂列表：课堂名称 / 学生 / 创建日期 / 操作 */
.mis-cls-table .mis-table-row { grid-template-columns: minmax(160px, 2fr) 120px minmax(150px, 1.4fr) 96px; }
/* 学员列表：学生 / 登录名 / 作品 / 操作 */
.mis-stu-table .mis-table-row { grid-template-columns: minmax(150px, 1.5fr) minmax(130px, 1.2fr) 80px 168px; }
/* 设计列表：作品 / 学生 / 保存时间 / 大小 / 操作 */
.mis-work-table .mis-table-row { grid-template-columns: minmax(160px, 1.6fr) minmax(120px, 1fr) minmax(140px, 1.1fr) 84px 224px; }

/* ---- 学员表：列显示设置（点表头弹出复选面板；学生/登录名必选） ---- */
.mis-table-wrap {
  position: relative;
}

.mis-cols-trigger {
  cursor: pointer;
  user-select: none;
}

.mis-cols-trigger:hover {
  background: #eef4fb;
}

.mis-cols-pop {
  position: absolute;
  top: 40px;
  left: 16px;
  z-index: 30;
  min-width: 200px;
  padding: 8px;
  border: 1px solid #e2e9f1;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 45, 70, 0.16);
}

.mis-cols-pop[hidden] {
  display: none;
}

.mis-cols-pop-title {
  padding: 4px 8px 8px;
  color: #8aa0b4;
  font-size: 12px;
  font-weight: 700;
}

.mis-cols-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: #40586c;
  cursor: pointer;
}

.mis-cols-item:hover {
  background: #f2f7fd;
}

.mis-cols-item input {
  width: 15px;
  height: 15px;
  accent-color: #12a37a;
  cursor: pointer;
}

.mis-cols-item.is-locked {
  color: #8aa0b4;
  cursor: default;
}

.mis-cols-item.is-locked:hover {
  background: transparent;
}

.mis-cols-item.is-locked input {
  cursor: default;
}

.mis-cols-item em {
  margin-left: auto;
  font-size: 11px;
  font-style: normal;
  color: #a3b4c4;
}

.mis-table-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  color: #1c2b3a;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.mis-table-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mis-table-name:hover { color: #0e69f1; }

.mis-table-cls-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #4a8df8, #0e69f1);
  border-radius: 8px;
}

.mis-table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.mis-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #6b8196;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.mis-icon-btn:hover { color: #0e69f1; background: #eef3fa; }
.mis-icon-btn.danger:hover { color: #e74c3c; background: #fdecec; }

.mis-table-actions .mis-btn-sm { height: 30px; }

/* 已移除学生表：学生 / 登录名 / 移除时间 / 操作 */
.mis-removed-table .mis-table-row { grid-template-columns: minmax(150px, 1.5fr) minmax(130px, 1.2fr) minmax(130px, 1.1fr) 100px; }

.mis-cell-name {
  overflow: hidden;
  color: #1c2b3a;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
 * 主题覆盖：主色改用米思齐「编程页」的主色 #009688（青绿）
 * （实测编程页 .layui-nav 背景 = rgb(0,150,136)），使首页与编辑器风格统一。
 * 放在文件末尾，用同选择器覆盖前面的蓝色主题。
 * ============================================================ */
.mis-topbar { background: #009688; }
.mis-primary { color: #009688; }
.mis-primary:hover { background: #e6f4f2; }

.mis-nav-item:hover,
.mis-nav-item.active { color: #009688; background: #e6f4f2; }
.mis-nav-item:focus-visible { box-shadow: inset 0 0 0 2px #009688; }

.mis-btn:hover { color: #009688; border-color: #9fd8d0; background: #f2fbf9; }
.mis-btn-primary { color: #ffffff; background: #009688; border-color: #009688; }
.mis-btn-primary:hover { color: #ffffff; background: #00796b; border-color: #00796b; }
.mis-icon-btn:hover { color: #009688; background: #e6f4f2; }

.mis-primary-btn { background: #009688; }
.mis-primary-btn:hover { background: #00796b; }

.mis-seg button.active { color: #009688; }
.mis-select:focus { border-color: #009688; }
.mis-search-inline:focus { border-color: #009688; box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.14); }
.mis-search:focus-within { border-color: #009688; }

.mis-card:hover { border-color: #9fd8d0; }
.mis-card-menu-trigger:hover { color: #009688; background: #e6f4f2; }
.mis-card-menu button:hover { color: #009688; background: #e6f4f2; }

.mis-table-name:hover { color: #009688; }
.mis-table-cls-icon { background: linear-gradient(135deg, #26a69a, #009688); }
.mis-list-title svg { color: #009688; }
.mis-cls-idtag { color: #009688; background: #e6f4f2; }
.mis-tab.active { color: #009688; }
.mis-cls-preview { color: #009688; background: linear-gradient(160deg, #eef8f6, #d3ece8); }
.mis-cls-preview em { color: #009688; }
.mis-cls-preview i { color: #7fbfb8; }
.mis-ch-preview { background: linear-gradient(160deg, #eef8f6, #d3ece8); }
.mis-ch-level { color: #009688; box-shadow: 0 2px 8px -2px rgba(0, 150, 136, 0.4); }
.mis-nav-item-row:hover .mis-nav-text strong { color: #009688; }

/* 首页登录门禁：与编程页同一主色的青绿渐变 */
.mis-gate { background: linear-gradient(160deg, #00bfae 0%, #009688 55%, #00796b 100%); }
.mis-gate-brand { color: #009688; }
.mis-gate-tab.active { color: #009688; }
.mis-gate-role.active { color: #009688; }
.mis-gate-field:focus-within { border-color: #009688; box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.14); }
.mis-gate-submit { background: #009688; }
.mis-gate-submit:hover:not(:disabled) { background: #00796b; }
.mis-gate-link { color: #009688; }

/* ============================================================
 * 课堂：一级 tab（主授课 / 辅助授课）与「添加辅助老师」弹窗
 * 一级 tab 比详情二级 tab 更醒目；只在 .mis-cls-mode-tabs 作用域内覆盖，
 * 不改动通用 .mis-tabs / .mis-tab 定义。
 * ============================================================ */
.mis-cls-mode-tabs { gap: 6px; margin-bottom: 18px; padding: 5px; }

.mis-cls-mode-tabs .mis-tab {
  height: 40px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
}

.mis-cls-mode-tabs .mis-tab.active {
  color: #ffffff;
  background: #009688;
  box-shadow: 0 6px 16px -6px rgba(0, 150, 136, 0.6);
}

/* 辅助授课列表：课堂名称 / 主讲老师 / 学生 / 创建日期 */
.mis-cls-assist-table .mis-table-row { grid-template-columns: minmax(160px, 2fr) minmax(120px, 1.2fr) 120px minmax(130px, 1.2fr); }

/* 「添加辅助老师」弹窗 */
.mis-assistant-dialog { width: 440px; }
.mis-assistant-dialog .mis-assistant-tip { margin: 0 0 14px; color: #5f7387; font-size: 13px; line-height: 1.6; text-align: left; }
.mis-assistant-search { display: flex; gap: 8px; }
.mis-assistant-dialog .mis-assistant-search input { flex: 1; min-width: 0; width: auto; }
.mis-assistant-dialog .mis-assistant-search .mis-btn { height: 38px; flex: 0 0 auto; }
.mis-assistant-msg { margin-top: 10px; font-size: 13px; text-align: left; }
.mis-assistant-msg.ok { color: #2e7d6f; }
.mis-assistant-msg.err { color: #c62828; }
.mis-dialog-actions .ok:disabled { opacity: 0.5; cursor: not-allowed; }
.mis-assistant-list { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.mis-assistant-list-title { margin-bottom: 8px; color: #8aa0b4; font-size: 12px; font-weight: 700; }
.mis-assistant-empty { padding: 10px 0; color: #8aa0b4; font-size: 13px; text-align: center; }
.mis-assistant-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.mis-assistant-item-name { flex: 1; min-width: 0; overflow: hidden; color: #263f57; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mis-assistant-item-phone { color: #6d8193; font-size: 12px; }
