/*
 * EPR Collective theme foundation
 *
 * Keep brand decisions in the tokens below. Prefer mapping a token to an
 * existing Frappe semantic variable over styling individual components.
 */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/inter/inter-latin-ext-400-800.woff2")
		format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/inter/inter-latin-400-800.woff2")
		format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
		U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
		U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/inter/inter-latin-ext-400-800-italic.woff2")
		format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/inter/inter-latin-400-800-italic.woff2")
		format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
		U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
		U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/montserrat/montserrat-latin-ext-400-800.woff2")
		format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/montserrat/montserrat-latin-400-800.woff2")
		format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
		U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
		U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Montserrat";
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/montserrat/montserrat-latin-ext-400-800-italic.woff2")
		format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
		U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
		U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
		U+A720-A7FF;
}

@font-face {
	font-family: "Montserrat";
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url("/assets/epr_collective/fonts/montserrat/montserrat-latin-400-800-italic.woff2")
		format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
		U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
		U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* Core palette from the provisional EPR Collective UI design system. */
	--epr-purple-950: #301652;
	--epr-purple-900: #392268;
	--epr-purple-800: #482879;
	--epr-purple-700: #5d318f;
	--epr-purple-600: #692da6;
	--epr-purple-500: #7e42ba;
	--epr-purple-400: #a178d3;
	--epr-purple-300: #c4a8e7;
	--epr-purple-200: #e4d6f5;
	--epr-purple-100: #f1eafc;
	--epr-purple-50: #f9f5ff;
	--epr-teal-900: #07546a;
	--epr-teal-700: #077e96;
	--epr-teal-600: #0a8fa8;
	--epr-teal-500: #13a9bd;
	--epr-teal-300: #95d8e3;
	--epr-teal-100: #e9f8fa;
	--epr-ink-950: #101936;
	--epr-ink-900: #182344;
	--epr-ink-700: #415174;
	--epr-ink-600: #586584;
	--epr-ink-500: #6f7895;
	--epr-surface-white: #fff;
	--epr-surface-50: #f5f9fc;
	--epr-surface-100: #edf3f8;
	--epr-surface-200: #dfe5ef;
	--epr-surface-300: #b9c4d9;
	--epr-success-700: #147a4c;
	--epr-success-100: #e4f8ed;
	--epr-info-700: #075fab;
	--epr-info-100: #e6f3ff;
	--epr-warning-700: #8b5708;
	--epr-warning-100: #fff0d7;
	--epr-danger-700: #b93145;
	--epr-danger-800: #9f293c;
	--epr-danger-100: #fde9ed;

	/* Typography, spacing and shape aliases. */
	--epr-font-body: "Inter", "Segoe UI", sans-serif;
	--epr-font-heading: "Montserrat", "Inter", "Segoe UI", sans-serif;
	--epr-space-1: 4px;
	--epr-space-2: 8px;
	--epr-space-3: 12px;
	--epr-space-4: 16px;
	--epr-space-6: 24px;
	--epr-space-8: 32px;
	--epr-space-10: 40px;
	--epr-space-12: 48px;
	--epr-radius-sm: 4px;
	--epr-radius-md: 8px;
	--epr-radius-lg: 12px;
	--epr-radius-xl: 16px;
	--epr-radius-pill: 999px;

	/* Semantic aliases are the supported interface for component styling. */
	--epr-color-primary: var(--epr-purple-600);
	--epr-color-primary-hover: var(--epr-purple-800);
	--epr-color-primary-soft: var(--epr-purple-100);
	--epr-color-secondary: var(--epr-teal-500);
	--epr-color-secondary-strong: var(--epr-teal-900);
	--epr-color-focus-ring: rgb(161 120 211 / 45%);
	--epr-color-text: var(--epr-ink-950);
	--epr-color-muted: var(--epr-ink-600);
	--epr-color-border: var(--epr-surface-300);
	--epr-color-canvas: var(--epr-surface-50);
	--epr-color-surface: var(--epr-surface-white);
	--epr-color-control: var(--epr-surface-white);
	--epr-shadow-sm: 0 2px 8px rgb(16 25 54 / 6%);
	--epr-shadow-md: 0 8px 28px rgb(16 25 54 / 10%);

	/* Frappe semantic mappings. Component structure remains upstream-owned. */
	--font-stack: var(--epr-font-body);
	--primary: var(--epr-color-primary);
	--brand-color: var(--epr-color-primary);
	--primary-color: var(--epr-color-primary);
	--btn-primary: var(--epr-color-primary);
	--border-primary: var(--epr-color-primary);
	--bg-color: var(--epr-color-canvas);
	--navbar-bg: var(--epr-color-surface);
	--card-bg: var(--epr-color-surface);
	--control-bg: var(--epr-color-control);
	--text-color: var(--epr-color-text);
	--text-muted: var(--epr-color-muted);
	--border-color: var(--epr-color-border);
	--subtle-fg: var(--epr-surface-100);
}

