:root { --rot: #b5121b; --rot-d: #8f0e15; --text: #1f2124; --grau: #62666d; --linie: #dcdcdc; --hell: #f5f5f3; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--hell); }
a { color: var(--rot); }
h1 { font-size: 1.6rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--grau); } .small { font-size: .88rem; }
code { background: #eee; padding: 1px 4px; border-radius: 3px; }

.a-head { background: #202225; color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 8px 20px; position: sticky; top: 0; z-index: 5; }
.a-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.a-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.a-nav a { color: #ddd; text-decoration: none; padding: 10px 12px; border-radius: 4px; }
.a-nav a:hover { background: #ffffff14; color: #fff; }
.a-nav a[aria-current] { background: var(--rot); color: #fff; }
.badge { background: #fff; color: var(--rot); border-radius: 10px; padding: 0 7px; font-size: .78rem; }
.a-user { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.a-user a, .linkbtn { color: #ccc; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; }
.a-user form { margin: 0; }
.a-main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.a-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.btn { display: inline-block; padding: 10px 16px; min-height: 44px; border: 1px solid #c4c4c4; background: #fff; color: var(--text); border-radius: 4px; font: 600 .95rem inherit; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #888; }
.btn-red { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn-red:hover { background: var(--rot-d); }
.btn-big { font-size: 1.05rem; padding: 12px 22px; }
.btn-wide { width: 100%; margin-top: 14px; }
.btn-danger { color: var(--rot); border-color: #e2b4b7; }
.btn-danger:hover { background: #fde8e9; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 44px; height: 44px; border: 1px solid var(--linie); background: #fff; border-radius: 4px; font-size: 1.1rem; cursor: pointer; }
.iconbtn[disabled] { opacity: .3; }

.flash { padding: 12px 16px; border-radius: 4px; margin: 0 0 16px; border-left: 4px solid; background: #fff; }
.flash-ok { border-color: #1d7a3c; } .flash-error { border-color: var(--rot); background: #fdeced; }
.flash-warn { border-color: #d39b00; background: #fff8e1; } .flash-info { border-color: #1a5fd0; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.pw { font-size: 1.1rem; user-select: all; }

.panel { background: #fff; border: 1px solid var(--linie); border-radius: 6px; padding: 20px; margin: 0 0 18px; }
.panel.narrow { max-width: 520px; }
fieldset.panel { min-width: 0; }
legend { font-weight: 700; padding: 0 4px; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 12px 0 5px; }
label:first-child { margin-top: 0; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #bdbdbd; border-radius: 4px; background: #fff; min-height: 46px;
}
input.big { font-size: 1.2rem; font-weight: 600; }
textarea { line-height: 1.55; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #1a5fd0; outline: 2px solid #1a5fd022; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.radio { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; cursor: pointer; }
.radio input, .del input { width: 18px; height: 18px; accent-color: var(--rot); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .editor-side { order: -1; } }
.sticky { position: sticky; top: 76px; }
.status { border: 0; padding: 0; margin: 14px 0 0; }
.status legend { font-size: .92rem; padding: 0; margin-bottom: 4px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat input { position: absolute; opacity: 0; }
.cat span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid #c4c4c4; border-radius: 4px; cursor: pointer; font-weight: 600; background: #fff; }
.cat input:checked + span { background: var(--rot); border-color: var(--rot); color: #fff; }
.cat input:focus-visible + span { outline: 3px solid #1a5fd0; outline-offset: 2px; }
.cat { margin: 0; }
.einsatz-fields[hidden] { display: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid #bdbdbd; border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--hell); }
.toolbar button { min-height: 36px; min-width: 40px; padding: 4px 10px; border: 1px solid transparent; background: transparent; border-radius: 3px; cursor: pointer; font: inherit; font-size: .9rem; }
.toolbar button:hover { background: #fff; border-color: var(--linie); }
.toolbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 10px 0; }
.img-item { border: 1px solid var(--linie); border-radius: 4px; padding: 8px; background: #fafafa; }
.img-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; }
.img-item input:not([type=radio]):not([type=checkbox]) { min-height: 38px; padding: 6px 8px; font-size: .88rem; }
.img-item .radio, .img-item .del { font-size: .88rem; margin: 6px 0; display: flex; gap: 6px; align-items: center; font-weight: 500; }
.img-item .del { color: var(--rot); }
.drop { position: relative; display: block; border: 2px dashed #bbb; border-radius: 6px; padding: 22px; text-align: center; background: #fafafa; cursor: pointer; margin: 10px 0; font-weight: 400; }
.drop:hover, .drop.over { border-color: var(--rot); background: #fff5f5; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop strong { display: block; font-size: 1.05rem; color: var(--rot); }
.drop span { font-size: .88rem; color: var(--grau); }
details summary { cursor: pointer; color: var(--grau); font-size: .9rem; padding: 6px 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 7px 12px; border-radius: 4px; background: #fff; border: 1px solid var(--linie); text-decoration: none; color: var(--text); font-size: .9rem; }
.tabs a[aria-current] { background: #202225; color: #fff; border-color: #202225; }
.list { list-style: none; margin: 0 0 20px; padding: 0; background: #fff; border: 1px solid var(--linie); border-radius: 6px; }
.list li { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--linie); padding: 8px 14px; }
.list li:last-child { border: 0; }
.list-main { flex: 1; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); min-width: 0; min-height: 52px; }
.list-main strong { display: block; }
.list-main small { color: var(--grau); }
a.list-main:hover strong { color: var(--rot); }
.list-img { width: 72px; height: 54px; flex: none; background: var(--hell); border-radius: 3px; overflow: hidden; }
.list-img img { width: 100%; height: 100%; object-fit: cover; }
.list-side { display: flex; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.draft { color: #a66b00; font-style: normal; font-weight: 600; }
.danger { margin-top: 30px; border-top: 1px solid var(--linie); padding-top: 18px; }

.msg header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.msg.read { opacity: .65; }
.tag { background: var(--hell); border: 1px solid var(--linie); padding: 1px 8px; border-radius: 10px; font-size: .8rem; }
.msg small { color: var(--grau); margin-left: auto; }
.msg-text { background: var(--hell); padding: 10px 12px; border-radius: 4px; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.log { padding-left: 18px; } .log .fehler { color: var(--rot); }

body.bare { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
body.bare .a-main { padding: 0; width: 100%; max-width: 420px; }
.auth { background: #fff; border-top: 5px solid var(--rot); border-radius: 6px; padding: 30px; box-shadow: 0 10px 30px #0001; text-align: left; }
.auth img { margin: 0 auto 10px; display: block; }
.auth h1 { text-align: center; margin-bottom: 18px; }
