@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Subsidized Test Voucher System — Shared Styles
   Brand color: #278FCD | Font: Poppins
   ========================================================================== */

.swf-voucher-wrap,
.swf-frontend-widget {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.swf-voucher-wrap .swf-page-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}
.swf-voucher-wrap .swf-page-title .dashicons {
	color: #278FCD;
	font-size: 28px;
	width: 28px;
	height: 28px;
}

/* Buttons */
.swf-btn.button-primary {
	background: #278FCD;
	border-color: #1f74a6;
	font-weight: 600;
	box-shadow: none;
}
.swf-btn.button-primary:hover {
	background: #1f74a6;
}
.swf-btn-outline {
	border-color: #278FCD !important;
	color: #278FCD !important;
	font-weight: 600;
}
.swf-btn-outline:hover {
	background: #278FCD !important;
	color: #fff !important;
}

/* Stat grid */
.swf-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin: 24px 0;
}
.swf-stat-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.swf-stat-card.swf-accent {
	border-top: 4px solid #278FCD;
}
.swf-stat-card.swf-money .swf-stat-value {
	color: #2e9e4f;
}
.swf-stat-value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #278FCD;
	line-height: 1.3;
}
.swf-stat-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #64748b;
	margin-top: 4px;
}

.swf-quick-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.swf-shortcode-hint {
	background: #f0f7fc;
	border-left: 4px solid #278FCD;
	padding: 10px 14px;
	border-radius: 4px;
	display: inline-block;
}

/* Forms */
.swf-form-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 24px 28px;
	max-width: 900px;
	margin-bottom: 20px;
}
.swf-section-title {
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	border-bottom: 2px solid #f0f7fc;
	padding-bottom: 8px;
	margin-top: 24px;
}
.swf-section-title:first-child {
	margin-top: 0;
}
.swf-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
	margin-top: 14px;
}
.swf-field-full {
	grid-column: 1 / -1;
}
.swf-field label {
	display: block;
	font-weight: 500;
	margin-bottom: 6px;
	color: #334155;
	font-size: 13px;
}
.swf-field .req {
	color: #b32d2e;
}
.swf-field input[type="text"],
.swf-field input[type="number"],
.swf-field input[type="email"],
.swf-field select,
.swf-field textarea {
	width: 100%;
	border-radius: 6px;
	border-color: #cbd5e1;
}

.swf-preview-box {
	margin-top: 20px;
	background: #f0f7fc;
	border-radius: 8px;
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px;
}
.swf-preview-box strong {
	color: #278FCD;
	font-size: 20px;
}

/* Notification emails list */
.swf-email-row {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
	align-items: center;
}
.swf-email-row input {
	flex: 1;
}
.swf-remove-email-btn {
	color: #b32d2e;
	font-weight: 700;
	line-height: 1;
	padding: 0 10px !important;
}

/* Status pills */
.swf-status-pill {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* Redeem screen */
.swf-redeem-card {
	max-width: 640px;
}
.swf-redeem-input-row {
	display: flex;
	gap: 10px;
}
.swf-redeem-input-row input {
	flex: 1;
	font-size: 16px;
	padding: 8px 12px;
	text-transform: uppercase;
}
#swf-redeem-result {
	margin-top: 24px;
}
.swf-voucher-detail-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}
.swf-code-large {
	font-size: 22px;
	font-weight: 700;
	color: #278FCD;
	background: #f0f7fc;
	padding: 6px 14px;
	border-radius: 6px;
}
.swf-detail-table th {
	width: 160px;
	text-align: left;
	background: #f8fafc;
}
.swf-strike {
	text-decoration: line-through;
	color: #94a3b8;
	margin-left: 8px;
	font-size: 13px;
}
#swf-redeem-action-area {
	margin-top: 16px;
}
.swf-redeem-confirm-btn {
	background: #2e9e4f;
	border-color: #24803f;
	color: #fff;
}
.swf-redeem-confirm-btn:hover {
	background: #24803f;
}

/* Log table */
.swf-log-table th, .swf-log-table td {
	padding: 10px 12px;
}

/* Printable voucher */
.swf-printable-voucher {
	max-width: 560px;
}
.swf-voucher-card {
	background: #fff;
	border: 2px dashed #278FCD;
	border-radius: 14px;
	padding: 28px;
}
.swf-voucher-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 18px;
}
.swf-org-name {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}
.swf-org-sub {
	font-size: 12px;
	color: #64748b;
}
.swf-voucher-code-block {
	background: #278FCD;
	color: #fff;
	border-radius: 8px;
	padding: 14px 18px;
	text-align: center;
	margin-bottom: 18px;
}
.swf-voucher-code-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .85;
}
.swf-voucher-code-value {
	display: block;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: .04em;
	margin-top: 4px;
}
.swf-qr-wrap {
	text-align: center;
	margin-top: 20px;
}
.swf-qr-caption {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 6px;
}
.swf-voucher-footer {
	margin-top: 18px;
	font-size: 11px;
	color: #94a3b8;
	text-align: center;
	border-top: 1px solid #f0f0f0;
	padding-top: 12px;
}
@media print {
	#adminmenumain, #wpadminbar, .swf-page-title, #wpfooter { display: none !important; }
	#wpcontent, #wpbody-content { margin: 0 !important; padding: 0 !important; }
}

