/*
 * DMP Smart Class Tracker — classroom app styles.
 * Everything is scoped under .dmp-sct so active themes cannot leak in or out.
 */

/* ---------- Scope reset ---------- */
.dmp-sct,
.dmp-sct *,
.dmp-sct *::before,
.dmp-sct *::after {
	box-sizing: border-box;
}
.dmp-sct h1, .dmp-sct h2, .dmp-sct h3, .dmp-sct p, .dmp-sct ol, .dmp-sct ul, .dmp-sct li, .dmp-sct figure {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
	text-transform: none;
	line-height: inherit;
	box-shadow: none;
}
.dmp-sct ol, .dmp-sct ul { list-style: none; }
.dmp-sct li::before, .dmp-sct li::marker { content: none; }
.dmp-sct img { max-width: 100%; height: auto; border: 0; box-shadow: none; border-radius: 0; }
.dmp-sct button, .dmp-sct select, .dmp-sct input {
	font: inherit;
	color: inherit;
	margin: 0;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	text-shadow: none;
	min-height: 0;
	line-height: 1.2;
}
.dmp-sct button { cursor: pointer; }
.dmp-sct a { color: inherit; text-decoration: none; box-shadow: none; }
.dmp-sct svg { display: block; }

/* ---------- Tokens ---------- */
.dmp-sct {
	--dmp-bg: #080B0B;
	--dmp-surface: #111716;
	--dmp-surface-2: #151B1A;
	--dmp-surface-3: #1C2422;
	--dmp-line: rgba(255, 255, 255, 0.07);
	--dmp-line-strong: rgba(255, 255, 255, 0.13);
	--dmp-text: #FFFFFF;
	--dmp-text-2: #D5DCD8;
	--dmp-muted: #9BA6A0;
	--dmp-faint: #5E6864;
	--dmp-accent: #A8D311;
	--dmp-accent-soft: rgba(168, 211, 17, 0.12);
	--dmp-accent-line: rgba(168, 211, 17, 0.35);
	--dmp-on-accent: #0B0F02;
	--dmp-cyan: #12C9D2;
	--dmp-danger: #FF6B5E;
	--dmp-radius: 16px;
	--dmp-radius-sm: 10px;
	--dmp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--dmp-font: "Inter", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	font-family: var(--dmp-font);
	color: var(--dmp-text);
	background: var(--dmp-bg);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
.dmp-sct[data-theme="midnight"] {
	--dmp-bg: #000000;
	--dmp-surface: #0A0D0D;
	--dmp-surface-2: #0F1413;
	--dmp-surface-3: #161D1B;
}
.dmp-sct[data-theme="graphite"] {
	--dmp-bg: #121617;
	--dmp-surface: #1A1F21;
	--dmp-surface-2: #20272A;
	--dmp-surface-3: #283033;
	--dmp-line: rgba(255, 255, 255, 0.08);
}

/* Full-page mode (standalone template) */
html.dmp-sct-html, body.dmp-sct-body {
	margin: 0;
	padding: 0;
	background: #080B0B;
	min-height: 100%;
}
body.dmp-sct-body > .dmp-sct { min-height: 100vh; }

/* ---------- App frame ---------- */
.dmp-sct .dmp-app {
	display: flex;
	flex-direction: column;
	min-height: inherit;
	opacity: 0;
	transition: opacity 0.5s var(--dmp-ease);
}
.dmp-sct .dmp-app.is-ready { opacity: 1; }

.dmp-sct .dmp-stage {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(300px, 380px) 1fr;
	gap: 24px;
	padding: 24px;
}

/* ---------- Sidebar ---------- */
.dmp-sct .dmp-side {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}
.dmp-sct .dmp-card {
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: var(--dmp-radius);
	padding: 16px 18px;
}
.dmp-sct .dmp-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.dmp-sct .dmp-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dmp-muted);
}
.dmp-sct .dmp-meta__value {
	font-size: 16px;
	font-weight: 600;
	color: var(--dmp-text);
	line-height: 1.3;
}
.dmp-sct .dmp-dayrow {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.dmp-sct .dmp-daycard {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}
.dmp-sct .dmp-daycard__num {
	font-size: 40px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.dmp-sct .dmp-daycard__of {
	font-size: 13px;
	color: var(--dmp-faint);
	font-variant-numeric: tabular-nums;
}

.dmp-sct .dmp-topics {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
}
.dmp-sct .dmp-topics__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.dmp-sct .dmp-topics__count {
	font-size: 12px;
	font-weight: 600;
	color: var(--dmp-muted);
	font-variant-numeric: tabular-nums;
}
.dmp-sct .dmp-topic-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.dmp-sct .dmp-topic {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 14px 14px 16px;
	text-align: left;
	background: var(--dmp-surface);
	border: 1px solid var(--dmp-line);
	border-radius: var(--dmp-radius-sm);
	transition: background-color 0.25s var(--dmp-ease), border-color 0.25s var(--dmp-ease), transform 0.25s var(--dmp-ease);
	-webkit-appearance: none;
	appearance: none;
}
.dmp-sct .dmp-topic::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 12px;
	bottom: 12px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--dmp-accent);
	transform: scaleY(0);
	transition: transform 0.35s var(--dmp-ease);
}
.dmp-sct .dmp-topic__num {
	font-size: 13px;
	font-weight: 700;
	color: var(--dmp-faint);
	font-variant-numeric: tabular-nums;
	min-width: 22px;
	transition: color 0.25s;
}
.dmp-sct .dmp-topic__title {
	font-size: 16px;
	font-weight: 500;
	color: var(--dmp-text-2);
	line-height: 1.35;
	overflow-wrap: anywhere;
	transition: color 0.25s;
}
.dmp-sct .dmp-check {
	width: 28px;
	height: 28px;
	flex: none;
	border-radius: 50%;
	border: 1.5px solid var(--dmp-line-strong);
	display: grid;
	place-items: center;
	transition: background-color 0.3s var(--dmp-ease), border-color 0.3s var(--dmp-ease);
}
.dmp-sct .dmp-check svg {
	width: 60%;
	height: 60%;
}
.dmp-sct .dmp-check path {
	fill: none;
	stroke: var(--dmp-on-accent);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 24;
	stroke-dashoffset: 24;
	transition: stroke-dashoffset 0.4s var(--dmp-ease) 0.08s;
}
.dmp-sct .dmp-topic.is-done { border-color: var(--dmp-accent-line); background: linear-gradient(90deg, var(--dmp-accent-soft), transparent 70%), var(--dmp-surface); }
.dmp-sct .dmp-topic.is-done::before { transform: scaleY(1); }
.dmp-sct .dmp-topic.is-done .dmp-topic__num { color: var(--dmp-accent); }
.dmp-sct .dmp-topic.is-done .dmp-topic__title { color: var(--dmp-text); }
.dmp-sct .dmp-topic.is-done .dmp-check { background: var(--dmp-accent); border-color: var(--dmp-accent); }
.dmp-sct .dmp-topic.is-done .dmp-check path { stroke-dashoffset: 0; }

