/* ============================================================
   ALDERP LMS theme
   Frappe v16 / ERPNext v16

   Loaded on the desk (app_include_css) and on every website page, including
   /login (web_include_css). Frappe exposes its design tokens as CSS variables,
   so those are overridden first; element selectors are used only where no
   variable exists. Selectors were checked against Frappe 16.32:
   public/scss/espresso/_colors.scss, common/css_variables.scss,
   common/buttons.scss, desk/sidebar.scss and desk/sidebar_header.scss.

   Only the light theme is branded. A user who picks the dark theme keeps
   Frappe's dark palette with ALDERP accents, rather than a half-inverted mix.
   ============================================================ */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/plus-jakarta-sans-latin.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: "Plus Jakarta Sans";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/plus-jakarta-sans-latin-ext.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: "Cairo";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/cairo-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
		U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
	font-family: "Cairo";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/cairo-latin.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;
}

/* ---------- Tokens ---------- */
/* html:root, not :root: Frappe's page bundles (login.bundle.css among them)
   load after this file and re-declare the same variables on :root. The extra
   type selector outranks them regardless of order. */
html:root {
	--alderp-amber: #f5b417;
	--alderp-amber-deep: #df9a1b;
	--alderp-amber-wash: #fdf4de;
	--alderp-amber-line: #f6e3b0;
	--alderp-slate: #3c4543;
	--alderp-slate-2: #5b6663;
	--alderp-slate-3: #8a9491;
	--alderp-paper: #f6f5f1;
	--alderp-card: #ffffff;
	--alderp-sidebar: #fbfaf7;
	--alderp-line: #e6e4de;
	--alderp-control: #fcfcfa;
	--alderp-readonly: #f2f1ec;
	--alderp-pass: #2e7d6b;
	--alderp-pass-bg: #e7f1ee;
	--alderp-fail: #b4332b;
	--alderp-fail-bg: #fbeae8;

	/* Arabic runs through Cairo even inside an English view (names stored twice). */
	--font-stack: "Plus Jakarta Sans", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--alderp-focus-ring: 0 0 0 3px var(--alderp-amber-wash);

	--border-radius: 8px;
	--border-radius-md: 8px;
	--border-radius-lg: 12px;

	/* Accents are shared by both themes. */
	--primary: var(--alderp-amber);
	--brand-color: var(--alderp-amber);
	--checkbox-color: var(--alderp-amber);
	--checkbox-gradient: linear-gradient(180deg, var(--alderp-amber) 0%, var(--alderp-amber) 100%);
	--checkbox-focus-shadow: var(--alderp-focus-ring);
}

html:root[lang="ar"],
html:root[dir="rtl"] {
	--font-stack: "Cairo", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html:root:not([data-theme="dark"]) {
	/* Frappe layout tokens */
	--bg-color: var(--alderp-paper);
	--fg-color: var(--alderp-card);
	--card-bg: var(--alderp-card);
	--modal-bg: var(--alderp-card);
	--popover-bg: var(--alderp-card);
	--subtle-accent: var(--alderp-sidebar);
	--subtle-fg: var(--alderp-paper);
	--fg-hover-color: var(--alderp-sidebar);
	--control-bg: var(--alderp-control);
	--control-bg-on-gray: var(--alderp-control);
	--disabled-control-bg: var(--alderp-readonly);
	--input-disabled-bg: var(--alderp-readonly);
	--highlight-color: var(--alderp-amber-wash);
	--yellow-highlight-color: var(--alderp-amber-wash);
	--awesomplete-hover-bg: var(--alderp-amber-wash);
	--border-color: var(--alderp-line);
	--dark-border-color: var(--alderp-line);
	--table-border-color: var(--alderp-line);
	--btn-group-border-color: var(--alderp-line);

	/* Text */
	--text-color: var(--alderp-slate);
	--heading-color: var(--alderp-slate);
	--text-muted: var(--alderp-slate-3);
	--text-light: var(--alderp-slate-2);
	--disabled-text-color: var(--alderp-slate-2);
	--icon-stroke: var(--alderp-slate);

	/* Espresso ink scale: slate never pure black */
	--ink-gray-9: var(--alderp-slate);
	--ink-gray-8: var(--alderp-slate);
	--ink-gray-7: var(--alderp-slate-2);
	--ink-gray-6: var(--alderp-slate-2);
	--ink-gray-5: var(--alderp-slate-3);
	--ink-gray-4: var(--alderp-slate-3);
	--surface-menu-bar: var(--alderp-sidebar);
	--surface-white: var(--alderp-card);
	--surface-gray-1: var(--alderp-sidebar);
	--surface-gray-2: var(--alderp-paper);
	--outline-gray-1: var(--alderp-line);
	--outline-gray-2: var(--alderp-line);

	/* Buttons */
	--primary-color: var(--alderp-amber);
	--btn-primary: var(--alderp-amber);
	--border-primary: var(--alderp-amber);
	--btn-default-bg: var(--alderp-card);
	--btn-default-hover-bg: var(--alderp-sidebar);
	--btn-ghost-hover-bg: var(--alderp-paper);

	/* Sidebar */
	--sidebar-hover-color: var(--alderp-paper);
	--sidebar-active-color: var(--alderp-amber-wash);
	--sidebar-border-color: var(--alderp-line);
	--divider-color: var(--alderp-line);
	--sidebar-select-color: var(--alderp-amber-wash);

	/* Status colours used by indicators and alerts */
	--bg-green: var(--alderp-pass-bg);
	--text-on-green: var(--alderp-pass);
	--bg-red: var(--alderp-fail-bg);
	--text-on-red: var(--alderp-fail);
	--bg-orange: var(--alderp-amber-wash);
	--text-on-orange: var(--alderp-amber-deep);
	--bg-yellow: var(--alderp-amber-wash);
	--text-on-yellow: var(--alderp-amber-deep);
	--bg-blue: var(--alderp-amber-wash);
	--text-on-blue: var(--alderp-amber-deep);
	--bg-gray: var(--alderp-paper);
	--bg-grey: var(--alderp-paper);
	--text-on-gray: var(--alderp-slate-2);
	--text-on-grey: var(--alderp-slate-2);
	--alert-bg-success: var(--alderp-pass-bg);
	--alert-text-success: var(--alderp-pass);
	--alert-bg-danger: var(--alderp-fail-bg);
	--alert-text-danger: var(--alderp-fail);
	--alert-bg-warning: var(--alderp-amber-wash);
	--alert-text-warning: var(--alderp-amber-deep);
	--alert-bg-info: var(--alderp-amber-wash);
	--alert-text-info: var(--alderp-slate-2);

	/* Flat: borders, not shadows */
	--card-shadow: none;
	--btn-shadow: none;
	--highlight-shadow: var(--alderp-focus-ring);
}

/* ---------- Type ---------- */
body {
	font-family: var(--font-stack);
	color: var(--text-color);
}

h1,
h2,
h3,
h4,
.page-title .title-text,
.title-area .title-text {
	font-weight: 800;
	letter-spacing: -0.01em;
}

.page-title .title-text {
	letter-spacing: -0.015em;
}

.list-row .list-row-col,
.dt-cell__content,
.grid-static-col,
.number-card-value,
.widget.number-widget-box .widget-content {
	font-variant-numeric: tabular-nums;
}

/* Micro-labels are the only uppercase type */
.section-break .sidebar-item-label,
.widget-group-title,
.form-section .section-head {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.section-break,
.section-break .sidebar-item-label {
	color: var(--alderp-slate-3) !important; /* Frappe forces this with !important */
}

/* ---------- Buttons ---------- */
/* Frappe paints primary text with --neutral (white); amber needs slate text. */
.btn.btn-primary {
	color: var(--alderp-slate);
	font-weight: 800;
	--icon-stroke: currentColor;
	--icon-fill-bg: var(--alderp-amber);
}
.btn.btn-primary:hover,
.btn.btn-primary:focus {
	background-color: var(--alderp-amber-deep);
	color: var(--alderp-slate);
}
.btn.btn-primary:active {
	background-color: var(--alderp-amber-deep) !important; /* Frappe sets :active with !important */
	color: var(--alderp-slate) !important;
}

:root:not([data-theme="dark"]) .btn.btn-default,
:root:not([data-theme="dark"]) .btn.btn-secondary {
	background-color: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	color: var(--alderp-slate-2);
	font-weight: 700;
}
:root:not([data-theme="dark"]) .btn.btn-default:hover,
:root:not([data-theme="dark"]) .btn.btn-secondary:hover {
	border-color: var(--alderp-slate-3);
	color: var(--alderp-slate);
}

.btn-primary-light {
	background: var(--alderp-amber-wash);
	border: 1px solid var(--alderp-amber-line);
	color: var(--alderp-amber-deep);
}

/* ---------- Inputs & focus ---------- */
.form-control:focus,
.awesomplete input:focus,
.frappe-control input:focus,
.frappe-control select:focus,
.frappe-control textarea:focus {
	border-color: var(--alderp-amber);
	box-shadow: var(--alderp-focus-ring);
	outline: none;
}

:root:not([data-theme="dark"]) .form-control {
	border: 1px solid var(--alderp-line);
}

.frappe-control .control-label,
.form-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--alderp-slate-2);
}

