/* ===== 电子培训证明查询系统 共用样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(160deg, #eef4fb 0%, #f8fafc 100%);
  min-height: 100vh;
  color: #333;
}
a { text-decoration: none; color: inherit; }

/* 顶部 */
.topbar {
  background: linear-gradient(90deg, #1e5eff 0%, #2f7bff 100%);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(30, 94, 255, .25);
}
.topbar .logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.topbar .logo span { margin-right: 8px; }
.topbar .admin-link {
  font-size: 14px; opacity: .85; padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 20px;
  transition: all .2s;
}
.topbar .admin-link:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* 后台页签 */
.tabs {
  max-width: 960px; margin: 22px auto 0; padding: 0 16px;
  display: flex; gap: 8px;
}
.tabs .tab {
  border: none; background: #e8eef8; color: #5a6b85; cursor: pointer;
  padding: 10px 22px; border-radius: 10px 10px 0 0; font-size: 14px; font-weight: 600;
  transition: all .2s;
}
.tabs .tab.active { background: #fff; color: #1e5eff; box-shadow: 0 -2px 8px rgba(30,94,255,.08); }

.container { max-width: 960px; margin: 40px auto 60px; padding: 0 16px; }

/* 查询卡片 */
.card {
  background: #fff; border-radius: 14px; padding: 32px;
  box-shadow: 0 6px 24px rgba(30, 94, 255, .08);
}
.card h1 { font-size: 24px; text-align: center; color: #16325c; margin-bottom: 6px; }
.card .sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 26px; }

.search-form { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.search-form .field { display: flex; flex-direction: column; width: 280px; }
.search-form label { font-size: 13px; color: #666; margin-bottom: 6px; }
.search-form input {
  height: 44px; padding: 0 14px; border: 1px solid #d7e0ee; border-radius: 8px;
  font-size: 15px; transition: border-color .2s, box-shadow .2s; outline: none;
}
.search-form input:focus { border-color: #1e5eff; box-shadow: 0 0 0 3px rgba(30,94,255,.12); }
.btn {
  border: none; border-radius: 8px; cursor: pointer; font-size: 15px;
  transition: all .2s; display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary {
  background: linear-gradient(90deg, #1e5eff, #2f7bff); color: #fff;
  padding: 0 34px; height: 44px; font-weight: 600; box-shadow: 0 4px 14px rgba(30,94,255,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30,94,255,.4); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-ghost { background: #f0f4fb; color: #1e5eff; padding: 0 18px; height: 38px; }
.btn-ghost:hover { background: #e3ecfb; }
.btn-danger { background: #fff1f0; color: #e5484d; padding: 0 14px; height: 34px; font-size: 13px; }
.btn-danger:hover { background: #ffdcdb; }
.btn-sm { background: #eef4ff; color: #1e5eff; padding: 0 14px; height: 34px; font-size: 13px; }
.btn-sm:hover { background: #dde9ff; }

/* 提示 */
.tip { text-align: center; font-size: 13px; color: #999; margin-top: 20px; line-height: 1.8; }

/* 结果区 */
.result-area { margin-top: 30px; }
.result-empty { text-align: center; color: #b0b8c4; padding: 40px 0; font-size: 15px; }
.alert {
  text-align: center; padding: 14px; border-radius: 8px; font-size: 15px;
  background: #fff7e6; color: #ad6800; border: 1px solid #ffe1a8;
}
.cert-card {
  background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.06);
  padding: 22px; margin-bottom: 22px; border: 1px solid #eef1f6;
}
.cert-card .cert-title { font-size: 17px; color: #16325c; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.cert-card .cert-title .badge { font-size: 12px; color: #1e5eff; background: #eef4ff; padding: 3px 10px; border-radius: 12px; font-weight: 400; }
.cert-img-wrap {
  background: #f6f8fc; border-radius: 8px; padding: 12px; text-align: center;
  border: 1px dashed #d7e0ee; margin-bottom: 14px;
}
.cert-img-wrap img { max-width: 100%; max-height: 480px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.cert-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cert-info .item { font-size: 14px; color: #555; }
.cert-info .item b { color: #333; font-weight: 600; margin-left: 6px; }
.cert-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cert-actions a.btn { text-decoration: none; }
.no-img { color: #b0b8c4; font-size: 13px; padding: 20px; }

/* 加载动画 */
.spinner {
  width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;
  display: inline-block; vertical-align: -5px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer { text-align: center; color: #aab4c2; font-size: 13px; padding: 20px 0 40px; }

/* 后台表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #eef1f6; }
th { background: #f6f9fd; color: #555; font-weight: 600; white-space: nowrap; }
td img.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; background: #f0f4fb; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 13px; color: #666; }
.pager button { min-width: 34px; height: 32px; padding: 0 10px; border: 1px solid #d7e0ee; background: #fff; border-radius: 6px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .page-info { margin: 0 10px; }
