/* =====================================================================
   VIEWS.CSS — Besonderheiten der einzelnen Seiten (Heute, Noten, Prüfung,
   Anforderungen, Todos, Einstellungen) und das Skala-Lineal.
   ===================================================================== */

/* ---------- Skala-Lineal (Notenstand & Prüfungs-Detail) ---------- */
.scale { position: relative; height: 66px; margin-top: 8px; }
.scale .bar { position: absolute; left: 0; right: 0; top: 22px; height: 12px; display: flex; gap: 2px; }
.scale .bar i { display: block; height: 12px; border-radius: 3px; min-width: 3px; }
.scale .pin { position: absolute; top: 12px; width: 4px; height: 32px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.scale .pin.ghost { background: var(--bg); border: 3px solid var(--text); width: 14px; height: 14px; margin-left: -7px; top: 21px; border-radius: 50%; }
.scale .tick { position: absolute; top: 42px; font-size: 12px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.scale .tick:first-of-type { transform: translateX(-30%); }

.legend { display: flex; align-items: center; gap: 8px; }
.legend-pin { width: 4px; height: 14px; border-radius: 2px; background: var(--accent); display: inline-block; }
.legend-ring { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--text); display: inline-block; margin-left: 10px; }

/* ---------- Heute ---------- */
.agenda { padding-top: 10px; padding-bottom: 10px; }
.agenda-time { width: 52px; flex: none; text-align: right; font-family: var(--font-mono); font-size: 14px; color: var(--text); line-height: 1.3; }
.agenda-time span { display: block; color: var(--muted); }
.agenda.cancelled .agenda-title { text-decoration: line-through; color: var(--muted); }
.agenda.is-next { background: var(--accent-soft); }
.agenda-title { font-size: 17px; font-weight: 650; }

.countdown { display: flex; align-items: center; gap: 16px; }
.countdown-num { font-size: 40px; font-weight: 700; line-height: 1; min-width: 64px; color: var(--accent); }
.muted-ico { color: var(--muted); }
@media (hover: hover) { a.card:hover { background: var(--raised); } }

.hero-num { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 0; }
.hero-num .num { font-size: 56px; font-weight: 700; line-height: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat { background: var(--raised); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.stat.wide { grid-column: 1 / -1; }
.stat-label { margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.stat-value.ok { color: var(--ok); }
.stat-value.bad { color: var(--bad); }

.chart-box { position: relative; height: 220px; }

.filter-pop { position: relative; }
.filter-pop[open] > summary { background: var(--accent-soft); border-color: var(--accent); }
.filter-pop-body {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(320px, calc(100vw - 48px));
    background: var(--raised); border: 1px solid var(--border-ui); border-radius: var(--radius-sm);
    padding: 14px; box-shadow: 0 10px 30px var(--shadow);
}
.filter-pop-body .seg { background: var(--surface); }

/* ---------- Noten ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.filters .form-row.compact { flex: 1 1 150px; }
.filters .seg { flex: 1 1 100%; }

.group { margin-bottom: 8px; }
.fold > summary { list-style: none; cursor: pointer; min-height: 44px; align-items: center; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-title { display: inline-flex; align-items: center; gap: 8px; }
.fold-ico { transition: transform .15s; }
.fold:not([open]) .fold-ico { transform: rotate(-90deg); }
.fold-count { font-size: 12px; color: var(--muted); border: 1px solid var(--border-ui); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.fold > summary:focus-visible { outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .fold-ico { transition: none; } }
.group-h { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 4px 8px; }

.manage-row { padding-top: 0; padding-bottom: 0; gap: 4px; }
.manage-main {
    flex: 1; min-width: 0; min-height: 64px; display: flex; align-items: center; gap: 10px;
    background: none; border: 0; padding: 8px 0; text-align: left; color: var(--text); cursor: pointer;
}
.card .manage-row { margin: 0 -16px; padding-left: 16px; padding-right: 8px; }
@media (hover: hover) { .manage-row:hover { background: var(--raised); } }

/* ---------- Prüfung (Detail) ---------- */
.detail-title { margin: 0 0 16px; }
.big-badge { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; font-size: 40px; font-weight: 700; flex: none; }
.open-result { font-size: 28px; font-weight: 650; line-height: 1.2; }
.detail-row { justify-content: space-between; min-height: 52px; }
.detail-row .dl { font-size: 16px; flex: none; }
.detail-row .dv { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 12px; }
.detail-actions .btn { flex: 1; }
#view-pruefung .top { padding-bottom: 4px; }

/* ---------- Anforderungen ---------- */
.req { margin-bottom: 12px; }
.req-name { font-size: 17px; font-weight: 650; }
.req-child { border-left: 3px solid var(--border-ui); }
.eval-group { margin-top: 6px; }
.eval-op { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.eval-leaf { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 15px; }
.eval-leaf .eval-mark .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.eval-leaf.done .eval-mark { color: var(--ok); }
.eval-leaf.open .eval-mark { color: var(--bad); }
.eval-leaf .chip-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }

/* ---------- Todos ---------- */
.add-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; }
.add-row input { border: 0; background: transparent; }
.add-row .btn { white-space: nowrap; }
.todo-row { gap: 6px; padding: 2px 0; }
.todo-row .iconbtn.flat { width: 40px; height: 40px; }
.todo-text { padding: 12px 0; outline-offset: 2px; min-height: 44px; overflow-wrap: anywhere; cursor: text; }
.todo-row.is-done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-row[draggable=true] { cursor: default; }

/* ---------- Einstellungen ---------- */
.legal-links { text-align: center; font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.legal-links a { color: var(--muted); text-underline-offset: 3px; display: inline-block; padding: 10px 4px; }

/* Konto ohne ECTS: ECTS-Felder in Listen ausblenden (Texte werden zusätzlich im JS weggelassen) */
body.no-ects .ects-only { display: none !important; }