.form-section .section-head,
.form-section .section-head .collapse-indicator {
	color: var(--alderp-amber-deep);
}

.like-disabled-input {
	background: var(--disabled-control-bg);
	color: var(--alderp-slate-2);
}

/* Inputs that store Arabic (e.g. *_ar fields) */
.frappe-control[data-fieldname$="_ar"] input,
.frappe-control[data-fieldname$="_ar"] .like-disabled-input,
[lang="ar"] input {
	font-family: "Cairo", var(--font-stack);
}

/* ---------- Desk sidebar ---------- */
.body-sidebar {
	border-right: 1px solid var(--sidebar-border-color);
}

.body-sidebar .active-sidebar,
.active-sidebar {
	background: var(--alderp-amber-wash);
	border-radius: 8px;
	box-shadow: inset 3px 0 0 var(--alderp-amber);
}
.active-sidebar .item-anchor,
.active-sidebar .sidebar-item-label {
	color: var(--alderp-slate);
	font-weight: 700;
}

[dir="rtl"] .body-sidebar {
	border-right: none;
	border-left: 1px solid var(--sidebar-border-color);
}
[dir="rtl"] .active-sidebar {
	box-shadow: inset -3px 0 0 var(--alderp-amber);
}

/* App header in the sidebar: the amber tile with the slate mark */
.sidebar-header .header-logo img {
	border-radius: 8px;
}
.sidebar-header .header-title {
	font-weight: 800;
	color: var(--alderp-slate);
}

/* ---------- Top navbar (website pages) ---------- */
.navbar .navbar-brand {
	font-weight: 800;
	color: var(--alderp-slate);
}
.navbar .navbar-brand img {
	max-height: 36px;
	width: auto;
}
.navbar .nav-link {
	font-weight: 600;
	color: var(--alderp-slate-2);
	white-space: nowrap;
}
.navbar .nav-link:hover {
	color: var(--alderp-slate);
}