/* pending (saving) */
.dmp-sct .dmp-topic.is-pending .dmp-check {
	border-color: var(--dmp-line-strong);
	border-top-color: var(--dmp-accent);
	background: transparent;
	animation: dmp-spin 0.8s linear infinite;
}
.dmp-sct .dmp-topic.is-pending .dmp-check path { opacity: 0; }

/* teacher interactions */
.dmp-sct .is-editable .dmp-topic:hover { background-color: var(--dmp-surface-3); border-color: var(--dmp-line-strong); }
.dmp-sct .is-editable .dmp-topic.is-done:hover { border-color: var(--dmp-accent); }
.dmp-sct .is-editable .dmp-topic:active { transform: scale(0.99); }
.dmp-sct .dmp-topic:focus-visible,
.dmp-sct .dmp-btn:focus-visible,
.dmp-sct .dmp-select:focus-visible,
.dmp-sct .dmp-icon-btn:focus-visible {
	outline: 2px solid var(--dmp-accent);
	outline-offset: 2px;
}
.dmp-sct .is-readonly .dmp-topic { cursor: default; }
.dmp-sct .is-editable .dmp-topic.is-locked { cursor: default; opacity: 1; }
.dmp-sct .is-editable .dmp-topic.is-locked:hover { background: linear-gradient(90deg, var(--dmp-accent-soft), transparent 70%), var(--dmp-surface); border-color: var(--dmp-accent-line); }
.dmp-sct .is-editable .dmp-topic.is-locked:active { transform: none; }

