/* VidhaiX theme for the Frappe CRM (/crm) and LMS (/lms) apps.
 *
 * Both apps are built on frappe-ui, whose colours come from semantic CSS variables
 * (--surface-*, --ink-*, --outline-*). Re-mapping those variables re-skins every
 * screen without touching the apps' markup: neutrals become VidhaiX slate, solid
 * buttons VidhaiX navy, and the blue scale the VidhaiX brand blue. Matches the
 * student portal and Operations (vidhaix-portal.css).
 *
 * Light theme only (`:root:not([data-theme="dark"])` also outranks frappe-ui's
 * `:root`), so CRM's dark mode keeps frappe-ui's own palette.
 * Loaded by www/_lms.html and injected into /crm by vidhaix.ops.inject_crm_chrome.
 */

:root:not([data-theme="dark"]) {
	/* Neutral surfaces: cool slate instead of pure grey */
	--surface-base: #ffffff;
	--surface-gray-1: #f8fafc;
	--surface-gray-2: #f1f4f8;
	--surface-gray-3: #e8ecf2;
	--surface-gray-4: #dce2ea;
	--surface-gray-5: #c3cbd7;
	--surface-gray-6: #94a3b8;
	--surface-gray-7: #64748b;
	/* gray-8..10 back solid buttons (bg 10, hover 9, active 8): VidhaiX navy */
	--surface-gray-8: #23366e;
	--surface-gray-9: #1a2a5c;
	--surface-gray-10: #0f1b3d;
	--surface-sidebar: #f6f8fb;
	--surface-alpha-sidebar: #f6f8fb;

	/* Brand blue scale (solid blue buttons, links, selection, progress) */
	--surface-blue-1: #eff5ff;
	--surface-blue-2: #e1ecfe;
	--surface-blue-3: #c9dcfd;
	--surface-blue-4: #a4c3fb;
	--surface-blue-5: #6f9ff6;
	--surface-blue-6: #2563eb;
	--surface-blue-7: #1d4ed8;
	--surface-blue-8: #1e40af;
	--surface-blue-9: #1e3a8a;
	--surface-blue-10: #172554;

	/* Text */
	--ink-gray-1: #f1f5f9;
	--ink-gray-2: #e2e8f0;
	--ink-gray-3: #cbd5e1;
	--ink-gray-4: #94a3b8;
	--ink-gray-5: #64748b;
	--ink-gray-6: #475569;
	--ink-gray-7: #334155;
	--ink-gray-8: #1e293b;
	--ink-gray-9: #0f172a;
	--ink-blue-2: #e1ecfe;
	--ink-blue-3: #c9dcfd;
	--ink-blue-4: #6f9ff6;
	--ink-blue-5: #2563eb;
	--ink-blue-6: #1d4ed8;
	--ink-blue-7: #1e40af;
	--ink-blue-8: #1e3a8a;
	--ink-blue-9: #1e3a8a;
	--ink-blue-10: #172554;
	--ink-blue-link: #2563eb;

	/* Borders */
	--outline-gray-1: #eef1f5;
	--outline-gray-2: #e2e7ee;
	--outline-gray-3: #d3dae4;
	--outline-gray-4: #b3bfcd;
	--outline-gray-5: #8794a8;
	--outline-blue-1: #c9dcfd;
	--outline-blue-2: #a4c3fb;
	--outline-blue-3: #6f9ff6;
	--outline-blue-4: #2563eb;
	--outline-blue-5: #1d4ed8;
	--focus-outline-blue: 2px solid rgba(37, 99, 235, 0.45);
}

/* Headings in the brand display face; body text stays frappe-ui's Inter. */
#app :is(h1, h2) {
	font-family: 'Plus Jakarta Sans', InterVar, Inter, ui-sans-serif, system-ui, sans-serif;
	letter-spacing: -0.01em;
}

/* Calmer chrome: thin scrollbars and brand text selection. */
#app * {
	scrollbar-width: thin;
	scrollbar-color: #c3cbd7 transparent;
}
::selection {
	background: #c9dcfd;
}

/* ==========================================================================
   Operations frame: the CRM and LMS sidebars styled like /admin.
   frappe-ui's Sidebar root is `.bg-surface-sidebar.flex-shrink-0.flex-col`
   and every row is a SidebarItem (`group/sidebar-item`).
   ========================================================================== */
:root:not([data-theme="dark"]) .bg-surface-sidebar.flex-shrink-0.flex-col {
	background: #ffffff !important;
	border-right: 1px solid #e7e9ee !important;
}
:root:not([data-theme="dark"]) .bg-surface-sidebar.flex-shrink-0.flex-col > .flex.h-full.flex-col {
	padding: 14px 12px !important;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"] {
	height: 38px !important;
	border-radius: 10px !important;
	color: #334155;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"] .text-sm {
	font-size: 14.5px !important;
	font-weight: 500;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"]:hover {
	background: #f3f4f7 !important;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"].bg-surface-elevation-3 {
	background: #eef0f4 !important;
	box-shadow: none !important;
	color: #0f172a !important;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"].bg-surface-elevation-3 .text-sm {
	font-weight: 600;
}
:root:not([data-theme="dark"]) [class*="group/sidebar-item"].bg-surface-elevation-3 svg {
	color: #2563eb !important;
}
/* Page body behind lists and cards, as in Operations */
:root:not([data-theme="dark"]) #app main {
	background: #ffffff;
}
