/* Resources Manager - Front-end Styles */

.pml-archive-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 0;
	align-items: start;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Sidebar Styles */
.pml-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.pml-widget {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 22px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.pml-widget-title {
	margin: 0 0 16px 0;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #1a202c;
	padding-bottom: 10px;
	border-bottom: 2px solid #edf2f7;
}

/* Date Filter Form */
.pml-date-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pml-field-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pml-field-group label {
	font-size: 11px;
	font-weight: 700;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pml-field-group select {
	width: 100%;
	padding: 9px 12px;
	border-radius: 8px;
	border: 1px solid #cbd5e0;
	background: #f8fafc;
	font-size: 14px;
	color: #2d3748;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.pml-field-group select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
	background: #fff;
}

.pml-date-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 6px;
}

.pml-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 11px 16px;
	background: #2271b1;
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	transition: background 0.2s ease, transform 0.1s ease;
}

.pml-btn:hover {
	background: #135e96;
}

.pml-btn:active {
	transform: scale(0.98);
}

.pml-btn-clear {
	display: block;
	text-align: center;
	font-size: 12px;
	color: #718096 !important;
	text-decoration: none;
	padding: 4px 0;
	transition: color 0.2s;
}

.pml-btn-clear:hover {
	color: #e53e3e !important;
	text-decoration: underline;
}

/* Category Navigation List */
.pml-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pml-cat-item a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	border-radius: 8px;
	text-decoration: none;
	color: #4a5568;
	font-size: 14px;
	font-weight: 500;
	background: transparent;
	transition: background 0.2s ease, color 0.2s ease;
}

.pml-cat-item a:hover {
	background: #f1f5f9;
	color: #1a202c;
}

.pml-cat-item.is-active a {
	background: #2271b1;
	color: #ffffff;
	font-weight: 600;
}

.pml-cat-name {
	flex-grow: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pml-cat-count {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 12px;
	background: #e2e8f0;
	color: #4a5568;
	margin-left: 8px;
}

.pml-cat-item.is-active .pml-cat-count {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

/* Main Content & Grid */
.pml-main-content {
	min-width: 0;
}

.pml-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 24px;
}

.pml-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pml-card:hover {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.pml-card-icon {
	height: 165px;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	border-bottom: 1px solid #edf2f7;
}

.pml-card-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pml-card-icon .pml-pdf-canvas {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pml-pdf-icon {
	font-weight: 800;
	letter-spacing: 1px;
	color: #c0392b;
	border: 2px solid #c0392b;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: 14px;
}

.pml-pdf-fallback {
	margin: auto;
}

.pml-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pml-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: #1a202c;
}

.pml-card-meta {
	font-size: 12px;
	color: #718096;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.pml-card-cats {
	color: #2271b1;
	font-weight: 500;
}

.pml-pagination {
	margin-top: 32px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.pml-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid #cbd5e0;
	border-radius: 8px;
	text-decoration: none;
	color: #4a5568;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}

.pml-pagination .page-numbers:hover {
	background: #f1f5f9;
	color: #1a202c;
}

.pml-pagination .page-numbers.current {
	background: #2271b1;
	color: #ffffff;
	border-color: #2271b1;
}

.pml-no-results {
	padding: 40px;
	text-align: center;
	color: #718096;
	background: #f8fafc;
	border: 1px dashed #cbd5e0;
	border-radius: 12px;
}

/* Single PDF page */
.pml-single { max-width: 900px; margin: 0 auto; padding: 20px 0; }
.pml-back-link a { text-decoration: none; color: #2271b1; font-size: 14px; }
.pml-single-title { margin: 8px 0 4px; }
.pml-single-meta { color: #666; font-size: 13px; margin-bottom: 18px; display: flex; gap: 14px; }
.pml-single-meta a { color: inherit; }
.pml-single-description { margin-bottom: 20px; line-height: 1.6; }

.pml-embed-wrap {
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
}
.pml-embed-frame { width: 100%; height: 85vh; border: none; display: block; }

.pml-download { margin-top: 16px; }
.pml-no-file { color: #a33; }

@media (max-width: 768px) {
	.pml-archive-layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.pml-embed-frame { height: 70vh; }
}


