/* Certificates from an Excel list: the free certificate maker and the app's Import page (certificate-import.js).
   Design picker, upload, column matching, preview and actions. */
.cm-step { border-top: 1px solid #e2e8f0; padding-top: 18px; margin-top: 18px; }
.cm-step:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.cm-step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #1e293b; margin: 0 0 12px; font-size: 1.05rem; }
.cm-num { width: 28px; height: 28px; border-radius: 999px; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; flex: none; }
.cm-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.cm-design { position: relative; border: 2px solid #e2e8f0; border-radius: 12px; background: #f8fafc; cursor: pointer; padding: 8px; text-align: center; }
.cm-design:hover { border-color: #93c5fd; }
.cm-design input { position: absolute; opacity: 0; pointer-events: none; }
.cm-design:has(input:checked) { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.cm-design:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 2px; }
.cm-thumb { height: 110px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cm-thumb .cf-page-wrap { position: relative; }
.cm-thumb .cf-page { transform-origin: 0 0; position: absolute; left: 0; top: 0; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .15); }
.cm-design-name { font-size: .85rem; font-weight: 600; color: #334155; margin-top: 6px; }
.cm-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .95rem; cursor: pointer; border: 1px solid transparent; text-decoration: none; }
/* Two classes: the Tailwind preflight on public pages ([type='button'] { background-color: transparent }) is added later
   with the same weight as one class, and left the buttons white on white. */
.cm-btn.cm-btn-primary { background: #2563eb; color: #fff; }
.cm-btn.cm-btn-primary:hover { background: #1d4ed8; }
.cm-btn.cm-btn-light { background: #fff; color: #1e40af; border-color: #bfdbfe; }
.cm-btn.cm-btn-light:hover { background: #eff6ff; }
.cm-btn.cm-btn-accent { background: #f97316; color: #fff; }
.cm-btn.cm-btn-accent:hover { background: #ea580c; }
.cm-btn[disabled] { opacity: .5; cursor: not-allowed; }
.cm-hint { color: #64748b; font-size: .9rem; margin: 8px 0 0; }
.cm-status { margin-top: 10px; font-size: .92rem; }
.cm-status.err { color: #b91c1c; }
.cm-map { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cm-map td { padding: 6px 4px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.cm-map td:first-child { font-weight: 600; color: #334155; width: 34%; }
.cm-map select, .cm-map input { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 10px; font-size: .95rem; background: #fff; }
.cm-map input { margin-top: 6px; }
.cm-preview-box { background: #e2e8f0; border-radius: 12px; padding: 12px; display: flex; justify-content: center; overflow: hidden; }
.cm-preview-wrap { position: relative; overflow: hidden; }
.cm-preview-wrap iframe { border: 0; position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .2); }
.cm-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0; color: #475569; font-size: .92rem; }
.cm-nav button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.cm-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; color: #713f12; font-size: .9rem; margin-top: 18px; }
[hidden] { display: none !important; }
@media (max-width: 640px) { .cm-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cm-map td { display: block; width: 100% !important; border: 0; padding: 4px 0; } .cm-map tr { display: block; border-bottom: 1px solid #f1f5f9; padding: 6px 0; } .cm-btn { flex: 1 1 auto; justify-content: center; } }