[data-theme="dark"] {
	/* Accessible interpretation pending an official dark-theme palette. */
	--epr-color-primary: var(--epr-purple-400);
	--epr-color-primary-hover: var(--epr-purple-300);
	--epr-color-primary-soft: var(--epr-purple-900);
	--epr-color-secondary: var(--epr-teal-300);
	--epr-color-secondary-strong: var(--epr-teal-100);
	--epr-color-focus-ring: rgb(196 168 231 / 55%);
	--epr-color-text: var(--epr-surface-100);
	--epr-color-muted: var(--epr-surface-300);
	--epr-color-border: var(--epr-ink-700);
	--epr-color-canvas: var(--epr-ink-950);
	--epr-color-surface: var(--epr-ink-900);
	--epr-color-control: #202d50;
	--epr-shadow-sm: 0 2px 8px rgb(0 0 0 / 24%);
	--epr-shadow-md: 0 8px 28px rgb(0 0 0 / 32%);
	--primary: var(--epr-color-primary);
	--brand-color: var(--epr-color-primary);
	--primary-color: var(--epr-color-primary);
	--btn-primary: var(--epr-purple-500);
	--border-primary: var(--epr-color-primary);
	--bg-color: var(--epr-color-canvas);
	--navbar-bg: var(--epr-color-surface);
	--card-bg: var(--epr-color-surface);
	--control-bg: var(--epr-color-control);
	--text-color: var(--epr-color-text);
	--text-muted: var(--epr-color-muted);
	--border-color: var(--epr-color-border);
	--subtle-fg: var(--epr-ink-700);
}

