.kpt-portal {
	--kpt-blue: #163c5b;
	--kpt-green: #168765;
	--kpt-pale: #f2f6f8;
	--kpt-line: #dce5eb;
	--kpt-text: #1b3348;
	max-width: 980px;
	margin: 30px auto;
	color: var(--kpt-text);
	font-family: Tahoma, Arial, sans-serif;
	line-height: 1.8;
}

.kpt-portal * {
	box-sizing: border-box;
}

.kpt-portal-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 22px;
}

.kpt-logo-mark {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 15px;
	background: linear-gradient(145deg, var(--kpt-green), #24ad81);
	color: #fff;
	font-size: 25px;
	font-weight: 800;
	box-shadow: 0 8px 20px rgba(22, 135, 101, .2);
}

.kpt-portal-header h2 {
	font-size: 23px;
	margin: 0;
	color: var(--kpt-blue);
}

.kpt-portal-header p {
	margin: 0;
	color: #708293;
	font-size: 13px;
}

.kpt-login {
	max-width: 520px;
	padding: 30px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--kpt-line);
	border-radius: 18px;
	box-shadow: 0 12px 36px rgba(22, 60, 91, .08);
}

.kpt-login-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	align-items: start;
}

.kpt-login-grid .kpt-login {
	max-width: none;
	width: 100%;
	margin: 0;
}

.kpt-login h3 {
	margin: 0;
	color: var(--kpt-blue);
	font-size: 20px;
}

.kpt-login-lead {
	margin: 2px 0 18px;
	color: #6c8192;
	font-size: 12px;
}

.kpt-accounting-login {
	border-top: 4px solid var(--kpt-blue);
}

.kpt-staff-entry {
	margin: 19px -30px -30px;
	padding: 13px;
	border-top: 1px solid var(--kpt-line);
	text-align: center;
	background: #f8fafb;
}

.kpt-staff-entry a,
.kpt-login-back {
	color: #6e8191 !important;
	font-size: 11px;
	text-decoration: none !important;
}

.kpt-staff-entry a:hover,
.kpt-login-back:hover {
	color: var(--kpt-green) !important;
}

.kpt-login-back {
	display: inline-block;
	margin-bottom: 13px;
}

.kpt-change-password {
	border-top: 4px solid #d49a28;
}

.kpt-login label {
	display: block;
	font-weight: 700;
	margin-bottom: 7px;
}

.kpt-login input {
	width: 100%;
	height: 48px;
	padding: 8px 12px;
	margin-bottom: 18px;
	border: 1px solid #b9c8d3;
	border-radius: 9px;
	background: #fff;
	font: inherit;
}

.kpt-login input:focus {
	outline: 3px solid rgba(22, 135, 101, .14);
	border-color: var(--kpt-green);
}

.kpt-login button,
.kpt-logout {
	border: 0;
	border-radius: 9px;
	padding: 11px 20px;
	background: var(--kpt-green);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.kpt-login button {
	width: 100%;
	min-height: 48px;
}

.kpt-security-note {
	padding: 13px 15px;
	margin: 18px 0 0;
	border-radius: 9px;
	background: #fff8e5;
	color: #745513;
	font-size: 12px;
}

.kpt-login-help {
	margin: 10px 0 0;
	text-align: center;
	font-size: 11px;
}

.kpt-login-help a {
	color: var(--kpt-green) !important;
}

.kpt-alert {
	max-width: 720px;
	padding: 12px 16px;
	margin: 0 auto 18px;
	border-radius: 9px;
}

.kpt-alert.error {
	background: #fdeaea;
	color: #922f2f;
	border: 1px solid #f4cccc;
}

.kpt-alert.success {
	background: #e4f5ee;
	color: #156a50;
	border: 1px solid #c8e9dc;
}

.kpt-alert.warning {
	background: #fff8e8;
	color: #7b5713;
	border: 1px solid #e7c77f;
}

.kpt-userbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	margin-bottom: 18px;
	background: var(--kpt-blue);
	color: #fff;
	border-radius: 14px;
}

.kpt-userbar span,
.kpt-userbar strong,
.kpt-userbar small {
	display: block;
}

.kpt-userbar span,
.kpt-userbar small {
	color: #c8d6e0;
	font-size: 12px;
}

.kpt-userbar strong {
	font-size: 19px;
}

.kpt-logout {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .45);
}