/* ---------- Lists & reports ---------- */
:root:not([data-theme="dark"]) .list-row-head,
:root:not([data-theme="dark"]) .dt-header,
:root:not([data-theme="dark"]) .grid-heading-row {
	background: var(--alderp-sidebar);
}
.list-row-head .list-row-col,
.list-row-head .list-subject {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
:root:not([data-theme="dark"]) .list-row-container .list-row:hover,
:root:not([data-theme="dark"]) .dt-row:hover .dt-cell {
	background: var(--alderp-sidebar);
}
.list-subject a,
.list-row .bold a {
	font-weight: 700;
}
.list-subject a:hover {
	color: var(--alderp-amber-deep);
}
.list-count {
	color: var(--alderp-slate-3);
}
.filter-selector .btn,
.sort-selector .btn {
	border-radius: 999px;
}

/* Design screen 06 rows end at the status pill: no modified time, comment
   count or like heart (Frappe's list-row-activity), and no heart filter in
   the header. */
.list-row .list-row-activity,
.list-row-head .list-liked-by-me,
.list-row-head .list-row-activity {
	display: none !important; /* list_view.js sets display on these inline */
}
.list-row .level-right,
.list-row-head .level-right {
	flex: 0 0 auto;
	background: transparent;
}

/* ---------- Indicators ---------- */
.indicator-pill {
	font-weight: 700;
	border-radius: 999px;
}

/* ---------- Content links ---------- */
/* Amber is never text on white; links use Amber Deep. Scoped to written
   content so navigation, list rows and buttons keep their own colours. */
.ql-editor a,
.help-box a,
.frappe-control .control-value a,
.web-page-content a:not(.btn),
.page-content-wrapper .from-markdown a:not(.btn),
.login-content a:not(.btn),
.text-primary {
	color: var(--alderp-amber-deep);
}
.ql-editor a:hover,
.help-box a:hover,
.web-page-content a:not(.btn):hover,
.login-content a:not(.btn):hover {
	color: var(--alderp-slate);
}

/* ---------- Progress & charts ---------- */
.progress {
	background: var(--alderp-paper);
	border-radius: 999px;
}
.progress-bar {
	background: var(--alderp-amber);
}

/* ---------- Cards (flatten) ---------- */
.widget,
.frappe-card,
.form-page,
.page-card,
.number-widget-box {
	border: 1px solid var(--border-color);
	border-radius: 12px;
	box-shadow: none;
}

/* ---------- Website brand (Website Settings > Brand HTML) ---------- */
.navbar-brand .alderp-brand-logo {
	height: 36px;
	width: auto;
}

/* ---------- Error & empty states (www/404.html) ---------- */
.alderp-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 70vh;
	padding: 32px 16px;
}
.alderp-state-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	max-width: 420px;
	min-height: 300px;
	justify-content: center;
	padding: 32px;
	text-align: center;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
}
.alderp-state-code {
	margin: 0;
	font-size: 52px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--alderp-amber);
}
.alderp-state-title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-state-text {
	max-width: 260px;
	margin: 0;
	font-size: 13px;
	color: var(--alderp-slate-3);
}
.btn.alderp-btn-slate {
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 800;
	color: #fff;
	background: var(--alderp-slate);
	border: 1px solid var(--alderp-slate);
	border-radius: 8px;
}
.btn.alderp-btn-slate:hover {
	color: #fff;
	background: var(--alderp-slate-2);
}
.alderp-state-eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--alderp-amber-deep);
}
.alderp-state-eyebrow.is-red {
	color: var(--alderp-fail);
}
.alderp-state-text p {
	margin: 0;
}
.btn.alderp-btn-outline {
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 700;
	color: var(--alderp-slate);
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 8px;
}
.btn.alderp-btn-outline:hover {
	color: var(--alderp-slate);
	border-color: var(--alderp-slate-3);
}

/* ---------- About dialog (public/js/alderp_desk.js) ---------- */
.alderp-about {
	padding: 12px 0 4px;
	text-align: center;
}
.alderp-about-logo {
	width: 150px;
	height: auto;
	margin-bottom: 16px;
}
.alderp-about-name {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-about-version {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--alderp-slate-3);
	font-variant-numeric: tabular-nums;
}

/* ---------- Print / letterhead ---------- */
.print-format {
	font-family: var(--font-stack);
	color: var(--alderp-slate);
	font-size: 11pt;
}
.print-format h1,
.print-format h2 {
	font-weight: 800;
}
.print-format table thead th {
	background: var(--alderp-sidebar);
}
.print-format td,
.print-format .data-field .value {
	font-variant-numeric: tabular-nums;
}

/* ============================================================
   Desk shell (public/js/alderp_desk.js adds body.alderp-shell)
   Design screen 03: slate navbar above a 236px sidebar.
   ============================================================ */

html:root {
	--alderp-navbar-height: 56px;
}

.alderp-navbar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 1030;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--alderp-navbar-height);
	padding: 0 20px;
	background: var(--alderp-slate);
	color: #fff;
}

.alderp-navbar-left {
	display: flex;
	align-items: center;
	gap: 22px;
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

.alderp-navbar-brand {
	display: flex;
	align-items: center;
	gap: 9px;
	flex: none;
	text-decoration: none;
}
.alderp-navbar-brand:hover {
	text-decoration: none;
}

.alderp-brand-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--alderp-amber);
}
.alderp-brand-tile img {
	width: 17px;
	height: 17px;
}

.alderp-brand-word {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
	white-space: nowrap;
}
.alderp-brand-word span {
	font-weight: 700;
	color: var(--alderp-amber);
}

/* One row, always. The desk reserves one bar's height above every page; a
   second row of pills grew the bar over the page's title and its buttons (a
   form's actions were unreachable at tablet widths). Pills that do not fit
   scroll sideways instead. */
.alderp-navbar-pills {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	min-width: 0;
	padding: 8px 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.alderp-navbar-pills::-webkit-scrollbar {
	display: none;
}

.alderp-navbar-pill {
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	white-space: nowrap;
	text-decoration: none;
}
.alderp-navbar-pill:hover {
	color: #fff;
	text-decoration: none;
}
.alderp-navbar-pill.is-active,
.alderp-navbar-pill.is-active:hover {
	font-weight: 700;
	color: var(--alderp-slate);
	background: var(--alderp-amber);
}

.alderp-navbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 0 1 auto;
}

/* The chip in the desk's top bar. Named for where it lives: this sheet is
   loaded on the portal pages too, and while it was called .alderp-search it
   was also styling the filter form on the catalogue and the people lists —
   capping them at 250px and clipping what did not fit. */
.alderp-navbar-search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 250px;
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.55);
	font: inherit;
	font-size: 13px;
	text-align: start;
	cursor: pointer;
	overflow: hidden;
}
.alderp-navbar-search span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.alderp-navbar-search:hover {
	background: rgba(255, 255, 255, 0.16);
}

.alderp-lang-chip {
	flex: none;
	padding: 4px 7px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: transparent;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
}
.alderp-lang-chip:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