body {
	font-family: var(--epr-font-body);
	color: var(--epr-color-text);
	background: var(--epr-color-canvas);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.modal-title,
.workspace-title,
.page-card-head h4 {
	font-family: var(--epr-font-heading);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.widget-title,
.section-head,
.head-title,
.page-head .title-text,
.page-title .title-text {
	font-family: var(--epr-font-heading);
}

/* Preserve compact Frappe toolbars while meeting the guide's 44px target elsewhere. */
.btn:not(.btn-sm):not(.btn-xs) {
	min-height: 44px;
	padding-inline: var(--epr-space-4);
}

.btn {
	border-radius: var(--epr-radius-md);
	font-weight: 600;
}

.btn-primary,
.btn-primary:active,
.btn-primary:focus {
	border-color: var(--epr-purple-600);
	background: var(--epr-purple-600);
	color: var(--epr-surface-white);
}

.btn-primary:hover {
	border-color: var(--epr-color-primary-hover);
	background: var(--epr-color-primary-hover);
	color: var(--epr-surface-white);
}

.es-button.primary-action,
.es-button[data-variant="solid"]:not([data-theme="red"]) {
	min-height: 44px;
	border-color: var(--epr-purple-600);
	border-radius: var(--epr-radius-md);
	background: var(--epr-purple-600);
	color: var(--epr-surface-white);
	font-weight: 600;
}

.es-button.primary-action:hover,
.es-button.primary-action:focus-visible,
.es-button[data-variant="solid"]:not([data-theme="red"]):hover,
.es-button[data-variant="solid"]:not([data-theme="red"]):focus-visible {
	border-color: var(--epr-color-primary-hover);
	background: var(--epr-color-primary-hover);
	color: var(--epr-surface-white);
}

.btn-default,
.btn.btn-default,
.btn-secondary,
.btn.btn-secondary {
	border-color: var(--epr-surface-200);
	background: var(--epr-color-surface);
	color: var(--epr-purple-700);
}

.btn-default:hover,
.btn.btn-default:hover,
.btn-secondary:hover,
.btn.btn-secondary:hover {
	border-color: var(--epr-purple-200);
	background: var(--epr-color-primary-soft);
	color: var(--epr-purple-800);
}

.btn-danger,
.btn-danger:active,
.btn-danger:focus {
	border-color: var(--epr-danger-700);
	background: var(--epr-danger-700);
	color: var(--epr-surface-white);
}

.btn-danger:hover {
	border-color: var(--epr-danger-800);
	background: var(--epr-danger-800);
}

.es-button:not([data-variant="solid"]):not(.primary-action):not(.danger-action) {
	color: var(--epr-purple-700);
}

.es-button.danger-action {
	border-color: var(--epr-danger-700);
	background: var(--epr-danger-700);
	color: var(--epr-surface-white);
}

.btn-link {
	color: var(--epr-purple-700);
}

.btn-link:hover {
	color: var(--epr-purple-900);
}

.btn:disabled,
.btn.disabled,
.form-control:disabled,
.form-control[readonly] {
	opacity: 1;
	color: var(--epr-ink-500);
	background: var(--epr-surface-100);
}

.form-control,
.form-select,
.input-with-feedback,
.awesomplete > input {
	min-height: 44px;
	border-color: var(--epr-color-border);
	border-radius: var(--epr-radius-md);
	background-color: var(--epr-color-control);
	color: var(--epr-color-text);
}

textarea.form-control {
	min-height: 88px;
}

.form-control:focus,
.form-select:focus,
.input-with-feedback:focus,
.awesomplete > input:focus {
	border-color: var(--epr-purple-500);
	box-shadow: 0 0 0 3px var(--epr-color-focus-ring);
}

.form-control::placeholder,
.form-select::placeholder,
.input-with-feedback::placeholder,
.awesomplete > input::placeholder {
	color: var(--epr-color-muted);
	opacity: 1;
}

.has-error .form-control,
.has-error .input-with-feedback,
.form-control.is-invalid {
	border-color: var(--epr-danger-700);
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--epr-purple-600);
}

:where(a, button, input, select, textarea, [role="button"]):focus-visible {
	outline: 3px solid var(--epr-color-focus-ring);
	outline-offset: 2px;
}

.card,
.frappe-card,
.page-card,
.modal-content,
.dropdown-menu {
	border-color: var(--epr-color-border);
	border-radius: var(--epr-radius-lg);
	box-shadow: var(--epr-shadow-sm);
}

.indicator-pill,
.badge {
	border-radius: var(--epr-radius-pill);
}

.alert-info {
	border-color: var(--epr-info-100);
	background: var(--epr-info-100);
	color: var(--epr-info-700);
}

.alert-success {
	border-color: var(--epr-success-100);
	background: var(--epr-success-100);
	color: var(--epr-success-700);
}

.alert-warning {
	border-color: var(--epr-warning-100);
	background: var(--epr-warning-100);
	color: var(--epr-warning-700);
}

.alert-danger {
	border-color: var(--epr-danger-100);
	background: var(--epr-danger-100);
	color: var(--epr-danger-700);
}

.navbar,
.desk-navbar {
	border-bottom-color: var(--epr-color-border);
	background: var(--epr-color-surface);
}

.standard-sidebar-item.selected,
.standard-sidebar-item:hover,
.standard-sidebar-item.active-sidebar,
.desk-sidebar-item.selected,
.desk-sidebar-item:hover,
.sidebar-item-container.is-selected {
	border-radius: var(--epr-radius-md);
	background: var(--epr-color-primary-soft);
	color: var(--epr-purple-800);
}

.standard-sidebar-item.active-sidebar .item-anchor {
	color: var(--epr-purple-800);
}

[data-theme="dark"] .btn-default,
[data-theme="dark"] .btn.btn-default,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn.btn-secondary {
	border-color: var(--epr-ink-700);
	background: var(--epr-color-control);
	color: var(--epr-purple-300);
}

[data-theme="dark"] .btn:disabled,
[data-theme="dark"] .btn.disabled,
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly] {
	color: var(--epr-surface-300);
	background: var(--epr-ink-700);
}

[data-theme="dark"] .btn-default:hover,
[data-theme="dark"] .btn.btn-default:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn.btn-secondary:hover,
[data-theme="dark"] .standard-sidebar-item.selected,
[data-theme="dark"] .standard-sidebar-item:hover,
[data-theme="dark"] .standard-sidebar-item.active-sidebar,
[data-theme="dark"] .desk-sidebar-item.selected,
[data-theme="dark"] .desk-sidebar-item:hover,
[data-theme="dark"] .sidebar-item-container.is-selected {
	border-color: var(--epr-purple-700);
	background: var(--epr-purple-900);
	color: var(--epr-purple-200);
}

