/* JobHUB Frontend Styles */

:root {
	--jobhub-primary: #6366f1; /* Indigo */
	--jobhub-primary-hover: #4f46e5;
	--jobhub-secondary: #f3f4f6; /* Light gray */
	--jobhub-secondary-hover: #e5e7eb;
	--jobhub-danger: #ef4444; /* Red */
	--jobhub-danger-hover: #dc2626;
	--jobhub-text-main: #111827;
	--jobhub-text-muted: #6b7280;
	--jobhub-bg-body: #f9fafb;
	--jobhub-bg-card: #ffffff;
	--jobhub-border: #e5e7eb;
	--jobhub-radius-sm: 6px;
	--jobhub-radius-md: 12px;
	--jobhub-radius-lg: 16px;
	--jobhub-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--jobhub-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--jobhub-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--jobhub-transition: all 0.2s ease-in-out;
}

/* Base Form Elements */
.jobhub-form-container {
	max-width: 450px;
	margin: 0 auto;
	padding: 30px;
	background: var(--jobhub-bg-card);
	border: 1px solid var(--jobhub-border);
	border-radius: var(--jobhub-radius-lg);
	box-shadow: var(--jobhub-shadow-md);
}

.jobhub-form-group {
	margin-bottom: 20px;
}

.jobhub-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--jobhub-text-main);
	font-size: 0.95rem;
}

.jobhub-form-group input,
.jobhub-form-group select,
.jobhub-form-group textarea,
.jobhub-input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--jobhub-border);
	border-radius: var(--jobhub-radius-sm);
	box-sizing: border-box;
	font-size: 0.95rem;
	transition: var(--jobhub-transition);
	color: var(--jobhub-text-main);
	background-color: #fff;
}

.jobhub-form-group input:focus,
.jobhub-form-group select:focus,
.jobhub-form-group textarea:focus,
.jobhub-input:focus {
	outline: none;
	border-color: var(--jobhub-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.jobhub-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	border-radius: var(--jobhub-radius-sm);
	cursor: pointer;
	transition: var(--jobhub-transition);
	font-size: 0.95rem;
}

.jobhub-btn-primary { 
	background: var(--jobhub-primary); 
	color: #ffffff; 
}
.jobhub-btn-primary:hover { 
	background: var(--jobhub-primary-hover); 
	transform: translateY(-1px);
	box-shadow: var(--jobhub-shadow-sm);
}

.jobhub-btn-secondary { 
	background: var(--jobhub-secondary); 
	color: var(--jobhub-text-main); 
}
.jobhub-btn-secondary:hover { 
	background: var(--jobhub-secondary-hover); 
}

.jobhub-btn-danger { 
	background: var(--jobhub-danger); 
	color: #fff; 
}
.jobhub-btn-danger:hover { 
	background: var(--jobhub-danger-hover); 
}

.jobhub-btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.jobhub-btn-full { width: 100%; }

/* Alerts */
.jobhub-alert {
	padding: 16px;
	margin-bottom: 20px;
	border: 1px solid transparent;
	border-radius: var(--jobhub-radius-md);
	font-size: 0.95rem;
}

.jobhub-alert-success { color: #065f46; background-color: #d1fae5; border-color: #a7f3d0; }
.jobhub-alert-error { color: #991b1b; background-color: #fee2e2; border-color: #fecaca; }
.jobhub-alert-warning { color: #92400e; background-color: #fef3c7; border-color: #fde68a; }

.jobhub-float-right { float: right; }

/* Dashboard Tables */
.jobhub-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
	background: var(--jobhub-bg-card);
	border-radius: var(--jobhub-radius-md);
	overflow: hidden;
	box-shadow: var(--jobhub-shadow-sm);
}

.jobhub-table th {
	background-color: var(--jobhub-bg-body);
	color: var(--jobhub-text-muted);
	font-weight: 600;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.jobhub-table th, .jobhub-table td {
	padding: 16px;
	text-align: left;
	border-bottom: 1px solid var(--jobhub-border);
}

.jobhub-table tr:last-child td { border-bottom: none; }
.jobhub-table tbody tr:hover { background-color: #f8fafc; }

.jobhub-dashboard-section {
	margin-bottom: 40px;
	padding: 30px;
	background: var(--jobhub-bg-card);
	border: 1px solid var(--jobhub-border);
	border-radius: var(--jobhub-radius-lg);
	box-shadow: var(--jobhub-shadow-sm);
}
.jobhub-dashboard-section h3 { margin-top: 0; color: var(--jobhub-text-main); }

/* --- Modern Grid Layout for Job Listings --- */

.jobhub-container {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 30px;
	margin: 20px 0;
	align-items: start;
}

@media (max-width: 768px) {
	.jobhub-container {
		grid-template-columns: 1fr;
	}
}

/* Sidebar Filters */
.jobhub-sidebar {
	background: var(--jobhub-bg-card);
	border: 1px solid var(--jobhub-border);
	border-radius: var(--jobhub-radius-md);
	padding: 24px;
	position: sticky;
	top: 20px;
}

.jobhub-sidebar-header h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 1.25rem;
	border-bottom: 2px solid var(--jobhub-secondary);
	padding-bottom: 10px;
}

.jobhub-filter-group {
	margin-bottom: 20px;
}

.jobhub-filter-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--jobhub-text-main);
	font-size: 0.95rem;
}

/* Custom Checkbox/Radio */
.jobhub-checkbox-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.jobhub-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400 !important;
	color: var(--jobhub-text-muted) !important;
	cursor: pointer;
}

.jobhub-checkbox-label input[type="radio"],
.jobhub-checkbox-label input[type="checkbox"] {
	width: auto;
	margin: 0;
	cursor: pointer;
	accent-color: var(--jobhub-primary);
}

/* Main Grid Area */
.jobhub-main-grid {
	min-width: 0; /* Prevents grid blowout */
}

.jobhub-list-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}
.jobhub-list-header h2 { margin: 0; font-size: 1.5rem; }

