/* Daily Sprint — Mobile-first CSS */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f5;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    background: #2563eb;
    color: #fff;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-math {
    background: #7c3aed;
    width: 100%;
    margin-bottom: 12px;
}

.btn-math:hover {
    background: #6d28d9;
}

.btn-rw {
    background: #059669;
    width: 100%;
}

.btn-rw:hover {
    background: #047857;
}

.btn-submit {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    font-size: 18px;
}

.btn-next {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    font-size: 18px;
}

/* Home page */
.home-hero {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    margin: -16px -16px 24px;
    padding: 28px 20px 24px;
    border-radius: 0 0 16px 16px;
}

.home-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 2px;
}

.home-welcome {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.home-logout {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-left: 4px;
}

.home-logout:hover {
    color: #fff;
}

.sprint-start {
    margin-bottom: 24px;
}

.sprint-start h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #374151;
}

/* Engagement cards (streak + daily goal) */
.engagement-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.engagement-card {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.engagement-card h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.goal-count {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.streak-count {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    transition: width 0.3s;
}

.motivational-message {
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 15px;
    color: #4c1d95;
    font-style: italic;
}

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

.last-session {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.last-session h3 {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.last-session a {
    color: #2563eb;
    font-weight: 500;
}

.admin-link {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.admin-link a {
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
}

.admin-link a:hover {
    color: #6b7280;
}

.error {
    color: #dc2626;
    margin-bottom: 12px;
}

/* Timer bar */
.timer-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.timer {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.timer-warning {
    color: #fbbf24;
}

.progress-info {
    font-weight: 600;
}

/* Question card */
.question-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
}

.flag-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    color: #6b7280;
}

.flag-btn.flagged {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.passage {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.7;
    border-left: 3px solid #d1d5db;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}

.question-text {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* MC Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    min-height: 48px;
    transition: border-color 0.15s;
}

.option-btn:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.option-btn input[type="radio"] {
    display: none;
}

.option-btn:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.option-btn:has(input:checked) .option-label {
    background: #2563eb;
    color: #fff;
}

.option-text {
    font-size: 15px;
    line-height: 1.4;
}

/* SPR Input */
.spr-input {
    margin-bottom: 8px;
}

.spr-input label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.spr-input input {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
}

.spr-input input:focus {
    border-color: #2563eb;
}

/* Feedback */
.feedback {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.feedback-correct {
    background: #ecfdf5;
    border: 2px solid #10b981;
}

.feedback-incorrect {
    background: #fef2f2;
    border: 2px solid #ef4444;
}

.feedback-result {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feedback-correct .feedback-result {
    color: #059669;
}

.feedback-incorrect .feedback-result {
    color: #dc2626;
}

.feedback-answer {
    font-size: 15px;
    color: #374151;
    margin-bottom: 8px;
}

/* Feedback question review */
.feedback-review {
    text-align: left;
    margin: 12px 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.feedback-question-text {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 10px;
}

.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
}

.feedback-option-label {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5e7eb;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.feedback-option-text {
    line-height: 1.4;
}

.feedback-option-correct {
    border-color: #10b981;
    background: #ecfdf5;
}

.feedback-option-correct .feedback-option-label {
    background: #10b981;
    color: #fff;
}

.feedback-option-wrong {
    border-color: #ef4444;
    background: #fef2f2;
}

.feedback-option-wrong .feedback-option-label {
    background: #ef4444;
    color: #fff;
}

.feedback-option-correct-selected {
    border-color: #10b981;
    background: #ecfdf5;
}

.feedback-option-correct-selected .feedback-option-label {
    background: #10b981;
    color: #fff;
}

.feedback-spr-answer {
    font-size: 14px;
    color: #374151;
}

/* Hints */
.btn-hint {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    color: #4b5563;
    margin-bottom: 12px;
}

.btn-hint:hover {
    background: #e5e7eb;
}

#hint-area {
    margin-bottom: 12px;
}

.hint {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.hint-label {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hint-text {
    font-size: 15px;
    color: #78350f;
    margin-top: 4px;
}

.hint-empty {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 12px;
}

/* AI-generated hint variant */
.hint-ai {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.hint-ai .hint-label {
    color: #0369a1;
}

.hint-ai .hint-text {
    color: #0c4a6e;
}

/* Explanation (Logic Path) */
.explanation {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    margin-bottom: 4px;
    text-align: left;
}

.explanation-label {
    font-size: 12px;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.explanation-text {
    font-size: 14px;
    line-height: 1.5;
    color: #0c4a6e;
}

/* Test-taking cues */
.cue {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    text-align: center;
}

.cue-calm {
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    color: #5b21b6;
}

.cue-strike {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* SPR-specific feedback */
.spr-feedback {
    background: #fef3c7;
    border-color: #fde68a;
}

.spr-feedback .explanation-label {
    color: #92400e;
}

.spr-feedback .explanation-text {
    color: #78350f;
}

/* Aha Moment */
.aha-moment {
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.aha-label {
    font-size: 12px;
    font-weight: 700;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.aha-text {
    font-size: 15px;
    line-height: 1.5;
    color: #4c1d95;
}

/* Calculator */
.calc-toggle {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}

.calc-container {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
}

/* Wrap-up overlay */
.wrap-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.wrap-up-modal {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    margin: 16px;
}

.wrap-up-modal h2 {
    margin-bottom: 12px;
}

.wrap-up-modal p {
    margin-bottom: 20px;
    color: #6b7280;
}

/* Summary page */
.summary h1 {
    text-align: center;
    margin-bottom: 20px;
}

.summary-score {
    text-align: center;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.score-big {
    font-size: 36px;
    font-weight: 800;
}

.score-pct {
    font-size: 20px;
    color: #6b7280;
}

.score-section {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 4px;
}

.summary-time {
    text-align: center;
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.domain-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.domain-table th,
.domain-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.domain-table th {
    background: #f9fafb;
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.domain-table td:last-child {
    text-align: right;
    font-weight: 600;
}

/* Expandable domain breakdown (summary page) */
.domain-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.domain-detail {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.domain-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    list-style: none;
}

.domain-detail-header::-webkit-details-marker {
    display: none;
}

.domain-detail-header::before {
    content: "\25B6";
    font-size: 10px;
    color: #9ca3af;
    margin-right: 8px;
    transition: transform 0.15s;
}

.domain-detail[open] > .domain-detail-header::before {
    transform: rotate(90deg);
}

.domain-detail-name {
    font-weight: 600;
    color: #374151;
}

.domain-detail-score {
    font-weight: 700;
    color: #6b7280;
    font-size: 14px;
}

.domain-detail-body {
    padding: 0 16px 12px;
    border-top: 1px solid #f3f4f6;
}

.review-answers {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.review-your-answer {
    color: #dc2626;
}

.review-correct-answer {
    color: #059669;
}

.flagged-list {
    list-style: none;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.flagged-list li {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.flagged-list li:last-child {
    border-bottom: none;
}

.summary h2 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #374151;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.summary-actions .btn {
    width: 100%;
}

/* Quick links (home page) */
.quick-links {
    margin-bottom: 24px;
}

.btn-progress {
    width: 100%;
    display: block;
}

/* Mastery overview */
.mastery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mastery-header h1 {
    font-size: 24px;
}

.back-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
}

.mastery-empty {
    text-align: center;
    padding: 40px 16px;
    color: #6b7280;
}

.mastery-empty p {
    margin-bottom: 16px;
}

.mastery-section {
    margin-bottom: 32px;
}

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

.section-header h2 {
    font-size: 18px;
}

.section-avg {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

.mastery-domain {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.domain-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

.subdomain-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.subdomain-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.subdomain-info {
    flex: 1;
    min-width: 0;
}

.subdomain-name {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.subdomain-code {
    font-size: 11px;
    color: #9ca3af;
}

.mastery-meter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.meter-bar {
    width: 60px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.meter-level-1 { background: #ef4444; }
.meter-level-2 { background: #f59e0b; }
.meter-level-3 { background: #3b82f6; }
.meter-level-4 { background: #10b981; }
.meter-level-5 { background: #8b5cf6; }

.level-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.level-1 { background: #fef2f2; color: #dc2626; }
.level-2 { background: #fffbeb; color: #d97706; }
.level-3 { background: #eff6ff; color: #2563eb; }
.level-4 { background: #ecfdf5; color: #059669; }
.level-5 { background: #f5f3ff; color: #7c3aed; }

.subdomain-stats {
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
    white-space: nowrap;
}

.stat-sep {
    margin: 0 2px;
}

/* Question generation (admin tool) */
.generate-questions {
    background: #f9fafb;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    margin-bottom: 16px;
}

.generate-questions h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.bank-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
}

.bank-label {
    font-weight: 600;
    color: #374151;
    min-width: 40px;
}

.bank-numbers {
    color: #6b7280;
}

.bank-warn {
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
}

.bank-low {
    color: #dc2626;
}

/* Low bank interstitial */
.low-bank-warning {
    text-align: center;
    padding: 24px 16px;
}

.low-bank-stats {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #991b1b;
}

.low-bank-stats p {
    margin-bottom: 6px;
}

.low-bank-cta {
    font-size: 15px;
    color: #374151;
    margin-bottom: 20px;
}

.low-bank-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.low-bank-secondary {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.gen-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.gen-buttons .btn {
    flex: 1;
    font-size: 14px;
    padding: 10px 16px;
}

.gen-result {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.gen-success {
    color: #059669;
    background: #ecfdf5;
}

.gen-warning {
    color: #d97706;
    background: #fffbeb;
}

/* HTMX indicator: hidden by default, shown during request */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

#gen-spinner {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 0;
}

#gen-spinner::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #d1d5db;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disable buttons during HTMX request */
.gen-buttons.htmx-request .btn {
    opacity: 0.5;
    pointer-events: none;
}

/* Parent Dashboard */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dash-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.student-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.dash-empty {
    text-align: center;
    padding: 40px 16px;
    color: #6b7280;
}

.dash-student-info h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 14px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.dash-section {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.dash-section h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.dash-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Mastery Coverage */
.coverage-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coverage-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coverage-label {
    width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.coverage-name {
    width: 80px;
    font-size: 13px;
    color: #374151;
    flex-shrink: 0;
}

.coverage-bar-track {
    flex: 1;
    height: 16px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.coverage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.level-fill-5 { background: #8b5cf6; }
.level-fill-4 { background: #10b981; }
.level-fill-3 { background: #3b82f6; }
.level-fill-2 { background: #f59e0b; }
.level-fill-1 { background: #ef4444; }
.level-fill-0 { background: #d1d5db; }

.coverage-count {
    font-size: 13px;
    color: #6b7280;
    width: 70px;
    text-align: right;
    flex-shrink: 0;
}

/* Activity Heatmap */
.heatmap-container {
    overflow-x: auto;
    padding-bottom: 8px;
}

.heatmap-grid {
    display: flex;
    gap: 2px;
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.heatmap-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.heatmap-day.out-of-range {
    background: transparent;
}

.intensity-0 { background: #ebedf0; }
.intensity-1 { background: #9be9a8; }
.intensity-2 { background: #40c463; }
.intensity-3 { background: #30a14e; }
.intensity-4 { background: #216e39; }

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    justify-content: flex-end;
}

.heatmap-legend-label {
    font-size: 11px;
    color: #9ca3af;
}

.heatmap-legend .heatmap-day {
    width: 12px;
    height: 12px;
}

/* Chart containers */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 12px auto 0;
}

/* Override & Message forms */
.override-form {
    margin-top: 8px;
}

.override-active,
.message-active {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.form-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    flex: 1;
    min-width: 0;
}

.form-select-narrow {
    flex: 0 0 auto;
    width: 100px;
}

.form-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    flex: 1;
    min-width: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    flex-shrink: 0;
}

/* Practice Test */
.btn-test {
    width: 100%;
    display: block;
    background: #7c3aed;
}

.btn-test:hover {
    background: #6d28d9;
}

.practice-test-start {
    margin-bottom: 16px;
}

.practice-test-start h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.timer-bar-test {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

/* Module transition */
.module-transition {
    text-align: center;
    padding: 32px 16px;
}

.module-transition h1 {
    font-size: 24px;
    margin-bottom: 24px;
}

.module-result {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.module-result-section {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 4px;
}

.module-result-score {
    font-size: 24px;
    font-weight: 800;
}

.module-next {
    margin-bottom: 24px;
}

.module-next h2 {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 8px;
}

.module-next-section {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.module-next-info {
    font-size: 14px;
    color: #9ca3af;
}

.btn-start-module {
    display: inline-block;
    padding: 14px 32px;
    font-size: 18px;
}

/* Practice Test Report */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.report-header h1 {
    font-size: 24px;
}

.report-score-hero {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 16px;
}

.score-composite {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-big {
    font-size: 56px;
    font-weight: 900;
    color: #7c3aed;
    line-height: 1;
}

.score-label {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
    margin-top: 4px;
}

.score-range {
    font-size: 13px;
    color: #9ca3af;
}

.report-section-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.section-score-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.section-score-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
}

.section-score-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.section-routing {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    text-transform: capitalize;
}

.report-section {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.report-section h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.report-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.module-summary-card {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.module-summary-card:last-child {
    border-bottom: none;
}

.module-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.module-difficulty-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
    background: #f3f4f6;
    color: #6b7280;
}

.badge-hard {
    background: #fef2f2;
    color: #dc2626;
}

.badge-easy {
    background: #ecfdf5;
    color: #059669;
}

.domain-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.domain-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-row .domain-name {
    width: 140px;
    font-size: 13px;
    color: #374151;
    flex-shrink: 0;
}

.domain-row .domain-score {
    width: 50px;
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
    text-align: right;
}

.domain-bar-track {
    flex: 1;
    height: 12px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.domain-bar-fill {
    height: 100%;
    background: #7c3aed;
    border-radius: 4px;
}

.review-question {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.review-question:last-child {
    border-bottom: none;
}

.review-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.flag-badge {
    background: #fffbeb;
    color: #d97706;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.correct-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.wrong-badge {
    background: #fef2f2;
    color: #dc2626;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.review-text {
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
}

.review-explanation {
    font-size: 13px;
    color: #6b7280;
}

.review-explanation summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 500;
}

.review-explanation p {
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid #e5e7eb;
}

.report-actions {
    text-align: center;
    padding: 16px 0;
}

/* ========== Login Page ========== */
.login-page {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page .container {
    width: 100%;
    max-width: 400px;
    padding: 16px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-brand p {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.login-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.15s, background 0.15s;
}

.login-input:focus {
    border-color: #2563eb;
    background: #fff;
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 17px;
    border-radius: 10px;
}

/* ========== Session History Calendar ========== */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history-header h1 {
    font-size: 24px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-calendar-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.btn-calendar-nav:hover {
    background: #e5e7eb;
}

.btn-calendar-nav-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-month-label {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.calendar-grid {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-row-header {
    margin-bottom: 8px;
}

.calendar-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    padding: 4px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
    min-height: 44px;
}

.calendar-day-empty {
    background: transparent;
}

.calendar-day-future .calendar-day-num {
    color: #d1d5db;
}

.calendar-day-num {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.calendar-today {
    background: #eff6ff;
}

.calendar-today .calendar-day-num {
    background: #2563eb;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.calendar-active {
    cursor: pointer;
}

.calendar-active:hover {
    background: #f3f4f6;
}

.calendar-dots {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.calendar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-sprint {
    background: #10b981;
}

.dot-test {
    background: #7c3aed;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.calendar-legend-label {
    margin-right: 8px;
}

.day-detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}

.day-detail-date {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
}

.session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    border: 1px solid #f3f4f6;
    margin-bottom: 6px;
    transition: background 0.1s;
}

.session-row:hover {
    background: #f9fafb;
}

.badge-section {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-math {
    background: #f5f3ff;
    color: #7c3aed;
}

.badge-rw {
    background: #ecfdf5;
    color: #059669;
}

.badge-test {
    background: #fffbeb;
    color: #d97706;
}

.session-time {
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

.session-score {
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.session-duration {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

.session-breakdown {
    font-size: 12px;
    color: #6b7280;
    margin-left: auto;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}
