/* HR Employee Manager – Frontend employee dashboard (mobile-friendly), floating Team Portal button */

/* ═══ Isolate dashboard from theme CSS (when body has .hr-em-dashboard-page) ═══ */
body.hr-em-dashboard-page {
	overflow-x: hidden;
}
body.hr-em-dashboard-page .entry-content,
body.hr-em-dashboard-page .post-content,
body.hr-em-dashboard-page .content-inner,
body.hr-em-dashboard-page .content,
body.hr-em-dashboard-page .site-content,
body.hr-em-dashboard-page main,
body.hr-em-dashboard-page #content,
body.hr-em-dashboard-page #main,
body.hr-em-dashboard-page .page-content,
body.hr-em-dashboard-page .elementor-inner,
body.hr-em-dashboard-page .elementor-section-wrap {
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
body.hr-em-dashboard-page .entry-content,
body.hr-em-dashboard-page .post-content,
body.hr-em-dashboard-page .page-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* ═══ Standardized left sidebar layout (pmf-app = LanTech IT pattern) ═══ */
.pmf-app {
	box-sizing: border-box;
	--pmf-sidebar-w: 260px;
	--pmf-bg: #f4f6f9;
	--pmf-primary: #2271b1;
	--pmf-primary-hover: #135e96;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	display: flex;
	min-height: 100vh;
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background: var(--pmf-bg);
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}
.pmf-app * { box-sizing: border-box; }
.pmf-app a { color: var(--pmf-primary); text-decoration: none; }
.pmf-app a:hover { color: var(--pmf-primary-hover); }
.pmf-app img { max-width: 100%; border-radius: 50%; }

.pmf-sidebar {
	width: var(--pmf-sidebar-w);
	background: #1e293b;
	color: #cbd5e1;
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 100;
	overflow-y: auto;
	transition: transform 0.25s ease;
}
.pmf-sidebar-header {
	padding: 20px 20px 10px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.pmf-logo {
	font-size: 17px;
	font-weight: 700;
	color: #fff;
}
.pmf-sidebar-user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.pmf-avatar img { width: 40px; height: 40px; border-radius: 50%; }
.pmf-user-name { font-weight: 600; color: #fff; font-size: 13px; }
.pmf-user-role { font-size: 11px; color: #94a3b8; }

.pmf-nav { list-style: none; padding: 10px 0; margin: 0; flex: 1; }
.pmf-nav-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.15s;
	border-left: 3px solid transparent;
}
.pmf-nav-item a:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.pmf-nav-item.active a {
	background: rgba(34,113,177,.2);
	color: #72aee6;
	border-left-color: var(--pmf-primary);
}
.pmf-nav-icon {
	font-size: 20px;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
}
.pmf-nav-icon.dashicons { font-size: 20px; width: 24px; height: 24px; }

.pmf-nav-group { list-style: none; margin: 0; padding: 0; }
.pmf-nav-group-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 20px;
	background: none;
	border: none;
	color: #e2e8f0;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s;
	border-left: 3px solid transparent;
}
.pmf-nav-group-toggle:hover { background: rgba(255,255,255,.05); }
.pmf-nav-chevron { font-size: 11px; transition: transform 0.2s; }
.pmf-nav-group.expanded .pmf-nav-chevron { transform: rotate(90deg); }
.pmf-nav-subitems {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}
.pmf-nav-group.expanded .pmf-nav-subitems { max-height: 600px; }
.pmf-nav-subitem a { padding-left: 36px; font-size: 12.5px; }

.pmf-sidebar-footer {
	padding: 12px 20px;
	border-top: 1px solid rgba(255,255,255,.08);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.pmf-footer-link {
	display: block;
	padding: 6px 0;
	color: #94a3b8 !important;
	font-size: 12px;
}
.pmf-footer-link:hover { color: #e2e8f0 !important; }

.pmf-sidebar-toggle {
	display: none;
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	background: #1e293b;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
}

.pmf-main {
	flex: 1;
	margin-left: var(--pmf-sidebar-w);
	padding: 30px;
	max-width: 1200px;
	min-width: 0;
}

@media screen and (max-width: 782px) {
	.pmf-sidebar { transform: translateX(-100%); }
	.pmf-sidebar.open { transform: translateX(0); }
	.pmf-sidebar-toggle { display: block; }
	.pmf-main { margin-left: 0; padding-top: 50px; padding-left: 15px; padding-right: 15px; }
}

.hr-em-dashboard {
	max-width: 900px;
	margin: 0 auto;
	padding: 1rem 0;
}
.hr-em-dashboard h2,
.hr-em-page-title {
	margin-bottom: 1.25rem;
}

/* ── Frontend status cards (stats grid) ─────────────────── */
.hr-em-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.hr-em-stat-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.hr-em-stat-card--docs { border-left: 4px solid #2271b1; }
.hr-em-stat-card--tasks { border-left: 4px solid #dba617; }
.hr-em-stat-card--pto { border-left: 4px solid #00a32a; }
.hr-em-stat-card .hr-em-stat-number {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	color: #1d2327;
}
.hr-em-stat-card .hr-em-stat-label {
	font-size: 0.8125rem;
	color: #646970;
	margin-top: 0.25rem;
}

/* ── Frontend quick actions (shared pmf-* pattern with PM/SRM/CRM) ────────────────────────────── */
.pmf-section {
	margin-bottom: 1.5rem;
}
.pmf-section-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.pmf-section-title .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--pmf-primary, #2271b1);
}
.pmf-actions-row {
	display: flex;
	gap: 0.625rem;
	flex-wrap: wrap;
}
.pmf-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.625rem 1.125rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: #1d2327;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	text-decoration: none;
}
.pmf-action-btn:hover {
	background: #f8fafc;
	border-color: var(--pmf-primary, #2271b1);
	color: var(--pmf-primary, #2271b1);
}
.pmf-action-btn.pmf-action-primary {
	background: var(--pmf-primary, #2271b1);
	border-color: var(--pmf-primary, #2271b1);
	color: #fff;
}
.pmf-action-btn.pmf-action-primary:hover {
	background: var(--pmf-primary-hover, #135e96);
	border-color: var(--pmf-primary-hover, #135e96);
	color: #fff;
}

.hr-em-section {
	margin-bottom: 2rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.hr-em-section h3 {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	border-bottom: 1px solid #eee;
	padding-bottom: 0.5rem;
}
.hr-em-profile-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hr-em-profile-list li {
	padding: 0.25rem 0;
}
.hr-em-table {
	width: 100%;
	border-collapse: collapse;
}
.hr-em-table th,
.hr-em-table td {
	padding: 0.5rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid #eee;
}
.hr-em-table th {
	font-weight: 600;
}
.hr-em-task-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hr-em-task {
	padding: 0.75rem;
	border-bottom: 1px solid #eee;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}
.hr-em-task.completed {
	opacity: 0.75;
}
.hr-em-task-title {
	font-weight: 500;
	flex: 1 1 100%;
}
.hr-em-task-desc,
.hr-em-task-due {
	font-size: 0.9rem;
	color: #50575e;
}
/* ── Badges ─────────────────────────────────────────────── */
.hr-em-badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border-radius: 3px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	vertical-align: middle;
}
.hr-em-badge:not([class*="hr-em-badge-"]) {
	background: #00a32a;
	color: #fff;
}
.hr-em-badge-success {
	background: #00a32a;
	color: #fff;
}
.hr-em-badge-warning {
	background: #dba617;
	color: #1d2327;
}
.hr-em-badge-danger {
	background: #d63638;
	color: #fff;
}

/* ── Frontend buttons (mimic WP admin .button) ────────── */
.hr-em-dashboard .button,
.hr-em-dashboard .hr-em-btn {
	display: inline-block;
	padding: 0 12px;
	min-height: 30px;
	line-height: 28px;
	font-size: 13px;
	font-weight: 400;
	text-decoration: none;
	border: 1px solid #2271b1;
	border-radius: 3px;
	background: #f6f7f7;
	color: #2271b1;
	cursor: pointer;
	white-space: nowrap;
	vertical-align: middle;
	box-shadow: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hr-em-dashboard .button:hover,
.hr-em-dashboard .button:focus,
.hr-em-dashboard .hr-em-btn:hover,
.hr-em-dashboard .hr-em-btn:focus {
	background: #f0f0f1;
	border-color: #0a4b78;
	color: #0a4b78;
	text-decoration: none;
}
.hr-em-dashboard .button.button-primary,
.hr-em-dashboard .hr-em-btn-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}
.hr-em-dashboard .button.button-primary:hover,
.hr-em-dashboard .button.button-primary:focus,
.hr-em-dashboard .hr-em-btn-primary:hover,
.hr-em-dashboard .hr-em-btn-primary:focus {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}
.hr-em-dashboard .button-small,
.hr-em-dashboard .hr-em-btn-sm {
	min-height: 26px;
	line-height: 24px;
	padding: 0 8px;
	font-size: 12px;
}

/* ── Document action links ────────────────────────────── */
.hr-em-download {
	display: inline-block;
	margin-right: 6px;
	font-size: 13px;
	color: #2271b1;
	text-decoration: none;
}
.hr-em-download:hover,
.hr-em-download:focus {
	color: #135e96;
	text-decoration: underline;
}

/* ── Action cell spacing ──────────────────────────────── */
.hr-em-table td:last-child {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

/* ── Task list buttons ────────────────────────────────── */
.hr-em-task .button,
.hr-em-task .hr-em-btn {
	flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media screen and (max-width: 600px) {
	.hr-em-table th:nth-child(3),
	.hr-em-table td:nth-child(3) {
		display: none;
	}
	.hr-em-table th:first-child,
	.hr-em-table td:first-child {
		font-weight: 600;
	}
	.hr-em-table td:last-child {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

/* ── Schedule Manager page ────────────────────────────── */
.hr-em-schedule-manager .hr-em-schedule-manager-nav {
	margin-bottom: 1rem;
}
.hr-em-schedule-manager .hr-em-back-link {
	display: inline-block;
	font-size: 14px;
	color: #2271b1;
	text-decoration: none;
}
.hr-em-schedule-manager .hr-em-back-link:hover {
	color: #135e96;
	text-decoration: underline;
}
.hr-em-schedule-manager .hr-em-description {
	color: #50575e;
	margin-bottom: 1.5rem;
}
.hr-em-schedule-manager .hr-em-notice-success {
	background: #d4edda;
	border-left: 4px solid #28a745;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 0 4px 4px 0;
}
.hr-em-schedule-manager-select-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
}
.hr-em-schedule-manager-select-form label {
	font-weight: 600;
}
.hr-em-schedule-manager .hr-em-employee-select {
	min-width: 260px;
	padding: 6px 10px;
}
.hr-em-schedule-manager .hr-em-section-title {
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	font-size: 1.25rem;
}
.hr-em-schedule-manager .hr-em-subsection-title {
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	font-size: 1.1rem;
}
.hr-em-schedule-manager .hr-em-schedule-weekly input[type="time"],
.hr-em-schedule-manager .hr-em-schedule-overrides input[type="time"],
.hr-em-schedule-manager .hr-em-schedule-overrides input[type="date"] {
	width: 100%;
	max-width: 120px;
}
.hr-em-schedule-manager .hr-em-form-actions {
	margin-top: 1.5rem;
}
.hr-em-schedule-manager .hr-em-add-override-row td {
	background: #f6f7f7;
}
