/* Packback Core — The Manuscript Design System */
/* See DESIGN.md for full documentation */

/* ========================================
   CSS Custom Properties
   ======================================== */

:root {
    /* Colors - Light Mode (Primary) */
    --bg: #FFFDF8;
    --surface: #FFFFFF;
    --surface-alt: #FBF9F4;
    --text: #0A0A0A;
    --text-muted: #5A5550;
    --accent: #8B0000;
    --accent-light: #B83232;
    --blue: #1C3D5A;
    --gold: #C9A227;
    --border: #E8E2D8;

    /* Semantic */
    --success: #166534;
    --success-light: #D1FAE5;
    --warning: #B45309;
    --warning-light: #FEF3C7;
    --error: #991B1B;
    --error-light: #FEE2E2;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography */
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* Dark mode - manual override */
[data-theme="dark"] {
    --bg: #1A1814;
    --surface: #242018;
    --surface-alt: #2A261E;
    --text: #F5F2EB;
    --text-muted: #9A9590;
    --accent: #C85050;
    --accent-light: #D87070;
    --blue: #6B9DC4;
    --gold: #D4B64A;
    --border: #3A352A;
    --success: #6EBF8B;
    --success-light: rgba(110, 191, 139, 0.15);
    --warning: #FBBF24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --error: #F87171;
    --error-light: rgba(248, 113, 113, 0.15);
}

/* Dark mode - system preference (only when no manual override) */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg: #1A1814;
        --surface: #242018;
        --surface-alt: #2A261E;
        --text: #F5F2EB;
        --text-muted: #9A9590;
        --accent: #C85050;
        --accent-light: #D87070;
        --blue: #6B9DC4;
        --gold: #D4B64A;
        --border: #3A352A;
        --success: #6EBF8B;
        --success-light: rgba(110, 191, 139, 0.15);
        --warning: #FBBF24;
        --warning-light: rgba(251, 191, 36, 0.15);
        --error: #F87171;
        --error-light: rgba(248, 113, 113, 0.15);
    }
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif);
    background: var(--bg);
    color: var(--text);
    font-size: 17px;
    line-height: 1.6;
}

/* ========================================
   Accessibility
   ======================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
}

.skip-link:focus {
    top: 0;
}

/* Focus states */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Layout
   ======================================== */

.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.header h1 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
}

.header h1::first-letter {
    color: var(--accent);
    font-size: 1.3em;
}

.header nav {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.header a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.header a:hover {
    color: var(--text);
}

.logo-link {
    color: var(--text);
    text-decoration: none;
}

.logo-link:hover {
    opacity: 0.85;
}

.user-badge {
    background: var(--surface-alt);
    padding: 6px 12px;
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text);
    border: 1px solid var(--border);
}

a.user-badge {
    text-decoration: none;
}

a.user-badge:hover {
    background: var(--bg);
}

.role-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.role-admin {
    background: #fee2e2;
    color: #991b1b;
}

.role-teacher {
    background: #dbeafe;
    color: #1e40af;
}

.role-student {
    background: #dcfce7;
    color: #166534;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   Course Layout (Sidebar + Main)
   ======================================== */

.course-layout {
    display: flex;
    gap: 0;
}

.course-sidebar {
    width: 200px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 60px);
    padding: var(--space-lg) 0;
}

.course-sidebar a {
    display: block;
    padding: 10px var(--space-lg);
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.course-sidebar a:hover {
    color: var(--text);
    background: var(--surface-alt);
    padding-left: calc(var(--space-lg) + 4px);
}

.course-sidebar a.active {
    background: var(--surface-alt);
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 500;
}

.course-main {
    flex: 1;
    padding: var(--space-xl);
    max-width: 800px;
}

.course-main .card {
    margin-top: 0;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--surface);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin: var(--space-md) 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--text);
}

