/* ---------- Base / school-brandable palette -----------
   --eka-primary / --eka-secondary are set inline in <head> from the
   School Settings colors (see eka_print_color_overrides()). The hex
   values below are just fallbacks used if no custom colors are saved. */
:root {
	--eka-primary: #4a6b3d;
	--eka-secondary: #a97c50;
}

.eka-box {
	max-width: 700px;
	margin: 30px auto;
	background: #fffdf8;
	border: 1px solid #e8dfcd;
	border-radius: 10px;
	padding: 28px;
	box-shadow: 0 4px 14px rgba(60, 40, 10, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.eka-box.eka-box-wide { max-width: 1100px; }
.eka-box h2 { color: var(--eka-primary); margin-top: 0; font-weight: 700; }
.eka-box input[type="text"],
.eka-box input[type="password"],
.eka-box input[type="number"],
.eka-box select {
	width: 100%;
	padding: 11px;
	border: 1px solid #d8cfba;
	border-radius: 6px;
	box-sizing: border-box;
	background: #fff;
	font-size: 15px;
}
.eka-box label { display: block; margin: 14px 0 5px; font-weight: 600; color: #4a4a3f; }
.eka-box input:focus, .eka-box select:focus {
	outline: none;
	border-color: var(--eka-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--eka-primary) 20%, transparent);
}

.eka-btn {
	margin-top: 18px;
	background: var(--eka-primary);
	color: #fff;
	border: none;
	padding: 12px 22px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
}
.eka-btn:hover { filter: brightness(0.9); }
.eka-btn-secondary { background: var(--eka-secondary); margin-left: 10px; }
.eka-btn-secondary:hover { filter: brightness(0.9); }
.eka-btn-danger { background: #a13a30; margin-left: 10px; }
.eka-btn-danger:hover { filter: brightness(0.9); }
.eka-btn-link { background: none; border: none; color: var(--eka-primary); text-decoration: underline; cursor: pointer; font-weight: 600; }
.eka-btn-sm { padding: 6px 12px; font-size: 13px; margin-top: 0; }
.eka-btn-published { background: #3c8c3c; }
.eka-btn-published:hover { filter: brightness(0.9); }
.eka-btn-publish { background: #2271b1; }
.eka-btn-publish:hover { filter: brightness(0.9); }

.eka-msg { min-height: 20px; margin: 10px 0; font-weight: 600; }
.eka-msg.eka-error { color: #b3261e; }
.eka-msg.eka-success { color: #2e7d32; }
.eka-note { font-size: 13px; color: #6b6350; font-style: italic; margin-top: 14px; }

.eka-teacher-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #e8dfcd; flex-wrap: wrap; gap: 8px; }

/* ---------- Admin dashboard tabs ---------- */
.eka-admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; border-bottom: 2px solid #e8dfcd; padding-bottom: 10px; }
.eka-tab-btn {
	background: #f2ede0;
	border: 1px solid #e0d9c8;
	color: #4a4a3f;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
}
.eka-tab-btn.eka-tab-active { background: var(--eka-primary); color: #fff; border-color: var(--eka-primary); }
.eka-tab-panel { display: none; }
.eka-tab-panel.eka-tab-panel-active { display: block; }
.eka-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.eka-inline-form input, .eka-inline-form select { width: auto; flex: 1 1 160px; }
.eka-section-title { color: var(--eka-primary); font-size: 16px; font-weight: 700; margin: 22px 0 10px; }

/* ---------- Tables (score entry + rankings) ---------- */
.eka-score-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; }
.eka-score-table th, .eka-score-table td { border: 1px solid #e0d9c8; padding: 9px; text-align: center; font-size: 14px; }
.eka-score-table th { background: color-mix(in srgb, var(--eka-primary) 12%, #fff); color: var(--eka-primary); font-weight: 700; }
.eka-score-table input[type="number"], .eka-score-table input[type="text"] { width: 90%; padding: 5px; border: 1px solid #d8cfba; border-radius: 4px; }

/* ---------- Result sheet (printed/viewed report card) ---------- */
.eka-result-card .eka-score-table { table-layout: auto; margin-top: 10px; border: 2px solid #000; }
.eka-result-card .eka-score-table th,
.eka-result-card .eka-score-table td { padding: 6px 8px; font-size: 12px; line-height: 1.3; white-space: nowrap; border: 1px solid #000; color: #000; background: #fff; font-weight: 600; }
.eka-result-card .eka-score-table th { background: var(--eka-primary); color: #fff; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; border: 1px solid #000; border-bottom-width: 2px; }
.eka-result-card .eka-score-table td:first-child, .eka-result-card .eka-score-table th:first-child { text-align: left; white-space: nowrap; }
.eka-result-card .eka-score-table td:first-child { font-weight: 800; }
.eka-table-scroll { width: 100%; overflow-x: auto; }

/* ---------- Academic-session banner shown above score-entry sheets ---------- */
.eka-session-banner { margin: 10px 0; padding: 6px 10px; border-left: 4px solid var(--eka-primary); background: #f7f3e8; font-size: 13px; font-weight: 600; color: #000; }

/* ---------- Teacher portal: student-first score sheet ---------- */
.eka-remove-subject { font-size: 12px; text-decoration: none; }
.eka-remove-subject:hover { text-decoration: underline; }
#eka-student-sheet-wrap textarea.eka-student-remark { font-family: inherit; }
.eka-live-positions { margin-top: 16px; }

/* ---------- Social Behaviour (score-entry rating grid) ---------- */
.eka-sb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 14px; margin-top: 8px; }
.eka-sb-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f7f3e8; padding: 6px 10px; border-radius: 6px; }
.eka-sb-field span { font-size: 13px; color: #4a4a3f; font-weight: 600; }
.eka-sb-field select { width: auto; padding: 4px 6px; font-size: 13px; }

/* ---------- Result preview modal (teacher/admin score entry) ---------- */
.eka-preview-overlay {
	position: fixed; inset: 0; background: rgba(20, 15, 5, 0.55);
	display: flex; align-items: flex-start; justify-content: center;
	overflow-y: auto; z-index: 100000; padding: 30px 16px;
}
.eka-preview-panel { background: #fff; border-radius: 10px; max-width: 640px; width: 100%; padding: 20px; position: relative; }
.eka-preview-close {
	position: absolute; top: 10px; right: 14px; background: none; border: none;
	font-size: 22px; line-height: 1; cursor: pointer; color: #6b6350;
}
.eka-preview-note { background: #fff7e6; border: 1px solid #eadfc0; color: #6b5b2a; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }

/* ---------- Report card (official result-sheet look) ----------
   Only --eka-primary / --eka-secondary are used for colour. Everything
   else is pure #000 / #fff so the sheet prints crisply on any printer.
   No gradients, shadows or transparency. */
.eka-result-card {
	border: 3px solid #000;
	border-radius: 4px;
	padding: 18px 20px;
	margin-top: 20px;
	background: #fff;
	color: #000;
	font-family: Arial, Helvetica, sans-serif;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
	color-adjust: exact;
}
.eka-result-card h2, .eka-result-card h3, .eka-result-card h4, .eka-result-card p { font-family: inherit; }

.eka-letterhead { position: relative; text-align: center; border-bottom: 4px solid var(--eka-primary); padding-bottom: 12px; margin-bottom: 14px; }
.eka-letterhead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 3px; background: var(--eka-secondary); }
.eka-logo { display: block; margin: 0 auto 6px; max-width: 76px; max-height: 76px; object-fit: contain; }
.eka-letterhead h2 { margin: 0; color: var(--eka-primary); font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 24px; line-height: 1.2; letter-spacing: 0.6px; text-transform: uppercase; }
.eka-letterhead .eka-address { margin: 4px 0 0; font-size: 12.5px; color: #000; font-weight: 600; }
.eka-letterhead .eka-motto { margin: 4px 0 0; font-size: 12px; font-style: italic; color: #000; font-weight: 700; }

/* Heading blocks: solid colour fill + white text. */
.eka-sheet-title { text-align: center; background: var(--eka-primary); color: #fff; padding: 9px 10px; border: 2px solid #000; border-radius: 3px; margin: 0 0 12px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; }

.eka-student-meta { display: flex; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #000; background: #fff; border: 2px solid #000; border-radius: 3px; }
.eka-student-meta span { flex: 1 1 auto; padding: 7px 12px; text-align: center; border-left: 1px solid #000; color: #000; }
.eka-student-meta span:first-child { border-left: none; flex-grow: 2; text-align: left; }
.eka-student-meta strong { font-weight: 800; text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.3px; }

.eka-summary-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 40px; margin-top: 10px; font-size: 14px; font-weight: 800; background: var(--eka-secondary); color: #fff; padding: 8px 12px; border: 2px solid #000; border-radius: 3px; }

/* ---------- Social Behaviour (compact block on the result sheet) ---------- */
.eka-sb-title { text-align: center; background: var(--eka-primary); color: #fff; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; margin: 14px 0 0; padding: 7px; border: 2px solid #000; border-bottom: none; border-radius: 3px 3px 0 0; }
.eka-sb-table { width: 100%; border-collapse: collapse; border: 2px solid #000; }
.eka-sb-table td { border: 1px solid #000; padding: 5px 7px; font-size: 11.5px; font-weight: 700; text-align: center; color: #000; background: #fff; }
.eka-sb-table td.eka-sb-label { text-align: left; font-weight: 800; color: #fff; background: var(--eka-primary); white-space: nowrap; }

.eka-remarks-section { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.eka-remark-box { flex: 1; min-width: 220px; border: 2px solid #000; border-radius: 3px; padding: 0; background: #fff; overflow: hidden; }
.eka-remark-box h4 { display: block; margin: 0; background: var(--eka-primary); color: #fff; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; padding: 6px 10px; border-bottom: 2px solid #000; border-radius: 0; }
.eka-remark-box p { min-height: 36px; margin: 0; padding: 8px 10px; font-size: 12.5px; color: #000; font-weight: 600; }
.eka-signline { border-top: 1px solid #000; margin: 14px 10px 0; padding: 3px 0 6px; font-size: 11px; font-weight: 700; color: #000; text-align: right; }

.eka-next-term { text-align: center; margin-top: 12px; font-size: 13px; font-weight: 700; color: #000; background: #fff; border: 2px solid #000; border-left: 10px solid var(--eka-secondary); padding: 7px 12px; border-radius: 3px; }

/* Phones: stack the student details, keep the score table scrollable. */
@media screen and (max-width: 600px) {
	.eka-result-card { padding: 12px; }
	.eka-letterhead h2 { font-size: 18px; }
	.eka-sheet-title { font-size: 13px; }
	.eka-student-meta span, .eka-student-meta span:first-child { flex: 1 1 100%; text-align: left; border-left: none; border-top: 1px solid #000; }
	.eka-student-meta span:first-child { border-top: none; }
	.eka-remark-box { min-width: 100%; }
	.eka-sb-table td { font-size: 10.5px; padding: 4px; }
}

.eka-search-input { max-width: 320px; }

.eka-result-actions { margin-top: 22px; text-align: center; }

/* ---------- Print isolation ----------
   The report card is cloned into #eka-print-root (appended directly to
   <body>, outside any theme wrapper) right before printing, and every
   other direct child of <body> is hidden.

   DESIGN RULE: the print sheet uses the very same component classes and
   the very same two theme colours (--eka-primary / --eka-secondary) as the
   on-screen sheet. The block below does not define a second design - it
   (a) scales spacing for A4 and (b) "locks" every coloured element with
   !important + an #id selector. The lock is needed because many themes ship
   print rules such as "* { background: transparent !important; color: #000
   !important }", which otherwise strip the filled heading bars, the white
   heading text and the letterhead rule from the printout. */
#eka-print-root { display: none; }
@page { size: A4; margin: 10mm; }
@media print {
	html, body { background: #fff !important; }
	body > *:not(#eka-print-root) { display: none !important; }
	#eka-print-root {
		display: block !important;
		position: static !important;
		margin: 0 auto;
	}

	/* Force backgrounds/colours to print (also for ::before/::after). */
	#eka-print-root,
	#eka-print-root *,
	#eka-print-root *::before,
	#eka-print-root *::after {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
		box-shadow: none !important;
		text-shadow: none !important;
		filter: none !important;
	}

	/* ----- Frame (same 3px black frame as on screen) ----- */
	#eka-print-root .eka-result-card {
		border: 3px solid #000 !important;
		border-radius: 4px;
		background: #fff !important;
		color: #000 !important;
		padding: 5mm;
		margin: 0;
		width: auto;
	}
	#eka-print-root .eka-table-scroll { overflow: visible; }

	/* ----- COLOUR LOCK: primary-filled headings, white text ----- */
	#eka-print-root .eka-sheet-title,
	#eka-print-root .eka-sb-title,
	#eka-print-root .eka-remark-box h4,
	#eka-print-root .eka-score-table th,
	#eka-print-root .eka-sb-table td.eka-sb-label {
		background: var(--eka-primary) !important;
		background-color: var(--eka-primary) !important;
		color: #fff !important;
	}
	/* ----- COLOUR LOCK: secondary-filled summary bar, white text ----- */
	#eka-print-root .eka-summary-row,
	#eka-print-root .eka-summary-row span,
	#eka-print-root .eka-summary-row strong {
		color: #fff !important;
	}
	#eka-print-root .eka-summary-row {
		background: var(--eka-secondary) !important;
		background-color: var(--eka-secondary) !important;
	}
	/* ----- COLOUR LOCK: letterhead (school name + double rule) ----- */
	#eka-print-root .eka-letterhead h2 { color: var(--eka-primary) !important; }
	#eka-print-root .eka-letterhead { border-bottom: 4px solid var(--eka-primary) !important; }
	#eka-print-root .eka-letterhead::after { background: var(--eka-secondary) !important; background-color: var(--eka-secondary) !important; }
	/* ----- COLOUR LOCK: Next-Term accent bar ----- */
	#eka-print-root .eka-next-term { border: 2px solid #000 !important; border-left: 10px solid var(--eka-secondary) !important; background: #fff !important; }

	/* ----- Pure-black text on white cells ----- */
	#eka-print-root .eka-letterhead .eka-address,
	#eka-print-root .eka-letterhead .eka-motto,
	#eka-print-root .eka-student-meta,
	#eka-print-root .eka-student-meta span,
	#eka-print-root .eka-student-meta strong,
	#eka-print-root .eka-score-table td,
	#eka-print-root .eka-sb-table td:not(.eka-sb-label),
	#eka-print-root .eka-remark-box p,
	#eka-print-root .eka-signline,
	#eka-print-root .eka-next-term,
	#eka-print-root .eka-next-term strong { color: #000 !important; }
	#eka-print-root .eka-student-meta,
	#eka-print-root .eka-score-table td,
	#eka-print-root .eka-sb-table td:not(.eka-sb-label),
	#eka-print-root .eka-remark-box { background: #fff !important; }

	/* ----- Black borders (same weights as on screen) ----- */
	#eka-print-root .eka-sheet-title { border: 2px solid #000 !important; }
	#eka-print-root .eka-sb-title { border: 2px solid #000 !important; border-bottom: none !important; }
	#eka-print-root .eka-summary-row { border: 2px solid #000 !important; }
	#eka-print-root .eka-student-meta { border: 2px solid #000 !important; }
	#eka-print-root .eka-student-meta span { border-left: 1px solid #000 !important; }
	#eka-print-root .eka-student-meta span:first-child { border-left: none !important; }
	#eka-print-root .eka-remark-box { border: 2px solid #000 !important; }
	#eka-print-root .eka-remark-box h4 { border-bottom: 2px solid #000 !important; }
	#eka-print-root .eka-signline { border-top: 1px solid #000 !important; }
	#eka-print-root .eka-score-table { width: 100%; border: 2px solid #000 !important; }
	#eka-print-root .eka-sb-table { border: 2px solid #000 !important; }
	#eka-print-root .eka-score-table th,
	#eka-print-root .eka-score-table td,
	#eka-print-root .eka-sb-table td { border: 1px solid #000 !important; }
	#eka-print-root .eka-score-table th { border-bottom-width: 2px !important; }

	/* ----- A4 sizing only (hierarchy identical to screen) ----- */
	#eka-print-root .eka-letterhead h2 { font-size: 23px; }
	#eka-print-root .eka-letterhead .eka-address { font-size: 12px; }
	#eka-print-root .eka-letterhead .eka-motto { font-size: 11.5px; }
	#eka-print-root .eka-sheet-title { font-size: 14px; padding: 8px 10px; }
	#eka-print-root .eka-student-meta span { font-size: 12px; padding: 6px 10px; }
	#eka-print-root .eka-score-table th { font-size: 10px; padding: 5px 5px; white-space: normal; }
	#eka-print-root .eka-score-table td { font-size: 11px; padding: 5px 6px; }
	#eka-print-root .eka-summary-row { font-size: 13.5px; padding: 7px 12px; }
	#eka-print-root .eka-sb-title { font-size: 13px; padding: 6px; }
	#eka-print-root .eka-sb-table td { font-size: 11px; padding: 4px 6px; }
	#eka-print-root .eka-remarks-section { flex-wrap: nowrap; }
	#eka-print-root .eka-remark-box { min-width: 0; }
	#eka-print-root .eka-remark-box h4 { font-size: 12px; }
	#eka-print-root .eka-remark-box p { font-size: 12px; min-height: 30px; }
	#eka-print-root .eka-next-term { font-size: 12.5px; }

	/* ----- Never split a block; keep headings with their content ----- */
	#eka-print-root .eka-letterhead,
	#eka-print-root .eka-sheet-title,
	#eka-print-root .eka-student-meta,
	#eka-print-root .eka-summary-row,
	#eka-print-root .eka-sb-title,
	#eka-print-root .eka-sb-table,
	#eka-print-root .eka-remarks-section,
	#eka-print-root .eka-remark-box,
	#eka-print-root .eka-next-term,
	#eka-print-root .eka-score-table tr { break-inside: avoid; page-break-inside: avoid; }
	#eka-print-root .eka-sheet-title,
	#eka-print-root .eka-sb-title { break-after: avoid; page-break-after: avoid; }
	#eka-print-root .eka-score-table thead { display: table-header-group; }
}

/* 1.9.6: the student password box shows capitals as they type (matching ignores case anyway). */
#eka_check_pin { text-transform: uppercase; }
#eka_check_pin::placeholder { text-transform: none; }

/* =====================================================================
   1.9.8 - DASHBOARD REDESIGN (Admin dashboard + Teachers' pages)
   ---------------------------------------------------------------------
   Scoped to #eka-teacher-portal so the student result-checking page and
   the printed report card are untouched. Colours are the plugin's
   existing brand: --eka-primary / --eka-secondary (School Settings) and
   the cream neutrals already used above. No new palette.

   LAYOUT RULES (what keeps everything aligned)
   - One spacing scale: 4 / 8 / 12 / 16 / 24 / 32 px.
   - One content width and one gutter: every card, toolbar and table
     starts and ends on the same left/right edges.
   - One control height (40px; 32px "small") for inputs, selects, buttons.
   - Cards: 24px inner padding, 12px radius, 1px border, soft shadow.
   - Tables: left-aligned headings and data, 12px/16px cell padding.
   ===================================================================== */
#eka-teacher-portal {
	--eka-ink: #2f2d26;
	--eka-ink-2: #4a4a3f;
	--eka-muted: #6b6350;
	--eka-line: #e8dfcd;
	--eka-line-2: #d8cfba;
	--eka-surface: #fffdf8;
	--eka-soft: #f7f3e8;
	--eka-soft-2: #f2ede0;
	--eka-tint: color-mix(in srgb, var(--eka-primary) 10%, #fff);
	--eka-primary-ink: color-mix(in srgb, var(--eka-primary) 82%, #000);
	--eka-secondary-ink: color-mix(in srgb, var(--eka-secondary) 68%, #000);
	--eka-radius-card: 12px;
	--eka-radius-ctl: 8px;
	--eka-h: 40px;
	--eka-h-sm: 32px;
	--eka-shadow: 0 1px 2px rgba(60, 40, 10, 0.06), 0 1px 3px rgba(60, 40, 10, 0.04);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--eka-ink);
	-webkit-font-smoothing: antialiased;
}
#eka-teacher-portal *, #eka-teacher-portal *::before, #eka-teacher-portal *::after { box-sizing: border-box; }

/* ---------- App frame (logged-in admin / teacher) ---------- */
#eka-teacher-portal.eka-app {
	max-width: 1240px;
	width: 100%;
	margin: 24px auto;
	padding: 0 16px;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
/* ---------- Login card ---------- */
#eka-teacher-portal.eka-login { max-width: 440px; padding: 32px; border-radius: var(--eka-radius-card); box-shadow: var(--eka-shadow); }
#eka-teacher-portal.eka-login h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; }
#eka-teacher-portal.eka-login .eka-btn { width: 100%; margin-top: 24px; }

/* ---------- Top bar ---------- */
#eka-teacher-portal .eka-topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 64px; padding: 12px 16px; margin: 0 0 24px;
	background: var(--eka-surface); border: 1px solid var(--eka-line); border-radius: var(--eka-radius-card); box-shadow: var(--eka-shadow);
}
#eka-teacher-portal .eka-topbar-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
#eka-teacher-portal .eka-topbar-text { display: flex; flex-direction: column; min-width: 0; }
#eka-teacher-portal .eka-topbar-text strong { font-size: 15px; line-height: 1.3; color: var(--eka-ink); }
#eka-teacher-portal .eka-topbar-text span { font-size: 12px; line-height: 1.4; color: var(--eka-muted); }
#eka-teacher-portal .eka-avatar {
	flex: none; width: 36px; height: 36px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--eka-primary); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
}
#eka-teacher-portal .eka-avatar-sm { width: 28px; height: 28px; font-size: 11px; background: var(--eka-tint); color: var(--eka-primary-ink); }
#eka-teacher-portal .eka-logout {
	flex: none; display: inline-flex; align-items: center; gap: 8px; height: var(--eka-h-sm); padding: 0 12px;
	background: #fff; border: 1px solid var(--eka-line-2); border-radius: var(--eka-radius-ctl);
	color: var(--eka-ink-2); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
#eka-teacher-portal .eka-logout:hover { background: var(--eka-soft); }

/* ---------- Admin shell: sidebar + content ---------- */
#eka-teacher-portal .eka-admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; align-items: start; }
#eka-teacher-portal .eka-admin-main { min-width: 0; }

#eka-teacher-portal .eka-admin-tabs {
	display: block; margin: 0; padding: 12px; border: 1px solid var(--eka-line); border-radius: var(--eka-radius-card);
	background: var(--eka-surface); box-shadow: var(--eka-shadow); position: sticky; top: 16px;
}
#eka-teacher-portal .eka-nav-title {
	margin: 0; padding: 16px 12px 4px; font-size: 11px; font-weight: 700; line-height: 1.4;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--eka-muted);
}
#eka-teacher-portal .eka-nav-title:first-child { padding-top: 4px; }
#eka-teacher-portal .eka-tab-btn {
	display: flex; align-items: center; gap: 12px; width: 100%; height: var(--eka-h); margin: 2px 0; padding: 0 12px;
	background: transparent; border: 0; border-radius: var(--eka-radius-ctl);
	color: var(--eka-ink-2); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
#eka-teacher-portal .eka-tab-btn .eka-ico { flex: none; color: var(--eka-muted); }
#eka-teacher-portal .eka-tab-btn:hover { background: var(--eka-soft); }
#eka-teacher-portal .eka-tab-btn.eka-tab-active {
	background: var(--eka-tint); color: var(--eka-primary-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--eka-primary);
}
#eka-teacher-portal .eka-tab-btn.eka-tab-active .eka-ico { color: var(--eka-primary); }

/* ---------- Overview stat cards ---------- */
#eka-teacher-portal .eka-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
#eka-teacher-portal .eka-stat {
	display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 20px;
	background: var(--eka-surface); border: 1px solid var(--eka-line); border-radius: var(--eka-radius-card); box-shadow: var(--eka-shadow);
}
#eka-teacher-portal .eka-stat-ico {
	flex: none; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
	background: var(--eka-tint); color: var(--eka-primary);
}
#eka-teacher-portal .eka-stat-ico.eka-stat-alt { background: color-mix(in srgb, var(--eka-secondary) 14%, #fff); color: var(--eka-secondary-ink); }
#eka-teacher-portal .eka-stat-label { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--eka-muted); }
#eka-teacher-portal .eka-stat-value { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--eka-ink); font-variant-numeric: tabular-nums; }

/* ---------- Cards / panels ---------- */
#eka-teacher-portal .eka-tab-panel { display: none; }
#eka-teacher-portal .eka-tab-panel.eka-tab-panel-active,
#eka-teacher-portal .eka-panel {
	display: block; padding: 24px; background: var(--eka-surface);
	border: 1px solid var(--eka-line); border-radius: var(--eka-radius-card); box-shadow: var(--eka-shadow);
}
#eka-teacher-portal .eka-page-head {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
	margin: 0 0 24px; padding: 0 0 16px; border-bottom: 1px solid var(--eka-line);
}
#eka-teacher-portal .eka-page-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--eka-ink); }
#eka-teacher-portal .eka-page-desc { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--eka-muted); }

#eka-teacher-portal .eka-section-title {
	margin: 32px 0 12px; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--eka-ink);
}
#eka-teacher-portal .eka-panel-body > .eka-section-title:first-child,
#eka-teacher-portal .eka-panel-body > .eka-msg + .eka-section-title { margin-top: 0; }
#eka-teacher-portal .eka-panel-body p { margin: 0 0 16px; }
#eka-teacher-portal .eka-panel-body p:last-child { margin-bottom: 0; }
#eka-teacher-portal .eka-note { margin: 0 0 16px; font-size: 13px; font-style: normal; line-height: 1.5; color: var(--eka-muted); }
#eka-teacher-portal .description { color: var(--eka-muted); font-size: 13px; }

/* ---------- Messages ---------- */
#eka-teacher-portal .eka-msg {
	min-height: 0; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--eka-line); border-radius: var(--eka-radius-ctl);
	background: var(--eka-soft); color: var(--eka-ink-2); font-size: 13px; font-weight: 600;
}
#eka-teacher-portal .eka-msg:empty { display: none; }
#eka-teacher-portal .eka-msg.eka-success { background: #eef7ee; border-color: #cfe5cf; color: #2e7d32; }
#eka-teacher-portal .eka-msg.eka-error { background: #fdf0ef; border-color: #f2cdc9; color: #b3261e; }

/* ---------- Form controls (one height, one radius, one border) ---------- */
#eka-teacher-portal input[type="text"],
#eka-teacher-portal input[type="password"],
#eka-teacher-portal input[type="number"],
#eka-teacher-portal input[type="search"],
#eka-teacher-portal select {
	width: 100%; height: var(--eka-h); margin: 0; padding: 0 12px;
	background: #fff; border: 1px solid var(--eka-line-2); border-radius: var(--eka-radius-ctl);
	color: var(--eka-ink); font-family: inherit; font-size: 14px; line-height: 1.4;
}
#eka-teacher-portal textarea {
	display: block; width: 100%; margin: 0; padding: 10px 12px; background: #fff;
	border: 1px solid var(--eka-line-2); border-radius: var(--eka-radius-ctl); color: var(--eka-ink);
	font-family: inherit; font-size: 14px; line-height: 1.5;
}
#eka-teacher-portal input:focus, #eka-teacher-portal select:focus, #eka-teacher-portal textarea:focus {
	outline: none; border-color: var(--eka-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--eka-primary) 18%, transparent);
}
#eka-teacher-portal input[type="checkbox"], #eka-teacher-portal input[type="radio"] {
	flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--eka-primary);
}
#eka-teacher-portal label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--eka-muted); }
#eka-teacher-portal label:has(> input[type="checkbox"]) {
	display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; color: var(--eka-ink-2);
}
#eka-teacher-portal .eka-sheet-wrap > form > label,
#eka-teacher-portal .eka-sheet-wrap > label { margin-top: 16px; }

/* Field grids: label above control, equal columns, aligned baselines */
#eka-teacher-portal .eka-field { display: flex; flex-direction: column; min-width: 0; }
#eka-teacher-portal .eka-filter,
#eka-teacher-portal .eka-form-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; margin: 0 0 16px;
}
#eka-teacher-portal .eka-field-full { grid-column: 1 / -1; }
#eka-teacher-portal .eka-filter .eka-btn { width: 100%; }
#eka-teacher-portal .eka-check-group { display: flex; flex-wrap: wrap; gap: 8px; }
#eka-teacher-portal .eka-check {
	display: inline-flex; align-items: center; gap: 8px; height: 36px; margin: 0; padding: 0 12px;
	background: #fff; border: 1px solid var(--eka-line-2); border-radius: var(--eka-radius-ctl);
	font-size: 13px; font-weight: 500; color: var(--eka-ink-2); cursor: pointer;
}
#eka-teacher-portal .eka-check:hover { background: var(--eka-soft); }

/* Inline forms / toolbars: a single aligned row */
#eka-teacher-portal .eka-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; }
#eka-teacher-portal .eka-inline-form input[type="text"],
#eka-teacher-portal .eka-inline-form input[type="number"],
#eka-teacher-portal .eka-inline-form select { width: auto; flex: 1 1 200px; max-width: 320px; }
#eka-teacher-portal .eka-inline-form .eka-btn { flex: none; }
#eka-teacher-portal .eka-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
#eka-teacher-portal .eka-count { font-size: 13px; color: var(--eka-muted); }
#eka-teacher-portal .eka-search-input,
#eka-teacher-portal input.eka-search-input {
	max-width: 360px; padding-left: 38px; background: #fff no-repeat 12px center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6350' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}
#eka-teacher-portal .eka-toolbar .eka-search-input { flex: 1 1 280px; }

/* ---------- Buttons: same height, radius and weight everywhere ---------- */
#eka-teacher-portal .eka-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--eka-h); margin: 0; padding: 0 18px;
	background: var(--eka-primary); color: #fff; border: 1px solid transparent; border-radius: var(--eka-radius-ctl);
	font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
	box-shadow: 0 1px 1px rgba(60, 40, 10, 0.08);
}
#eka-teacher-portal .eka-btn:hover { filter: brightness(0.92); }
#eka-teacher-portal .eka-btn-sm { height: var(--eka-h-sm); padding: 0 12px; font-size: 13px; }
#eka-teacher-portal .eka-btn-secondary {
	margin: 0; background: #fff; color: var(--eka-secondary-ink); border-color: color-mix(in srgb, var(--eka-secondary) 55%, #fff);
}
#eka-teacher-portal .eka-btn-secondary:hover { background: color-mix(in srgb, var(--eka-secondary) 10%, #fff); filter: none; }
#eka-teacher-portal .eka-btn-danger { margin: 0; background: #fff; color: #a13a30; border-color: #e6bdb8; }
#eka-teacher-portal .eka-btn-danger:hover { background: #fdf0ef; filter: none; }
#eka-teacher-portal .eka-btn-published { background: #3c8c3c; color: #fff; }
#eka-teacher-portal .eka-btn-publish { background: #2271b1; color: #fff; }
#eka-teacher-portal .eka-btn-link { background: none; border: 0; padding: 0; box-shadow: none; color: var(--eka-primary-ink); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Tables ---------- */
#eka-teacher-portal .eka-score-table {
	width: 100%; margin: 0 0 16px; border-collapse: separate; border-spacing: 0; overflow: hidden;
	background: #fff; border: 1px solid var(--eka-line); border-radius: 10px;
}
#eka-teacher-portal .eka-score-table th,
#eka-teacher-portal .eka-score-table td {
	padding: 12px 16px; border: 0; border-bottom: 1px solid var(--eka-line);
	text-align: left; vertical-align: middle; font-size: 14px; line-height: 1.4; color: var(--eka-ink);
}
#eka-teacher-portal .eka-score-table th {
	background: var(--eka-soft); color: var(--eka-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
#eka-teacher-portal .eka-score-table tbody tr:last-child td { border-bottom: 0; }
#eka-teacher-portal .eka-score-table tbody tr:hover td { background: color-mix(in srgb, var(--eka-primary) 4%, #fff); }
#eka-teacher-portal .eka-score-table td form { margin: 0; }
#eka-teacher-portal .eka-score-table input[type="text"],
#eka-teacher-portal .eka-score-table input[type="number"],
#eka-teacher-portal .eka-score-table select { height: var(--eka-h-sm); padding: 0 10px; font-size: 13px; text-align: left; }
#eka-teacher-portal .eka-score-table input[type="number"] { width: 96px; font-variant-numeric: tabular-nums; }
#eka-teacher-portal .eka-score-table .eka-total-cell,
#eka-teacher-portal .eka-score-table .eka-grade-cell { font-weight: 600; font-variant-numeric: tabular-nums; }
#eka-teacher-portal .eka-score-table .eka-btn-link { height: auto; }
#eka-teacher-portal .eka-row-form { display: flex; align-items: center; gap: 8px; }
#eka-teacher-portal .eka-row-form input[type="text"] { width: 160px; }
#eka-teacher-portal .eka-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
#eka-teacher-portal .eka-person strong { font-weight: 600; }
#eka-teacher-portal .eka-chips { display: flex; flex-wrap: wrap; gap: 4px; }
#eka-teacher-portal .eka-chip {
	display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
	background: var(--eka-tint); color: var(--eka-primary-ink); font-size: 12px; font-weight: 600; white-space: nowrap;
}
#eka-teacher-portal details { margin-top: 8px; }
#eka-teacher-portal details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--eka-primary-ink); }
#eka-teacher-portal details > form { margin-top: 8px; padding: 12px; background: var(--eka-soft); border: 1px solid var(--eka-line); border-radius: var(--eka-radius-ctl); }
#eka-teacher-portal details > form .eka-btn { margin-top: 8px; }

/* ---------- Score sheet (built by script.js) ---------- */
#eka-teacher-portal .eka-sheet-wrap { margin-top: 24px; }
#eka-teacher-portal .eka-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 16px; color: var(--eka-ink); }
#eka-teacher-portal .eka-session-banner {
	margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--eka-line); border-left: 3px solid var(--eka-primary);
	border-radius: var(--eka-radius-ctl); background: var(--eka-soft); font-size: 13px; font-weight: 500; color: var(--eka-ink-2);
}
#eka-teacher-portal .eka-sheet-wrap .eka-student-sex { max-width: 200px; }
#eka-teacher-portal .eka-add-subject-back { width: auto; min-width: 220px; }
#eka-teacher-portal .eka-sb-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; margin: 0 0 16px; }
#eka-teacher-portal .eka-sb-field { min-height: 40px; padding: 4px 12px; background: var(--eka-soft); border: 1px solid var(--eka-line); border-radius: var(--eka-radius-ctl); }
#eka-teacher-portal .eka-sb-field select { width: 64px; height: var(--eka-h-sm); padding: 0 6px; font-size: 13px; }
#eka-teacher-portal .eka-live-positions { margin-top: 16px; padding: 12px 16px; background: var(--eka-soft); border: 1px solid var(--eka-line); border-radius: var(--eka-radius-ctl); }
#eka-teacher-portal .eka-live-positions:empty { display: none; }
#eka-teacher-portal .eka-live-positions h4 { margin: 0 0 4px; font-size: 13px; color: var(--eka-muted); }
#eka-teacher-portal .eka-live-positions p { margin: 0; }
#eka-teacher-portal .eka-save-student-form > div:last-of-type { margin-top: 16px; }
#eka-teacher-portal .eka-admin-overall {
	display: flex; align-items: center; gap: 32px; flex-wrap: wrap; margin: 16px 0; padding: 16px 20px;
	background: var(--eka-tint); border: 1px solid color-mix(in srgb, var(--eka-primary) 22%, #fff); border-radius: 10px;
}
#eka-teacher-portal .eka-overall-label { display: block; font-size: 12px; font-weight: 600; color: var(--eka-muted); }
#eka-teacher-portal .eka-overall-value { display: block; font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--eka-primary-ink); font-variant-numeric: tabular-nums; }
#eka-teacher-portal .eka-overall-note { margin-left: auto; font-size: 12px; color: var(--eka-muted); }

