.slm-wrap { max-width: 900px; margin: 0 auto; font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.slm-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
.slm-tab-btn { flex: 1; padding: 12px 10px; background: #f3f4f6; border: none; border-radius: 8px 8px 0 0; font-size: 15px; font-weight: 600; cursor: pointer; color: #4b5563; }
.slm-tab-btn.active { background: #1d4ed8; color: #fff; }
.slm-tab-panel { padding: 4px 0 24px; }
.slm-tab-panel { display: none !important; }
.slm-tab-panel.slm-active-panel { display: block !important; }
.slm-search-form label { display: block; font-weight: 600; margin-bottom: 8px; color: #111827; }
.slm-search-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.slm-cnic-input { flex: 1 1 200px; min-width: 180px; max-width: 320px; height: 44px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 999px; font-size: 15px; box-sizing: border-box; background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat right 14px center; background-size: 16px; }
.slm-btn { padding: 0 18px; height: 44px; border: none; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.slm-btn-primary { background: #1d4ed8; color: #fff; }
.slm-btn-primary:hover { background: #1e40af; }
.slm-btn-secondary { background: #eef2ff; color: #1d4ed8; }
.slm-btn-secondary:hover { background: #e0e7ff; }
.slm-btn-secondary:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.slm-btn-mini { padding: 6px 12px; font-size: 12px; background: #eef2ff; color: #1d4ed8; }
.slm-result { margin-top: 18px; }
.slm-loading, .slm-note { color: #6b7280; font-size: 14px; }
.slm-error { color: #b91c1c; background: #fef2f2; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.slm-success { color: #065f46; background: #ecfdf5; padding: 10px 12px; border-radius: 8px; font-size: 14px; }

/* Single result table — correction columns hidden until "Request a Correction" is toggled */
.slm-result-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.slm-result-table th, .slm-result-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f3f4f6; font-size: 13px; vertical-align: top; }
.slm-result-table thead th { color: #6b7280; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; background: #f9fafb; }
.slm-result-table tbody th { width: 26%; color: #6b7280; font-weight: 500; }
.slm-result-table tbody td:nth-child(2) { color: #111827; font-weight: 600; word-break: break-word; }
.slm-result-table tr:last-child td { border-bottom: none; }
.slm-col-correction { display: none; min-width: 160px; }
.slm-result.slm-show-correction .slm-col-correction { display: table-cell; }
.slm-not-editable { color: #d1d5db; }

.slm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.slm-badge-pending { background: #fef3c7; color: #92400e; }
.slm-badge-approved { background: #d1fae5; color: #065f46; }
.slm-badge-rejected { background: #fee2e2; color: #991b1b; }
.slm-request-status { margin-top: 14px; padding: 12px; background: #f9fafb; border-radius: 8px; font-size: 14px; }
.slm-request-meta { color: #6b7280; margin-top: 4px; font-size: 12px; }
.slm-request-remarks { margin-top: 6px; font-size: 13px; color: #374151; }

.slm-correction-input { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.slm-request-submit-row { margin-top: 16px; }
.slm-row-locked td, .slm-row-locked th { background: #fefce8; }
.slm-lock-icon { font-size: 12px; }
.slm-locked-note { font-size: 12px; color: #92400e; }
.slm-request-msg { margin-top: 8px; }

/* Missing-field highlighting */
.slm-result-table tr.slm-field-empty td:nth-child(2) { color: #b45309; }
.slm-result-table tr.slm-field-empty-flash { background: #fee2e2 !important; animation: slm-flash 1.4s ease-in-out 2; }
.slm-result-table tr.slm-field-empty-flash th,
.slm-result-table tr.slm-field-empty-flash td { color: #991b1b; }
@keyframes slm-flash { 0%, 100% { background: #fee2e2; } 50% { background: #fecaca; } }

/* Verify block */
.slm-verify-block { margin-top: 14px; }
.slm-btn-verify { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; border-radius: 999px; font-weight: 700; cursor: pointer; }
.slm-btn-verify:hover { background: #d1fae5; }
.slm-verify-msg { margin-top: 8px; }

.slm-verify-modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.55); z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.slm-verify-modal { background: #fff; border-radius: 12px; padding: 22px; max-width: 380px; width: 100%; }
.slm-verify-modal h3 { margin: 0 0 8px; }
.slm-verify-modal p { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.slm-verify-email { width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
.slm-verify-modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.slm-verify-modal-actions .slm-btn { flex: 1; }
.slm-btn-cancel { background: #f3f4f6; color: #374151; }

/* Proof upload buttons */
.slm-proof-btn { position: relative; display: inline-block; background: #eef2ff; color: #1d4ed8; border: 1px solid #c7d2fe; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; }
.slm-proof-btn:hover { background: #e0e7ff; }
.slm-proof-btn.slm-has-file { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.slm-proof-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slm-proof-filename { font-size: 11px; color: #6b7280; margin-top: 4px; word-break: break-all; max-width: 150px; }
.slm-no-upload { font-size: 12px; color: #9ca3af; font-style: italic; }

/* EMIS compound input (fixed 392 prefix) */
.slm-emis-input { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; }
.slm-emis-prefix { background: #f3f4f6; color: #6b7280; padding: 8px 8px; font-size: 13px; font-weight: 700; }
.slm-emis-input .slm-emis-suffix { border: none; border-radius: 0; flex: 1; }
.slm-emis-lookup-hint { font-size: 11px; margin-top: 4px; }
.slm-emis-hint-ok { color: #047857; font-weight: 600; }
.slm-emis-hint-warn { color: #b45309; }

/* Qualification repeater */
.slm-qual-repeater { min-width: 220px; }
.slm-qual-entry { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #f9fafb; }
.slm-qual-entry select, .slm-qual-entry input { width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; margin-bottom: 6px; box-sizing: border-box; }
.slm-qual-subjects { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.slm-qual-subject-row { display: flex; gap: 4px; }
.slm-qual-subject-row input { margin-bottom: 0; }
.slm-qual-fields .slm-note { font-size: 11px; color: #9ca3af; display: block; margin-bottom: 6px; }
.slm-qual-remove { background: #fee2e2; color: #991b1b; border: none; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; width: 100%; }

/* Professional Qualification repeater (2 slots) */
.slm-pq-repeater { min-width: 220px; }
.slm-pq-slot { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #f9fafb; }
.slm-pq-slot select, .slm-pq-slot input { width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; margin-bottom: 6px; box-sizing: border-box; }
.slm-pq-slot input:last-child, .slm-pq-slot select:last-child { margin-bottom: 0; }

/* N/A checkbox (dates & merit marks that allow it) */
.slm-na-wrap { display: flex; align-items: center; gap: 8px; }
.slm-na-wrap .slm-correction-input { flex: 1; }
.slm-na-wrap .slm-correction-input:disabled { background: #f3f4f6; color: #9ca3af; }
.slm-na-check { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #6b7280; white-space: nowrap; }
.slm-field-hint { font-size: 11px; color: #b45309; margin-top: 4px; }

/* Fields that only apply conditionally (Regular Date / Date of Promotion) */
.slm-dep-field .slm-not-applicable { display: none; font-size: 12px; color: #9ca3af; font-style: italic; }
.slm-dep-field.slm-dep-inactive > *:not(.slm-not-applicable) { display: none !important; }
.slm-dep-field.slm-dep-inactive .slm-not-applicable { display: inline; }

.slm-supervision-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #1e3a8a; line-height: 1.5; margin-bottom: 18px; }

.slm-discuss-issue-block { margin-top: 28px; padding-top: 18px; border-top: 1px solid #e5e7eb; }
.slm-discuss-issue-form { margin-top: 12px; max-width: 420px; }
.slm-discuss-issue-form label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; color: #111827; }
.slm-discuss-issue-form input, .slm-discuss-issue-form select, .slm-discuss-issue-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; box-sizing: border-box; font-family: inherit; }
.slm-discuss-issue-form .slm-btn { margin-top: 14px; }
.slm-issue-msg { margin-top: 8px; }

@media (max-width: 782px) {
	.slm-search-row { flex-direction: column; align-items: stretch; }
	.slm-search-row .slm-cnic-input { flex: 0 0 auto; max-width: none; width: 100%; height: 46px; }
	.slm-search-row .slm-btn { flex: 0 0 auto; width: 100%; }

	.slm-result-table, .slm-result-table thead, .slm-result-table tbody, .slm-result-table th, .slm-result-table td, .slm-result-table tr { display: block; }
	.slm-result-table thead { display: none; }
	.slm-result-table tbody tr { margin-bottom: 12px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; }
	.slm-result-table tbody th, .slm-result-table tbody td { border: none; padding: 4px 6px; width: auto; }
	.slm-result-table tbody th { font-size: 11px; text-transform: uppercase; color: #9ca3af; }
	.slm-result-table td.slm-col-correction { display: none; }
	.slm-result.slm-show-correction .slm-result-table td.slm-col-correction { display: block; }
	.slm-col-correction:before { content: attr(data-label); display: block; font-size: 11px; color: #9ca3af; text-transform: uppercase; margin-bottom: 2px; }
}
