/* Rapportera fel: the link by each problem, the dialog and the admin tab (static/report.mjs, static/report-admin.mjs). */
.report-row{display:flex;justify-content:flex-start;margin:6px 0 0}
.report-link{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 2px;background:none;border:0;color:#5d6f68;font-size:.8rem;font-weight:700;text-decoration:underline;text-decoration-color:#b9c6bd;text-underline-offset:4px;white-space:nowrap}
.report-link span{font-size:.85rem;text-decoration:none;color:#8a9a92}
.report-link:hover{color:var(--green);text-decoration-color:currentColor}
.report-link:disabled{opacity:.6;text-decoration:none}
.question-presenting .report-link{font-size:.75rem}

.report-dialog{max-width:480px;padding:28px 28px 24px}
.report-dialog h2{font-size:1.45rem;margin:0 0 6px;letter-spacing:-.4px}
.report-intro{margin:0 0 16px;font-size:.92rem}
.report-reasons{border:0;margin:0 0 16px;padding:0;min-width:0}
.report-chips{display:flex;flex-wrap:wrap;gap:8px}
.report-reasons legend,.report-label{font-weight:800;font-size:.9rem;margin-bottom:8px;padding:0;color:var(--ink)}
.report-reasons legend span,.report-label span{font-weight:600;color:var(--muted);font-size:.78rem;margin-left:6px}
.report-dialog label.report-reason{position:relative;display:inline-flex;margin:0;font-size:inherit}
.report-reason input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.report-reason span{display:inline-flex;align-items:center;min-height:42px;padding:8px 13px;border:1px solid #c5d1c7;border-radius:999px;background:#fff;font-size:.86rem;font-weight:700;cursor:pointer;color:var(--ink);transition:background .12s,border-color .12s}
.report-reason span::before{content:"";width:10px;height:10px;border-radius:50%;border:2px solid #9fb0a5;margin-right:8px;flex:none;box-sizing:border-box}
.report-reason:hover span{border-color:var(--green)}
.report-reason input:checked+span{background:var(--mint);border-color:var(--green);color:var(--green)}
.report-reason input:checked+span::before{background:var(--green);border-color:var(--green);box-shadow:inset 0 0 0 2px var(--mint)}
.report-reason input:focus-visible+span{outline:3px solid #e88c2e;outline-offset:3px}
.report-dialog label.report-label{display:block;margin:0 0 8px;font-size:.9rem}
.report-dialog textarea{display:block;width:100%;min-height:84px;resize:vertical;border:1px solid #c5d1c7;border-radius:12px;padding:10px 12px;font:inherit;font-size:.93rem;background:#fff;color:var(--ink)}
.report-dialog textarea:focus-visible{outline:3px solid #e88c2e;outline-offset:2px}
.report-count{margin:4px 0 0;font-size:.75rem;text-align:right}
.report-error{margin:6px 0 0;color:#a3371f;font-weight:700;font-size:.88rem}
.report-error:empty{display:none}
.report-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;align-items:center}
.report-dialog .report-actions .primary{width:auto;min-height:48px;padding:12px 22px;gap:12px}
.report-actions .secondary{min-height:48px}
.report-done{text-align:left}
.report-done-mark{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--mint);color:var(--green);font-weight:900;margin-bottom:10px}
.report-done p{margin:4px 0 0}
.report-done .report-limit{background:#fff6dc;border:1px solid #efd58a;border-radius:12px;padding:10px 12px;color:#5b4a14}
@media (max-width:560px){.report-dialog{padding:22px 18px 18px}.report-reason span{font-size:.82rem;padding:7px 11px}.report-dialog .report-actions>button{flex:1 1 auto}}

/* Summary and exam result marks */
.reported-note{color:var(--muted);font-size:.85rem}

/* Admin tabs */
.admin-tabs{display:flex;gap:4px;max-width:1180px;margin:18px auto 0;padding:0 24px;border-bottom:1px solid var(--line)}
.admin-tabs a{display:inline-flex;align-items:center;gap:8px;padding:12px 16px;min-height:46px;font-weight:800;font-size:.92rem;color:var(--muted);text-decoration:none;border-bottom:3px solid transparent;margin-bottom:-1px}
.admin-tabs a[aria-current=page]{color:var(--green);border-color:var(--green)}
.admin-tabs a:hover{color:var(--green)}
.admin-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#c2410c;color:#fff;font-size:.74rem;font-weight:800}

/* Admin: Felrapporter */
.rp-admin{max-width:1180px;margin:0 auto;padding:22px 24px 60px}
.rp-head h1{font-size:clamp(1.8rem,3vw,2.4rem);margin-bottom:6px}
.rp-head p{margin:0 0 16px;max-width:760px}
.rp-filters{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;margin-bottom:18px}
.rp-filters [role=group]{display:flex;flex-wrap:wrap;gap:6px}
.rp-filters [role=group] button{min-height:40px;padding:7px 14px;border:1px solid #c5d1c7;border-radius:999px;background:#fff;font-weight:700;font-size:.86rem}
.rp-filters [role=group] button[aria-pressed=true]{background:var(--green);border-color:var(--green);color:#fff}
.rp-filters label{display:flex;align-items:center;gap:8px;font-weight:700;font-size:.88rem}
.rp-filters select{min-height:40px;border:1px solid #c5d1c7;border-radius:10px;padding:6px 10px;font:inherit;font-size:.88rem;background:#fff;color:var(--ink)}
.rp-frequent{border:1px solid #efd58a;background:#fffaf0;border-radius:16px;padding:14px 18px;margin-bottom:18px}
.rp-frequent h2{font-size:1rem;margin:0 0 6px}
.rp-frequent p{margin:0 0 6px;font-size:.85rem}
.rp-frequent ul{margin:0;padding-left:18px;font-size:.9rem}
.rp-empty{border:1px dashed var(--line);border-radius:16px;padding:28px;text-align:center}
.rp-empty h2{font-size:1.2rem;margin-bottom:4px}
.rp-group{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px 20px;margin-bottom:16px}
.rp-group.paused{border-color:#e8a87c;box-shadow:inset 4px 0 0 #c2410c}
.rp-group-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;align-items:flex-start;margin-bottom:12px}
.rp-group-head h2{font-size:1.2rem;margin:2px 0 6px;letter-spacing:-.3px}
.rp-kind{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.rp-meta{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:0;font-size:.85rem}
.rp-pill{display:inline-flex;align-items:center;min-height:24px;padding:2px 10px;border-radius:999px;font-size:.75rem;font-weight:800;background:#eef2ee;color:#3c514a}
.rp-pill.new{background:#fde8d8;color:#8a3410}
.rp-pill.fixed{background:var(--mint);color:var(--green)}
.rp-pill.nofault{background:#e7edf7;color:#29456e}
.rp-pill.paused{background:#c2410c;color:#fff}
.rp-open{font-weight:700;font-size:.86rem}
.rp-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.rp-preview{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:14px 16px;min-width:0}
.rp-preview .rp-question{font-weight:700;color:var(--ink);white-space:pre-line;margin-bottom:10px}
.rp-preview img{display:block;max-width:100%;height:auto;background:#fff;border:1px solid var(--line);border-radius:8px;margin-bottom:10px}
.rp-preview .rp-visual svg{max-width:100%;height:auto}
.rp-choices{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:4px;font-size:.88rem}
.rp-choices li{padding:4px 8px;border-radius:8px}
.rp-choices li.rp-answer{background:var(--mint);font-weight:800;color:var(--green)}
.rp-facit{font-size:.88rem;margin:0 0 6px;color:var(--ink)}
.rp-preview details{font-size:.85rem}
.rp-preview summary{cursor:pointer;font-weight:700;padding:4px 0}
.rp-reports h3{font-size:.95rem;margin:0 0 8px}
.rp-reports ol{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.rp-reports li{border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:.88rem}
.rp-report-top{display:flex;flex-wrap:wrap;gap:4px 10px;justify-content:space-between}
.rp-report-top strong{color:var(--ink)}
.rp-report-top span{color:var(--muted);font-size:.8rem}
.rp-text{margin:6px 0 0;color:var(--ink);white-space:pre-line;overflow-wrap:anywhere}
.rp-changed{display:inline-block;margin-top:6px;font-size:.78rem;font-weight:700;color:#29456e}
.rp-reports details{margin-top:6px;font-size:.8rem}
.rp-reports summary{cursor:pointer;color:var(--muted);font-weight:700}
.rp-reports dl{display:grid;grid-template-columns:max-content 1fr;gap:2px 10px;margin:6px 0 0}
.rp-reports dt{color:var(--muted)}
.rp-reports dd{margin:0;overflow-wrap:anywhere}
.rp-status{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;border-top:1px solid var(--line);margin-top:14px;padding-top:14px}
.rp-status fieldset{border:0;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.rp-status legend{font-weight:800;font-size:.85rem;margin-bottom:6px;padding:0}
.rp-status fieldset label{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px;border:1px solid #c5d1c7;border-radius:999px;font-size:.86rem;font-weight:700;cursor:pointer;background:#fff}
.rp-status fieldset label:has(input:checked){border-color:var(--green);background:var(--mint);color:var(--green)}
.rp-status .rp-note{flex:1 1 260px;display:grid;gap:4px;font-weight:800;font-size:.85rem}
.rp-status textarea{width:100%;min-height:44px;resize:vertical;border:1px solid #c5d1c7;border-radius:10px;padding:8px 10px;font:inherit;font-size:.88rem}
.rp-status .primary{min-height:44px;padding:10px 18px;font-size:.88rem}
.rp-saved{flex-basis:100%;margin:0;font-size:.85rem;font-weight:700;color:var(--green)}
.rp-saved:empty{display:none}
@media (max-width:820px){.rp-body{grid-template-columns:1fr}.rp-admin{padding:16px 14px 48px}.admin-tabs{padding:0 14px}.rp-group{padding:14px}}