/* ---------- Responsive ---------- */
@media screen and (max-width: 1024px) {
	#eka-teacher-portal .eka-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 900px) {
	#eka-teacher-portal .eka-admin-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	#eka-teacher-portal .eka-admin-tabs { position: static; display: flex; gap: 4px; padding: 8px; overflow-x: auto; }
	#eka-teacher-portal .eka-nav-title { display: none; }
	#eka-teacher-portal .eka-tab-btn { flex: none; width: auto; margin: 0; white-space: nowrap; }
	#eka-teacher-portal .eka-tab-btn.eka-tab-active { box-shadow: inset 0 -3px 0 var(--eka-primary); }
}
@media screen and (max-width: 640px) {
	#eka-teacher-portal.eka-app { padding: 0 12px; margin: 16px auto; }
	#eka-teacher-portal .eka-stats { grid-template-columns: minmax(0, 1fr); }
	#eka-teacher-portal .eka-tab-panel.eka-tab-panel-active, #eka-teacher-portal .eka-panel { padding: 16px; }
	#eka-teacher-portal .eka-topbar { padding: 12px; }
	#eka-teacher-portal .eka-score-table { display: block; overflow-x: auto; }
	#eka-teacher-portal .eka-overall-note { margin-left: 0; }
}

/* Admin score-entry sheet (built by script.js) */
#eka-teacher-portal #eka-admin-scores-table-wrap { margin-top: 24px; }
#eka-teacher-portal .eka-save-scores-form > div:last-of-type { margin-top: 16px; }
#eka-teacher-portal .eka-sheet-wrap, #eka-teacher-portal #eka-admin-scores-table-wrap { overflow-x: auto; }