.dmp-sct .dmp-empty {
	padding: 28px 12px;
	text-align: center;
	color: var(--dmp-muted);
	font-size: 14px;
	border: 1px dashed var(--dmp-line-strong);
	border-radius: var(--dmp-radius-sm);
}

/* ---------- Main ---------- */
.dmp-sct .dmp-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	min-width: 0;
	padding: 8px 8px 24px;
}
.dmp-sct .dmp-hero {
	width: 100%;
	max-width: 960px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 28px 24px 26px;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: calc(var(--dmp-radius) + 4px);
	text-align: center;
}
.dmp-sct .dmp-hero__logo {
	height: 92px;
	width: auto;
	max-width: 80%;
	object-fit: contain;
}
.dmp-sct .dmp-hero__title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--dmp-text);
	padding-left: 0.34em;
}
.dmp-sct .dmp-hero__sub {
	font-size: 13px;
	color: var(--dmp-muted);
	letter-spacing: 0.02em;
}

.dmp-sct .dmp-pill {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: 999px;
	overflow: hidden;
}
.dmp-sct .dmp-pill__seg {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--dmp-text-2);
	white-space: nowrap;
}
.dmp-sct .dmp-pill__seg + .dmp-pill__seg { border-left: 1px solid var(--dmp-line); }
.dmp-sct .dmp-pill__seg small { font-weight: 500; color: var(--dmp-muted); font-size: 0.92em; }
.dmp-sct .dmp-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dmp-faint);
	flex: none;
}
.dmp-sct [data-session="in_progress"] .dmp-dot { background: var(--dmp-accent); animation: dmp-breathe 2.4s ease-in-out infinite; }
.dmp-sct [data-session="completed"] .dmp-dot { background: var(--dmp-accent); }
.dmp-sct [data-session="completed"] .dmp-session-label { color: var(--dmp-accent); }

/* ---------- Progress ---------- */
.dmp-sct .dmp-progress {
	width: 100%;
	max-width: 1180px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}
.dmp-sct .dmp-progress__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--dmp-muted);
	padding-left: 0.24em;
}
.dmp-sct .dmp-progress__value {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.045em;
	font-variant-numeric: tabular-nums;
	margin: 6px 0 2px;
}
.dmp-sct .dmp-progress__num { font-size: 132px; }
.dmp-sct .dmp-progress__pct {
	font-size: 56px;
	color: var(--dmp-accent);
	margin-top: 0.18em;
	margin-left: 0.06em;
	letter-spacing: -0.02em;
}
.dmp-sct .dmp-progress__count {
	font-size: 18px;
	font-weight: 600;
	color: var(--dmp-text-2);
	font-variant-numeric: tabular-nums;
}
.dmp-sct .dmp-progress__count b { color: var(--dmp-text); font-weight: 700; }
.dmp-sct .dmp-progress__count span { color: var(--dmp-muted); font-weight: 500; }

.dmp-sct .dmp-bar {
	width: 100%;
	margin-top: 22px;
	padding: 22px 26px 16px;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: calc(var(--dmp-radius) + 4px);
}
.dmp-sct .dmp-bar__track {
	position: relative;
	height: 26px;
	border-radius: 999px;
	background: var(--dmp-surface);
	box-shadow: inset 0 0 0 1px var(--dmp-line);
	overflow: hidden;
}
.dmp-sct .dmp-bar__fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, color-mix(in srgb, var(--dmp-accent) 78%, #0b3b1e) 0%, var(--dmp-accent) 100%);
	transition: width 1.1s var(--dmp-ease);
}
.dmp-sct .dmp-bar__fill::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%);
}
.dmp-sct .dmp-bar__ticks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.dmp-sct .dmp-bar__ticks i {
	position: absolute;
	top: 6px;
	bottom: 6px;
	width: 2px;
	margin-left: -1px;
	border-radius: 2px;
	background: rgba(8, 11, 11, 0.55);
}
.dmp-sct .dmp-bar__ends {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 700;
	color: var(--dmp-muted);
	font-variant-numeric: tabular-nums;
}

.dmp-sct .dmp-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
	margin-top: 14px;
}
.dmp-sct .dmp-stat {
	padding: 14px 18px;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: var(--dmp-radius);
}
.dmp-sct .dmp-stat__value {
	display: block;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	margin-top: 4px;
}
.dmp-sct .dmp-stat--done .dmp-stat__value { color: var(--dmp-accent); }