.alderp-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--alderp-amber-wash);
	font-size: 12px;
	font-weight: 800;
	color: var(--alderp-slate);
	text-decoration: none;
}
.alderp-avatar:hover {
	text-decoration: none;
	color: var(--alderp-slate);
}
button.alderp-avatar {
	padding: 0;
	border: 0;
	font-family: inherit;
	cursor: pointer;
}
button.alderp-avatar:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(245, 180, 23, 0.55);
}

/* The avatar's menu */
.alderp-user {
	position: relative;
	flex: none;
}
.alderp-user-menu {
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	z-index: 1040;
	display: flex;
	flex-direction: column;
	min-width: 230px;
	padding: 6px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(60, 69, 67, 0.08);
}
.alderp-user-menu[hidden] {
	display: none;
}
.alderp-user-head {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px 12px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--alderp-line);
}
.alderp-user-name {
	font-size: 14px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-user-email {
	font-size: 12px;
	color: var(--alderp-slate-3);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.alderp-user-menu button {
	padding: 9px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--alderp-slate-2);
	text-align: start;
	cursor: pointer;
}
.alderp-user-menu button:hover,
.alderp-user-menu button:focus-visible {
	outline: none;
	background: var(--alderp-paper);
	color: var(--alderp-slate);
}
.alderp-user-menu button.is-danger {
	color: var(--alderp-fail);
	font-weight: 700;
}
.alderp-user-menu button.is-danger:hover {
	background: var(--alderp-fail-bg);
	color: var(--alderp-fail);
}
.alderp-user-divider {
	height: 1px;
	margin: 4px 0;
	background: var(--alderp-line);
}

/* ALDERP only (boot.py): no framework onboarding, icon grid or duplicate user block */
body.alderp-only .onboarding-sidebar,
body.alderp-only .desktop-wrapper,
body.alderp-shell .body-sidebar .dropdown-navbar-user {
	display: none !important; /* Frappe shows these with inline styles */
}

/* Everything below the navbar moves down by its height. */
body.alderp-shell {
	padding-top: var(--alderp-navbar-height);
	--navbar-height: var(--alderp-navbar-height);
}
body.alderp-shell .body-sidebar {
	height: calc(100vh - var(--alderp-navbar-height));
}
/* Frappe pins the sidebar to the top of the window; under the fixed navbar
   that hid its header. Pin it just below the navbar instead. */
body.alderp-shell .body-sidebar-container {
	position: sticky;
	top: var(--alderp-navbar-height);
	align-self: flex-start;
	max-height: calc(100vh - var(--alderp-navbar-height));
}

/* Design screen 03's sidebar is rows under group labels. The navbar already
   carries the brand, search and user menu, so Frappe's sidebar header (app
   switcher) and search row are hidden. The search row stays in the page:
   the navbar's search button opens Frappe's search through it. */
body.alderp-shell .body-sidebar .sidebar-header,
body.alderp-shell .body-sidebar .standard-sidebar-item:has(#navbar-modal-search) {
	display: none !important; /* sidebar.js toggles these with inline display */
}
body.alderp-shell .body-sidebar-container.expanded .sidebar-items .sidebar-item-icon {
	display: none;
}
body.alderp-shell .body-sidebar-container.expanded .sidebar-items .item-anchor {
	padding-inline: 13px;
}
body.alderp-shell .body-sidebar-top {
	scrollbar-width: thin;
	scrollbar-color: var(--alderp-line) transparent;
}

/* The page head is a full-width bar, so it lies over the top of the side column
   as well as the main one. Stock Frappe leaves it transparent and the sidebar's
   first row — the document name and its buttons — shows through the title bar;
   once the head is opaque, and it has to be (see .page-head below), that row is
   simply hidden behind it. So the side column starts below the head instead.

   The clearance itself is set further down, with the two columns' padding, so
   that one rule decides it. An earlier attempt put the offset on .form-sidebar,
   which is position: static at this width: `top` on it did nothing at all. */
body.alderp-shell .layout-side-section {
	background: var(--alderp-sidebar);
}
body.alderp-shell .page-head {
	top: var(--alderp-navbar-height);
}

/* The sidebar: 236px on #FBFAF7, grouped rows, amber selection. */
body.alderp-shell {
	--sidebar-width: 236px;
}
body.alderp-shell .body-sidebar-container.expanded .body-sidebar {
	padding: 22px 16px;
	background: var(--alderp-sidebar);
}
body.alderp-shell .body-sidebar .standard-sidebar-item .item-anchor {
	height: auto;
	min-height: 36px;
	color: var(--alderp-slate-2);
}
body.alderp-shell .body-sidebar .standard-sidebar-item .sidebar-item-label {
	font-size: 14px;
	font-weight: 500;
}
body.alderp-shell .body-sidebar .active-sidebar .sidebar-item-label {
	font-weight: 700;
	color: var(--alderp-slate);
}
body.alderp-shell .section-break .sidebar-item-label {
	font-size: 10px;
	letter-spacing: 0.18em;
}

/* "Term status" at the foot of the sidebar */
.alderp-term-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 12px 0;
	padding: 16px;
	border-radius: 8px;
	background: var(--alderp-slate);
}
.alderp-term-card-label {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--alderp-amber);
}
.alderp-term-card-text {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.75);
}
.body-sidebar-container:not(.expanded) .alderp-term-card {
	display: none;
}

@media (max-width: 767px) {
	.alderp-navbar-pills,
	.alderp-lang-chip {
		display: none;
	}
}

/* ============================================================
   Desk home (design screen 03, main column)
   ============================================================ */

.alderp-home {
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding: 32px 36px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	margin: 20px 0;
}

.alderp-home-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
}

.alderp-greeting {
	margin: 0;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--alderp-slate);
}
.alderp-greeting-sub {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--alderp-slate-3);
}

.alderp-home-actions {
	display: flex;
	gap: 10px;
}
.alderp-home-actions .btn {
	padding: 10px 16px;
	font-size: 14px;
	border-radius: 8px;
}

.alderp-metrics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}

