/* AZ V2.1 — Arbeitszentrale (AZ-2). Drei Spalten: Bereiche · Karten · Detail.
   Detail einklappbar; unter 1100px als Overlay (nie ersatzlos weg). Sichtbare
   Fokuszustände für Tastatur-Triage. Nutzt die Design-Tokens des Portals. */

.az { display: grid; grid-template-columns: 210px minmax(360px, 1fr) 380px; gap: 12px;
      min-height: 60vh; outline: none; }
.az:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }

/* ── Spalte 1: Bereiche ── */
.az-nav { display: flex; flex-direction: column; gap: 4px; }
.az-titelzeile { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.az-ident { font-size: 11px; opacity: .7; margin-bottom: 8px; }
.az-nav-btn { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px;
  background: var(--bg, #fff); cursor: pointer; font-size: 13px; text-align: left; }
.az-nav-btn:hover { border-color: var(--accent, #2563eb); }
.az-nav-btn:focus-visible { outline: 2px solid var(--accent, #2563eb); }
.az-nav-btn.aktiv { background: var(--accent, #2563eb); color: #fff; border-color: var(--accent, #2563eb); }
.az-badge { background: #ef4444; color: #fff; border-radius: 10px; padding: 0 7px;
  font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; }
.az-nav-btn.aktiv .az-badge { background: rgba(255,255,255,.25); }
.az-suche { margin-top: 10px; }
.az-suche input { width: 100%; padding: 7px 9px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px; font-size: 12px; }
.az-neu { margin-top: 8px; padding: 8px; border-radius: 8px; border: 1px dashed var(--accent, #2563eb);
  background: transparent; color: var(--accent, #2563eb); cursor: pointer; font-weight: 700; }
.az-fussnote { margin-top: auto; font-size: 10px; opacity: .55; line-height: 1.5; padding-top: 14px; }

/* ── Spalte 2: Karten ── */
.az-liste { display: flex; flex-direction: column; min-width: 0; }
.az-liste-kopf { display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 700; font-size: 13px; padding: 2px 2px 8px; }
.az-kbd-hilfe { font-size: 10px; font-weight: 400; opacity: .55; }
.az-karten { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 74vh; }
.az-karte { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--bg, #fff);
  cursor: pointer; }
.az-karte:hover { border-color: var(--accent, #2563eb); }
.az-karte.fokus { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 2px rgba(37,99,235,.25); }
.az-karte.gewaehlt { background: #eff6ff; }
.az-check input { width: 15px; height: 15px; }
.az-karte-mitte { flex: 1; min-width: 0; }
.az-karte-titel { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.az-karte-sub { font-size: 11px; opacity: .65; margin-top: 2px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.az-karte-tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.az-karte-rechts { font-size: 11px; }
.az-verantwortlich { background: #f3f4f6; border-radius: 6px; padding: 2px 7px; font-weight: 700; }
.az-verantwortlich.leer { opacity: .4; font-weight: 400; }

.az-ampel { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.az-ampel.rot { background: #ef4444; }
.az-ampel.gelb { background: #f59e0b; }
.az-ampel.gruen { background: #d1d5db; }

.az-tag { font-size: 10px; background: #f3f4f6; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.az-tag.prio-kritisch { background: #ef4444; color: #fff; font-weight: 700; }
.az-tag.prio-hoch { background: #f59e0b; color: #fff; font-weight: 700; }
.az-tag.mut { opacity: .6; }
.az-tag.spiegel { border: 1px dashed #9ca3af; background: transparent; }

.az-batchbar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; margin-bottom: 6px;
  background: #eff6ff; border: 1px solid var(--accent, #2563eb); border-radius: 8px; font-size: 12px; }
.az-batchbar button { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border, #d1d5db);
  background: #fff; cursor: pointer; font-size: 11px; }
.az-batchbar button:focus-visible { outline: 2px solid var(--accent, #2563eb); }

/* ── Spalte 3: Detail ── */
.az-detail { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 12px;
  background: var(--bg, #fff); overflow-y: auto; max-height: 78vh; position: relative; }
.az-detail.zu { display: none; }
.az-detail-toggle { position: absolute; top: 8px; right: 8px; border: none; background: transparent;
  cursor: pointer; font-size: 14px; opacity: .5; }
.az-detail-titel { font-weight: 800; font-size: 15px; cursor: text; padding-right: 24px; }
.az-detail-titel:hover { text-decoration: underline dotted; }
.az-detail-meta { font-size: 11px; opacity: .65; margin-top: 3px; }
.az-detail-keys { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.az-abschnitt { margin-top: 14px; }
.az-abschnitt-titel { font-weight: 700; font-size: 12px; margin-bottom: 6px; }
.az-hinweis { font-weight: 400; font-size: 10px; opacity: .6; }
.az-aufgabe { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.az-aufgabe.erledigt { opacity: .55; }
.az-aufgabe-kopf { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; font-size: 12px; }
/* Kernaktionen optisch klar von Fachaktionen (Absprüngen) getrennt */
.az-kernaktionen { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.az-kernaktionen button { padding: 3px 8px; font-size: 11px; border-radius: 6px;
  border: 1px solid var(--border, #d1d5db); background: #fff; cursor: pointer; }
.az-kernaktionen button:hover { border-color: var(--accent, #2563eb); }
.az-kernaktionen button:focus-visible { outline: 2px solid var(--accent, #2563eb); }
.az-fachsprung { border: 1px solid #7c3aed !important; color: #7c3aed; background: #fff;
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.az-fachsprung.klein { padding: 2px 7px; font-size: 10px; margin-left: auto; }
.az-linkzeile { display: flex; align-items: center; gap: 6px; padding: 4px 2px; font-size: 12px; }
.az-link-id { opacity: .6; font-size: 11px; }
.az-splitzeile { margin-top: 6px; }
.az-mini { padding: 4px 8px; font-size: 11px; border-radius: 6px; border: 1px dashed var(--border, #9ca3af);
  background: transparent; cursor: pointer; margin-top: 4px; }
.az-timeline { display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.az-ev { display: flex; gap: 8px; }
.az-ev-zeit { opacity: .55; flex: none; width: 72px; }
.az-ev-typ { font-weight: 600; }
.az-ev-actor { opacity: .5; margin-left: auto; }
.az-leer { opacity: .55; padding: 24px; text-align: center; font-size: 13px; }
.az-leer.klein { padding: 6px; text-align: left; font-size: 11px; }
.az-planen-hinweis { padding: 18px; font-size: 13px; line-height: 1.6; opacity: .85; }

/* ── Responsive: unter 1100px Detail als Overlay (nie ersatzlos weg, S-Regel 4.1) ── */
@media (max-width: 1100px) {
  .az { grid-template-columns: 180px 1fr; }
  .az-detail { position: fixed; right: 0; top: 60px; bottom: 0; width: min(420px, 92vw);
    z-index: 60; box-shadow: -8px 0 24px rgba(0,0,0,.18); border-radius: 10px 0 0 10px; max-height: none; }
}
@media (max-width: 720px) {
  .az { grid-template-columns: 1fr; }
  .az-nav { flex-direction: row; flex-wrap: wrap; }
  .az-fussnote { display: none; }
  .az-detail { width: 100vw; top: 52px; border-radius: 0; }
}

/* R1.2 P1-5: "Weitere laden" unter der Kartenliste */
.az-mehr { display: block; width: 100%; margin-top: 8px; padding: 8px; border-radius: 8px;
  border: 1px dashed var(--border, #d1d5db); background: transparent; cursor: pointer;
  color: var(--muted, #6b7280); font-size: 13px; }
.az-mehr:hover { background: var(--hover, #f3f4f6); }
