/* ============================================================
   鸿蒙应用开发实训平台 现代化样式表 (HarmonyOS NEXT 极客蓝风)
   ============================================================ */

:root {
  --primary: #0A59F7;
  --primary-hover: #0847C5;
  --primary-light: #EBF2FF;
  --primary-glow: rgba(10, 89, 247, 0.25);
  
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --bg-main: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;

  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --header-height: 64px;
  --sidebar-width: 320px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(10, 89, 247, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "HarmonyOS Sans", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.app-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, #0A59F7 0%, #3B82F6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.sub-title {
  font-size: 12px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.user-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
}

.user-badge.admin {
  background: #FEF3C7;
  color: #D97706;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--border-color);
  padding-left: 10px;
  margin-left: 4px;
}

/* 布局体系 */
.app-layout {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* 左侧实训大纲 */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.task-tree-container {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.lesson-group {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #FAFAFC;
  overflow: hidden;
}

.lesson-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F1F5F9;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.2s;
}

.lesson-header:hover {
  background: #E2E8F0;
}

.lesson-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.task-item:hover {
  background: #F1F5F9;
  color: var(--primary);
}

.task-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.task-number-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E2E8F0;
  color: var(--text-secondary);
}

.task-item.active .task-number-badge {
  background: var(--primary);
  color: #fff;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  background: #F8FAFC;
  font-size: 12px;
  color: var(--text-muted);
}

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

/* 右侧主阅读区 */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow: hidden;
}

.content-toolbar {
  height: 48px;
  padding: 0 32px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.crumb-task {
  font-weight: 600;
  color: var(--text-main);
}

.content-container {
  flex: 1;
  height: calc(100vh - var(--header-height) - 48px);
  overflow-y: scroll;
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: #94A3B8 #F1F5F9;
}

.content-container::-webkit-scrollbar {
  width: 10px;
}

.content-container::-webkit-scrollbar-track {
  background: #F8FAFC;
}

.content-container::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 5px;
  border: 2px solid #F8FAFC;
}

.content-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.markdown-body {
  width: 100%;
  max-width: 960px;
  background: var(--bg-card);
  padding: 40px 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: #1E293B;
  font-size: 15px;
  line-height: 1.8;
}

/* Markdown 排版增强 */
.markdown-body h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.markdown-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 14px 0;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.markdown-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px 0;
}

