/* ===================================================================
   PARTEM RECRUITMENT PORTAL - STYLES
   =================================================================== */
:root {
	--partem-purple: #6d28d9;
	--partem-purple-dark: #4c1d95;
	--partem-blue: #4f46e5;
	--partem-green: #10b981;
	--partem-gradient: linear-gradient(135deg, #6d28d9 0%, #4f46e5 60%, #10b981 130%);
	--partem-bg: #f6f5fb;
	--partem-card: #ffffff;
	--partem-text: #1a1a2e;
	--partem-text-light: #6b7280;
	--partem-border: #ececf3;
	--partem-radius: 16px;
	--partem-shadow: 0 8px 24px rgba(76, 29, 149, 0.08);
	--partem-shadow-lg: 0 16px 40px rgba(76, 29, 149, 0.14);
}

.partem-app, .partem-app * { box-sizing: border-box; }
.partem-app {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--partem-text);
	background: var(--partem-bg);
}

/* ---------- Login screen ---------- */
.partem-login-screen {
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--partem-gradient);
	border-radius: var(--partem-radius);
	padding: 40px 20px;
}
.partem-login-card {
	background: var(--partem-card);
	padding: 40px;
	border-radius: var(--partem-radius);
	width: 100%;
	max-width: 380px;
	box-shadow: var(--partem-shadow-lg);
	text-align: center;
}
.partem-login-badge {
	width: 56px; height: 56px; border-radius: 16px; background: var(--partem-gradient); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px;
	margin: 0 auto 14px; box-shadow: var(--partem-shadow);
}
.partem-login-logo { font-size: 28px; font-weight: 800; letter-spacing: 2px; background: var(--partem-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.partem-login-sub { color: var(--partem-text-light); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 18px; }
.partem-auth-tabs { display: flex; gap: 6px; background: #f1f0f8; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.partem-auth-tab { flex: 1; border: none; background: transparent; padding: 9px 0; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--partem-text-light); cursor: pointer; transition: all .15s; }
.partem-auth-tab.active { background: #fff; color: var(--partem-purple); box-shadow: var(--partem-shadow); }
.partem-login-step label { display: block; text-align: left; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.partem-login-step input {
	width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--partem-border);
	margin-bottom: 14px; font-size: 14px; background: #fafafe;
}
.partem-login-note { font-size: 11.5px; color: var(--partem-text-light); line-height: 1.5; margin-top: 14px; text-align: left; background: #f6f5fb; border-radius: 10px; padding: 10px 12px; }
.partem-login-message { font-size: 13px; margin-top: 10px; min-height: 18px; }
.partem-login-modal-box { max-width: 420px; padding: 0; background: transparent; box-shadow: none; position: relative; }
.partem-login-modal-close { position: absolute; top: -14px; right: -14px; background: #fff; border-radius: 50%; width: 32px; height: 32px; font-size: 18px; color: var(--partem-text); box-shadow: var(--partem-shadow); z-index: 2; }

/* ---------- Buttons ---------- */
.partem-btn {
	border: none; border-radius: 10px; padding: 11px 20px; font-size: 14px; font-weight: 600;
	cursor: pointer; transition: all .2s ease; display: inline-flex; align-items: center; gap: 6px;
}
.partem-btn-primary { background: var(--partem-gradient); color: #fff; box-shadow: var(--partem-shadow); width: 100%; justify-content: center; }
.partem-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--partem-shadow-lg); }
.partem-btn-light { background: #f1f0f8; color: var(--partem-text); }
.partem-btn-outline { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; width: 100%; justify-content: center; }
.partem-btn-link { background: none; border: none; color: var(--partem-purple); font-size: 13px; margin-top: 8px; cursor: pointer; width: 100%; }

.partem-btn-loading { opacity: .85; cursor: wait; }
.partem-spinner {
	display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff; border-radius: 50%; animation: partem-spin .7s linear infinite; vertical-align: -2px;
}
@keyframes partem-spin { to { transform: rotate(360deg); } }

/* ---------- Shell layout ---------- */
.partem-shell { display: flex; min-height: 80vh; border-radius: var(--partem-radius); overflow: hidden; box-shadow: var(--partem-shadow-lg); }

.partem-sidebar {
	width: 250px; background: linear-gradient(180deg, var(--partem-purple-dark), #2e1065);
	color: #fff; padding: 24px 16px; display: flex; flex-direction: column;
}
.partem-sidebar-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 0 6px; position: relative; }
.partem-sidebar-close-btn { display: none; position: absolute; right: 0; top: 0; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.partem-logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--partem-gradient); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.partem-logo-title { font-weight: 800; letter-spacing: 1px; font-size: 14px; }
.partem-logo-sub { font-size: 9px; letter-spacing: 1px; opacity: .65; }

.partem-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.partem-nav-item {
	display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
	color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .15s;
}
.partem-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.partem-nav-item.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }

.partem-sidebar-promo {
	background: rgba(255,255,255,.08); border-radius: 12px; padding: 16px; margin-bottom: 12px; text-align: center;
}
.partem-promo-icon { font-size: 20px; color: #facc15; }
.partem-promo-title { font-weight: 700; font-size: 13px; margin-top: 4px; }
.partem-promo-sub { font-size: 11px; opacity: .7; margin: 4px 0; }
.partem-promo-version { font-size: 10px; opacity: .5; }

.partem-main { flex: 1; background: var(--partem-bg); display: flex; flex-direction: column; min-width: 0; }

.partem-topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; background: #fff; border-bottom: 1px solid var(--partem-border); gap: 14px; }
.partem-mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--partem-text); font-size: 20px; }
.partem-mobile-overlay { display: none; }
.partem-mobile-menu-label-wrap { display: none; flex-direction: column; align-items: center; gap: 2px; }
.partem-mobile-menu-label { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--partem-text-light); }
.partem-topbar-spacer { flex: 1; }
.partem-topbar-right { display: flex; align-items: center; gap: 18px; }
.partem-notif-wrap { position: relative; }
.partem-notif-bell { position: relative; color: var(--partem-text-light); cursor: pointer; }
.partem-notif-badge { position: absolute; top: -6px; right: -8px; background: var(--partem-purple); color: #fff; font-size: 10px; border-radius: 8px; padding: 1px 5px; }
.partem-notif-dropdown { display: none; position: absolute; right: 0; top: 34px; width: 320px; max-height: 420px; overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: var(--partem-shadow-lg); z-index: 200; }
.partem-notif-dropdown.open { display: block; }
.partem-notif-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--partem-border); }
.partem-notif-list { max-height: 360px; overflow-y: auto; }
.partem-notif-item { padding: 10px 14px; border-bottom: 1px solid var(--partem-border); font-size: 12.5px; cursor: pointer; color: var(--partem-text); }
.partem-notif-item.unread { background: #f6f5fb; }
.partem-notif-item-title { font-weight: 700; margin-bottom: 2px; }
.partem-notif-item-time { font-size: 10.5px; color: var(--partem-text-light); margin-top: 4px; display: block; }
.partem-user-chip { display: flex; align-items: center; gap: 10px; }
.partem-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--partem-gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.partem-user-name { font-size: 13px; font-weight: 700; }
.partem-user-role { font-size: 11px; color: var(--partem-text-light); }

.partem-view-container { padding: 24px 28px; overflow-y: auto; }
.partem-loading { text-align: center; padding: 60px; color: var(--partem-text-light); }

/* ---------- Stat cards ---------- */
.partem-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.partem-stat-card { background: var(--partem-card); border-radius: var(--partem-radius); padding: 18px; box-shadow: var(--partem-shadow); }
.partem-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: var(--partem-gradient); color: #fff; }
.partem-stat-icon svg { width: 20px; height: 20px; }
.partem-stat-value { font-size: 24px; font-weight: 800; }
.partem-stat-label { font-size: 12px; color: var(--partem-text-light); }

/* ---------- Cards / tables ---------- */
.partem-card { background: var(--partem-card); border-radius: var(--partem-radius); box-shadow: var(--partem-shadow); padding: 20px; margin-bottom: 20px; }
.partem-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.partem-card-header h3 { margin: 0; font-size: 16px; }

.partem-table-wrap { overflow-x: auto; }
table.partem-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.partem-table th { text-align: left; padding: 10px 12px; color: var(--partem-text-light); font-weight: 600; border-bottom: 1px solid var(--partem-border); }
table.partem-table td { padding: 12px; border-bottom: 1px solid var(--partem-border); }
table.partem-table tr:hover td { background: #fafafe; cursor: pointer; }

.partem-status-pill { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.partem-status-active { background: #d1fae5; color: #047857; }

.partem-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
.partem-badge-active, .partem-badge-hired, .partem-badge-passed_interview { background: #d1fae5; color: #047857; }
.partem-badge-draft, .partem-badge-submitted { background: #e5e7eb; color: #374151; }
.partem-badge-closed, .partem-badge-rejected, .partem-badge-inactive { background: #fee2e2; color: #b91c1c; }
.partem-badge-shortlisted, .partem-badge-interview_scheduled, .partem-badge-under_review { background: #fef3c7; color: #b45309; }

/* ---------- Floating action button ---------- */
.partem-fab-wrap { display: flex; justify-content: flex-end; margin-bottom: 18px; }

/* ---------- Modals ---------- */
.partem-modal { display: none; position: fixed; inset: 0; background: rgba(20,10,40,.5); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.partem-modal.open { display: flex; }
.partem-modal-box { background: #fff; border-radius: var(--partem-radius); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--partem-shadow-lg); }
.partem-modal-wide { max-width: 760px; }
.partem-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--partem-border); }
.partem-modal-header h3 { margin: 0; font-size: 16px; }
.partem-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--partem-text-light); }
.partem-modal form, .partem-modal-box > div:not(.partem-modal-header) { padding: 20px 22px; }

.partem-modal-bottom-close { display: block; margin: 0 22px 20px; }
.partem-login-modal-box .partem-modal-bottom-close { background: rgba(255,255,255,.15); color: #fff; margin: 14px 0 0; }

/* ---------- Form ---------- */
.partem-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.partem-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--partem-text-light); }
.partem-field input, .partem-field select, .partem-field textarea {
	width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--partem-border); font-size: 13px; background: #fafafe;
}
.partem-wizard-steps { display: flex; gap: 6px; padding: 14px 22px 0; font-size: 12px; color: var(--partem-text-light); flex-wrap: wrap; }
.partem-step.active { color: var(--partem-purple); font-weight: 700; }
.partem-wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.partem-pill-options { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.partem-pill { flex: 1; min-width: 140px; border: 1px solid var(--partem-border); border-radius: 10px; padding: 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.partem-pill small { display: block; font-weight: 400; color: var(--partem-text-light); font-size: 11px; margin-top: 4px; }
.partem-pill input { margin-right: 6px; }
.partem-conditional { display: none; }
.partem-import-tabs { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.partem-tab { padding: 8px 12px; border-radius: 8px; background: #f1f0f8; border: none; cursor: pointer; font-size: 12px; }
.partem-tab.active { background: var(--partem-purple); color: #fff; }
.partem-csv-guide { background: #f6f5fb; border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-bottom: 10px; }
.partem-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 8px 0; }
.partem-hint { font-size: 12px; color: var(--partem-text-light); }
.partem-preview-box { background: #f6f5fb; border-radius: 10px; padding: 16px; font-size: 13px; line-height: 1.7; }

.partem-job-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; background: var(--partem-card); border-radius: 12px; padding: 12px 16px; box-shadow: var(--partem-shadow); }
.partem-job-filter-bar label { font-size: 12.5px; font-weight: 700; color: var(--partem-text-light); }
.partem-job-filter-bar select { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--partem-border); font-size: 13px; }

/* ---------- Luxury applicant/profile view ---------- */
.partem-luxury-profile { }
.partem-luxury-header {
	background: var(--partem-gradient); border-radius: 14px; padding: 20px; color: #fff;
	display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.partem-luxury-avatar {
	width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.2); flex-shrink: 0;
	display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; border: 2px solid rgba(255,255,255,.4);
}
.partem-luxury-header > div:nth-child(2) { flex: 1; }
.partem-luxury-score { text-align: center; background: rgba(255,255,255,.15); border-radius: 10px; padding: 8px 14px; }
.partem-luxury-score span { display: block; font-size: 20px; font-weight: 800; }
.partem-luxury-score small { font-size: 10px; opacity: .8; }
.partem-luxury-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--partem-bg); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.partem-luxury-grid label { font-size: 11px; font-weight: 700; color: var(--partem-text-light); text-transform: uppercase; letter-spacing: .5px; }
.partem-luxury-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.partem-luxury-grid p { margin: 4px 0 0; font-size: 13.5px; }

/* ---------- Toast ---------- */
.partem-toast {
	position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
	background: #1a0b2e; color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 13.5px;
	box-shadow: var(--partem-shadow-lg); z-index: 5000; opacity: 0; transition: all .3s ease;
}
.partem-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Public job listing ---------- */
.partem-public-jobs { display: grid; gap: 16px; }
.partem-public-job-card { background: var(--partem-card); border-radius: var(--partem-radius); padding: 20px; box-shadow: var(--partem-shadow); }
.partem-job-meta { color: var(--partem-text-light); font-size: 13px; margin: 4px 0 10px; }

/* ---------- Misc ---------- */
.partem-already-logged-in { padding: 16px; background: #f6f5fb; border-radius: 10px; }
.partem-empty-state { text-align: center; padding: 40px; color: var(--partem-text-light); }

@media (max-width: 900px) {
	.partem-shell { flex-direction: column; position: relative; overflow: visible; }
	.partem-sidebar {
		position: fixed; top: 0; left: 0; height: 100vh; width: 270px; z-index: 1001;
		transform: translateX(-105%); transition: transform .25s ease; overflow-y: auto;
		box-shadow: var(--partem-shadow-lg);
	}
	.partem-sidebar.open { transform: translateX(0); }
	.partem-sidebar-close-btn { display: block; }
	.partem-nav { flex-direction: column; }
	.partem-sidebar-footer { display: flex; flex-direction: column; }
	.partem-mobile-overlay {
		display: none; position: fixed; inset: 0; background: rgba(20,10,40,.45); z-index: 1000;
	}
	.partem-mobile-overlay.open { display: block; }
	.partem-mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
	.partem-mobile-menu-label-wrap { display: flex; }
	.partem-topbar {
		position: sticky; top: 0; z-index: 100; padding: 8px 14px; min-height: 44px;
		background: linear-gradient(135deg, #1a0b2e, #2e1065); border-bottom: none;
	}
	.partem-topbar .dashicons,
	.partem-mobile-menu-toggle,
	.partem-mobile-menu-label,
	.partem-user-name,
	.partem-user-role { color: #fff; }
	.partem-notif-bell { color: #fff; }
	.partem-notif-dropdown { left: 0; right: auto; width: 280px; }
	.partem-form-grid { grid-template-columns: 1fr; }
	.partem-view-container { padding: 14px 12px; }
	.partem-card { padding: 14px; }
	.partem-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.partem-modal { padding: 10px; }
	.partem-modal-box { max-width: 100%; max-height: 92vh; }
	.partem-modal-wide { max-width: 100%; }
	.partem-modal-header { padding: 14px 16px; }
	.partem-modal form, .partem-modal-box > div:not(.partem-modal-header) { padding: 14px 16px; }
	table.partem-table { font-size: 12px; }
	table.partem-table th, table.partem-table td { padding: 8px; }
	.partem-pill-options { flex-direction: column; }
	.partem-wizard-steps { font-size: 10.5px; }
	.partem-login-card { padding: 26px 20px; max-width: 100%; }
}
