/* =========================================================
   H5 证书查询页 & 详情页样式
   浅蓝色调，左右分栏（移动端堆叠）
   ========================================================= */
:root {
  --c-bg:          #2C72C4;   /* 主背景（再加深2档，纯蓝色相） */
  --c-nav:         #3C7CC7;   /* 左侧导航 */
  --c-main:        #5C90CC;   /* 主区域 */
  --c-main-hover:  #1E5FA8;   /* hover 用更深蓝点缀 */
  --c-white:       #FFFFFF;
  --c-text:        #FFFFFF;   /* 主文字纯白 */
  --c-label:       #EAF3FA;   /* 标签近白略带蓝 */
  --c-muted:       #D5E7F2;   /* 辅助浅蓝白 */
  --c-input-text:  #333333;
  --radius:        4px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-text); text-decoration: none; }

.layout {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px 16px;
}
.card-wrap {
  display: flex;
  width: 100%;
  max-width: 1000px;
  background: var(--c-bg);
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* 左侧导航 */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 24px 16px;
  background: var(--c-nav);
  border-radius: 4px;
  display: flex; flex-direction: column;
}
.sidebar .title {
  font-size: 18px; font-weight: bold; text-align: center;
  margin: 8px 0 24px;
}
.sidebar .nav-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 16px;
  color: var(--c-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  margin-bottom: 12px;
  font-family: inherit;
  transition: all .15s;
}
.sidebar .nav-item:hover { background: rgba(255,255,255,.45); color: var(--c-text); }
.sidebar .nav-item.active {
  background: var(--c-white);
  border-color: var(--c-main-hover);
  color: var(--c-main-hover);
  font-weight: bold;
}

/* 右侧主区 */
.main {
  flex: 1;
  padding: 28px 32px;
  background: var(--c-main);
  border-radius: 4px;
  display: flex; flex-direction: column;
}
.topbar {
  display: flex; justify-content: flex-end;
  margin-bottom: 12px;
}
.topbar .home {
  font-size: 14px; color: var(--c-label);
}
.topbar .home:hover { color: var(--c-main-hover); text-decoration: underline; }
.page-title {
  font-size: 24px; font-weight: bold;
  margin: 4px 0 24px;
}

/* 表单 - 查询页 */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 14px;
  color: var(--c-label);
  margin-bottom: 6px;
}
.form-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid #cfe2f7;
  background: var(--c-white);
  color: var(--c-input-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.form-row input[type="text"]:focus { border-color: var(--c-main-hover); }

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--c-main-hover);
  color: #fff;
  font-weight: bold;
}
.btn-primary:hover { background: #3A7BC8; }
.btn-block { display: block; width: 100%; }

/* 查询说明 */
.notes {
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--c-muted);
}
.notes .note-title { font-weight: bold; margin-bottom: 8px; color: var(--c-text); }
.notes ol {
  margin: 0; padding-left: 22px;
}
.notes ol li { margin-bottom: 4px; color: var(--c-muted); }

/* 提示框 */
.toast {
  position: fixed; left: 50%; top: 60%;
  transform: translate(-50%, -50%);
  background: rgba(51,51,51,.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  display: none;
  z-index: 999;
}

/* 查询结果表单（详情页） */
.result-form {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px 16px;
  align-items: center;
  padding: 4px 0;
}
.result-form label { font-size: 14px; color: var(--c-label); font-weight: bold; }
.result-form .value {
  background: var(--c-white);
  color: var(--c-input-text);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  word-break: break-all;
  border: 1px solid #d8e6f1;
}
.result-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px;
  flex-wrap: wrap; gap: 12px;
}
.result-bottom .qr { width: 110px; height: 110px; background: #fff; padding: 6px; border-radius: var(--radius); }
.result-bottom .qr img { width: 100%; height: 100%; }

.alert {
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(255,255,255,.7); color: var(--c-text); font-size: 14px;
  margin-bottom: 16px;
  border-left: 4px solid var(--c-main-hover);
}

/* 移动端 */
@media (max-width: 768px) {
  .card-wrap { flex-direction: column; max-width: 100%; }
  .sidebar { width: 100%; padding: 16px; }
  .sidebar .title { margin-top: 0; }
  .sidebar .nav-item { display: inline-block; width: auto; margin: 0 6px 0 0; }
  .main { padding: 20px 18px; }
  .result-form { grid-template-columns: 1fr; }
}
