/* ============================================================
   证书查询页面样式
   电脑端 (min-width: 768px) 和 手机端 (max-width: 767px) 区分
   ============================================================ */

/* ===== FontAwesome 基础 ===== */
.cert-page .fa {
  display: inline-block;
  font-family: FontAwesome !important;
  font-style: normal !important;
  font-weight: normal !important;
  line-height: 1;
  font-size: inherit !important;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.cert-page .fa::before { font-size: inherit !important; }
.cert-page .fa-lg { font-size: 1.33333333em; line-height: .75em; vertical-align: -15%; }
.cert-page .fa-2x { font-size: 2em; }
.cert-page .fa-3x { font-size: 3em; }
.cert-page .fa-4x { font-size: 4em; }
.cert-page .fa-5x { font-size: 5em; }
.cert-page .fa-spin { animation: fa-spin 2s infinite linear; }
@keyframes fa-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ===== 容器与布局 ===== */
.cert-page .container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.cert-page .row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.cert-page .col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; box-sizing: border-box; }
.cert-page .col-sm-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; box-sizing: border-box; }
.cert-page .col-sm-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; box-sizing: border-box; }
.cert-page .col-sm-9 { flex: 0 0 75%; max-width: 75%; padding: 0 15px; box-sizing: border-box; }

/* ===== 卡片 ===== */
.cert-page .card { border: 1px solid rgba(0,0,0,.125); border-radius: .25rem; background: #fff; }
.cert-page .card-header { padding: .75rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,.125); }
.cert-page .card-body { padding: 1.25rem; flex: 1 1 auto; }
.cert-page .shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; }

