/* COA Verification Module - standalone CSS */
/* 引入到你的页面，class 名以 .coa- 开头，不影响其他样式 */

.coa-hero { background: linear-gradient(135deg,#36492A 0%,#2a3a20 50%,#36492A 100%); color: #fff; padding: 60px 15px; }
.coa-hero h1 { color: #fff; font-size: 2.2rem; margin-bottom: 12px; }
.coa-hero p { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 700px; }
.coa-hero-metrics { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.coa-hero-metric { background: rgba(255,255,255,.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2); padding: 18px 28px; border-radius: 12px; text-align: center; min-width: 140px; }
.coa-hero-metric-value { font-size: 1.6rem; font-weight: 700; color: #c9a96e; }
.coa-hero-metric-label { font-size: .85rem; opacity: .8; margin-top: 4px; }
.coa-steps { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 20px; margin: 48px 0; }
.coa-step { background: #f8f9fa; padding: 24px; border-radius: 12px; border-left: 4px solid #c9a96e; }
.coa-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.coa-step-num { background: #c9a96e; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.coa-step-title { font-size: 1.05rem; font-weight: 600; }
.coa-step-desc { font-size: .92rem; color: #555; line-height: 1.6; margin: 0; }
.coa-search-box { max-width: 720px; margin: 0 auto 40px; }
.coa-search-box h2 { font-size: 1.4rem; margin-bottom: 16px; }
.coa-search-row { display: flex; gap: 12px; }
.coa-search-input { flex: 1; padding: 14px 18px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 1rem; outline: none; transition: border-color .2s; }
.coa-search-input:focus { border-color: #c9a96e; }
.coa-search-btn { background: #36492A; color: #fff; padding: 14px 28px; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .2s; white-space: nowrap; }
.coa-search-btn:hover { background: #2a3a20; }
.coa-msg { padding: 16px 20px; border-radius: 10px; margin-top: 16px; }
.coa-msg-warn { background: #fff3cd; color: #856404; }
.coa-msg-error { background: #f8d7da; color: #721c24; }
.coa-catalog { max-width: 900px; margin: 0 auto; }
.coa-catalog h2 { font-size: 1.4rem; margin-bottom: 8px; }
.coa-catalog-desc { color: #666; font-size: .95rem; margin-bottom: 24px; }
.coa-cat-block { background: #f8f9fa; padding: 20px 24px; border-radius: 12px; margin-bottom: 20px; }
.coa-cat-title { font-size: 1.05rem; margin-bottom: 12px; color: #36492A; border-bottom: 2px solid #c9a96e; padding-bottom: 8px; display: inline-block; }
.coa-cat-items { display: flex; flex-wrap: wrap; gap: 8px; }
.coa-cat-item { background: #fff; border: 1px solid #e0e0e0; padding: 6px 14px; border-radius: 6px; font-size: .85rem; cursor: pointer; transition: all .2s; color: #333; }
.coa-cat-item:hover { border-color: #c9a96e; color: #c9a96e; }
.coa-card { background: #fff; border: 2px solid #e0e0e0; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.08); margin-bottom: 60px; }
.coa-card-header { background: linear-gradient(135deg,#36492A,#2a3a20); color: #fff; padding: 24px 28px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.coa-card-label { font-size: .8rem; opacity: .7; text-transform: uppercase; letter-spacing: 1px; }
.coa-card-title { color: #fff; margin: 4px 0 0; font-size: 1.4rem; }
.coa-card-lot { font-size: 1.1rem; font-weight: 600; color: #c9a96e; }
.coa-card-body { padding: 24px 28px; }
.coa-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin-bottom: 20px; }
.coa-metric { padding: 16px; border-radius: 10px; text-align: center; }
.coa-metric-green { background: #f0faf0; }
.coa-metric-green .coa-metric-value { color: #2d7a2d; }
.coa-metric-blue { background: #f0f4fa; }
.coa-metric-blue .coa-metric-value { color: #2d5a7a; }
.coa-metric-gold { background: #faf5f0; }
.coa-metric-gold .coa-metric-value { color: #7a5a2d; }
.coa-metric-purple { background: #f5f0fa; }
.coa-metric-purple .coa-metric-value { color: #5a2d7a; }
.coa-metric-label { font-size: .8rem; color: #666; }
.coa-metric-value { font-size: 1.5rem; font-weight: 700; }
.coa-metric-text { font-size: 1rem; }
.coa-section-title { font-size: 1.1rem; margin-bottom: 8px; color: #36492A; }
.coa-spec-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.coa-spec-table th { background: #f0f0f0; padding: 10px 14px; text-align: left; border: 1px solid #ddd; }
.coa-spec-table td { padding: 10px 14px; border: 1px solid #ddd; }
.coa-text-muted { color: #666; }
.coa-quality-note { margin-top: 20px; padding: 16px; background: #f8f9fa; border-radius: 10px; font-size: .88rem; color: #666; line-height: 1.6; }

/* Professional COA Certificate Styles */
.coa-form-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  max-width: 900px;
  margin: 0 auto;
}
.coa-form-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #36492A;
  font-weight: 600;
}
.coa-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.coa-form-group {
  display: flex;
  flex-direction: column;
}
.coa-form-label {
  font-size: .8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.coa-form-input {
  padding: 10px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.coa-form-input:focus {
  border-color: #c9a96e;
}
.coa-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.coa-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.coa-btn-primary {
  background: #36492A;
  color: #fff;
}
.coa-btn-primary:hover {
  background: #2a3a20;
}
.coa-btn-secondary {
  background: #f0f0f0;
  color: #333;
}
.coa-btn-secondary:hover {
  background: #e0e0e0;
}
.coa-btn-gold {
  background: #c9a96e;
  color: #36492A;
}
.coa-btn-gold:hover {
  background: #b8985d;
}
.coa-download-bar {
  background: #f0faf0;
  border: 1px solid #c8e6c8;
  border-radius: 10px;
  padding: 16px 24px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.coa-download-title {
  font-weight: 600;
  color: #2d7a2d;
}
.coa-download-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* COA Certificate */
.coa-certificate {
  background: #fff;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  font-family: "Source Sans 3", -apple-system, sans-serif;
}
.coa-cert-header {
  display: flex;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 3px solid #36492A;
}
.coa-cert-logo {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.coa-cert-lab-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #36492A;
  letter-spacing: .5px;
}
.coa-cert-lab-address {
  font-size: .75rem;
  color: #666;
  margin-top: 4px;
  line-height: 1.4;
}
.coa-cert-lab-contact {
  font-size: .72rem;
  color: #888;
  margin-top: 4px;
  line-height: 1.4;
}
.coa-cert-header-right {
  display: flex;
  gap: 16px;
  align-items: center;
}
.coa-cert-qr {
  border: 1px solid #ddd;
  padding: 4px;
  background: #fff;
}
.coa-cert-title-block {
  text-align: right;
}
.coa-cert-report-type {
  font-size: .7rem;
  color: #c9a96e;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.coa-cert-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #36492A;
  line-height: 1.2;
  margin-top: 4px;
}
.coa-cert-section {
  padding: 16px 28px;
}
.coa-cert-section-title {
  font-size: .75rem;
  font-weight: 700;
  color: #36492A;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}
.coa-cert-info-table {
  width: 100%;
  border-collapse: collapse;
}
.coa-cert-info-table td {
  border: 1px solid #d0d0d0;
  padding: 8px 12px;
  width: 33.33%;
}
.coa-cert-info-label {
  font-size: .65rem;
  color: #888;
  font-weight: 600;
  letter-spacing: .5px;
}
.coa-cert-info-value {
  font-size: .85rem;
  color: #333;
  margin-top: 2px;
}
.coa-cert-bold {
  font-weight: 700;
  color: #36492A;
}
.coa-cert-test-table {
  width: 100%;
  border-collapse: collapse;
}
.coa-cert-test-table th {
  background: #36492A;
  color: #fff;
  padding: 8px 10px;
  font-size: .72rem;
  font-weight: 600;
  text-align: left;
  letter-spacing: .5px;
}
.coa-cert-test-table td {
  border: 1px solid #d0d0d0;
  padding: 7px 10px;
  font-size: .8rem;
  color: #333;
}
.coa-cert-test-table tr:nth-child(even) td {
  background: #f8f9fa;
}
.coa-cert-result-pass {
  color: #2d7a2d;
  font-weight: 600;
}
.coa-cert-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 28px;
}
.coa-cert-chart-box {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
}
.coa-cert-chart-title {
  font-size: .7rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  text-align: center;
}
.coa-cert-chart-box canvas {
  width: 100% !important;
  height: auto !important;
}
.coa-cert-footer {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: 16px 28px;
  border-top: 1px solid #e0e0e0;
}
.coa-cert-disclaimer {
  font-size: .7rem;
  color: #888;
  line-height: 1.5;
  background: #fdf8e8;
  padding: 10px 14px;
  border-radius: 4px;
  border-left: 3px solid #c9a96e;
}
.coa-cert-signature {
  text-align: right;
}
.coa-cert-signature-label {
  font-size: .65rem;
  color: #888;
}
.coa-cert-signature-name {
  font-family: "Brush Script MT", cursive;
  font-size: 1.4rem;
  color: #36492A;
  margin: 4px 0;
}
.coa-cert-signature-title {
  font-size: .72rem;
  color: #555;
  font-weight: 600;
}
.coa-cert-signature-email {
  font-size: .7rem;
  color: #888;
  margin-top: 2px;
}
.coa-cert-bottom-bar {
  background: #36492A;
  color: #c9a96e;
  text-align: center;
  padding: 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .5px;
}

/* Simplified COA search */
.coa-form-desc {
  color: #666;
  font-size: .9rem;
  margin-bottom: 18px;
}
.coa-simple-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.coa-simple-input {
  flex: 1;
  font-size: 1rem;
  padding: 14px 18px;
}
.coa-simple-search .coa-btn {
  padding: 14px 28px;
  font-size: 1rem;
  white-space: nowrap;
}
.coa-quick-picks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.coa-quick-label {
  font-size: .8rem;
  color: #888;
  font-weight: 600;
}
.coa-quick-btn {
  padding: 5px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  background: #f8f9fa;
  color: #555;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
}
.coa-quick-btn:hover {
  background: #36492A;
  color: #fff;
  border-color: #36492A;
}

/* Handwritten signature SVG */
.coa-handwritten-sig {
  width: 210px;
  height: 55px;
  margin: 2px 0 2px auto;
  display: block;
}
.coa-cert-signature {
  text-align: right;
}

@media(max-width:640px){.coa-simple-search{flex-direction:column;gap:10px}.coa-simple-search .coa-btn{width:100%}.coa-hero-metric{min-width:0;width:100%}}

/* --- signature as HTML text (avoids html2canvas hanging on inline-SVG <text>) --- */
.coa-cert-sign-name{
  font-family: 'Brush Script MT','Segoe Script','Lucida Handwriting',cursive;
  font-style: italic;
  font-size: 28px;
  line-height: 1.1;
  color: #36492A;
  margin: 6px 0 0;
  padding: 0 6px;
}
.coa-cert-sign-line{
  height: 1px;
  background: rgba(54,73,42,0.55);
  margin: 2px 0 4px;
  border-radius: 50%;
}
.coa-cert-signature .coa-cert-sign-name{ text-align: right; }
.coa-cert-signature .coa-cert-sign-line{ margin-left: auto; }


/* === COA lookup: not-found card & render status (added 2026-10-11) === */
.coa-notfound-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eadfdf;
  border-top: 3px solid #b4552d;
  border-radius: 10px;
  padding: 34px 30px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.coa-notfound-icon { color: #b4552d; margin-bottom: 10px; }
.coa-notfound-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #36492A;
}
.coa-notfound-text {
  margin: 0 0 18px;
  color: #666;
  font-size: .95rem;
  line-height: 1.6;
}
.coa-notfound-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.coa-render-status {
  max-width: 850px;
  margin: 0 auto;
  background: #fff;
  border: 1px dashed #c9d6b8;
  border-radius: 8px;
  padding: 70px 20px;
  text-align: center;
  color: #6B8C47;
  font-weight: 600;
  font-size: 1rem;
}
.coa-render-error {
  max-width: 850px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eadfdf;
  border-top: 3px solid #b4552d;
  border-radius: 8px;
  padding: 50px 20px;
  text-align: center;
  color: #7a4a35;
  font-size: .95rem;
}
