/* Job Recruitment Manager — Government jobs table UI */

.jrm-wrap.jrm-pending .jrm-cards-grid,
.jrm-wrap.jrm-pending #jrm-tbody {
	min-height: 120px;
}

.jrm-wrap {
	--jrm-blue: #1a73b8;
	--jrm-blue-dark: #155a94;
	--jrm-border: #e2e4e8;
	--jrm-header-bg: #f4f6f8;
	--jrm-green: #1b8a3e;
	--jrm-red: #d93025;
	--jrm-text: #1a1a1a;
	--jrm-link: #1a73b8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	max-width: 100%;
	margin: 1.25em 0;
	color: var(--jrm-text);
}

/* Toolbar (search / filter) */
.jrm-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-bottom: 0.85rem;
}

.jrm-filter-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.jrm-filter-field-search {
	flex: 1 1 200px;
}

.jrm-filter-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: #555;
	line-height: 1.3;
}

.jrm-search {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--jrm-border);
	border-radius: 4px;
	font-size: 0.95rem;
}

.jrm-filter-mode,
.jrm-filter-qualification,
.jrm-filter-job-type {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--jrm-border);
	border-radius: 4px;
	min-width: 150px;
	font-size: 0.95rem;
	background: #fff;
}

.jrm-layout-cards .jrm-toolbar {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	align-items: center;
	gap: 0.65rem;
}

.jrm-layout-cards .jrm-filter-field-search {
	grid-column: 1 / -1;
}

.jrm-layout-cards .jrm-filter-actions {
	grid-column: 1 / -1;
}

.jrm-filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.jrm-filter-apply,
.jrm-filter-reset {
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid transparent;
	white-space: nowrap;
}

.jrm-filter-apply {
	background: var(--jrm-blue);
	color: #fff;
	border-color: var(--jrm-blue);
}

.jrm-filter-apply:hover {
	background: var(--jrm-blue-dark);
}

.jrm-filter-reset {
	background: #fff;
	color: #444;
	border-color: var(--jrm-border);
}

.jrm-filter-reset:hover {
	background: #f6f7f8;
}

@media (max-width: 640px) {
	.jrm-layout-cards .jrm-filter-field {
		flex: 1 1 calc(50% - 0.35rem);
		min-width: 0;
	}

	.jrm-filter-actions {
		flex: 1 1 100%;
	}
}

/* Card container (table panel) */
.jrm-panel {
	border: 1px solid var(--jrm-border);
	border-radius: 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Blue title bar */
.jrm-title-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--jrm-blue);
	color: #fff;
	padding: 0.85rem 1rem;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jrm-title-bar svg {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* Table */
.jrm-table-scroll {
	overflow-x: auto;
}

.jrm-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.jrm-table thead th {
	background: var(--jrm-header-bg);
	color: #333;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--jrm-border);
	white-space: nowrap;
}

.jrm-table thead th.jrm-col-link {
	text-align: center;
	width: 100px;
}

.jrm-table tbody td {
	padding: 1rem;
	border-bottom: 1px solid var(--jrm-border);
	vertical-align: middle;
}

.jrm-table tbody tr:last-child td {
	border-bottom: none;
}

.jrm-table tbody tr:hover {
	background: #fafbfc;
}

.jrm-sortable {
	cursor: pointer;
}

.jrm-sortable:hover {
	color: var(--jrm-blue);
}

/* Job name column */
.jrm-job-name {
	font-weight: 700;
	line-height: 1.45;
	font-size: 0.98rem;
}

.jrm-job-name .jrm-job-plain {
	color: var(--jrm-text);
}

.jrm-badge-new {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0.12rem 0.45rem;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	background: var(--jrm-red);
	border-radius: 3px;
	vertical-align: middle;
	letter-spacing: 0.03em;
}

/* Details column */
.jrm-details-cell {
	line-height: 1.55;
}

.jrm-vacancies {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--jrm-green);
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 0.2rem;
}

.jrm-vacancies svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	fill: var(--jrm-green);
}

.jrm-last-date {
	color: var(--jrm-red);
	font-weight: 600;
	font-size: 0.9rem;
}

.jrm-qualification-hint,
.jrm-detail-line {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.86rem;
	color: #444;
	font-weight: 400;
	line-height: 1.45;
	word-break: break-word;
}

.jrm-detail-label {
	font-weight: 700;
	color: #333;
}

.jrm-detail-qual {
	color: #2c3e50;
}

/* Link column */
.jrm-col-link {
	text-align: center;
}

.jrm-view-btn {
	display: inline-block;
	min-width: 72px;
	padding: 0.45rem 1.25rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #fff !important;
	background: var(--jrm-blue);
	border: none;
	border-radius: 4px;
	text-decoration: none !important;
	text-align: center;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jrm-view-btn:hover {
	background: var(--jrm-blue-dark);
	color: #fff !important;
}

.jrm-view-btn.is-disabled {
	opacity: 0.45;
	pointer-events: none;
	cursor: default;
}

.jrm-loading,
.jrm-empty {
	text-align: center;
	color: #646970;
	padding: 2rem 1rem !important;
}

/* Pagination */
.jrm-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.85rem;
	padding: 0 0.15rem;
}

.jrm-pagination-info {
	color: #646970;
	font-size: 0.88rem;
}

.jrm-pagination-btns {
	display: flex;
	gap: 0.5rem;
}

.jrm-pagination-btns button {
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--jrm-border);
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
}

.jrm-pagination-btns button:hover:not(:disabled) {
	border-color: var(--jrm-blue);
	color: var(--jrm-blue);
}

.jrm-pagination-btns button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.jrm-error {
	color: #b32d2e;
}