/* ---------- Teacher toolbar ---------- */
.dmp-sct .dmp-toolbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px 14px;
	padding: 12px 24px;
	background: rgba(8, 11, 11, 0.86);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--dmp-line);
}
.dmp-sct[data-theme="graphite"] .dmp-toolbar { background: rgba(18, 22, 23, 0.9); }
.dmp-sct .dmp-toolbar__brand {
	display: flex;
	align-self: center;
	align-items: center;
	gap: 10px;
	padding-right: 6px;
	margin-right: 4px;
	border-right: 1px solid var(--dmp-line);
}
.dmp-sct .dmp-toolbar__brand img { height: 30px; width: auto; }
.dmp-sct .dmp-toolbar__group {
	display: flex;
	align-items: center;
	gap: 8px;
}
.dmp-sct .dmp-toolbar__spacer { flex: 1; }
.dmp-sct .dmp-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.dmp-sct .dmp-field > span {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--dmp-faint);
	padding-left: 2px;
}
.dmp-sct .dmp-select {
	-webkit-appearance: none;
	appearance: none;
	height: 38px;
	padding: 0 34px 0 12px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid var(--dmp-line-strong);
	background-color: var(--dmp-surface-2);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239BA6A0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	color: var(--dmp-text);
	font-size: 14px;
	font-weight: 500;
	max-width: 260px;
	transition: border-color 0.2s;
}
.dmp-sct .dmp-select:hover { border-color: rgba(255, 255, 255, 0.24); }
.dmp-sct .dmp-select option { background: #151B1A; color: #fff; }
.dmp-sct .dmp-select--batch { min-width: 220px; font-weight: 600; }
.dmp-sct .dmp-select--phase { max-width: 320px; }

.dmp-sct .dmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 38px;
	padding: 0 16px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid var(--dmp-line-strong);
	background: var(--dmp-surface-2);
	color: var(--dmp-text);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.dmp-sct .dmp-btn:hover { background: var(--dmp-surface-3); border-color: rgba(255, 255, 255, 0.24); }
.dmp-sct .dmp-btn--primary {
	background: var(--dmp-accent);
	border-color: var(--dmp-accent);
	color: var(--dmp-on-accent);
}
.dmp-sct .dmp-btn--primary:hover { background: color-mix(in srgb, var(--dmp-accent) 88%, #fff); border-color: transparent; }
.dmp-sct .dmp-btn--ghost { background: transparent; border-color: transparent; color: var(--dmp-muted); }
.dmp-sct .dmp-btn--ghost:hover { color: var(--dmp-text); background: var(--dmp-surface-2); }
.dmp-sct .dmp-btn[disabled] { opacity: 0.45; pointer-events: none; }
.dmp-sct .dmp-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid var(--dmp-line-strong);
	background: var(--dmp-surface-2);
	color: var(--dmp-text-2);
	transition: background-color 0.2s, color 0.2s;
}
.dmp-sct .dmp-icon-btn:hover { background: var(--dmp-surface-3); color: var(--dmp-text); }
.dmp-sct .dmp-icon-btn[disabled] { opacity: 0.35; pointer-events: none; }
.dmp-sct .dmp-icon-btn svg { width: 16px; height: 16px; }
.dmp-sct .dmp-icon-btn path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dmp-sct .dmp-save {
	height: 38px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--dmp-muted);
	min-width: 0;
}
.dmp-sct .dmp-save .dmp-dot { background: var(--dmp-accent); }
.dmp-sct .dmp-save[data-state="saving"] .dmp-dot { background: var(--dmp-cyan); animation: dmp-breathe 1s ease-in-out infinite; }
.dmp-sct .dmp-save[data-state="error"] { color: var(--dmp-danger); }
.dmp-sct .dmp-save[data-state="error"] .dmp-dot { background: var(--dmp-danger); }
.dmp-sct .dmp-save[data-state="offline"] .dmp-dot { background: var(--dmp-faint); }

.dmp-sct .dmp-user {
	height: 38px;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 2px;
	font-size: 13px;
	color: var(--dmp-muted);
}

.dmp-sct .dmp-notice {
	margin: 0 24px;
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid var(--dmp-line-strong);
	background: var(--dmp-surface-2);
	color: var(--dmp-text-2);
	font-size: 14px;
}

/* ---------- Toasts ---------- */
.dmp-sct .dmp-toasts {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 60;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: min(380px, calc(100vw - 40px));
	pointer-events: none;
}
.dmp-sct .dmp-toast {
	padding: 12px 16px;
	border-radius: var(--dmp-radius-sm);
	background: var(--dmp-surface-3);
	border: 1px solid var(--dmp-line-strong);
	color: var(--dmp-text);
	font-size: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
	animation: dmp-rise 0.35s var(--dmp-ease);
	pointer-events: auto;
}
.dmp-sct .dmp-toast--error { border-color: rgba(255, 107, 94, 0.45); }
.dmp-sct .dmp-toast--ok { border-color: var(--dmp-accent-line); }

/* ---------- Login / message panels ---------- */
.dmp-sct .dmp-panel {
	max-width: 440px;
	margin: 8vh auto;
	padding: 32px;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-line);
	border-radius: 20px;
	text-align: center;
}
.dmp-sct .dmp-panel img { height: 64px; width: auto; margin: 0 auto 18px; display: block; }
.dmp-sct .dmp-panel h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.dmp-sct .dmp-panel p { color: var(--dmp-muted); font-size: 14px; margin-bottom: 18px; }
.dmp-sct .dmp-panel form { text-align: left; }
.dmp-sct .dmp-panel form p { margin: 0 0 14px; color: var(--dmp-text-2); }
.dmp-sct .dmp-panel label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dmp-sct .dmp-panel input[type="text"],
.dmp-sct .dmp-panel input[type="password"] {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid var(--dmp-line-strong);
	background: var(--dmp-surface);
	color: var(--dmp-text);
	font-size: 15px;
}
.dmp-sct .dmp-panel input[type="text"]:focus,
.dmp-sct .dmp-panel input[type="password"]:focus { outline: 2px solid var(--dmp-accent); outline-offset: 1px; border-color: transparent; }
.dmp-sct .dmp-panel .login-remember label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--dmp-muted); }
.dmp-sct .dmp-panel input[type="submit"] {
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: var(--dmp-radius-sm);
	background: var(--dmp-accent);
	color: var(--dmp-on-accent);
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}

