/* ==========================================================================
   Grammar Master — Main Stylesheet
   White & blue education theme, rounded cards, dark mode, responsive.
   ========================================================================== */

/* ----- CSS Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
	/* Color ramps */
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #3b82f6;
	--primary-50: #eff6ff;
	--primary-100: #dbeafe;
	--secondary: #0ea5e9;
	--accent: #f59e0b;
	--success: #16a34a;
	--success-light: #dcfce7;
	--warning: #f59e0b;
	--warning-light: #fef3c7;
	--error: #dc2626;
	--error-light: #fee2e2;

	/* Neutrals */
	--bg: #f7f9fc;
	--surface: #ffffff;
	--surface-alt: #f1f5f9;
	--border: #e2e8f0;
	--text: #0f172a;
	--text-muted: #64748b;
	--text-light: #94a3b8;

	/* Effects */
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
	--shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 20px;
	--radius-full: 9999px;
	--transition: 0.2s ease;

	/* Typography */
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-heading: 'Poppins', var(--font-body);
}

/* Dark mode */
html.gm-dark, .gm-dark {
	--primary: #3b82f6;
	--primary-dark: #2563eb;
	--primary-light: #60a5fa;
	--primary-50: #1e293b;
	--primary-100: #1e3a5f;
	--secondary: #38bdf8;
	--accent: #fbbf24;
	--success: #22c55e;
	--success-light: #14532d;
	--warning: #f59e0b;
	--warning-light: #78350f;
	--error: #ef4444;
	--error-light: #7f1d1d;
	--bg: #0b1220;
	--surface: #131c31;
	--surface-alt: #1a2540;
	--border: #243049;
	--text: #e6edf6;
	--text-muted: #94a3b8;
	--text-light: #64748b;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	--shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.25;
	color: var(--text);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ----- Layout ----- */
.gm-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.gm-main { min-height: calc(100vh - 200px); padding: 32px 0; }

.gm-page { max-width: 800px; }

.gm-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--primary);
	color: #fff;
	padding: 8px 16px;
	z-index: 1000;
}
.gm-skip-link:focus { left: 0; }

/* ----- Header ----- */
.gm-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: var(--shadow-sm);
	transition: background var(--transition), border-color var(--transition);
}
.gm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 68px;
}
.gm-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 20px;
	color: var(--text);
}
.gm-logo:hover { color: var(--primary); }
.gm-logo__icon {
	width: 36px;
	height: 36px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	border-radius: var(--radius-sm);
	display: grid;
	place-items: center;
	font-size: 20px;
	font-weight: 700;
}
.gm-header__nav { flex: 1; display: flex; justify-content: center; }
.gm-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
}
.gm-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	font-weight: 500;
	font-size: 15px;
}
.gm-nav a:hover { background: var(--surface-alt); color: var(--primary); }

.gm-header__actions { display: flex; align-items: center; gap: 8px; }

.gm-icon-btn {
	width: 40px;
	height: 40px;
	border: none;
	background: transparent;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	cursor: pointer;
	display: grid;
	place-items: center;
	position: relative;
	transition: background var(--transition), color var(--transition);
}
.gm-icon-btn:hover { background: var(--surface-alt); color: var(--primary); }
.gm-icon-btn .dashicons { width: 20px; height: 20px; font-size: 20px; }

.gm-notif-badge {
	position: absolute;
	top: 4px;
	right: 4px;
	background: var(--error);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	min-width: 16px;
	height: 16px;
	border-radius: var(--radius-full);
	display: grid;
	place-items: center;
	padding: 0 4px;
}

.gm-user-menu { position: relative; }
.gm-user-menu__btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	padding: 4px 14px 4px 4px;
	cursor: pointer;
	transition: background var(--transition);
}
.gm-user-menu__btn:hover { background: var(--primary-50); }
.gm-avatar {
	width: 32px;
	height: 32px;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 14px;
}
.gm-user-menu__name { font-size: 14px; font-weight: 500; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-user-menu__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	min-width: 200px;
	padding: 6px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all var(--transition);
	z-index: 200;
}
.gm-user-menu.is-open .gm-user-menu__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.gm-user-menu__dropdown a {
	display: block;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	color: var(--text);
	font-size: 14px;
}
.gm-user-menu__dropdown a:hover { background: var(--surface-alt); color: var(--primary); }

.gm-header__burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; }
.gm-header__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

.gm-mobile-nav {
	position: fixed;
	top: 68px;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--surface);
	padding: 24px;
	z-index: 99;
	overflow-y: auto;
}
.gm-mobile-nav__list, .gm-mobile-nav .gm-nav { flex-direction: column; align-items: stretch; gap: 4px; list-style: none; }
.gm-mobile-nav a { padding: 14px; font-size: 16px; border-radius: var(--radius-sm); }

