/*
 * Hetvik Solutions — ONE design system (final-list #37, #38, #41, #43, #44).
 * Loaded on every Hetvik admin screen, the portal pages, the student/parent
 * dashboard and the sign-in pop-up, so all of them share the same tokens and
 * components. Locked design: navy #14213D, orange #F97316, light #F8FAFC,
 * 18px rounded cards, soft shadows, touch-friendly (44px targets), light mode.
 */
:root {
	--hs-navy: #14213D; --hs-navy-2: #1E3263; --hs-orange: #F97316; --hs-orange-deep: #EA580C;
	--hs-bg: #F8FAFC; --hs-card: #FFFFFF; --hs-ink: #0F172A; --hs-text-muted: #64748B; --hs-line: #E2E8F0;
	--hs-ok: #16A34A; --hs-warn: #D97706; --hs-err: #DC2626;
	--hs-radius: 18px; --hs-radius-sm: 12px;
	--hs-shadow-soft: 0 1px 2px rgba(15,23,42,.04), 0 8px 28px rgba(15,23,42,.07);
	--hs-shadow-deep: 0 12px 40px rgba(15,23,42,.14);
	--hs-gap: 16px; --hs-touch: 44px;
	--hs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

/* ---- Components (usable anywhere) ---------------------------------- */
.hs-ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--hs-touch); padding: 0 18px; border: 0; border-radius: var(--hs-radius-sm);
	background: var(--hs-orange); color: #fff; font: 600 15px/1 var(--hs-font); text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px rgba(249,115,22,.25); }
.hs-ui-btn:hover, .hs-ui-btn:focus-visible { background: var(--hs-orange-deep); color: #fff; }
.hs-ui-btn:focus-visible, .hs-btn:focus-visible, .hs-cat-card:focus-visible { outline: 3px solid rgba(249,115,22,.45); outline-offset: 2px; }

.hs-ui-modal { width: min(460px, calc(100vw - 24px)); border: 0; border-radius: var(--hs-radius); padding: 28px; box-shadow: var(--hs-shadow-deep); }
.hs-ui-modal::backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.hs-ui-modal-title { margin: 0 0 16px; color: var(--hs-navy); font: 700 22px/1.2 var(--hs-font); }
.hs-ui-modal-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 24px; cursor: pointer; color: var(--hs-text-muted); }
.hs-ui-modal-x:hover { background: var(--hs-bg); }
.hsp-ajax-msg:empty { display: none; }
[aria-busy="true"] { opacity: .65; cursor: progress; }

.hs-empty { padding: 32px 16px; text-align: center; color: var(--hs-text-muted); border: 1.5px dashed var(--hs-line); border-radius: var(--hs-radius); background: #fff; }
.hs-loading { position: relative; min-height: 48px; }
.hs-loading::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 3px solid var(--hs-line); border-top-color: var(--hs-orange); animation: hs-spin .8s linear infinite; }
@keyframes hs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hs-loading::after { animation: none; } .hs-cat-card { transition: none; } }

/* ---- Admin app shell: Hetvik screens feel like one ERP workspace ---- */
body.hs-app #wpcontent { padding-left: 0; background: var(--hs-bg); }
body.hs-app #wpbody-content { padding-bottom: 24px; }
body.hs-app #wpfooter { display: none; }
body.hs-app .hs-wrap { margin: 0; padding: 0 24px 40px; font-family: var(--hs-font); }
body.hs-app .hs-card, body.hs-app .hs-kpi { border-radius: var(--hs-radius); box-shadow: var(--hs-shadow-soft); border: 1px solid #EEF1F6; }
body.hs-app .hs-btn { min-height: 40px; border-radius: var(--hs-radius-sm); }
body.hs-app .wrap > .notice, body.hs-app #wpbody-content > .notice, body.hs-app .hs-wrap .notice { border-radius: var(--hs-radius-sm); box-shadow: var(--hs-shadow-soft); margin: 12px 24px; }
body.hs-app .hs-wrap .notice { margin: 12px 0; }
body.hs-app .hs-table { border-collapse: separate; border-spacing: 0; width: 100%; background: #fff; border-radius: var(--hs-radius-sm); overflow: hidden; }
body.hs-app .hs-table th { background: #F1F5F9; color: #334155; font-weight: 600; text-align: left; }
body.hs-app .hs-table th, body.hs-app .hs-table td { padding: 10px 12px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
body.hs-app .hs-table tr:last-child td { border-bottom: 0; }
body.hs-app input[type=text], body.hs-app input[type=email], body.hs-app input[type=number], body.hs-app input[type=date], body.hs-app input[type=password], body.hs-app select, body.hs-app textarea { border-radius: 10px; border-color: #CBD5E1; min-height: 38px; }
/* Sidebar: the Hetvik categories read as one product */
#adminmenu .toplevel_page_hetvik-solutions .wp-submenu a[href*="page=hs-cat-"] { font-weight: 600; padding-top: 7px; padding-bottom: 7px; }

/* ---- Mobile / tablet: touch-friendly, nothing overflows the page ---- */
@media (max-width: 782px) {
	body.hs-app .hs-wrap { padding: 0 12px 32px; }
	body.hs-app .hs-btn, body.hs-app button, body.hs-app input[type=submit] { min-height: var(--hs-touch); }
	body.hs-app .hs-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
	/* Question / content / quiz lists: the long question text wraps, and the Edit column stays pinned at the right edge so it is always in reach */
	body.hs-app .hs-table .hs-q-snippet { white-space: normal; min-width: 220px; max-width: 70vw; }
	body.hs-app .hs-table.hs-sticky-act th:last-child, body.hs-app .hs-table.hs-sticky-act td:last-child { position: sticky; right: 0; z-index: 2; box-shadow: -8px 0 8px -8px rgba(15, 23, 42, .35); }
	body.hs-app .hs-table.hs-sticky-act td:last-child { background: #fff; }
	body.hs-app .hs-table.hs-sticky-act th:last-child { background: #F1F5F9; }
	body.hs-app .hs-card { padding: 16px; }
	body.hs-app .hs-header h1 { font-size: 22px; }
	body.hs-app form[style*="display:flex"] { flex-direction: column; align-items: stretch !important; }
}

/* Super Admin delete buttons — styled on every screen (the rule lived only in the LMS stylesheet) */
.hs-sa-del { display: inline; margin: 0 0 0 6px; }
.hs-sa-del-btn { border: 1px solid #FECACA; background: #FEF2F2; color: #B91C1C; border-radius: 8px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.hs-sa-del-btn:hover, .hs-sa-del-btn:focus-visible { background: #DC2626; color: #fff; }
.hsx-institutes li { align-items: center; }

/* Search everywhere (hs-live-search.js) */
.hs-qf { display: block; width: 100%; max-width: 360px; margin: 0 0 10px; min-height: 38px; padding: 0 12px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; }
.hs-qf-none { padding: 14px; color: #64748B; text-align: center; }
.hs-ss { display: block; width: 100%; max-width: 360px; margin: 0 0 4px; min-height: 32px; padding: 0 10px; border: 1px dashed #CBD5E1; border-radius: 8px; font: inherit; font-size: 12px; }