.dmp-sct .dmp-login-error {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: var(--dmp-radius-sm);
	border: 1px solid rgba(255, 107, 94, 0.45);
	background: rgba(255, 107, 94, 0.08);
	color: #FFB4AC;
	font-size: 14px;
	text-align: left;
}
.dmp-sct .dmp-panel .dmp-login-help { margin: 14px 0 0; font-size: 13px; color: var(--dmp-faint); }

/* ---------- Display (classroom screen) ---------- */
.dmp-sct.is-display .dmp-app { height: 100vh; min-height: 100vh; overflow: hidden; }
.dmp-sct.is-display.hide-cursor,
.dmp-sct.is-display.hide-cursor * { cursor: none !important; }
.dmp-sct.is-display .dmp-stage {
	grid-template-columns: 29vw 1fr;
	gap: 2.2vw;
	padding: 2.4vw 2.4vw 1vw;
	min-height: 0;
}
.dmp-sct.is-display .dmp-side { gap: 1.05vh; }
.dmp-sct.is-display .dmp-card { padding: 1.7vh 1.25vw; border-radius: 1vw; }
.dmp-sct.is-display .dmp-eyebrow { font-size: max(11px, 1.15vh); }
.dmp-sct.is-display .dmp-meta__value { font-size: max(14px, 2.05vh); }
.dmp-sct.is-display .dmp-daycard__num { font-size: max(32px, 5.2vh); }
.dmp-sct.is-display .dmp-daycard__of { font-size: max(12px, 1.5vh); }
.dmp-sct.is-display .dmp-topics { padding: 2vh 1.25vw; gap: 1.4vh; }
.dmp-sct.is-display .dmp-topic-list { gap: 1.05vh; flex: 1; justify-content: space-between; }
.dmp-sct.is-display .dmp-topic { padding: 1.9vh 1vw; gap: 1vw; flex: 1; max-height: 12vh; }
.dmp-sct.is-display .dmp-topic__num { font-size: max(13px, 1.6vh); }
.dmp-sct.is-display .dmp-topic__title { font-size: max(15px, 2.25vh); font-weight: 600; }
.dmp-sct.is-display .dmp-check { width: max(26px, 3.5vh); height: max(26px, 3.5vh); }
.dmp-sct.is-display .dmp-topics__count { font-size: max(12px, 1.5vh); }