.kpt-latest {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 25px;
	margin-bottom: 18px;
	background: linear-gradient(125deg, #eef8f4, #fff);
	border: 1px solid #cfe9df;
	border-radius: 14px;
}

.kpt-latest span {
	color: var(--kpt-green);
	font-weight: 700;
	font-size: 13px;
}

.kpt-latest h3 {
	margin: 2px 0;
	font-size: 21px;
	color: var(--kpt-blue);
}

.kpt-latest p {
	margin: 0;
	font-size: 12px;
	color: #718393;
}

.kpt-actions,
.kpt-row-actions {
	display: flex;
	gap: 7px;
	flex-wrap: wrap;
}

/* Keep the operational buttons in accounting tables aligned and on one row. */
.kpt-front-table .kpt-row-actions {
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	min-width: 315px;
	white-space: nowrap;
}

.kpt-front-table .kpt-row-actions > .kpt-mini-button,
.kpt-front-table .kpt-row-actions > .kpt-delete-confirm,
.kpt-front-table .kpt-row-actions > .kpt-delete-confirm > summary {
	box-sizing: border-box;
	width: 150px;
	min-width: 150px;
	height: 42px;
	margin: 0;
}

.kpt-front-table .kpt-row-actions > .kpt-delete-confirm {
	flex: 0 0 150px;
}

.kpt-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	padding: 8px 13px;
	border: 1px solid var(--kpt-green);
	border-radius: 8px;
	color: var(--kpt-green) !important;
	text-decoration: none !important;
	font-size: 12px;
	font-weight: 700;
	background: #fff;
}

.kpt-action.download {
	background: var(--kpt-green);
	color: #fff !important;
}

.kpt-archive {
	background: #fff;
	border: 1px solid var(--kpt-line);
	border-radius: 14px;
	overflow: hidden;
}

.kpt-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid var(--kpt-line);
}

.kpt-section-title h3 {
	margin: 0;
	font-size: 18px;
	color: var(--kpt-blue);
}

.kpt-section-title span {
	padding: 3px 10px;
	background: var(--kpt-pale);
	border-radius: 99px;
	font-size: 11px;
}

.kpt-archive-table {
	overflow-x: auto;
}

.kpt-archive table {
	width: 100%;
	border-collapse: collapse;
}

.kpt-archive th,
.kpt-archive td {
	padding: 14px 18px;
	text-align: right;
	border-bottom: 1px solid #edf1f4;
}

.kpt-archive th {
	color: #627789;
	background: #fbfcfd;
	font-size: 12px;
}

.kpt-empty {
	padding: 35px;
	text-align: center;
	background: var(--kpt-pale);
	border: 1px dashed #b9c8d3;
	border-radius: 14px;
}

.kpt-empty p {
	margin: 5px 0 0;
	color: #66798a;
}

.kpt-accounting-nav {
	position: sticky;
	top: 12px;
	z-index: 5;
	display: flex;
	gap: 7px;
	overflow-x: auto;
	padding: 9px;
	margin: 0 0 18px;
	border: 1px solid var(--kpt-line);
	border-radius: 12px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 7px 20px rgba(22, 60, 91, .07);
}

.kpt-accounting-nav a {
	flex: 1 0 auto;
	padding: 8px 13px;
	border-radius: 8px;
	color: var(--kpt-blue) !important;
	text-align: center;
	text-decoration: none !important;
	font-size: 12px;
	font-weight: 700;
}

.kpt-accounting-nav a:hover {
	background: var(--kpt-pale);
}

.kpt-accounting-nav a.is-active {
	background: var(--kpt-blue);
	color: #fff !important;
}

.kpt-accounting-section {
	padding: 0;
	margin: 0 0 20px;
	scroll-margin-top: 90px;
	border: 1px solid var(--kpt-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
}

.kpt-accounting-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 20px;
}

.kpt-accounting-stats > div {
	padding: 17px;
	border-radius: 11px;
	background: linear-gradient(145deg, #f0f7f5, #f7fafb);
	border-right: 4px solid var(--kpt-green);
}

.kpt-accounting-stats strong,
.kpt-accounting-stats span {
	display: block;
}

.kpt-accounting-stats strong {
	color: var(--kpt-blue);
	font-size: 25px;
}

.kpt-accounting-stats span {
	color: #667b8c;
	font-size: 12px;
}

.kpt-accounting-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding: 20px;
}

.kpt-front-form {
	padding: 18px;
	border: 1px solid var(--kpt-line);
	border-radius: 11px;
	background: #fbfcfd;
}

.kpt-front-form h4 {
	margin: 0 0 14px;
	color: var(--kpt-blue);
	font-size: 15px;
}

.kpt-front-form label {
	display: block;
	margin-bottom: 12px;
	color: var(--kpt-text);
	font-size: 12px;
	font-weight: 700;
}

.kpt-front-form input,
.kpt-front-form select {
	display: block;
	width: 100%;
	min-height: 42px;
	padding: 7px 10px;
	margin-top: 5px;
	border: 1px solid #bccbd5;
	border-radius: 8px;
	background: #fff;
	font: inherit;
}

.kpt-front-form input[type="file"] {
	padding: 7px;
}

.kpt-front-form button,
.kpt-mini-button,
.kpt-password-reset button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	padding: 9px 15px;
	background: var(--kpt-green);
	color: #fff !important;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
}

.kpt-mini-button.kpt-delete-button {
	background: #b83232;
}