/* ==========================================================================
   Front-end (public) widget
   ========================================================================== */
.swf-frontend-widget {
	max-width: 480px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.swf-frontend-title {
	color: #1e293b;
	font-weight: 600;
	margin: 0 0 6px;
}
.swf-frontend-sub {
	color: #64748b;
	font-size: 14px;
	margin: 0 0 18px;
}
.swf-frontend-field {
	margin-bottom: 12px;
}
.swf-frontend-field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
	font-family: 'Poppins', sans-serif;
}
.swf-frontend-btn {
	width: 100%;
	background: #278FCD;
	color: #fff;
	border: none;
	padding: 13px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	font-family: 'Poppins', sans-serif;
	transition: background .15s ease;
}

.swf-test-picker {
	position: relative;
}
.swf-test-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}
.swf-test-chips:empty {
	display: none;
}
.swf-test-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #EDF6FC;
	border: 1px solid #C9DEEA;
	color: #1f74a6;
	font-size: 13px;
	font-weight: 500;
	padding: 5px 6px 5px 12px;
	border-radius: 20px;
}
.swf-test-chip-remove {
	background: none;
	border: none;
	color: #1f74a6;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 50%;
}
.swf-test-chip-remove:hover {
	background: #C9DEEA;
}
.swf-test-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 20;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	max-height: 220px;
	overflow-y: auto;
	box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.swf-test-option {
	padding: 10px 14px;
	font-size: 14px;
	color: #1e293b;
	cursor: pointer;
	border-bottom: 1px solid #f1f5f9;
}
.swf-test-option:last-child {
	border-bottom: none;
}
.swf-test-option:hover {
	background: #EDF6FC;
	color: #1f74a6;
}
.swf-test-option-empty {
	color: #94a3b8;
	cursor: default;
}
.swf-test-option-empty:hover {
	background: none;
	color: #94a3b8;
}
.swf-file-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}
.swf-frontend-field input[type="file"] {
	width: 100%;
	padding: 10px;
	border: 1.5px dashed #cbd5e1;
	border-radius: 8px;
	font-size: 13px;
	box-sizing: border-box;
	font-family: 'Poppins', sans-serif;
	background: #FBFDFE;
}
.swf-field-hint {
	display: block;
	font-size: 12px;
	color: #94a3b8;
	margin-top: 5px;
}

/* Homepage hero banner — [swf_voucher_apply_widget] */
.swf-apply-hero {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-height: 260px;
	border-radius: 14px;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #0F2A3D; /* shows while the image loads / if it fails */
	display: flex;
	align-items: center;
	box-shadow: 0 10px 28px rgba(15,42,61,0.18);
	font-family: 'Poppins', sans-serif;
	box-sizing: border-box;
}
.swf-apply-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(9,26,38,0.92) 0%, rgba(9,26,38,0.78) 42%, rgba(9,26,38,0.35) 100%);
}
.swf-apply-hero-inner {
	position: relative;
	z-index: 1;
	max-width: 560px;
	padding: 40px 44px;
	box-sizing: border-box;
}
.swf-apply-hero-eyebrow {
	font-size: 12px;
	letter-spacing: 1.5px;
	color: #5CB3E8;
	font-weight: 600;
	margin-bottom: 10px;
}
.swf-apply-hero-inner h3 {
	color: #fff;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 10px;
}
.swf-apply-hero-inner p {
	color: #CFE3EE;
	font-size: 14.5px;
	line-height: 1.55;
	margin: 0 0 22px;
	max-width: 440px;
}
.swf-apply-hero-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #278FCD;
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	padding: 12px 24px;
	border-radius: 7px;
	text-decoration: none;
	transition: background .15s ease, transform .15s ease;
}
.swf-apply-hero-btn:hover {
	background: #1f74a6;
	color: #fff;
}
.swf-apply-hero-btn:hover span {
	transform: translateX(3px);
}
.swf-apply-hero-btn span {
	display: inline-block;
	transition: transform .15s ease;
}
.swf-apply-hero-btn-disabled {
	background: rgba(255,255,255,0.15);
	cursor: default;
}
@media (max-width: 640px) {
	.swf-apply-hero {
		min-height: 220px;
	}
	.swf-apply-hero-inner {
		padding: 30px 26px;
		max-width: 100%;
	}
	.swf-apply-hero-inner h3 {
		font-size: 21px;
	}
}
.swf-frontend-btn:hover {
	background: #1f74a6;
}
.swf-frontend-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}
.swf-frontend-result {
	margin-top: 20px;
	border-radius: 8px;
	padding: 16px 18px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
}
.swf-frontend-result.swf-result-error {
	background: #fdf2f2;
	border-color: #f3caca;
	color: #b32d2e;
}
.swf-frontend-result .swf-fr-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #eef2f6;
	font-size: 14px;
}
.swf-frontend-result .swf-fr-row:last-child {
	border-bottom: none;
}
.swf-frontend-result .swf-fr-label {
	color: #64748b;
}
.swf-frontend-result .swf-fr-value {
	font-weight: 600;
	color: #1e293b;
	text-align: right;
}