.dmp-sct.is-display .dmp-main { justify-content: center; gap: 3vh; padding: 0; }
.dmp-sct.is-display .dmp-hero { max-width: none; padding: 3.4vh 2vw 3vh; gap: 1.5vh; border-radius: 1.2vw; }
.dmp-sct.is-display .dmp-hero__logo { height: 13vh; }
.dmp-sct.is-display .dmp-hero__title { font-size: max(14px, 1.9vh); }
.dmp-sct.is-display .dmp-pill__seg { font-size: max(14px, 2vh); padding: 1.2vh 1.4vw; gap: 0.6vw; }
.dmp-sct.is-display .dmp-dot { width: max(8px, 1.1vh); height: max(8px, 1.1vh); }
.dmp-sct.is-display .dmp-progress { max-width: none; gap: 0.6vh; }
.dmp-sct.is-display .dmp-progress__label { font-size: max(13px, 1.75vh); }
.dmp-sct.is-display .dmp-progress__num { font-size: max(96px, 19vh); }
.dmp-sct.is-display .dmp-progress__pct { font-size: max(40px, 7.5vh); }
.dmp-sct.is-display .dmp-progress__count { font-size: max(16px, 2.5vh); }
.dmp-sct.is-display .dmp-bar { margin-top: 2.2vh; padding: 2.8vh 1.8vw 2vh; border-radius: 1.2vw; }
.dmp-sct.is-display .dmp-bar__track { height: max(22px, 3.6vh); }
.dmp-sct.is-display .dmp-bar__ends { font-size: max(13px, 1.75vh); margin-top: 1.3vh; }

.dmp-sct .dmp-foot {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 2.4vw 1.6vh;
	font-size: max(12px, 1.45vh);
	color: var(--dmp-faint);
	font-variant-numeric: tabular-nums;
}
.dmp-sct .dmp-foot__spacer { flex: 1; }
.dmp-sct .dmp-foot__clock { color: var(--dmp-muted); font-weight: 600; }
.dmp-sct .dmp-conn { display: inline-flex; align-items: center; gap: 8px; }
.dmp-sct .dmp-conn .dmp-dot { background: var(--dmp-accent); }
.dmp-sct .dmp-conn[data-state="offline"] { color: var(--dmp-danger); }
.dmp-sct .dmp-conn[data-state="offline"] .dmp-dot { background: var(--dmp-danger); animation: dmp-breathe 1.2s ease-in-out infinite; }
.dmp-sct .dmp-foot .dmp-icon-btn { width: 34px; height: 34px; background: transparent; border-color: var(--dmp-line); color: var(--dmp-muted); }

