:root {
  --navy: #1a3c6e;
  --orange: #f5a623;
  --gray: #666;
  --border: #ddd;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f4f6f9;
  color: #222;
}
.site-header {
  background: var(--navy);
  color: white;
  padding: 18px 24px;
  text-align: center;
}
.brand-logo {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto 8px;
  background: white;
  border-radius: 8px;
  padding: 4px 10px;
}
.site-header .brand { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5px; }
.site-header .subbrand { font-size: 0.95rem; opacity: 0.85; margin-top: 4px; }

.container { max-width: 820px; margin: 24px auto 60px; padding: 0 16px; }
.container-wide { max-width: 1500px; margin: 24px auto 60px; padding: 0 16px; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card h2 {
  color: var(--navy);
  font-size: 1.15rem;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 8px;
  margin-top: 0;
}
.card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 4px; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 12px;
}
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=file], select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 0 16px; }
.grid-2col-block { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-2col-block { grid-template-columns: 1fr; }
}

.checkbox-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.chk { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.chk input { width: auto; }

.director-block {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.vendor-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.vendor-table th { text-align: left; font-size: 0.8rem; color: var(--gray); padding-bottom: 6px; }
.vendor-table td { padding: 4px 8px 4px 0; }
.vendor-table input { margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: top; }
.table-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: 6px; }
.admin-table thead th { position: sticky; top: 0; background: #f4f6f9; z-index: 1; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}
.badge-orange { background: #e08a1e; }
.badge-blue { background: #2266cc; }
.badge-purple { background: #7a3fc0; }
.badge-green { background: #1e7a34; }

.locked { color: #999; font-size: 0.8rem; }
.done-tick { color: #1e7a34; font-weight: 700; font-size: 0.85rem; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; display: inline-block; margin: 1px 0; font-weight: 700; }

.verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}
.verify-badge-ok { background: #1e7a34; }
.verify-badge-fail { background: #c0392b; }
.verify-badge-neutral { background: #999; }
.verify-row { display: flex; align-items: flex-start; margin: 6px 0; }

.hint { font-size: 0.8rem; color: var(--gray); margin: -6px 0 14px; }

.tnc-box {
  background: #fbf7ec;
  border: 1px solid #eddfb8;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #4a3f22;
  margin-bottom: 14px;
}
.tnc-scroll {
  max-height: 320px;
  overflow-y: auto;
}
.tnc-scroll h3 { margin-top: 14px; margin-bottom: 4px; font-size: 0.95rem; color: #1a3c6e; }
.tnc-scroll h3:first-child { margin-top: 0; }
.tnc-scroll ol { padding-left: 20px; margin: 6px 0; }
.tnc-scroll li { margin-bottom: 6px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 0.9rem; }
.alert-error { background: #fdecea; border: 1px solid #f5c2c0; color: #8a1f1f; }

.btn-submit, .btn-link {
  display: inline-block;
  background: var(--orange);
  color: #1a1a1a;
  font-weight: 700;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-submit:hover, .btn-link:hover { opacity: 0.9; }

.success-card { text-align: center; }
.success-card h2 { color: #1e7a34; border-bottom: none; }

.raw-json { background: #0e1420; color: #cde; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 0.78rem; }

.site-footer { text-align: center; color: var(--gray); font-size: 0.8rem; padding: 20px; }

/* ---- Printable certificate pages ---- */
.print-btn {
  display: inline-block;
  background: var(--navy);
  color: white;
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 16px;
}
.cert-field { font-size: 0.85rem; margin-bottom: 4px; }
.cert-field strong { display: inline-block; min-width: 220px; }
.cert-section-title {
  color: var(--navy);
  font-size: 1rem;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 6px;
  margin-top: 22px;
}
.cert-checklist { list-style: none; padding: 0; font-size: 0.85rem; }
.cert-checklist li { padding: 2px 0; }
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .site-header { background: white !important; color: black !important; }
  .tnc-scroll { max-height: none; overflow: visible; }
}