/* ===== 背景色 ===== */
.cert-page .bg-primary { background-color: #1a6fb5!important; }
.cert-page .bg-info { background-color: #17a2b8!important; }
.cert-page .text-white { color: #fff!important; }
.cert-page .text-right { text-align: right!important; }
.cert-page .text-center { text-align: center!important; }
.cert-page .text-success { color: #28a745!important; }
.cert-page .text-primary { color: #007bff!important; }
.cert-page .text-muted { color: #6c757d!important; }

/* ===== 边框 ===== */
.cert-page .border-left { border-left: 1px solid #dee2e6!important; }

/* ===== 间距 ===== */
.cert-page .mb-0 { margin-bottom: 0!important; }
.cert-page .mb-3 { margin-bottom: 1rem!important; }
.cert-page .mt-3 { margin-top: 1rem!important; }
.cert-page .mt-4 { margin-top: 1.5rem!important; }
.cert-page .mt-2 { margin-top: .5rem!important; }
.cert-page .pl-3 { padding-left: 1rem!important; }
.cert-page .px-4 { padding-left: 1.5rem!important; padding-right: 1.5rem!important; }
.cert-page .py-5 { padding-top: 3rem!important; padding-bottom: 3rem!important; }
.cert-page .mr-2 { margin-right: .5rem!important; }
.cert-page .mx-auto { margin-left: auto!important; margin-right: auto!important; }

/* ===== 弹性布局 ===== */
.cert-page .d-flex { display: flex!important; }
.cert-page .d-none { display: none!important; }
.cert-page .d-md-block { display: block!important; }
.cert-page .align-items-center { align-items: center!important; }
.cert-page .justify-content-center { justify-content: center!important; }

/* ===== 列表 ===== */
.cert-page .list-unstyled { padding-left: 0; list-style: none; }

/* ===== 提示框 ===== */
.cert-page .alert { padding: .75rem 1.25rem; border: 1px solid transparent; border-radius: .25rem; }
.cert-page .alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
.cert-page .alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.cert-page .alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

/* ===== 表单 ===== */
.cert-page .form-group { margin-bottom: 1rem; }
.cert-page .form-control { display: block; width: 100%; height: calc(2.25rem + 2px); padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; color: #495057; background-color: #fff; background-clip: padding-box; border: 1px solid #ced4da; border-radius: .25rem; transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; box-sizing: border-box; }
.cert-page .form-control:focus { border-color: #80bdff; outline: 0; box-shadow: 0 0 0 .2rem rgba(0,123,255,.25); }

/* ===== 按钮 ===== */
.cert-page .btn { display: inline-block; font-weight: 400; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; border-radius: .25rem; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; cursor: pointer; }
.cert-page .btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; }
.cert-page .btn-info:hover { background-color: #138496; border-color: #117a8b; }
.cert-page .btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; }
.cert-page .btn-primary:hover { background-color: #0069d9; border-color: #0062cc; }
.cert-page .btn-sm { padding: .25rem .5rem; font-size: .875rem; line-height: 1.5; border-radius: .2rem; }

/* ===== 表格 ===== */
.cert-page .table { width: 100%; margin-bottom: 1rem; color: #212529; border-collapse: collapse; }
.cert-page .table th, .cert-page .table td { padding: .75rem; vertical-align: top; border-top: 1px solid #dee2e6; }
.cert-page .table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; }
.cert-page .table-bordered { border: 1px solid #dee2e6; }
.cert-page .table-bordered th, .cert-page .table-bordered td { border: 1px solid #dee2e6; }
.cert-page .table-hover tbody tr:hover { color: #212529; background-color: rgba(0,0,0,.075); }
.cert-page .thead-dark th { color: #fff; background-color: #343a40; border-color: #454d55; }
.cert-page .table-responsive { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== 杂项 ===== */
.cert-page .position { font-size: 14px; color: #666; }
.cert-page .pages { padding-top: 20px; padding-bottom: 40px; }
.cert-page .col-form-label { padding-top: calc(.375rem + 1px); padding-bottom: calc(.375rem + 1px); margin-bottom: 0; font-size: inherit; line-height: 1.5; }
.cert-page h3 { font-size: 1.4rem; }
.cert-page h4 { font-size: 1.2rem; }

/* ===== 查询须知面板 ===== */
.cert-page .notice-panel { display: flex; flex-wrap: wrap; }
.cert-page .notice-panel .notice-col { flex: 0 0 50%; max-width: 50%; padding: 0 15px; box-sizing: border-box; }
.cert-page .notice-panel .notice-col+.notice-col { border-left: 1px solid #dee2e6; }
.cert-page .notice-icon { font-size: 1.8rem; margin-right: 8px; vertical-align: middle; color: #1a6fb5; }

/* ===== 查询表单 ===== */
.cert-page .query-form { max-width: 600px; margin: 0 auto; }
.cert-page .query-form .form-row { display: flex; align-items: center; margin-bottom: 1rem; }
.cert-page .query-form .form-label { width: 90px; text-align: right; flex-shrink: 0; font-weight: 500; }
.cert-page .query-form .form-input-wrap { flex: 1; min-width: 0; }
.cert-page .captcha-wrap { display: flex; align-items: center; gap: 10px; }
.cert-page .captcha-wrap .form-control { width: 150px; flex-shrink: 0; }
.cert-page .captcha-wrap .codeimg { cursor: pointer; height: 38px; width: 120px; object-fit: cover; border-radius: 3px; border: 1px solid #ced4da; flex-shrink: 0; }

/* ===== 查询结果 - 卡片列表 (手机端显示) ===== */
.cert-page .cert-result-cards { display: none; }
.cert-page .cert-result-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.cert-page .cert-result-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.cert-page .cert-result-card .cert-card-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed #f0f0f0; }
.cert-page .cert-result-card .cert-card-row:last-child { border-bottom: none; }
.cert-page .cert-result-card .cert-card-label { color: #888; font-size: 13px; flex-shrink: 0; min-width: 60px; }
.cert-page .cert-result-card .cert-card-value { color: #333; font-size: 14px; font-weight: 500; text-align: right; word-break: break-all; }
.cert-page .cert-result-card .cert-card-btn-wrap { text-align: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #f0f0f0; }

/* ===== 返回按钮 ===== */
.cert-page .btn-back-wrap { text-align: center; margin-top: 20px; }
.cert-page .btn-back { display: inline-block; padding: 8px 24px; background: #6c757d; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.cert-page .btn-back:hover { background: #5a6268; }

/* ==============================
   手机端样式 (max-width: 767px)
   ============================== */
@media (max-width: 767px) {
    .cert-page .container { padding: 0 10px; }
    .cert-page .pages { padding-top: 10px; padding-bottom: 20px; }
    .cert-page .col-md-6 { flex: 0 0 100%; max-width: 100%; }
    .cert-page .col-sm-3, .cert-page .col-sm-6, .cert-page .col-sm-9 { flex: 0 0 100%; max-width: 100%; }
    .cert-page .d-md-block { display: none!important; }
    .cert-page .border-left { border-left: none!important; border-top: 1px solid #dee2e6!important; padding-top: 1rem!important; margin-top: 1rem!important; }

    .cert-page .card-header { padding: .6rem 1rem; }
    .cert-page .card-header h3 { font-size: 1.1rem; }
    .cert-page .card-body { padding: 0.75rem; }

    .cert-page .notice-panel .notice-col { flex: 0 0 100%; max-width: 100%; padding: 0; }
    .cert-page .notice-panel .notice-col+.notice-col { border-left: none; border-top: 1px solid #dee2e6; padding-top: 12px; margin-top: 12px; }

    .cert-page .query-form { max-width: 100%; }
    .cert-page .query-form .form-row { flex-direction: column; align-items: stretch; margin-bottom: 12px; }
    .cert-page .query-form .form-label { width: 100%; text-align: left; margin-bottom: 4px; font-size: 14px; }
    .cert-page .query-form .form-input-wrap { width: 100%; }

    .cert-page .captcha-wrap { flex-wrap: wrap; gap: 8px; }
    .cert-page .captcha-wrap .form-control { width: 120px; height: 36px; font-size: 14px; }
    .cert-page .captcha-wrap .codeimg { height: 36px; width: auto; max-width: 50%; min-width: 100px; }

    .cert-page .btn { padding: .5rem 1rem; font-size: 15px; }
    .cert-page .btn.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .cert-page .alert { padding: .6rem .75rem; font-size: 13px; }

    /* 手机端：隐藏表格，显示卡片 */
    .cert-page #certificateDetails .table-responsive { display: none; }
    .cert-page .cert-result-cards { display: block; }
}

/* ==============================
   电脑端样式 (min-width: 768px)
   ============================== */
@media (min-width: 768px) {
    .cert-page #certificateDetails .table-responsive { display: block; }
    .cert-page .cert-result-cards { display: none; }
}