/* =====================================================================
   1.9.9 - THEME COLOUR LAYER
   Every colour below is mixed from the two School Settings colours
   (--eka-primary / --eka-secondary), so the whole dashboard re-themes
   itself when the school changes them in the WordPress dashboard.
   Layout, spacing and alignment are unchanged from 1.9.8.
   ===================================================================== */
#eka-teacher-portal {
	--eka-primary-deep: color-mix(in srgb, var(--eka-primary) 72%, #000);
	--eka-canvas: color-mix(in srgb, var(--eka-primary) 6%, #fffdf8);
	--eka-tint-2: color-mix(in srgb, var(--eka-primary) 16%, #fff);
	--eka-sec-tint: color-mix(in srgb, var(--eka-secondary) 14%, #fff);
	--eka-edge: color-mix(in srgb, var(--eka-primary) 18%, #e8dfcd);
	--eka-gradient: linear-gradient(135deg, var(--eka-primary) 0%, var(--eka-primary-deep) 100%);
}

/* Coloured canvas so the white cards stand out */
#eka-teacher-portal.eka-app {
	padding: 24px;
	background: var(--eka-canvas);
	border: 1px solid var(--eka-edge);
	border-radius: 16px;
}

/* Top bar: theme gradient with a secondary-colour accent line */
#eka-teacher-portal .eka-topbar {
	background: var(--eka-gradient); border: 0; border-bottom: 3px solid var(--eka-secondary);
	box-shadow: 0 4px 14px color-mix(in srgb, var(--eka-primary) 30%, transparent);
}
#eka-teacher-portal .eka-topbar-text strong { color: #fff; }
#eka-teacher-portal .eka-topbar-text span { color: rgba(255, 255, 255, 0.82); }
#eka-teacher-portal .eka-topbar .eka-avatar { background: #fff; color: var(--eka-primary-deep); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
#eka-teacher-portal .eka-logout { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
#eka-teacher-portal .eka-logout:hover { background: rgba(255, 255, 255, 0.28); }

/* Cards: tinted edge + soft theme-coloured shadow */
#eka-teacher-portal .eka-tab-panel.eka-tab-panel-active,
#eka-teacher-portal .eka-panel,
#eka-teacher-portal .eka-admin-tabs,
#eka-teacher-portal .eka-stat {
	border-color: var(--eka-edge);
	box-shadow: 0 1px 2px rgba(60, 40, 10, 0.05), 0 4px 14px color-mix(in srgb, var(--eka-primary) 8%, transparent);
}

/* Sidebar */
#eka-teacher-portal .eka-nav-title { color: var(--eka-primary-ink); }
#eka-teacher-portal .eka-nav-title::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 8px; vertical-align: middle; border-radius: 2px; background: var(--eka-secondary); }
#eka-teacher-portal .eka-tab-btn .eka-ico { color: var(--eka-primary); }
#eka-teacher-portal .eka-tab-btn:hover { background: var(--eka-tint); color: var(--eka-primary-ink); }
#eka-teacher-portal .eka-tab-btn.eka-tab-active {
	background: var(--eka-gradient); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--eka-primary) 35%, transparent);
}
#eka-teacher-portal .eka-tab-btn.eka-tab-active .eka-ico { color: #fff; }