.alderp-metric {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
}
.alderp-micro {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
.alderp-metric-value {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--alderp-slate);
	font-variant-numeric: tabular-nums;
}
.alderp-note {
	font-size: 12px;
	font-weight: 700;
	color: var(--alderp-slate-3);
}
.alderp-note.is-pass {
	color: var(--alderp-pass);
}
.alderp-note.is-amber {
	color: var(--alderp-amber-deep);
}

.alderp-home-split {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 20px;
}
@media (max-width: 991px) {
	.alderp-home-split {
		grid-template-columns: minmax(0, 1fr);
	}
}

.alderp-panel {
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--alderp-card);
}
.alderp-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid var(--alderp-line);
	font-size: 14px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-panel-body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
}
.alderp-panel-title {
	font-size: 14px;
	font-weight: 800;
	color: var(--alderp-slate);
}

.alderp-action {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid var(--alderp-line);
	background: transparent;
	font: inherit;
	text-align: start;
	cursor: pointer;
}
.alderp-action:last-child {
	border-bottom: 0;
}
.alderp-action:hover {
	background: var(--alderp-sidebar);
}
.alderp-dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--alderp-slate-3);
}
.alderp-dot.is-pending {
	background: var(--alderp-amber);
}
.alderp-dot.is-urgent {
	background: var(--alderp-fail);
}
.alderp-action-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}
.alderp-action-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--alderp-slate);
}
.alderp-action-meta {
	font-size: 12px;
	color: var(--alderp-slate-3);
}
.alderp-action-verb {
	font-size: 13px;
	font-weight: 700;
	color: var(--alderp-amber-deep);
}
.alderp-empty {
	padding: 28px 18px;
	font-size: 13px;
	color: var(--alderp-slate-3);
}

.alderp-bars {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.alderp-bar {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.alderp-bar-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
}
.alderp-bar-name {
	font-weight: 600;
	color: var(--alderp-slate-2);
}
.alderp-bar-count {
	font-weight: 700;
	color: var(--alderp-slate);
	font-variant-numeric: tabular-nums;
}
.alderp-bar-track {
	height: 8px;
	border-radius: 4px;
	background: var(--alderp-paper);
	overflow: hidden;
}
.alderp-bar-fill {
	height: 100%;
	background: var(--alderp-slate);
}
.alderp-bar:nth-child(-n + 2) .alderp-bar-fill {
	background: var(--alderp-amber);
}

.alderp-milestone {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px;
	border: 1px solid var(--alderp-amber-line);
	border-radius: 12px;
	background: var(--alderp-amber-wash);
}
.alderp-milestone .alderp-micro {
	color: var(--alderp-amber-deep);
}
.alderp-milestone-title {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--alderp-slate);
}
.alderp-milestone-meta {
	font-size: 13px;
	color: var(--alderp-slate-2);
}

/* ============================================================
   List view (design screen 06)
   Frappe 16 markup: .frappe-list > .result > header.list-row-head
   + .list-row-container > .list-row, paging in .list-paging-area.
   ============================================================ */

body.alderp-shell .page-head .page-title .title-text {
	font-size: 20px;
	font-weight: 800;
	color: var(--alderp-slate);
}

body.alderp-shell .frappe-list {
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	overflow: hidden;
}

/* Filter strip: pills on #FBFAF7 */
body.alderp-shell .list-view .page-form,
body.alderp-shell .report-view .page-form {
	background: var(--alderp-sidebar);
	border-bottom: 1px solid var(--alderp-line);
	padding: 12px 24px;
}
body.alderp-shell .page-form .filter-selector .btn,
body.alderp-shell .page-form .sort-selector .btn,
body.alderp-shell .page-form .filter-x-button {
	border-radius: 999px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	font-size: 13px;
	font-weight: 600;
	color: var(--alderp-slate-2);
}
body.alderp-shell .page-form .filter-button.btn-primary-light,
body.alderp-shell .page-form .filter-selector .btn.btn-primary-light {
	background: var(--alderp-amber-wash);
	border-color: var(--alderp-amber-line);
	color: var(--alderp-amber-deep);
}

/* Column headings: 11/800 uppercase */
body.alderp-shell .list-row-head {
	padding: 13px 24px;
	background: var(--alderp-card);
	border-bottom: 1px solid var(--alderp-line);
}
body.alderp-shell .list-row-head .list-row-col,
body.alderp-shell .list-row-head .list-subject,
body.alderp-shell .list-row-head .list-count {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}

/* Rows */
body.alderp-shell .list-row-container {
	border-bottom: 1px solid var(--alderp-line);
}
body.alderp-shell .list-row {
	padding: 13px 24px;
	font-size: 13px;
	color: var(--alderp-slate-2);
}
body.alderp-shell .list-row .list-subject {
	font-size: 14px;
	font-weight: 700;
	color: var(--alderp-slate);
}
body.alderp-shell .list-row .list-row-checkbox,
body.alderp-shell .list-row-head .list-check-all {
	width: 15px;
	height: 15px;
	border-radius: 4px;
}
body.alderp-shell .list-row .avatar .avatar-frame {
	background: var(--alderp-amber-wash);
	color: var(--alderp-slate);
	font-size: 11px;
	font-weight: 800;
}
body.alderp-shell .list-row .indicator-pill {
	font-size: 12px;
	font-weight: 700;
	padding: 3px 12px;
}

/* Row layout: the subject grows, the right-hand cell keeps its size, and
   neither is allowed to overflow the card. Frappe's right-to-left bundle gives
   the subject a percentage width that ignores the status cell, which put the
   column heading on top of the record count and pushed the first column off the
   left edge of the screen. */
body.alderp-shell .list-row,
body.alderp-shell .list-row-head {
	flex-wrap: nowrap;
	gap: 12px;
}
/* The row is a flex item whose width is otherwise decided by its contents, so
   a wide Arabic course name pushed the whole row past the card and off the
   screen. Clamp it, and let the cells inside it shrink. */
