:root {
  --visy-blue: #0047bb;
  --visy-green: #bed62f;
  --grey-1: #f6f8fa;
  --grey-2: #e9eef4;
  --ink: #1f2328;
  --border-radius: 8px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--grey-1); color: var(--ink); line-height: 1.5; }

/* HEADER & LOGOS */
.header { background: white; border-bottom: 4px solid var(--visy-blue); padding: 20px; text-align: center; }
.logo-container { margin-bottom: 12px; }
.main-logo { height: 50px; width: auto; display: inline-block; }

.status-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.75rem; color: #666; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: bold;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; transition: background 0.3s; }
.dot.red { background: #ef4444; box-shadow: 0 0 4px #ef4444; }
.dot.green { background: #22c55e; box-shadow: 0 0 4px #22c55e; }

.header h1 { margin: 0; color: var(--visy-blue); font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.5px; }
.subtle { margin: 4px 0 0; color: #667085; font-size: 0.9rem; }

/* LAYOUT */
.container { max-width: 900px; margin: 20px auto; padding: 0 16px; }
.card { background: white; border: 1px solid var(--grey-2); border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.card h2 { margin-top: 0; color: var(--visy-blue); border-bottom: 1px solid #eee; padding-bottom: 12px; font-size: 1.25rem; }

/* BUTTONS */
.buttons { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
button { border: none; border-radius: 6px; padding: 14px 20px; background: var(--visy-blue); color: white; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 1rem; }
button:hover { background: #00358a; }
button:disabled { opacity: 0.5; cursor: not-allowed; background: #999; }
button.ghost { background: white; color: var(--visy-blue); border: 2px solid var(--visy-blue); }
button.ghost:hover { background: #f0f7ff; }

/* LISTS & INPUTS */
.list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.list button { width: 100%; text-align: left; background: #fff; color: #333; border: 1px solid #ccc; display: flex; justify-content: space-between; }
.list button:hover { border-color: var(--visy-blue); color: var(--visy-blue); background: #fdfdfd; }
.list button::after { content: "→"; opacity: 0.5; }

.block { margin: 15px 0; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
input[type="text"], select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }

/* CONTENT & CHECKBOXES */
.contentBox { 
  height: 500px; /* Fixed height for PDF viewer */
  background: #333; /* Dark background for PDF contrast */
  border: 1px solid #ccc; border-radius: 6px; 
  overflow: hidden; margin-bottom: 20px;
}
iframe { width: 100%; height: 100%; border: none; }

.ack-row { 
  display: flex; gap: 12px; align-items: flex-start; 
  padding: 12px; background: #fff; border: 1px solid #eee; 
  margin-bottom: 8px; border-radius: 6px; transition: 0.2s;
}
.ack-row:hover { border-color: var(--visy-blue); background: #f8fbff; }
.ack-row input { width: 24px; height: 24px; margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: var(--visy-blue); }
.ack-row label { margin: 0; cursor: pointer; font-weight: 500; font-size: 0.95rem; line-height: 1.4; }

/* NOTICES */
.notice { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.notice strong { color: #b45309; }

/* SIGNATURE PAD */
.sigpad { border: 2px dashed #ccc; border-radius: 6px; width: 100%; background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="1" cy="1" r="1" fill="%23ddd"/></svg>'); cursor: crosshair; touch-action: none; }

/* FOOTER */
.footer { text-align: center; margin-top: 40px; padding-bottom: 40px; border-top: 1px solid #eee; padding-top: 20px; }

/* PRINT STYLES */
@media print {
  body { background: white; color: black; }
  .header, .footer, .no-print, button, .status-bar, .notice { display: none !important; }
  .container { max-width: 100%; margin: 0; padding: 0; }
  .card { border: none; box-shadow: none; padding: 0; margin: 0; }
  .certificate-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; margin-bottom: 20px; padding-bottom: 10px; }
  .cert-logo { height: 60px; }
  h1 { font-size: 24pt; color: black; }
}