/* E8 design system on the Frappe desk and its web pages (login): light paper, white cards with rounded corners,
   black ink, sand for the one main action. Fonts with Cyrillic, served from here (public/fonts, OFL): Unbounded for
   titles, Onest for everything else. Frappe and ERPNext stay as they are: this file only repaints through their own
   variables, so their updates keep working. The CRM takes e8_crm.css (e8/theme.py). */
@font-face {
	font-family: "Onest";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url(../fonts/onest-cyrillic-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Onest";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url(../fonts/onest-latin-wght-normal.woff2) format("woff2-variations");
	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: "Unbounded";
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url(../fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Unbounded";
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url(../fonts/unbounded-latin-wght-normal.woff2) format("woff2-variations");
	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;
}

/* html:root outweighs the bundles' own :root and [data-theme] blocks, which the login page loads after this file */
html:root:not([data-theme="dark"]) {
	--e8-paper: #f4f4f4;
	--e8-card: #ffffff;
	--e8-line: #dcdad5;
	--e8-line-strong: #c9c6c0;
	--e8-ink: #121212;
	--e8-ink-soft: #4b4b4c;
	--e8-ink-dim: #6f6c66;
	--e8-sand: #c4a284;
	--e8-sand-hover: #d4b294;
	--e8-sand-ink: #8a6a4a;
	--e8-on-sand: #1c1408;

	--font-stack: "Onest", "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--bg-color: var(--e8-paper);
	--fg-color: var(--e8-card);
	--card-bg: var(--e8-card);
	--navbar-bg: var(--e8-card);
	--modal-bg: var(--e8-card);
	--popover-bg: var(--e8-card);
	--awesomebar-focus-bg: var(--e8-card);
	--subtle-accent: #faf9f7;
	--subtle-fg: var(--e8-paper);
	--fg-hover-color: var(--e8-paper);
	--highlight-color: #faf9f7;
	--control-bg: var(--e8-paper);
	--control-bg-on-gray: var(--e8-card);
	--disabled-control-bg: #ecebe8;
	--input-disabled-bg: #ecebe8;
	--border-color: var(--e8-line);
	--dark-border-color: var(--e8-line-strong);
	--table-border-color: var(--e8-line);
	--btn-group-border-color: var(--e8-line-strong);
	--text-color: var(--e8-ink);
	--heading-color: var(--e8-ink);
	--text-muted: var(--e8-ink-soft);
	--text-light: var(--e8-ink-dim);
	--disabled-text-color: var(--e8-ink-dim);
	--icon-stroke: var(--e8-ink);
	--primary: var(--e8-sand-ink);
	--btn-primary: var(--e8-sand);
	--btn-default-bg: var(--e8-card);
	--btn-default-hover-bg: var(--e8-paper);
	--btn-ghost-hover-bg: var(--e8-paper);
	--sidebar-select-color: #ecebe8;
	--scrollbar-thumb-color: var(--e8-line-strong);
	--scrollbar-track-color: transparent;
	--shadow-inset: none;
	--border-radius-tiny: 6px;
	--border-radius-sm: 8px;
	--border-radius: 10px;
	--border-radius-md: 12px;
	--border-radius-lg: 16px;
	--border-radius-xl: 20px;
}
/* the dark theme, if anybody switches to it, keeps Frappe's own colours under the same names */
[data-theme="dark"] {
	--e8-paper: var(--bg-color);
	--e8-card: var(--card-bg);
	--e8-line: var(--border-color);
	--e8-line-strong: var(--dark-border-color);
	--e8-ink: var(--text-color);
	--e8-ink-soft: var(--text-muted);
	--e8-ink-dim: var(--text-light);
	--e8-sand: var(--btn-primary);
	--e8-sand-hover: var(--btn-primary);
	--e8-sand-ink: var(--text-color);
	--e8-on-sand: var(--neutral);
}
:root {
	--e8-display: "Unbounded", "Onest", system-ui, sans-serif;
}

body {
	background-color: var(--bg-color);
	-webkit-font-smoothing: antialiased;
}

/* titles of pages and workspaces in the display face; sections and labels stay in the text face */
.page-head .page-title .title-text,
.ce-header,
.modal-title,
.widget-head .widget-title {
	font-family: var(--e8-display);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.page-head .page-title .title-text {
	font-size: 18px;
}
.ce-header {
	font-size: 22px;
}

/* the bar: white, one line below, no shadow */
.navbar,
.navbar.navbar-light {
	background: var(--navbar-bg);
	border-bottom: 1px solid var(--border-color);
	box-shadow: none;
}
.page-head {
	background: var(--bg-color);
	border-bottom: 0;
}
.page-head .page-head-content {
	border-bottom: 0;
}

/* the sidebars sit on the paper; the content is a white card */
.layout-side-section,
.body-sidebar {
	background: transparent;
}
.layout-main-section.frappe-card,
.layout-main-section-wrapper .frappe-card,
.frappe-card,
.widget {
	background: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-lg);
	box-shadow: none;
}
.widget:hover,
.widget.shortcut-widget-box:hover {
	box-shadow: none;
	border-color: var(--dark-border-color);
}
.form-section .section-head,
.form-dashboard-section .section-head {
	color: var(--text-color);
}

/* buttons: the main one in sand, the rest white with a line, all rounded; the keyboard's focus stays visible */
.btn {
	border-radius: var(--border-radius-md);
	font-weight: 600;
	box-shadow: none;
}
.btn.btn-sm,
.btn.btn-xs {
	border-radius: var(--border-radius-sm);
}
.btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.28);
}
.btn-primary,
.btn.btn-primary:not(:disabled):not(.disabled) {
	background: var(--e8-sand);
	border-color: var(--e8-sand);
	color: var(--e8-on-sand);
}
.btn-primary:hover {
	background: var(--e8-sand-hover);
	border-color: var(--e8-sand-hover);
	color: var(--e8-on-sand);
}
.btn-primary:disabled,
.btn-primary.disabled {
	background: var(--e8-sand);
	border-color: var(--e8-sand);
	color: var(--e8-on-sand);
	opacity: 0.55;
}
.btn-default,
.btn-secondary {
	background: var(--e8-card);
	border: 1px solid var(--e8-line);
	color: var(--e8-ink);
}
.btn-default:hover,
.btn-secondary:hover {
	background: var(--e8-paper);
	border-color: var(--e8-line-strong);
	color: var(--e8-ink);
}