/* ----- Buttons ----- */
.gm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: all var(--transition);
	text-decoration: none;
	line-height: 1.4;
}
.gm-btn .dashicons { width: 18px; height: 18px; font-size: 18px; }
.gm-btn--primary { background: var(--primary); color: #fff; }
.gm-btn--primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.gm-btn--ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.gm-btn--ghost:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.gm-btn--success { background: var(--success); color: #fff; }
.gm-btn--success:hover { background: #15803d; color: #fff; }
.gm-btn--warning { background: var(--warning); color: #fff; }
.gm-btn--warning:hover { background: #d97706; color: #fff; }
.gm-btn--light { background: #fff; color: var(--primary); }
.gm-btn--light:hover { background: var(--primary-50); }
.gm-btn--lg { padding: 14px 28px; font-size: 16px; }
.gm-btn--sm { padding: 6px 12px; font-size: 13px; }
.gm-btn--block { width: 100%; }
.gm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gm-link { color: var(--primary); font-weight: 500; font-size: 14px; }
.gm-link:hover { text-decoration: underline; }

/* ----- Cards ----- */
.gm-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow-sm);
	transition: box-shadow var(--transition), transform var(--transition);
}
.gm-card:hover { box-shadow: var(--shadow); }
.gm-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gm-card__head h2, .gm-card__head h3 { font-size: 18px; }

/* ----- Tags & Chips ----- */
.gm-tag {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background: var(--surface-alt);
	color: var(--text-muted);
	border-radius: var(--radius-full);
	font-size: 12px;
	font-weight: 600;
}
.gm-tag--primary { background: var(--primary-100); color: var(--primary-dark); }
.gm-tag--success { background: var(--success-light); color: var(--success); }
.gm-tag--warning { background: var(--warning-light); color: #b45309; }
.gm-tag--cat { background: var(--primary-50); color: var(--primary); }
.gm-req { color: var(--error); }

.gm-chip {
	padding: 8px 16px;
	border-radius: var(--radius-full);
	background: var(--surface-alt);
	color: var(--text-muted);
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	transition: var(--transition);
}
.gm-chip.is-active, .gm-chip:hover { background: var(--primary); color: #fff; }

/* ----- Alerts ----- */
.gm-alert {
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin-bottom: 16px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
}
.gm-alert .dashicons { width: 22px; height: 22px; font-size: 22px; }
.gm-alert--error { background: var(--error-light); color: var(--error); }
.gm-alert--success { background: var(--success-light); color: var(--success); }
.gm-alert--info { background: var(--primary-50); color: var(--primary); }
.gm-alert--warning { background: var(--warning-light); color: #b45309; }

/* ----- Forms ----- */
.gm-form .gm-field { margin-bottom: 18px; }
.gm-field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gm-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--text); }
.gm-field small { color: var(--text-muted); font-size: 13px; }
.gm-input, .gm-field input, .gm-field select, .gm-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 15px;
	transition: border-color var(--transition), box-shadow var(--transition);
}
.gm-input:focus, .gm-field input:focus, .gm-field select:focus, .gm-field textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-100);
}
.gm-field textarea { resize: vertical; min-height: 120px; }
.gm-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.gm-checkbox input { width: auto; }
.gm-password-field { position: relative; }
.gm-password-field input { padding-right: 44px; }
.gm-password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-muted);
	padding: 8px;
}
.gm-password-toggle:hover { color: var(--primary); }

/* ----- Auth pages ----- */
.gm-auth { display: grid; place-items: center; min-height: 70vh; padding: 40px 24px; }
.gm-auth__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); animation: gm-fade-up 0.5s ease; }
.gm-auth__header { text-align: center; margin-bottom: 28px; }
.gm-auth__header .dashicons { font-size: 40px; width: 40px; height: 40px; color: var(--primary); margin-bottom: 12px; }
.gm-auth__header h1 { font-size: 26px; margin-bottom: 8px; }
.gm-auth__header p { color: var(--text-muted); }
.gm-auth__footer { text-align: center; margin-top: 24px; color: var(--text-muted); }

/* ----- Hero (front page) ----- */
.gm-hero { background: linear-gradient(135deg, var(--primary-50), var(--surface)); padding: 64px 0; overflow: hidden; }
.gm-dark .gm-hero { background: linear-gradient(135deg, var(--surface-alt), var(--surface)); }
.gm-hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.gm-hero__badge {
	display: inline-block;
	padding: 6px 14px;
	background: var(--primary-100);
	color: var(--primary-dark);
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 16px;
}
.gm-hero__title { font-size: 44px; line-height: 1.15; margin-bottom: 18px; }
.gm-hero__subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 28px; max-width: 540px; }
.gm-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.gm-hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gm-hero__stats > div { display: flex; flex-direction: column; }
.gm-hero__stats strong { font-size: 28px; font-family: var(--font-heading); color: var(--primary); }
.gm-hero__stats span { font-size: 13px; color: var(--text-muted); }