/* ==========================================================================
   Portal UI (Lab Portal / Staff Portal / Apply form) — shared with front-end
   ========================================================================== */
.swf-portal {
	max-width: 640px;
	margin: 0 auto;
	font-family: 'Poppins', sans-serif;
}
.swf-portal-login-box {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 32px;
	max-width: 420px;
	margin: 0 auto;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.swf-portal-title {
	color: #1e293b;
	font-weight: 600;
	margin: 0 0 6px;
}
.swf-portal-sub {
	color: #64748b;
	font-size: 13px;
	margin: 0 0 18px;
}
.swf-portal-login-error {
	display: none;
	color: #b32d2e;
	background: #fdf2f2;
	border: 1px solid #f3caca;
	border-radius: 6px;
	padding: 8px 12px;
	margin-top: 12px;
	font-size: 13px;
}
.swf-portal-app {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.swf-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #eef2f6;
	padding-bottom: 14px;
	margin-bottom: 18px;
}
.swf-portal-welcome {
	color: #64748b;
	font-size: 14px;
}
.swf-portal-welcome strong {
	color: #1e293b;
}
.swf-portal-badge {
	display: inline-block;
	margin-left: 10px;
	background: #f0f7fc;
	color: #278FCD;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 10px;
}
.swf-portal-logout-btn {
	background: none;
	border: 1px solid #cbd5e1;
	color: #64748b;
	border-radius: 6px;
	padding: 7px 14px;
	font-size: 13px;
	cursor: pointer;
	font-family: 'Poppins', sans-serif;
}
.swf-portal-logout-btn:hover {
	border-color: #b32d2e;
	color: #b32d2e;
}
.swf-portal-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
	border-bottom: 1px solid #eef2f6;
}
.swf-portal-tab {
	background: none;
	border: none;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	font-family: 'Poppins', sans-serif;
}
.swf-portal-tab.active {
	color: #278FCD;
	border-bottom-color: #278FCD;
	font-weight: 600;
}
.swf-tab-badge {
	display: inline-block;
	background: #b32d2e;
	color: #fff;
	font-size: 10px;
	border-radius: 8px;
	padding: 1px 6px;
	margin-left: 2px;
}
.swf-loading-text {
	color: #94a3b8;
	font-size: 13px;
}

.swf-application-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 14px;
}
.swf-app-card-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}
.swf-app-card-header strong {
	color: #1e293b;
}
.swf-app-date {
	color: #94a3b8;
	font-size: 12px;
}
.swf-app-card-row {
	font-size: 13px;
	color: #475569;
	margin-bottom: 3px;
}
.swf-app-card-row span {
	color: #94a3b8;
	margin-right: 4px;
}
.swf-app-approve-form {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #cbd5e1;
}
.swf-app-approve-form .swf-grid-2 {
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.swf-app-approve-form .swf-field label {
	font-size: 11px;
}
.swf-app-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}
.swf-app-reject-btn {
	color: #b32d2e !important;
	border-color: #f3caca !important;
}
.swf-app-result {
	margin-top: 10px;
}

.swf-recent-table {
	width: 100%;
	border-collapse: collapse;
}
.swf-recent-table th, .swf-recent-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #eef2f6;
	font-size: 13px;
	text-align: left;
}

/* WhatsApp button */
.swf-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #25D366;
	color: #fff !important;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	margin-top: 14px;
}
.swf-whatsapp-btn:hover {
	background: #1ebc59;
	color: #fff;
}
.swf-wa-none {
	color: #94a3b8;
	font-size: 12px;
	margin-top: 10px;
}
.swf-wa-page-action {
	color: #25D366 !important;
}

.swf-apply-widget textarea {
	font-family: 'Poppins', sans-serif;
	resize: vertical;
}