body.alderp-shell .list-row,
body.alderp-shell .list-row-head {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	flex: 0 1 100%;
	overflow: hidden;
}
/* Frappe writes each column's width and `flex: 1 0 <basis>` as an inline
   style, so a rule without !important cannot let the columns shrink, and eight
   of them at their minimum width overflow the card: the trailing status column
   ends up over the heading and, right to left, the first column is pushed off
   the screen. */
body.alderp-shell .list-row .list-row-col,
body.alderp-shell .list-row-head .list-row-col {
	min-width: 0 !important;
	flex-shrink: 1 !important;
}
body.alderp-shell .list-row-head > .level-right,
body.alderp-shell .list-row > .level-right {
	position: static;
}
body.alderp-shell .list-row > .level-left,
body.alderp-shell .list-row-head > .level-left,
body.alderp-shell .list-row .list-subject,
body.alderp-shell .list-row-head .list-header-subject {
	flex: 1 1 auto;
	width: auto;
	max-width: 100%;
	min-width: 0;
}
body.alderp-shell .list-row > .level-right,
body.alderp-shell .list-row-head > .level-right {
	flex: 0 0 auto;
	width: auto;
	margin-inline-start: auto;
}

/* Pager: current page is a 30px amber square */
body.alderp-shell .list-paging-area {
	padding: 14px 24px;
	background: var(--alderp-card);
	font-size: 13px;
	color: var(--alderp-slate-3);
}
body.alderp-shell .list-paging-area .btn-group .btn {
	min-width: 30px;
	height: 30px;
	border-radius: 8px;
	font-weight: 700;
}
body.alderp-shell .list-paging-area .btn-group .btn.btn-info,
body.alderp-shell .list-paging-area .btn-group .btn.active {
	background: var(--alderp-amber);
	border-color: var(--alderp-amber);
	color: var(--alderp-slate);
}

/* ============================================================
   Form view (design screen 07)
   ============================================================ */

/* Tabs: 14px, the active one 800 with a 2px amber underline */
body.alderp-shell .form-tabs-list {
	border-bottom: 1px solid var(--alderp-line);
	background: var(--alderp-card);
}
body.alderp-shell .form-tabs .nav-item .nav-link {
	padding: 12px 0;
	margin-inline-end: 22px;
	font-size: 14px;
	font-weight: 500;
	color: var(--alderp-slate-2);
	border: 0;
	border-bottom: 2px solid transparent;
}
body.alderp-shell .form-tabs .nav-item .nav-link.active {
	font-weight: 800;
	color: var(--alderp-slate);
	border-bottom-color: var(--alderp-amber);
}

/* Page body: white card, 28/26 padding */
body.alderp-shell .form-page,
body.alderp-shell .std-form-layout > .form-layout > .form-page {
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
}
body.alderp-shell .form-section .section-body {
	gap: 16px;
}

/* Frappe sizes a form column with Bootstrap's col-sm-N, a hard percentage
   width. Adding a gap to the row then overflows it and the columns wrap, so a
   two-column section stacked into one narrow strip with the rest of the form
   empty beside it. Let the columns share what is left after the gap instead of
   trusting the percentage. */
body.alderp-shell .form-section .section-body > .form-column {
	flex: 1 1 0;
	width: auto;
	max-width: none;
	min-width: 0;
}
body.alderp-shell .form-section {
	padding: 22px 26px;
	border-bottom: 1px solid var(--alderp-line);
}

/* Section headings: 11/800/.16em uppercase, Amber Deep */
body.alderp-shell .form-section .section-head {
	padding: 0 0 12px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--alderp-amber-deep);
}

/* Fields */
body.alderp-shell .frappe-control .control-input .form-control,
body.alderp-shell .frappe-control .like-disabled-input {
	min-height: 40px;
	padding: 10px 13px;
	font-size: 14px;
	border-radius: 8px;
}
body.alderp-shell .frappe-control .like-disabled-input,
body.alderp-shell .frappe-control .form-control[readonly] {
	background: var(--alderp-readonly);
	color: var(--alderp-slate-2);
}

/* Child tables */
body.alderp-shell .form-grid {
	border: 1px solid var(--alderp-line);
	border-radius: 8px;
	overflow: hidden;
}
body.alderp-shell .form-grid .grid-heading-row {
	background: var(--alderp-sidebar);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
body.alderp-shell .form-grid .grid-row {
	border-bottom: 1px solid var(--alderp-line);
}

/* Title and status pill */
body.alderp-shell .page-head .title-area .indicator-pill {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 5px;
}

/* Right rail: activity, assigned to, attachments */
body.alderp-shell .form-sidebar,
body.alderp-shell .layout-side-section {
	background: var(--alderp-sidebar);
}
body.alderp-shell .form-sidebar .sidebar-label,
body.alderp-shell .form-sidebar-label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
body.alderp-shell .form-sidebar .avatar-large .avatar-frame {
	background: var(--alderp-amber);
	color: var(--alderp-slate);
	font-weight: 800;
}
body.alderp-shell .new-timeline .timeline-dot {
	width: 7px;
	height: 7px;
	background: var(--alderp-line);
	border: 0;
}
body.alderp-shell .new-timeline .timeline-item:first-child .timeline-dot {
	background: var(--alderp-amber);
}
body.alderp-shell .new-timeline .timeline-content {
	font-size: 13px;
	color: var(--alderp-slate-2);
}

/* ============================================================
   Academic performance dashboard (design screen 08)
   alderp_academics/page/alderp_performance
   ============================================================ */

.alderp-report {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 20px 0;
	padding: 30px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
}
.alderp-report-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 16px;
}
.alderp-report-title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-report-source {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--alderp-slate-3);
}
.alderp-ranges {
	display: flex;
	gap: 8px;
}
.alderp-range {
	padding: 6px 14px;
	border: 1px solid var(--alderp-line);
	border-radius: 999px;
	background: var(--alderp-card);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--alderp-slate-2);
	cursor: pointer;
}
.alderp-range.is-active {
	background: var(--alderp-slate);
	border-color: var(--alderp-slate);
	color: #fff;
	font-weight: 700;
}

