
:root { --bg:#f7fafc; --card:#fff; --text:#1a202c; --muted:#4a5568; --brand:#2563eb; --ok:#059669; --warn:#b45309; --err:#b91c1c; }
* { box-sizing:border-box; }
body { margin:0; font-family:'Sarabun', system-ui, -apple-system, Segoe UI, Roboto; background:var(--bg); color:var(--text); }
a { color:var(--brand); text-decoration:none; }
.container { max-width:1100px; margin:0 auto; padding:16px; }
.nav { background: linear-gradient(120deg, #e0f2fe, #fce7f3); border-bottom:1px solid #e2e8f0; }
.nav .container { display:flex; align-items:center; gap:16px; }
.brand a { font-weight:700; font-size:20px; color:#111827; }
.brand span { color:var(--brand); }
.nav nav a { margin-right:12px; }
.right { margin-left:auto; display:flex; align-items:center; gap:12px; }
.btn { display:inline-block; background:var(--brand); color:#fff; padding:8px 14px; border-radius:10px; }
.card { background:var(--card); border:1px solid #e5e7eb; border-radius:16px; padding:16px; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.input, select { width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; }
label { display:block; font-weight:600; margin-top:8px; }
.row { display:flex; gap:12px; }
.row > * { flex:1; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { padding:8px 10px; border-bottom:1px solid #e5e7eb; }
.flash { margin:8px 0; padding:10px 12px; border-radius:10px; }
.flash.success { background:#ecfdf5; border:1px solid #a7f3d0; }
.flash.error { background:#fef2f2; border:1px solid #fecaca; }
.mt { margin-top:18px; }
.center { text-align:center; }

/* Certificate print layout */
.cert-wrap { width: 1123px; height: 794px; position:relative; background:#fff; border:1px solid #ddd; margin:0 auto; }
.cert-bg { position:absolute; inset:0; background: radial-gradient(circle at 20% 20%, #eef2ff, transparent 40%), radial-gradient(circle at 80% 30%, #ffe4e6, transparent 40%); }
.cert-inner { position:absolute; inset:40px; border:10px solid #e2e8f0; border-radius:24px; padding:24px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.cert-title { font-size:40px; font-weight:700; margin-bottom:12px; }
.cert-name { font-size:48px; font-weight:700; margin:10px 0; }
.cert-meta { color:var(--muted); }
.qr { position:absolute; right:48px; bottom:48px; background:#fff; padding:8px; border-radius:12px; border:1px solid #e5e7eb; }
.print-actions { text-align:center; margin:12px 0; }
@media print {
  .nav, .print-actions, .flash, .btn { display:none !important; }
  body { background:#fff; }
  .container { max-width:unset; padding:0; }
  .cert-wrap { border:none; margin:0; }
}
