* { margin: 0; padding: 0; box-sizing: border-box; }
html{scroll-behavior:smooth;scroll-padding-top:3.5rem}
body {
  font-family: 'Inter',-apple-system,BlinkMacSystemFont,'SF Pro Display','PingFang SC','Microsoft YaHei',sans-serif;
  background: #f8fafc; color: #1e293b; line-height: 1.6;
  min-height: 100vh;padding-top:3.5rem;-webkit-font-smoothing:antialiased;
}

/* 顶部导航 */
.top-nav{
  position:fixed;top:0;left:0;right:0;z-index:200;
  background:#0f172a;box-shadow:0 1px 8px rgba(0,0,0,.15);
}
.nav-inner{
  max-width:960px;margin:0 auto;display:flex;align-items:center;gap:.6rem;
  padding:0 1rem;overflow-x:auto;-webkit-overflow-scrolling:touch;
}
.nav-inner a{
  color:rgba(255,255,255,.75);text-decoration:none;font-size:.82rem;font-weight:500;
  padding:.75rem .2rem;white-space:nowrap;border-bottom:2px solid transparent;
  transition:all .2s;flex-shrink:0;
}
.nav-inner a:hover,.nav-inner a.active{color:#fff;border-bottom-color:#3b82f6;text-decoration:none}
.nav-title{color:#fff;font-weight:700;font-size:.9rem;margin-right:auto;white-space:nowrap;flex-shrink:0}
.nav-home{color:rgba(255,255,255,.6)!important;font-size:.8rem!important}
.nav-home:hover{color:#fff!important}
}
.app {
  max-width: 960px; width: 100%; background: #fff;
  border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.06);
  padding: 2.5rem; margin: 1.5rem auto; border: 1px solid #e2e8f0;
}
.hidden { display: none !important; }
h1 { text-align: center; color: #0f172a; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.8rem; margin-bottom: 1.5rem; font-weight:800; }
h2 { color: #0f172a; margin: 1.5rem 0 1rem; border-left: 4px solid #2563eb; padding-left: 0.5rem; background:#eff6ff; border-radius:0 6px 6px 0; }
h3 { margin: 1rem 0 0.5rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: flex-start; }
.form-group { margin-bottom: 1rem; flex: 1; min-width: 200px; }
label { display: block; font-weight: 600; color: #0f172a; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%; padding: 0.6rem; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: 1rem; font-family: inherit; transition: border-color .2s;
}
input:focus, select:focus, textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
select { background: white; }
button {
  background: #2563eb; color: white; border: none; padding: 0.6rem 1.5rem;
  border-radius: 8px; font-size: 1rem; cursor: pointer; font-weight: 600;
  transition: all .2s; margin: 0.2rem; font-family: inherit;
}
button:hover { background: #1d4ed8; transform: translateY(-1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: #e2e8f0; color: #475569; }
button.secondary:hover { background: #cbd5e1; }
button.danger { background: #c44536; }
button.danger:hover { background: #a33a2e; }
button.success { background: #16a34a; }
button.success:hover { background: #15803d; }
.task-list { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.task-list th { background: #1e3a5f; color: white; padding: 10px; text-align: left; }
.task-list td { border: 1px solid #e2e8f0; padding: 10px; vertical-align: middle; }
.task-list tr:hover td { background: #f8faff; }
.card {
  background: #fafbfc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 1.2rem; margin-bottom: 1rem;
}
.card.active { border-color: #2563eb; background: #eff6ff; }

/* 模板卡片 */
.tpl-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tpl-card .tpl-info { flex: 1; min-width: 200px; }
.tpl-card .tpl-name-row { display: flex; align-items: center; gap: 0.5rem; }
.tpl-card .tpl-actions { display: flex; gap: 0.3rem; flex-shrink: 0; flex-wrap: wrap; }

.img-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0.8rem 0; }
.img-item { position: relative; max-width: 150px; cursor: pointer; }
.img-item img { width: 100%; border-radius: 6px; border: 1px solid #ccc; display: block; }
.img-item .remove-img {
  position: absolute; top: -6px; right: -6px;
  background: #c44536; color: white; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  font-size: 14px; line-height: 22px; text-align: center; cursor: pointer;
}
.review-btns { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.review-btns button { padding: 0.3rem 1rem; border: 2px solid #cbd5e1; background: white; }
.review-btns button.pass { border-color: #16a34a; color: #16a34a; }
.review-btns button.fail { border-color: #c44536; color: #c44536; }
.review-btns button.active.pass { background: #16a34a; color: white; }
.review-btns button.active.fail { background: #c44536; color: white; }

/* Toast */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #333; color: white; padding: 0.8rem 1.5rem;
  border-radius: 8px; animation: toastIn 0.25s ease; min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } }

/* Loading 动画 */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 进度条 */
.progress-bar { background: #e2e8f0; border-radius: 20px; height: 12px; overflow: hidden; margin: 1rem 0; }
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, #2563eb, #16a34a); border-radius: 20px; transition: width 0.4s ease; }
.progress-text { text-align: center; font-size: 0.9rem; color: #64748b; margin-bottom: 0.5rem; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9998;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
  animation: lbFade 0.2s;
}
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
@keyframes lbFade { from { opacity: 0; } }

/* 模态框（成绩单） */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9997;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: #fff; border-radius: 12px; padding: 2rem; max-width: 900px;
  width: 95%; max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.modal-content th { background: #1e3a5f; color: #fff; padding: 8px; text-align: left; }
.modal-content td { border: 1px solid #e2e8f0; padding: 8px; vertical-align: top; }
.modal-content img { max-width: 120px; }
.modal-close { position: absolute; top: 12px; right: 12px; background: #e2e8f0; color: #475569; padding: 4px 12px; }

/* 公司水印 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('../images/LOGO.png') center 45% no-repeat;
  background-size: min(380px, 50vw) auto;
  opacity: 0.06;
  pointer-events: none;
  z-index: 500;
}

@media (max-width: 600px) { .app { padding: 1.5rem; } .modal-content { padding: 1rem; } }
@media print {
  body { background: white; }
  .no-print { display: none !important; }
  body::after { display: none !important; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
  .modal-overlay { background: white; position: static; }
  .modal-content { box-shadow: none; padding: 0; max-height: none; }
  .modal-content img { max-width: 100px; }

/* 状态标签 */
.status-tag{display:inline-block;padding:.2rem .7rem;border-radius:100px;font-size:.78rem;font-weight:600;white-space:nowrap}
.status-tag.pending{background:#f1f5f9;color:#64748b}
.status-tag.submitted{background:#dbeafe;color:#1d4ed8}
.status-tag.reviewed{background:#dcfce7;color:#16a34a}

/* 批量操作 */
.batch-bar{display:flex;align-items:center;gap:.8rem;padding:.6rem 1rem;background:#f8fafc;border-radius:8px;margin-bottom:.8rem;border:1px solid #e2e8f0}
.batch-bar.hidden{display:none}
.table-cb{width:20px;height:20px;cursor:pointer;accent-color:#2563eb}
.task-list .cb-col{width:40px;text-align:center}
.task-list .status-col{width:100px}
}
