/* WebTechs Employee Hub — private payroll workspace */
.wteh-payroll-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
	gap: 20px;
	align-items: start;
}

.wteh-payroll-layout > div {
	display: grid;
	gap: 18px;
}

.wteh-payroll-filter {
	display: flex;
	align-items: end;
	gap: 12px;
	margin-bottom: 20px;
}

.wteh-payroll-filter label {
	display: grid;
	gap: 7px;
	font-weight: 750;
	min-width: 250px;
}

.wteh-payroll-filter select {
	min-height: 44px;
	border: 1px solid var(--wteh-border, #dbe3ef);
	border-radius: 12px;
	background: var(--wteh-surface, #fff);
	color: var(--wteh-text, #182033);
	padding: 0 12px;
}

.wteh-payroll-stats .wteh-stat-card strong {
	font-size: clamp(14px, 1.25vw, 19px);
	line-height: 1.45;
}

.wteh-payroll-table td:first-child small {
	display: block;
	margin-top: 4px;
	color: var(--wteh-muted, #667085);
}

.wteh-payroll-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 29px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
	background: #eef2f7;
	color: #344054;
}

.wteh-payroll-status.is-draft {
	background: #fff4d6;
	color: #7a4800;
}

.wteh-payroll-status.is-finalized {
	background: #e8efff;
	color: #2049a8;
}

.wteh-payroll-status.is-partially_paid {
	background: #f3eaff;
	color: #6731a8;
}

.wteh-payroll-status.is-paid {
	background: #dcf8e9;
	color: #17663e;
}

.wteh-payroll-status.is-none {
	background: #f1f3f6;
	color: #667085;
}

.wteh-payroll-checks {
	display: grid;
	gap: 10px;
	margin: 18px 0;
}

.wteh-payroll-checks label,
.wteh-payroll-finalize > label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 11px 12px;
	border: 1px solid var(--wteh-border, #e1e7ef);
	border-radius: 12px;
	background: var(--wteh-surface-2, #f8fafc);
	color: var(--wteh-text, #182033);
	font-size: 13px;
	line-height: 1.7;
}

.wteh-payroll-checks input,
.wteh-payroll-finalize input {
	margin-top: 4px;
	accent-color: var(--wteh-accent, #6d5dfc);
}

.wteh-payroll-preview {
	position: sticky;
	top: 20px;
}

.wteh-payroll-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 8px 0 18px;
}

.wteh-payroll-metrics > div {
	min-width: 0;
	padding: 13px;
	border: 1px solid var(--wteh-border, #e4e9f0);
	border-radius: 14px;
	background: var(--wteh-surface-2, #f8fafc);
}

.wteh-payroll-metrics span,
.wteh-payroll-hero span,
.wteh-payroll-total span {
	display: block;
	margin-bottom: 5px;
	color: var(--wteh-muted, #667085);
	font-size: 12px;
}

.wteh-payroll-metrics strong {
	display: block;
	color: var(--wteh-text, #172033);
	font-size: 14px;
	line-height: 1.6;
}

.wteh-payroll-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 17px 0;
	padding: 16px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--wteh-accent, #6d5dfc), #4935c8);
	color: #fff;
}

.wteh-payroll-total span {
	margin: 0;
	color: rgba(255, 255, 255, .82);
}

.wteh-payroll-total strong {
	font-size: 19px;
	white-space: nowrap;
}

.wteh-payroll-privacy {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	border-inline-start: 4px solid var(--wteh-accent, #6d5dfc);
}

.wteh-payroll-privacy strong {
	color: var(--wteh-text, #182033);
}

.wteh-payroll-privacy span {
	color: var(--wteh-muted, #667085);
}

.wteh-payroll-title-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wteh-payroll-hero {
	display: grid;
	grid-template-columns: 1.45fr 1fr 1fr;
	gap: 1px;
	margin-bottom: 20px;
	overflow: hidden;
	border: 1px solid var(--wteh-border, #dfe5ee);
	border-radius: 20px;
	background: var(--wteh-border, #dfe5ee);
	box-shadow: 0 12px 30px rgba(25, 33, 50, .06);
}

.wteh-payroll-hero > div {
	min-width: 0;
	padding: 20px;
	background: var(--wteh-surface, #fff);
}

.wteh-payroll-hero > div:first-child {
	background: linear-gradient(135deg, #6d5dfc, #4936c8);
	color: #fff;
}

.wteh-payroll-hero > div:first-child span {
	color: rgba(255,255,255,.8);
}

.wteh-payroll-hero > div:first-child .wteh-payroll-status {
	margin-top: 10px;
	background: rgba(255,255,255,.16);
	color: #fff;
}

.wteh-payroll-hero strong {
	display: block;
	color: var(--wteh-text, #182033);
	font-size: clamp(17px, 2vw, 24px);
	line-height: 1.5;
}

.wteh-payroll-hero > div:first-child strong {
	color: #fff;
}

.wteh-payroll-breakdown {
	display: grid;
	margin-top: 10px;
	border: 1px solid var(--wteh-border, #e2e8f0);
	border-radius: 15px;
	overflow: hidden;
}

.wteh-payroll-breakdown > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--wteh-border, #e8edf3);
	background: var(--wteh-surface, #fff);
	color: var(--wteh-text, #182033);
}

.wteh-payroll-breakdown > div:last-child {
	border-bottom: 0;
}

.wteh-payroll-breakdown .is-plus strong {
	color: #16734a;
}

.wteh-payroll-breakdown .is-minus strong {
	color: #b42318;
}

.wteh-payroll-breakdown .is-total {
	padding: 16px 14px;
	background: var(--wteh-surface-2, #f5f7fb);
	font-size: 16px;
	font-weight: 850;
}

.wteh-payroll-finalize {
	display: grid;
	gap: 13px;
	border-color: rgba(109,93,252,.3);
}

.wteh-payment-form small {
	display: block;
	margin-top: 10px;
	color: var(--wteh-muted, #667085);
	line-height: 1.7;
}

.wteh-payment-account {
	display: grid;
	gap: 3px;
	margin-bottom: 14px;
	padding: 12px 14px;
	border: 1px solid #f0c36b;
	border-radius: 13px;
	background: #fff8e8;
	color: #754a00;
}

.wteh-payment-account.is-ready {
	border-color: #9bd4b6;
	background: #edf9f2;
	color: #175e3c;
}

.wteh-payment-account span {
	font-size: 11px;
	font-weight: 700;
}

.wteh-payment-account strong {
	font-size: 13px;
}

.wteh-payments-card {
	margin-top: 20px;
}

.wteh-payroll-note {
	margin-top: 18px;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--wteh-surface-2, #f6f8fb);
	color: var(--wteh-text, #182033);
}

.wteh-payroll-note p {
	margin: 7px 0 0;
	color: var(--wteh-muted, #667085);
	line-height: 1.9;
}

/* WordPress-admin compatibility. */
.wteh-payroll-admin .wteh-content-card,
.wteh-payroll-admin .wteh-payroll-hero,
.wteh-payroll-admin .wteh-empty {
	box-sizing: border-box;
}

.wteh-payroll-admin .wteh-content-card {
	padding: 20px;
	margin: 0 0 18px;
	border: 1px solid #dfe5ee;
	border-radius: 16px;
	background: #fff;
}

.wteh-payroll-admin .wteh-page-title,
.wteh-payroll-admin .wteh-card-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	margin-bottom: 18px;
}

.wteh-payroll-admin .wteh-page-title h1,
.wteh-payroll-admin .wteh-card-heading h3 {
	margin: 0 0 5px;
}

.wteh-payroll-admin .wteh-page-title p,
.wteh-payroll-admin .wteh-card-heading p {
	margin: 0;
	color: #667085;
}

.wteh-payroll-admin .wteh-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 7px 14px;
	border: 0;
	border-radius: 10px;
	background: #eef1f6;
	color: #283147;
	font: inherit;
	font-weight: 750;
	text-decoration: none;
	cursor: pointer;
}

.wteh-payroll-admin .wteh-button-primary {
	background: #6d5dfc;
	color: #fff;
}

.wteh-payroll-admin .wteh-button-block {
	width: 100%;
}

.wteh-payroll-admin .wteh-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.wteh-payroll-admin .wteh-stat-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border: 1px solid #e2e7ef;
	border-radius: 15px;
	background: #fff;
}

.wteh-payroll-admin .wteh-stat-card i {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: #eeeafd;
	color: #5c48d7;
	font-style: normal;
}

.wteh-payroll-admin .wteh-stat-card strong,
.wteh-payroll-admin .wteh-stat-card span {
	display: block;
}

.wteh-payroll-admin .wteh-stat-card span {
	color: #667085;
	font-size: 12px;
}

.wteh-payroll-admin .wteh-table-wrap {
	overflow-x: auto;
}

.wteh-payroll-admin .wteh-table {
	width: 100%;
	border-collapse: collapse;
}

.wteh-payroll-admin .wteh-table th,
.wteh-payroll-admin .wteh-table td {
	padding: 12px;
	border-bottom: 1px solid #e7ebf1;
	text-align: right;
	vertical-align: middle;
}

.wteh-payroll-admin .wteh-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 13px;
}

.wteh-payroll-admin .wteh-field {
	display: grid;
	gap: 6px;
}

.wteh-payroll-admin .wteh-col-full {
	grid-column: 1 / -1;
}

.wteh-payroll-admin .wteh-field input,
.wteh-payroll-admin .wteh-field select,
.wteh-payroll-admin .wteh-field textarea {
	width: 100%;
	box-sizing: border-box;
}

@media (max-width: 980px) {
	.wteh-payroll-layout {
		grid-template-columns: 1fr;
	}

	.wteh-payroll-preview {
		position: static;
	}

	.wteh-payroll-admin .wteh-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.wteh-payroll-filter,
	.wteh-payroll-privacy,
	.wteh-payroll-title-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.wteh-payroll-filter label {
		min-width: 0;
	}

	.wteh-payroll-metrics,
	.wteh-payroll-admin .wteh-grid-2 {
		grid-template-columns: 1fr 1fr;
	}

	.wteh-payroll-hero {
		grid-template-columns: 1fr;
	}

	.wteh-payroll-hero > div {
		padding: 16px;
	}

	.wteh-payroll-admin .wteh-page-title,
	.wteh-payroll-admin .wteh-card-heading {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 440px) {
	.wteh-payroll-metrics,
	.wteh-payroll-admin .wteh-grid-2,
	.wteh-payroll-admin .wteh-stats-grid {
		grid-template-columns: 1fr;
	}

	.wteh-payroll-total,
	.wteh-payroll-breakdown > div {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media print {
	.wteh-sidebar,
	.wteh-portal-header,
	.wteh-nav-backdrop,
	.wteh-payroll-title-actions,
	.wteh-payment-form,
	.wteh-payroll-finalize,
	.wteh-sidebar-help {
		display: none !important;
	}

	.wteh-portal-layout,
	.wteh-portal-main,
	.wteh-content-card {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 0 12px !important;
		box-shadow: none !important;
	}

	.wteh-payroll-hero,
	.wteh-content-card {
		break-inside: avoid;
	}
}


/* 1.19.0 — editable/recalculable payroll workspace */
.wteh-payroll-edit-section{display:flex;flex-direction:column;gap:4px;margin:14px 0 10px;padding:11px 13px;border:1px solid var(--wteh-border,#e7ebf1);border-radius:12px;background:var(--wteh-surface-2,#f8fafc)}
.wteh-payroll-edit-section strong{font-size:12px}.wteh-payroll-edit-section small{font-size:9.5px;line-height:1.7;color:var(--wteh-text-3,#667085)}
.wteh-payroll-maintenance{display:grid;gap:9px}.wteh-payroll-maintenance form{margin:0}.wteh-payroll-maintenance .wteh-card-heading{margin-bottom:2px}
.wteh-button-danger{background:#fff1f2!important;border:1px solid #fecdd3!important;color:#be123c!important}.wteh-button-danger:hover{background:#ffe4e6!important;border-color:#fda4af!important;color:#9f1239!important}
html.wteh-theme-dark .wteh-payroll-edit-section{background:#111d2e;border-color:#27364d}html.wteh-theme-dark .wteh-button-danger{background:rgba(190,18,60,.14)!important;border-color:rgba(251,113,133,.28)!important;color:#fda4af!important}
@media(max-width:680px){.wteh-payroll-maintenance{gap:8px}.wteh-payroll-edit-form .wteh-grid-2{grid-template-columns:1fr}}

/* Employee Hub -> Accounting bridge */
.wteh-accounting-inline-form{display:inline-flex;margin:0;vertical-align:middle}
.wteh-accounting-inline-form .wteh-button{margin:0}
.wteh-payroll-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.wteh-accounting-compact{font-size:11px;padding:7px 9px;white-space:nowrap}
.wteh-accounting-sync-card{margin-bottom:18px;border-inline-start:4px solid var(--wteh-accent,#6d5dfc)}
.wteh-page-title-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:680px){.wteh-page-title-actions,.wteh-payroll-row-actions{align-items:stretch;flex-direction:column;width:100%}.wteh-accounting-inline-form,.wteh-accounting-inline-form .wteh-button{width:100%}}
@media print{.wteh-accounting-inline-form,.wteh-accounting-sync-card{display:none!important}}