.kpt-delete-confirm {
	display: inline-block;
	min-width: 70px;
}

.kpt-delete-confirm > summary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 15px;
	border-radius: 8px;
	background: #b83232;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.kpt-delete-confirm > summary::-webkit-details-marker {
	display: none;
}

.kpt-delete-confirm form {
	display: grid;
	gap: 7px;
	min-width: 245px;
	padding: 10px;
	margin-top: 7px;
	border: 1px solid #efc1c1;
	border-radius: 9px;
	background: #fff7f7;
}

.kpt-delete-confirm small {
	color: #8f2424;
	line-height: 1.7;
}

.kpt-delete-confirm input[type="password"] {
	min-width: 190px;
	padding: 8px;
	border: 1px solid #d5aaaa;
	border-radius: 7px;
}

.kpt-delete-confirm button.kpt-delete-button {
	background: #b83232;
}

.kpt-form-note {
	margin: 10px 0 0;
	color: #6b7e8e;
	font-size: 11px;
}

.kpt-front-form-inline {
	margin: 20px;
}

.kpt-upload-followup {
	padding: 0 20px 20px;
	text-align: left;
}

.kpt-front-form-inline form {
	display: grid;
	grid-template-columns: 1fr 1fr 2fr auto;
	gap: 12px;
	align-items: end;
}

.kpt-search-form form,
.kpt-search-form {
	display: flex;
	align-items: end;
	gap: 10px;
	flex-wrap: wrap;
}

.kpt-search-form label {
	min-width: 230px;
}

.kpt-front-form-inline form label {
	margin: 0;
}

.kpt-front-table {
	overflow-x: auto;
	border-top: 1px solid var(--kpt-line);
}

.kpt-front-table table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
}

.kpt-front-table th,
.kpt-front-table td {
	padding: 11px 13px;
	border-bottom: 1px solid #edf1f4;
	text-align: right;
	font-size: 11px;
	vertical-align: middle;
}

.kpt-front-table th {
	background: #f7fafb;
	color: #5f7586;
	font-weight: 700;
}

.kpt-password-reset summary,
.kpt-front-details summary {
	color: var(--kpt-green);
	font-weight: 700;
	cursor: pointer;
}

.kpt-password-reset form {
	display: flex;
	gap: 5px;
	min-width: 250px;
	margin-top: 7px;
}

.kpt-password-reset input {
	min-width: 150px;
	padding: 7px;
	border: 1px solid #bccbd5;
	border-radius: 7px;
}

.kpt-front-report {
	display: grid;
	grid-template-columns: repeat(5, minmax(100px, 1fr));
	gap: 8px;
	margin: 0 0 12px;
}

.kpt-front-report > div {
	padding: 11px;
	border-radius: 9px;
	background: var(--kpt-pale);
}

.kpt-front-report strong,
.kpt-front-report span {
	display: block;
}

.kpt-front-report strong {
	color: var(--kpt-blue);
	font-size: 19px;
}

.kpt-front-report span {
	color: #687d8e;
	font-size: 10px;
}

.kpt-front-details {
	padding: 8px 13px;
	margin-bottom: 7px;
	border: 1px solid var(--kpt-line);
	border-radius: 8px;
	background: #fff;
}

.kpt-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	padding: 15px;
	border-top: 1px solid var(--kpt-line);
	background: #fbfcfd;
}

.kpt-pagination span {
	margin-left: 8px;
	color: #667b8c;
	font-size: 11px;
}

.kpt-pagination a {
	min-width: 34px;
	padding: 7px 10px;
	border: 1px solid var(--kpt-line);
	border-radius: 7px;
	background: #fff;
	color: var(--kpt-blue) !important;
	text-align: center;
	text-decoration: none !important;
	font-size: 11px;
	font-weight: 700;
}

.kpt-pagination a.is-current {
	border-color: var(--kpt-green);
	background: var(--kpt-green);
	color: #fff !important;
}

@media (max-width: 680px) {
	.kpt-portal {
		margin: 18px 10px;
	}
	.kpt-userbar,
	.kpt-latest {
		align-items: flex-start;
		flex-direction: column;
	}
	.kpt-login-grid,
	.kpt-accounting-grid,
	.kpt-accounting-stats,
	.kpt-front-report {
		grid-template-columns: 1fr;
	}
	.kpt-front-form-inline form {
		grid-template-columns: 1fr;
	}
	.kpt-accounting-nav {
		top: 4px;
	}
	.kpt-archive thead {
		display: none;
	}
	.kpt-archive tr,
	.kpt-archive td {
		display: block;
	}
	.kpt-archive tr {
		padding: 12px 15px;
		border-bottom: 1px solid var(--kpt-line);
	}
	.kpt-archive td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 6px 0;
		border: 0;
	}
	.kpt-archive td::before {
		content: attr(data-label);
		color: #768898;
		font-size: 12px;
	}
}
