/* ==========================================================================
   Verwaltung: Speicher-Popup, Bewerbungen, Umschalter
   ========================================================================== */

/* ---------- Popup "Ungespeicherte Aenderungen" ---------- */

.unsaved {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 250;
  width: min(560px, calc(100% - 24px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 200, 87, 0.5);
  border-radius: 20px;
  background: rgba(3, 24, 30, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 4px rgba(255, 200, 87, 0.08);
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.unsaved.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.unsaved.is-shaking { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translate(calc(-50% - 7px), 0); } 40%, 80% { transform: translate(calc(-50% + 7px), 0); } }

.unsaved-head { display: flex; align-items: center; gap: 10px; }
.unsaved-head strong { flex: 1; }
.unsaved-dot { width: 10px; height: 10px; border-radius: 50%; background: #ffc857; box-shadow: 0 0 0 4px rgba(255, 200, 87, 0.2); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 200, 87, 0.05); } }
.unsaved-count { padding: 1px 10px; border-radius: 999px; background: rgba(255, 200, 87, 0.16); color: #ffc857; font-size: 0.8rem; font-weight: 700; }
.unsaved-list { display: grid; gap: 4px; max-height: 150px; margin: 10px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.unsaved-list li { position: relative; padding-left: 16px; color: #cfe6e5; font-size: 0.88rem; line-height: 1.5; }
.unsaved-list li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: #ffc857; }
.unsaved-list .is-more { color: var(--muted); }
.unsaved-list .is-more::before { display: none; }
.unsaved-error { margin-top: 8px; color: #ff9c9c; font-size: 0.86rem; }
.unsaved-error:empty { display: none; }
.unsaved-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Account Management: geaenderte Rollen */
.role-row.is-dirty { border-color: rgba(255, 200, 87, 0.55); }
.tag-changed { display: none; background: rgba(255, 200, 87, 0.15); color: #ffc857; }
.role-row.is-dirty .tag-changed { display: inline-block; }
.role-row.is-removed { opacity: 0.75; border-style: dashed; }
.role-row.is-removed header strong { text-decoration: line-through; }
.role-removed-note { color: #ffb3b3; font-size: 0.86rem; }

/* ---------- Bewerbungen (Verwaltung) ---------- */

.seg { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(1, 16, 21, 0.6); }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg-btn span { padding: 0 8px; border-radius: 999px; background: rgba(232, 247, 246, 0.08); font-size: 0.76rem; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: rgba(24, 223, 207, 0.16); color: var(--accent); }

.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; max-width: 560px; }

.sub-list { display: grid; gap: 8px; }
.sub-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.sub-row:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: translateX(2px); }
.sub-main { display: grid; flex: 1; min-width: 0; }
.sub-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-date { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

.status { padding: 3px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.status-open { background: rgba(255, 200, 87, 0.15); color: #ffc857; }
.status-accepted { background: rgba(110, 231, 160, 0.15); color: #6ee7a0; }
.status-rejected { background: rgba(255, 107, 107, 0.15); color: #ff8f8f; }

.dlg-sub { margin-top: 2px; color: var(--muted); font-size: 0.86rem; }
.meta-row { display: flex; align-items: center; gap: 10px; }
.meta-row code { padding: 1px 8px; border-radius: 6px; background: rgba(232, 247, 246, 0.08); color: #cfe6e5; font-size: 0.8rem; }

.decision-box { display: grid; gap: 4px; padding: 12px 16px; border: 1px solid var(--line-strong); border-left-width: 4px; border-radius: 12px; background: var(--surface); }
.decision-box.accepted { border-color: rgba(110, 231, 160, 0.5); background: rgba(110, 231, 160, 0.07); }
.decision-box.rejected { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.07); }
.decision-box small { color: var(--muted); }
.decision-box p { margin-top: 4px; color: #cfe6e5; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.decision-box .roles-line { color: var(--muted); font-size: 0.88rem; }

.answers { display: grid; gap: 10px; margin: 0; }
.answers > div { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(1, 16, 21, 0.5); }
.answers dt { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; }
.answers dd { margin: 4px 0 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ans-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.btn-success { background: rgba(110, 231, 160, 0.18); border-color: rgba(110, 231, 160, 0.55); color: #8ff0b6; }
.btn-success:hover { background: rgba(110, 231, 160, 0.3); }
.foot-left { margin-right: auto; }
.foot-left svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fld input[type="datetime-local"] { color-scheme: dark; }

.clip-link { color: var(--accent); border-bottom: 1px solid rgba(24, 223, 207, 0.4); overflow-wrap: anywhere; }
.clip-link:hover { border-color: var(--accent); }
.muted { color: var(--muted); }

.answers code { margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(232, 247, 246, 0.08); color: #cfe6e5; font-size: 0.78rem; }

/* Fraktions Management */
.steps-list { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 1.2em; list-style: disc; color: #cfe6e5; font-size: 0.88rem; }
.lookup { font-size: 0.86rem; color: var(--muted); }
.lookup.is-ok { color: #6ee7a0; font-weight: 600; }
.lookup.is-error { color: #ff9c9c; }

.fm-group { margin-bottom: 28px; }
.fm-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.05rem; font-style: normal; }
.fm-group-title span { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.fm-group-title small { padding: 1px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 0.76rem; font-weight: 700; }
.fm-list { display: grid; gap: 12px; }
.fm-card { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, transparent), transparent 100px), var(--surface); }
.fm-card header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fm-card h3 { margin: 0; font-size: 1.15rem; font-style: normal; }
.fm-card header p { color: var(--c); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; }
.fm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 20px; margin: 0; }
.fm-facts dt { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.fm-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 0.92rem; }
.fm-facts code { padding: 1px 7px; border-radius: 6px; background: rgba(232, 247, 246, 0.08); color: #cfe6e5; font-size: 0.76rem; }
.fm-card footer { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.fm-card footer .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fm-card footer .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.foot-right { margin-left: auto; }

.warn-meter { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(1, 16, 21, 0.6); }
.warn-meter b { font-size: 0.86rem; }
.warn-dots { display: inline-flex; gap: 5px; }
.warn-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(232, 247, 246, 0.14); }
.warn-dots i.on { background: #ffc857; box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.2); }
.warn-meter.is-max { border-color: rgba(255, 107, 107, 0.6); }
.warn-meter.is-max .warn-dots i.on { background: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.22); }

.fm-warns summary { cursor: pointer; color: var(--muted); font-size: 0.86rem; }
.fm-warns ol { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 1.3em; color: #cfe6e5; font-size: 0.88rem; line-height: 1.5; }

/* Termine im Bewerbungs-Detail */
.iv-admin { display: grid; gap: 8px; }
.iv-admin h4 { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.iv-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 14px; border: 1px solid var(--line-strong); border-left-width: 4px; border-radius: 12px; background: var(--surface); font-size: 0.9rem; }
.iv-row.iv-accepted { border-color: rgba(110, 231, 160, 0.5); }
.iv-row.iv-declined { border-color: rgba(255, 107, 107, 0.45); }
.iv-row.iv-cancelled { opacity: 0.55; border-style: dashed; }
.iv-tag { padding: 2px 11px; border-radius: 999px; background: rgba(255, 200, 87, 0.15); color: #ffc857; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.iv-accepted .iv-tag { background: rgba(110, 231, 160, 0.15); color: #6ee7a0; }
.iv-declined .iv-tag { background: rgba(255, 107, 107, 0.15); color: #ff8f8f; }
.iv-cancelled .iv-tag { background: rgba(232, 247, 246, 0.08); color: var(--muted); }
.iv-proposal { display: inline-block; opacity: 0.75; }
.iv-proposal.is-chosen { opacity: 1; color: #6ee7a0; font-weight: 600; }

.post-list { display: grid; gap: 14px; }
.post-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.post-thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: linear-gradient(145deg, rgba(24, 223, 207, 0.16), rgba(9, 78, 82, 0.3)); }
.post-thumb { position: relative; isolation: isolate; }
.post-thumb .cover-fg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.post-thumb > svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0.7; }
.post-main h3 { margin-bottom: 4px; font-size: 1.1rem; font-style: normal; }
.post-main p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.post-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.post-actions .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.post-actions .icon-btn { align-self: flex-end; }

.phase { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: rgba(232, 247, 246, 0.07); color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.phase svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.phase-open { background: rgba(110, 231, 160, 0.14); color: #8ff0b6; }
.count-chip { padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; }
.count-chip.ok { color: #8ff0b6; border-color: rgba(110, 231, 160, 0.3); }
.count-chip.no { color: #ff9c9c; border-color: rgba(255, 107, 107, 0.3); }

.phase-history small { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.phase-history ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; color: #cfe6e5; font-size: 0.86rem; }

/* Editor */
.grid2.equal { grid-template-columns: 1fr 1fr; }
.img-preview { margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.img-preview { background: rgba(1, 16, 21, 0.6); }
.img-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; }

.q-card { display: grid; gap: 12px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(1, 16, 21, 0.55); }
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.q-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(24, 223, 207, 0.16); color: var(--accent); font-size: 0.82rem; font-weight: 700; }
.q-type { flex: 1 1 200px; min-width: 0; }
.q-tools { display: flex; gap: 2px; margin-left: auto; }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(232, 247, 246, 0.12); transition: background 0.2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfe6e5; transition: transform 0.2s, background 0.2s; }
.switch input:checked + .switch-track { background: rgba(24, 223, 207, 0.45); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:checked ~ .switch-label { color: var(--accent); }

@media (max-width: 900px) {
  .post-card { grid-template-columns: 110px minmax(0, 1fr); }
  .post-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .post-actions .icon-btn { margin-left: auto; }
}

@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr; }
  .sub-row { flex-wrap: wrap; }
  .sub-date { order: 4; flex: 1 1 100%; }
  .post-card { grid-template-columns: 1fr; }
  .post-thumb { aspect-ratio: 16 / 8; }
  .grid2.equal { grid-template-columns: 1fr; }
  .unsaved { bottom: 12px; padding: 14px; }
}

/* Live-Zaehler an den Reitern */
.app-tab-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #ffc857; color: #2a1d00; font-size: 0.72rem; font-weight: 800; text-align: center; animation: count-pop 0.35s; }
.app-tab-count[hidden] { display: none; }
@keyframes count-pop { 40% { transform: scale(1.3); } }

/* Account Management: einklappbare Rollen */
.role-list { gap: 10px; }
.role-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.role-tools input[type="search"] { flex: 1 1 240px; max-width: 360px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(1, 16, 21, 0.75); color: var(--text); font: inherit; font-size: 0.92rem; }
.role-tools input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 223, 207, 0.14); }
.role-row { gap: 10px; padding: 12px 16px; }
.role-row header { cursor: pointer; }
.role-row header strong { cursor: pointer; }
.role-toggle { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.role-toggle:hover { background: rgba(24, 223, 207, 0.12); color: var(--accent); }
.role-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; transform: rotate(-90deg); }
.role-row.is-open .role-toggle svg { transform: none; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px; cursor: pointer; }
.perm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.perm-chip b { font-size: 0.72rem; font-weight: 400; opacity: 0.9; }
.perm-chip.is-read { background: rgba(76, 194, 255, 0.13); color: #7fd3ff; }
.perm-chip.is-write { background: rgba(24, 223, 207, 0.14); color: var(--accent); }
.perm-chip.is-none { background: rgba(255, 255, 255, 0.06); color: #7a9a9a; font-weight: 500; }
.perm-body { display: grid; gap: 14px; padding: 4px 0 2px; }
.perm-more { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 0 14px; }
.perm-more summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--accent); font-size: 0.88rem; font-weight: 600; cursor: pointer; list-style: none; }
.perm-more summary::-webkit-details-marker { display: none; }
.perm-more summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.perm-more summary small { color: var(--muted); font-weight: 400; }
.perm-more[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.perm-group { display: grid; gap: 8px; padding-bottom: 14px; }
.perm-group h5 { color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.perm-fld small { display: block; margin-top: 1px; font-size: 0.72rem; line-height: 1.35; }
.perm-body .muted, .role-row .muted { color: var(--muted); font-size: 0.86rem; }
.perm-grid { align-items: end; }

.perm-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 8px; background: rgba(24, 223, 207, 0.06); }

/* Regelwerke: Umschalter, Markierungen */
.rw-books { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rw-book { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.rw-book:hover { border-color: var(--line-strong); color: var(--text); }
.rw-book.is-active { border-color: var(--accent); background: rgba(24, 223, 207, 0.14); color: var(--accent); }
.rw-book.is-add { display: inline-flex; align-items: center; gap: 6px; border-style: dashed; }
.rw-book.is-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.rw-bookbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(9, 78, 82, 0.12); }
.rw-bookbar p { margin: 0; font-size: 0.9rem; color: #cfe6e5; }
.rw-bookbar small { color: var(--muted); }
.rw-bookbar code { padding: 1px 7px; border-radius: 6px; background: rgba(232, 247, 246, 0.08); }
.chapter-tools { display: inline-flex; margin-left: 4px; }
.rule-name { display: block; margin-bottom: 2px; }
.rule-row.tone-key { border-left: 3px solid var(--accent); }
.rule-row.tone-sanction { border-left: 3px solid #ffc857; }
.rule-row.tone-perma { border-left: 3px solid #ff6b6b; }
.rule-row.tone-ok { border-left: 3px solid #6ee7a0; }
.rule-row.tone-no { border-left: 3px solid #ff8f8f; }
.dlg-book { display: block; margin-top: 2px; color: var(--muted); font-size: 0.78rem; font-weight: 500; }

.mark-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mark-label { color: var(--muted); font-size: 0.82rem; margin-right: 2px; }
.mark-btn { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(1, 16, 21, 0.7); font: inherit; font-size: 0.8rem; cursor: pointer; transition: transform 0.12s, border-color 0.15s; }
.mark-btn:hover { transform: translateY(-1px); border-color: currentColor; }
.mark-btn.is-clear { color: var(--muted); }

.hl-no { color: #ff8f8f; font-weight: 600; }
.hl-ok { color: #6ee7a0; font-weight: 600; }
.hl-key { color: var(--accent); font-weight: 600; }
.hl-sanction, .hl-perma, .hl-num { padding: 0 5px; border-radius: 5px; }
.hl-sanction { background: rgba(255, 200, 87, 0.14); color: #ffc857; }
.hl-perma { background: rgba(255, 107, 107, 0.16); color: #ff6b6b; font-weight: 700; }
.hl-num { background: rgba(24, 223, 207, 0.13); color: #b8fff8; white-space: nowrap; }
.mark-btn.hl-no, .mark-btn.hl-ok, .mark-btn.hl-key { background: rgba(1, 16, 21, 0.7); }

.mark-preview-wrap { display: grid; gap: 6px; }
.mark-preview-label { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.mark-preview { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 12px; background: rgba(1, 16, 21, 0.6); line-height: 1.55; overflow-wrap: anywhere; }
.mark-preview h4 { font-size: 1rem; font-style: normal; }
.mark-preview ul { margin: 0; padding-left: 20px; }
.mark-preview.tone-key { border-left-color: var(--accent); }
.mark-preview.tone-sanction { border-left-color: #ffc857; }
.mark-preview.tone-perma { border-left-color: #ff6b6b; }
.mark-preview.tone-ok { border-left-color: #6ee7a0; }
.mark-preview.tone-no { border-left-color: #ff8f8f; }
.pv-abs b { margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); font-size: 0.76rem; }
.pv-ex b { margin-right: 6px; font-size: 0.76rem; }
.pv-ok b { color: #6ee7a0; } .pv-no b { color: #ff8f8f; } .pv-info b { color: #7fd3ff; }

/* ---------- Strafenkatalog (Verwaltung) ---------- */

.mod-form { display: grid; gap: 12px; margin-bottom: 20px; }
.mod-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.sk-adm-meta { margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sk-adm-meta summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.sk-adm-meta form { margin-top: 14px; }

/* ---------- Fraktionskonzepte: Bewerbungsphasen ---------- */

.fk-phase-form { margin-top: 14px; }
.fk-phase-list { display: grid; gap: 18px; margin-bottom: 20px; }
.fk-phase-row { display: grid; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.fk-phase-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fk-phase-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.fk-phase-form .mod-form-actions { padding-top: 16px; border-top: 1px solid var(--line); }

.app-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.app-subtab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.app-subtab:hover { border-color: var(--line-strong); color: var(--text); }
.app-subtab.is-active { border-color: var(--accent); background: rgba(24, 223, 207, 0.14); color: var(--text); }

.sk-adm-add-cat { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 22px; }
.sk-adm-add-cat .fld { flex: 1 1 200px; }
.sk-adm-add-cat select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(1, 16, 21, 0.7); color: var(--text); }

.sk-adm-cats { display: grid; gap: 28px; }
.sk-adm-cat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sk-adm-cat-head h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-style: normal; }
.sk-adm-cat-icon svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sk-adm-cat-actions { display: flex; align-items: center; gap: 6px; }

.sk-adm-entries { display: grid; gap: 10px; }
.sk-adm-entry { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sk-adm-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sk-adm-refs { font-family: monospace; font-size: 0.82rem; color: var(--accent); }
.sk-adm-tier { padding: 2px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 50%, var(--line)); background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); color: var(--c, var(--accent)); font-size: 0.74rem; font-weight: 700; }
.sk-adm-tier.is-custom { color: var(--muted); border-color: var(--line); background: transparent; }
.sk-adm-entry-actions { margin-left: auto; display: flex; gap: 4px; }
.sk-adm-entry strong { display: block; font-size: 0.96rem; margin-bottom: 3px; }
.sk-adm-entry p { color: var(--muted); font-size: 0.88rem; margin: 0 0 8px; }
.sk-adm-steps { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.sk-adm-steps span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.sk-adm-instant { display: inline-block; padding: 3px 10px; border: 1px solid rgba(194, 59, 59, 0.4); border-radius: 999px; background: rgba(194, 59, 59, 0.12); color: #ff8f8f; font-size: 0.82rem; font-weight: 700; }
.sk-adm-note { margin-top: 6px !important; font-style: italic; }

.sk-adm-custom-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sk-adm-custom-steps[hidden] { display: none; }
