/* Page width and outer padding belong to the shared academy shell. */
.teacher-portal {
    width:100%; min-width:0; max-width:100%; margin:0; padding:0;
    color:var(--mud-palette-text-primary);
}
.tp-workspace, .tp-detail-content {
    display:flex; flex-direction:column; gap:var(--academy-gap); min-width:0;
}
.tp-workspace > .compact-page-heading { margin:0; }
.tp-workspace > .mud-alert { flex-shrink:0; }
.tp-workspace .compact-page-notice { margin:0; color:var(--mud-palette-text-secondary); }
.tp-list-content {
    display:flex; flex-direction:column; flex:1; gap:var(--academy-gap);
    min-width:0; min-height:0; overflow:auto;
}
.tp-list-content > * { flex-shrink:0; }
.tp-list-content > .tp-students-list { display:flex; flex-direction:column; flex:1 1 auto; min-width:0; min-height:0; overflow:hidden; }
.tp-students-help { flex-shrink:0; margin:0; padding:10px 12px; font-size:13px; color:var(--mud-palette-text-secondary); }
.tp-students-list > .mud-table { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; }
.tp-students-grid .mud-table-root { min-width:640px; }
.tp-students-grid .mud-table-cell:first-child { overflow-wrap:anywhere; }
.tp-card {
    min-width:0; margin:0; padding:12px;
    border:1px solid var(--academy-line); border-radius:10px;
    background:var(--mud-palette-surface);
}
.tp-card h2 { margin:0 0 8px; font-size:18px; line-height:24px; font-weight:700; }
.tp-card > p { margin:6px 0; color:var(--mud-palette-text-secondary); font-size:13px; line-height:1.65; }
.tp-question h3, .tp-response h3 { margin:8px 0 6px; font-size:14px; font-weight:650; }
.tp-row-link {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    min-width:0; padding:10px 0; border-bottom:1px solid var(--academy-line);
}
.tp-row-link:last-child { border-bottom:0; }
.tp-row-link > * { min-width:0; overflow-wrap:anywhere; }
.teacher-portal small { display:block; margin-top:4px; font-size:12px; color:var(--mud-palette-text-secondary); }
.tp-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:var(--academy-gap); margin:8px 0; }
.teacher-portal label { display:flex; flex-direction:column; gap:4px; min-width:0; font-size:13px; font-weight:600; }
.teacher-portal input:not([type=checkbox]), .teacher-portal select, .teacher-portal textarea {
    width:100%; max-width:100%; min-width:0; min-height:var(--academy-control-height);
    padding:6px 10px; border:1px solid var(--academy-line); border-radius:6px;
    background:var(--mud-palette-surface); color:inherit; font:inherit;
}
.teacher-portal input:focus-visible, .teacher-portal select:focus-visible, .teacher-portal textarea:focus-visible {
    outline:2px solid var(--academy-gold); outline-offset:3px;
}
.teacher-portal textarea { resize:vertical; }
.teacher-portal .compact-filter-fields > label { flex:1 1 140px; min-width:0; }
.tp-button {
    display:inline-flex; align-items:center; justify-content:center; gap:6px;
    min-height:32px; max-width:100%; padding:5px 12px;
    border:1px solid var(--mud-palette-primary); border-radius:7px;
    background:var(--mud-palette-primary); color:var(--mud-palette-primary-text);
    font:inherit; font-size:13px; font-weight:600; line-height:1.5;
    text-decoration:none; cursor:pointer; overflow-wrap:anywhere;
}
.tp-button.secondary { background:var(--academy-gold); color:var(--academy-green); border-color:var(--academy-gold); }
.tp-button:disabled { opacity:.5; cursor:default; }
.tp-table { min-width:0; max-width:100%; overflow:auto; border:1px solid var(--academy-line); border-radius:10px; background:var(--mud-palette-surface); }
.tp-list-content > .tp-table { border:0; border-radius:0; }
.tp-table table { width:100%; min-width:650px; border-collapse:collapse; text-align:left; }
.tp-table th { padding:var(--academy-cell-padding); height:36px; background:#FAF8F2; color:#526057; font-size:12px; font-weight:600; }
.tp-table td { height:36px; padding:var(--academy-cell-padding); border-top:1px solid var(--academy-line); vertical-align:top; font-size:13px; }
.tp-table td .tp-button { min-height:28px; padding:3px 8px; }
.tp-badge { display:inline-block; padding:3px 8px; border-radius:6px; background:var(--mud-palette-primary-hover); font-size:12px; }
.tp-late { color:var(--mud-palette-error)!important; }
.tp-empty { padding:24px 12px; color:var(--mud-palette-text-secondary); text-align:center; }
.tp-pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.tp-attempt { display:block; margin-top:6px; }
.tp-form { display:flex; flex-direction:column; gap:12px; min-width:0; }
.tp-form:disabled { opacity:.7; }
.tp-form .compact-form-actions { margin:0; }
.tp-recipient-list { display:flex; flex-direction:column; gap:8px; }
.tp-recipient-list label { flex-direction:row; align-items:center; }
.tp-response { margin-top:8px; padding:12px; border-radius:8px; background:var(--mud-palette-background-grey); overflow-wrap:anywhere; }
.tp-question { margin-top:8px; padding-top:12px; border-top:1px solid var(--academy-line); }
.teacher-portal audio, .teacher-portal img { max-width:100%; }
.teacher-portal a:not(.tp-button) { color:var(--mud-palette-primary); }
.tp-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--academy-gap); min-width:0; }
.tp-stats > a { display:flex; flex-direction:column; gap:8px; min-width:0; padding:12px; border:1px solid var(--academy-line); border-radius:10px; background:var(--mud-palette-surface); }
.tp-stats strong { font-size:24px; font-weight:700; line-height:1.2; }
.tp-stats span { color:var(--mud-palette-text-secondary); }
/* Dashboard cards follow student Home rather than the compact list density. */
.tp-dashboard-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:8px 0 24px; }
.tp-dashboard h1 { margin:0; font-size:1.65rem; font-weight:700; letter-spacing:-.04em; line-height:1.25; }
.tp-dashboard h2 { font-size:1rem; }
.tp-dashboard p { margin:6px 0 0; font-size:.8rem; line-height:1.65; color:var(--mud-palette-text-secondary); }
.tp-dashboard .tp-stats { gap:16px; margin-bottom:16px; }
.tp-dashboard .tp-stats > a { padding:20px; border-radius:14px; border-color:var(--mud-palette-divider); box-shadow:0 3px 12px #14201a03; }
.tp-dashboard .tp-stats strong { font-size:1.9rem; letter-spacing:-.05em; }
.tp-dashboard .tp-stats span { font-size:.7rem; }
.tp-dashboard > .tp-card { padding:24px; margin-bottom:16px; border-radius:14px; border-color:var(--mud-palette-divider); box-shadow:0 3px 12px #14201a03; }
.tp-dashboard .tp-row-link { padding:16px 0; }
@media(max-width:1200px) { .tp-dashboard .tp-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:960px) { .tp-dashboard-heading { align-items:flex-start; flex-direction:column; } }
@media(max-width:599px) {
    .tp-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .tp-row-link { flex-wrap:wrap; }
    .tp-toolbar > label { flex:1 1 140px; }
    .teacher-portal .compact-filter-fields > label { flex-basis:100%; }
    .teacher-portal .compact-page-actions { justify-content:flex-start; }
    .tp-list-content { overflow:auto; }
}
@media(max-width:480px) {
    .tp-dashboard .tp-stats { grid-template-columns:minmax(0,1fr); }
    .tp-dashboard > .tp-card { padding:20px; }
    .tp-dashboard h1 { font-size:1.45rem; }
}

/* Clear progress, task overview tabs, and guided task creation. */
.tp-overview { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.tp-summary-heading, .tp-summary-counts { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; }
.tp-summary-counts { margin-top:12px; padding-top:12px; border-top:1px solid var(--academy-line); font-size:13px; }
.tp-summary-counts strong { font-size:20px; margin-right:4px; }
.tp-task-summary > .tp-pre { margin:12px 0; }
.tp-tabs { display:flex; gap:4px; border-bottom:1px solid var(--academy-line); }
.tp-tabs button { padding:10px 16px; min-height:44px; border-bottom:3px solid transparent; background:transparent; font:inherit; font-weight:600; color:var(--mud-palette-text-secondary); cursor:pointer; }
.tp-tabs button[aria-selected=true] { color:var(--mud-palette-primary); border-bottom-color:var(--academy-gold); background:var(--mud-palette-surface); }
.tp-loading-panel { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:16px; min-width:0; color:var(--mud-palette-text-secondary); font-size:13px; }
.tp-skeleton { flex-basis:100%; height:14px; border-radius:6px; background:var(--mud-palette-action-default-hover,#80808026); animation:tp-loading-pulse 1.5s ease-in-out infinite; }
.tp-skeleton.short { flex-basis:60%; }
.tp-is-busy a { pointer-events:none; opacity:.65; }
.tp-paper-section { border:1px solid var(--academy-line); border-radius:10px; padding:16px; margin-top:12px; }
.tp-paper-section:first-child { margin-top:0; }
.tp-paper-section h3 { font-size:18px; margin:12px 0; }
.tp-paper-section h4 { font-size:12px; font-weight:700; color:var(--mud-palette-primary); margin:0 0 8px; }
.tp-answer-options { list-style:upper-alpha outside; padding-left:28px; margin:12px 0 0; }
.tp-answer-options li { padding:5px 8px; }
.tp-answer-options li::marker { font-weight:700; color:var(--mud-palette-text-secondary); }
.tp-audio { margin:16px 0; }
.tp-audio > p { margin-bottom:8px; font-size:13px; font-weight:600; }
.tp-editor { display:flex; flex-direction:column; gap:var(--academy-gap); min-width:0; margin:0; padding:0; border:0; }
.tp-editor-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tp-step { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#edf3ed; color:var(--mud-palette-primary); font-size:13px; margin-right:6px; }
.tp-hint { color:var(--mud-palette-text-secondary); font-size:13px; font-weight:400; }
.tp-required { color:var(--mud-palette-text-secondary); font-size:11px; font-weight:400; }
.tp-field-error { color:var(--mud-palette-error); font-size:13px; margin:0; }
.teacher-portal [aria-invalid=true] { border-color:var(--mud-palette-error)!important; }
.tp-recipient-list .tp-recipient-card { padding:12px; border:1px solid var(--academy-line); border-radius:8px; gap:12px; min-width:0; min-height:56px; cursor:pointer; }
.tp-recipient-card.is-selected { background:#edf6f0; border-color:var(--mud-palette-primary); }
.tp-recipient-card > span { min-width:0; overflow-wrap:anywhere; }
.tp-recipient-card strong, .tp-recipient-card small { display:block; }
.tp-recipient-card small { color:var(--mud-palette-text-secondary); font-weight:400; }
.tp-recipient-card input[type=checkbox] { width:20px; height:20px; flex:0 0 20px; margin:0; accent-color:var(--mud-palette-primary); }
.tp-recipient-card:focus-within, .tp-select-all:focus-within { outline:2px solid var(--mud-palette-primary); outline-offset:3px; }
.tp-select-all { align-self:flex-start; max-width:100%; border-radius:6px; }
.tp-select-all .mud-checkbox { flex-direction:row; margin:0; }
.tp-editor:disabled .tp-recipient-card { cursor:default; }
.tp-text-action { align-self:flex-start; color:var(--mud-palette-primary); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tp-editor-preview > summary { cursor:pointer; font-weight:600; padding:4px 0; }
.tp-editor:disabled { opacity:.8; }
@keyframes tp-loading-pulse { 50% { opacity:.45; } }
@media(max-width:599px) { .tp-editor-columns { grid-template-columns:minmax(0,1fr); } .tp-summary-counts { gap:12px; } .tp-tabs button { flex:1; padding:8px; } .tp-paper-section { padding:12px; } }
@media(prefers-reduced-motion:reduce) { .tp-skeleton { animation:none; } }
