/* base */
:root {
	--color-page: #f5f7fa;
	--color-surface: #ffffff;
	--color-surface-muted: #eef4f7;
	--color-border: #d7e0e7;
	--color-border-strong: #b6c7d2;
	--color-text: #17212b;
	--color-muted: #627282;
	--color-brand: #003457;
	--color-brand-strong: #014256;
	--color-accent: #2f7fa8;
	--color-accent-dark: #1c6388;
	--color-danger: #c93c20;
	--color-success: #146c43;
	--shadow-soft: 0 12px 32px rgba(23, 33, 43, 0.08);
	--radius-sm: 4px;
	--radius-md: 8px;
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--color-page);
	margin: 0;
	padding: 0;
}

body {
	background: var(--color-page);
	color: var(--color-text);
	font-family: "Gotham SSm A", "Gotham SSm B", "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
	min-height: 100vh;
	padding: 0;
}

img {
	display: inline-block;
	max-width: 100%;
}

a {
	color: var(--color-accent-dark);
	font-weight: 600;
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--color-brand);
	text-decoration: underline;
}

h1,
h2,
h3,
h4 {
	color: var(--color-text);
	line-height: 1.2;
	margin: 0 0 var(--space-4);
}

h1 {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: 0;
}

h4 {
	color: var(--color-brand);
	font-size: 1.05rem;
	font-weight: 700;
	margin-top: var(--space-5);
}

p {
	margin: 0 0 var(--space-4);
}

.app-shell,
.inner {
	box-sizing: border-box;
	clear: both;
	margin: 0 auto;
	max-width: 1180px;
	padding: 0 var(--space-5);
	width: 100%;
}

.inner:after {
	clear: both;
	content: "";
	display: table;
}

.unit {
	box-sizing: border-box;
	width: 100%;
}

.row {
	margin-bottom: var(--space-5);
}

@media screen and (min-width: 48em) {
	.size1of2-wide {
		float: left;
		width: 50%;
	}
}

/* app shell */
.app-header {
	background: var(--color-surface);
	border-top: 4px solid var(--color-accent);
	box-shadow: 0 1px 0 rgba(23, 33, 43, 0.08);
	position: sticky;
	top: 0;
	z-index: 20;
}

.app-header__inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	justify-content: space-between;
	min-height: 78px;
	padding-bottom: var(--space-3);
	padding-top: var(--space-3);
}

.site-logo a {
	align-items: center;
	display: inline-flex;
}

.site-logo img {
	display: block;
	max-width: 260px;
	width: 100%;
}

.utility-nav {
	align-items: center;
	display: flex;
}

.utility-nav .hlist {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hlist > li {
	display: inline-flex;
	margin: 0;
}

.utility-nav a {
	border-radius: 999px;
	color: var(--color-muted);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.7rem 0.9rem;
	text-decoration: none;
	transition: background-color 140ms ease, color 140ms ease;
}

.utility-nav a:hover,
.utility-nav a:focus {
	background: var(--color-surface-muted);
	color: var(--color-brand);
	text-decoration: none;
}

.app-main {
	min-height: calc(100vh - 155px);
	padding: var(--space-6) 0;
}

.app-content {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-soft);
	padding-bottom: var(--space-6);
	padding-top: var(--space-6);
}

.app-footer {
	background: var(--color-brand);
	color: #ffffff;
	padding: var(--space-4) 0;
}

.app-footer p {
	margin: 0;
}

@media screen and (max-width: 47.9375em) {
	.app-header {
		position: static;
	}

	.app-header__inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.utility-nav,
	.utility-nav .hlist {
		justify-content: flex-start;
		width: 100%;
	}

	.utility-nav a {
		background: var(--color-surface-muted);
	}

	.app-main {
		padding: var(--space-4) 0;
	}

	.app-content {
		border-left: 0;
		border-radius: 0;
		border-right: 0;
	}
}

/* loader */
.loading-mask {
	align-items: center;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(2px);
	bottom: 0;
	color: var(--color-accent-dark);
	display: none;
	justify-content: center;
	left: 0;
	position: absolute;
	right: 0;
	text-rendering: auto;
	top: 0;
	z-index: 99;
}

.is-loading .loading-mask {
	display: flex;
}

.js-loading-mask {
	position: relative;
}

/* typography */
small,
.body-small,
.body-small p {
	font-family: Arial, sans-serif;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
}

.text-center {
	text-align: center;
}

.text-center .button:last-of-type {
	margin-right: 0;
}

.text-center .button:last-of-type:first-of-type {
	margin-right: auto;
}

.element-invisible,
.ui-helper-hidden-accessible {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
}

