:root {
	--wm-primary: #1d4e46;
	--wm-accent: #2f8f7a;
	--wm-radius: 6px;
	--wm-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ===== Shared badges ===== */
.wm-badge { display:inline-block; padding:2px 10px; border-radius:12px; font-size:12px; font-weight:600; }
.wm-badge-active { background:#d4edda; color:#155724; }
.wm-badge-expired { background:#f8d7da; color:#721c24; }
.wm-text-danger { color:#b32d2e; }
.wm-req { color:#b32d2e; }

/* ===== Admin ===== */
.wm-wrap .wm-form .form-table th { width:260px; }
.wm-builder-grid { display:flex; gap:24px; margin-top:16px; align-items:flex-start; }
.wm-builder-list { flex:2; }
.wm-builder-form { flex:1; background:#fff; border:1px solid #ccd0d4; padding:16px 20px; border-radius:4px; min-width:280px; }
.wm-builder-form p { margin-bottom:12px; }
.wm-filter-form .search-box { display:flex; gap:8px; }
.wm-filter-form input[type=search] { min-width:260px; }

/* Drag-and-drop field list (Form Builder) */
.wm-field-sortable { list-style:none; margin:10px 0 0; padding:0; }
.wm-field-row {
	display:flex; align-items:center; gap:14px; background:#fff; border:1px solid #dcdcdc;
	border-radius:4px; padding:10px 14px; margin-bottom:6px; cursor:grab;
}
.wm-field-row.dragging { opacity:.4; }
.wm-drag-handle { font-size:18px; color:#888; cursor:grab; user-select:none; }
.wm-field-row-label { flex:2; }
.wm-field-row-label code { margin-left:8px; font-size:11px; background:#f1f1f1; padding:1px 6px; border-radius:3px; }
.wm-field-type-badge { margin-left:8px; font-size:11px; text-transform:uppercase; color:#1d4e46; background:#eaf3f1; padding:1px 6px; border-radius:3px; }
.wm-field-row-toggles { flex:1.4; display:flex; gap:14px; font-size:13px; }
.wm-field-row-actions { font-size:13px; white-space:nowrap; }

/* ===== Certificate ===== */
.wm-cert { max-width:760px; margin:20px auto; background:#fff; border:2px solid var(--wm-primary); padding:36px; border-radius:6px; box-shadow:0 1px 4px rgba(0,0,0,.08); font-family:var(--wm-font); }
.wm-cert-header { display:flex; align-items:center; gap:16px; border-bottom:2px solid var(--wm-primary); padding-bottom:16px; margin-bottom:16px; }
.wm-cert-logo { max-height:70px; max-width:180px; object-fit:contain; }
.wm-cert-company h2 { margin:0 0 4px; color:var(--wm-primary); }
.wm-cert-company p { margin:0; color:#555; font-size:13px; }
.wm-cert-title { text-align:center; text-transform:uppercase; letter-spacing:2px; color:var(--wm-primary); margin:8px 0 4px; }
.wm-cert-no { text-align:center; margin:0 0 20px; }
.wm-cert-table { width:100%; border-collapse:collapse; margin-bottom:24px; }
.wm-cert-table th, .wm-cert-table td { text-align:left; padding:10px 12px; border:1px solid #dcdcdc; vertical-align:top; }
.wm-cert-table th { width:42%; background:#f6f8f7; color:var(--wm-primary); }
.wm-cert-terms { font-size:12px; color:#666; border-top:1px dashed #ccc; padding-top:14px; }
.wm-cert-sign { margin-top:40px; text-align:right; font-size:13px; color:#333; }
.wm-cert-actions { margin: 16px 0; display:flex; gap:10px; flex-wrap:wrap; }

/* Logo position variant */
.wm-cert.wm-logo-center .wm-cert-header { flex-direction:column; text-align:center; }

/* Border style variants (set via Settings -> Design) */
.wm-cert.wm-style-solid { border-width:2px; border-style:solid; border-radius:6px; }
.wm-cert.wm-style-double { border-width:6px; border-style:double; border-color:var(--wm-primary); border-radius:2px; }
.wm-cert.wm-style-rounded { border-width:2px; border-style:solid; border-radius:var(--wm-radius); }
.wm-cert.wm-style-classic { border-width:3px; border-style:solid; border-radius:2px; outline:1px solid var(--wm-primary); outline-offset:6px; margin:20px auto 40px; }

/* ===== Front-end form ===== */
.wm-front { max-width:760px; margin:20px auto; font-family:var(--wm-font); }
.wm-front .wm-success { background:#d4edda; color:#155724; padding:12px 16px; border-radius:4px; margin-bottom:16px; font-weight:600; }
.wm-front .wm-error { background:#f8d7da; color:#721c24; padding:12px 16px; border-radius:4px; margin-bottom:16px; }
.wm-form-front { background:#fff; border:1px solid #e2e2e2; border-radius:var(--wm-radius); padding:28px; }
.wm-field { margin-bottom:16px; display:flex; flex-direction:column; gap:6px; }
.wm-field label { font-weight:600; font-size:14px; color:#222; }
.wm-field input, .wm-field select, .wm-field textarea {
	padding:10px 12px; border:1px solid #ccc; border-radius:var(--wm-radius); font-size:14px; width:100%; box-sizing:border-box; font-family:var(--wm-font);
}
.wm-field input:focus, .wm-field select:focus, .wm-field textarea:focus { outline:none; border-color:var(--wm-primary); box-shadow:0 0 0 2px rgba(0,0,0,.03); }
.wm-btn { display:inline-block; padding:10px 20px; border-radius:var(--wm-radius); border:1px solid #ccc; background:#f6f6f6; color:#222; text-decoration:none; cursor:pointer; font-size:14px; font-family:var(--wm-font); }
.wm-btn-primary { background:var(--wm-primary); border-color:var(--wm-primary); color:#fff; }
.wm-btn-primary:hover { background:var(--wm-accent); border-color:var(--wm-accent); color:#fff; }
.wm-my-certs { margin-top:24px; background:#fafafa; border:1px solid #eee; border-radius:6px; padding:16px 20px; }
.wm-my-certs h3 { margin-top:0; font-size:14px; }
.wm-my-certs ul { margin:0; padding-left:18px; font-size:13px; color:#444; }

/* ===== Print ===== */
@media print {
	body * { visibility: hidden; }
	.wm-cert-print, .wm-cert-print * { visibility: visible; }
	.wm-cert-print { position: absolute; left:0; top:0; width:100%; }
	.wm-cert { border-color:#1d4e46 !important; box-shadow:none; margin:0; max-width:100%; }
	.wm-cert-actions, #wm-my-certs, .wm-success { display:none !important; }
}
