:root {
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
	--color-text: #1a1d21;
	--color-text-muted: #5b6470;
	--color-surface: #ffffff;
	--color-background: #f4f5f7;
	--color-border: #e3e6ea;
	--primary-color: #0b3d91;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
	font-family: var(--font-sans);
	color: var(--color-text);
	line-height: 1.25;
	margin: 0 0 0.75rem;
}

h1 {
	font-size: 1.85rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

h2 {
	font-size: 1.15rem;
	font-weight: 600;
}

p {
	margin: 0 0 1rem;
	color: var(--color-text-muted);
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--primary-color);
}

button[type="submit"] {
	background-color: var(--primary-color);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 0.7rem 1.4rem;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease;
}

button[type="submit"]:hover {
	filter: brightness(0.92);
}

#portal-session-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(26, 29, 33, 0.5);
	z-index: 1000;
}

#portal-session-modal[hidden] {
	display: none;
}

.portal-session-modal-content {
	background-color: var(--color-surface);
	border-radius: 8px;
	padding: 1.75rem;
	max-width: 22rem;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.portal-session-modal-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.portal-session-modal-actions button {
	flex: 1;
	border-radius: 6px;
	padding: 0.6rem 1rem;
	font-family: var(--font-sans);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--color-border);
}

#portal-session-extend {
	background-color: var(--primary-color);
	color: #ffffff;
	border-color: transparent;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 1rem;
}

.form-field input,
.form-field select {
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	font-family: var(--font-sans);
	font-size: 1rem;
}

.form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.5rem;
}

.form-errors {
	color: #9b1c1c;
	margin-bottom: 1rem;
}

.data-group,
.document-slot,
.review-entity {
	border-top: 1px solid var(--color-border);
	padding-top: 1rem;
	margin-top: 1rem;
}

.requirement-counts {
	margin-bottom: 1.5rem;
}

.entity-list {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
	font-weight: 600;
}

button[name="action"] {
	background-color: var(--color-surface);
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 0.45rem 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.button-secondary {
	display: inline-block;
	background-color: var(--color-surface);
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 0.45rem 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.data-group-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.85rem;
}

.data-group-table th,
.data-group-table td {
	text-align: left;
	padding: 0.65rem 0.75rem;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.95rem;
}

.data-group-table th {
	color: var(--color-text-muted);
	font-weight: 600;
}

.data-group-row-actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	white-space: nowrap;
}

.empty-group {
	margin-bottom: 0.85rem;
}

.side-panel-backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(26, 29, 33, 0.45);
	z-index: 900;
}

.side-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: min(28rem, 100%);
	background-color: var(--color-surface);
	z-index: 901;
	padding: 1.5rem;
	overflow-y: auto;
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
}

.side-panel-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.side-panel-actions button[type="submit"] {
	background-color: var(--primary-color);
	color: #ffffff;
	border-color: transparent;
}
