/* ============================================================
   答题卡制作工具 - 列表页样式
   设计语言：浅色卡片 + 蓝色主色 + 圆角 + 轻阴影
   ============================================================ */

/* ---------- 基础 ---------- */
body {
  background-color: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
}

/* ---------- 顶部导航 ---------- */
.card-top {
  height: 56px;
  line-height: 56px;
  width: 100%;
  background: linear-gradient(90deg, #2c3e50 0%, #3d566e 100%);
  z-index: 10;
  text-align: center;
  color: #fff;
  position: fixed;
  top: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.cardtop-txt {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 3px;
}

/* ---------- 主容器 ---------- */
.container {
  background-color: #fff;
  padding: 0;
  margin-top: 88px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.container .desc {
  position: relative;
  top: -50px;
  font-size: 11.5px;
  color: rgba(255, 0, 0, 0.54);
}

/* ---------- 标签页 ---------- */
.nav-tabs {
  margin: 0;
  padding: 0 30px;
  border-bottom: 2px solid #f0f0f0;
  font-size: 15px;
  background: #fff;
}
.nav-tabs > li {
  margin-bottom: -2px;
}
.nav-tabs > li > a {
  color: #6b7280;
  border: none !important;
  padding: 16px 24px;
  margin-right: 0;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-tabs > li > a:hover {
  color: #1677ff;
  background: transparent;
  border-color: transparent;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
  color: #1677ff;
  border: none;
  background: transparent;
  border-bottom: 2px solid #1677ff !important;
  margin-bottom: -2px;
}

/* ---------- 操作栏 ---------- */
.createdcard {
  margin: 24px 30px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.createdcard a {
  color: #fff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1677ff;
  height: 36px;
  line-height: 1;
  padding: 0 18px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(22, 119, 255, 0.25);
}
.createdcard a:hover {
  background-color: #4096ff;
  box-shadow: 0 4px 8px rgba(22, 119, 255, 0.35);
}
.createdcard button {
  height: 36px;
  font-size: 14px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 500;
  transition: all 0.2s;
}
.createdcard .template-button {
  background-color: #1677ff;
  border: 1px solid #1677ff;
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 2px 4px rgba(22, 119, 255, 0.25);
}
.createdcard .template-button:hover {
  background-color: #4096ff;
  border-color: #4096ff;
  box-shadow: 0 4px 8px rgba(22, 119, 255, 0.35);
}

/* 搜索框与右浮动按钮 */
.fr {
  display: inline-flex;
  align-items: center;
  position: relative;
}
/* 操作栏中删除按钮负责把右侧元素推到最右 */
.createdcard > #btnDelete {
  margin-left: auto;
}
.fr i {
  vertical-align: middle;
}
.fr input {
  height: 36px;
  font-size: 14px;
  padding: 0 36px 0 14px;
  width: 260px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fr input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}
.search {
  display: inline-block;
  position: relative;
}
.search input {
  height: 36px;
  font-size: 14px;
  padding: 0 36px 0 14px;
  width: 260px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}
.searchimg {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
}
.recycle-btn {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ---------- 表格区 ---------- */
.tablesty {
  margin: 0 30px 24px;
}

/* 筛选栏 */
.tableTop {
  border: 1px solid #f0f0f0;
  border-bottom: none;
  height: 48px;
  line-height: 48px;
  background: #fafafa;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
}
.filterlist {
  margin-left: 20px;
  margin-right: 0;
  color: #6b7280;
  font-size: 14px;
}
.list {
  display: inline-flex;
  margin: 0;
  padding: 0;
}
.tableTop ul li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  margin-right: 24px;
  font-size: 14px;
  color: #4b5563;
}
.tableTop ul li label {
  margin: 0;
  cursor: pointer;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
}
.tableTop ul li input {
  vertical-align: middle;
  margin-right: 6px;
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
  cursor: pointer;
}

/* 表格 */
.table {
  margin-bottom: 0;
}
.table.table-bordered {
  border: 1px solid #f0f0f0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
#acards tr td,
.table thead tr th {
  padding: 0 16px;
  height: 48px;
  line-height: 48px;
  vertical-align: middle;
  font-size: 14px;
}
#acards tr td select,
.table thead tr th {
  height: 26px;
  line-height: 26px;
}
.table thead tr th {
  background: #fafafa;
  color: #374151;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0 !important;
  border-top: none !important;
}
.table thead tr th:first-child {
  vertical-align: middle;
}
.table > thead > tr > th,
.table > tbody > tr > td {
  border-color: #f0f0f0;
}
#acards tr {
  transition: background-color 0.15s;
}
#acards tr:hover {
  background-color: #f5faff;
}
#rcards tr {
  transition: background-color 0.15s;
}
#rcards tr:hover {
  background-color: #fff8f0;
}

/* 复选框 */
input.selectbox {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  accent-color: #1677ff;
  cursor: pointer;
}

/* 操作链接 */
#acards td a,
#rcards td a {
  margin-right: 18px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  color: #1677ff;
  transition: color 0.15s;
}
#acards td a:hover,
#rcards td a:hover {
  color: #4096ff;
}
#acards td a i,
#rcards td a i {
  margin-right: 3px;
  font-size: 13px;
}
#rcards td a.op-purge {
  color: #ff4d4f;
}
#rcards td a.op-purge:hover {
  color: #d9363e;
}
#acards td a.op-tpl {
  color: #722ed1;
}
#acards td a.op-tpl:hover {
  color: #9254de;
}
#acards td a.op-secret i {
  margin-right: 4px;
  opacity: 0.8;
}
.showstate {
  margin-left: 2px;
}