/* Standby screen */
.dmp-sct .dmp-standby {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3vh;
	text-align: center;
	padding: 4vh 4vw;
}
.dmp-sct .dmp-standby img { height: 24vh; width: auto; max-width: 70vw; }
.dmp-sct .dmp-standby h2 { font-size: max(20px, 3.4vh); font-weight: 700; }
.dmp-sct .dmp-standby p { font-size: max(14px, 2vh); color: var(--dmp-muted); }
.dmp-sct .dmp-standby__clock { font-size: max(28px, 6vh); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Celebration ---------- */
.dmp-sct .dmp-celebrate {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(4, 6, 6, 0.8);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.45s var(--dmp-ease);
}
.dmp-sct .dmp-celebrate.is-open { opacity: 1; }
.dmp-sct .dmp-celebrate canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.dmp-sct .dmp-celebrate__card {
	position: relative;
	width: min(620px, 92vw);
	padding: 44px 40px 36px;
	text-align: center;
	background: var(--dmp-surface-2);
	border: 1px solid var(--dmp-accent-line);
	border-radius: 24px;
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
	transform: translateY(18px) scale(0.97);
	transition: transform 0.6s var(--dmp-ease);
}
.dmp-sct .dmp-celebrate.is-open .dmp-celebrate__card { transform: none; }
.dmp-sct .dmp-celebrate__check { width: 116px; height: 116px; margin: 0 auto 22px; }
.dmp-sct .dmp-celebrate__check circle { fill: var(--dmp-accent-soft); stroke: var(--dmp-accent); stroke-width: 3; stroke-dasharray: 340; stroke-dashoffset: 340; transform: rotate(-90deg); transform-origin: center; }
.dmp-sct .dmp-celebrate__check path { fill: none; stroke: var(--dmp-accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.dmp-sct .dmp-celebrate.is-open .dmp-celebrate__check circle { animation: dmp-draw 0.9s var(--dmp-ease) 0.15s forwards; }
.dmp-sct .dmp-celebrate.is-open .dmp-celebrate__check path { animation: dmp-draw 0.55s var(--dmp-ease) 0.85s forwards; }
.dmp-sct .dmp-celebrate__title {
	font-size: 40px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--dmp-accent);
	line-height: 1.1;
}
.dmp-sct .dmp-celebrate__line { margin-top: 12px; font-size: 22px; font-weight: 600; color: var(--dmp-text); }
.dmp-sct .dmp-celebrate__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--dmp-accent);
	color: var(--dmp-on-accent);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.02em;
}
.dmp-sct .dmp-celebrate__meta { margin-top: 16px; font-size: 14px; color: var(--dmp-muted); }
.dmp-sct .dmp-celebrate__close { position: absolute; top: 14px; right: 14px; }
.dmp-sct.is-display .dmp-celebrate__card { width: min(56vw, 900px); padding: 6vh 3vw 5vh; }
.dmp-sct.is-display .dmp-celebrate__check { width: 17vh; height: 17vh; margin-bottom: 3vh; }
.dmp-sct.is-display .dmp-celebrate__title { font-size: 6.4vh; }
.dmp-sct.is-display .dmp-celebrate__line { font-size: 3.4vh; margin-top: 1.6vh; }
.dmp-sct.is-display .dmp-celebrate__badge { font-size: 2.3vh; padding: 1.1vh 1.6vw; margin-top: 3vh; }
.dmp-sct.is-display .dmp-celebrate__meta { font-size: 2vh; margin-top: 2.4vh; }

/* Course progress inside the celebration */
.dmp-sct .dmp-course {
	margin: 22px auto 0;
	padding: 16px 18px 14px;
	text-align: left;
	background: var(--dmp-surface);
	border: 1px solid var(--dmp-line);
	border-radius: 14px;
}
.dmp-sct .dmp-course__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dmp-sct .dmp-course__label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dmp-muted); }
.dmp-sct .dmp-course__days { font-size: 13px; font-weight: 600; color: var(--dmp-text-2); font-variant-numeric: tabular-nums; }
.dmp-sct .dmp-course__nums { display: flex; justify-content: space-between; align-items: flex-end; margin: 8px 0 10px; }
.dmp-sct .dmp-course__nums strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dmp-sct .dmp-course__nums span { font-size: 12px; font-weight: 600; color: var(--dmp-muted); }
.dmp-sct .dmp-course__done { color: var(--dmp-accent); }
.dmp-sct .dmp-course__right { text-align: right; }
.dmp-sct .dmp-course__left { color: var(--dmp-text); }
.dmp-sct .dmp-course__track { position: relative; height: 12px; border-radius: 99px; background: var(--dmp-surface-3); overflow: hidden; }
.dmp-sct .dmp-course__fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--dmp-accent); transition: width 1.2s var(--dmp-ease); }
.dmp-sct .dmp-course__note { margin-top: 10px; font-size: 13px; color: var(--dmp-text-2); }
.dmp-sct .dmp-course.is-finished { border-color: var(--dmp-accent-line); }
.dmp-sct.is-display .dmp-course { margin-top: 3vh; padding: 2.2vh 1.4vw 2vh; border-radius: 1vw; }
.dmp-sct.is-display .dmp-course__label { font-size: max(11px, 1.5vh); }
.dmp-sct.is-display .dmp-course__days { font-size: max(13px, 2vh); }
.dmp-sct.is-display .dmp-course__nums strong { font-size: max(28px, 4.6vh); }
.dmp-sct.is-display .dmp-course__nums span { font-size: max(12px, 1.7vh); }
.dmp-sct.is-display .dmp-course__track { height: max(12px, 1.7vh); }
.dmp-sct.is-display .dmp-course__note { font-size: max(13px, 2vh); margin-top: 1.4vh; }

