/* ========================================================================
   PAGE SHELL — menu, hero, how-it-works, FAQ, help note, footer
   Hardcoded to the teachBD brand palette so this looks right regardless
   of whatever WordPress theme is active on the page.
======================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

.gp-wrap {
	--bg: #f5f5f6; --bg-alt: #ece8fb; --surface: #ffffff; --border: #d3d7dd;
	--muted: #6f6e85; --ink: #100e29; --text: #46455c;
	--primary: #3a2d97; --primary-light: #5b46d6; --primary-bg: #ece8fb; --glow: #8b6fe8;
	font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg);
	line-height: 1.65; width: 100%; box-sizing: border-box; overflow-x: clip;
}
.gp-wrap * { box-sizing: border-box; }
.gp-wrap img { max-width: 100%; display: block; }

.gp-menu {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 32px; background: rgba(245,245,246,0.95); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.gp-menu-logo { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.gp-menu-links { display: flex; gap: 4px; align-items: center; }
.gp-menu-links a { font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; padding: 9px 16px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.gp-menu-links a:hover { color: var(--primary); background: var(--primary-bg); }
.gp-menu-cta { display: inline-flex; align-items: center; gap: 7px; background: var(--primary); color: #fff; font-weight: 600; font-size: 13.5px; padding: 10px 20px; text-decoration: none; border-radius: 999px; transition: background 0.2s, transform 0.15s; flex-shrink: 0; }
.gp-menu-cta:hover { background: var(--primary-light); transform: translateY(-1px); }
@media (max-width: 700px) { .gp-menu { padding: 14px 18px; } .gp-menu-links { display: none; } }

.gp-hero { position: relative; background: radial-gradient(120% 100% at 50% -10%, var(--glow) 0%, #b6a1ef 22%, #e4defa 46%, var(--bg) 68%); padding: 64px 24px 44px; text-align: center; }
.gp-hero-eyebrow { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); opacity: 0.6; margin: 0 0 14px; }
.gp-hero h1 { font-family: 'Poppins', sans-serif; font-size: clamp(30px,4.4vw,44px); font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0 0 14px; letter-spacing: -0.5px; }
.gp-hero-sub { font-size: 15.5px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.gp-hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto 0; max-width: 640px; }
.gp-chip { font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--primary); background: rgba(255,255,255,0.75); border: 1px solid rgba(58,45,151,0.18); padding: 6px 14px; border-radius: 999px; }

.gp-portal-mount { max-width: 1100px; margin: -20px auto 0; padding: 0 24px 20px; position: relative; z-index: 2; }

.gp-info-strip { max-width: 1100px; margin: 40px auto 0; padding: 0 24px; text-align: center; }
.gp-info-strip h3 { font-family: 'Poppins', sans-serif; font-size: 20px; color: var(--ink); margin-bottom: 26px; }
.gp-info-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
@media (max-width: 760px) { .gp-info-steps { grid-template-columns: 1fr; } }
.gp-info-step { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.gp-info-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.gp-info-step h4 { font-family: 'Poppins', sans-serif; font-size: 15.5px; color: var(--ink); margin: 0 0 6px; }
.gp-info-step p { font-size: 13.5px; color: var(--muted); margin: 0; }

.gp-faq { max-width: 760px; margin: 48px auto 0; padding: 0 24px; }
.gp-faq h3 { font-family: 'Poppins', sans-serif; font-size: 20px; color: var(--ink); margin-bottom: 18px; text-align: center; }
.gp-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.gp-faq-item summary { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); padding: 14px 0; cursor: pointer; }
.gp-faq-item p { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }

.gp-help-note { max-width: 460px; margin: 44px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); font-family: 'Inter', sans-serif; padding: 0 24px; }
.gp-help-note b { color: var(--ink); font-weight: 600; }
.gp-footer-note { text-align: center; padding: 26px 20px 20px; margin-top: 20px; font-size: 11.5px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--border); font-family: 'Inter', sans-serif; }

/* ========================================================================
   PORTAL BOX (login + dashboard) — restyled to match the brand, on top of
   the plugin's own dynamic curriculum colours (--sgp-primary etc., set
   inline per Cambridge/Edexcel student — left untouched here).
======================================================================== */
.sgp-portal, .sgp-portal * { font-family: 'Inter', sans-serif; box-sizing: border-box; }

/* v3.30.0 — "white space on both sides" fix. This is almost always
   the WordPress theme's own content-area max-width/padding wrapping
   around the shortcode output, not something this plugin's own CSS
   was ever adding — .sgp-portal itself had no width rule at all. This
   full-bleed technique breaks the portal out of whatever container the
   theme puts around it, so it genuinely spans the full viewport width
   no matter which theme is active. */
/* v3.37.0 CRITICAL FIX — the v3.30.0 full-bleed attempt (width:100vw
   + left:50%/margin-left:-50vw) assumed the theme's parent container
   is simply centered with equal left/right gutters. That assumption
   was wrong for this theme's actual page template, and the result was
   exactly the opposite of the fix's intent: a large dead zone on one
   side and real content pushed off the other edge of the screen
   entirely (confirmed by screenshot). Reverted to a safe, theme-
   agnostic rule instead — this fills whatever width the theme's own
   content area actually provides, with no assumptions about that
   area's position on the page, so it can't produce this kind of
   regression on any theme. It won't force the portal past a narrow
   theme content column the way the old rule tried to (and badly
   failed to) do; that specific goal needs a theme-level full-width
   page template, not plugin CSS guessing at an unknown parent
   structure. */
.sgp-portal {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	padding-left: max(12px, env(safe-area-inset-left));
	padding-right: max(12px, env(safe-area-inset-right));
}
@media (min-width: 1024px) {
	.sgp-portal { padding-left: 24px; padding-right: 24px; }
}