/* Page heading strip */
#eka-teacher-portal .eka-page-head {
	padding: 16px 20px; margin: 0 0 24px; border: 1px solid var(--eka-edge); border-left: 4px solid var(--eka-secondary);
	border-radius: 10px; background: linear-gradient(90deg, var(--eka-tint-2) 0%, var(--eka-tint) 55%, #fff 100%);
}
#eka-teacher-portal .eka-page-title { color: var(--eka-primary-deep); }

/* Section titles get the secondary accent bar */
#eka-teacher-portal .eka-section-title {
	padding-left: 10px; border-left: 3px solid var(--eka-secondary); color: var(--eka-primary-deep);
}

/* Tables: theme-coloured header, zebra rows */
#eka-teacher-portal .eka-score-table { border-color: var(--eka-edge); }
#eka-teacher-portal .eka-score-table th {
	background: var(--eka-gradient); color: #fff; border-bottom: 0;
}
#eka-teacher-portal .eka-score-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--eka-primary) 3%, #fff); }
#eka-teacher-portal .eka-score-table tbody tr:hover td { background: var(--eka-tint); }

/* Buttons: primary gets depth; secondary uses the secondary colour fill */
#eka-teacher-portal .eka-btn {
	background: var(--eka-gradient); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 8px color-mix(in srgb, var(--eka-primary) 22%, transparent);
}
#eka-teacher-portal .eka-btn-secondary {
	background: var(--eka-sec-tint); color: var(--eka-secondary-ink); border-color: color-mix(in srgb, var(--eka-secondary) 60%, #fff); box-shadow: none;
}
#eka-teacher-portal .eka-btn-secondary:hover { background: color-mix(in srgb, var(--eka-secondary) 24%, #fff); }
#eka-teacher-portal .eka-btn-danger { background: #fff; box-shadow: none; }
#eka-teacher-portal .eka-btn-published { background: #3c8c3c; }
#eka-teacher-portal .eka-btn-publish { background: #2271b1; }

