/* =============================================================
   Marketingplan – Stylesheet
   Stil angelehnt an marketing.arthurweber.ch/aufgaben/
   Hausfarbe Arthur Weber: #005AA0
============================================================= */

:root {
  --aw-blue: #005AA0;
  --aw-blue-dark: #004478;
  --aw-blue-light: #e6effa;

  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --bg-3: #ececec;
  --bg-page: #fafafa;

  --text: #1f1f1f;
  --text-2: #5a5a5a;
  --text-3: #8a8a8a;

  --border: #e3e3e3;
  --border-2: #cfcfcf;

  --success: #2e7d32;
  --warning: #ed6c02;
  --danger:  #c62828;

  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--aw-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============= TOP-BAR ============= */
.app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.brand-logo:hover { opacity: 0.75; }
.brand-logo img { display: block; height: 28px; }
.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--border-2);
  margin: 0 4px;
}
.brand-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============= BUTTONS ============= */
.btn {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-2); border-color: var(--text-3); text-decoration: none; }
.btn:active { background: var(--bg-3); }
.btn-primary {
  background: var(--aw-blue);
  color: #fff;
  border-color: var(--aw-blue);
}
.btn-primary:hover { background: var(--aw-blue-dark); border-color: var(--aw-blue-dark); color: #fff; }
.btn-icon { padding: 7px 9px; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn-danger-text { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger-text:hover { background: #fdecea; border-color: transparent; color: var(--danger); }

/* ============= VIEW-BAR ============= */
.view-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.view-tabs { display: flex; gap: 0; background: transparent; border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; }
.view-tab {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-2);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.view-tab:last-child { border-right: none; }
.view-tab:hover:not(.active) { background: var(--bg-2); color: var(--text); }
.view-tab.active { background: var(--aw-blue); color: #fff; }
.view-tab svg { width: 14px; height: 14px; }

.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input[type=search] {
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  min-width: 130px;
}
.filter-bar input[type=search] { min-width: 180px; }
.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: var(--aw-blue);
  box-shadow: 0 0 0 2px rgba(0,90,160,0.12);
}
.filter-clear {
  font-size: 12px;
  color: var(--text-2);
  background: none;
  border: none;
  padding: 4px 8px;
}
.filter-clear:hover { color: var(--aw-blue); }

/* ============= MAIN ============= */
.main { padding: 24px; max-width: 1600px; margin: 0 auto; }
.empty { padding: 60px; text-align: center; color: var(--text-3); }

/* ============= KALENDER ============= */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .calendar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .calendar-grid { grid-template-columns: 1fr; } }

.month-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 180px;
  box-shadow: var(--shadow-card);
}
.month-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.month-name { font-weight: 500; font-size: 14px; color: var(--text); }
.month-count { font-size: 11px; color: var(--text-3); }
.month-items { display: flex; flex-direction: column; gap: 4px; }
.month-item {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 3px;
  background: var(--bg-2);
  border-left: 3px solid var(--text-3);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.month-item:hover { background: var(--bg-3); }
.month-item .item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.month-item .item-date { color: var(--text-3); font-size: 11px; white-space: nowrap; }

/* Farben pro Fachbereich (gedeckte Töne, kompatibel zur AW-Linie) */
.fb-HWZ        { border-left-color: #005AA0; }
.fb-PSA        { border-left-color: #aa4d24; }
.fb-Haustechnik{ border-left-color: #157a5c; }
.fb-Facility   { border-left-color: #5b48a8; }
.fb-Maler      { border-left-color: #a23a5e; }
.fb-Stahl      { border-left-color: #525252; }
.fb-alle       { border-left-color: #8a7a3e; }
.fb-Spengler   { border-left-color: #c98423; }

/* ============= LISTE ============= */
.list-section { margin-bottom: 24px; }
.list-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 6px 0;
}
.list-section-title { font-size: 14px; font-weight: 500; color: var(--text); }
.list-section-count {
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 10px;
}
.list-table {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.list-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.7fr 0.6fr 80px;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
}
.list-row:last-child { border-bottom: none; }
.list-row.header {
  background: var(--bg-2);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.list-row.item:hover { background: var(--bg-2); cursor: pointer; }
.list-row .col-firmen { display: flex; gap: 3px; flex-wrap: wrap; }
.firma-chip {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--bg-3);
  border-radius: 2px;
  white-space: nowrap;
  color: var(--text-2);
}
.fb-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--bg-3);
  color: var(--text-2);
  font-weight: 500;
  border-left: 3px solid var(--text-3);
  padding-left: 7px;
}
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions button {
  background: transparent;
  border: none;
  padding: 4px;
  color: var(--text-3);
  border-radius: 3px;
}
.row-actions button:hover { background: var(--bg-3); color: var(--text); }
.row-actions svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .list-row { grid-template-columns: 2fr 1fr 60px; }
  .list-row .col-firmen, .list-row .col-fachbereich, .list-row .col-datum-end { display: none; }
}

/* ============= GANTT mit sticky header + week lines ============= */
.gantt-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.gantt-scroll {
  max-height: calc(100vh - 240px);
  overflow: auto;
}
.gantt-frame {
  min-width: 1000px;
}
/* Header bleibt oben sticky */
.gantt-header-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.gantt-corner {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 6;
}
.gantt-corner-top {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}
.gantt-corner-bottom {
  padding: 3px 10px;
  font-size: 10px;
  color: var(--text-3);
}
.gantt-header-right {
  position: relative;
}
.gantt-months {
  height: 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.gantt-month-cell {
  position: absolute;
  top: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-right: 1px solid var(--border);
}
.gantt-weeks {
  height: 22px;
  position: relative;
}
.gantt-week-cell {
  position: absolute;
  top: 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-3);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.gantt-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  position: relative;
}
.gantt-body-labels {
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 3;
}
.gantt-label {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.gantt-label:hover { background: var(--bg-2); }
.gantt-body-bars {
  position: relative;
  background: var(--bg);
}
.gantt-week-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.gantt-week-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
/* Heute-Linie im Body */
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d62828;
  z-index: 2;
  pointer-events: none;
  transform: translateX(-1px);
}
/* Heute-Marker im Header mit Label */
.gantt-today-line-header {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d62828;
  z-index: 4;
  pointer-events: none;
  transform: translateX(-1px);
}
.gantt-today-label {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: #d62828;
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.gantt-row-bars-only {
  position: relative;
  height: 32px;
  border-bottom: 1px solid var(--border);
}
.gantt-bar {
  position: absolute;
  height: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--aw-blue);
  border-radius: 2px;
  font-size: 10px;
  color: white;
  padding: 0 6px;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
  z-index: 1;
}
.gantt-bar:hover { opacity: 0.85; }

.ds-marker {
  display: inline-block;
  background: var(--aw-blue);
  color: white;
  font-size: 10px;
  font-weight: 600;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ============= DRUCKSACHEN ============= */
.workflow-toolbar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}
.workflow-toolbar-info {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  flex: 1;
  min-width: 240px;
}
.workflow-toolbar-info strong { color: var(--text); }
.workflow-toolbar-info em { font-style: normal; color: var(--aw-blue); }
.workflow-toolbar-actions { display: flex; gap: 10px; align-items: center; }

.hidden-banner {
  background: var(--aw-blue-light);
  border: 1px solid #b3cfe6;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hidden-banner strong { color: var(--aw-blue-dark); font-size: 14px; }
.hidden-banner-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.hidden-hint {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.toggle-switch input { accent-color: var(--aw-blue); }

.btn-link {
  background: none;
  border: none;
  color: var(--aw-blue);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.btn-link:hover { color: var(--aw-blue-dark); }

.workflow-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.workflow-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.workflow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.workflow-card-title { font-weight: 500; font-size: 14px; }
.workflow-card-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.workflow-card-actions { display: flex; gap: 4px; }
.btn-icon-small {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 7px;
  color: var(--text-3);
  cursor: pointer;
}
.btn-icon-small:hover { background: var(--bg-2); color: var(--aw-blue); border-color: var(--border-2); }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.workflow-step {
  background: var(--bg-2);
  border-radius: 3px;
  padding: 8px 10px;
  border-left: 3px solid var(--border-2);
  font-size: 12px;
}
.workflow-step.past { opacity: 0.45; border-left-color: var(--text-3); }
.workflow-step.next { border-left-color: var(--aw-blue); background: var(--aw-blue-light); }
.workflow-step.is-start { border-left-color: var(--aw-blue); background: #fff; border: 1px solid var(--aw-blue); border-left-width: 3px; }
.workflow-step.is-start.next { background: var(--aw-blue-light); }
.workflow-step .step-label { font-size: 11px; color: var(--text-2); margin-bottom: 2px; line-height: 1.3; }
.workflow-step .step-date { font-weight: 500; font-size: 13px; }
.workflow-step .step-date input {
  font: inherit;
  font-size: 13px;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  padding: 2px 4px;
  color: var(--text);
  border-radius: 2px;
}
.workflow-step .step-date input:hover { border-color: var(--border-2); background: var(--bg); }
.workflow-step .step-date input:focus { outline: none; border-color: var(--aw-blue); background: var(--bg); box-shadow: 0 0 0 2px rgba(0,90,160,0.12); }

/* ============= WORKFLOW-OFFSETS-MODAL ============= */
.offset-list { display: flex; flex-direction: column; gap: 6px; }
.offset-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-2);
  border-radius: var(--radius);
}
.offset-row.is-start { background: var(--aw-blue-light); }
.offset-label { font-size: 13px; color: var(--text); }
.offset-input { display: flex; align-items: center; gap: 8px; }
.offset-input input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  text-align: right;
}
.offset-input input:focus {
  outline: none;
  border-color: var(--aw-blue);
  box-shadow: 0 0 0 2px rgba(0,90,160,0.12);
}
.offset-unit { font-size: 12px; color: var(--text-3); min-width: 80px; }

/* ============= MODAL ============= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { margin: 0; font-size: 16px; font-weight: 500; }
.modal-close {
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-2);
  border-radius: 3px;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 18px 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-2);
}
.form-row { margin-bottom: 14px; }
.form-row label.field-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--aw-blue);
  box-shadow: 0 0 0 2px rgba(0,90,160,0.12);
}
.form-row textarea { min-height: 60px; resize: vertical; }
.form-row.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.firmen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.firmen-grid label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--bg-2);
  border-radius: var(--radius);
  cursor: pointer;
  margin: 0;
}
.firmen-grid label:hover { background: var(--bg-3); }
.firmen-grid input { width: auto; }

/* ============= TOAST ============= */
.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: slideIn 0.18s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============= DETAILS ============= */
.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-2); font-size: 12px; }
.detail-val { color: var(--text); word-break: break-word; }
.detail-val .firma-chip { background: var(--bg-2); }

/* ============= GLOSSARY ============= */
.glossary-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.glossary-item:last-child { border-bottom: none; }
.glossary-item .term { font-weight: 500; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.glossary-item .expl { font-size: 13px; color: var(--text-2); margin-bottom: 4px; line-height: 1.5; }
.glossary-item .example { font-size: 12px; color: var(--text-3); font-style: italic; }

/* ============= UTILITIES ============= */
.hidden { display: none !important; }
.loading { text-align: center; padding: 60px; color: var(--text-3); font-size: 13px; }

.year-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 4px 4px 4px 10px;
  font-size: 13px;
}
.year-selector span { color: var(--text-2); }
.year-selector select {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  padding: 4px;
  color: var(--text);
  cursor: pointer;
}
.year-selector select:focus { outline: none; }

/* ============= BURGER-MENU ============= */
.menu-wrap { position: relative; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  min-width: 260px;
  z-index: 200;
  padding: 8px;
}
.menu-section { padding: 6px 0; border-bottom: 1px solid var(--border); }
.menu-section:last-child { border-bottom: none; }
.menu-section-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px 6px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  border-radius: var(--radius);
  cursor: pointer;
}
.menu-item:hover { background: var(--bg-2); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.menu-item:hover svg { color: var(--aw-blue); }
.menu-year {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
}
.menu-year select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  background: var(--bg);
}

/* ============= FORM-EXTRAS ============= */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.checkbox-label input[type=checkbox] { width: auto; accent-color: var(--aw-blue); }
.field-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  margin-left: 24px;
  line-height: 1.4;
}
.drucksache-toggle {
  background: var(--bg-2);
  padding: 10px 12px;
  border-radius: var(--radius);
}

/* ============= STAMMDATEN-LISTE ============= */
.master-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  max-height: 360px;
  overflow-y: auto;
}
.master-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px 6px 10px;
  background: var(--bg-2);
  border-radius: var(--radius);
}
.master-row input {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 6px;
  font: inherit;
  font-size: 13px;
  border-radius: var(--radius);
}
.master-row input:hover { background: var(--bg); border-color: var(--border); }
.master-row input:focus { outline: none; background: var(--bg); border-color: var(--aw-blue); box-shadow: 0 0 0 2px rgba(0,90,160,0.12); }
.master-row-actions { display: flex; gap: 4px; }
.master-row-actions button {
  background: transparent;
  border: none;
  padding: 4px;
  color: var(--text-3);
  border-radius: 3px;
  cursor: pointer;
}
.master-row-actions button:hover { background: var(--bg-3); color: var(--aw-blue); }
.master-row-actions button.delete:hover { color: var(--danger); }
.master-row-actions svg { width: 14px; height: 14px; }
.master-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.master-add input {
  padding: 7px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
}
.master-add input:focus { outline: none; border-color: var(--aw-blue); box-shadow: 0 0 0 2px rgba(0,90,160,0.12); }

/* ============= PROFILE-TABS (Workflow-Settings-Modal) ============= */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.profile-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: -1px;
}
.profile-tab:hover { color: var(--text); }
.profile-tab.active {
  color: var(--aw-blue);
  border-bottom-color: var(--aw-blue);
  font-weight: 500;
}

/* ============= DS-VIEW-TABS (Drucksachen-Ansicht) ============= */
.ds-view-tabs {
  display: inline-flex;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 2px;
}
.ds-view-tab {
  background: transparent;
  border: none;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 3px;
}
.ds-view-tab.active {
  background: var(--bg);
  color: var(--aw-blue);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ============= WORKFLOW-CHOICE (im Thema-Modal) ============= */
.workflow-choice {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.workflow-choice.hidden { display: none; }
.workflow-choice-label {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-right: 16px;
  cursor: pointer;
}
.radio-label input[type=radio] { accent-color: var(--aw-blue); }

/* ============= WORKFLOW-BADGE auf Drucksachen-Karten ============= */
.workflow-card-sep {
  margin: 0 6px;
  color: var(--text-3);
}
.workflow-card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.workflow-card-badge.workflow-lang {
  background: var(--aw-blue-light);
  color: var(--aw-blue);
}
.workflow-card-badge.workflow-kurz {
  background: #fef3e0;
  color: #aa4d24;
}

/* ============= NÄCHSTE TERMINE (Kalender-Stil) ============= */
.next-cal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.next-cal-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.next-cal-row.is-today {
  border-color: var(--aw-blue);
  box-shadow: 0 0 0 1px var(--aw-blue), var(--shadow-card);
}
.next-cal-row.is-week .next-cal-date {
  background: var(--aw-blue-light);
  color: var(--aw-blue);
}
.next-cal-row.is-today .next-cal-date {
  background: var(--aw-blue);
  color: white;
}

/* Datums-Pille links */
.next-cal-date {
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  color: var(--text-2);
}
.next-cal-day {
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}
.next-cal-month {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
  opacity: 0.85;
}
.next-cal-weekday {
  font-size: 10px;
  margin-top: 6px;
  opacity: 0.75;
}

/* Rechte Items */
.next-cal-items {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.next-urgency {
  align-self: flex-start;
  margin: 4px 14px 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.next-urgency.today {
  background: var(--aw-blue);
  color: white;
}
.next-urgency.tomorrow {
  background: #fef3e0;
  color: #aa4d24;
}
.next-urgency.soon {
  background: var(--aw-blue-light);
  color: var(--aw-blue);
}

.next-cal-item {
  position: relative;
  padding: 10px 36px 10px 14px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.next-cal-item:first-child { border-top: none; }
.next-cal-items > .next-urgency + .next-cal-item { border-top: 1px solid var(--border); }
.next-cal-item:hover { background: var(--bg-2); }

.next-cal-item-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.next-cal-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--aw-blue);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  flex: none;
}
.next-cal-step-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--aw-blue);
}
.next-cal-item-aktion {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.next-cal-item-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-3);
}
.next-cal-wf {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.next-cal-wf.workflow-lang {
  background: var(--aw-blue-light);
  color: var(--aw-blue);
}
.next-cal-wf.workflow-kurz {
  background: #fef3e0;
  color: #aa4d24;
}
.next-cal-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 22px;
  font-weight: 300;
}
.next-cal-item:hover .next-cal-arrow { color: var(--aw-blue); }

/* Alte Klassen entfernen, falls noch im Cache */
.next-steps-list, .next-steps-day, .next-steps-date, .next-steps-items,
.next-step-item, .next-step-action, .next-step-name { display: revert; }

/* ============= EXPORT-FILTER-HINWEIS ============= */
.export-filter-info {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 12px;
}
.export-filter-info strong { color: var(--text); }
.export-filter-empty { color: var(--text-3); font-style: italic; }
.export-filter-active {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.export-filter-list {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}
.export-filter-list li { margin: 2px 0; }