[data-theme="dark"] .standard-sidebar-item.active-sidebar .item-anchor {
	color: var(--epr-purple-200);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:active,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .es-button.primary-action,
[data-theme="dark"] .es-button.primary-action:hover,
[data-theme="dark"] .es-button.primary-action:focus-visible,
[data-theme="dark"] .es-button[data-variant="solid"]:not([data-theme="red"]),
[data-theme="dark"] .es-button[data-variant="solid"]:not([data-theme="red"]):hover,
[data-theme="dark"] .es-button[data-variant="solid"]:not([data-theme="red"]):focus-visible,
[data-theme="dark"] .btn-danger,
[data-theme="dark"] .btn-danger:active,
[data-theme="dark"] .btn-danger:focus,
[data-theme="dark"] .btn-danger:hover {
	color: var(--epr-surface-white) !important;
}

[data-theme="dark"] .btn-link {
	color: var(--epr-purple-300);
}

[data-theme="dark"] .es-button:not([data-variant="solid"]):not(.primary-action):not(.danger-action) {
	color: var(--epr-purple-300);
}

/* Dialog secondary actions sit on a dark footer surface; keep their labels neutral. */
[data-theme="dark"] .modal-footer .es-button:not([data-variant="solid"]):not([data-theme="red"]) {
	color: var(--epr-surface-white);
}

[data-theme="dark"] .alert-info {
	border-color: var(--epr-info-700);
	background: rgb(7 95 171 / 20%);
	color: #9fd2ff;
}

[data-theme="dark"] .alert-success {
	border-color: var(--epr-success-700);
	background: rgb(20 122 76 / 20%);
	color: #9be0bd;
}

[data-theme="dark"] .alert-warning {
	border-color: var(--epr-warning-700);
	background: rgb(139 87 8 / 24%);
	color: #ffd88f;
}

[data-theme="dark"] .alert-danger {
	border-color: var(--epr-danger-700);
	background: rgb(185 49 69 / 20%);
	color: #ffb4c0;
}

/* Presentation only: retain upstream forms, validation and authentication. */
#page-login {
	min-height: 100vh;
	min-height: 100svh;
	background:
		radial-gradient(ellipse at 12% 12%, rgb(105 45 166 / 10%), transparent 46%),
		radial-gradient(ellipse at 90% 82%, rgb(19 169 189 / 15%), transparent 48%),
		var(--epr-color-canvas);
}

#page-login .page-content-wrapper {
	padding-top: 0;
}

#page-login main.container {
	max-width: none;
	padding: 0;
}

#page-login .page_content {
	display: flex;
	min-height: 100vh;
	min-height: 100svh;
	align-items: center;
	justify-content: center;
	padding: 48px 20px;
}

#page-login .page_content > div {
	width: 100%;
}

#page-login .page-card {
	width: 100%;
	max-width: 460px;
	min-height: auto;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 40px);
	border: 1px solid var(--epr-color-border);
	border-radius: 24px;
	background: var(--epr-color-surface);
	box-shadow: 0 20px 64px rgb(16 25 54 / 9%);
}

#page-login .page-card-head {
	gap: 24px;
}

#page-login .page-card-head h4 {
	font-family: "Montserrat", "Inter", sans-serif;
	font-size: clamp(24px, 5vw, 28px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.035em;
}

#page-login .page-card-subtitle {
	margin-top: 8px;
	line-height: 1.6;
}

#page-login .app-logo {
	width: 80px;
	height: 80px;
	max-height: none;
	object-fit: contain;
}

#page-login .page-card-body .form-control {
	min-height: 48px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 15px;
}

#page-login .password-field .form-control {
	padding-right: 44px;
}

#page-login .form-control:focus-visible,
#page-login a:focus-visible,
#page-login button:focus-visible {
	outline: 3px solid var(--epr-teal-500);
	outline-offset: 3px;
}

#page-login .page-card-actions button[type="submit"] {
	min-height: 48px;
	border: 1px solid var(--epr-purple-600);
	border-radius: var(--epr-radius-md);
	background: var(--epr-purple-600);
	color: #fff;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 600;
}