/* Controls, chips, avatars, notes */
#eka-teacher-portal input[type="text"], #eka-teacher-portal input[type="password"], #eka-teacher-portal input[type="number"], #eka-teacher-portal select, #eka-teacher-portal textarea { border-color: color-mix(in srgb, var(--eka-primary) 22%, #d8cfba); }
#eka-teacher-portal .eka-chip { background: var(--eka-tint-2); color: var(--eka-primary-deep); }
#eka-teacher-portal .eka-chip:nth-child(even) { background: var(--eka-sec-tint); color: var(--eka-secondary-ink); }
#eka-teacher-portal .eka-avatar-sm { background: var(--eka-gradient); color: #fff; }
#eka-teacher-portal .eka-check:hover { background: var(--eka-tint); border-color: var(--eka-primary); }
#eka-teacher-portal .eka-session-banner { background: var(--eka-tint); border-color: var(--eka-edge); border-left-color: var(--eka-secondary); color: var(--eka-primary-deep); }
#eka-teacher-portal .eka-sb-field { background: var(--eka-tint); border-color: var(--eka-edge); }
#eka-teacher-portal .eka-live-positions { background: var(--eka-sec-tint); border-color: color-mix(in srgb, var(--eka-secondary) 35%, #fff); }
#eka-teacher-portal .eka-admin-overall { background: var(--eka-gradient); border: 0; box-shadow: 0 4px 14px color-mix(in srgb, var(--eka-primary) 28%, transparent); }
#eka-teacher-portal .eka-admin-overall .eka-overall-label { color: rgba(255, 255, 255, 0.82); }
#eka-teacher-portal .eka-admin-overall .eka-overall-value { color: #fff; }
#eka-teacher-portal .eka-admin-overall .eka-overall-note { color: rgba(255, 255, 255, 0.82); }
#eka-teacher-portal.eka-login { border-top: 5px solid var(--eka-primary); box-shadow: 0 8px 24px color-mix(in srgb, var(--eka-primary) 14%, transparent); }
#eka-teacher-portal.eka-login h2 { color: var(--eka-primary-deep); }