.markdown-body p {
  margin-bottom: 14px;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.markdown-body li {
  margin-bottom: 6px;
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #1E3A8A;
  font-size: 14px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.markdown-body table th,
.markdown-body table td {
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: left;
}

.markdown-body table th {
  background: #F8FAFC;
  font-weight: 600;
  color: var(--text-main);
}

.markdown-body table tr:nth-child(even) {
  background: #FAFAFC;
}

/* 代码块增强与复制 */
.code-wrapper {
  position: relative;
  margin: 20px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1E293B;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  font-size: 12px;
  font-family: monospace;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.markdown-body pre {
  margin: 0 !important;
  border-radius: 0 !important;
  background: #0F172A !important;
  padding: 16px 20px !important;
  overflow-x: auto;
}

.markdown-body code {
  font-family: "JetBrains Mono", Consolas, "Fira Code", monospace;
  font-size: 13.5px;
}

.markdown-body p > code,
.markdown-body li > code {
  background: #EEF2F6;
  color: #0A59F7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-outline {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.btn-ghost.danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

/* 弹窗通用样式 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-large {
  max-width: 980px;
  height: 85vh;
}

.modal-card-highlight {
  border: 2px solid var(--warning);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header.warning {
  background: #FFFBEB;
  color: #B45309;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* 表单组件 */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.input-with-icon input {
  padding-left: 38px !important;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  background: #F8FAFC;
  transition: all 0.2s;
  color: var(--text-main);
}

input:focus, textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-warning {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #92400E;
}

.login-tip {
  font-size: 12px;
  color: var(--text-secondary);
  background: #F1F5F9;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* 教师管理控制台 Tab & 表格 */
.modal-tabs {
  display: flex;
  background: #F1F5F9;
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

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

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #FFFFFF;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-input-box {
  position: relative;
  width: 300px;
  display: flex;
  align-items: center;
}

.search-input-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.search-input-box input {
  padding-left: 34px !important;
}

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

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.data-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.success {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.warning {
  background: var(--warning-light);
  color: var(--warning);
}

/* 在线实训编辑器 */
.editor-layout {
  display: flex;
  gap: 16px;
  height: calc(85vh - 180px);
  margin-top: 14px;
}

.editor-file-list {
  width: 240px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FAFAFC;
  overflow-y: auto;
  padding: 8px;
}

.editor-file-item {
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12.5px;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-file-item:hover {
  background: #E2E8F0;
}

.editor-file-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.editor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.editor-toolbar {
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#taskMarkdownEditor {
  flex: 1;
  border: none;
  border-radius: 0;
  background: #0F172A;
  color: #E2E8F0;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  padding: 16px;
}

/* Toast 提示通知 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
}

.toast-success { background: #10B981; }
.toast-error { background: #EF4444; }
.toast-info { background: #0A59F7; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 移动端与响应式适配 */
.mobile-only { display: none; }

@media (max-width: 900px) {
  .mobile-only { display: flex; }
  .app-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 90;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .content-container {
    padding: 16px;
  }
  .markdown-body {
    padding: 24px 20px;
  }
}

/* ============================================================
   实训截图提交区样式 (Student Submission Panel)
   ============================================================ */
.content-scroll-wrap {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: fit-content;
  padding-bottom: 60px;
}

.submission-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 24px 32px;
  margin-bottom: 40px;
}

.submission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.submission-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.submission-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #F1F5F9;
  color: var(--text-muted);
}

.submission-status-badge.submitted {
  background: var(--success-light);
  color: var(--success);
}

.unauth-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px dashed var(--border-color);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: #F8FAFC;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 8px;
}

.dropzone-text {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.selected-preview {
  position: relative;
  display: inline-block;
  margin-top: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.selected-preview img {
  max-width: 320px;
  max-height: 200px;
  display: block;
  object-fit: cover;
}

.btn-remove-preview {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-preview:hover {
  background: var(--danger);
}

.submitted-view {
  background: #F8FAFC;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.submitted-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.submitted-comment {
  font-size: 13px;
  color: var(--text-secondary);
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.submitted-image-preview {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  width: fit-content;
}

.submitted-image-preview img {
  max-width: 420px;
  max-height: 240px;
  display: block;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.submitted-image-preview:hover img {
  transform: scale(1.02);
}

.preview-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.submitted-image-preview:hover .preview-hint {
  opacity: 1;
}

/* ============================================================
   教师后台学生截图批阅视图 (Teacher Review Grid)
   ============================================================ */
.select-input {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  color: var(--text-main);
}

.stats-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-pill {
  background: #F1F5F9;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.stat-pill strong {
  color: var(--primary);
}

.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-height: calc(85vh - 200px);
  overflow-y: auto;
  padding: 4px;
}

.submission-item-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.submission-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.submission-card-header {
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-student-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.sub-task-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}

.submission-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.submission-card-img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0F172A;
  cursor: pointer;
}

.submission-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.submission-card-img-wrap:hover img {
  transform: scale(1.05);
}

.sub-meta-row {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-comment-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  background: #F8FAFC;
  padding: 6px 10px;
  border-radius: 4px;
}

/* ============================================================
   Lightbox 全屏大图查看器
   ============================================================ */
.lightbox-backdrop {
  z-index: 2000;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--primary);
}

.lightbox-caption {
  margin-top: 10px;
  color: #E2E8F0;
  font-size: 13px;
  font-weight: 500;
}