.alderp-report-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 20px;
}
@media (max-width: 991px) {
	.alderp-report-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
.alderp-report-side {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.alderp-report-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px;
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
}
.alderp-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}
.alderp-card-title {
	font-size: 14px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-chart-legends {
	display: flex;
	gap: 14px;
}
.alderp-chart-legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--alderp-slate-2);
}
.alderp-chart-legend i {
	width: 9px;
	height: 9px;
	border-radius: 2px;
}
.alderp-chart-legend i.is-current {
	background: var(--alderp-amber);
}
.alderp-chart-legend i.is-previous {
	background: var(--alderp-slate);
}

/* Grouped columns: 220px plot, 26px bars, 26px gap between groups */
.alderp-col-chart {
	display: flex;
	align-items: flex-end;
	gap: 26px;
	height: 250px;
	padding-bottom: 0;
	border-bottom: 1px solid var(--alderp-line);
	overflow-x: auto;
}
.alderp-col-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 1 0 auto;
	height: 100%;
}
.alderp-col-bars {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 220px;
}
.alderp-col-bar {
	width: 26px;
	border-radius: 4px 4px 0 0;
}
.alderp-col-bar.is-current {
	background: var(--alderp-amber);
}
.alderp-col-bar.is-previous {
	background: var(--alderp-slate);
}
.alderp-col-bar.is-empty {
	height: 0;
}
.alderp-col-label {
	max-width: 110px;
	font-size: 12px;
	font-weight: 600;
	color: var(--alderp-slate-2);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.alderp-card-foot {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--alderp-slate-3);
}
.alderp-card-foot-single {
	font-size: 12px;
	color: var(--alderp-slate-3);
}

/* Grade distribution: 14px tracks */
.alderp-dist {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.alderp-dist-row {
	display: grid;
	grid-template-columns: minmax(22px, auto) minmax(0, 1fr) 38px;
	align-items: center;
	gap: 12px;
}
.alderp-dist-grade {
	font-size: 12px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.alderp-dist-track {
	height: 14px;
	border-radius: 3px;
	background: var(--alderp-paper);
	overflow: hidden;
}
.alderp-dist-fill {
	height: 100%;
	background: var(--alderp-slate);
}
.alderp-dist-fill.is-top {
	background: var(--alderp-amber);
}
.alderp-dist-fill.is-fail {
	background: var(--alderp-fail);
}
.alderp-dist-pct {
	font-size: 12px;
	color: var(--alderp-slate-2);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Retention */
.alderp-retention-value {
	font-size: 38px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--alderp-slate);
	font-variant-numeric: tabular-nums;
}
.alderp-spark {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	align-items: end;
	gap: 6px;
	height: 56px;
}
.alderp-spark-bar {
	border-radius: 2px 2px 0 0;
	background: var(--alderp-amber-line);
}
.alderp-spark-bar.is-recent {
	background: var(--alderp-amber);
}

/* ============================================================
   Workspace blocks (Frappe's editor widgets) in the design's card language:
   white 12px cards on 1px Line, neutral counts, rows split by 1px Line, amber
   only on hover — not the framework's rainbow pills and arrow links.
   ============================================================ */

.codex-editor .ce-header,
.widget-group .widget-group-title {
	font-size: 16px !important; /* desktop.scss sizes .h4 headers with a nested rule */
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--alderp-slate) !important;
}

.widget.shortcut-widget-box {
	padding: 14px 16px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	box-shadow: none;
}
.widget.shortcut-widget-box:hover {
	border-color: var(--alderp-amber);
	--icon-stroke: var(--alderp-slate);
}
.widget.shortcut-widget-box .widget-title,
.widget.shortcut-widget-box:hover .widget-label .widget-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--alderp-slate);
}
.widget.shortcut-widget-box .indicator-pill {
	padding: 2px 9px;
	background: var(--alderp-paper) !important; /* each colour class sets its own background */
	color: var(--alderp-slate-2) !important;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.widget.shortcut-widget-box .widget-control svg {
	--icon-stroke: var(--alderp-slate-3);
}

.widget.links-widget-box {
	padding: 18px 20px;
	background: var(--alderp-card);
	border: 1px solid var(--alderp-line);
	border-radius: 12px;
	box-shadow: none;
}
.widget.links-widget-box .widget-title {
	font-size: 14px;
	font-weight: 800;
	color: var(--alderp-slate);
}
.widget.links-widget-box .widget-title svg {
	display: none;
}
.widget.links-widget-box .link-item {
	margin: 0;
	padding: 9px 0;
	border-bottom: 1px solid var(--alderp-line);
	border-radius: 0;
	font-size: 14px;
	color: var(--alderp-slate-2);
}
.widget.links-widget-box .link-item:first-child {
	margin-top: 10px;
}
.widget.links-widget-box .link-item:last-child {
	border-bottom: 0;
}
.widget.links-widget-box .link-item:hover {
	background: transparent;
	color: var(--alderp-amber-deep);
}
.widget.links-widget-box .link-item svg {
	display: none;
}

/* The workspace's own blocks sit under the home, not in place of it. */
.alderp-home + .codex-editor,
.alderp-home ~ .editor-js-container {
	margin-top: 8px;
}

/* ---------- RTL ---------- */
[dir="rtl"] .title-container {
	text-align: right;
}

/* ============================================================
   Desk, second pass: the ERP screens brought up to the portal
   Cards with air, a calmer page head, list rows that read as rows,
   inputs with the portal's radius and focus ring.
   Everything is scoped to body.alderp-shell, so an installation that
   turns the theme off keeps Frappe's own look.
   ============================================================ */

/* The page: room to breathe, and one column of content. */
body.alderp-shell .layout-main-section-wrapper {
	padding-top: 4px;
}

/* The side column clears the page head instead of starting behind it.
   The column's own top sits one head-height below the viewport, and the head is
   pinned one navbar-height below it, so the distance between the column's top
   and the head's bottom is the navbar's height whatever the head measures. */
body.alderp-shell .layout-side-section {
	padding-top: calc(var(--alderp-navbar-height) + 4px);
}
body.alderp-shell .page-head {
	/* The head sticks under the navbar and the form scrolls beneath it, so it
	   has to be opaque. Transparent here — which is what "flat" was taken to
	   mean — let the first fields of a scrolled form show through the title
	   and the breadcrumb, and the two read as one tangle. The page's own
	   colour keeps the flat look without the tangle. */
	background: var(--bg-color);
	border-bottom: 0;
	/* No padding of its own: the head has to stay the height --page-head-height
	   declares, because the side column's clearance above is measured from it. */
}
body.alderp-shell .page-head .page-title .title-text {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--alderp-slate);
}
body.alderp-shell .page-head .page-actions .btn-primary {
	border-radius: 999px;
	padding-inline: 18px;
}