/* ---------- 分页 ---------- */
.footer {
  height: 52px;
  line-height: 52px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.allnum {
  width: auto;
  float: none;
  line-height: 52px;
  font-size: 13px;
  color: #6b7280;
}
.allnum span {
  color: #1677ff;
  font-weight: 600;
  margin: 0 3px;
}
.showpage {
  float: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.showpage button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: #4b5563;
  font-size: 14px;
  transition: all 0.15s;
}
.showpage button:hover {
  color: #1677ff;
  border-color: #1677ff;
}
.showpage button:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
  border-color: #f0f0f0;
}
.showpage input {
  width: 56px;
  height: 34px;
  margin-left: 0;
  text-align: center;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.showpage input:focus {
  border-color: #1677ff;
}

/* ---------- 弹窗关闭 ---------- */
.close {
  position: relative;
  opacity: 1;
  filter: alpha(opacity=100);
}
.close:hover {
  opacity: 0.8;
  filter: alpha(opacity=80);
  outline: none;
}
.closeimg {
  position: absolute;
  width: 28px;
  height: 28px;
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYA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BQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpAQKWUAAAHNSURBVHjavJZLa8JAEIBjFO8FX9FTaaH5DX2fWqT0T+ivsX+nPXlMSsBU8YGKr94LPRTqqZduZ8JuiCHJzkbTge+UZL7sY2Y3p8kjB1wBD8AFcAoc8WdfwAZwgBfABpiWMnSgBax5Egpr/o2uKjsGXAVRGJfnIMUt8LmHTIA5rmWyO+DnADIB5rqPk50B3weUCbY8907k91wzyprmg8JWhjJBO1hnsVu/1+uxwWDAKpVKbDLDMNh4PGa2bctKBl3aTdKfDYdDhjGdTiOl9XqdLRYL7x3XdWWjRJfWSXqpVqux+XzuJZzNZjvSoGwymbByuSwTostvR2RptVrdkeF0EmSIhcIPyqKjJChdLpeqMsZd9EJHKcpEjEYjFZnXCJSabKFQ8BBRLBY1XVfu07QpbTQa/jTiyMRIcZpxjVWm1KbIVquVLyuVSt5uTSH1Ns0TVYY1iTLxDKVYnwrSjrTwRcKwLEqKHYlS+ImtzbIs5jhOpCwoxS7T7XZlrc3fYe3/bN7ieHrLUNYPH08YJj8ssziAzbiabGZwxWjKGkHzQCPdUmTB6e3vuWZm2ovwRkG0kV2Ec0TxJfAInAMnoav+O7/qPwOvwG9Ssj8BBgCF4Owidoas+gAAAABJRU5ErkJggg==)
    no-repeat;
  top: -28px;
  display: inline-block;
}

/* ---------- 主按钮 ---------- */
.btn-primary {
  background-color: #1677ff;
  border-color: #1677ff;
}
.btn-primary:hover {
  background-color: #4096ff;
  border-color: #4096ff;
}
.btn-default {
  border: 1px solid #d9d9d9;
  color: #4b5563;
  background: #fff;
}
.btn-default:hover {
  color: #1677ff;
  border-color: #1677ff;
  background: #fff;
}

/* ---------- 加载 ---------- */
#recycle_loading .modal-dialog {
  position: absolute;
  margin: 0 auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.loading-box {
  overflow: hidden;
  width: 300px;
  height: 120px;
  margin: 150px auto;
  background: #fff;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.loading-title {
  margin-top: 20px;
  color: #1677ff;
  font-size: 15px;
}
.loading-main {
  margin-top: 20px;
  width: 35px;
  height: 35px;
  display: inline-block;
  border: 5px solid hsla(0, 0%, 74%, 0.25);
  border-left-color: #1677ff;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: rotate 0.6s infinite linear;
}
@keyframes rotate {
  to {
    transform: rotate(1turn);
  }
}

/* ---------- Toast ---------- */
.page-toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(40, 45, 55, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  max-width: 70%;
  text-align: center;
}
.page-toast.in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 模板列表 ---------- */
.tpl-list .tpl-item {
  display: block;
  margin: 0 0 8px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-weight: normal;
  transition: border-color 0.15s, background 0.15s;
}
.tpl-list .tpl-item:hover {
  border-color: #1677ff;
  background: #f5faff;
}
.tpl-list .tpl-item.checked {
  border-color: #1677ff;
  background: #eaf4fe;
}
.tpl-list .tpl-item input {
  margin-right: 8px;
  vertical-align: 1px;
  accent-color: #1677ff;
}
.tpl-list .tpl-name {
  font-size: 14px;
  color: #1f2937;
}
.tpl-list .tpl-spec {
  display: block;
  margin: 3px 0 0 26px;
  font-size: 12px;
  color: #6b7280;
}
.tpl-note {
  margin: 6px 2px 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
}
.tpl-group {
  margin: 10px 2px 6px;
  font-size: 12px;
  font-weight: bold;
  color: #6b7280;
  letter-spacing: 1px;
}
.tpl-list .tpl-item {
  position: relative;
}
.tpl-list .tpl-empty {
  margin: 0 0 8px;
  padding: 10px 14px;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.7;
}
.tpl-list .tpl-del {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  line-height: 19px;
  text-align: center;
  border-radius: 50%;
  color: #ff4d4f;
  font-size: 15px;
  text-decoration: none;
}
.tpl-list .tpl-del:hover {
  background: #fff1f0;
  color: #d9363e;
  text-decoration: none;
}

/* ---------- 管理员模板学科筛选标签 ---------- */
.subj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 2px 10px;
}
.subj-tab {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}
.subj-tab:hover {
  background: #e5e7eb;
}
.subj-tab.active {
  background: #1677ff;
  color: #fff;
}
.subj-cnt {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.75;
}
.admin-tpl-wrap {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-tpl-wrap .tpl-item {
  display: block;
}