.display-block {
	display: block;
}

/* buttons */
.button,
input[type="submit"].button,
a.button {
	align-items: center;
	background: var(--color-accent);
	border: 1px solid var(--color-accent);
	border-radius: var(--radius-sm);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 700;
	gap: var(--space-2);
	justify-content: center;
	line-height: 1.2;
	margin: 0 var(--space-2) var(--space-2) 0;
	min-height: 40px;
	padding: 0.65rem 1rem;
	text-decoration: none;
	transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
	white-space: nowrap;
}

.button:hover,
.button:focus,
input[type="submit"].button:hover,
input[type="submit"].button:focus,
a.button:hover,
a.button:focus {
	background: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	box-shadow: 0 0 0 3px rgba(47, 127, 168, 0.16);
	color: #ffffff;
	text-decoration: none;
}

.button.warning {
	background: var(--color-danger);
	border-color: var(--color-danger);
	color: #ffffff;
}

.has-icon svg {
	width: 1.25rem;
}

button.has-icon {
	align-items: center;
	background: transparent;
	border: none;
	color: var(--color-accent-dark);
	display: inline-flex;
	justify-content: center;
	padding: 0.5em 0.75em !important;
}

button.has-icon:hover,
button.has-icon:focus {
	color: var(--color-brand);
}

/* content */
.content {
	margin-left: auto;
	margin-right: auto;
	max-width: 900px;
}

/* forms */
.box {
	background: var(--color-surface-muted);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-5);
}

.box label {
	color: var(--color-brand);
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	margin-bottom: var(--space-1);
}

.box input,
.box textarea,
.box select,
.box .select2-container {
	margin-bottom: var(--space-4);
	max-width: 100%;
	width: 100%;
}

.form-field {
	align-items: center;
	display: flex;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.form-field > label {
	flex: 0 0 160px;
	margin-bottom: 0;
	text-align: left;
}

.form-field > input,
.form-field > select,
.form-field > p,
.form-field > .select2-container {
	flex: 1;
	margin-bottom: 0;
}

.member-detail-content {
	max-width: none;
}

.member-detail-form {
	width: 100%;
}

.member-detail-form .inner {
	display: grid;
	gap: 0 var(--space-5);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	max-width: none;
	padding: 0;
}

.member-detail-form .inner:after {
	display: none;
}

.member-detail-form .unit {
	float: none;
	width: auto;
}

.member-detail-form .form-field {
	display: grid;
	gap: var(--space-3);
	grid-template-columns: 170px minmax(0, 1fr);
}

.member-detail-form .form-field > label {
	align-self: center;
	flex: none;
	min-width: 0;
}

.member-detail-form .form-field > input,
.member-detail-form .form-field > select,
.member-detail-form .form-field > p,
.member-detail-form .form-field > .select2-container {
	min-width: 0;
	width: 100%;
}

.member-detail-form .form-field--readonly > p {
	margin: 0;
}

.member-detail-actions {
	align-items: center;
	display: flex;
	gap: var(--space-4);
	justify-content: space-between;
	margin-top: var(--space-4);
}

.site-form-content {
	max-width: none;
}

.site-members-content {
	max-width: none;
}

.site-form {
	width: 100%;
}

.site-form .form-field {
	display: grid;
	gap: var(--space-3);
	grid-template-columns: 190px minmax(0, 1fr);
}

.site-form .form-field > label {
	align-self: center;
	flex: none;
	min-width: 0;
}

.site-form .form-field > input,
.site-form .form-field > select {
	min-width: 0;
	width: 100%;
}

.site-form-actions {
	align-items: center;
	display: flex;
	gap: var(--space-4);
	justify-content: flex-end;
	margin-top: var(--space-4);
}

@media screen and (max-width: 60em) {
	.member-detail-form .inner {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 42em) {
	.member-detail-form .form-field {
		gap: var(--space-1);
		grid-template-columns: 1fr;
	}

	.member-detail-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.site-form .form-field {
		gap: var(--space-1);
		grid-template-columns: 1fr;
	}

	.site-form-actions {
		align-items: stretch;
		flex-direction: column;
	}
}

fieldset {
	border: 0;
	padding: 0;
}

fieldset .inner {
	margin: 0 -20px;
}

fieldset label span {
	display: block;
}

fieldset input,
fieldset select,
.select2-container,
fieldset button[type="submit"] {
	display: block;
	font-size: 1rem;
	margin: 0.25rem auto 0;
}

fieldset input[type="submit"],
fieldset button[type="submit"] {
	margin-bottom: 0.5rem;
	margin-top: 1rem;
	max-width: 300px;
}

textarea,
input[type=text],
input[type=tel],
input[type=email],
input[type=password],
input[type=date],
select,
.select2-container {
	background: #ffffff;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-size: 1rem;
	line-height: 1.4;
	min-height: 42px;
	padding: 0.55rem 0.7rem;
	width: 100%;
}

textarea:focus,
input[type=text]:focus,
input[type=tel]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=date]:focus,
select:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(47, 127, 168, 0.16);
	outline: none;
}