/* Lists: a card per list, rows with air, a quiet header strip. */
body.alderp-shell .layout-main-section > .frappe-list,
body.alderp-shell .layout-main-section > .report-wrapper {
	border: 1px solid var(--alderp-line);
	border-radius: 14px;
	background: var(--alderp-card);
	overflow: hidden;
}
body.alderp-shell .list-row-head {
	background: var(--alderp-sidebar);
	border-bottom: 1px solid var(--alderp-line);
}
body.alderp-shell .list-row-head .list-row-col span,
body.alderp-shell .list-row-head .list-subject span {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
body.alderp-shell .list-row-container {
	border-bottom: 1px solid var(--alderp-line);
}
body.alderp-shell .list-row-container:last-child {
	border-bottom: 0;
}
body.alderp-shell .list-row {
	padding-top: 12px !important;
	padding-bottom: 12px !important;
	min-height: 48px;
}
body.alderp-shell .list-row:hover {
	background: var(--alderp-amber-wash);
}
body.alderp-shell .list-subject .level-item.bold a {
	font-weight: 700;
	color: var(--alderp-slate);
}
body.alderp-shell .list-paging-area {
	border-top: 1px solid var(--alderp-line);
	background: var(--alderp-sidebar);
}

/* Filters and the search bar above a list. */
body.alderp-shell .filter-section .filter-button,
body.alderp-shell .filter-section .filter-x-button,
body.alderp-shell .sort-selector .btn,
body.alderp-shell .list-count {
	border-radius: 999px;
}
body.alderp-shell .standard-filter-section input,
body.alderp-shell .standard-filter-section select {
	border-radius: 999px;
	background: var(--alderp-control);
}

/* Forms: sections as cards, a clearer heading, comfortable fields. */
body.alderp-shell .form-page .form-section,
body.alderp-shell .form-page .form-dashboard {
	margin-bottom: 14px;
	padding: 18px 20px;
	border: 1px solid var(--alderp-line);
	border-radius: 14px;
	background: var(--alderp-card);
}
body.alderp-shell .form-page .form-section.empty-section {
	display: none;
}
body.alderp-shell .form-section .section-head {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--alderp-slate-3);
}
body.alderp-shell .form-control {
	border-radius: 8px;
	background: var(--alderp-control);
}
body.alderp-shell .form-control:hover {
	border-color: var(--alderp-slate-3);
}
body.alderp-shell .frappe-control[data-fieldtype="Section Break"] + .frappe-control {
	margin-top: 4px;
}
body.alderp-shell .form-tabs-wrapper {
	border-bottom: 1px solid var(--alderp-line);
}
body.alderp-shell .form-tabs .nav-link {
	font-weight: 600;
	color: var(--alderp-slate-2);
}
body.alderp-shell .form-tabs .nav-link.active {
	font-weight: 800;
	color: var(--alderp-slate);
	border-bottom-color: var(--alderp-amber);
}

/* Grids (child tables) inside a form. */
body.alderp-shell .grid-heading-row {
	background: var(--alderp-sidebar);
	border-radius: 8px 8px 0 0;
}
body.alderp-shell .grid-row .row-index,
body.alderp-shell .grid-heading-row .row-index {
	color: var(--alderp-slate-3);
}
body.alderp-shell .grid-footer .grid-add-row {
	border-radius: 999px;
}

/* The side panel: assignments, comments, attachments. */
body.alderp-shell .layout-side-section .sidebar-menu,
body.alderp-shell .layout-side-section .form-sidebar {
	padding: 16px;
	border: 1px solid var(--alderp-line);
	border-radius: 14px;
	background: var(--alderp-card);
}

/* Workspace shortcuts and cards: the desk's own home. */
body.alderp-shell .widget.shortcut-widget-box,
body.alderp-shell .widget.links-widget-box,
body.alderp-shell .widget.number-widget-box,
body.alderp-shell .widget.chart-widget-box {
	border: 1px solid var(--alderp-line);
	border-radius: 14px;
	background: var(--alderp-card);
	box-shadow: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
body.alderp-shell .widget.shortcut-widget-box:hover,
body.alderp-shell .widget.links-widget-box:hover {
	border-color: var(--alderp-amber);
	transform: translateY(-1px);
}
body.alderp-shell .widget .widget-head .widget-title {
	font-weight: 800;
	color: var(--alderp-slate);
}

/* Dialogs and the awesome bar, rounded like the rest. */
body.alderp-shell .modal-content {
	border-radius: 16px;
}
body.alderp-shell #navbar-search,
body.alderp-shell .navbar .search-bar input {
	border-radius: 999px;
	background: var(--alderp-control);
}

/* A link back to the portal, sitting in the desk's own navbar. */
body.alderp-shell .navbar .alderp-portal-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-end: 8px;
	padding: 5px 14px;
	border: 1px solid var(--alderp-line);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	color: var(--alderp-slate);
	text-decoration: none;
	white-space: nowrap;
}
body.alderp-shell .navbar .alderp-portal-link:hover {
	border-color: var(--alderp-amber);
	background: var(--alderp-amber-wash);
	text-decoration: none;
}

/* Three language buttons in place of the single Arabic/English chip. */
.alderp-lang-chips { display: flex; gap: 3px; flex: none; }
.alderp-lang-chip[aria-current="true"] {
	color: var(--alderp-slate);
	background: var(--alderp-amber);
	border-color: var(--alderp-amber);
	cursor: default;
}
