/* phpStudio.net — functional foundation */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f5f7fa;
	color: #1b2938;
	font: 16px/1.6 system-ui, sans-serif;
}

main {
	width: calc(100% - 32px);
	max-width: 1100px;
	margin: 32px auto;
	padding: 32px;
	background: #fff;
	border: 1px solid #dce3eb;
	border-radius: 8px;
	overflow-wrap: anywhere;
}

.brand {
	color: #2258a5;
	font-weight: 700;
	text-decoration: none;
}

h1,
h2,
h3 {
	line-height: 1.25;
}

h1 {
	margin: 24px 0 16px;
	font-size: 2rem;
}

h2 {
	margin: 24px 0 12px;
	font-size: 1.4rem;
}

a {
	color: #2258a5;
}

img {
	max-width: 100%;
	height: auto;
}

[hidden] {
	display: none !important;
}

:focus-visible {
	outline: 3px solid #b36b00;
	outline-offset: 3px;
}

/* Forms */

form {
	max-width: 560px;
	margin: 20px 0;
}

label {
	display: block;
	margin: 16px 0 6px;
	font-weight: 600;
}

input,
select,
textarea {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #718096;
	border-radius: 5px;
	background: #fff;
	color: inherit;
	font: inherit;
}

textarea {
	min-height: 120px;
	resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
	margin-right: 8px;
	accent-color: #2258a5;
}

input[readonly],
textarea[readonly] {
	background: #f1f4f8;
}

input:disabled,
select:disabled,
textarea:disabled {
	background: #edf0f4;
	color: #586675;
	cursor: not-allowed;
}

fieldset {
	min-width: 0;
	margin: 20px 0;
	padding: 16px;
	border: 1px solid #dce3eb;
}

legend {
	padding: 0 6px;
	font-weight: 600;
}

.help-text {
	display: block;
	margin-top: 6px;
	color: #586675;
	font-size: 0.875rem;
}

.field-error {
	margin: 6px 0;
	color: #912c23;
	font-size: 0.875rem;
}

[aria-invalid="true"] {
	border-color: #912c23;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

/* Buttons and actions */

button,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin-top: 12px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: #2258a5;
	color: #fff;
	font: inherit;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

button:hover,
.button:hover {
	background: #194681;
}

button.secondary,
.button.secondary {
	border-color: #ccd5e0;
	background: #e7edf5;
	color: #1b2938;
}

button.secondary:hover,
.button.secondary:hover {
	background: #d8e2ee;
}

button.danger,
.button.danger {
	background: #a52b24;
	color: #fff;
}

button.danger:hover,
.button.danger:hover {
	background: #85221c;
}

button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}

.actions > form {
	margin: 0;
}

.actions button,
.actions .button {
	margin-top: 0;
}

/* Navigation */

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 20px 0;
	padding: 12px 0;
	border-top: 1px solid #dce3eb;
	border-bottom: 1px solid #dce3eb;
}

.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 5px;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	background: #e7edf5;
}

.site-nav a[aria-current="page"] {
	font-weight: 700;
}

/* Tables */

.table-wrap {
	max-width: 100%;
	overflow-x: auto;
	margin: 20px 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

caption {
	padding: 0 0 12px;
	font-weight: 600;
	text-align: left;
}

th,
td {
	padding: 12px;
	border-bottom: 1px solid #dce3eb;
	vertical-align: top;
}

th {
	background: #edf2f7;
	font-weight: 600;
}

tbody tr:hover {
	background: #f8fafc;
}

.numeric {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.nowrap {
	white-space: nowrap;
}

/* Messages and basic content blocks */

.alert,
[role="alert"] {
	margin: 16px 0;
	padding: 12px 16px;
	border: 1px solid #e7bcb6;
	border-radius: 5px;
	background: #fff0ee;
	color: #81281d;
}

.alert-success {
	border-color: #b7d8c2;
	background: #edf8f0;
	color: #215c35;
}

.alert-info {
	border-color: #bbcee7;
	background: #eef5ff;
	color: #234f83;
}

.empty-state {
	margin: 20px 0;
	padding: 24px;
	border: 1px dashed #b9c5d3;
	border-radius: 5px;
	color: #586675;
	text-align: center;
}

.muted {
	color: #586675;
}

.panel {
	margin: 20px 0;
	padding: 20px;
	border: 1px solid #dce3eb;
	border-radius: 5px;
}

.summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.summary-grid .panel {
	margin: 0;
}

footer {
	margin-top: 40px;
	padding-top: 16px;
	border-top: 1px solid #dce3eb;
	color: #586675;
	font-size: 0.8125rem;
}

/* Basic mobile support */

@media (max-width: 640px) {
	main {
		width: calc(100% - 24px);
		margin: 12px auto;
		padding: 20px;
	}

	h1 {
		font-size: 1.65rem;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.summary-grid {
		grid-template-columns: 1fr;
	}

	th,
	td {
		padding: 10px;
	}
}
.site-nav .message-link {
	margin-left: auto;
	background: #b42318;
	border-color: #b42318;
	color: #fff;
}

.site-nav .message-link:hover,
.site-nav .message-link:focus {
	background: #8f1c13;
	border-color: #8f1c13;
	color: #fff;
}

.message-count {
	display: inline-block;
	min-width: 1.5em;
	margin-left: 0.35rem;
	padding: 0.05rem 0.35rem;
	border-radius: 999px;
	background: #fff;
	color: #b42318;
	font-weight: 700;
	text-align: center;
}
.unread-message-row {
	background: #fff3f2;
}

.unread-message-row td:first-child,
.unread-message-row td:nth-child(2) a {
	color: #b42318;
	font-weight: 700;
}
.site-nav .portal-language-switcher {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #94a3b8;
	font-size: 0.82rem;
	font-weight: 700;
}

.site-nav .portal-language-switcher a {
	color: #94a3b8;
	text-decoration: none;
}

.site-nav .portal-language-switcher a.active {
	color: #1674c9;
}
.site-nav .portal-language-switcher {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #94a3b8;
	font-size: 0.82rem;
	font-weight: 700;
}

.site-nav .portal-language-switcher a {
	color: #94a3b8;
	text-decoration: none;
}

.site-nav .portal-language-switcher a.active {
	color: #1674c9;
}