/* Modal (full details) */
.jrm-modal[hidden] {
	display: none !important;
}

.jrm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.jrm-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.jrm-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 6px;
	max-width: 640px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.jrm-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	border: none;
	background: none;
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
	color: #646970;
}

.jrm-modal-panel h3 {
	margin: 0 2rem 0.75rem 0;
	font-size: 1.1rem;
	line-height: 1.4;
	color: var(--jrm-link);
}

.jrm-modal-body dl {
	margin: 0;
}

.jrm-modal-body dt {
	font-weight: 600;
	margin-top: 0.75rem;
	color: #1d2327;
}

.jrm-modal-body dd {
	margin: 0.25rem 0 0;
	color: #3c434a;
	word-break: break-word;
}

.jrm-modal-body a {
	color: var(--jrm-link);
}

/* ── Cards layout ── */
.jrm-layout-cards {
	--jrm-card-purple: #6b4fbb;
	--jrm-card-purple-dark: #5a3fa8;
	--jrm-card-gold: #b5893a;
	--jrm-card-gold-dark: #9a7330;
	--jrm-card-stat-bg: #f5f3ef;
}

.jrm-layout-cards .jrm-cards-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}

.jrm-job-card {
	position: relative;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.jrm-card-meta-id {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	opacity: 0.85;
	margin-bottom: 0.35rem;
}

/* Purple header card (design 1) */
.jrm-job-card--purple {
	border: 1px solid #e4e0f0;
}

.jrm-card-purple-header {
	background: var(--jrm-card-purple);
	color: #fff;
	padding: 1rem 1.1rem 0.9rem;
}

.jrm-card-purple-title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
}

.jrm-card-purple-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.55rem;
}

.jrm-badge-new--header {
	background: #e53935;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	padding: 0.15rem 0.45rem;
	border-radius: 4px;
	letter-spacing: 0.04em;
}

.jrm-badge-type {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	text-transform: capitalize;
}

.jrm-card-purple-body {
	padding: 0.85rem 1.1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	flex: 1;
}

.jrm-card-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.jrm-card-fact {
	display: grid;
	grid-template-columns: 22px 1fr auto;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.86rem;
}

.jrm-card-fact-icon {
	display: inline-flex;
	color: var(--jrm-card-purple);
}

.jrm-card-fact-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.jrm-card-fact-label {
	color: #666;
}

.jrm-card-fact-value {
	color: #111;
	font-weight: 700;
	text-align: right;
}

.jrm-card-purple-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: 100%;
	margin-top: auto;
	padding: 0.65rem 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff !important;
	background: var(--jrm-card-purple);
	border: none;
	border-radius: 8px;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jrm-card-purple-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex-shrink: 0;
}

.jrm-card-purple-btn:hover {
	background: var(--jrm-card-purple-dark);
	color: #fff !important;
}

/* Grid stats card (design 2) */
.jrm-job-card--grid {
	border: 1px solid #e8eaed;
	padding: 1rem;
	gap: 0.85rem;
}

.jrm-card-grid-head {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.jrm-card-grid-logo {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: #f0f0f0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
	padding: 6px;
	overflow: hidden;
}

.jrm-card-grid-logo span:nth-child(1) { background: #e57373; border-radius: 3px; }
.jrm-card-grid-logo span:nth-child(2) { background: #64b5f6; border-radius: 3px; }
.jrm-card-grid-logo span:nth-child(3) { background: #81c784; border-radius: 3px; }
.jrm-card-grid-logo span:nth-child(4) { background: #ffb74d; border-radius: 3px; }

.jrm-card-grid-head-text {
	min-width: 0;
	flex: 1;
}

.jrm-card-grid-head .jrm-card-meta-id {
	color: #888;
	margin-bottom: 0.2rem;
}

.jrm-card-grid-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	color: #111;
}

.jrm-card-grid-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
}

.jrm-card-stat {
	background: var(--jrm-card-stat-bg);
	border-radius: 8px;
	padding: 0.55rem 0.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-height: 62px;
}

.jrm-card-stat-icon {
	color: #888;
	line-height: 1;
}

.jrm-card-stat-icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.jrm-card-stat-label {
	font-size: 0.72rem;
	color: #777;
}

.jrm-card-stat-value {
	font-size: 0.88rem;
	font-weight: 700;
	color: #111;
	line-height: 1.3;
}

.jrm-card-grid-qual {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.5;
	color: #444;
}

.jrm-card-grid-footer {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.15rem;
}

.jrm-badge-new--footer {
	flex: 0 0 auto;
	background: #e53935;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	letter-spacing: 0.04em;
}

.jrm-card-grid-btn-pdf {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.55rem 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #fff !important;
	background: var(--jrm-card-gold);
	border: none;
	border-radius: 8px;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jrm-card-grid-btn-pdf svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex-shrink: 0;
}

.jrm-card-grid-btn-pdf:hover {
	background: var(--jrm-card-gold-dark);
	color: #fff !important;
}

.jrm-card-grid-btn-site {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: #555 !important;
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jrm-card-grid-btn-site svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.jrm-card-grid-btn-site:hover {
	background: #e8e8e8;
	color: #222 !important;
}

.jrm-cards-loading,
.jrm-cards-empty {
	grid-column: 1 / -1;
}

@media (max-width: 768px) {
	.jrm-layout-cards .jrm-cards-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {

	.jrm-table thead th,
	.jrm-table tbody td {
		padding: 0.75rem 0.6rem;
	}

	.jrm-title-bar {
		font-size: 0.9rem;
		padding: 0.7rem 0.5rem;
	}

	.jrm-view-btn {
		min-width: 60px;
		padding: 0.4rem 0.85rem;
		font-size: 0.85rem;
	}
}