/* =============================================
   颍上博扬职业培训学校 - 证书查询系统样式
   ============================================= */

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

:root {
  --blue-50: #E6F1FB;
  --blue-100: #B5D4F4;
  --blue-600: #185FA5;
  --blue-700: #0C447C;
  --blue-800: #042C53;
  --gold: #BA7517;
  --gold-light: #FAEEDA;
  --green-600: #3B6D11;
  --green-50: #EAF3DE;
  --red-600: #A32D2D;
  --red-50: #FCEBEB;
  --gray-50: #F8F7F4;
  --gray-100: #EEECEA;
  --gray-200: #D3D1C7;
  --gray-500: #5F5E5A;
  --gray-700: #444441;
  --gray-900: #1C1C1A;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  background: var(--blue-700);
  color: white;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.school-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.school-info h1 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}
.school-info p {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 1px;
}
.nav-tag {
  font-size: 13px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
}

/* ── Main ── */
.main-content {
  flex: 1;
  max-width: 900px;
  margin: 32px auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Query Section ── */
.query-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--gray-200);
  padding: 32px;
  margin-bottom: 20px;
}
.query-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--gray-100);
}
.query-header h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.subtitle {
  font-size: 13px;
  color: var(--gray-500);
}
.query-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}
.form-group input {
  padding: 10px 14px;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--gray-900);
  background: white;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-group input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.08);
}
.btn-query {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--blue-700);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.btn-query:hover { background: var(--blue-800); }

.query-tips {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--blue-600);
}
.tips-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-600);
  margin-bottom: 6px;
}
.query-tips ul {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.query-tips li {
  font-size: 12px;
  color: var(--gray-500);
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-card {
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}
.stat-num {
  font-size: 24px;
  font-weight: 500;
  color: var(--blue-700);
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ── Result ── */
.result-back {
  margin-bottom: 16px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: white;
  border: 0.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  font-family: inherit;
}
.btn-back:hover { background: var(--gray-50); }

.cert-result-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--gray-200);
  overflow: hidden;
}
.cert-banner {
  background: linear-gradient(135deg, #0C447C, #185FA5);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cert-banner-text h3 {
  font-size: 15px;
  font-weight: 500;
  color: white;
}
.cert-banner-text p {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.valid-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.valid-dot {
  width: 7px;
  height: 7px;
  background: #97C459;
  border-radius: 50%;
}

.cert-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}
.cert-photo-col {
  padding: 28px 20px 28px 28px;
  border-right: 0.5px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cert-photo {
  width: 140px;
  height: 180px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  flex-shrink: 0;
}
.cert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
}
.photo-placeholder svg { opacity: 0.4; }
.photo-placeholder span { font-size: 11px; }

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.qr-label {
  font-size: 11px;
  color: var(--gray-500);
  text-align: center;
}
#qrCanvas {
  border-radius: 6px;
  border: 0.5px solid var(--gray-200);
}

.cert-info-col {
  padding: 28px;
}
.cert-info-col h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--gray-100);
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.info-item {}
.info-item .info-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 3px;
}
.info-item .info-value {
  font-size: 14px;
  color: var(--gray-900);
  font-weight: 500;
}
.info-item.full-width {
  grid-column: 1 / -1;
}
.cert-level-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.level-high { background: var(--gold-light); color: var(--gold); }
.level-mid { background: var(--blue-50); color: var(--blue-600); }
.level-low { background: var(--green-50); color: var(--green-600); }

.cert-footer {
  padding: 16px 28px;
  background: var(--gray-50);
  border-top: 0.5px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cert-footer-text {
  font-size: 12px;
  color: var(--gray-500);
}
.verify-seal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green-600);
  font-weight: 500;
}

/* ── Not Found ── */
.notfound-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--gray-200);
  padding: 60px 40px;
  text-align: center;
}
.notfound-icon { margin-bottom: 20px; }
.notfound-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.notfound-card p { font-size: 14px; color: var(--gray-500); margin-bottom: 8px; }
.contact-tip { color: var(--gray-700) !important; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 20px;
  border-top: 0.5px solid var(--gray-200);
  background: white;
  margin-top: auto;
}
.site-footer p {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.footer-sub { opacity: 0.6; }

/* ── Util ── */
.hidden { display: none !important; }

/* ── Certificate Print Page ── */
.cert-print-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .main-content { margin: 16px auto; padding: 0 14px; }
  .query-card { padding: 20px; }
  .cert-body { grid-template-columns: 1fr; }
  .cert-photo-col { border-right: none; border-bottom: 0.5px solid var(--gray-100); flex-direction: row; align-items: flex-start; padding: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .school-info p { display: none; }
}