.gm-hero__visual { display: grid; place-items: center; }
.gm-hero__card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	width: 100%;
	max-width: 360px;
	box-shadow: var(--shadow-lg);
}
.gm-float { animation: gm-float 4s ease-in-out infinite; }
.gm-hero__card-header { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; color: var(--primary); font-weight: 600; }
.gm-hero__card-header .dashicons { width: 24px; height: 24px; font-size: 24px; }
.gm-hero__lesson-bar { height: 10px; background: var(--surface-alt); border-radius: var(--radius-sm); margin-bottom: 10px; }
.gm-hero__lesson-bar--short { width: 60%; }
.gm-hero__lesson-bar--mid { width: 80%; }
.gm-hero__progress { height: 8px; background: var(--surface-alt); border-radius: var(--radius-full); overflow: hidden; margin: 14px 0; }
.gm-hero__progress-fill { width: 65%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-full); animation: gm-grow 1.5s ease; }
.gm-hero__badges { display: flex; gap: 10px; }
.gm-hero__badges .dashicons { width: 28px; height: 28px; font-size: 28px; color: var(--accent); }

/* ----- Sections ----- */
.gm-features, .gm-curriculum-preview, .gm-cta-band { padding: 64px 0; }
.gm-section-title { text-align: center; font-size: 32px; margin-bottom: 12px; }
.gm-section-subtitle { text-align: center; color: var(--text-muted); font-size: 17px; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

.gm-features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.gm-feature {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	text-align: center;
	transition: transform var(--transition), box-shadow var(--transition);
}
.gm-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gm-feature__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: var(--primary-50);
	color: var(--primary);
	border-radius: var(--radius);
	display: grid;
	place-items: center;
}
.gm-feature__icon .dashicons { width: 28px; height: 28px; font-size: 28px; }
.gm-feature h3 { font-size: 18px; margin-bottom: 8px; }
.gm-feature p { color: var(--text-muted); font-size: 14px; }

