:root {
  --ink: #12161c;
  --panel: #1a2029;
  --panel-alt: #212936;
  --line: #2e3948;
  --gold: #c9a227;
  --gold-bright: #e0b93a;
  --paper: #efe9d8;
  --paper-line: #d8cfb2;
  --text: #e7e9ec;
  --text-dim: #8d96a3;
  --danger: #b5462f;
  --danger-bright: #d0573b;

  --font-display: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--ink);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(201, 162, 39, 0.03), transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(201, 162, 39, 0.03), transparent 50%);
  color: var(--text);
  font-family: var(--font-display);
  min-height: 100vh;
}

/* ===================== TOPBAR ===================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(26, 32, 41, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge-mark {
  width: 38px;
  height: 38px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 18px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.12), transparent 70%);
  object-fit: cover;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.topbar-title-main {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 17px;
  color: var(--text);
}

.topbar-title-sub {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===================== BUTTONS ===================== */
.btn-primary,
.btn-ghost,
.btn-danger {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(201, 162, 39, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-danger {
  background: rgba(33, 41, 54, 0.5);
  color: var(--text-dim);
  border-color: var(--line);
}

.btn-danger:hover {
  background: rgba(181, 70, 47, 0.1);
  border-color: var(--danger);
  color: var(--danger-bright);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.user-badge:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--gold);
}

/* ===================== DROPDOWN ===================== */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chevron {
  font-size: 11px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  list-style: none;
  margin: 0;
  padding: 6px;
  width: 220px;
  display: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu li {
  padding: 10px 14px;
  font-size: 13px;
  letter-spacing: 0.4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
}

.dropdown-menu li:hover {
  background: var(--panel-alt);
  color: var(--gold-bright);
}

.dropdown-menu li.active {
  color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.05);
}

/* ===================== CUSTOM DROPDOWNS ===================== */
.custom-autocomplete, .custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select-trigger:hover {
  border-color: rgba(201, 162, 39, 0.4);
}

.custom-select-trigger.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.custom-dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: var(--line);
  border-radius: 4px;
}

.custom-dropdown-menu li {
  padding: 10px 14px;
  font-size: 13px;
  letter-spacing: 0.4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
}

.custom-dropdown-menu li:hover {
  background: var(--panel-alt);
  color: var(--gold-bright);
}

.custom-dropdown-menu li.active {
  color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.05);
}

/* ===================== LAYOUT ===================== */
.app-main {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.creator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .creator-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(46, 57, 72, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

.form-panel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.02) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.panel-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(33, 41, 54, 0.3);
}

.panel-header-label {
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
}

.placeholder-notice {
  margin: 20px 24px 0;
  padding: 14px 18px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px dashed rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* ===================== FORM ===================== */
.akten-form {
  padding: 24px;
}

.field-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 220px;
}

.field-small {
  flex: 0 1 160px;
}

label {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.optional-tag {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 2px 6px;
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 8px;
}

input[type="text"],
input[type="date"],
select,
textarea {
  background: rgba(33, 41, 54, 0.5);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d96a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

select option {
  background: var(--panel-alt);
  color: var(--text);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  background: var(--panel-alt);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 100px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0;
  font-family: var(--font-display);
}

/* ===================== GEGENSTÄNDE-AUSWAHL ===================== */
.gegenstaende-auswahl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.gegenstand-kategorie {
  background: rgba(33, 41, 54, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.gegenstand-kategorie-titel {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}

.gegenstand-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px;
}

.gegenstand-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 26px;
}

.gegenstand-item:hover {
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.06);
}

.gegenstand-item.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
}