/* ---------- Dashboard section ---------- */
#eka-teacher-portal .eka-welcome {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 0 0 24px; padding: 24px;
	border-radius: 12px; color: #fff; border-bottom: 3px solid var(--eka-secondary);
	background: linear-gradient(120deg, var(--eka-primary) 0%, color-mix(in srgb, var(--eka-primary) 60%, var(--eka-secondary)) 100%);
	box-shadow: 0 6px 18px color-mix(in srgb, var(--eka-primary) 28%, transparent);
}
#eka-teacher-portal .eka-welcome-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
#eka-teacher-portal .eka-welcome-title { margin: 4px 0; font-size: 24px; line-height: 1.3; font-weight: 700; color: #fff; }
#eka-teacher-portal .eka-welcome-sub { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.9); }
#eka-teacher-portal .eka-welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#eka-teacher-portal .eka-goto {
	display: inline-flex; align-items: center; gap: 8px; height: var(--eka-h); padding: 0 16px; border-radius: var(--eka-radius-ctl);
	background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
#eka-teacher-portal .eka-goto:hover { background: rgba(255, 255, 255, 0.3); }

/* Stat cards: accent bar + solid icon chips in the two theme colours */
#eka-teacher-portal .eka-stat { border-top: 4px solid var(--eka-primary); }
#eka-teacher-portal .eka-stat.eka-stat-alt { border-top-color: var(--eka-secondary); }
#eka-teacher-portal .eka-stat-ico { background: var(--eka-gradient); color: #fff; }
#eka-teacher-portal .eka-stat-ico.eka-stat-alt { background: linear-gradient(135deg, var(--eka-secondary), color-mix(in srgb, var(--eka-secondary) 70%, #000)); color: #fff; }
#eka-teacher-portal .eka-stat-value { color: var(--eka-primary-deep); font-size: 30px; }
#eka-teacher-portal .eka-panel-body > .eka-stats:last-child { margin-bottom: 0; }

@media screen and (max-width: 640px) {
	#eka-teacher-portal.eka-app { padding: 12px; }
	#eka-teacher-portal .eka-tab-btn.eka-tab-active { box-shadow: inset 0 -3px 0 var(--eka-secondary); }
}
