/* EduManage Pro: design tokens, glass surfaces, app shell, dark mode.
   Written with CSS logical properties so Arabic (RTL) mirrors automatically.
   System font stack: OS fonts already cover Latin, Bengali and Arabic with no external requests. */

:root {
	--edmp-bg: #f3f5fb;
	--edmp-surface: rgba(255, 255, 255, .72);
	--edmp-surface-solid: #fff;
	--edmp-border: rgba(15, 23, 42, .09);
	--edmp-text: #0f172a;
	--edmp-muted: #64748b;
	--edmp-primary: #4f46e5;
	--edmp-accent: #06b6d4;
	--edmp-grad: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
	--edmp-radius: 16px;
	--edmp-shadow: 0 12px 32px -14px rgba(15, 23, 42, .28);
	--edmp-sidebar-w: 264px;
	--edmp-sidebar-w-collapsed: 76px;
	--edmp-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", "Noto Naskh Arabic", "Segoe UI Historic", Tahoma, Arial, sans-serif;
	color-scheme: light;
}

[data-theme="dark"] {
	--edmp-bg: #0b1020;
	--edmp-surface: rgba(24, 31, 56, .72);
	--edmp-surface-solid: #151b33;
	--edmp-border: rgba(148, 163, 184, .16);
	--edmp-text: #e6eaf6;
	--edmp-muted: #94a3b8;
	--edmp-primary: #818cf8;
	--edmp-accent: #22d3ee;
	--edmp-shadow: 0 12px 32px -14px rgba(0, 0, 0, .6);
	color-scheme: dark;
}

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

body {
	margin: 0;
	background: var(--edmp-bg);
	color: var(--edmp-text);
	font-family: var(--edmp-font);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--edmp-primary); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen-reader-text:focus { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; width: auto; height: auto; clip: auto; background: var(--edmp-surface-solid); padding: 8px 14px; border-radius: 8px; z-index: 100000; }

:focus-visible { outline: 3px solid var(--edmp-accent); outline-offset: 2px; border-radius: 6px; }

/* ---- Glass ---- */
.glass {
	background: var(--edmp-surface);
	border: 1px solid var(--edmp-border);
	box-shadow: var(--edmp-shadow);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
	.glass { -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
}

/* ---- Buttons ---- */
.edmp-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 18px; border: 0; border-radius: 999px;
	background: var(--edmp-grad); color: #fff; font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.edmp-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px var(--edmp-primary); filter: brightness(1.06); color: #fff; }
.edmp-btn--ghost { background: transparent; color: var(--edmp-text); border: 1px solid var(--edmp-border); }
.edmp-btn--ghost:hover { color: var(--edmp-text); box-shadow: none; background: var(--edmp-surface); }

.edmp-icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px;
	border: 1px solid var(--edmp-border); border-radius: 12px;
	background: var(--edmp-surface); color: var(--edmp-text); cursor: pointer;
	transition: background .18s ease, transform .18s ease;
}
.edmp-icon-btn:hover { transform: translateY(-1px); }