.select2-container--default .select2-search--inline .select2-search__field {
	height: auto;
	line-height: 1;
	margin: 0;
	padding: 6px 0 0 3px;
}

.select2-search__field::placeholder {
	color: var(--color-muted);
}

.select2-container {
	height: auto !important;
	padding: 0;
}

.select2-container--default .select2-selection--multiple {
	border-color: var(--color-border-strong);
	border-radius: var(--radius-sm);
	min-height: 42px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
	border: 1px solid var(--color-accent);
}

.select2-selection__clear {
	display: none;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	-webkit-appearance: button;
	cursor: pointer;
	font-family: inherit;
}

.checkbox-row label,
.checkbox-row input {
	display: inline-block;
	height: auto;
	padding: 0.5rem;
	width: auto;
}

/* search */
.searchbox {
	display: block;
	margin: 0 auto var(--space-6);
	max-width: 520px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.searchbox input[type=text] {
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(23, 33, 43, 0.08);
	padding: 0.8rem 3rem 0.8rem 1rem;
}

.searchbox button {
	bottom: 0;
	font-size: 1rem;
	margin: 0;
	padding: 0.875rem 1rem !important;
	position: absolute;
	right: 0.1rem;
	top: 0;
}

.table-legend {
	color: var(--color-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9rem;
	gap: var(--space-2) var(--space-4);
	justify-content: flex-end;
	margin: 0 0 var(--space-2);
	text-align: right;
}

/* tables */
table,
.inline-labels {
	border-collapse: separate;
	border-spacing: 0;
	margin-bottom: var(--space-5);
	width: 100%;
}

th,
td {
	text-align: left;
	vertical-align: middle;
}

.responsive-table,
table.non-responsive {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-collapse: collapse;
	border-radius: var(--radius-md);
	box-shadow: 0 8px 24px rgba(23, 33, 43, 0.05);
	overflow: hidden;
	padding: 0;
}

table.non-responsive thead,
table.non-responsive th {
	display: none;
}

table tr {
	background-color: transparent;
}

.responsive-table tr,
table.non-responsive tr {
	padding: 1rem 0;
}

table.non-responsive tbody,
table.non-responsive tr,
table.non-responsive td {
	display: block;
}

table.non-responsive tr {
	border-bottom: 1px solid var(--color-border);
}

table.non-responsive tr:last-child {
	border-bottom: none;
}

th:first-child,
td:first-child {
	padding-left: 1rem;
}

tr:nth-child(even) {
	background-color: rgba(238, 244, 247, 0.65);
}

.responsive-table tr:nth-child(even),
table.non-responsive tr:nth-child(even) {
	background-color: #ffffff;
}

table.non-responsive thead tr {
	background: var(--color-brand);
	color: #ffffff;
}

table.non-responsive td {
	margin-bottom: 1rem;
	overflow: hidden;
	padding: 1rem;
	text-overflow: ellipsis;
	white-space: normal;
}

table.non-responsive td:last-child:not(:first-child) {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 1rem;
}

table.non-responsive td:before {
	color: var(--color-muted);
	content: " " attr(data-label) "";
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.27;
	padding-bottom: 0.35rem;
	text-transform: uppercase;
}

td.actions,
th.actions {
	text-align: right;
	white-space: nowrap;
}

td.actions a {
	align-items: center;
	background: var(--color-surface-muted);
	border-radius: 999px;
	color: var(--color-accent-dark);
	display: inline-flex;
	height: 36px;
	justify-content: center;
	width: 36px;
}

td.actions a:hover,
td.actions a:focus {
	background: var(--color-accent);
	color: #ffffff;
	text-decoration: none;
}

td.logo img {
	max-height: 61px;
	object-fit: contain;
}

@media screen and (min-width: 48em) {
	table.non-responsive {
		display: table;
	}

	table.non-responsive thead {
		display: table-header-group;
	}

	table.non-responsive tr {
		border-bottom: 1px solid var(--color-border);
		display: table-row;
	}

	table.non-responsive thead tr {
		border-bottom: 0;
	}

	table.non-responsive tbody {
		display: table-row-group;
	}

	table.non-responsive td,
	table.non-responsive th {
		border-bottom: 0;
		display: table-cell;
		padding: 0.85rem 1rem;
	}

	table.non-responsive th {
		background: var(--color-brand);
		color: #ffffff;
		font-size: 0.78rem;
		font-weight: 800;
		letter-spacing: 0;
		text-transform: uppercase;
	}

	table.non-responsive tbody tr:hover {
		background: rgba(47, 127, 168, 0.08);
	}

	table.non-responsive tbody tr:last-child {
		border-bottom: 0;
	}

	table.non-responsive td:before {
		content: "";
		display: none;
	}

	td.logo {
		width: 25%;
	}
}

/* profile */
.profile .profile-image {
	float: left;
	margin-right: 1rem;
}

.profile .profile-image.is-editing {
	width: 100%;
}

.profile .profile-image .profile-image--wrapper {
	position: relative;
}

.profile .profile-image img {
	float: left;
	margin-bottom: 0;
	max-width: 173px;
	width: 100%;
}

.profile .profile-image a {
	background: rgba(255, 255, 255, 0.8);
	left: 0;
	padding: 7px 5px 7px 10px;
	position: absolute;
	top: 0;
}

.js .profile .profile-image .profile-image--editing,
.js .cv-profile .profile-image [type=submit] {
	display: none;
}

.js .profile .profile-image.is-editing .profile-image--editing {
	display: inline-block;
}

.profile .profile-image label {
	margin: 0;
}

.profile fieldset input,
.profile textarea {
	display: block;
	max-width: 100%;
	padding: 1rem 0.5rem;
	width: 100%;
}

.profile .profile-image input {
	padding-left: 0;
}

.profile .profile-image input[type=file] {
	margin-top: 0;
}

.left-right-header {
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--space-4);
	padding: var(--space-5) 0 var(--space-2);
}

.left-right-header h4 {
	margin: 0;
}

.site-members-summary {
	align-items: center;
	display: flex;
	gap: var(--space-4);
	justify-content: space-between;
}

.site-members-summary a {
	margin-left: auto;
	text-align: right;
}

@media screen and (min-width: 48em) {
	.profile fieldset {
		margin: 0 0 1rem;
		max-width: 720px;
	}

	.js .profile .profile-image.is-editing .profile-image--editing {
		margin-left: 1em;
	}

	.left-right-header {
		display: table;
		vertical-align: middle;
		width: 100%;
	}

	.site-members-summary {
		display: flex;
	}
}

.pagination ul {
	align-items: center;
	display: flex;
	gap: var(--space-2);
	justify-content: center;
	list-style: none;
	margin: var(--space-4) 0;
	padding: 0;
}

.pagination a {
	align-items: center;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-muted);
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	min-height: 38px;
	min-width: 38px;
	padding: 0.45rem 0.7rem;
	text-decoration: none;
}

