* {
  box-sizing: border-box;
}
:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #243548;
  background: #f3f5f7;
  font-size: 14px;
  line-height: 1.55;
  --navy: #172e43;
  --ink: #243548;
  --muted: #687889;
  --line: #dce3e9;
  --gold: #b99c62;
  --green: #26715b;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b99c62;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
.btn {
  border: 1px solid #ccd7e1;
  background: #fff;
  color: var(--ink);
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.btn:hover {
  background: #eef2f5;
}
.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.primary:hover {
  background: #264963;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.danger {
  color: #a03c35;
}
.small {
  padding: 6px 10px;
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  font-weight: 650;
  line-height: 1.25;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
}
.sub {
  color: var(--muted);
  margin-top: 7px;
}
.loading {
  padding: 50px;
  text-align: center;
}
.sidebar {
  background: var(--navy);
  color: #d4dee7;
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: white;
  margin-bottom: 42px;
}
.brand img {
  width: 51px;
  height: 51px;
}
.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.brand small {
  color: #adbdcb;
  font-size: 11px;
}
.sidebar .eyebrow {
  color: #8ea5b8;
  margin: 0 12px 12px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav a {
  padding: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.nav a:hover {
  background: #203e56;
}
.nav a.active {
  background: #2b465c;
  color: white;
  box-shadow: inset 3px 0 var(--gold);
}
.ico {
  width: 19px;
  height: 19px;
  display: inline-block;
  flex: none;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-bottom p {
  padding: 15px 12px;
  color: #91a7ba;
  font-size: 11px;
}
.main {
  margin-left: 238px;
}
.topbar {
  height: 78px;
  padding: 0 38px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar .context {
  font-size: 12px;
  color: var(--muted);
}
.account {
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: #edf1f4;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.account small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.workspace {
  padding: 34px 38px 50px;
  max-width: 1600px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px;
}
.page-head .eyebrow {
  margin-bottom: 7px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  padding: 19px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  font-size: 30px;
  display: block;
  line-height: 1.5;
  font-weight: 600;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 22px;
}
.panel-body p + p {
  margin-top: 10px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  background: #fafbfc;
  padding: 12px 20px;
  white-space: nowrap;
}
td {
  padding: 16px 20px;
  border-top: 1px solid #e9edf1;
  font-size: 13px;
  vertical-align: middle;
}
td strong {
  font-weight: 600;
  display: block;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.row-link:hover {
  color: #356483;
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: #edf2f7;
  color: #42607b;
  white-space: nowrap;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.done {
  background: #edf5f0;
  color: #34715a;
}
.badge.warn {
  background: #fbf1de;
  color: #936a26;
}
.badge.closed {
  background: #f2edef;
  color: #805766;
}
.deadline {
  padding: 15px 22px;
  border-top: 1px solid #edf0f3;
  display: flex;
  gap: 12px;
}
.deadline:first-child {
  border: 0;
}
.date-tile {
  width: 43px;
  min-width: 43px;
  background: #f2f5f7;
  text-align: center;
  border-radius: 5px;
  padding: 5px;
  font-size: 10px;
  color: var(--muted);
}
.date-tile b {
  display: block;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.3;
}
.deadline strong {
  font-size: 12px;
  font-weight: 600;
}
.deadline small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.quick {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f3;
}
.quick:last-child {
  border: 0;
}
.quick small {
  display: block;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 7px;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.filters input {
  flex: 1;
  min-width: 180px;
}
.filters select {
  max-width: 225px;
}
.pagination {
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
label {
  font-size: 12px;
  font-weight: 600;
}
.field small {
  font-size: 11px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #cfd9e2;
  background: white;
  color: var(--ink);
  border-radius: 5px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #63859e;
  outline-offset: 1px;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.form-section + .form-section {
  margin-top: 28px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.form-section h2 {
  margin-bottom: 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.help {
  background: #f3f6f8;
  color: #526779;
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 20px;
}
.error {
  background: #fcf0ed;
  color: #963c31;
  padding: 12px 15px;
  border-radius: 5px;
  margin-top: 14px;
}
.error:empty {
  display: none;
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  overflow: auto;
}
.tabs button {
  border: 0;
  background: transparent;
  white-space: nowrap;
  border-radius: 0;
  padding: 13px 17px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--navy);
  box-shadow: inset 0 -3px var(--gold);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0 0;
}
.key-value {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.key-value dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.key-value dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.key-value .full {
  grid-column: 1/-1;
}
.text-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.entry {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.entry:last-child {
  border: 0;
}
.entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 12px;
}
.entry-meta small {
  color: var(--muted);
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  border-left: 2px solid #dce4eb;
  padding: 0 0 22px 20px;
  margin-left: 8px;
}
.timeline small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice {
  display: block;
  text-align: left;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.choice small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.choice:hover {
  background: #f4f7f9;
  border-color: #a8bbc9;
}
.charge-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-top: 10px;
}
.charge-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
  font-weight: 400;
}
.charge-list input {
  flex: none;
  margin-top: 3px;
}
.charge-summary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.doc-output {
  min-height: 370px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-brand {
  background: var(--navy);
  color: white;
  padding: 10vh 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-right: 4px solid var(--gold);
}
.auth-brand img {
  width: 95px;
  margin-bottom: 35px;
}
.auth-brand h1 {
  font-size: 43px;
  line-height: 1.17;
  max-width: 440px;
  letter-spacing: -1.2px;
}
.auth-brand p {
  color: #adbdcb;
  max-width: 360px;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.8;
}
.auth-brand .eyebrow {
  color: #cbb780;
  margin-bottom: 17px;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-card {
  width: 100%;
  max-width: 390px;
}
.auth-card h1 {
  font-size: 27px;
}
.auth-card form {
  display: grid;
  gap: 17px;
  margin-top: 30px;
}
.auth-card .footer-note {
  margin-top: 25px;
  font-size: 11px;
  color: var(--muted);
}
.auth-card .btn {
  margin-top: 8px;
}
.menu-toggle {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  width: min(630px, calc(100% - 28px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 20px 70px #0c233333;
}
dialog::backdrop {
  background: #11263880;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  padding: 24px;
}
.modal-body form {
  display: grid;
  gap: 17px;
}
.modal-body .form-actions {
  margin-top: 0;
}
#notice {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  background: var(--navy);
  color: white;
  border-radius: 7px;
  padding: 13px 20px;
  box-shadow: 0 4px 20px #172e4320;
  max-width: calc(100% - 40px);
}
#notice:empty {
  display: none;
}
.inline-link {
  color: #416b8a;
  text-decoration: underline;
}
.print-only {
  display: none;
}
@media (min-width: 1600px) {
  .workspace {
    padding-top: 45px;
  }
  .stats {
    gap: 22px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
    padding: 25px 14px;
  }
  .main {
    margin-left: 205px;
  }
  .workspace {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .side-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .stat {
    padding: 17px;
  }
  .hide-medium {
    display: none;
  }
}
@media (max-width: 740px) {
  .sidebar {
    transform: translateX(-100%);
    width: 238px;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 15px 0 50px #0004;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    padding: 0 16px;
    height: 65px;
  }
  .menu-toggle {
    display: inline-flex;
    padding: 6px;
  }
  .topbar .context {
    display: none;
  }
  .workspace {
    padding: 25px 16px;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 25px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 26px;
  }
  .side-panels {
    display: block;
  }
  .form-grid,
  .key-value,
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    padding: 14px;
  }
  .filters select {
    max-width: none;
  }
  .panel-head,
  .panel-body {
    padding: 18px;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 30px;
    border-right: 0;
    border-bottom: 3px solid var(--gold);
  }
  .auth-brand img {
    width: 50px;
    margin-bottom: 15px;
  }
  .auth-brand h1 {
    font-size: 28px;
  }
  .auth-brand p {
    display: none;
  }
  .auth-form-wrap {
    padding: 32px 24px;
  }
  .auth-brand .eyebrow {
    margin-bottom: 9px;
  }
  td,
  th {
    padding: 12px;
  }
  .account small {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hide-mobile {
    display: none;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .entry-meta {
    flex-direction: column;
    gap: 2px;
  }
  .modal-body {
    padding: 18px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .page-head .actions,
  .tabs,
  button,
  .side-panels,
  #notice {
    display: none !important;
  }
  .main {
    margin: 0;
  }
  .workspace {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  .print-only {
    display: block;
  }
  .columns {
    display: block;
  }
  body {
    background: #fff;
  }
  .panel-body {
    padding: 0;
  }
  .entry {
    break-inside: avoid;
  }
  .text-body {
    font-size: 12px;
  }
}

.columns > *,
.side-panels > *,
.panel,
.table-wrap {
  min-width: 0;
}
@media (max-width: 740px) {
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .badge {
    white-space: normal;
  }
  .sidebar {
    transition: none;
  }
  .table-wrap table {
    min-width: 440px;
  }
}

.source-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.6}.import-preview-list{max-height:340px;overflow:auto}.import-preview-list p{padding:10px 0;border-bottom:1px solid #ddd}

#import-preview{margin-top:24px}#import-preview>p,#import-preview>details{margin:16px 0}#import-progress{margin-top:16px}#trello-file{margin:8px 0 12px}

/* Fachbereiche: dauerhaft lesbare Gruppen, unabhängig scrollbare Navigation. */
.sidebar{padding:20px 12px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#aa914e #172e43}
.sidebar .brand{margin:0 8px 22px;flex-shrink:0}
.nav-group{border:1px solid #ffffff20;border-radius:8px;padding:8px;margin-bottom:6px;background:#ffffff04}
.nav-group h2{font:700 10px/1.4 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.06em;margin:0 4px 7px;color:#e0c477}
.nav-group a{padding:10px 7px;gap:8px;font-size:11px;line-height:1.4;border:1px solid #ffffff13;margin-top:5px;background:#ffffff05;overflow-wrap:anywhere}
.nav-group .ico{width:15px;height:15px}
.group-register h2{color:#c2d38d}.group-judges h2{color:#f39c9c}.group-prosecution h2{color:#91c8ff}.group-management h2{color:#f1bd83}.group-archive h2{color:#b6c0cb}
.sidebar-bottom{padding-top:12px}.sidebar-bottom p{padding-bottom:0}
.tabs a{margin-right:8px;margin-bottom:8px}.panel-body h2:not(:first-child){margin-top:26px}.panel-body>p{line-height:1.65}
.case-switch{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 24px;padding:14px;background:#e7edf2;border:1px solid #cbd6df;border-radius:8px}
.case-switch button{min-width:190px;min-height:46px;font-size:15px;font-weight:600}
.nav-group a{font-size:12px;min-height:42px}.nav-group h2{font-size:11px}
@media(min-width:741px){.sidebar{width:280px}.main{margin-left:280px}}
@media(max-width:740px){.sidebar{width:280px}.case-switch button{flex:1;min-width:140px}}

.auth-card .help{margin-top:18px;margin-bottom:12px}.auth-card .help p{margin-top:7px}#secret-output{margin:16px 0}