.gegenstand-check {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.gegenstand-item.selected .gegenstand-check {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.gegenstand-item.selected .gegenstand-check::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 0px;
  width: 3px;
  height: 6px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.gegenstand-name {
  font-size: 11.5px;
  color: var(--text);
  flex: 1;
  line-height: 1.2;
}

.gegenstand-item.selected .gegenstand-name {
  color: var(--gold-bright);
  font-weight: 600;
}

.gegenstand-qty {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.qty-btn {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.qty-btn:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.qty-value {
  min-width: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
}

/* ===================== ADMIN-BEREICH ===================== */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

.admin-section-title {
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 14px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-vorschlag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(33, 41, 54, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.admin-vorschlag-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.admin-vorschlag-plz {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  font-family: var(--font-mono);
}

.admin-vorschlag-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.admin-vorschlag-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-password-input {
  width: 100%;
  margin: 14px 0 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 2px;
}

.admin-password-error {
  color: #e0665c;
  font-size: 12.5px;
  margin: 0 0 6px;
}

.section-divider {
  margin: 32px 0 20px;
  padding-top: 0;
  border-top: none;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

/* ===================== PERSON CARDS ===================== */
.person-card {
  background: rgba(33, 41, 54, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.person-card-header {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-person-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-person-btn:hover {
  background: rgba(181, 70, 47, 0.1);
  color: var(--danger-bright);
}

.add-person-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.radio-group {
  display: flex;
  gap: 4px;
  background: rgba(33, 41, 54, 0.5);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  width: fit-content;
}

.radio-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s ease;
  margin: 0;
}

.radio-pill:has(input:checked) {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.25);
}

.radio-pill input {
  display: none;
}

.checkbox-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1400px) {
  .checkbox-row {
    grid-template-columns: 1fr;
  }
}

.checkbox-pill {
  background: rgba(45, 55, 70, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.checkbox-pill:hover {
  background: rgba(52, 63, 80, 0.7);
  border-color: rgba(201, 162, 39, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.checkbox-pill input {
  display: none;
}

.pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pill-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pill-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  transition: all 0.2s ease;
}

.pill-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

#pill-rechtsbeistand:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.05);
}

#pill-rechtsbeistand:has(input:checked) .pill-check {
  color: var(--ink);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

#pill-rechtsbeistand:has(input:checked) .pill-icon {
  background: var(--gold);
  color: var(--ink);
}

#pill-rechtsbeistand:has(input:checked) .pill-title {
  color: var(--gold-bright);
}

#pill-richter:has(input:checked),
#pill-medizin:has(input:checked) {
  border-color: var(--danger);
  background: rgba(181, 70, 47, 0.05);
}

#pill-richter:has(input:checked) .pill-icon,
#pill-medizin:has(input:checked) .pill-icon {
  background: var(--danger);
  color: #fff;
}

#pill-richter:has(input:checked) .pill-title,
#pill-medizin:has(input:checked) .pill-title {
  color: var(--danger-bright);
}

#pill-richter:has(input:checked) .pill-check,
#pill-medizin:has(input:checked) .pill-check {
  color: #fff;
  background: var(--danger-bright);
  border-color: var(--danger-bright);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.validation-errors {
  margin-top: 24px;
  padding: 14px 18px;
  background: rgba(181, 70, 47, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  color: var(--danger-bright);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

/* ===================== REPORT (Signature element: carbon-copy case file) ===================== */
.report-panel {
  position: sticky;
  top: 90px;
}

.report-paper {
  margin: 24px;
  background: var(--paper);
  color: #1c1a12;
  border-radius: 4px;
  padding: 28px 32px;
  min-height: 400px;
  box-shadow:
    inset 0 0 0 1px var(--paper-line),
    0 14px 30px rgba(0, 0, 0, 0.4);
  background-image: repeating-linear-gradient(to bottom,
      transparent, transparent 27px, rgba(0, 0, 0, 0.045) 28px);
}

#report-output {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 28px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.report-header-centered {
  text-align: center;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
}

.copy-confirm {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.5px;
}

/* ===================== HISTORY VIEW ===================== */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.history-header h1 {
  font-size: 24px;
  letter-spacing: 1px;
  margin: 0;
}

.history-header span {
  color: var(--gold-bright);
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 24px;
  background: rgba(33, 41, 54, 0.3);
}

.segmented-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.segmented-btn.active {
  background: var(--gold);
  color: var(--ink);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  color: var(--gold-bright);
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 8px;
}

.verlauf-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .verlauf-layout {
    grid-template-columns: 1fr;
  }
}

.verlauf-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-height: 620px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.verlauf-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s;
}

.verlauf-item:hover {
  background: rgba(33, 41, 54, 0.5);
}

.verlauf-item.active {
  background: rgba(201, 162, 39, 0.1);
  border-left: 4px solid var(--gold);
}

.verlauf-item .vi-typ {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.verlauf-item .vi-name {
  font-family: var(--font-mono);
  font-size: 14px;
  margin-top: 6px;
  color: var(--text);
}

.verlauf-item .vi-date {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.verlauf-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-hint {
  color: var(--text-dim);
  font-size: 14px;
  font-family: var(--font-mono);
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--panel);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text);
}

.modal p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

#rang_select_container .custom-dropdown-menu {
  top: auto;
  bottom: calc(100% + 4px);
}

/* ===================== STRAFRECHNER MODAL ===================== */
.strafrechner-modal {
  max-width: 1400px;
  width: 95%;
  height: 90vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.strafrechner-modal .modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(33, 41, 54, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.strafrechner-modal .modal-header h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}

.strafrechner-iframe-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
}

#strafrechner-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}