/* inputs: paper with a line, dark when focused */
.form-control,
.frappe-control .ql-editor {
	background: var(--control-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-sm);
	color: var(--text-color);
}
.form-control:focus {
	background: var(--control-bg);
	border-color: var(--e8-ink);
	box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.08);
}
.form-control::placeholder {
	color: var(--e8-ink-dim);
}
.like-disabled-input,
.form-control[readonly],
.form-control:disabled {
	background: var(--input-disabled-bg);
	border-color: var(--input-disabled-bg);
}

/* lists, menus, pills */
.list-row-container,
.list-row-head {
	border-color: var(--border-color);
}
.list-row:hover,
.list-row-container:hover,
.level.list-row:hover {
	background: var(--highlight-color);
}
.list-row-head {
	background: var(--card-bg);
}
.dropdown-menu,
.modal-content,
.popover {
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius-lg);
	box-shadow: 0 18px 40px -16px rgba(18, 18, 18, 0.18);
}
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
	background: var(--e8-paper);
	color: var(--e8-ink);
}
.indicator-pill,
.indicator-pill-round,
.badge {
	border-radius: 999px;
}
.sidebar-item.selected,
.sidebar-item.selected a,
.standard-sidebar-item.selected,
.form-sidebar .sidebar-menu li a:hover {
	background: var(--sidebar-select-color);
	border-radius: var(--border-radius-sm);
	color: var(--e8-ink);
}
.sidebar-item.selected .sidebar-item-label,
.standard-sidebar-item.selected .sidebar-item-label {
	font-weight: 600;
}

/* the login and its sister pages: the login bundle paints them after this file with up to four classes, so one
   element more here (html) */
html .for-login .page-card,
html .for-forgot .page-card,
html .for-reset-password .page-card,
html .for-login-with-email-link .page-card {
	background: var(--e8-card);
	border: 1px solid var(--e8-line);
	border-radius: var(--border-radius-xl);
	padding: 32px;
}
@media (max-width: 575px) {
	html .for-login .page-card,
	html .for-forgot .page-card,
	html .for-reset-password .page-card,
	html .for-login-with-email-link .page-card {
		border: 0;
		border-radius: 0;
		padding: 60px 24px 32px;
	}
}
html .for-login .page-card-head h4,
html .for-forgot .page-card-head h4,
html .for-reset-password .page-card-head h4,
html .for-login-with-email-link .page-card-head h4 {
	font-family: var(--e8-display);
	font-weight: 600;
	letter-spacing: -0.01em;
	font-size: 22px;
}
html .for-login .page-card .page-card-body input[type="text"],
html .for-login .page-card .page-card-body input[type="email"],
html .for-login .page-card .page-card-body input[type="password"],
html .for-forgot .page-card .page-card-body input[type="email"],
html .for-reset-password .page-card .page-card-body input[type="password"],
html .for-login-with-email-link .page-card .page-card-body input[type="email"] {
	height: 44px;
	border-radius: var(--border-radius-md);
	background: var(--control-bg);
	border: 1px solid var(--border-color);
}
html .for-login .page-card .page-card-actions .btn-login,
html .for-forgot .page-card .page-card-actions .btn-login,
html .for-reset-password .page-card .page-card-actions .btn-login,
html .for-login-with-email-link .page-card .page-card-actions .btn-login,
html .for-login .page-card .btn-primary,
html .for-reset-password .page-card .btn-primary {
	background: var(--e8-sand);
	border: 1px solid var(--e8-sand);
	color: var(--e8-on-sand);
	border-radius: var(--border-radius-md);
	height: 44px;
	font-weight: 600;
	box-shadow: none;
}
html .for-login .page-card .page-card-actions .btn-login:hover,
html .for-login .page-card .page-card-actions .btn-login:active,
html .for-forgot .page-card .page-card-actions .btn-login:hover,
html .for-reset-password .page-card .page-card-actions .btn-login:hover,
html .for-login-with-email-link .page-card .page-card-actions .btn-login:hover,
html .for-login .page-card .btn-primary:hover {
	background: var(--e8-sand-hover);
	border-color: var(--e8-sand-hover);
	color: var(--e8-on-sand);
}
html .for-login .page-card .page-card-actions .btn-login:focus-visible,
html .for-login .page-card .page-card-actions .btn-login-option:focus-visible {
	box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.28);
}
html .for-login .page-card .page-card-actions .btn-login:disabled,
html .for-forgot .page-card .page-card-actions .btn-login:disabled {
	background: var(--e8-sand);
	color: var(--e8-on-sand);
	opacity: 0.55;
}
html .for-login .page-card .page-card-actions .btn-login-option,
html .for-login-with-email-link .page-card .page-card-actions .btn-login-option {
	background: var(--e8-card);
	border: 1px solid var(--e8-line);
	color: var(--e8-ink);
	border-radius: var(--border-radius-md);
	height: 44px;
}
html .for-login .page-card .page-card-actions .btn-login-option:hover {
	background: var(--e8-paper);
	border: 1px solid var(--e8-line-strong);
}