.jobhub-job-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

/* Job Card */
.jobhub-job-card {
	background: var(--jobhub-bg-card);
	border: 1px solid var(--jobhub-border);
	border-radius: var(--jobhub-radius-lg);
	padding: 24px;
	display: flex;
	flex-direction: column;
	transition: var(--jobhub-transition);
	position: relative;
}

.jobhub-job-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--jobhub-shadow-lg);
	border-color: #cbd5e1;
}

.jobhub-card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.jobhub-company-logo {
	width: 48px;
	height: 48px;
	border-radius: var(--jobhub-radius-sm);
	background: var(--jobhub-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.jobhub-logo-placeholder {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--jobhub-primary);
}

.jobhub-job-title-wrapper { flex: 1; min-width: 0; }
.jobhub-job-title { 
	margin: 0 0 4px 0; 
	font-size: 1.15rem; 
	font-weight: 600; 
	color: var(--jobhub-text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.jobhub-company-name {
	font-size: 0.9rem;
	color: var(--jobhub-text-muted);
}

/* Badges */
.jobhub-job-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.jobhub-badge {
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 500;
}

.jobhub-badge-type { background: #e0e7ff; color: #4338ca; } /* Indigo tinted */
.jobhub-badge-level { background: #dcfce7; color: #166534; } /* Green tinted */
.jobhub-badge-salary { background: #fef3c7; color: #92400e; } /* Yellow tinted */

.jobhub-job-excerpt {
	color: var(--jobhub-text-muted);
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 24px;
	flex: 1; /* Pushes footer to bottom */
}

/* Card Footer */
.jobhub-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--jobhub-border);
}

.jobhub-job-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: var(--jobhub-text-muted);
}

.jobhub-job-location svg { color: var(--jobhub-primary); }

.jobhub-job-details-dialog {
	margin-top: 20px;
	padding: 24px;
	background: var(--jobhub-secondary);
	border-radius: var(--jobhub-radius-md);
	border-left: 4px solid var(--jobhub-primary);
}

.jobhub-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px;
	background: var(--jobhub-bg-card);
	border-radius: var(--jobhub-radius-md);
	border: 1px dashed #cbd5e1;
	color: var(--jobhub-text-muted);
}