/* Pure-CSS icons (no icon font request for these three) */
.edmp-icon { width: 20px; height: 20px; display: block; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.edmp-icon--moon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
[data-theme="dark"] .edmp-icon--moon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Cpath d='M12 1.5v3M12 19.5v3M1.5 12h3M19.5 12h3M4.6 4.6l2.1 2.1M17.3 17.3l2.1 2.1M4.6 19.4l2.1-2.1M17.3 6.7l2.1-2.1' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.edmp-icon--menu { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18v2H3zM3 11h18v2H3zM3 16h18v2H3z'/%3E%3C/svg%3E"); }

/* ---- Public site ---- */
.edmp-container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.edmp-header { position: sticky; inset-block-start: 0; z-index: 50; background: var(--edmp-surface); border-block-end: 1px solid var(--edmp-border); }
@supports (backdrop-filter: blur(1px)) { .edmp-header { backdrop-filter: blur(16px); } }
.edmp-header__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.edmp-brand__name { font-weight: 800; font-size: 1.25rem; text-decoration: none; background: var(--edmp-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.edmp-primary-nav { flex: 1; }
.edmp-header__tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.edmp-menu { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.edmp-menu a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--edmp-text); text-decoration: none; transition: background .18s ease; }
.edmp-menu a:hover, .edmp-menu .current-menu-item > a { background: var(--edmp-surface-solid); }
.edmp-lang { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }

.edmp-main { min-height: 60vh; }
.edmp-content { padding-block: 40px; }
.edmp-page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin-block: 0 12px; }
.edmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.edmp-card { background: var(--edmp-surface-solid); border: 1px solid var(--edmp-border); border-radius: var(--edmp-radius); overflow: hidden; box-shadow: var(--edmp-shadow); transition: transform .22s ease; }
.edmp-card:hover { transform: translateY(-4px); }
.edmp-card__body { padding: 18px 20px 22px; }
.edmp-card__title { font-size: 1.15rem; margin-block: 0 4px; }
.edmp-card__title a { color: inherit; text-decoration: none; }
.edmp-card__meta { color: var(--edmp-muted); font-size: .85rem; margin: 0; }
.edmp-article__media img { border-radius: var(--edmp-radius); }
.edmp-search { display: flex; gap: 8px; }
.edmp-search input { flex: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--edmp-border); background: var(--edmp-surface-solid); color: var(--edmp-text); font: inherit; }
.edmp-404 { text-align: center; }

.edmp-footer { border-block-start: 1px solid var(--edmp-border); padding-block: 32px; color: var(--edmp-muted); }
.edmp-footer__tag { margin-inline-start: 12px; opacity: .8; }

/* ---- App shell (dashboard template) ---- */
.edmp-shell { display: grid; grid-template-columns: var(--edmp-sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
[data-sidebar="collapsed"] .edmp-shell { grid-template-columns: var(--edmp-sidebar-w-collapsed) minmax(0, 1fr); }

.edmp-sidebar {
	position: sticky; inset-block-start: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
	background: var(--edmp-surface-solid); border-inline-end: 1px solid var(--edmp-border);
	padding: 20px 14px;
}
.edmp-sidebar__brand { padding: 4px 10px 20px; white-space: nowrap; }
.edmp-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.edmp-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--edmp-text); text-decoration: none; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.edmp-nav a:hover { background: var(--edmp-bg); }
.edmp-nav .current-menu-item > a, .edmp-nav a[aria-current="page"] { background: var(--edmp-grad); color: #fff; }
.edmp-nav .dashicons { flex: none; }

[data-sidebar="collapsed"] .edmp-nav__label,
[data-sidebar="collapsed"] .edmp-sidebar__brand .edmp-brand__name,
[data-sidebar="collapsed"] .edmp-sidebar__brand .custom-logo-link { display: none; }
[data-sidebar="collapsed"] .edmp-nav a { justify-content: center; }

.edmp-shell__main { min-width: 0; display: flex; flex-direction: column; }
.edmp-topbar {
	position: sticky; inset-block-start: 12px; z-index: 30;
	display: flex; align-items: center; gap: 14px;
	margin: 12px 20px 0; padding: 10px 14px; border-radius: var(--edmp-radius);
}
.edmp-topbar__title { font-size: 1.15rem; margin: 0; flex: 1; }
.edmp-topbar__tools { display: flex; align-items: center; gap: 10px; }
.edmp-user { display: inline-flex; align-items: center; gap: 8px; }
.edmp-user img { border-radius: 50%; }
.edmp-shell__content { padding: 20px; }
.edmp-scrim { display: none; }

/* Stat cards from the plugin shortcode, upgraded to glass + gradient accent */
.edmp-app .edm-stat { position: relative; overflow: hidden; background: var(--edmp-surface); border: 1px solid var(--edmp-border); border-radius: var(--edmp-radius); box-shadow: var(--edmp-shadow); padding: 18px 20px; transition: transform .22s ease, box-shadow .22s ease; }
.edmp-app .edm-stat::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 4px; background: var(--edmp-grad); }
.edmp-app .edm-stat:hover { transform: translateY(-4px); }
.edmp-app .edm-stat__label { color: var(--edmp-muted); opacity: 1; }
.edmp-app .edm-stat__value { font-size: 2rem; }
.edmp-app .edm-panel { background: var(--edmp-surface); border: 1px solid var(--edmp-border); border-radius: var(--edmp-radius); box-shadow: var(--edmp-shadow); }
.edmp-app .edm-table th { color: var(--edmp-muted); font-weight: 600; font-size: .85rem; }
.edmp-app .edm-table td, .edmp-app .edm-table th { border-color: var(--edmp-border); }

/* ---- Responsive: off-canvas sidebar below 900px ---- */
@media (max-width: 900px) {
	.edmp-shell, [data-sidebar="collapsed"] .edmp-shell { grid-template-columns: minmax(0, 1fr); }
	.edmp-sidebar { position: fixed; inset-block: 0; inset-inline-start: calc(var(--edmp-sidebar-w) * -1 - 8px); width: var(--edmp-sidebar-w); z-index: 80; transition: inset-inline-start .25s ease; }
	.edmp-sidebar-open .edmp-sidebar { inset-inline-start: 0; }
	[data-sidebar="collapsed"] .edmp-nav__label { display: inline; }
	[data-sidebar="collapsed"] .edmp-nav a { justify-content: flex-start; }
	[data-sidebar="collapsed"] .edmp-sidebar__brand .edmp-brand__name, [data-sidebar="collapsed"] .edmp-sidebar__brand .custom-logo-link { display: inline; }
	.edmp-scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .5); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 70; }
	.edmp-sidebar-open .edmp-scrim { opacity: 1; pointer-events: auto; }
	.edmp-topbar { margin: 8px 12px 0; }
	.edmp-user__name { display: none; }
	.edmp-shell__content { padding: 12px; }
	.edmp-primary-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