/* ---------- Keyframes ---------- */
@keyframes dmp-spin { to { transform: rotate(360deg); } }
@keyframes dmp-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes dmp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dmp-draw { to { stroke-dashoffset: 0; } }
@keyframes dmp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.dmp-sct .dmp-topic.just-done { animation: dmp-pop 0.45s var(--dmp-ease); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.dmp-sct:not(.is-display) .dmp-stage { grid-template-columns: 1fr; }
	.dmp-sct:not(.is-display) .dmp-side { order: 2; }
	.dmp-sct:not(.is-display) .dmp-main { order: 1; padding-bottom: 0; }
	.dmp-sct:not(.is-display) .dmp-progress__num { font-size: 104px; }
	.dmp-sct:not(.is-display) .dmp-progress__pct { font-size: 44px; }
}
@media (max-width: 640px) {
	.dmp-sct .dmp-stage { padding: 14px; gap: 14px; }
	.dmp-sct .dmp-toolbar { position: relative; top: auto; padding: 12px 14px; gap: 10px; align-items: stretch; }
	.dmp-sct .dmp-toolbar__brand, .dmp-sct .dmp-toolbar__spacer { display: none; }
	.dmp-sct .dmp-toolbar > .dmp-field, .dmp-sct .dmp-toolbar__group { width: 100%; }
	.dmp-sct .dmp-toolbar__nav { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
	.dmp-sct .dmp-toolbar__nav > .dmp-field:first-child { grid-column: 1 / -1; }
	.dmp-sct .dmp-toolbar__screen { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
	.dmp-sct .dmp-toolbar__screen .dmp-toolbar__group { width: auto; }
	.dmp-sct .dmp-select { max-width: 100%; width: 100%; padding-right: 28px; background-position: right 9px center; }
	.dmp-sct .dmp-select--batch { min-width: 0; }
	.dmp-sct .dmp-btn { padding: 0 12px; }
	.dmp-sct .dmp-save { height: auto; order: -1; }
	.dmp-sct .dmp-user { width: 100%; height: auto; justify-content: space-between; }
	.dmp-sct:not(.is-display) .dmp-side > .dmp-meta, .dmp-sct:not(.is-display) .dmp-dayrow, .dmp-sct:not(.is-display) .dmp-stats { display: none; }
	.dmp-sct .dmp-pill { flex-direction: column; border-radius: 14px; width: 100%; }
	.dmp-sct .dmp-pill__seg { justify-content: center; }
	.dmp-sct .dmp-pill__seg + .dmp-pill__seg { border-left: 0; border-top: 1px solid var(--dmp-line); }
	.dmp-sct .dmp-main { gap: 18px; padding: 0; }
	.dmp-sct .dmp-bar { margin-top: 14px; }
	.dmp-sct .dmp-hero { padding: 18px 14px; gap: 10px; }
	.dmp-sct .dmp-hero__logo { height: 64px; }
	.dmp-sct .dmp-hero__title { font-size: 12px; letter-spacing: 0.24em; }
	.dmp-sct:not(.is-display) .dmp-progress__num { font-size: 84px; }
	.dmp-sct:not(.is-display) .dmp-progress__pct { font-size: 36px; }
	.dmp-sct .dmp-pill__seg { padding: 8px 12px; font-size: 13px; }
	.dmp-sct .dmp-bar { padding: 16px; }
	.dmp-sct .dmp-stat__value { font-size: 22px; }
	.dmp-sct .dmp-celebrate__title { font-size: 28px; }
	.dmp-sct .dmp-celebrate__line { font-size: 18px; }
	.dmp-sct .dmp-celebrate__card { padding: 32px 22px 26px; }
}
/* Portrait displays (rare): stack */
@media (orientation: portrait) {
	.dmp-sct.is-display .dmp-app { height: auto; overflow: visible; }
	.dmp-sct.is-display .dmp-stage { grid-template-columns: 1fr; }
	.dmp-sct.is-display .dmp-side { order: 2; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.dmp-sct *, .dmp-sct *::before, .dmp-sct *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.dmp-sct .dmp-topic.is-pending .dmp-check { animation: none; border-style: dashed; }
}
