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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}

/* Header */
header {
    margin-bottom: 40px;
}

header h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #2563eb;
    background: #f8fafc;
}

.upload-zone p {
    color: #6b7280;
    font-size: 15px;
}

.upload-zone .hint {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 6px;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* File list */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
}

.file-pill .size {
    color: #9ca3af;
}

.file-pill .remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}

.file-pill .remove:hover {
    color: #dc2626;
}

/* Grade button */
.actions {
    margin-top: 24px;
}

.btn-grade {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-grade:hover:not(:disabled) {
    background: #333;
}

.btn-grade:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}


.status-log {
    margin-top: 16px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.status-entry {
    font-size: 13px;
    color: #6b7280;
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.status-entry::before {
    content: "\2713  ";
    color: #16a34a;
    font-weight: 600;
}

.status-entry.ref {
    font-size: 12px;
    color: #9ca3af;
    padding-left: 20px;
}

.status-entry.ref::before {
    content: "";
}

/* Results */
.results {
    display: none;
    margin-top: 40px;
}

.results.visible {
    display: block;
}

/* Score banner */
.score-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.score-value {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.score-bar-wrap {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: #16a34a;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.performance-tag {
    display: inline-block;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 32px;
}

/* Topic summary */
.topic-summary {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Part cards */
.part-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    border-left: 4px solid #d1d5db;
}

.part-card.earned {
    border-left-color: #16a34a;
}

.part-card.not-earned {
    border-left-color: #dc2626;
}

.part-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
}

.part-header:hover {
    background: #f3f4f6;
}

.part-label {
    font-weight: 600;
    font-size: 15px;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.score-badge.earned {
    background: #16a34a;
}

.score-badge.not-earned {
    background: #dc2626;
}

.score-badge.partial-high {
    background: #ca8a04;
    min-width: 36px;
    width: auto;
    padding: 0 6px;
    font-size: 12px;
}

.score-badge.partial-low {
    background: #ea580c;
    min-width: 36px;
    width: auto;
    padding: 0 6px;
    font-size: 12px;
}

.part-card.partial {
    border-left-color: #ca8a04;
}

.part-body {
    padding: 0 20px 20px;
}

/* Student quote */
.student-quote {
    background: #f0f0f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

.student-quote::before {
    content: "Student wrote:";
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

/* Rubric requirement */
.rubric-req {
    font-size: 13px;
    color: #374151;
    background: #f0f4f8;
    border-left: 3px solid #2563eb;
    padding: 8px 12px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.rubric-req-label {
    font-weight: 600;
    color: #2563eb;
}

.rubric-match {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.rubric-match strong {
    color: #1a1a1a;
}

.codes-considered {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Reasoning */
.reasoning {
    margin-bottom: 14px;
    line-height: 1.65;
}

/* Reference list in pipeline */
.ref-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ref-list li {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* Callout boxes */
.callout {
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.callout-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.callout.precedent {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
}

.callout.precedent .callout-label {
    color: #2563eb;
}

.callout.remediation {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.callout.remediation .callout-label {
    color: #92400e;
}

/* Multi-essay sections */
.essay-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.essay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
}

.essay-header:hover {
    background: #f3f4f6;
}

.essay-label {
    font-weight: 600;
    font-size: 16px;
}

.essay-score {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.essay-body {
    padding: 20px;
}

.essay-body.collapsed {
    display: none;
}

/* Student-facing feedback callout */
.student-feedback {
    margin-top: 24px;
    padding: 18px 20px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
}

.student-feedback h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
    margin-bottom: 6px;
}

.student-feedback p {
    font-size: 15px;
    line-height: 1.6;
    color: #064e3b;
}

/* Overall analysis */
.overall-analysis {
    margin-top: 32px;
    border-top: 1px solid #e5e7eb;
    padding-top: 28px;
}

.overall-analysis h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.analysis-section {
    margin-bottom: 20px;
}

.analysis-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.analysis-section p {
    line-height: 1.65;
}

/* Error */
.error-msg {
    display: none;
    margin-top: 24px;
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
}

.error-msg.visible {
    display: block;
}

/* Missing context message */
.missing-context {
    margin-top: 32px;
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    color: #374151;
    line-height: 1.6;
}

/* Collapsed state for toggles */
.part-body.collapsed,
.pass-body.collapsed {
    display: none;
}

/* Pipeline disclosure */
.pipeline-section {
    margin-top: 40px;
    border-top: 1px solid #e5e7eb;
    padding-top: 28px;
}

.pipeline-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.pipeline-intro {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
}

.pipeline-pass {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    border-left: 4px solid #d1d5db;
}

.pipeline-pass.pass-ok {
    border-left-color: #16a34a;
}

.pipeline-pass.pass-correction {
    border-left-color: #f59e0b;
}

.pass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
}

.pass-header:hover {
    background: #f3f4f6;
}

.pass-label {
    font-weight: 600;
    font-size: 14px;
}

.pass-meta {
    font-size: 12px;
    color: #9ca3af;
}

.pass-body {
    padding: 0 20px 16px;
}

.thinking-section,
.review-section,
.correction-section {
    margin-bottom: 12px;
}

.thinking-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 6px;
}

.thinking-block {
    background: #f0f0f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.pass-verdict {
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
    padding: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px 60px;
    }

    .score-value {
        font-size: 32px;
    }
}

/* Site header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.site-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.site-nav a {
    color: #374151;
    text-decoration: none;
}

.site-nav a:hover { color: #2563eb; }

.site-nav a.active {
    color: #1a1a1a;
    font-weight: 600;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 4px;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-user-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.site-user-menu a {
    color: #374151;
    text-decoration: none;
}

.site-user-menu a:hover { color: #2563eb; }

.site-user {
    font-size: 13px;
    color: #9ca3af;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
}

.breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.breadcrumb a { color: #6b7280; text-decoration: none; }
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb .sep { margin: 0 6px; color: #d1d5db; }

.section-heading {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 12px;
}

/* Response form */
.response-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover { color: #2563eb; }

.tab-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.tab-panel.hidden { display: none; }

textarea[name="response_text"] {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    background: #fff;
    color: #1a1a1a;
}

textarea[name="response_text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---------------------------------------------------------------------------
   v0.2 — shared list tables, two-column form+list layout, subject badges.
   Used by /rubrics, /students, /students/<id>/history, dashboard.
   --------------------------------------------------------------------------- */

.muted { color: #9ca3af; }

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 40px;
    margin-top: 16px;
    align-items: start;
}

@media (max-width: 860px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Generic list table — rubrics library, student roster, history */
table.list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.list thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

table.list tbody td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

table.list tbody tr:hover {
    background: #f9fafb;
}

table.list tbody tr:hover td:first-child a {
    color: #2563eb;
}

table.list td a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
}

table.list td.muted {
    color: #9ca3af;
    font-size: 13px;
}

.empty-note {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 12px;
    font-style: italic;
}

table.list td.row-actions {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.btn-link-danger {
    background: none;
    border: none;
    padding: 4px 8px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
}

.btn-link-danger:hover {
    background: #fef2f2;
    text-decoration: underline;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Per-row Actions disclosure menu */
.row-actions-menu {
    position: relative;
    display: inline-block;
}

.row-actions-menu > summary {
    list-style: none;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    user-select: none;
}

.row-actions-menu > summary::-webkit-details-marker { display: none; }
.row-actions-menu > summary::marker { content: ""; }

.row-actions-menu > summary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.row-actions-menu[open] > summary {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.row-actions-popover {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 4px;
    z-index: 10;
}

.row-actions-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    border-radius: 4px;
}

.row-actions-item:hover { background: #f9fafb; }

.row-actions-item-danger { color: #b91c1c; }
.row-actions-item-danger:hover { background: #fef2f2; }

/* Confirmation modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.modal-overlay.hidden { display: none; }

.modal-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 24px;
    width: 100%;
    max-width: 440px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.modal-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 16px;
}

.modal-card .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.modal-card .field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.modal-card .field input[type="text"] {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
}

.modal-card .field input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.modal-cancel {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-danger:hover:not(:disabled) {
    background: #991b1b;
}

.btn-danger:disabled {
    background: #fca5a5;
    cursor: not-allowed;
}

/* Subject badge — label rubrics / gradings with their subject */
.subject-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #3730a3;
    background: #e0e7ff;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
}

/* Upload / create forms (rubrics, students, grade picker) */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.upload-form input[type="text"],
.upload-form input[type="email"],
.upload-form input[type="password"],
.upload-form input[type="search"],
.upload-form select,
.upload-form textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
}

.upload-form input[type="file"] {
    font-size: 13px;
    padding: 6px 0;
}

.upload-form input[type="text"]:focus,
.upload-form input[type="email"]:focus,
.upload-form input[type="password"]:focus,
.upload-form input[type="search"]:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

/* Login page */
.login-card {
    max-width: 420px;
    margin: 40px auto 0;
}

.login-card .upload-form {
    margin-top: 20px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-secondary {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    width: 100%;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: #f9fafb;
}

/* Dashboard CTA row */
.dashboard-cta {
    margin-top: 8px;
    margin-bottom: 32px;
}

.dashboard-cta a:not(.btn-grade) {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.dashboard-cta a:not(.btn-grade):hover { text-decoration: underline; }

.dashboard-cta .sep { color: #d1d5db; }

/* Grade picker page */
.grade-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f3f4f6;
}

.grade-section:last-of-type {
    border-bottom: none;
    padding-bottom: 8px;
}

#student-combo,
#rubric-select {
    width: 100%;
    max-width: 560px;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
}

#student-combo:focus,
#rubric-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.inline-create {
    margin-top: 14px;
}

.inline-create summary {
    cursor: pointer;
    font-size: 13px;
    color: #2563eb;
    user-select: none;
    padding: 6px 0;
}

.inline-create summary:hover { color: #1d4ed8; }

.inline-create-body {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-width: 560px;
}

/* Generic .hidden (used by grade_new tab panels and status panel) */
.hidden { display: none !important; }

/* Search input above list tables (students roster, future: rubric library) */
.search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Detail pages — embedded PDF */
.pdf-frame {
    width: 100%;
    height: 720px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 24px;
}

/* Rubric upload — busy state + drag/drop zone */
#rubric-upload-submit .upload-label-busy { display: none; }
#rubric-upload-submit.htmx-request .upload-label-idle { display: none; }
#rubric-upload-submit.htmx-request .upload-label-busy { display: inline; }
#rubric-upload-submit:disabled { opacity: 0.7; cursor: progress; }

.dropzone {
  border: 2px dashed #c7d2fe;
  background: #f8fafc;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.dropzone:hover { background: #eef2ff; }
.dropzone.dragover { background: #e0e7ff; border-color: #6366f1; }
.dropzone.has-file { border-style: solid; border-color: #16a34a; background: #f0fdf4; }
.dropzone-prompt { color: #475569; font-size: 14px; }
.dropzone-prompt strong { color: #1e293b; }
.dropzone-filename { color: #166534; font-weight: 600; }
.dropzone-hint { color: #64748b; font-size: 12px; margin-top: 4px; }
.dropzone input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
