:root {
  --ink: #111;
  --muted: #666;
  --accent: #0057B8;
  --border: #ddd;
  --paper: #fff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f6f7f9; color: var(--ink); font-family: var(--font); }
.container { max-width: 900px; margin: 24px auto; background: var(--paper); padding: 24px; border: 1px solid var(--border); border-radius: 12px; }

h1, h2, h3 { margin: 0 0 12px; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.2rem; color: var(--muted); font-weight: 500; }

.header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.header img { height: 108px; width: auto !important; }
.header .org { font-size: .95rem; color: var(--muted); }

.form-field { margin: 12px 0; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="password"], select {
  width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; }
.checkbox-row input { margin-top: 2px; }

.btn-row { display: flex; gap: 8px; margin-top: 16px; }
button, .btn {
  display: inline-block; padding: 10px 14px; font-size: 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--accent);
  color: white; cursor: pointer;
}
button.secondary, .btn.secondary { background: #e9ecef; color: #000; }
button:disabled, .btn[aria-disabled="true"] { background: #cfd6de; color: #6b7280; cursor: not-allowed; }

.meta { color: var(--muted); font-size: .95rem; }
.grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.kv { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--border); padding: 6px 0; }
.kv label { font-weight: 600; margin: 0; }
.kv span { margin-left: 12px; }

.footer {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .95rem; color: var(--muted);
}

/* Certificate heading */
.certificate-title { font-size: 1.8rem; text-transform: uppercase; letter-spacing: 0.02em; }

/* Print (A4) */
@page { size: A4; margin: 12mm; }
@media print {
  body { background: white; }
  .container { border: none; border-radius: 0; box-shadow: none; }
  .btn-row, .no-print { display: none !important; }
  a { color: black; text-decoration: none; }
}