.card h2::first-letter {
    color: var(--accent);
    font-size: 1.2em;
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.card p {
    margin: var(--space-xs) 0;
    color: var(--text-muted);
}

/* ========================================
   Grid (Home Page Course Cards)
   ======================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.grid > a,
.grid > .card-link {
    display: flex;
}

.class-card {
    background: var(--surface);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.class-card:hover {
    transform: translateY(-2px) rotate(0.3deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.class-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0 0 var(--space-sm) 0;
}

.class-card h3::first-letter {
    color: var(--accent);
}

.class-card p {
    margin: var(--space-xs) 0;
    color: var(--text-muted);
    font-size: 14px;
}

.class-card a {
    color: var(--blue);
    text-decoration: none;
}

.class-card a:hover {
    text-decoration: underline;
}

/* ========================================
   Tables
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px var(--space-md);
    border-bottom: 1px solid var(--border);
}

th {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--surface-alt);
    color: var(--text-muted);
}

tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: var(--surface-alt);
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--accent);
}

/* Grade cells - gold with ink settle potential */
.grade,
td:last-child {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--gold);
}

/* ========================================
   Badges
   ======================================== */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-admin {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.badge-teacher {
    background: rgba(28, 61, 90, 0.1);
    color: var(--blue);
    border: 1px solid var(--blue);
}

.badge-student {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px var(--space-lg);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary,
.btn {
    background: var(--accent);
    color: white;
}

.btn-primary:hover,
.btn:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-secondary:disabled {
    background: var(--surface-alt);
    border-color: var(--border);
    color: var(--text-muted);
}

.btn-small {
    font-size: 0.7rem;
    padding: var(--space-xs) 12px;
}

.btn-full {
    width: 100%;
}

/* Signup button - gold accent */
.btn-signup {
    background: var(--gold);
    color: white;
    padding: 8px 16px;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-signup:hover {
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

/* ========================================
   Forms
   ======================================== */

.form-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px;
    font-family: var(--font-serif);
    font-size: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text);
    margin-bottom: var(--space-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ========================================
   Login Page
   ======================================== */

.login-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-card {
    background: var(--surface);
    padding: var(--space-2xl);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 360px;
}

.login-card h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 0 0 var(--space-lg) 0;
    color: var(--text);
}

.login-card h2::first-letter {
    color: var(--accent);
    font-size: 1.3em;
}

/* ========================================
   Alerts & Banners
   ======================================== */

.error-banner {
    background: var(--error-light);
    border: 1px solid var(--error);
    border-left: 4px solid var(--error);
    padding: 12px var(--space-md);
    border-radius: 2px;
    margin-bottom: var(--space-md);
    color: var(--error);
}

.success-banner {
    background: var(--success-light);
    border: 1px solid var(--success);
    border-left: 4px solid var(--success);
    padding: 12px var(--space-md);
    border-radius: 2px;
    margin-bottom: var(--space-md);
    color: var(--success);
}

.warning-banner {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    padding: 12px var(--space-md);
    border-radius: 2px;
    margin-bottom: var(--space-md);
    color: var(--warning);
}

/* ========================================
   Profile Page
   ======================================== */

.profile-card {
    background: var(--surface);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: 4px;
    max-width: 500px;
}

.profile-details {
    margin: 0;
}

.profile-details dt {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

.profile-details dt:first-child {
    margin-top: 0;
}

.profile-details dd {
    margin: var(--space-xs) 0 0 0;
    font-size: 1rem;
    color: var(--text);
}

/* ========================================
   Context Cards (LTI Linked Contexts)
   ======================================== */

.context-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    margin-bottom: var(--space-sm);
    transition: all 0.2s ease;
}

.context-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.context-title {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--text);
}

.context-platform {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(28, 61, 90, 0.1);
    color: var(--blue);
    padding: 2px 8px;
    border-radius: 2px;
    margin-left: var(--space-sm);
    border: 1px solid var(--blue);
}

.disconnect-btn {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    padding: var(--space-xs) 12px;
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.disconnect-btn:hover {
    background: var(--error);
    color: white;
}

.contexts-card {
    margin-top: var(--space-lg);
}

.contexts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.no-contexts {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   Breadcrumbs
   ======================================== */

.breadcrumb {
    margin-bottom: var(--space-md);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    margin: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: var(--space-sm);
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text);
}

/* ========================================
   Lists
   ======================================== */

ul {
    padding-left: var(--space-lg);
}

li {
    margin: var(--space-sm) 0;
}

.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   Section Headers (Manuscript Style)
   ======================================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: var(--space-xl) 0 var(--space-md);
}

.section-header h2,
.section-header h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
}

.section-header::before {
    content: '§';
    color: var(--accent);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.section-header:hover::before {
    transform: rotate(15deg);
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ========================================
   Delight: Animations
   ======================================== */

/* Illuminated drop cap glow */
@keyframes illuminateGlow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 20px rgba(201, 162, 39, 0.5), 0 0 40px rgba(201, 162, 39, 0.3); }
}

.illuminate-glow::first-letter {
    animation: illuminateGlow 3s ease-in-out infinite;
}

/* Ink settle for grades */
@keyframes inkSettle {
    0% { opacity: 0; filter: blur(4px); transform: scale(1.2); }
    50% { filter: blur(2px); }
    100% { opacity: 1; filter: blur(0); transform: scale(1); }
}

.ink-settle {
    animation: inkSettle 0.6s ease forwards;
}

/* Wax seal stamp */
@keyframes waxStamp {
    0% { transform: scale(2) rotate(-15deg); opacity: 0; }
    50% { transform: scale(0.9) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.wax-seal {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    margin-left: var(--space-sm);
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.3);
}

.wax-seal.stamping {
    animation: waxStamp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Margin note slide in */
@keyframes marginSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.margin-note {
    font-style: italic;
    color: var(--accent);
    font-size: 0.9rem;
    padding-left: var(--space-md);
    border-left: 2px solid var(--accent);
    margin: var(--space-md) 0;
    animation: marginSlideIn 0.5s ease 0.3s forwards;
    opacity: 0;
}

/* Self-drawing checkmark */
@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.checkmark-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.checkmark-path.drawing {
    animation: drawCheck 0.4s ease forwards;
}

/* Gold bookmark ribbon */
.bookmark-ribbon {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 20px;
    height: 0;
    background: linear-gradient(135deg, var(--gold) 0%, #B8922A 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
    transition: height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.bookmark-ribbon.dropped,
*:hover > .bookmark-ribbon {
    height: 36px;
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    padding: var(--space-md) var(--space-lg);
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   Standalone Assignment Page
   ======================================== */

.detail-page {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.header-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.setup-required-section {
    background: var(--warning-light);
    border: 2px solid var(--gold);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.setup-required-section .setup-icon {
    width: 3rem;
    height: 3rem;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--warning);
}

.setup-required-section h3 {
    margin: 0 0 0.5rem;
    color: var(--warning);
}

.setup-required-section p {
    color: var(--warning);
    margin: 0 0 1.5rem;
}

.description {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.join-link-section {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.join-link-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.link-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.link-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-family: var(--font-mono);
    background: var(--surface);
    color: var(--text);
}

.actions {
    margin-top: 2rem;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.roster-section {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.roster-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.roster-table th {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}

.roster-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.roster-table tr:last-child td {
    border-bottom: none;
}

.student-name {
    font-weight: 500;
}

.student-email {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.grade-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.grade-badge.completed {
    background: var(--success-light);
    color: var(--success);
}

.grade-badge.in-progress {
    background: rgba(28, 61, 90, 0.1);
    color: var(--blue);
}

.grade-badge.not-started {
    background: var(--surface-alt);
    color: var(--text-muted);
}

.empty-roster {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.move-section {
    background: var(--warning-light);
    border: 1px solid var(--gold);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.move-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.move-section > p {
    color: var(--warning);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.move-form {
    display: flex;
    gap: 0.5rem;
}

.move-form select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
}

.enrolled-notice {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--warning);
}

.enrolled-badge {
    background: var(--warning-light);
    border: 1px solid var(--gold);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}