#page-login .page-card-actions button[type="submit"]:hover {
	border-color: var(--epr-purple-700);
	background: var(--epr-purple-700);
}

#page-login .page-card .form-group.invalid .form-control {
	border-color: var(--epr-danger-700);
}

@media (max-width: 480px) {
	#page-login .page_content {
		padding: 24px 16px;
	}
	#page-login .page-card {
		border-radius: 20px;
	}
}

/* Frappe 16 Desktop welcome and launchpad context. */
body.desktop-page .desktop-container.epr-desktop-enhanced {
	display: flex;
	width: min(1120px, 100%);
	margin: 0 auto;
	padding: 32px 32px 48px;
	align-items: stretch;
	justify-content: flex-start;
	flex-direction: column;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container {
	width: 100%;
	align-self: center;
	margin-top: 4px;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: var(--epr-space-6) var(--epr-space-4);
	width: 100%;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons
	> .desktop-icon {
	min-width: 0;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons
	> .desktop-icon
	.icon-caption {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons
	> .desktop-icon
	> .icon-container:not(.folder-icon) {
	background-color: var(--epr-purple-600) !important;
}

body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons
	> .desktop-icon:hover
	> .icon-container:not(.folder-icon),
body.desktop-page
	.desktop-container.epr-desktop-enhanced
	> .icons-container
	> .icons
	> .desktop-icon:focus-visible
	> .icon-container:not(.folder-icon) {
	background-color: var(--epr-purple-800) !important;
	box-shadow: 0 0 0 3px var(--epr-color-focus-ring);
}

.epr-desktop-welcome {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.epr-desktop-hero {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 28px 30px;
	border: 1px solid var(--outline-gray-2);
	border-radius: var(--epr-radius-xl);
	background:
		linear-gradient(135deg, var(--epr-purple-100), var(--epr-teal-100)),
		var(--card-bg);
}

.epr-desktop-logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	flex: 0 0 auto;
}

.epr-desktop-hero-copy {
	min-width: 0;
}

.epr-desktop-eyebrow {
	margin: 0 0 4px;
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--epr-color-primary);
}

.epr-desktop-release {
	display: inline-flex;
	margin-bottom: 8px;
	padding: 4px 9px;
	border: 1px solid rgb(105 45 166 / 24%);
	border-radius: var(--epr-radius-pill);
	background: rgb(255 255 255 / 64%);
	color: var(--epr-purple-800);
	font-size: var(--text-xs);
	font-weight: var(--weight-semibold);
	letter-spacing: 0.02em;
}

[data-theme="dark"] .epr-desktop-release {
	border-color: rgb(255 255 255 / 20%);
	background: rgb(16 25 54 / 38%);
	color: var(--epr-purple-100);
}

.epr-desktop-hero h1 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.2;
	color: var(--text-color);
}

.epr-desktop-introduction {
	max-width: 780px;
	margin: 10px 0 0;
	font-size: var(--text-md);
	line-height: 1.55;
	color: var(--text-muted);
}

.epr-desktop-context {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 4px;
}

.epr-desktop-identity {
	display: flex;
	align-items: baseline;
	gap: 8px;
	color: var(--text-muted);
}

.epr-desktop-identity strong {
	color: var(--text-color);
}

.epr-desktop-environment {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: var(--epr-radius-pill);
	background: var(--epr-teal-100);
	color: var(--epr-teal-900);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

[data-theme="dark"] .epr-desktop-environment {
	background: rgb(7 126 150 / 22%);
	color: var(--epr-teal-300);
}

.epr-desktop-announcement {
	display: grid;
	grid-template-columns: minmax(120px, auto) 1fr;
	gap: 16px;
	padding: 16px 18px;
	border: 1px solid var(--epr-info-100);
	border-radius: var(--epr-radius-lg);
	background: var(--epr-info-100);
	color: var(--epr-info-700);
}

[data-theme="dark"] .epr-desktop-announcement {
	border-color: var(--epr-info-700);
	background: rgb(7 95 171 / 20%);
	color: #9fd2ff;
}

.epr-desktop-resources {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.epr-desktop-resource {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--outline-gray-2);
	border-radius: var(--epr-radius-lg);
	background: var(--card-bg);
	color: var(--text-color);
	text-decoration: none;
}

.epr-desktop-resource:hover {
	border-color: var(--epr-color-primary);
	background: var(--epr-color-primary-soft);
	color: var(--text-color);
	text-decoration: none;
}

.epr-desktop-resource-icon {
	display: inline-flex;
	color: var(--epr-color-primary);
}

.epr-desktop-resource-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.epr-desktop-resource-copy span {
	color: var(--text-muted);
	font-size: var(--text-sm);
}

.epr-desktop-applications-heading {
	margin: 4px 4px 0;
	font-size: var(--text-lg);
	color: var(--text-color);
}

.epr-desktop-footer {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	margin-top: 28px;
	padding: 20px 4px 0;
	border-top: 1px solid var(--outline-gray-2);
	color: var(--text-muted);
	font-size: var(--text-sm);
}

.epr-desktop-footer-copy,
.epr-desktop-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.epr-desktop-footer-copy {
	flex-direction: column;
}

.epr-desktop-footer-copy span {
	white-space: pre-line;
}

.epr-global-release {
	position: fixed;
	right: 12px;
	bottom: 7px;
	z-index: 10;
	padding: 3px 7px;
	border-radius: var(--epr-radius-sm);
	background: rgb(245 249 252 / 90%);
	box-shadow: 0 0 0 1px rgb(16 25 54 / 8%);
	pointer-events: none;
	font-variant-numeric: tabular-nums;
	font-size: 11px;
	font-weight: var(--weight-medium);
	line-height: 1.35;
	color: var(--epr-color-muted);
}

[data-theme="dark"] .epr-global-release {
	background: rgb(16 25 54 / 88%);
	box-shadow: 0 0 0 1px rgb(255 255 255 / 10%);
}

@media print {
	.epr-global-release {
		display: none;
	}
}

.epr-desktop-footer-link {
	color: var(--epr-color-primary);
	font-weight: var(--weight-medium);
	text-decoration: none;
}

.epr-desktop-footer-link:hover {
	color: var(--epr-color-primary-hover);
	text-decoration: underline;
}

@media screen and (max-width: 700px) {
	body.desktop-page .desktop-container.epr-desktop-enhanced {
		padding: 20px 13px 36px;
	}

	.epr-desktop-hero {
		align-items: flex-start;
		padding: 22px 20px;
	}

	.epr-desktop-logo {
		width: 54px;
		height: 54px;
	}

	.epr-desktop-context,
	.epr-desktop-identity {
		align-items: flex-start;
		flex-direction: column;
	}

	.epr-desktop-resources {
		grid-template-columns: 1fr;
	}

	.epr-desktop-announcement {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.epr-desktop-footer {
		flex-direction: column;
	}
}

@media screen and (max-width: 430px) {
	.epr-desktop-hero {
		flex-direction: column;
	}
}

/* Dashboard page: retain its actions but hide Frappe's cross-dashboard links. */
#page-dashboard-view
	.page-actions
	.menu-btn-group
	.dropdown-menu
	> li:not(.user-action),
#page-dashboard-view
	.page-actions
	.menu-btn-group
	.dropdown-menu
	> li.dropdown-divider {
	display: none !important;
}

/* Comments are independently controlled; the clinical Activity timeline stays visible. */
.epr-comments-disabled .comment-box {
	display: none !important;
}

.epr-scenario-summary {
	display: grid;
	grid-template-columns: minmax(13rem, 0.65fr) minmax(20rem, 1.35fr);
	gap: 1rem 1.5rem;
	margin: 0.75rem 0 1rem;
	padding: 1rem;
	background: var(--card-bg, #fff);
	border: 1px solid var(--border-color);
	border-top: 4px solid var(--epr-color-primary, #692da6);
	border-radius: var(--epr-radius-lg, 10px);
}

.epr-scenario-summary h4,
.epr-scenario-summary p { margin: 0; }
.epr-scenario-summary p { margin-top: 0.35rem; color: var(--text-muted); }
.epr-scenario-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; margin: 0; }
.epr-scenario-summary dl > div { min-width: 0; }
.epr-scenario-summary dt { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.epr-scenario-summary dd { margin: 0.2rem 0 0; color: var(--epr-color-navy, #084260); font-weight: 600; overflow-wrap: anywhere; }
[data-theme="dark"] .epr-scenario-summary dd { color: #b9e5f7; }

@media (max-width: 760px) {
	.epr-scenario-summary { grid-template-columns: 1fr; }
	.epr-scenario-summary dl { grid-template-columns: 1fr; }
}
