/* Moodle-Dashboard: light frame tokens from styles.css, one row per Lehrmittel, three chain parts. */
#bztMoodleView { margin-top: 12px; }
.bmd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.bmd-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bmd-tab { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.bmd-tab small { font-size: .75rem; color: var(--muted); }
.bmd-tab[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.bmd-tab:focus-visible, .bmd-read:focus-visible, .bmd-small:focus-visible, .bmd-switch input:focus-visible { outline: 3px solid #005b96; outline-offset: 3px; }
.bmd-read { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.bmd-read:disabled { opacity: .55; cursor: default; }
.bmd-read svg, .bmd-small svg { width: 16px; height: 16px; }
.bmd-status:empty { display: none; }
.bmd-status.error { color: var(--danger); }
.bmd-meta, .bmd-hint { font-size: .92rem; color: var(--muted); margin: 8px 0; overflow-wrap: anywhere; }
.bmd-meta-line { margin: 0 0 4px; }
.bmd-meta-line strong { color: var(--ink); }
.bmd-details { margin: 0; }
.bmd-details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-size: .88rem; color: var(--muted); }
.bmd-details ul { margin: 2px 0 6px; padding-left: 18px; font-size: .88rem; }
.bmd-details li { margin: 2px 0; }
.bmd-module:focus-visible, .bmd-orphans:focus-visible { outline: 3px solid #005b96; outline-offset: 2px; border-radius: 4px; }
.bmd-topic { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.bmd-topic h3 { margin: 0 0 8px; font-size: 1.05rem; }
.bmd-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bmd-row { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(0, 1.6fr)); gap: 1px; background: var(--line); }
.bmd-row > div { background: var(--paper); padding: 10px 12px; min-width: 0; }
.bmd-header > div { background: var(--soft); font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bmd-row.mismatch > .bmd-item { box-shadow: inset 3px 0 0 #b7791f; }
.bmd-item small { display: block; margin-top: 4px; font-size: .78rem; color: #8a5a00; }
.bmd-part-title { display: none; }
.bmd-module + .bmd-module { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.bmd-module-name { font-size: .92rem; color: var(--ink); overflow-wrap: anywhere; }
.bmd-state, .bmd-due, .bmd-edition, .bmd-note, .bmd-missing, .bmd-pending, .bmd-mark { margin: 4px 0 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.bmd-state.hidden { color: #8a1c1c; }
.bmd-state.conditional { color: #6b4e00; }
.bmd-due.expired { color: #8a1c1c; }
.bmd-edition.identical { color: #236844; }
.bmd-edition.different { color: #8a1c1c; }
.bmd-missing { font-style: italic; }
.bmd-switch-row, .bmd-mark-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.bmd-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink); cursor: pointer; }
.bmd-switch input { appearance: none; -webkit-appearance: none; box-sizing: border-box; width: 38px; min-width: 38px; height: 22px; min-height: 22px; margin: 0; padding: 0; border: 0; border-radius: 11px; background: #c9d1d7; position: relative; cursor: pointer; transition: background .15s; flex: 0 0 38px; }
.bmd-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.bmd-switch input:checked { background: #2b715b; }
.bmd-switch input:checked::after { transform: translateX(16px); }
.bmd-switch input:disabled { opacity: .5; cursor: default; }
.bmd-pending { color: #6b4e00; }
.bmd-mark.open { color: #8a1c1c; font-weight: 600; }
.bmd-mark.gone { color: var(--muted); }
.bmd-small { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; font-size: .82rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-family: inherit; cursor: pointer; }
.bmd-small.ghost { background: transparent; }
.bmd-mark-form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.bmd-mark-form input { flex: 1 1 180px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.bmd-plain { margin: 8px 0; padding-left: 18px; font-size: .92rem; }
.bmd-plain li { margin: 6px 0; overflow-wrap: anywhere; }
.bmd-plain small { color: var(--muted); }
.bmd-reason { color: #8a5a00; }
.bmd-fixed { margin-top: 14px; }
.bmd-fixed summary { cursor: pointer; min-height: 36px; color: var(--muted); }
@media (max-width: 760px) {
  .bmd-row { grid-template-columns: minmax(0, 1fr); }
  .bmd-header { display: none; }
  .bmd-part-title { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
  .bmd-row + .bmd-row { margin-top: 10px; }
}
.bmd-mismatch { color: #8a5a00; font-weight: 600; }
.bmd-problem { color: #8a1c1c; }
.bmd-orphans .bmd-plain li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
/* Stufe B: delete orders, run confirmation, relay jobs. */
.bmd-run { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid #8a1c1c; border-radius: 6px; background: var(--paper); color: #8a1c1c; font: inherit; font-weight: 600; cursor: pointer; }
.bmd-run:disabled { opacity: .45; cursor: default; }
.bmd-run:focus-visible, .bmd-danger:focus-visible { outline: 3px solid #005b96; outline-offset: 3px; }
.bmd-run svg { width: 16px; height: 16px; }
.bmd-confirm { margin: 10px 0; padding: 12px 14px; border: 1px solid #8a1c1c; border-radius: 6px; background: #fff6f6; }
.bmd-confirm-text { margin: 0 0 6px; font-size: .92rem; }
.bmd-confirm ul { margin: 0 0 10px; padding-left: 18px; font-size: .9rem; }
.bmd-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bmd-danger { border-color: #8a1c1c; background: #8a1c1c; color: #fff; }
.bmd-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.bmd-order, .bmd-job { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.bmd-order.marked, .bmd-job.marked { color: #8a1c1c; font-weight: 600; }
.bmd-order.queued, .bmd-order.claimed, .bmd-job.queued, .bmd-job.claimed { color: #6b4e00; }
.bmd-order.done, .bmd-job.done { color: #236844; }
.bmd-order.blocked, .bmd-order.failed, .bmd-order.uncertain, .bmd-job.blocked, .bmd-job.failed, .bmd-job.uncertain { color: #8a1c1c; }
.bmd-jobs .bmd-plain li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bmd-jobs:focus-visible { outline: 3px solid #005b96; outline-offset: 2px; border-radius: 4px; }
/* Second step where the hand is: the bar sticks to the bottom of the viewport while anything is marked. */
.bmd-runbar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 16px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); border: 1px solid #8a1c1c; border-radius: 6px; background: #fff6f6; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); }
.bmd-runbar-text { font-size: .92rem; font-weight: 600; color: #8a1c1c; overflow-wrap: anywhere; }