.sgp-login-wrap { display: flex; justify-content: center; padding: 0; }
.sgp-login-card {
	width: 100%; max-width: 440px; background: #fff; border-radius: 22px; padding: 40px 36px;
	box-shadow: 0 24px 60px rgba(16,14,41,0.14); border: 1px solid #d3d7dd;
}
.sgp-login-header p { color: #6f6e85; margin-bottom: 26px; font-size: 14.5px; text-align: center; }
#sgp-login-form label { display: block; font-weight: 600; margin: 14px 0 6px; color: #100e29; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
#sgp-login-form input { width: 100%; padding: 12px 14px; border: 1.5px solid #d3d7dd; border-radius: 10px; font-size: 15px; line-height: 1.5; transition: border-color .15s; }
#sgp-login-form input:focus { outline: none; border-color: #3a2d97; }
.sgp-btn { display: inline-block; border: none; cursor: pointer; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; text-align: center; transition: transform .1s, opacity .15s, background .2s; }
.sgp-btn:hover { opacity: .96; transform: translateY(-1px); }
.sgp-btn-primary { width: 100%; margin-top: 22px; background: #3a2d97; color: #fff; box-shadow: 0 6px 16px rgba(58,45,151,0.3); }
.sgp-btn-primary:hover { background: #5b46d6; opacity: 1; }
/* v3.13.1 — .sgp-btn-ghost (white text on near-transparent white) is
   ONLY legible on a dark background (the purple dashboard header, e.g.
   "Log Out"). It was mistakenly reused for delete/remove/cancel buttons
   sitting on white cards throughout the Tutor Portal — white-on-white,
   invisible until hover/focus happened to reveal it. Those all now use
   one of the two classes below instead; .sgp-btn-ghost itself is
   untouched so the header still looks right. */
.sgp-btn-ghost { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.sgp-btn-outline { background: #fff; color: var(--sgp-primary, #3a2d97); border: 1.5px solid var(--sgp-primary, #3a2d97); }
.sgp-btn-outline:hover { background: var(--sgp-light, #ece8fb); opacity: 1; }
.sgp-btn-danger-outline { background: #fff; color: #a13a2f; border: 1.5px solid #d99089; }
.sgp-btn-danger-outline:hover { background: #fdecea; opacity: 1; }
.sgp-error { margin-top: 14px; background: #fdecea; color: #a13a2f; padding: 10px 14px; border-radius: 10px; font-size: 13px; }

/* ---------- Dashboard shell ---------- */
.sgp-dashboard { background: linear-gradient(160deg, var(--sgp-light, #eef3f8) 0%, #ffffff 120%); border-radius: 22px; padding: 28px; }
.sgp-dash-header {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
	background: linear-gradient(135deg, var(--sgp-secondary), var(--sgp-primary));
	color: #fff; padding: 20px 24px; border-radius: 16px; margin-bottom: 20px;
	box-shadow: 0 10px 28px rgba(0,0,0,0.14);
}
.sgp-student-block { display: flex; align-items: center; gap: 16px; }
.sgp-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--sgp-accent); color: #1e2530; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.sgp-dash-header h2 { margin: 0 0 4px; font-size: 20px; font-family: 'Poppins', sans-serif; }
.sgp-badge { background: var(--sgp-accent); color: #1e2530; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-right: 8px; }
.sgp-sub { font-size: 13px; opacity: .9; }

/* ---------- Tabs ---------- */
.sgp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

/* =====================================================================
 * v3.15.0 — item 5/6: desktop/tablet sidebar layout. Pure CSS — the
 * three elements below are already direct siblings of .sgp-dashboard in
 * the actual markup, so CSS Grid named areas can lay them out as a
 * sidebar + content pane with ZERO markup changes. Below 1024px,
 * everything reverts to the existing stacked pill-row/dropdown layout,
 * completely unaffected.
 * ===================================================================== */
@media (min-width: 1024px) {
	.sgp-dashboard {
		display: grid;
		grid-template-columns: 230px 1fr;
		grid-template-areas: "banner banner" "header header" "tabs content";
		gap: 28px;
		align-items: start;
	}
	.sgp-pwa-banner { grid-area: banner; }
	.sgp-dash-header { grid-area: header; }
	.sgp-tabs {
		grid-area: tabs; flex-direction: column; flex-wrap: nowrap;
		position: sticky; top: 20px; gap: 4px;
	}
	.sgp-tab-btn {
		display: flex; align-items: center; gap: 8px;
		justify-content: flex-start; text-align: left; width: 100%;
		border-radius: 10px; padding: 12px 16px;
	}
	.sgp-tab-content { grid-area: content; min-width: 0; }
	.sgp-tabs-mobile-select-wrap { display: none !important; }
}
.sgp-tab-btn { background: #fff; border: 1.5px solid #d3d7dd; padding: 10px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 13.5px; color: #444; transition: all .15s; }
.sgp-tab-btn:hover { border-color: var(--sgp-secondary); transform: translateY(-1px); }
.sgp-tab-btn.active { background: var(--sgp-primary); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(0,0,0,0.16); }

/* ---------- Content cards ---------- */
.sgp-tab-content { background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 12px 30px rgba(16,14,41,0.06); min-height: 220px; }
.sgp-loading { text-align: center; color: #888; padding: 60px 0; }
.sgp-subhead { margin: 26px 0 10px; font-size: 15px; color: #333; }

/* v3.12.0 — recent daily attendance list */
.sgp-daily-att-guardian-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.sgp-daily-att-guardian-row { display: flex; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid #f0f0f0; font-size: 13.5px; }

/* v3.19.0 — Attendance calendar view, the guardian portal's most-used
   monitoring tool. Deliberately given its own distinct card treatment
   (rather than blending into the generic tab styling) since this is
   meant to be immediately recognizable and easy to scan at a glance. */
.sgp-att-calendar { background: #fff; border-radius: 18px; padding: 20px; margin: 4px 0 24px; box-shadow: 0 6px 20px rgba(16,14,41,0.08); }
.sgp-att-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sgp-att-cal-header h4 { margin: 0; font-family: 'Poppins', sans-serif; font-size: 16px; color: #100e29; }
.sgp-att-cal-nav {
	background: var(--sgp-light, #ece8fb); border: none; width: 36px; height: 36px; border-radius: 50%;
	font-size: 18px; font-weight: 700; color: var(--sgp-primary, #3a2d97); cursor: pointer;
}
.sgp-att-cal-nav:hover { background: var(--sgp-primary, #3a2d97); color: #fff; }
.sgp-att-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sgp-att-cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; padding-bottom: 6px; }
.sgp-att-cal-cell {
	aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px;
	font-size: 13px; font-weight: 700; color: #444; background: #f5f6f8;
}
.sgp-att-cal-empty { background: transparent; }
.sgp-att-cal-present { background: #d7f0e0; color: #1e7a3c; }
.sgp-att-cal-late { background: #ffe9c2; color: #8a6100; }
.sgp-att-cal-absent { background: #f8d4cf; color: #a13a2f; }
.sgp-att-cal-noclass { background: #f5f6f8; color: #ccc; }
.sgp-att-cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 12px; color: #555; }
.sgp-att-cal-legend span { display: flex; align-items: center; gap: 6px; }
.sgp-att-cal-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
@media (max-width: 480px) {
	.sgp-att-calendar { padding: 14px; }
	.sgp-att-cal-grid { gap: 4px; }
	.sgp-att-cal-cell { font-size: 11px; border-radius: 8px; }
}
.sgp-daily-status-present { color: #1e7a3c; font-weight: 700; }
.sgp-daily-status-absent { color: #a13a2f; font-weight: 700; }
.sgp-daily-status-late { color: #8a6100; font-weight: 700; }
.sgp-summary-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sgp-summary-box { flex: 1; min-width: 160px; background: var(--sgp-light); border-left: 5px solid var(--sgp-primary); border-radius: 12px; padding: 16px 18px; box-shadow: 0 3px 10px rgba(16,14,41,0.06); }
.sgp-summary-box .sgp-sbox-num { font-size: 26px; font-weight: 700; color: var(--sgp-primary); display: block; }
.sgp-summary-box .sgp-sbox-label { font-size: 12px; color: #4a4a5a; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sgp-chart-wrap { position: relative; height: 320px; margin-bottom: 26px; }
.sgp-data-table { width: 100%; border-collapse: collapse; font-size: 14px; box-shadow: 0 3px 12px rgba(16,14,41,0.06); border-radius: 10px; overflow: hidden; }
.sgp-data-table th { background: var(--sgp-primary); color: #fff; text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.sgp-data-table th:first-child { border-top-left-radius: 8px; }
.sgp-data-table th:last-child { border-top-right-radius: 8px; }
.sgp-data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; }
.sgp-data-table tr:hover td { background: var(--sgp-light); }
.sgp-empty { text-align: center; padding: 40px 0; color: #888; }
.sgp-status-pill { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.sgp-status-pending { background: #fdecea; color: #a13a2f; }
.sgp-status-resolved { background: #e6f6ec; color: #1e7a3c; }

/* ---------- Homework / Classwork ---------- */
.sgp-hw-card { border: 1px solid #e6e9ee; border-left: 5px solid var(--sgp-accent); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; position: relative; background: #fff; box-shadow: 0 2px 8px rgba(16,14,41,0.05); transition: box-shadow 0.2s, transform 0.2s; }
.sgp-hw-card:hover { box-shadow: 0 6px 16px rgba(16,14,41,0.09); transform: translateY(-1px); }
.sgp-hw-card .sgp-hw-due { float: right; font-size: 12px; font-weight: 700; color: var(--sgp-primary); }
.sgp-hw-status-line { display: flex; gap: 16px; font-size: 12px; font-weight: 600; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #eee; }
.sgp-hw-remarks-line { font-size: 12px; color: #555; font-style: italic; margin-top: 6px; }
.sgp-hw-card h4 { margin: 6px 0 4px; font-family: 'Poppins', sans-serif; font-size: 15px; }
.sgp-hw-type { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.sgp-hw-type-homework { background: var(--sgp-light); color: var(--sgp-primary); }
.sgp-hw-type-classwork { background: var(--sgp-accent); color: #1e2530; }
.sgp-attachment-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--sgp-primary); text-decoration: none; }
.sgp-attachment-link:hover { text-decoration: underline; }

/* ---------- Notices ---------- */
.sgp-notice-card { border-radius: 14px; background: var(--sgp-light); padding: 14px 16px; margin-bottom: 12px; border-left: 5px solid var(--sgp-secondary); }
.sgp-notice-card.sgp-notice-pinned { border-left-color: var(--sgp-accent); background: #fff8e8; }
.sgp-notice-card h4 { margin: 2px 0 6px; font-family: 'Poppins', sans-serif; font-size: 15px; }
.sgp-notice-meta { font-size: 12px; color: #666; margin-bottom: 4px; }

/* ---------- Report cards ---------- */
.sgp-reportcard-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px solid #e6e9ee; border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.sgp-reportcard-card h4 { margin: 0 0 4px; font-family: 'Poppins', sans-serif; font-size: 15px; }
.sgp-reportcard-card .sgp-btn { width: auto; margin-top: 0; padding: 9px 18px; font-size: 13px; }
.sgp-exam-pct-pill { display: inline-block; background: var(--sgp-light); color: var(--sgp-primary); font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 999px; margin-left: 4px; }

/* ---------- Exam Reports (structured) ---------- */
.sgp-exam-list { display: flex; flex-direction: column; gap: 16px; }
.sgp-exam-card { border: 1px solid #e6e9ee; border-radius: 16px; padding: 20px 22px; background: #fff; }
.sgp-exam-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sgp-exam-card-title h4 { margin: 6px 0 4px; font-family: 'Poppins', sans-serif; font-size: 16.5px; color: #1a1a2e; }
.sgp-exam-curriculum-badge { background: var(--sgp-light); color: var(--sgp-primary); }
.sgp-exam-pct-ring { flex-shrink: 0; width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sgp-exam-pct-inner { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04); }
.sgp-band-high { color: #1e7a3c; }
.sgp-band-high .sgp-exam-pct-inner { color: #1e7a3c; }
.sgp-band-mid { color: #b8860b; }
.sgp-band-mid .sgp-exam-pct-inner { color: #b8860b; }
.sgp-band-low { color: #c0392b; }
.sgp-band-low .sgp-exam-pct-inner { color: #c0392b; }
.sgp-band-none { color: #b6bac2; }
.sgp-band-none .sgp-exam-pct-inner { color: #888; }
.sgp-exam-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 4px; }
.sgp-exam-stat { background: var(--sgp-light); border-radius: 10px; padding: 10px 14px; }

/* v3.19.0 — Progress Report infographic */
.sgp-progress-rings { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin: 16px 0 20px; padding: 20px; background: #fff; border-radius: 16px; box-shadow: 0 3px 12px rgba(16,14,41,0.06); }
.sgp-progress-ring-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sgp-progress-ring-label { font-size: 12px; font-weight: 600; color: #555; text-align: center; max-width: 100px; }
.sgp-progress-stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.sgp-progress-stat-pill { background: var(--sgp-light); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #333; }
.sgp-pill-good { background: #e6f6ec; color: #1e7a3c; }
.sgp-pill-warn { background: #fff3cd; color: #8a6100; }
.sgp-progress-callout { border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.sgp-progress-callout strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.sgp-progress-callout p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #333; }
.sgp-callout-remarks { background: #eef3fb; border-left: 4px solid #3a6ea5; }
.sgp-callout-improve { background: #fff8ec; border-left: 4px solid #e0a12e; }
.sgp-exam-stat span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #666; margin-bottom: 2px; }
.sgp-exam-stat strong { font-size: 15px; color: #1a1a2e; }
@media (max-width: 480px) { .sgp-exam-card-head { flex-direction: column; align-items: center; text-align: center; } }

/* ---------- Overview ---------- */
.sgp-overview-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 10px; }
.sgp-overview-col h4 { margin: 0 0 12px; font-size: 14px; color: #333; font-family: 'Poppins', sans-serif; }
.sgp-overview-col { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 4px 14px rgba(16,14,41,0.05); border-left: 4px solid transparent; }
.sgp-overview-col-subjects { border-left-color: #2e5cd6; }
.sgp-overview-col-upcoming { border-left-color: #e0a12e; }
.sgp-overview-col-notices { border-left-color: #7b3fe4; }
.sgp-overview-col-comments { border-left-color: #1e9c7c; }
.sgp-subject-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f4f4f4; }
.sgp-subject-row:last-child { border-bottom: none; }
.sgp-subject-name { font-weight: 700; font-size: 13.5px; color: #222; }
.sgp-subject-teacher { display: flex; align-items: center; font-size: 12px; color: #666; }

/* ---------- Comments ---------- */
.sgp-comment-card { border-radius: 14px; background: var(--sgp-light); padding: 14px 16px; margin-bottom: 12px; }
.sgp-comment-card .sgp-comment-meta { font-size: 12px; color: #666; margin-bottom: 6px; }

@media (max-width: 600px) {
	.sgp-dash-header { flex-direction: column; align-items: flex-start; }

	/* v3.8.0 FIX — two complaints, one root cause: nested padding.
	   .sgp-dashboard (28px) + .sgp-tab-content (24px) stacked on both
	   sides ate over 100px of a ~375px phone screen — that's the "narrow
	   margins / lots of white space" guardians were seeing: the padding
	   wasn't wrong on its own, it just doesn't scale down for a small
	   screen, so the actual content column got squeezed. Tightened for
	   mobile only; desktop is untouched. */
	.sgp-dashboard { padding: 14px; border-radius: 16px; }
	.sgp-tab-content { padding: 16px; border-radius: 14px; }
	.sgp-login-card { padding: 28px 20px; }
	.sgp-dash-header { padding: 16px 18px; border-radius: 14px; }
}

/* ---------- Mobile tab dropdown (hidden on desktop, shown only ≤600px below) ----------
   v3.16.0 — after THREE rounds of native <select> styling attempts
   (custom SVG arrow, then native arrow, each with contrast/padding
   fixes) still produced rendering artifacts and readability complaints
   on some mobile browsers, this is now a fully custom-built dropdown:
   a real <button> showing the current tab, and a plain <div> list of
   option buttons — zero native <select>/<option> rendering involved at
   all, so there is nothing left for any browser to render
   inconsistently. Every color/size below is chosen for maximum,
   guaranteed contrast rather than trying to match a native look. */
.sgp-tabs-mobile-select-wrap { display: none; position: relative; margin-bottom: 18px; }
.sgp-tabs-mobile-toggle {
	width: 100%; background-color: #fff; border: 2px solid #3a2d97; border-radius: 12px;
	padding: 16px 18px; font-size: 16px; line-height: 1.4; font-weight: 700;
	color: #100e29; font-family: 'Inter', -apple-system, sans-serif; cursor: pointer;
	box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px;
	min-height: 52px; /* touch-friendly */
}
.sgp-tabs-mobile-toggle:focus { outline: none; box-shadow: 0 0 0 3px rgba(58,45,151,0.18); }
.sgp-tabs-mobile-current { flex: 1; min-width: 0; text-align: left; }
.sgp-tabs-mobile-chevron { flex-shrink: 0; font-size: 13px; color: #3a2d97; transition: transform 0.15s; }
.sgp-tabs-mobile-toggle[aria-expanded="true"] .sgp-tabs-mobile-chevron { transform: rotate(180deg); }
.sgp-tabs-mobile-list {
	display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
	background: #fff; border: 2px solid #3a2d97; border-radius: 12px;
	box-shadow: 0 12px 32px rgba(16,14,41,0.22); max-height: 340px; overflow-y: auto;
	padding: 6px;
}
.sgp-tabs-mobile-list.open { display: block !important; }
.sgp-tabs-mobile-option {
	display: block; width: 100%; text-align: left; background: none; border: none;
	padding: 13px 14px; font-size: 15px; font-weight: 600; color: #100e29;
	font-family: 'Inter', -apple-system, sans-serif; cursor: pointer; border-radius: 8px;
	min-height: 44px; /* touch-friendly */
}
.sgp-tabs-mobile-option:hover, .sgp-tabs-mobile-option:active { background: #ece8fb; color: #3a2d97; }

@media (max-width: 600px) {
	/* v3.8.0 FIX — the sideways-scrolling pill row. With 11+ tabs, forcing
	   them onto one non-wrapping scrollable line was the actual bug (the
	   base rule already wraps them fine — this override was fighting
	   it). Replaced with a clean single dropdown on mobile instead of
	   either scrolling or wrapping into a messy multi-row pill grid. */
	.sgp-tabs { display: none; }
	.sgp-tabs-mobile-select-wrap { display: block; }
}

/* =====================================================================
 * v3.15.0 — mobile bottom quick-nav (item 5/6). Fixed to the bottom of
 * the viewport on mobile only — the desktop sidebar (≥1024px) makes
 * this unnecessary there, so it's hidden at that width. This is a
 * shortcut LAYER on top of the full mobile dropdown above, not a
 * replacement — every tab is still reachable from the dropdown.
 * ===================================================================== */
.sgp-bottom-nav { display: none; }
@media (max-width: 1023px) {
	.sgp-bottom-nav {
		display: flex; justify-content: space-around; align-items: stretch;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
		background: #fff; border-top: 1px solid #e6e9ee; box-shadow: 0 -4px 16px rgba(16,14,41,0.08);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
	}
	/* Leaves room so page content never sits underneath the fixed bar. */
	.sgp-dashboard { padding-bottom: 76px; }
}
.sgp-bottom-nav-btn {
	flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
	background: none; border: none; padding: 6px 2px; font-size: 10.5px; font-weight: 600;
	color: #888; cursor: pointer; min-height: 44px; /* touch-friendly */
}
.sgp-bottom-nav-btn span { font-size: 19px; line-height: 1; }
.sgp-bottom-nav-btn.active { color: var(--sgp-primary, #3a2d97); }

/* Past-due homework — kept visible (nothing an admin enters should vanish) but visually de-emphasised */
.sgp-hw-card.sgp-hw-past { opacity: .72; border-left-color: #b6bac2; background: #fafafa; }
.sgp-hw-card.sgp-hw-past .sgp-hw-due { color: #888; }

/* ---------- Progress Report (redesigned, vertical tables) ---------- */
.sgp-progress-card { border: 1px solid #e6e9ee; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; background: #fff; }
.sgp-progress-month { margin: 0 0 12px; font-family: 'Poppins', sans-serif; font-size: 16px; color: var(--sgp-primary, #1a1a2e); }
.sgp-vtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.sgp-vtable th { text-align: left; width: 46%; padding: 10px 12px; background: var(--sgp-light); color: #333; font-weight: 600; font-size: 12.5px; vertical-align: top; }
.sgp-vtable td { padding: 10px 12px; border-bottom: 1px solid #f0f1f4; color: #1a1a2e; }
.sgp-vtable tr:last-child td, .sgp-vtable tr:last-child th { border-bottom: none; }
.sgp-vtable tr:nth-child(odd) th { background: var(--sgp-light); }
.sgp-vtable tr:nth-child(even) th { background: #f4f6f9; }

/* ---------- Exam overtime highlight ---------- */
.sgp-exam-card-overtime { border-color: #f3c1bb; }
.sgp-exam-stat-overtime { background: #fdecea !important; }
.sgp-exam-stat-overtime strong { color: #a13a2f; }
.sgp-overtime-note { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: #a13a2f; background: #fdecea; display: inline-block; padding: 5px 12px; border-radius: 999px; }

/* ---------- v3.0.0 Subject Sector: subject cards ---------- */
.sgp-subject-card { border: 1px solid #e6e9ee; border-left: 5px solid var(--sgp-primary); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.sgp-subject-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sgp-subject-head h4 { margin: 0; font-family: 'Poppins', sans-serif; font-size: 16px; }
.sgp-subject-score { font-size: 20px; font-weight: 700; color: var(--sgp-primary); }
.sgp-subject-grade { font-size: 12px; font-weight: 700; background: var(--sgp-light); color: var(--sgp-primary); padding: 2px 9px; border-radius: 999px; margin-left: 4px; }
.sgp-subject-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.sgp-subject-breakdown > div { background: var(--sgp-light); border-radius: 10px; padding: 8px 10px; text-align: center; }
.sgp-subject-breakdown span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: #666; margin-bottom: 2px; }
.sgp-subject-breakdown b { font-size: 15px; color: #1a1a2e; }
@media (max-width: 560px) { .sgp-subject-breakdown { grid-template-columns: repeat(2, 1fr); } }
.sgp-subject-notes { font-style: italic; color: #555; font-size: 13px; margin-top: 6px; }
.sgp-qual-display { margin-top: 12px; border-top: 1px dashed #e6e9ee; padding-top: 10px; }
.sgp-qual-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; }
.sgp-qual-stars { color: var(--sgp-primary); letter-spacing: 2px; }
.sgp-subject-teacher { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; border-top: 1px solid #f0f1f4; padding-top: 12px; }
.sgp-teacher-bio { font-size: 12px; color: #777; }
.sgp-teacher-actions { display: flex; gap: 8px; }

/* ---------- v3.0.0 Subject Sector: meeting booking ---------- */
#sgp-book-meeting-form label { display: block; font-size: 12px; font-weight: 700; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .03em; color: #333; }
#sgp-book-meeting-form select, #sgp-book-meeting-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #e0e2e8; border-radius: 10px; font-size: 14px; line-height: 1.5; font-family: inherit; }
#sgp-book-meeting-form button { margin-top: 14px; }

/* ---------- v3.0.0 Subject Sector: shared qualitative rating widget (also used by Tutor Portal) ---------- */
.sgp-qual-heading { margin: 18px 0 8px; font-family: 'Poppins', sans-serif; font-size: 14px; }
.sgp-qual-grid { display: flex; flex-direction: column; gap: 6px; }
.sgp-qual-item { display: flex; align-items: center; justify-content: space-between; background: var(--sgp-light, #f4f6f9); border-radius: 10px; padding: 8px 12px; }
.sgp-qual-item-label { font-size: 13px; color: #333; }
.sgp-star-picker { display: flex; gap: 2px; }
.sgp-star { background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 2px; color: var(--sgp-primary, #3a2d97); }

/* =====================================================================
 * v3.15.0 — Dashboard redesign (item 5/6): summary cards, quick action
 * buttons, and the activity feed. Shared by BOTH the Tutor Portal
 * Dashboard tab and the redesigned Guardian Overview, so both look and
 * behave consistently. Every color/icon here is purely presentational —
 * none of it changes what data is shown or how it's fetched.
 * ===================================================================== */
.sgp-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 8px; }
@media (max-width: 900px) { .sgp-summary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sgp-summary-grid { grid-template-columns: 1fr; } }
.sgp-summary-card {
	border-radius: 16px; padding: 18px 20px; color: #fff; position: relative; overflow: hidden;
	box-shadow: 0 8px 20px rgba(16,14,41,0.14); min-height: 118px;
}
.sgp-summary-icon { font-size: 26px; margin-bottom: 6px; opacity: 0.95; }
.sgp-summary-title { font-size: 13px; font-weight: 700; opacity: 0.92; margin-bottom: 8px; letter-spacing: .01em; }
.sgp-summary-main { font-size: 26px; font-weight: 800; font-family: 'Poppins', sans-serif; line-height: 1.1; }
.sgp-summary-main span { font-size: 13px; font-weight: 600; opacity: 0.9; margin-left: 4px; }
.sgp-summary-sub { font-size: 12px; opacity: 0.88; margin-top: 6px; }
.sgp-card-blue   { background: linear-gradient(135deg, #4f6ee0, #3a4fc4); }
.sgp-card-green  { background: linear-gradient(135deg, #22a06b, #17805a); }
.sgp-card-orange { background: linear-gradient(135deg, #f2a541, #e08a2b); }
.sgp-card-purple { background: linear-gradient(135deg, #7a5cf0, #5b3fd6); }

.sgp-section-heading { font-family: 'Poppins', sans-serif; font-size: 15px; color: #222; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #eee; }

.sgp-quick-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sgp-qa-btn {
	display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px;
	padding: 13px 20px; font-size: 13.5px; font-weight: 700; color: #fff; cursor: pointer;
	box-shadow: 0 5px 14px rgba(16,14,41,0.14); transition: transform 0.15s, box-shadow 0.15s;
	min-height: 44px; /* touch-friendly */
}
.sgp-qa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,14,41,0.2); }
.sgp-qa-icon { font-size: 17px; }
.sgp-qa-blue   { background: #4f6ee0; }
.sgp-qa-green  { background: #22a06b; }
.sgp-qa-orange { background: #e08a2b; }
.sgp-qa-purple { background: #7a5cf0; }

.sgp-activity-feed { display: flex; flex-direction: column; gap: 8px; }
.sgp-activity-row {
	display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #eceef2;
	border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(16,14,41,0.04);
}
.sgp-activity-icon { font-size: 18px; flex-shrink: 0; width: 32px; height: 32px; background: var(--sgp-light, #ece8fb); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.sgp-activity-text { flex: 1; font-size: 13.5px; color: #333; }
.sgp-activity-time { font-size: 11.5px; color: #999; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) { .sgp-activity-row { flex-wrap: wrap; } .sgp-activity-time { width: 100%; padding-left: 44px; } }

/* v3.21.0 — teacher profile photo shown wherever a name appears to a guardian */
.sgp-teacher-avatar {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 50%; vertical-align: middle;
	margin-right: 8px; object-fit: cover; font-size: 13px; font-weight: 700;
}
.sgp-teacher-avatar-fallback { background: var(--sgp-light, #ece8fb); color: var(--sgp-primary, #3a2d97); }

/* v3.21.0 — payment receipt cards, replacing the plain data table */
/* v3.45.0 — deepened shadows/shading + hover lift, since colors are
   now applied inline per-month via JS (monthColor()) and these base
   rules need to work well underneath whichever color lands on them. */
.sgp-receipt-list { display: flex; flex-direction: column; gap: 16px; }
.sgp-receipt-card {
	background: #fff; border: 1.5px solid #eceef2; border-radius: 16px; padding: 20px 22px;
	box-shadow: 0 6px 20px -4px rgba(16,14,41,0.10), 0 2px 6px rgba(16,14,41,0.04);
	transition: transform .15s ease, box-shadow .15s ease;
}
.sgp-receipt-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -6px rgba(16,14,41,0.16), 0 3px 8px rgba(16,14,41,0.06); }
.sgp-receipt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sgp-receipt-paid-badge { background: #e6f6ec; color: #1e7a3c; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.sgp-receipt-amount { font-size: 23px; font-weight: 800; font-family: 'Poppins', sans-serif; color: var(--sgp-primary, #3a2d97); }
.sgp-receipt-month { font-size: 13.5px; font-weight: 700; color: #666; margin-bottom: 14px; }
.sgp-receipt-divider { border-top: 1px dashed rgba(0,0,0,0.12); margin-bottom: 12px; }
.sgp-receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.sgp-receipt-row span:first-child { color: #777; font-weight: 500; }
.sgp-receipt-row span:last-child { color: #222; font-weight: 700; display: flex; align-items: center; }

/* v3.30.0 — admission fee breakdown status card */
.sgp-admission-status { display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.sgp-admission-status strong { display: block; font-size: 13.5px; }
.sgp-admission-status div div { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.sgp-admission-icon { font-size: 22px; flex-shrink: 0; }
.sgp-admission-paid { background: #e6f6ec; color: #1e7a3c; }
.sgp-admission-unpaid { background: #fff3cd; color: #8a6100; }

/* v3.30.0 — qualitative (1-5 star) ratings infographic */
.sgp-qual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sgp-qual-card { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 3px 12px rgba(16,14,41,0.06); border-top: 3px solid #7b3fe4; }
.sgp-qual-card h5 { margin: 0 0 10px; font-size: 13.5px; font-family: 'Poppins', sans-serif; color: #100e29; display: flex; justify-content: space-between; align-items: baseline; }
.sgp-qual-card h5 span { font-size: 11px; font-weight: 400; color: #999; }
.sgp-qual-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f4f4f4; }
.sgp-qual-row:last-child { border-bottom: none; }
.sgp-qual-label { font-size: 12.5px; color: #555; }
.sgp-qual-stars { color: #e0a12e; font-size: 15px; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.sgp-qual-num { color: #999; font-size: 11px; letter-spacing: 0; }

/* v3.32.0 — daily class performance cards */
.sgp-dcp-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.sgp-dcp-card { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 3px 12px rgba(16,14,41,0.05); border-left: 4px solid #2e5cd6; }
.sgp-dcp-card-date { font-weight: 700; font-size: 13px; color: #100e29; margin-bottom: 8px; }
.sgp-dcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 14px; }
.sgp-dcp-field { display: flex; flex-direction: column; gap: 1px; }
.sgp-dcp-field span { font-size: 10.5px; color: #999; text-transform: uppercase; letter-spacing: .03em; }
.sgp-dcp-field b { font-size: 13px; color: #333; }
.sgp-dcp-remarks { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eee; font-size: 12.5px; color: #555; font-style: italic; }

/* =====================================================================
 * v3.20.0 — PWA "Download Our App" install banner. Shown at the very
 * top of the dashboard, above the header, on both portals. Minimalist
 * white card per spec: blue arrow icon, dark blue heading text, rounded
 * blue button with a soft shadow, fade-in on appearance. Stacks
 * vertically on narrow screens, sits side-by-side on wider ones.
 * ===================================================================== */
@keyframes sgp-pwa-fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.sgp-pwa-banner {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	background: #ffffff; border: 1px solid #eef0f4; border-radius: 16px;
	padding: 16px 18px; margin-bottom: 18px; position: relative;
	box-shadow: 0 6px 20px rgba(16,14,41,0.07);
	animation: sgp-pwa-fade-in 0.35s ease-out;
}
.sgp-pwa-banner-icon { font-size: 26px; flex-shrink: 0; color: #2e5cd6; }
.sgp-pwa-banner-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.sgp-pwa-banner-text strong { color: #12235c; font-size: 15px; font-family: 'Poppins', sans-serif; }
.sgp-pwa-banner-text span { font-size: 12.5px; color: #666; }
.sgp-pwa-install-btn {
	width: auto; margin-top: 0; flex-shrink: 0; padding: 11px 22px; font-size: 13.5px;
	border-radius: 999px; background: #2e5cd6; box-shadow: 0 4px 12px rgba(46,92,214,0.3);
}
.sgp-pwa-install-btn:hover { background: #2549ad; }
.sgp-pwa-dismiss {
	position: absolute; top: 10px; right: 12px; background: none; border: none;
	font-size: 18px; line-height: 1; color: #aaa; cursor: pointer; padding: 4px;
}
.sgp-pwa-dismiss:hover { color: #666; }

/* Narrow screens: text stacks above the button, full width, per spec. */
@media (max-width: 560px) {
	.sgp-pwa-banner { flex-direction: column; align-items: flex-start; padding: 18px 16px; }
	.sgp-pwa-banner-icon { display: none; }
	.sgp-pwa-install-btn { width: 100%; text-align: center; }
}

/* v3.38.0 — Version tab (reuses the profile-row pattern already
   established in the Tutor Portal's student popup, for consistency) */
.sgp-profile-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f4f4f4; font-size: 13.5px; }
.sgp-profile-row span:first-child { color: #888; }
.sgp-profile-row span:last-child { color: #222; font-weight: 600; text-align: right; }

/* v3.40.0 — direct messaging chat UI (identical to Tutor Portal's) */
.sgp-gmsg-conv-row { cursor: pointer; }
.sgp-gmsg-conv-row:hover { box-shadow: 0 6px 18px -6px rgba(16,14,41,0.14); }
.sgp-gmsg-unread-badge {
	background: #c0392b; color: #fff; font-size: 11px; font-weight: 700;
	border-radius: 999px; padding: 1px 7px; margin-left: 6px;
}
.sgp-gmsg-preview { color: #666; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.sgp-chat-header { font-weight: 700; font-size: 15px; padding: 10px 0; border-bottom: 1px solid #eee; margin-bottom: 10px; }
.sgp-chat-messages {
	height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
	padding: 10px; background: #f7f7fb; border-radius: 12px; margin-bottom: 12px;
}
.sgp-chat-bubble-row { display: flex; }
.sgp-chat-mine { justify-content: flex-end; }
.sgp-chat-theirs { justify-content: flex-start; }
.sgp-chat-bubble {
	max-width: 75%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45;
	position: relative; word-wrap: break-word;
}
.sgp-chat-mine .sgp-chat-bubble { background: var(--sgp-primary, #3a2d97); color: #fff; border-bottom-right-radius: 4px; }
.sgp-chat-theirs .sgp-chat-bubble { background: #fff; color: #222; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.sgp-chat-time { display: block; font-size: 10px; opacity: 0.7; margin-top: 4px; text-align: right; }
.sgp-chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.sgp-chat-input-row textarea {
	flex: 1; resize: none; border: 1.5px solid #ddd; border-radius: 12px; padding: 10px 12px;
	font-size: 13.5px; font-family: inherit; max-height: 90px;
}
.sgp-chat-input-row button { width: auto; margin: 0; flex-shrink: 0; }

/* v3.43.0 — Overview: Class Performance daily highlight card */
.sgp-overview-highlight { border-radius: 16px; padding: 16px 20px; margin: 4px 0 16px; }
.sgp-overview-highlight h4 { margin: 0 0 10px; font-size: 14px; font-family: 'Poppins', sans-serif; }
.sgp-highlight-purple { background: linear-gradient(135deg, #f3f0ff, #ffffff); border: 1px solid #e2d9ff; }
.sgp-highlight-purple h4 { color: #5b2fd6; }
.sgp-highlight-row { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.sgp-highlight-row span { font-size: 12.5px; color: #555; }
.sgp-highlight-row span b { display: block; font-size: 17px; color: #100e29; font-family: 'Poppins', sans-serif; }

/* v3.45.0 — automated stats summary, plain-English restatement of the
   same numbers shown in the cards below it */
.sgp-auto-summary {
	display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, #fff9ec, #ffffff);
	border: 1.5px solid #f0dfa8; border-radius: 16px; padding: 16px 20px; margin-bottom: 18px;
	box-shadow: 0 4px 14px -4px rgba(224,161,46,0.18);
}
.sgp-auto-summary-icon { font-size: 22px; flex-shrink: 0; }
.sgp-auto-summary-text { font-size: 13.5px; line-height: 1.6; color: #444; }
.sgp-auto-summary-text strong { color: #100e29; }

/* v3.49.0 — Facebook-style notification bell */
.sgp-notif-bell-wrap { position: relative; }
.sgp-notif-bell {
	position: relative; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
	border-radius: 999px; width: 40px; height: 40px; font-size: 18px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.sgp-notif-bell:hover { background: rgba(255,255,255,0.28); }
.sgp-notif-bell-badge {
	position: absolute; top: -3px; right: -3px; background: #c0392b; color: #fff;
	font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px;
	border-radius: 999px; display: flex; align-items: center; justify-content: center;
	border: 2px solid #fff;
}
.sgp-notif-panel {
	position: absolute; top: 48px; right: 0; width: 320px; max-height: 420px; overflow-y: auto;
	background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(16,14,41,0.22);
	border: 1px solid #eee; z-index: 200;
}
.sgp-notif-panel-head {
	display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
	border-bottom: 1px solid #f0f0f0; font-size: 13.5px;
}
.sgp-notif-panel-head strong { color: #100e29; }
.sgp-notif-panel-head button {
	background: none; border: none; color: var(--sgp-primary, #3a2d97); font-size: 12px; font-weight: 600; cursor: pointer;
}
.sgp-notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f6f6f6; cursor: pointer; }
.sgp-notif-item:hover { background: #faf9ff; }
.sgp-notif-item:last-child { border-bottom: none; }
.sgp-notif-unread { background: #f4f2ff; }
.sgp-notif-unread:hover { background: #ece8fb; }
.sgp-notif-item-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.sgp-notif-item-body { min-width: 0; }
.sgp-notif-item-body strong { display: block; font-size: 13px; color: #100e29; }
.sgp-notif-item-msg { font-size: 12px; color: #666; margin-top: 2px; }
.sgp-notif-item-time { font-size: 11px; color: #999; margin-top: 4px; }
@media (max-width: 480px) {
	.sgp-notif-panel { position: fixed; top: 64px; left: 10px; right: 10px; width: auto; max-height: 70vh; }
}
