/* =========================================================
   ABZ LEARNING - ELECTRIC CANVAS THEME (CONSOLIDATED)
   ========================================================= */

:root {
  --bg-color: #F1F5F9; 
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text-main: #334155;
  --text-heading: #0F172A;
  --text-muted: #64748B;
  --primary-pink: #FF1E89; 
  --primary-pink-hover: #E6006F; 
  --pink-light: #FCE7F3;
  --accent-cyan: #06B6D4; 
  --cyan-light: #CFFAFE;
  --accent-teal: #06B6D4; 
  --teal-light: #CFFAFE;
  --accent-amber: #F59E0B;
  --amber-light: #FEF3C7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Poppins', Arial, sans-serif; color: var(--text-main); background-color: var(--bg-color); font-weight: 400; }
button, input, select { font-family: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
body.modal-open { overflow: hidden; }

/* PRIVACY MODE (FERPA Compliance) */
body.privacy-mode .blur-sensitive,
body.privacy-mode .result-card h3,
body.privacy-mode .roster-mini-card h3,
body.privacy-mode .student-profile-top h3,
body.privacy-mode .result-score,
body.privacy-mode .student-profile-stats strong,
body.privacy-mode .accuracy-row-right span {
  filter: blur(6px);
  opacity: 0.7;
  user-select: none;
}

/* LAYOUT & SIDEBAR */
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 20px; display: flex; flex-direction: column; gap: 24px; background-color: var(--surface); border-right: 1px solid var(--border); z-index: 10; }
.brand-block { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-heading); }
.brand-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
.brand-block h1 { margin: 0; font-size: 1.5rem; line-height: 1; font-weight: 600; }
.brand-block p { margin: 4px 0 0; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.sidebar-nav { display: grid; gap: 8px; }
.nav-link { width: 100%; border: 0; color: var(--text-main); background: transparent; text-decoration: none; text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; font-weight: 500; transition: all 0.2s ease; }
.nav-link span { font-size: 1.2rem; }
.nav-link:hover { background: var(--bg-color); color: var(--text-heading); }
.nav-link.active { background: var(--pink-light); color: var(--primary-pink); font-weight: 600; }
.sidebar-card { margin-top: auto; padding: 16px; border-radius: 12px; background: var(--bg-color); border: 1px solid var(--border); }
.sidebar-card-kicker { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.sidebar-card strong { display: block; font-size: 1.5rem; margin-bottom: 4px; color: var(--text-heading); font-weight: 600; }
.sidebar-card span { color: var(--text-muted); font-size: 0.85rem; }

/* MAIN CONTENT AREA */
.dashboard-main { min-width: 0; padding: 32px clamp(20px, 4vw, 40px); display: grid; gap: 24px; align-content: start; }
#dashboardOverview { display: none !important; }
.topbar { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 0 24px 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--primary-pink); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.topbar h2 { font-size: 2.2rem !important; color: var(--text-heading) !important; letter-spacing: -0.03em !important; margin: 0; font-weight: 600; }
.topbar-subtitle, .section-title-row p:not(.section-kicker) { margin: 6px 0 0; color: var(--text-muted); font-size: 0.95rem; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 12px !important; align-items: center; justify-content: flex-end; }

/* Buttons */
.primary-action-btn, .secondary-action-btn, .ghost-btn, .tiny-pill-btn, .primary-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; min-height: 40px; padding: 0 16px; border: 0; font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: all 0.2s ease; }
.primary-action-btn, .primary-btn, .tiny-pill-btn.solid { color: white; background: var(--primary-pink); }
.primary-action-btn:hover, .primary-btn:hover, .tiny-pill-btn.solid:hover { background: var(--primary-pink-hover); }
.secondary-action-btn, .ghost-btn, .tiny-pill-btn { color: var(--text-main); background: var(--surface); border: 1px solid var(--border); }
.secondary-action-btn:hover, .ghost-btn:hover, .tiny-pill-btn:hover { background: var(--bg-color); }

.review-result-btn, .assign-student-btn { background: var(--pink-light); color: var(--primary-pink); border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
.review-result-btn:hover, .assign-student-btn:hover { background: #FBCFE8; transform: translateY(-1px); }
.danger-text { color: #EF4444 !important; }
.danger-text:hover { background: #FEF2F2 !important; color: #B91C1C !important; }

/* STAT CARDS */
.dash-card, .action-stat-card, .modal-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); border-radius: var(--radius); }
.action-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.action-stat-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.clickable-card { cursor: pointer; }
.clickable-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-topline { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; }
#studentsStatCard .stat-icon { background: var(--indigo-light); color: var(--accent-indigo); }
#unreadSubmissionsCard .stat-icon { background: var(--pink-light); color: var(--primary-pink); }
#incompleteAssignmentsCard .stat-icon { background: var(--amber-light); color: var(--accent-amber); }
.purple-card .stat-icon { background: var(--teal-light); color: var(--accent-teal); }
.stat-chip, .action-stat-card small { display: none; }
.action-stat-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.action-stat-card strong { color: var(--text-heading); font-size: 2rem; font-weight: 600; line-height: 1; }

/* LISTS & QUEUES */
.dash-card { padding: 24px; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-actions { display: flex; gap: 8px; }
.section-title-row h2 { margin: 0; color: var(--text-heading); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.results-list, .roster-mini-grid, .modal-list { display: flex; flex-direction: column; gap: 12px; }

/* RESULT CARDS (CLICKABLE) */
.result-card, .incomplete-card { padding: 16px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 5px rgba(0,0,0,0.02); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s ease; cursor: pointer; }
.result-card:hover, .incomplete-card:hover { border-color: rgba(255, 30, 137, 0.5); box-shadow: 0 6px 16px rgba(255, 30, 137, 0.08); transform: translateY(-2px); }
.result-card.unread-result { border-left: 4px solid var(--primary-pink); }
.result-card h3 { margin: 0 0 4px; color: var(--text-heading); font-size: 1rem; font-weight: 500; }
.result-score { display: inline-block; background: var(--teal-light); color: #0F766E; padding: 4px 10px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; margin-top: 8px; }
.submission-status { font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; font-weight: 500; }
.submission-status.unread { background: var(--pink-light); color: var(--primary-pink); }
.submission-status.viewed { background: var(--bg-color); color: var(--text-muted); }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bg-color); }
.result-pill, .status-badge { background: var(--bg-color); border: 1px solid var(--border); color: var(--text-muted); border-radius: 6px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600; }
.status-badge { background: var(--amber-light); color: #B45309; border-color: #FDE68A; }

/* FIX FOR INCOMPLETE ASSIGNMENT IMAGES */
.activity-cover-mini { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--bg-color); display: grid; place-items: center; font-size: 1.5rem; }
.activity-cover-mini img { width: 100%; height: 100%; object-fit: cover; }
.incomplete-card { display: flex; gap: 16px; align-items: center; justify-content: flex-start; cursor: default; }
.incomplete-card:hover { transform: none; border-color: var(--border); box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.incomplete-card > div:nth-child(2) { flex-grow: 1; }
.incomplete-card h3 { margin: 0 0 4px 0; color: var(--text-heading); font-size: 1rem; font-weight: 600; }
.incomplete-card p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

.roster-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.roster-mini-card { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-align: center; transition: transform 0.2s ease; }
.roster-mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.student-avatar { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: var(--indigo-light); display: grid; place-items: center; font-size: 1.2rem; overflow: hidden; }
.student-avatar img { width: 100%; height: 100%; object-fit: cover; }
.roster-mini-card h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--text-heading); font-weight: 500; }
.mini-card-actions { display: flex; justify-content: center; gap: 8px; }
.roster-mini-card button { color: var(--text-muted); font-size: 0.85rem; border: none; background: transparent; transition: 0.2s ease; padding: 4px 8px; border-radius: 6px; }
.roster-mini-card button:hover { background: var(--bg-color); color: var(--text-heading); }

.empty-state { text-align: center; padding: 40px 20px; background: var(--bg-color); border-radius: 12px; border: 1px dashed var(--border); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }

/* MODALS & TABS */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); }
.modal-card { width: min(600px, 100%); max-height: 90vh; overflow: auto; border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.wide-modal { width: min(900px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-header h2 { margin: 0; color: var(--text-heading); font-size: 1.5rem; font-weight: 600; }
.modal-close-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 1.5rem; display: grid; place-items: center; }
.modal-close-btn:hover { background: var(--bg-color); color: var(--text-main); }

.modal-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.modal-tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 0.9rem; transition: all 0.2s ease; }
.modal-tab:hover { background: var(--bg-color); color: var(--text-heading); }
.modal-tab.active { background: var(--primary-pink); color: white; border-color: var(--primary-pink); box-shadow: 0 4px 10px rgba(255, 30, 137, 0.2); }

/* FORMS, SEARCH, DROPDOWNS */
.modern-form { display: grid; gap: 16px; }
.modern-form label { display: grid; gap: 6px; color: var(--text-heading); font-size: 0.9rem; font-weight: 500; }
.modern-form input, .modern-form select { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; background: var(--surface); color: var(--text-main); }
.modern-form input:focus, .modern-form select:focus { border-color: var(--primary-pink); outline: none; box-shadow: 0 0 0 3px var(--pink-light); }
.modal-search-wrap { margin-bottom: 16px; }
.modal-search-input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; }
.modal-search-input:focus { border-color: var(--primary-pink); outline: none; box-shadow: 0 0 0 3px var(--pink-light); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px !important; cursor: pointer; }
select:hover { border-color: #CBD5E1 !important; }

/* SKILL CHIPS */
.skill-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.skill-chip { padding: 10px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; }
.skill-chip:hover { border-color: var(--primary-pink); color: var(--text-main); }
.skill-chip.selected { background: var(--primary-pink); color: white; border-color: var(--primary-pink); box-shadow: 0 4px 10px rgba(255, 30, 137, 0.25); }

/* CLASS ACCURACY ROWS */
.accuracy-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: all 0.2s; margin-bottom: 10px; }
.accuracy-row:hover { border-color: var(--accent-cyan); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.accuracy-row-left { display: flex; align-items: center; gap: 16px; }
.accuracy-row-left strong { display: block; font-size: 1.1rem; color: var(--text-heading); margin-bottom: 4px; }
.accuracy-row-left span { font-size: 0.85rem; color: var(--text-muted); }
.accuracy-row-right span { font-size: 1.4rem; font-weight: 800; color: var(--primary-pink); }

/* ALL STUDENTS / PROFILE MODALS */
.student-modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.student-profile-card { border: 1px solid var(--border); border-radius: 16px; padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 16px; transition: transform 0.2s ease, border-color 0.2s ease; }
.student-profile-card:hover { transform: translateY(-2px); border-color: rgba(255, 30, 137, 0.5); }
.student-profile-top { display: flex; align-items: center; gap: 16px; }
.student-avatar-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--indigo-light); color: var(--accent-indigo); display: grid; place-items: center; font-size: 1.5rem; overflow: hidden; }
.student-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.student-profile-top h3 { margin: 0 0 4px 0; font-size: 1.1rem; color: var(--text-heading); }
.student-profile-top p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.student-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.student-profile-stats span { background: var(--bg-color); border-radius: 8px; padding: 12px 4px; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.student-profile-stats strong { font-size: 1.3rem; color: var(--text-heading); }
.student-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.student-modal-actions button { flex: 1; padding: 10px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); transition: all 0.2s ease; white-space: nowrap; }
.student-modal-actions button:hover { background: var(--bg-color); color: var(--text-heading); }
.student-modal-actions .assign-student-btn { background: var(--pink-light); color: var(--primary-pink); border-color: transparent; }
.student-modal-actions .assign-student-btn:hover { background: #FBCFE8; }
.student-modal-actions .archive-student-btn { color: #EF4444; }
.student-modal-actions .archive-student-btn:hover { background: #FEF2F2; border-color: #FECACA; }

/* Student Profile Modal (Restored formatting) */
.student-file-hero { display: flex; align-items: center; gap: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.file-avatar { width: 80px; height: 80px; font-size: 2.5rem; }
.student-file-hero h3 { margin: 0 0 4px 0; font-size: 1.5rem; color: var(--text-heading); }
.student-file-hero p { margin: 0; color: var(--text-muted); }
.student-overview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 600px) { .student-overview-grid { grid-template-columns: repeat(2, 1fr); } }
.summary-card { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.summary-card span { display: block; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.summary-card strong { font-size: 1.5rem; color: var(--text-heading); }
.student-actions { margin-bottom: 24px; display: flex; }
.student-file-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.student-file-tab { padding: 8px 16px; border-radius: 999px; background: var(--bg-color); color: var(--text-muted); font-weight: 600; border: none; }
.student-file-tab.active { background: var(--primary-pink); color: white; }

/* REVIEW MODAL */
.answer-review-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.answer-review-card.incorrect { border-left: 5px solid #EF4444; }
.answer-review-card.correct { border-left: 5px solid #10B981; }
.answer-review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.answer-review-top span { padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.answer-review-card.incorrect .answer-review-top span { background: #FEE2E2; color: #B91C1C; }
.answer-review-card.correct .answer-review-top span { background: #D1FAE5; color: #047857; }
.question-box, .passage-box { background: var(--bg-color); padding: 16px; border-radius: 8px; margin-bottom: 16px; color: var(--text-heading); }
.answer-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .answer-compare-grid { grid-template-columns: 1fr; } }
.answer-box { padding: 16px; border-radius: 8px; border: 1px solid transparent; }
.answer-box span { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; font-weight: 600; }
.student-answer { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.correct-answer { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }

/* ASSIGN WIZARD */
.wizard-progress { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard-dot { flex: 1; padding: 10px; text-align: center; background: var(--bg-color); border-radius: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; }
.wizard-dot.active { background: var(--primary-pink); color: white; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.wizard-step-head { margin-bottom: 16px; }
.wizard-step-head h3 { margin: 0 0 4px 0; color: var(--text-heading); font-size: 1.2rem; }
.wizard-step-head p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.wizard-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.assign-student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.assign-student-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color 0.2s; }
.assign-student-option:hover { border-color: var(--primary-pink); }
.assign-student-option input { margin-left: auto; width: 18px; height: 18px; accent-color: var(--primary-pink); }
.assign-activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.assign-activity-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; padding: 0; overflow: hidden; transition: all 0.2s ease; }
.assign-activity-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.assign-activity-card.selected { border: 2px solid var(--primary-pink); }
.activity-cover { height: 100px; background: var(--bg-color); }
.activity-cover img { width: 100%; height: 100%; object-fit: cover; }
.assign-activity-card div:not(.activity-cover) { padding: 16px; }
.assign-activity-card h3 { margin: 0 0 4px 0; font-size: 1rem; color: var(--text-heading); }
.assign-activity-card p { margin: 0 0 12px 0; font-size: 0.85rem; color: var(--text-muted); }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.confirm-item { background: var(--bg-color); padding: 16px; border-radius: 12px; border: 1px solid var(--border); text-align: left; }
.confirm-item span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; font-weight: 600; }
.confirm-item strong { color: var(--text-heading); font-size: 0.95rem; }
.success-panel { padding: 40px 20px; position: relative; text-align: center; }
.success-burst { width: 80px; height: 80px; background: #10B981; color: white; border-radius: 50%; display: grid; place-items: center; font-size: 2.5rem; margin: 0 auto 24px auto; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2); animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.wizard-step.active .success-panel::after { content: ""; display: block; width: 0%; height: 6px; background: var(--primary-pink); border-radius: 4px; margin: 30px auto 0 auto; max-width: 300px; animation: loadProgress 1.5s ease-out forwards; }
@keyframes loadProgress { 0% { width: 0%; opacity: 1; } 80% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }

/* CREATE STUDENT MODAL */
.icon-password-builder { background: var(--bg-color); padding: 16px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 16px; }
.icon-password-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.icon-password-head h3 { margin: 0 0 4px 0; font-size: 1rem; color: var(--text-heading); }
.icon-password-head p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.selected-icon-row { display: flex; gap: 8px; margin-bottom: 16px; }
.selected-icon-row span { width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface); border: 2px dashed var(--border); border-radius: 12px; font-size: 1.5rem; font-weight: 600; color: var(--text-muted); }
.selected-icon-row span:not(.empty-icon-slot) { border-style: solid; border-color: var(--primary-pink); background: var(--pink-light); }
.password-icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 480px) { .password-icon-grid { grid-template-columns: repeat(4, 1fr); } }
.password-icon-btn { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 1.5rem; transition: all 0.2s; display: grid; place-items: center; }
.password-icon-btn:hover { border-color: var(--primary-pink); transform: translateY(-2px); }
.password-icon-btn.selected { background: var(--pink-light); border-color: var(--primary-pink); }

/* RESPONSIVE TWEAKS */
@media (max-width: 1024px) { .dashboard-shell { grid-template-columns: 220px minmax(0,1fr); } .action-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .dashboard-shell { grid-template-columns: 1fr; } .sidebar { height: auto; position: relative; padding: 16px; border-right: none; border-bottom: 1px solid var(--border); } .sidebar-nav { grid-template-columns: repeat(2, 1fr); } .topbar { flex-direction: column; align-items: flex-start; } .topbar-actions { justify-content: flex-start; width: 100%; } }
@media (max-width: 480px) { .dashboard-main { padding: 16px; } .action-stats-grid, .sidebar-nav { grid-template-columns: 1fr; } .modal-card { padding: 20px; } .primary-action-btn, .secondary-action-btn { width: 100%; } }

/* Styling for the Gamertag element in student profiles */
.hero-profile-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-gamertag {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--accent-cyan) !important; /* Uses your high-energy electric cyan */
}

/* Ensure privacy mode also blurs the newly added gamertag text string */
body.privacy-mode .profile-gamertag span {
  filter: blur(6px);
  opacity: 0.7;
  user-select: none;
}

.student-incomplete-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
  margin-bottom: 18px;
}

.student-incomplete-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.student-incomplete-header h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.student-incomplete-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.student-incomplete-list {
  display: grid;
  gap: 12px;
}

.result-small-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.submission-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.submission-info-strip span {
  background: var(--bg-color);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.correct-answers-details {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 16px;
}

.correct-answers-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text-heading);
}

.correct-answer-list {
  margin-top: 16px;
}

/* Add this to the bottom of teacher_dashboard.css for clickable completed/incomplete counts and assignment delete controls. */

.student-profile-stats.clickable-stats {
  align-items: stretch;
}

.student-stat-btn {
  appearance: none;
  border: 0;
  border-radius: 16px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 14px 16px;
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 4px;
  font: inherit;
  font-weight: 800;
  transition: 0.18s ease;
}

.student-stat-btn strong {
  font-size: 1.5rem;
  line-height: 1;
}

.student-stat-btn span {
  font-size: 0.85rem;
  color: #64748b;
}

.student-stat-btn:hover,
.student-stat-btn:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: #fde8f3;
  box-shadow: 0 12px 28px rgba(255, 30, 137, 0.14);
}

.clickable-overview-grid .summary-card-btn {
  border: 1px solid #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.clickable-overview-grid .summary-card-btn:hover,
.clickable-overview-grid .summary-card-btn:focus-visible,
.clickable-overview-grid .summary-card-btn.active {
  outline: none;
  border-color: #ff1e89;
  background: #fde8f3;
  transform: translateY(-2px);
}

.incomplete-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.incomplete-card-main h3,
.incomplete-card-main p {
  margin-top: 0;
}

.incomplete-student-name {
  margin: 0 0 4px;
  color: #64748b;
  font-weight: 800;
  font-size: 0.85rem;
}

.incomplete-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.delete-assignment-btn {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .incomplete-card {
    grid-template-columns: 58px 1fr;
  }

  .incomplete-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* =========================================================
   ABZ Teacher Dashboard — Assignment controls polish
   Paste at the BOTTOM of teacher_dashboard.css
   ========================================================= */

.student-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-profile-stats.clickable-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.student-profile-stats.clickable-stats .student-stat-btn {
  width: 100%;
  min-height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.13), transparent 36%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  color: #0f172a;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.student-profile-stats.clickable-stats .student-stat-btn:hover,
.student-profile-stats.clickable-stats .student-stat-btn:focus-visible {
  transform: translateY(-3px);
  border-color: #ff8ac2;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.2), transparent 38%),
    linear-gradient(180deg, #fff7fb 0%, #f3fbff 100%);
  box-shadow: 0 16px 36px rgba(255, 30, 137, 0.13), 0 8px 20px rgba(15, 23, 42, 0.08);
  outline: none;
}

.student-profile-stats.clickable-stats .student-stat-btn strong {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.student-profile-stats.clickable-stats .student-stat-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #64748b;
  font-weight: 900;
  font-size: 0.9rem;
}

.student-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.student-modal-actions > button {
  width: 100%;
  min-height: 48px;
}

.student-modal-actions .archive-student-btn {
  grid-column: 1 / -1;
}

.clickable-overview-grid .summary-card-btn {
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clickable-overview-grid .summary-card-btn:hover,
.clickable-overview-grid .summary-card-btn.active {
  transform: translateY(-2px);
  border-color: #ff8ac2;
  background: linear-gradient(180deg, #fff7fb 0%, #ffffff 100%);
  box-shadow: 0 14px 32px rgba(255, 30, 137, 0.12);
}

.incomplete-card {
  align-items: center;
  gap: 18px;
}

.incomplete-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.incomplete-card-main h3,
.incomplete-card-main p {
  overflow-wrap: anywhere;
}

.incomplete-card-actions {
  min-width: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.delete-assignment-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 15px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(135deg, #fff1f2 0%, #ffe4ec 100%);
  color: #be123c;
  font-weight: 950;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.26), 0 8px 18px rgba(244, 63, 94, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.delete-assignment-btn:hover,
.delete-assignment-btn:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fb7185 0%, #ff1e89 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.24);
  outline: none;
}

.delete-assignment-btn:active {
  transform: translateY(0);
}

.delete-assignment-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.delete-assignment-btn:hover .delete-assignment-icon,
.delete-assignment-btn:focus-visible .delete-assignment-icon {
  background: rgba(255, 255, 255, 0.22);
}

.student-incomplete-header {
  gap: 16px;
}

.student-incomplete-header .tiny-pill-btn {
  white-space: nowrap;
}

@media (max-width: 780px) {
  .student-modal-actions {
    grid-template-columns: 1fr;
  }

  .incomplete-card {
    align-items: flex-start;
  }

  .incomplete-card-actions {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .delete-assignment-btn {
    width: 100%;
  }
}

/* =========================================================
   ABZ Teacher Dashboard — Assignment controls polish
   Paste at the BOTTOM of teacher_dashboard.css
   ========================================================= */

.student-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-profile-stats.clickable-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.student-profile-stats.clickable-stats .student-stat-btn {
  width: 100%;
  min-height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.13), transparent 36%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  color: #0f172a;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.student-profile-stats.clickable-stats .student-stat-btn:hover,
.student-profile-stats.clickable-stats .student-stat-btn:focus-visible {
  transform: translateY(-3px);
  border-color: #ff8ac2;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.2), transparent 38%),
    linear-gradient(180deg, #fff7fb 0%, #f3fbff 100%);
  box-shadow: 0 16px 36px rgba(255, 30, 137, 0.13), 0 8px 20px rgba(15, 23, 42, 0.08);
  outline: none;
}

.student-profile-stats.clickable-stats .student-stat-btn strong {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.student-profile-stats.clickable-stats .student-stat-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #64748b;
  font-weight: 900;
  font-size: 0.9rem;
}

.student-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.student-modal-actions > button {
  width: 100%;
  min-height: 48px;
}

.student-modal-actions .archive-student-btn {
  grid-column: 1 / -1;
}

.clickable-overview-grid .summary-card-btn {
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clickable-overview-grid .summary-card-btn:hover,
.clickable-overview-grid .summary-card-btn.active {
  transform: translateY(-2px);
  border-color: #ff8ac2;
  background: linear-gradient(180deg, #fff7fb 0%, #ffffff 100%);
  box-shadow: 0 14px 32px rgba(255, 30, 137, 0.12);
}

.incomplete-card {
  align-items: center;
  gap: 18px;
}

.incomplete-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.incomplete-card-main h3,
.incomplete-card-main p {
  overflow-wrap: anywhere;
}

.incomplete-card-actions {
  min-width: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.delete-assignment-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 15px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(135deg, #fff1f2 0%, #ffe4ec 100%);
  color: #be123c;
  font-weight: 950;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.26), 0 8px 18px rgba(244, 63, 94, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.delete-assignment-btn:hover,
.delete-assignment-btn:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fb7185 0%, #ff1e89 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.24);
  outline: none;
}

.delete-assignment-btn:active {
  transform: translateY(0);
}

.delete-assignment-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.delete-assignment-btn:hover .delete-assignment-icon,
.delete-assignment-btn:focus-visible .delete-assignment-icon {
  background: rgba(255, 255, 255, 0.22);
}

.student-incomplete-header {
  gap: 16px;
}

.student-incomplete-header .tiny-pill-btn {
  white-space: nowrap;
}

@media (max-width: 780px) {
  .student-modal-actions {
    grid-template-columns: 1fr;
  }

  .incomplete-card {
    align-items: flex-start;
  }

  .incomplete-card-actions {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .delete-assignment-btn {
    width: 100%;
  }
}

/* Direct skill/case-file assignment setup
   Used for activities like Phonics Detectives where the activity itself already IS the subject. */
.assign-wizard-card.direct-skill-setup .wizard-config-form {
  gap: 18px;
}

.assign-wizard-card.direct-skill-setup #wizardSkillLabel {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
}

.assign-wizard-card.direct-skill-setup .skill-chip-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.assign-wizard-card.direct-skill-setup .case-file-chip {
  min-height: 112px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.assign-wizard-card.direct-skill-setup .case-file-chip span {
  display: block;
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.15;
}

.assign-wizard-card.direct-skill-setup .case-file-chip small,
.assign-wizard-card.direct-skill-setup .case-file-chip em {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1.25;
}

.assign-wizard-card.direct-skill-setup .case-file-chip.selected {
  border-color: #ff1e89;
  background: linear-gradient(135deg, #fff1f7 0%, #ecfeff 100%);
  box-shadow: 0 16px 38px rgba(255, 30, 137, 0.18);
}

/* =========================================================
   Phonics Detectives — exact case-file assignment layout
   Shows only the five case files the game actually has.
   ========================================================= */
.assign-wizard-card.direct-skill-setup .skill-chip-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.assign-wizard-card.direct-skill-setup .case-file-chip {
  position: relative;
  min-height: 178px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  border-radius: 28px;
  padding: 22px 22px 20px;
  border: 2px solid transparent;
  background: linear-gradient(145deg, #ffe08a 0%, #ffc75b 100%);
  box-shadow: 0 16px 0 rgba(15, 23, 42, 0.13), 0 22px 44px rgba(15, 23, 42, 0.1);
  color: #102044;
}

.assign-wizard-card.direct-skill-setup .case-file-chip::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 49%;
  height: 42px;
  border-bottom-left-radius: 28px;
  background: rgba(255, 255, 255, 0.34);
}

.assign-wizard-card.direct-skill-setup .case-file-chip:nth-child(2),
.assign-wizard-card.direct-skill-setup .case-file-chip:nth-child(4) {
  background: linear-gradient(145deg, #ffacd5 0%, #f86fb1 100%);
}

.assign-wizard-card.direct-skill-setup .case-file-chip:nth-child(3) {
  background: linear-gradient(145deg, #a9fff0 0%, #41d4cc 100%);
}

.assign-wizard-card.direct-skill-setup .case-file-chip:nth-child(5) {
  background: linear-gradient(145deg, #fff09a 0%, #ffd15f 100%);
}

.assign-wizard-card.direct-skill-setup .case-file-chip:hover,
.assign-wizard-card.direct-skill-setup .case-file-chip:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 30, 137, 0.55);
  box-shadow: 0 18px 0 rgba(15, 23, 42, 0.16), 0 28px 54px rgba(255, 30, 137, 0.16);
  outline: none;
}

.assign-wizard-card.direct-skill-setup .case-file-chip.selected {
  border-color: #ff1e89;
  box-shadow: 0 18px 0 rgba(15, 23, 42, 0.16), 0 0 0 5px rgba(255, 30, 137, 0.16), 0 28px 60px rgba(255, 30, 137, 0.18);
}

.case-file-chip-top {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.case-file-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 1.55rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.assign-wizard-card.direct-skill-setup .case-file-chip strong {
  display: block;
  color: #111b3d;
  font-size: 1.15rem;
  font-weight: 1000;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.assign-wizard-card.direct-skill-setup .case-file-chip p {
  position: relative;
  z-index: 1;
  margin: 10px 0 14px;
  color: rgba(17, 27, 61, 0.82);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.32;
}

.case-file-patterns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.case-file-patterns span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 43, 76, 0.78);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 950;
}

@media (max-width: 980px) {
  .assign-wizard-card.direct-skill-setup .skill-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .assign-wizard-card.direct-skill-setup .skill-chip-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ABZ Teacher Dashboard — Assignment controls polish
   Paste at the BOTTOM of teacher_dashboard.css
   ========================================================= */

.student-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-profile-stats.clickable-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.student-profile-stats.clickable-stats .student-stat-btn {
  width: 100%;
  min-height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.13), transparent 36%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  color: #0f172a;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.student-profile-stats.clickable-stats .student-stat-btn:hover,
.student-profile-stats.clickable-stats .student-stat-btn:focus-visible {
  transform: translateY(-3px);
  border-color: #ff8ac2;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 30, 137, 0.2), transparent 38%),
    linear-gradient(180deg, #fff7fb 0%, #f3fbff 100%);
  box-shadow: 0 16px 36px rgba(255, 30, 137, 0.13), 0 8px 20px rgba(15, 23, 42, 0.08);
  outline: none;
}

.student-profile-stats.clickable-stats .student-stat-btn strong {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.student-profile-stats.clickable-stats .student-stat-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #64748b;
  font-weight: 900;
  font-size: 0.9rem;
}

.student-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.student-modal-actions > button {
  width: 100%;
  min-height: 48px;
}

.student-modal-actions .archive-student-btn {
  grid-column: 1 / -1;
}

.clickable-overview-grid .summary-card-btn {
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clickable-overview-grid .summary-card-btn:hover,
.clickable-overview-grid .summary-card-btn.active {
  transform: translateY(-2px);
  border-color: #ff8ac2;
  background: linear-gradient(180deg, #fff7fb 0%, #ffffff 100%);
  box-shadow: 0 14px 32px rgba(255, 30, 137, 0.12);
}

.incomplete-card {
  align-items: center;
  gap: 18px;
}

.incomplete-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.incomplete-card-main h3,
.incomplete-card-main p {
  overflow-wrap: anywhere;
}

.incomplete-card-actions {
  min-width: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.delete-assignment-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 15px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(135deg, #fff1f2 0%, #ffe4ec 100%);
  color: #be123c;
  font-weight: 950;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.26), 0 8px 18px rgba(244, 63, 94, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.delete-assignment-btn:hover,
.delete-assignment-btn:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fb7185 0%, #ff1e89 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.24);
  outline: none;
}

.delete-assignment-btn:active {
  transform: translateY(0);
}

.delete-assignment-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.delete-assignment-btn:hover .delete-assignment-icon,
.delete-assignment-btn:focus-visible .delete-assignment-icon {
  background: rgba(255, 255, 255, 0.22);
}

.student-incomplete-header {
  gap: 16px;
}

.student-incomplete-header .tiny-pill-btn {
  white-space: nowrap;
}

@media (max-width: 780px) {
  .student-modal-actions {
    grid-template-columns: 1fr;
  }

  .incomplete-card {
    align-items: flex-start;
  }

  .incomplete-card-actions {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .delete-assignment-btn {
    width: 100%;
  }
}

/* =========================================================
   Phonics Detectives assignment setup — cleaner case picker
   Paste at the very bottom of teacher_dashboard.css
   ========================================================= */

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow {
  max-width: 1040px;
  width: min(1040px, calc(100vw - 40px));
  max-height: min(88vh, 920px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #ffffff;
  padding-bottom: 14px;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-progress {
  margin-bottom: 22px;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardStepConfigure {
  gap: 18px;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-config-form {
  display: block;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid #e7edf5;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 30, 137, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillLabel {
  display: block;
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillLabel::after {
  content: "Pick one of the five real game case files.";
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip {
  position: relative;
  min-height: 176px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid #dde6f1;
  background: #ffffff;
  color: #172554;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, outline-color 0.18s ease;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 72px;
  background: linear-gradient(180deg, rgba(255,255,255,0.52), rgba(255,255,255,0));
  pointer-events: none;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(1) {
  background: linear-gradient(180deg, #fff5cc 0%, #ffe6a7 100%);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(2) {
  background: linear-gradient(180deg, #ffe3f1 0%, #ffc6e3 100%);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(3) {
  background: linear-gradient(180deg, #dffbff 0%, #b8f0f5 100%);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(4) {
  background: linear-gradient(180deg, #f6dfff 0%, #efcafc 100%);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(5) {
  grid-column: 1 / -1;
  max-width: calc(50% - 9px);
  justify-self: center;
  background: linear-gradient(180deg, #e8ffd9 0%, #d3f8bf 100%);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(30, 41, 59, 0.86);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.38;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-patterns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-patterns span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(49, 46, 129, 0.86);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:hover,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 30, 137, 0.55);
  box-shadow: 0 14px 30px rgba(255, 30, 137, 0.14), 0 10px 20px rgba(15, 23, 42, 0.08);
  outline: none;
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip.selected {
  border-color: #ff1e89;
  box-shadow: 0 0 0 4px rgba(255, 30, 137, 0.14), 0 16px 34px rgba(255, 30, 137, 0.16);
}

#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 18px;
  padding-top: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 24%, #ffffff 100%);
}

@media (max-width: 900px) {
  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow {
    width: calc(100vw - 24px);
  }

  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid {
    grid-template-columns: 1fr;
  }

  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(5) {
    grid-column: auto;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-config-form {
    padding: 16px;
    border-radius: 18px;
  }

  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip {
    min-height: 160px;
    padding: 16px;
    border-radius: 20px;
  }

  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip strong {
    font-size: 1rem;
  }

  #assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip p {
    font-size: 0.9rem;
  }
}

/* =========================================================
   FINAL FIX — Phonics Detectives Assignment Case Picker
   Paste at the VERY BOTTOM of teacher_dashboard.css.
   This targets the classes where JS actually puts them:
   #assignWizardModal + #wizardSkillGrid.
   ========================================================= */

#assignWizardModal.phonics-detectives-assignment-flow .assign-wizard-card,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow {
  width: min(980px, calc(100vw - 40px)) !important;
  max-width: 980px !important;
  max-height: min(88vh, 900px) !important;
  overflow-y: auto !important;
  border-radius: 24px !important;
}

#assignWizardModal.phonics-detectives-assignment-flow .wizard-progress,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-progress {
  margin-bottom: 24px !important;
}

#assignWizardModal.phonics-detectives-assignment-flow .wizard-config-form,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-config-form {
  display: block !important;
  padding: 20px !important;
  border-radius: 22px !important;
  border: 1px solid #e2e8f0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillLabel,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillLabel {
  display: block !important;
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillLabel::after,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillLabel::after {
  content: "Choose one of the five real game case files.";
  display: block !important;
  margin-top: 6px !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

#wizardSkillGrid.phonics-detectives-case-grid {
  margin-top: 16px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip,
#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip {
  position: relative !important;
  width: 100% !important;
  min-height: 154px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  text-align: left !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  padding: 18px !important;
  border: 1px solid #dbe5f0 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07) !important;
  color: #172554 !important;
  transform: none !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip::before,
#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip::before,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: inherit !important;
  border-bottom-left-radius: inherit !important;
  background: radial-gradient(circle at 85% 0%, rgba(255, 255, 255, 0.72), transparent 34%) !important;
  pointer-events: none !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(1) {
  background: linear-gradient(180deg, #fff8dd 0%, #ffe9ab 100%) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(2) {
  background: linear-gradient(180deg, #fff0f7 0%, #ffd2e8 100%) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(3) {
  background: linear-gradient(180deg, #e8fdff 0%, #c4f4f7 100%) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(4) {
  background: linear-gradient(180deg, #f8ecff 0%, #ecd1ff 100%) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(5) {
  grid-column: 1 / -1 !important;
  width: min(480px, 100%) !important;
  justify-self: center !important;
  background: linear-gradient(180deg, #efffe5 0%, #d9f9c8 100%) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip-top,
#assignWizardModal.phonics-detectives-assignment-flow .case-file-chip-top,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-chip-top {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-icon,
#assignWizardModal.phonics-detectives-assignment-flow .case-file-icon,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-icon {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  font-size: 1.35rem !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75) !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip strong,
#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip strong,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip strong {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  margin: 0 !important;
  color: #1e293b !important;
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  text-align: left !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip p,
#assignWizardModal.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip p,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow #wizardSkillGrid .case-file-chip p {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  color: rgba(30, 41, 59, 0.84) !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-patterns,
#assignWizardModal.phonics-detectives-assignment-flow .case-file-patterns,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-patterns {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 14px !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-patterns span,
#assignWizardModal.phonics-detectives-assignment-flow .case-file-patterns span,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .case-file-patterns span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 28px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: rgba(49, 46, 129, 0.86) !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:hover,
#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:focus-visible {
  transform: translateY(-2px) !important;
  border-color: rgba(255, 30, 137, 0.58) !important;
  box-shadow: 0 14px 30px rgba(255, 30, 137, 0.14), 0 10px 20px rgba(15, 23, 42, 0.08) !important;
  outline: none !important;
}

#wizardSkillGrid.phonics-detectives-case-grid .case-file-chip.selected {
  border-color: #ff1e89 !important;
  box-shadow: 0 0 0 4px rgba(255, 30, 137, 0.16), 0 16px 34px rgba(255, 30, 137, 0.16) !important;
}

#assignWizardModal.phonics-detectives-assignment-flow .wizard-actions,
#assignWizardModal .assign-wizard-card.phonics-detectives-assignment-flow .wizard-actions {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 3 !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, #ffffff 100%) !important;
}

@media (max-width: 900px) {
  #wizardSkillGrid.phonics-detectives-case-grid {
    grid-template-columns: 1fr !important;
  }

  #wizardSkillGrid.phonics-detectives-case-grid .case-file-chip:nth-child(5) {
    grid-column: auto !important;
    width: 100% !important;
  }
}