.gm-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gm-month-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	position: relative;
	overflow: hidden;
}
.gm-month-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary); }
.gm-month-card--2::before { background: var(--secondary); }
.gm-month-card--3::before { background: var(--accent); }
.gm-month-card__num {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-sm);
	background: var(--primary-100);
	color: var(--primary-dark);
	display: grid;
	place-items: center;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 24px;
	margin-bottom: 16px;
}
.gm-month-card--2 .gm-month-card__num { background: #e0f2fe; color: #0369a1; }
.gm-month-card--3 .gm-month-card__num { background: var(--warning-light); color: #b45309; }
.gm-month-card h3 { margin-bottom: 14px; }
.gm-month-card ul { list-style: none; }
.gm-month-card li { padding: 6px 0 6px 22px; position: relative; color: var(--text-muted); }
.gm-month-card li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.gm-cta-band { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.gm-cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.gm-cta-band h2 { color: #fff; font-size: 28px; margin-bottom: 6px; }
.gm-cta-band p { color: rgba(255, 255, 255, 0.9); }

/* ----- Dashboard ----- */
.gm-dashboard__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.gm-dashboard__header h1 { font-size: 28px; }
.gm-dashboard__sub { color: var(--text-muted); }
.gm-dashboard__xp { display: flex; gap: 10px; flex-wrap: wrap; }
.gm-xp-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	font-weight: 700;
	font-size: 14px;
}
.gm-xp-pill .dashicons { width: 18px; height: 18px; font-size: 18px; color: var(--accent); }
.gm-xp-pill--coins .dashicons { color: var(--warning); }
.gm-xp-pill--streak .dashicons { color: var(--error); }

.gm-welcome-banner { background: var(--success-light); color: var(--success); padding: 20px; border-radius: var(--radius); display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.gm-welcome-banner .dashicons { font-size: 32px; width: 32px; height: 32px; }
.gm-welcome-banner h3 { color: var(--success); margin-bottom: 4px; }
.gm-welcome-banner p { color: #166534; }

.gm-dashboard__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.gm-dash-today { grid-column: span 2; }
.gm-dash-today__obj { color: var(--text-muted); margin: 8px 0 14px; }
.gm-dash-today__meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; color: var(--text-muted); font-size: 14px; }
.gm-dash-today__meta .dashicons { width: 16px; height: 16px; font-size: 16px; color: var(--primary); }
.gm-dash-today__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.gm-dash-revision-alert { grid-column: span 2; display: flex; align-items: center; gap: 16px; background: var(--warning-light); border-color: var(--warning); }
.gm-dash-revision-alert .dashicons { font-size: 28px; width: 28px; height: 28px; color: #b45309; }
.gm-dash-revision-alert h3 { color: #b45309; margin-bottom: 4px; }
.gm-dash-revision-alert p { color: #92400e; font-size: 14px; }

.gm-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gm-stat { text-align: center; padding: 14px 8px; background: var(--surface-alt); border-radius: var(--radius-sm); }
.gm-stat__num { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--primary); }
.gm-stat__label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.gm-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gm-areas__col h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.gm-areas__col--strong h3 { color: var(--success); }
.gm-areas__col--weak h3 { color: var(--error); }
.gm-areas__col ul { list-style: none; }
.gm-areas__col li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.gm-areas__col li:last-child { border-bottom: none; }
.gm-areas__empty { color: var(--text-muted); font-size: 14px; font-style: italic; }

.gm-recommended { list-style: none; }
.gm-recommended li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.gm-recommended li:last-child { border-bottom: none; }
.gm-recommended__topic { font-weight: 600; min-width: 140px; }
.gm-recommended__reason { flex: 1; color: var(--text-muted); font-size: 14px; }

.gm-badges-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gm-badge-mini { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: var(--radius-sm); text-align: center; font-size: 12px; font-weight: 600; }
.gm-badge-mini.is-earned { background: var(--success-light); color: var(--success); }
.gm-badge-mini.is-locked { background: var(--surface-alt); color: var(--text-light); opacity: 0.6; }
.gm-badge-mini .dashicons { width: 24px; height: 24px; font-size: 24px; }

.gm-calendar-legend { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.gm-legend { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.gm-legend--done { background: var(--success); }
.gm-legend--current { background: var(--primary); }
.gm-legend--locked { background: var(--border); }
.gm-calendar-grid { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; }
.gm-cal-day {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	font-size: 11px;
	font-weight: 600;
	border-radius: 6px;
	background: var(--surface-alt);
	color: var(--text-muted);
	text-decoration: none;
	transition: var(--transition);
}
.gm-cal-day:hover { transform: scale(1.15); }
.gm-cal-day.is-done { background: var(--success); color: #fff; }
.gm-cal-day.is-current { background: var(--primary); color: #fff; }
.gm-cal-day.is-locked { background: var(--surface-alt); color: var(--text-light); cursor: not-allowed; }

.gm-bar-chart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; height: 180px; }
.gm-bar-chart__item { display: flex; flex-direction: column; align-items: center; justify-content: end; height: 100%; }
.gm-bar-chart__bar { width: 60%; max-width: 60px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: height 0.8s ease; min-height: 6px; }
.gm-bar-chart__label { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.gm-bar-chart__value { font-size: 12px; font-weight: 600; }

.gm-activity-list { list-style: none; }
.gm-activity-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.gm-activity-list li:last-child { border-bottom: none; }
.gm-activity-list__icon { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.gm-activity-list__icon .dashicons { width: 16px; height: 16px; font-size: 16px; }
.gm-activity-list__msg { font-size: 14px; font-weight: 500; }
.gm-activity-list__time { font-size: 12px; color: var(--text-muted); }

/* ----- Progress bars ----- */
.gm-progress { margin-bottom: 14px; }
.gm-progress__label { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.gm-progress__track { height: 10px; background: var(--surface-alt); border-radius: var(--radius-full); overflow: hidden; }
.gm-progress__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-full); transition: width 1s ease; }
.gm-progress__value { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-align: right; }

.gm-level-progress { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.gm-level-progress__head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

/* ----- Lesson page ----- */
.gm-lesson { max-width: 820px; }
.gm-lesson__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.gm-lesson__head > div { display: flex; gap: 8px; }
.gm-lesson__title { font-size: 32px; margin-bottom: 8px; }
.gm-lesson__obj { color: var(--text-muted); font-size: 17px; margin-bottom: 16px; }
.gm-lesson__meta { display: flex; gap: 18px; color: var(--text-muted); font-size: 14px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.gm-lesson__meta .dashicons { width: 16px; height: 16px; font-size: 16px; color: var(--primary); }
.gm-lesson__body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
.gm-lesson-section { margin-bottom: 28px; }
.gm-lesson-section h2 { font-size: 20px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--primary-100); }
.gm-urdu { font-size: 18px; line-height: 1.8; color: var(--text); }
.gm-conversation { background: var(--surface-alt); padding: 16px; border-radius: var(--radius-sm); line-height: 1.8; }

.gm-lesson-vocab { margin-bottom: 24px; }
.gm-lesson-vocab h2 { font-size: 22px; margin-bottom: 16px; }
.gm-vocab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gm-vocab-grid--small { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.gm-vocab-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 18px;
	transition: transform var(--transition), box-shadow var(--transition);
	position: relative;
}
.gm-vocab-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gm-vocab-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gm-vocab-card__head h3 { font-size: 18px; color: var(--primary); }
.gm-vocab-card__icons { display: flex; gap: 4px; }
.gm-vocab-card__pron { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 6px; }
.gm-vocab-card__meaning { font-weight: 600; margin-bottom: 4px; }
.gm-vocab-card__urdu { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.gm-vocab-card__example { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }
.gm-vocab-card__syn, .gm-vocab-card__ant { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

.gm-lesson-quiz-cta { margin-bottom: 24px; }
.gm-quiz-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, var(--primary-50), var(--surface)); border-color: var(--primary-100); }
.gm-quiz-cta h2 { margin-bottom: 6px; }
.gm-quiz-cta p { color: var(--text-muted); }

.gm-lesson-nav { display: flex; justify-content: space-between; gap: 12px; }

/* ----- Quiz ----- */
.gm-quiz { max-width: 760px; }
.gm-quiz__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.gm-quiz__head > div { display: flex; gap: 8px; }
.gm-quiz__title { font-size: 28px; margin-bottom: 8px; }
.gm-quiz__intro { color: var(--text-muted); margin-bottom: 24px; }
.gm-quiz__progress { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.gm-quiz__progress-bar { flex: 1; height: 8px; background: var(--surface-alt); border-radius: var(--radius-full); overflow: hidden; }
.gm-quiz__progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transition: width 0.4s ease; }
.gm-quiz__progress-text { font-weight: 600; font-size: 14px; color: var(--text-muted); }
.gm-quiz__timer { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 600; margin-bottom: 20px; }
.gm-quiz__timer .dashicons { width: 18px; height: 18px; font-size: 18px; }

.gm-question {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	margin-bottom: 16px;
	animation: gm-fade-up 0.3s ease;
}
.gm-question__text { font-size: 18px; font-weight: 600; margin-bottom: 18px; display: flex; gap: 8px; align-items: baseline; }
.gm-question__num { color: var(--primary); font-weight: 700; }
.gm-question__type { margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 8px; background: var(--surface-alt); color: var(--text-muted); border-radius: var(--radius-full); }

.gm-options { display: grid; gap: 10px; }
.gm-option { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.gm-option:hover { border-color: var(--primary); background: var(--primary-50); }
.gm-option input { width: 18px; height: 18px; accent-color: var(--primary); }
.gm-option__label { flex: 1; }
.gm-option.is-selected { border-color: var(--primary); background: var(--primary-50); }

.gm-quiz__hint { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; font-style: italic; }

.gm-arrange { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; background: var(--surface-alt); border-radius: var(--radius-sm); margin-bottom: 12px; min-height: 60px; }
.gm-arrange__word { padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: grab; font-weight: 500; transition: var(--transition); }
.gm-arrange__word:hover { border-color: var(--primary); }
.gm-arrange__word.is-placed { background: var(--primary); color: #fff; border-color: var(--primary); }

.gm-match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gm-match__col { display: flex; flex-direction: column; gap: 8px; }
.gm-match__item { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; cursor: pointer; transition: var(--transition); }
.gm-match__item:hover { border-color: var(--primary); background: var(--primary-50); }
.gm-match__item.is-selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.gm-match__item.is-matched { background: var(--success-light); border-color: var(--success); color: var(--success); }

.gm-quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

.gm-quiz-results { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; animation: gm-fade-up 0.4s ease; }
.gm-quiz-results__score { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.gm-quiz-results__ring {
	width: 100px;
	height: 100px;
	border-radius: var(--radius-full);
	background: conic-gradient(var(--primary) 0deg, var(--surface-alt) 0deg);
	display: grid;
	place-items: center;
	position: relative;
}
.gm-quiz-results__ring::before { content: ''; position: absolute; inset: 8px; background: var(--surface); border-radius: var(--radius-full); }
.gm-quiz-results__ring span { position: relative; font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--primary); }
.gm-quiz-results__xp { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--warning-light); color: #b45309; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 20px; }
.gm-quiz-results__xp .dashicons { color: var(--accent); }
.gm-quiz-results__review { margin-bottom: 20px; }
.gm-quiz-results__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.gm-review-item { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 10px; border-left: 4px solid; }
.gm-review-item--correct { background: var(--success-light); border-color: var(--success); }
.gm-review-item--wrong { background: var(--error-light); border-color: var(--error); }
.gm-review-item__q { font-weight: 600; margin-bottom: 6px; }
.gm-review-item__answer { font-size: 14px; color: var(--text-muted); }
.gm-review-item__explain { font-size: 13px; color: var(--text-muted); margin-top: 6px; font-style: italic; }

/* ----- Locked page ----- */
.gm-locked { display: grid; place-items: center; min-height: 60vh; }
.gm-locked__card { text-align: center; max-width: 400px; }
.gm-locked__card .dashicons { font-size: 56px; width: 56px; height: 56px; color: var(--text-muted); margin-bottom: 16px; }

/* ----- Mistakes page ----- */
.gm-mistakes__stats, .gm-vocab-stats, .gm-spelling-stats, .gm-teacher-stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.gm-mini-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 24px; text-align: center; flex: 1; min-width: 140px; }
.gm-mini-stat__num { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--primary); }
.gm-mini-stat--warn .gm-mini-stat__num { color: var(--warning); }
.gm-mini-stat--good .gm-mini-stat__num { color: var(--success); }
.gm-mini-stat > div:last-child { font-size: 13px; color: var(--text-muted); }

.gm-cat-bars { display: flex; flex-direction: column; gap: 10px; }
.gm-cat-bar { display: grid; grid-template-columns: 160px 1fr 40px; gap: 12px; align-items: center; }
.gm-cat-bar__label { font-size: 13px; }
.gm-cat-bar__track { height: 8px; background: var(--surface-alt); border-radius: var(--radius-full); }
.gm-cat-bar__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-full); }
.gm-cat-bar__count { font-weight: 700; text-align: right; }

.gm-filters { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.gm-filter-select { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }

.gm-mistakes-list { display: flex; flex-direction: column; gap: 16px; }
.gm-mistake-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.gm-mistake-card__head { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.gm-mistake-card__q { font-weight: 600; margin-bottom: 12px; font-size: 16px; }
.gm-mistake-card__answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.gm-mistake-card__answer { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.gm-mistake-card__answer--wrong { background: var(--error-light); color: var(--error); }
.gm-mistake-card__answer--right { background: var(--success-light); color: var(--success); }
.gm-mistake-card__label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.gm-mistake-card__rule, .gm-mistake-card__explanation { font-size: 14px; margin-bottom: 8px; color: var(--text-muted); }
.gm-mistake-card__actions { display: flex; gap: 10px; }

/* ----- Vocabulary page ----- */
.gm-search { display: flex; gap: 8px; margin-bottom: 24px; max-width: 480px; }
.gm-search input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 15px; }
.gm-search input:focus { outline: none; border-color: var(--primary); }

/* ----- Spelling trainer ----- */
.gm-spelling-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.gm-tab { padding: 12px 20px; background: none; border: none; cursor: pointer; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); }
.gm-tab.is-active { color: var(--primary); border-color: var(--primary); }
.gm-spelling-panel { display: none; }
.gm-spelling-panel.is-active { display: block; animation: gm-fade-up 0.3s ease; }
.gm-spelling-exercise { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gm-spelling-input { flex: 1; min-width: 200px; }
.gm-spelling-feedback { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); }
.gm-spelling-feedback.is-correct { background: var(--success-light); color: var(--success); }
.gm-spelling-feedback.is-wrong { background: var(--error-light); color: var(--error); }
.gm-spelling-counter { margin-top: 16px; color: var(--text-muted); font-size: 14px; }

.gm-spelling-mcq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.gm-spelling-find { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* ----- Writing ----- */
.gm-writing-prompt { padding: 14px 18px; background: var(--primary-50); border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.gm-writing-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.gm-writing-item--reviewed { border-left: 4px solid var(--success); }
.gm-writing-item--submitted { border-left: 4px solid var(--warning); }
.gm-writing-item__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.gm-writing-item__date { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.gm-writing-item__prompt { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.gm-writing-item__content { white-space: pre-wrap; padding: 12px; background: var(--surface-alt); border-radius: var(--radius-sm); margin-bottom: 10px; }
.gm-writing-item__feedback { padding: 12px; background: var(--success-light); border-radius: var(--radius-sm); color: #166534; }

/* ----- Reading ----- */
.gm-reading-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.gm-reading-card__head { display: flex; gap: 8px; margin-bottom: 12px; }
.gm-reading-card__passage { line-height: 1.8; margin-bottom: 16px; }
.gm-reading-card__tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----- Revision ----- */
.gm-revision-intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.gm-revision-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.gm-revision-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.gm-revision-card__q { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.gm-revision-card__actions { margin-top: 12px; }
.gm-revision-feedback { margin-top: 14px; padding: 12px; border-radius: var(--radius-sm); }
.gm-revision-feedback.is-correct { background: var(--success-light); color: var(--success); }
.gm-revision-feedback.is-wrong { background: var(--error-light); color: var(--error); }

/* ----- Leaderboard ----- */
.gm-leaderboard-me { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: 16px 24px; display: flex; gap: 16px; align-items: center; margin-bottom: 24px; font-weight: 600; }
.gm-leaderboard-me strong { color: var(--primary); font-size: 22px; }
.gm-leaderboard-table { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gm-leaderboard-row { display: grid; grid-template-columns: 60px 48px 1fr auto; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); transition: var(--transition); }
.gm-leaderboard-row:last-child { border-bottom: none; }
.gm-leaderboard-row:hover { background: var(--surface-alt); }
.gm-leaderboard-row.is-me { background: var(--primary-50); }
.gm-leaderboard-row.is-podium { font-weight: 700; }
.gm-leaderboard-row__pos { font-size: 18px; text-align: center; }
.gm-lb-num { font-family: var(--font-heading); font-size: 18px; color: var(--text-muted); }
.gm-leaderboard-row__avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.gm-leaderboard-row__name { font-weight: 600; }
.gm-leaderboard-row__xp { font-weight: 700; color: var(--primary); }

/* ----- Certificates ----- */
.gm-cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.gm-cert-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; transition: var(--transition); }
.gm-cert-card.is-earned { border-color: var(--accent); box-shadow: 0 0 0 4px var(--warning-light); }
.gm-cert-card.is-pending { opacity: 0.8; }
.gm-cert-card__badge { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: var(--radius-full); background: var(--accent); color: #fff; display: grid; place-items: center; }
.gm-cert-card__badge .dashicons { font-size: 32px; width: 32px; height: 32px; }
.gm-cert-card__badge--locked { background: var(--surface-alt); color: var(--text-light); }
.gm-cert-card__number { font-family: monospace; font-size: 14px; color: var(--text-muted); margin: 12px 0; }
.gm-cert-card__meta { text-align: left; font-size: 14px; margin-bottom: 16px; }
.gm-cert-card__meta div { padding: 4px 0; }

.gm-cert-full { margin-top: 40px; }
.gm-cert-full__paper { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 8px double var(--accent); border-radius: var(--radius-lg); padding: 48px; text-align: center; position: relative; box-shadow: var(--shadow-lg); }
.gm-cert-full__border { position: absolute; inset: 12px; border: 2px solid var(--accent); border-radius: var(--radius); pointer-events: none; }
.gm-cert-full__seal { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--accent); color: #fff; border-radius: var(--radius-full); display: grid; place-items: center; }
.gm-cert-full__seal .dashicons { font-size: 32px; width: 32px; height: 32px; }
.gm-cert-full__name { font-family: 'Poppins', cursive; font-size: 36px; color: var(--primary-dark); margin: 16px 0; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 6px; }
.gm-cert-full__footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; margin-top: 32px; }
.gm-cert-full__date, .gm-cert-full__number { font-weight: 700; color: var(--text); }
.gm-cert-full__label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.gm-cert-full__actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* ----- Teacher ----- */
.gm-teacher-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gm-table { width: 100%; border-collapse: collapse; }
.gm-table th { text-align: left; padding: 10px; border-bottom: 2px solid var(--border); font-size: 13px; color: var(--text-muted); }
.gm-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.gm-cat-list { list-style: none; }
.gm-cat-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ----- Profile ----- */
.gm-profile-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; }
.gm-profile-info { text-align: center; }
.gm-profile-avatar { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: grid; place-items: center; font-size: 32px; font-weight: 700; }
.gm-profile-meta { list-style: none; text-align: left; margin: 20px 0; }
.gm-profile-meta li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.gm-profile-xp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gm-profile-xp > div { padding: 12px; background: var(--surface-alt); border-radius: var(--radius-sm); }
.gm-profile-xp strong { display: block; font-size: 22px; color: var(--primary); }

/* ----- Notifications ----- */
.gm-page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.gm-page-head h1 { font-size: 28px; }
.gm-page-head p { color: var(--text-muted); }
.gm-notif-list { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gm-notif { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: var(--transition); }
.gm-notif:last-child { border-bottom: none; }
.gm-notif.is-unread { background: var(--primary-50); }
.gm-notif__icon { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--surface-alt); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.gm-notif__title { font-weight: 600; }
.gm-notif__text { font-size: 14px; color: var(--text-muted); }
.gm-notif__time { font-size: 12px; color: var(--text-light); }

/* ----- Empty states ----- */
.gm-empty-state { text-align: center; padding: 48px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.gm-empty-state .dashicons { font-size: 48px; width: 48px; height: 48px; color: var(--text-light); margin-bottom: 16px; }
.gm-empty-state h3 { margin-bottom: 8px; }
.gm-empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* ----- Pagination ----- */
.gm-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.gm-pagination__link { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-weight: 600; }
.gm-pagination__link:hover, .gm-pagination__link.is-current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ----- Footer ----- */
.gm-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 0; margin-top: 64px; transition: background var(--transition); }
.gm-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.gm-footer__brand { font-family: var(--font-heading); font-weight: 700; font-size: 20px; margin-bottom: 12px; color: var(--primary); }
.gm-footer__col p { color: var(--text-muted); font-size: 14px; }
.gm-footer__col h4 { font-size: 15px; margin-bottom: 12px; }
.gm-footer__col ul { list-style: none; }
.gm-footer__col li { padding: 4px 0; }
.gm-footer__col a { color: var(--text-muted); font-size: 14px; }
.gm-footer__col a:hover { color: var(--primary); }
.gm-footer__bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ----- Responsive embeds ----- */
.gm-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; }
.gm-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ----- Animations ----- */
@keyframes gm-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes gm-grow { from { width: 0; } }
@keyframes gm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes gm-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.gm-animate-in { animation: gm-fade-up 0.4s ease; }
.gm-shake { animation: gm-shake 0.4s ease; }

/* ----- Responsive ----- */
@media (max-width: 980px) {
	.gm-hero__inner { grid-template-columns: 1fr; }
	.gm-hero__visual { display: none; }
	.gm-months { grid-template-columns: 1fr; }
	.gm-dashboard__grid { grid-template-columns: 1fr; }
	.gm-dash-today, .gm-dash-revision-alert { grid-column: span 1; }
	.gm-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.gm-teacher-grid, .gm-profile-grid { grid-template-columns: 1fr; }
	.gm-cert-grid { grid-template-columns: 1fr; }
	.gm-footer__inner { grid-template-columns: 1fr 1fr; }
	.gm-calendar-grid { grid-template-columns: repeat(10, 1fr); }
}

@media (max-width: 720px) {
	.gm-header__nav { display: none; }
	.gm-header__actions .gm-btn { display: none; }
	.gm-header__burger { display: flex; }
	.gm-user-menu__name { display: none; }
	.gm-hero__title { font-size: 32px; }
	.gm-hero__stats { grid-template-columns: repeat(2, 1fr); }
	.gm-section-title { font-size: 24px; }
	.gm-features__grid { grid-template-columns: 1fr; }
	.gm-areas { grid-template-columns: 1fr; }
	.gm-mistake-card__answers { grid-template-columns: 1fr; }
	.gm-quiz-results__score { flex-direction: column; text-align: center; }
	.gm-calendar-grid { grid-template-columns: repeat(7, 1fr); }
	.gm-footer__inner { grid-template-columns: 1fr; }
	.gm-field--row { grid-template-columns: 1fr; }
	.gm-auth__card { padding: 24px; }
}

@media print {
	.gm-header, .gm-footer, .gm-cert-full__actions { display: none; }
	.gm-cert-full__paper { border-width: 4px; }
	body { background: #fff; }
}

/* ----- Accessibility ----- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ----- Weekly Test Alert ----- */
.gm-dash-test-alert {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--warning-light);
	border: 1px solid var(--warning);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin-bottom: 20px;
}
.gm-dash-test-alert .dashicons { font-size: 32px; width: 32px; height: 32px; color: #b45309; }
.gm-dash-test-alert h3 { margin: 0 0 4px; font-size: 18px; }
.gm-dash-test-alert p { margin: 0; font-size: 14px; color: #92400e; }
.gm-dash-test-alert > a { margin-left: auto; flex-shrink: 0; }

/* ----- AI Tutor Chat ----- */
.gm-ai-chat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	margin-top: 24px;
}
.gm-ai-chat h3 {
	font-size: 18px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--primary);
}
.gm-ai-chat__messages {
	max-height: 300px;
	overflow-y: auto;
	margin-bottom: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.gm-ai-msg {
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
}
.gm-ai-msg--user {
	background: var(--primary-50);
	color: var(--primary);
	align-self: flex-end;
	max-width: 80%;
}
.gm-ai-msg--bot {
	background: var(--surface-alt);
	color: var(--text);
	align-self: flex-start;
	max-width: 90%;
}
.gm-ai-msg--error {
	background: var(--error-light);
	color: var(--error);
}
.gm-ai-chat__input {
	display: flex;
	gap: 8px;
}
.gm-ai-chat__input input {
	flex: 1;
}
.gm-ai-response {
	margin-top: 12px;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-wrap;
}
.gm-ai-explain {
	white-space: nowrap;
}