.pagination a:hover,
.pagination a:focus {
	background: var(--color-surface-muted);
	color: var(--color-brand);
	text-decoration: none;
}

.pagination .active a {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: #ffffff;
}

#error,
#success {
	border-radius: var(--radius-md);
	list-style-position: inside;
	margin-left: 0;
	padding: var(--space-4);
}

#error {
	background: #fff2ee;
	border: 1px solid #f0b8a8;
	color: #8f2c19;
}

#error li.error,
#success li.success {
	margin-left: 18px;
	text-indent: -18px;
}

#success {
	background: #e8f7ef;
	border: 1px solid #a9dfbf;
	color: var(--color-success);
}

.page-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: var(--space-3);
}

.page-header h1 {
	margin-bottom: 0;
}

.page-header__site-name {
	color: var(--color-muted);
	font-size: 0.95rem;
	margin: var(--space-1) 0 0;
}

.page-header__logo {
	max-height: 64px;
	max-width: 200px;
	object-fit: contain;
}

.detail-logo {
	background: var(--color-surface-muted);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	margin-bottom: var(--space-5);
	padding: var(--space-5);
	text-align: center;
}

.detail-logo img {
	max-height: 160px;
	object-fit: contain;
}

.js .accordion .more {
	display: none;
}

.accordion {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.accordion .item {
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}

.accordion .item:last-child {
	border-bottom: 0;
}

.accordion .header {
	background: var(--color-brand);
	color: #ffffff;
	cursor: pointer;
	font-weight: 700;
	margin: 0;
	padding: 1rem;
}

.accordion .sprite {
	float: left;
	font-size: 1.5rem;
	line-height: 2rem;
	position: relative;
	text-align: center;
	top: -0.5rem;
	width: 2rem;
}

.accordion .more {
	background: var(--color-surface-muted);
	padding: var(--space-4);
}
