/* Abstimmung, Meldungen, Seitenkopf der Detailseiten */

/* Seitenkopf: Titel links, Aktionen rechts */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  gap: .9rem 1.5rem; padding-bottom: 1.05rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.page-head__text { flex: 1 1 18rem; min-width: 0; }
.page-head__text h1, .page-head__text h2 { margin: .15rem 0 .2rem; }
.page-head__sub { color: var(--muted); margin: .2rem 0 0; max-width: 62ch; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .4rem; }
.page-head__actions form { margin: 0; }
.page-head--inner { border-bottom: 0; margin-bottom: .6rem; padding-bottom: 0; }

/* Statusleiste */
.status-track {
  list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .4rem;
}
.status-track__step {
  position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-content: start;
  padding: .55rem .7rem; border: 1px solid var(--line); background: transparent; color: var(--muted); min-height: 44px;
}
.status-track__dot {
  grid-row: 1; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 2px;
  background: #ede8dc; color: var(--muted); font-size: .8rem; font-weight: 700;
}
.status-track__label { font-size: .86rem; font-weight: 650; align-self: center; overflow-wrap: anywhere; }
.status-track__who { grid-column: 2; font-size: .76rem; color: var(--accent); font-weight: 650; margin-top: .15rem; }
.status-track__step.is-done { color: var(--ink); background: var(--surface); }
.status-track__step.is-done .status-track__dot { background: var(--mint-paper); color: var(--accent); }
.status-track__step.is-now { background: var(--mint-paper); border-color: var(--accent); border-width: 2px; padding: calc(.55rem - 1px) calc(.7rem - 1px); color: var(--ink); }
.status-track__step.is-now .status-track__dot { background: var(--accent); color: var(--on-accent); }
.status-return { margin-bottom: 1rem; }

/* Abstimmung */
.wf-layout { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.wf-main, .wf-history { min-width: 0; }
.wf-main .card:last-child { margin-bottom: 0; }
.wf-action { border-top-width: 3px; }
.wf-action .eyebrow { display: block; margin-bottom: .2rem; }
.wf-action h2, .wf-comment h2, .wf-history h2 { margin-top: 0; }
.wf-comment h2 { font-size: 1.35rem; }
.wf-layout textarea { min-height: 5.5rem; }
.wf-empty { margin: .4rem 0; }
@media (min-width: 1100px) {
  .wf-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Verlauf */
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; }
.timeline__item { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline__item::before { content: ""; position: absolute; left: .32rem; top: .9rem; bottom: -.1rem; width: 1px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: 0; top: .35rem; width: .7rem; height: .7rem; background: var(--surface); border: 2px solid var(--accent); border-radius: 50%; }
.timeline__head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.timeline__badge { padding: .12rem .5rem; border-radius: 2px; font-size: .74rem; font-weight: 700; background: #ede8dc; color: var(--ink); }
.timeline__badge.is-blue { background: var(--mint-paper); color: var(--accent); }
.timeline__badge.is-green { background: var(--accent); color: var(--on-accent); }
.timeline__badge.is-red { background: var(--red-light); color: var(--red); }
.timeline__who { font-weight: 650; font-size: .9rem; }
.timeline__date { color: var(--muted); font-size: .8rem; margin-left: auto; }
.timeline__text { margin: .35rem 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.timeline__meta { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.timeline__link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

/* Fassung ansehen */
.wf-back { margin: 0 0 .4rem; }
.wf-back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.wf-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); margin-bottom: 1rem; }
.wf-tile { margin-bottom: 0; }
.wf-tile h2 { margin-top: 0; }
.wf-kpis { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.wf-kpis dt { font-size: .8rem; color: var(--muted); }
.wf-kpis dd { margin: .1rem 0 0; font-family: var(--display); font-size: clamp(1.25rem, 1.8vw, 1.7rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wf-kpis dd small { font-family: var(--sans); font-size: .78rem; color: var(--muted); }
.wf-kpis .is-total { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: .7rem; }
.wf-kpis .is-total dd { color: var(--accent); }

/* Meldungen */
.filter-switch { display: inline-flex; margin: 0 0 1rem; border: 1px solid #a6a096; }
.filter-switch a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; font-weight: 650; text-decoration: none; color: var(--ink);
}
.filter-switch a + a { border-left: 1px solid #a6a096; }
.filter-switch a:hover { background: var(--mint-paper); }
.filter-switch a.is-active { background: var(--accent); color: var(--on-accent); }
.note-group__title { font-family: var(--sans); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin: 0 0 .4rem; }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-item { display: grid; grid-template-columns: .7rem minmax(0, 1fr); gap: .8rem; padding: .85rem 0; border-top: 1px solid #e4ded2; }
.note-item:first-child { border-top: 0; }
.note-item__dot { width: .6rem; height: .6rem; margin-top: .45rem; border-radius: 50%; }
.note-item.is-unread .note-item__dot { background: var(--accent); }
.note-item__title { margin: 0; }
.note-item.is-unread .note-item__title { font-weight: 750; }
.note-item__text { margin: .2rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.note-item__meta { margin: .3rem 0 0; font-size: .8rem; color: var(--muted); }
.note-item__meta a { font-weight: 650; }

@media (max-width: 760px) {
  .status-track { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .status-track { grid-template-columns: 1fr; }
  .page-head__actions { width: 100%; }
}
:is(.filter-switch a, .timeline__link, .wf-back a, .note-item__meta a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Einschätzung Admin/BdB (Rückmeldung 30.11.) */
.wf-verdict { border: 0; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.wf-verdict legend { font-weight: 600; font-size: .86rem; margin-bottom: .4rem; padding: 0; }
.wf-verdict label { display: inline-flex; position: relative; }
.wf-verdict input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wf-verdict span { padding: .4rem .85rem; border: 1px solid #a6a096; border-radius: 99px; background: #fffcf6; font-weight: 600; font-size: .88rem; color: var(--ink); }
.wf-verdict label:has(input:checked) span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wf-verdict label:has(input:focus-visible) span { outline: 3px solid #9fd8c3; }
.wf-send .actions { flex-wrap: wrap; }
