/* =============================================================================
   DIWA 2 Staff-Backend - Jobcenter Krefeld CI
   Farben: schwarz/rot (#e30613), blau (#0e75bc) als Akzent, helles Grau (#f5f5f5)
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body.diwa2-staff,
body.diwa2-login-page {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Sticky-Footer-Pattern: body als Flex-Container, der Layout-Wrapper dehnt sich,
   sodass der Footer immer am Boden klebt. */
body.diwa2-staff {
    display: flex;
    flex-direction: column;
}
body.diwa2-staff > .diwa2-staff-layout,
body.diwa2-staff > .diwa2-staff-layout-with-sidebar {
    flex: 1 0 auto;
}
body.diwa2-staff > .diwa2-footer {
    flex-shrink: 0;
    margin-top: 0;
    /* Footer klebt am unteren Bildrand SOLANGE die Seite nicht voll ist
       (über flex+min-height), aber er deckt NICHTS ab wenn der Inhalt
       länger wird - dann scrollt er ganz normal mit. */
}
body.diwa2-staff > .diwa2-staff-layout,
body.diwa2-staff > .diwa2-staff-layout-with-sidebar { padding-bottom: 16px; padding-top: 16px; }

a { color: #0e75bc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Links in Listen/Tabellen: nicht aggressiv-blau, sondern schwarz */
.diwa2-table a, .diwa2-anliegen-tree a { color: #1a1a1a; }
.diwa2-table a:hover, .diwa2-anliegen-tree a:hover { color: #e30613; text-decoration: none; }
.diwa2-table .cell-actions a { color: #0e75bc; font-size: 13px; }
.diwa2-table .cell-actions a:hover { color: #e30613; }

/* ---------- User-Pill oben rechts ---------- */
.diwa2-userbar {
    display: flex;
    justify-content: flex-end;
    padding: 16px 32px 0;
    background: #f5f5f5;
}
.diwa2-userpill {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 10px 22px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    color: #1a1a1a;
}
.diwa2-userpill strong { font-weight: 600; }
.diwa2-userpill a {
    color: #e30613;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.diwa2-userpill .divider { color: #ccc; }
.diwa2-userpill .icon {
    display: inline-block;
    width: 16px; height: 16px;
    background: #e30613;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    text-align: center;
    line-height: 16px;
    font-weight: 700;
}

/* ---------- Top-Header (Logo + Nav) ---------- */
.diwa2-header {
    background: #fff;
    padding: 18px 32px 14px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.diwa2-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.diwa2-logo-img {
    height: 44px;
    width: auto;
    display: block;
}

.diwa2-mainnav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 36px;
}
.diwa2-mainnav a {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.diwa2-mainnav a:hover { color: #e30613; }
/* Submenu fuer 'Alle Termine' (Aktive/Stornierte) */
.diwa2-mainnav__group { position: relative; }
.diwa2-mainnav__group > a { display:inline-block; padding-bottom: 12px; margin-bottom: -12px; }
/* Unsichtbare Hover-Bridge: ueberbrueckt die Luecke zwischen Toplevel-Link
   und Submenu, damit der Mauszeiger nicht in den 'Niemandsland'-Bereich
   faellt und das Submenu sofort zumacht. */
.diwa2-mainnav__group::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
}
.diwa2-mainnav__submenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px 0;
    z-index: 100;
}
.diwa2-mainnav__group:hover .diwa2-mainnav__submenu,
.diwa2-mainnav__group:focus-within .diwa2-mainnav__submenu { display:block; }
.diwa2-mainnav__submenu a {
    display: block;
    padding: 8px 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
}
.diwa2-mainnav__submenu a:hover, .diwa2-mainnav__submenu a.is-active {
    background:#f3f4f6; color:#e30613;
}
.diwa2-mainnav a.is-active {
    color: #0e75bc;
    border-bottom-color: #0e75bc;
}

/* ---------- Main-Content ---------- */
.diwa2-staff-layout { padding: 40px 32px 60px; width: 100%; }
.diwa2-staff-main { width: 100%; max-width: none; margin: 0; min-width: 0; }
.diwa2-staff-layout-with-sidebar {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 32px 60px;
}

/* Sidebar in Admin-Bereichen */
.diwa2-sidebar { padding-top: 16px; }
.diwa2-sidebar a {
    display: block;
    padding: 8px 0;
    color: #0e75bc;
    text-decoration: none;
    font-size: 14px;
}
.diwa2-sidebar a:hover { color: #e30613; }
.diwa2-sidebar a.is-active { color: #000; font-weight: 700; }

/* ---------- Section-Header (hellgrau uppercase) ---------- */
.diwa2-section-title {
    color: #999;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.diwa2-section-subtitle {
    color: #555;
    font-size: 15px;
    margin: -16px 0 24px;
}
.diwa2-page-title {
    color: #000;
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 12px;
}
.diwa2-page-subtitle {
    color: #000;
    font-size: 22px;
    font-weight: 400;
    margin: 32px 0 16px;
}

/* ---------- Buttons ---------- */
.diwa2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: #e30613;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background 0.15s;
}
.diwa2-btn:hover { background: #b00510; text-decoration: none; color: #fff; }
.diwa2-btn--secondary {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #ddd;
}
.diwa2-btn--secondary:hover { background: #f5f5f5; color: #000; }
.diwa2-btn--ghost,
a.diwa2-btn--ghost {
    background: #fff !important;
    color: #1a1a1a !important;
    border: 1px solid #d1d5db !important;
    padding: 11px 24px;
    text-decoration: none !important;
}
.diwa2-btn--ghost:hover,
a.diwa2-btn--ghost:hover {
    background: #f9fafb !important;
    color: #1a1a1a !important;
    border-color: #9ca3af !important;
}
.diwa2-btn--danger { background: #c82333; color:#fff; }
.diwa2-btn--danger:hover { background: #a01c2a; color:#fff; }
.diwa2-btn--success { background: #16a34a; color:#fff; }
.diwa2-btn--success:hover { background: #128239; color:#fff; }
.diwa2-btn--link {
    background: none;
    border: none;
    padding: 0;
    color: #0e75bc;
    cursor: pointer;
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
}
.diwa2-btn--link:hover { color: #e30613; text-decoration: underline; }
.diwa2-btn .icon-plus::before { content: '\002B'; font-weight: 900; margin-right: 6px; font-size: 16px; line-height: 1; }

/* ---------- Tabellen ---------- */
.diwa2-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}
.diwa2-table thead th {
    padding: 14px 16px;
    text-align: left;
    background: #f5f5f5;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}
.diwa2-table thead th:last-child { border-right: none; }
.diwa2-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    vertical-align: top;
}
.diwa2-table tbody td:last-child { border-right: none; }
.diwa2-table tbody tr:last-child td { border-bottom: none; }
.diwa2-table tbody tr:nth-child(even) { background: #f9fafb; }
.diwa2-table tbody tr:hover { background: #eff6ff; }
.diwa2-table .cell-actions { white-space: nowrap; text-align: right; }
.diwa2-table .cell-actions a, .diwa2-table .cell-actions button {
    color: #0e75bc;
    margin-left: 12px;
}
.diwa2-table-empty {
    padding: 24px 16px;
    color: #888;
    text-align: left;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.diwa2-tableinfo {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}
.diwa2-tablesearch {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #666;
    font-size: 13px;
}
.diwa2-tablesearch input {
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 14px;
}

/* ---------- Cards ---------- */
.diwa2-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}
.diwa2-card {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 24px 28px;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.diwa2-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
}
.diwa2-card p {
    margin: 0;
    color: #555;
    flex: 1;
    font-size: 14px;
}
.diwa2-card a {
    font-weight: 700;
    font-size: 13px;
    color: #e30613;
    text-transform: none;
    letter-spacing: 0;
}
.diwa2-card a:hover { color: #b00510; text-decoration: underline; }

/* ---------- Forms ---------- */
.diwa2-form { max-width: 720px; }
.diwa2-form--wide { max-width: none; width: 100%; }
.diwa2-form--wide .form-actions { margin-top: 24px; }
/* Bei breiten Forms in zwei Spalten aufteilen (deutlich uebersichtlicher). */
.diwa2-form--wide > div:not(.form-actions) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}
.diwa2-form--wide > div:not(.form-actions) > div { margin-bottom: 0; }
.diwa2-form .form-group, .diwa2-form > div { margin-bottom: 20px; }
.diwa2-form label {
    display: block;
    color: #999;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 6px;
}
.diwa2-form label .required { color: #0e75bc; margin-left: 2px; }
.diwa2-form input[type=text],
.diwa2-form input[type=email],
.diwa2-form input[type=tel],
.diwa2-form input[type=date],
.diwa2-form input[type=time],
.diwa2-form input[type=datetime-local],
.diwa2-form input[type=number],
.diwa2-form input[type=password],
.diwa2-form input[type=file],
.diwa2-form select,
.diwa2-form textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #fff;
    font: inherit;
    color: #1a1a1a;
}
.diwa2-form select { padding: 9px 12px; }
.diwa2-form textarea { min-height: 100px; resize: vertical; }
.diwa2-form input:focus, .diwa2-form select:focus, .diwa2-form textarea:focus {
    outline: none;
    border-color: #0e75bc;
    box-shadow: 0 0 0 2px rgba(14,117,188,0.15);
}
.diwa2-form input[type=checkbox] { width: auto; margin-right: 8px; }
.diwa2-form .form-hint { color: #666; font-size: 13px; margin-top: 6px; }
.diwa2-form .form-section-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 32px 0;
}
.diwa2-form .form-section-title {
    color: #000;
    font-size: 22px;
    font-weight: 400;
    margin: 0 0 20px;
}
.diwa2-form .form-actions {
    margin-top: 28px;
    display: flex;
    gap: 16px;
    align-items: center;
}
.diwa2-form ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    color: #c82333;
    font-size: 13px;
}

/* ---------- Flash-Messages ---------- */
.diwa2-flash {
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 3px;
    border-left: 4px solid;
    font-size: 14px;
}
.diwa2-flash--success { background: #d4edda; border-color: #28a745; color: #155724; }
.diwa2-flash--error   { background: #f8d7da; border-color: #c82333; color: #721c24; }
.diwa2-flash--info    { background: #d1ecf1; border-color: #0e75bc; color: #0c5460; }
.diwa2-flash--warning { background: #fff3cd; border-color: #ffc107; color: #856404; }

/* ---------- Anliegen-Filterleiste ---------- */
.diwa2-anliegen-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}
.diwa2-anliegen-filters__group {
    display: flex;
    gap: 4px;
    align-items: center;
}
.diwa2-anliegen-filters__label {
    font-size: 12px;
    color: #6b7280;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.diwa2-filter-chip {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-weight: 500;
}
.diwa2-filter-chip:hover { border-color: #2563eb; color: #2563eb; }
.diwa2-filter-chip.is-active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
}
.diwa2-filter-chip--branch.is-active   { background: #2563eb; border-color: #1d4ed8; }
.diwa2-filter-chip--calendar.is-active { background: #16a34a; border-color: #15803d; }
.diwa2-filter-chip--infopage.is-active { background: #6b7280; border-color: #4b5563; }
.diwa2-filter-chip--form.is-active     { background: #ea580c; border-color: #c2410c; }
.diwa2-anliegen-filters select {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    min-height: 30px;
}
.diwa2-anliegen-filters input[type="search"] {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    min-width: 220px;
    min-height: 30px;
}

/* Verstecke Items je nach Filter */
.diwa2-anliegen-tree li.is-hidden,
.diwa2-anliegen-tree li.is-hidden > div,
.diwa2-anliegen-tree li.is-hidden > ul { display: none !important; }

/* ---------- Anliegen-Tree (Admin) ---------- */
.diwa2-anliegen-tree {
    list-style: none;
    padding: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 16px 24px;
}
.diwa2-anliegen-tree li {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.diwa2-anliegen-tree li:last-child { border-bottom: none; }
.diwa2-anliegen-tree ul {
    list-style: none;
    padding-left: 32px;
    margin: 4px 0 0 6px;
    border-left: 2px solid #e5e7eb;
}
.diwa2-anliegen-tree ul li::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 18px;
    width: 18px;
    height: 0;
    border-top: 2px solid #e5e7eb;
}
.diwa2-anliegen-tree .meta { color: #999; font-size: 13px; margin-left: 8px; }

/* ---------- Filterleiste ---------- */
.diwa2-filter {
    display: flex;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    flex-wrap: wrap;
}
.diwa2-filter > * { flex: 0 0 auto; }
.diwa2-filter label {
    display: block;
    color: #999;
    font-size: 12px;
    margin-bottom: 4px;
}
.diwa2-filter select, .diwa2-filter input {
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font: inherit;
    min-width: 180px;
}
.diwa2-filter .grow { flex: 1; }
.diwa2-filter .filter-actions { margin-left: auto; }

/* Filter-Actions: Filtern-Button + X auf gleiche Hoehe wie inputs (38px) */
.diwa2-filter__actions {
    display: flex;
    gap: 6px;
    align-items: stretch;
}
.diwa2-filter .diwa2-filter__btn {
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.diwa2-filter__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none !important;
    font-size: 14px;
    transition: background .12s;
}
.diwa2-filter__reset:hover { background: #f3f4f6; color: #1a1a1a; border-color: #9ca3af; }

/* ---------- Definition-Liste (Buchungs-Detail) ---------- */
.diwa2-deflist {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px 24px;
    margin: 0 0 24px;
    background: #fff;
    padding: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}
.diwa2-deflist dt {
    color: #999;
    font-weight: 400;
    font-size: 14px;
}
.diwa2-deflist dd { margin: 0; color: #1a1a1a; font-size: 14px; }

/* ---------- Status-Badges ---------- */
.diwa2-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.diwa2-badge--booked    { background: #d1ecf1; color: #0c5460; }
.diwa2-badge--checkedin { background: #d4edda; color: #155724; }
.diwa2-badge--cancelled { background: #f8d7da; color: #721c24; }
.diwa2-badge--noshow    { background: #fff3cd; color: #856404; }
.diwa2-badge--waiting   { background: #d1ecf1; color: #0c5460; }
.diwa2-badge--progress  { background: #fff3cd; color: #856404; }
.diwa2-badge--done      { background: #d4edda; color: #155724; }

/* Icon-Button */
.diwa2-iconbtn {
    background: none;
    border: none;
    color: #0e75bc;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 18px;
    line-height: 1;
}
.diwa2-iconbtn:hover { color: #e30613; }

/* ---------- Updates / Dashboard-Notizen ---------- */
.diwa2-updates { display: flex; flex-direction: column; gap: 16px; }
.diwa2-update {
    padding: 20px 24px;
    background: #fff;
    border-left: 4px solid #e30613;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.diwa2-update h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.diwa2-update .date { color: #999; font-size: 13px; font-weight: 400; }
.diwa2-update p { margin: 8px 0 0; color: #333; }

/* ---------- Dashboard: Stats-Karten ---------- */
.diwa2-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 10px 0 18px;
}
.diwa2-stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #999;
    border-radius: 3px;
    color: #1a1a1a;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 72px;
    box-sizing: border-box;
}
/* Sub-Zeile ist optional — wir reservieren immer Platz dafür damit alle Karten
   die Zahl auf gleicher Y-Position zeigen. */
.diwa2-stat-card__sub { display: block; }
.diwa2-stat-card:not(:has(.diwa2-stat-card__sub))::after {
    content: '';
    display: block;
    height: 16px;
}
.diwa2-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: #1a1a1a;
}
.diwa2-stat-card__num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
}
.diwa2-stat-card__label {
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.diwa2-stat-card__sub {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.diwa2-stat-card--primary { border-left-color: #e30613; }
.diwa2-stat-card--primary .diwa2-stat-card__num { color: #e30613; }
.diwa2-stat-card--success { border-left-color: #2d7a3b; }
.diwa2-stat-card--success .diwa2-stat-card__num { color: #2d7a3b; }
.diwa2-stat-card--danger { border-left-color: #c82333; }
.diwa2-stat-card--danger .diwa2-stat-card__num { color: #c82333; }

/* Dashboard-Grid: Main + Sidebar (Legacy) */
.diwa2-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}
.diwa2-dashboard-grid--3col {
    /* Termine = 3fr (33%), jede der 3 Sidebars = 2fr (je 22%) — zusammen 9fr */
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
    gap: 12px;
}
.diwa2-dashboard-grid {
    align-items: stretch;
}
.diwa2-dashboard-grid--3col > section,
.diwa2-dashboard-grid--3col > aside {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.diwa2-dashboard-grid--3col > aside > ul.diwa2-next-slots,
.diwa2-dashboard-grid--3col > section > .diwa2-table-wrap,
.diwa2-dashboard-grid--3col > section > table.diwa2-table {
    flex: 1 1 auto;
}
.diwa2-dashboard-grid--3col > section,
.diwa2-dashboard-grid--3col > aside {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 12px 14px;
    max-height: 360px;
    overflow-y: auto;
}
.diwa2-dashboard-grid--3col > section > .diwa2-table { border: none; }
.diwa2-dashboard-grid--3col > section > .diwa2-table thead th { background: #f9fafb; }
.diwa2-dashboard-grid--3col > aside .diwa2-section-head { margin-bottom: 8px; gap: 6px; }
.diwa2-dashboard-grid--3col > aside .diwa2-section-head h2 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.diwa2-dashboard-grid--3col > section .diwa2-section-head h2 { font-size: 14px; }
.diwa2-dashboard-grid--3col > aside .diwa2-section-head .diwa2-btn--small { padding: 3px 8px; font-size: 11px; }
.diwa2-dashboard-grid--3col > aside .diwa2-next-slots { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.diwa2-dashboard-grid--3col > aside .diwa2-next-slots li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 6px 8px;
    font-size: 11.5px;
    line-height: 1.35;
}
.diwa2-dashboard-grid--3col > aside .diwa2-next-slots li strong { font-size: 12px; font-weight: 600; }
.diwa2-dashboard-grid--3col > aside .diwa2-next-slots li .text-muted { font-size: 11px; color: #6b7280; }
.diwa2-next-slots--clickable li[data-diwa2-detail-url] { cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.diwa2-next-slots--clickable li[data-diwa2-detail-url]:hover,
.diwa2-next-slots--clickable li[data-diwa2-detail-url]:focus-visible {
    background: #f8fafc;
    border-color: #cbd5e1;
    outline: none;
}
.diwa2-dashboard-grid--3col > section .diwa2-table tbody tr { height: auto; }
.diwa2-dashboard-grid--3col .diwa2-table thead th { padding: 7px 10px; font-size: 12px; }
.diwa2-dashboard-grid--3col .diwa2-table tbody td { padding: 7px 10px; font-size: 12px; }
@media (max-width: 1100px) {
    .diwa2-dashboard-grid--3col {
        grid-template-columns: minmax(0, 1fr) 180px 180px;
        grid-template-rows: auto auto;
    }
    .diwa2-dashboard-grid--3col > section { grid-row: span 2; }
    .diwa2-dashboard-grid--3col > aside:nth-of-type(3) { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
    .diwa2-dashboard-grid { grid-template-columns: 1fr; }
    .diwa2-dashboard-grid--3col {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .diwa2-dashboard-grid--3col > section { grid-row: auto; }
}

/* Dashboard-Grid 2-Col: Termine heute + Warteliste 50/50 */
.diwa2-dashboard-main-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.diwa2-dashboard-main-split__col { min-width: 0; }
.diwa2-dashboard-main-split .diwa2-table th,
.diwa2-dashboard-main-split .diwa2-table td { padding: 8px 8px; font-size: 13px; }
@media (max-width: 900px) {
    .diwa2-dashboard-main-split { grid-template-columns: 1fr; }
}

.diwa2-dashboard-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.diwa2-dashboard-col { min-width: 0; }
@media (max-width: 1400px) {
    .diwa2-dashboard-grid-2col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .diwa2-dashboard-grid-2col { grid-template-columns: 1fr; }
}

.diwa2-table--compact th,
.diwa2-table--compact td { padding: 10px 12px; font-size: 14px; }
.diwa2-table-wrap { overflow-x: auto; }

/* Freie-Slots-Strip als Chips */
.diwa2-slot-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.diwa2-slot-chip {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #16a34a;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}
.diwa2-slot-chip strong { color: #1a1a1a; font-size: 13px; }
.diwa2-slot-chip span { color: #0e75bc; font-weight: 600; }
.diwa2-slot-chip small { color: #888; font-size: 11px; }
@media (max-width: 640px) {
    .diwa2-filter { flex-wrap: wrap; gap: 8px; }
    .diwa2-filter > div { flex: 1 1 calc(50% - 8px); min-width: 140px; }
    .diwa2-filter .filter-actions { flex: 1 0 100%; margin-left: 0; }
    .diwa2-stats { grid-template-columns: 1fr 1fr; }
    .diwa2-page-title { font-size: 22px; }
    .diwa2-table { font-size: 13px; }
    .diwa2-table th, .diwa2-table td { padding: 6px 8px; }
}
.diwa2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.diwa2-section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}
.diwa2-btn--small {
    padding: 6px 14px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}
.diwa2-next-slots {
    list-style: none;
    padding: 0; margin: 0;
}
.diwa2-next-slots li {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 6px;
    font-size: 14px;
}
.diwa2-next-slots .text-muted { color: #888; font-size: 13px; }

/* ---------- Footer: static am Ende, Sticky-Pattern via Body-Flex ---------- */
.diwa2-footer {
    background: #e30613;
    color: #fff;
    padding: 14px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,.05);
    margin-top: 40px;
}
.diwa2-footer a {
    color: #fff;
    text-decoration: none;
    padding: 6px 22px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.25);
    margin-left: 1px;
}
.diwa2-footer a:hover {
    background: rgba(0, 0, 0, 0.45);
    text-decoration: none;
}

/* ---------- Login-Page ---------- */
body.diwa2-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}
.diwa2-login-box {
    background: #fff;
    padding: 40px 48px;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    max-width: 400px;
    width: 100%;
}
.diwa2-login-box h1 { margin: 0 0 24px; font-size: 24px; font-weight: 400; color: #000; }
.diwa2-login-box label { display: block; margin-bottom: 16px; color: #999; font-size: 13px; }
.diwa2-login-box input[type=text], .diwa2-login-box input[type=password] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    margin-top: 6px;
    font-size: 15px;
}
.diwa2-login-box .remember {
    color: #555;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
}
.diwa2-login-box .remember input { margin-top: 0; width: auto; }
.diwa2-login-box button {
    width: 100%;
    padding: 13px;
    background: #e30613;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 12px;
}
.diwa2-login-box button:hover { background: #b00510; }

.diwa2-refresh-hint {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

/* Helper */
.text-muted { color: #999; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; gap: 12px; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.gap-2 { gap: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Header Tools (Suche + Hotkeys + User-Chip) ---------- */
.diwa2-header__tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.diwa2-userchip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    position: relative;
    transition: background-color .15s, border-color .15s;
}
.diwa2-userchip:hover, .diwa2-userchip:focus-visible { background: #fff; border-color: #2563eb; outline: none; }
.diwa2-userchip__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e30613;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.diwa2-userchip__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.diwa2-userchip__name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.diwa2-userchip__team {
    font-size: 11px;
    color: #6b7280;
}
.diwa2-userchip .fa-chevron-down {
    font-size: 10px;
    color: #6b7280;
    margin-right: 4px;
    transition: transform .15s;
}
.diwa2-userchip.is-open .fa-chevron-down { transform: rotate(180deg); }
.diwa2-userchip__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.15);
    overflow: hidden;
    display: none;
    z-index: 100;
}
.diwa2-userchip.is-open .diwa2-userchip__menu { display: block; }
.diwa2-userchip__menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #1f2937;
    font-size: 14px;
    text-decoration: none;
}
.diwa2-userchip__menu a:hover { background: #f3f4f6; color: #e30613; }
.diwa2-userchip__menu a i { width: 16px; color: #6b7280; }

/* ---------- Live-Such-Modal (Lupe in Navbar) ---------- */
.diwa2-dialog--search {
    max-width: 640px;
    width: 92%;
    padding: 0;
    margin: 8vh auto auto;   /* von oben 8vh, horizontal zentriert */
    border: none;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    background: #fff;
    max-height: 80vh;
}
/* HTML5 <dialog>: standardmaessig versteckt, nur via showModal() sichtbar.
   Manche Browser fallback brauchen explizites display:none. */
.diwa2-dialog--search:not([open]) { display: none; }
.diwa2-dialog--search[open] {
    display: flex;
    flex-direction: column;
}
.diwa2-dialog--search::backdrop {
    background: rgba(15,23,42,0.5);
}
.diwa2-search-overlay {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}
.diwa2-search-overlay__icon { color: #6b7280; font-size: 16px; flex-shrink: 0; }
.diwa2-search-overlay input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 4px 0;
    background: transparent;
    color: #1f2937;
    min-width: 0;
}
.diwa2-search-overlay input[type="search"]::placeholder { color: #9ca3af; }

/* Ergebnis-Liste */
.diwa2-search-results {
    overflow-y: auto;
    max-height: calc(80vh - 64px);
    background: #fff;
}
.diwa2-search-empty {
    padding: 18px 22px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}
.diwa2-search-list { list-style: none; margin: 0; padding: 0; }
.diwa2-search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.1s;
}
.diwa2-search-item:hover, .diwa2-search-item:focus {
    background: #f9fafb;
    outline: none;
}
.diwa2-search-item:last-child { border-bottom: none; }
.diwa2-search-item__main { flex: 1; min-width: 0; }
.diwa2-search-item__name {
    font-weight: 600; color: #111827; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.diwa2-search-item__meta {
    font-size: 12px; color: #4b5563; margin-top: 3px;
}
.diwa2-search-item__meta i { color: #9ca3af; margin-right: 2px; }
.diwa2-search-item__sub {
    font-size: 11px; color: #6b7280; margin-top: 4px;
    display: flex; gap: 14px; flex-wrap: wrap;
}
.diwa2-search-item__sub i { color: #9ca3af; margin-right: 2px; }
.diwa2-search-item__chevron { color: #d1d5db; }
.diwa2-search-more {
    padding: 12px 18px; background: #f9fafb; text-align: center;
    border-top: 1px solid #e5e7eb;
}
.diwa2-search-more a {
    color: #0e75bc; text-decoration: none; font-size: 13px; font-weight: 600;
}
.diwa2-search-more a:hover { text-decoration: underline; }

/* ---------- Global Search im Header (alt, deprecated) ---------- */
.diwa2-globalsearch {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 10px;
    min-width: 280px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.diwa2-globalsearch:focus-within {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.diwa2-globalsearch i { color: #6b7280; margin-right: 8px; }
.diwa2-globalsearch input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
    min-height: 32px;
    color: #1f2937;
}
.diwa2-globalsearch__kbd {
    margin-left: 8px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 1px 6px;
    color: #6b7280;
}
.diwa2-iconbtn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    color: #6b7280;
    margin-left: 8px;
    transition: background .15s, color .15s;
}
.diwa2-iconbtn:hover, .diwa2-iconbtn:focus-visible {
    background: #f3f4f6;
    color: #1f2937;
    outline: none;
}

/* ---------- Vergangene Termine ausgrauen ---------- */
.diwa2-table tbody tr.diwa2-row--past td {
    color: #b0b0b0;
    background: #fafafa;
}
.diwa2-table tbody tr.diwa2-row--past td strong {
    font-weight: 500;
    text-decoration: line-through;
    color: #b0b0b0;
}
.diwa2-table tbody tr.diwa2-row--past:hover td {
    color: #777;
    background: #f0f0f0;
}

/* Telefon-Spalte nicht abschneiden */
.diwa2-table td { white-space: normal; word-break: break-word; }
.diwa2-table td:nth-child(2),
.diwa2-table th:nth-child(2) { white-space: nowrap; }

/* Eigenes Team hervorheben in Tree und Map-Legende */
.diwa2-anliegen-node__team.is-own-team {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    font-weight: 600;
}

/* ---------- Clickable table rows ---------- */
.diwa2-table--clickable tbody tr {
    cursor: pointer;
    transition: background-color .12s;
}
.diwa2-table--clickable tbody tr:hover,
.diwa2-table--clickable tbody tr:focus-visible {
    background-color: #eff6ff;
    outline: none;
}
.diwa2-table--clickable tbody tr:focus-visible {
    box-shadow: inset 0 0 0 2px #2563eb;
}
.diwa2-table--clickable .diwa2-badge {
    margin-left: 8px;
    font-size: 10px;
    padding: 1px 6px;
}

/* ---------- Booking-Detail Modal ---------- */
.diwa2-dialog--wide {
    max-width: 860px;
    width: 92%;
    padding: 0;
}
.diwa2-dialog__body { padding: 0; }
.diwa2-dialog__loading {
    padding: 32px;
    text-align: center;
    color: #6b7280;
}
.diwa2-modaldetail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}
.diwa2-modaldetail__title {
    margin: 0 0 4px;
    font-size: 18px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.diwa2-modaldetail__sub {
    color: #6b7280;
    font-size: 13px;
}
.diwa2-modaldetail__close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 0 4px;
}
.diwa2-modaldetail__close:hover { color: #1f2937; }
.diwa2-modaldetail__list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    padding: 20px 24px;
    margin: 0;
}
.diwa2-modaldetail__list dt {
    color: #6b7280;
    font-size: 13px;
}
.diwa2-modaldetail__list dd {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
}
.diwa2-modaldetail__list dd small { display: block; margin-top: 2px; font-size: 11px; }
.diwa2-modaldetail__foot {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 24px 18px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

/* ---------- Shortcuts-Dialog ---------- */
.diwa2-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    max-width: 480px;
    width: 92%;
}
.diwa2-dialog::backdrop { background: rgba(0,0,0,.4); }
.diwa2-dialog__inner { padding: 28px; }
.diwa2-dialog__inner h2 { margin: 0 0 16px; font-size: 20px; }
.diwa2-shortcuts-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.diwa2-shortcuts-table td { padding: 8px 4px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.diwa2-shortcuts-table td:first-child { width: 110px; }
.diwa2-shortcuts-table kbd {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 2px 7px;
    color: #1f2937;
    margin-right: 2px;
}

/* ---------- Tabs (Anliegen-Ansichten) ---------- */
.diwa2-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin: 0 0 24px;
}
.diwa2-tab {
    padding: 10px 18px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: color .15s, border-color .15s;
}
.diwa2-tab:hover { color: #1f2937; }
.diwa2-tab.is-active { color: #2563eb; border-bottom-color: #2563eb; }
.diwa2-tab i { margin-right: 6px; }

/* ---------- 7-Tage-Tabs ---------- */
.diwa2-daytabs {
    display: flex;
    gap: 6px;
    margin: 0 0 20px;
    padding: 10px 0 6px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}
.diwa2-daytab {
    flex: 1 1 auto;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2937;
    position: relative;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.diwa2-daytab:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37,99,235,.15);
}
.diwa2-daytab.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 10px -2px rgba(37,99,235,.4);
}
.diwa2-daytab--today:not(.is-active) {
    border-color: #f59e0b;
    background: #fffbeb;
}
.diwa2-daytab__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}
.diwa2-daytab__weekday {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .75;
}
.diwa2-daytab__date {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
}
.diwa2-daytab__badge {
    background: #e5e7eb;
    color: #374151;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 26px;
    text-align: center;
    line-height: 1.3;
}
.diwa2-daytab.is-active .diwa2-daytab__badge {
    background: rgba(255,255,255,.25);
    color: #fff;
}
.diwa2-daytab--today:not(.is-active) .diwa2-daytab__badge {
    background: #f59e0b;
    color: #fff;
}

/* ---------- Anliegen-Tree Nodes ---------- */
.diwa2-anliegen-node {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.diwa2-anliegen-node__title { font-weight: 500; color: #1f2937; text-decoration: none; }
.diwa2-anliegen-node__title:hover { color: #2563eb; text-decoration: underline; }
.diwa2-anliegen-node__type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 600;
}
.diwa2-anliegen-node__type--branch   { background: #dbeafe; color: #1e40af; }
.diwa2-anliegen-node__type--calendar { background: #dcfce7; color: #166534; }
.diwa2-anliegen-node__type--infopage { background: #e5e7eb; color: #374151; }
.diwa2-anliegen-node__type--form     { background: #fed7aa; color: #9a3412; }
.diwa2-anliegen-node__team {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}
.diwa2-anliegen-node__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.diwa2-anliegen-node__badge--bg       { background: #ede9fe; color: #5b21b6; }
.diwa2-anliegen-node__badge--internal { background: #fee2e2; color: #991b1b; }
.diwa2-anliegen-node__badge--online   { background: #d1fae5; color: #065f46; }
.diwa2-anliegen-node__stat {
    margin-left: 8px;
    font-size: 12px;
    color: #6b7280;
}
.diwa2-anliegen-node__stat i { margin-right: 4px; }
.diwa2-anliegen-node__stat--ok   { color: #16a34a; }
.diwa2-anliegen-node__stat--warn { color: #ea580c; }

/* ---------- Routing-Tabelle ---------- */
.diwa2-table--routing th { font-size: 12px; }
.diwa2-routing-cell {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ede9fe;
    color: #5b21b6;
    white-space: nowrap;
}
.diwa2-routing-cell--empty { background: transparent; color: #d1d5db; }
.diwa2-routing-parent { font-size: 11px; color: #6b7280; margin-bottom: 2px; }
.diwa2-routing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.diwa2-routing-list li { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.4; }
.diwa2-routing-suffix {
    display: inline-block; min-width: 22px; text-align: center;
    padding: 2px 6px; border-radius: 4px;
    background: #ede9fe; color: #5b21b6;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}
.diwa2-routing-suffix--multi { background: #fde68a; color: #92400e; font-weight: 600; }
.diwa2-routing-arrow { color: #9ca3af; }
.diwa2-routing-team  { color: #111827; }

/* ---------- Cytoscape Map ---------- */
.diwa2-section-meta {
    font-weight: 400;
    font-size: 13px;
    color: #6b7280;
    margin-left: 12px;
}
.diwa2-map {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    position: relative;
}
.diwa2-map-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}
.diwa2-map-toolbar__group { display: flex; gap: 6px; align-items: center; }
.diwa2-map-toolbar__group--right { margin-left: auto; }
.diwa2-map-toolbar__label { font-size: 13px; color: #6b7280; margin-right: 4px; }
.diwa2-input--small { padding: 6px 10px; min-width: 220px; font-size: 13px; }
.diwa2-map-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
}
.diwa2-map-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.diwa2-map-legend__dot { width: 14px; height: 14px; border-radius: 4px; }
.diwa2-map-legend__dot--branch   { background: #2563eb; }
.diwa2-map-legend__dot--calendar { background: #16a34a; }
.diwa2-map-legend__dot--infopage { background: #6b7280; }
.diwa2-map-legend__dot--form     { background: #ea580c; }
.diwa2-map-legend__dot--team     { background: #7c3aed; transform: rotate(45deg); }
.diwa2-map-legend__edge {
    width: 24px;
    height: 0;
    border-top: 2px dashed #7c3aed;
}
.diwa2-map-detail {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 380px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    padding: 20px 20px 16px;
    z-index: 100;
    border: 1px solid #e5e7eb;
}
.diwa2-map-detail__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    width: 32px;
    height: 32px;
    border-radius: 4px;
}
.diwa2-map-detail__close:hover { background: #f3f4f6; color: #1f2937; }
.diwa2-map-detail__title { margin: 0 0 12px; font-size: 16px; color: #1f2937; padding-right: 24px; }
.diwa2-map-detail__meta { margin: 0 0 14px; display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; }
.diwa2-map-detail__meta dt { color: #6b7280; }
.diwa2-map-detail__meta dd { margin: 0; color: #1f2937; }
.diwa2-map-pathchain { font-size: 12px; color: #475569; }
.diwa2-map-pathchain span { color: #1f2937; }
.diwa2-map-nextlist { display: flex; flex-direction: column; gap: 4px; }
.diwa2-map-nextstep {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background .12s, border-color .12s;
}
.diwa2-map-nextstep:hover { background: #dbeafe; border-color: #2563eb; }
.diwa2-map-nextstep small { color: #6b7280; margin-left: 6px; font-size: 11px; }
.diwa2-map-routelist { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.diwa2-map-routelist small { color: #6b7280; }

/* ---------- Search-Form ---------- */
.diwa2-search-form { display: flex; gap: 8px; margin-top: 16px; }
.diwa2-search-form .diwa2-input { flex: 1; max-width: 520px; }

/* ---------- Print-CSS fuer Beleg ---------- */
.diwa2-print-only { display: none; }
@media print {
    body { background: #fff; color: #000; font-size: 12pt; }
    .diwa2-userbar,
    .diwa2-header,
    .diwa2-sidebar,
    .diwa2-footer,
    .diwa2-no-print,
    .diwa2-globalsearch,
    .diwa2-iconbtn,
    .diwa2-tabs,
    .diwa2-daytabs,
    .diwa2-filter,
    .diwa2-flash,
    form.diwa2-cancel,
    button.diwa2-btn--danger,
    .diwa2-section-title .diwa2-btn { display: none !important; }
    .diwa2-print-only { display: block; }
    .diwa2-print-header {
        padding: 8px 0 12px;
        border-bottom: 2px solid #000;
        margin-bottom: 16px;
        font-size: 14pt;
    }
    .diwa2-staff-main, .diwa2-staff-layout, .diwa2-staff-layout-with-sidebar { display: block !important; padding: 0 !important; }
    .diwa2-deflist { page-break-inside: avoid; }
    a { color: #000; text-decoration: none; }
    .diwa2-badge {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}

/* ---------- Mobile responsive (max 768px) ---------- */
@media (max-width: 768px) {
    .diwa2-header {
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }
    .diwa2-mainnav {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .diwa2-mainnav a { display: inline-block; }
    .diwa2-header__tools { order: 2; gap: 4px; }
    .diwa2-userchip__text { display: none; }
    .diwa2-userchip { padding: 6px; }
    .diwa2-userchip .fa-chevron-down { display: none; }
    .diwa2-staff-layout-with-sidebar { grid-template-columns: 1fr !important; }
    .diwa2-sidebar {
        position: static !important;
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 8px;
    }
    .diwa2-sidebar a {
        white-space: nowrap;
        padding: 8px 12px;
        border-radius: 6px;
        background: #f3f4f6;
    }
    .diwa2-sidebar a.is-active { background: #2563eb; color: #fff; }
    .diwa2-sidebar hr { display: none; }
    .diwa2-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .diwa2-dashboard-grid { grid-template-columns: 1fr !important; }
    .diwa2-table { font-size: 13px; }
    .diwa2-table th, .diwa2-table td { padding: 8px 6px; }
    .diwa2-daytab { min-width: 60px; padding: 8px 4px; }
    .diwa2-daytab__date { font-size: 14px; }
    .diwa2-map { height: 60vh; min-height: 380px; }
    .diwa2-map-toolbar { flex-direction: column; align-items: stretch; }
    .diwa2-map-toolbar__group--right { margin-left: 0; }
    .diwa2-map-detail { left: 12px; right: 12px; width: auto; bottom: 12px; }
    .diwa2-userbar { padding: 6px 12px; font-size: 12px; }
    .diwa2-page-title { font-size: 20px; }
    .diwa2-section-title { font-size: 18px; flex-wrap: wrap; }
    .diwa2-modaldetail__list { grid-template-columns: 1fr; gap: 2px 0; }
    .diwa2-modaldetail__list dt { margin-top: 8px; font-weight: 600; }
}

/* Touch-Targets WCAG 2.1 AA */
@media (pointer: coarse) {
    .diwa2-btn, .diwa2-tab, .diwa2-daytab, .diwa2-sidebar a, .diwa2-iconbtn {
        min-height: 44px;
    }
}

/* DataTables Pagination: lesbarer Kontrast (vorher schwarz auf blau) */
div.dt-container div.dt-paging button.dt-paging-button,
div.dt-container div.dt-paging a.dt-paging-button {
    color: #1a1a1a !important;
    background: #fff !important;
    background-image: none !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px;
    padding: 4px 10px !important;
    margin: 0 2px;
    text-shadow: none !important;
    box-shadow: none !important;
}
div.dt-container div.dt-paging button.dt-paging-button.current,
div.dt-container div.dt-paging button.dt-paging-button.current:hover,
div.dt-container div.dt-paging a.dt-paging-button.current,
div.dt-container div.dt-paging a.dt-paging-button.current:hover {
    background: #e30613 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #e30613 !important;
}
div.dt-container div.dt-paging button.dt-paging-button:hover,
div.dt-container div.dt-paging a.dt-paging-button:hover {
    background: #f3f4f6 !important;
    background-image: none !important;
    color: #1a1a1a !important;
    border-color: #9ca3af !important;
}
div.dt-container div.dt-paging button.dt-paging-button.disabled,
div.dt-container div.dt-paging button.dt-paging-button.disabled:hover,
div.dt-container div.dt-paging a.dt-paging-button.disabled,
div.dt-container div.dt-paging a.dt-paging-button.disabled:hover {
    color: #9ca3af !important;
    background: #fff !important;
    background-image: none !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed;
}
.dt-container .dt-info,
.dt-container .dt-length,
.dt-container .dt-search { color: #1a1a1a; }

/* ===== Sperrtage: Multi-Team-Auswahl ===== */
.diwa2-blocked-allteams {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-bottom: 18px;
    cursor: pointer;
}
.diwa2-blocked-allteams input[type="checkbox"] {
    margin-top: 4px;
    transform: scale(1.3);
    cursor: pointer;
}
.diwa2-blocked-allteams strong { display: block; color: #78350f; font-size: 15px; margin-bottom: 3px; }
.diwa2-blocked-allteams small { display: block; color: #92400e; font-size: 12px; line-height: 1.4; }

.diwa2-blocked-teams__actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.diwa2-blocked-teams__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
}

.diwa2-team-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background .12s, border-color .12s;
    user-select: none;
}
.diwa2-team-check:hover { background: #f9fafb; border-color: #9ca3af; }
.diwa2-team-check input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
    cursor: pointer;
    flex-shrink: 0;
}
.diwa2-team-check input[type="checkbox"]:checked + span {
    color: #1a1a1a;
    font-weight: 600;
}
.diwa2-team-check:has(input:checked) {
    background: #ecfdf5;
    border-color: #6ee7b7;
}
.diwa2-team-check--own {
    border-color: #fca5a5;
    background: #fff5f5;
}
.diwa2-team-check--own:has(input:checked) {
    background: #fef2f2;
    border-color: #ef4444;
}
.diwa2-team-check--own i { color: #e30613; font-size: 11px; margin-left: 4px; }

/* ===== Team-Badges (Sperrtage, Anliegen etc.) ===== */
.diwa2-team-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.diwa2-team-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.diwa2-team-badge--own {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
    font-weight: 700;
}
.diwa2-team-badge--own i { color: #e30613; }
.diwa2-team-badge--all {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
    font-weight: 600;
}

/* ===== Dashboard: Kommende Termine (14-Tage-Uebersicht) ===== */
.diwa2-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 8px;
    margin-top: 10px;
}
@media (max-width: 1300px) {
    .diwa2-upcoming-grid { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 700px) {
    .diwa2-upcoming-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}
.diwa2-upcoming-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 6px;
    font-size: 11px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none !important;
    color: #1a1a1a;
    transition: transform .12s, border-color .12s, box-shadow .12s;
    min-height: 110px;
}
.diwa2-upcoming-day:hover {
    transform: translateY(-2px);
    border-color: #9ca3af;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    text-decoration: none;
}
.diwa2-upcoming-day__weekday {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.diwa2-upcoming-day__date {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.diwa2-upcoming-day__main {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}
.diwa2-upcoming-day__bar {
    height: 6px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.diwa2-upcoming-day__bar > span {
    display: block;
    height: 100%;
    background: #16a34a;
    transition: width .3s;
}
.diwa2-upcoming-day__label {
    font-size: 11px;
    color: #6b7280;
    margin-top: auto;
}
.diwa2-upcoming-day.is-today { border-color: #e30613; border-width: 2px; }
.diwa2-upcoming-day.is-today .diwa2-upcoming-day__date { color: #e30613; }
.diwa2-upcoming-day.is-weekend { background: #fafbfc; opacity: 0.65; }
.diwa2-upcoming-day--busy .diwa2-upcoming-day__bar > span { background: #f59e0b; }
.diwa2-upcoming-day--full .diwa2-upcoming-day__bar > span { background: #e30613; }
.diwa2-upcoming-day--full .diwa2-upcoming-day__label { color: #e30613; font-weight: 600; }
.diwa2-upcoming-day--closed { background: #f9fafb; opacity: 0.55; }
.diwa2-upcoming-day--closed .diwa2-upcoming-day__main { color: #9ca3af; }

/* WYSIWYG-Editor fuer Mail-Templates */
.diwa2-wysiwyg { border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; background: #fff; }
.diwa2-wysiwyg__toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.diwa2-wysiwyg__toolbar button[data-cmd] {
    width: 32px;
    height: 30px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.diwa2-wysiwyg__toolbar button[data-cmd]:hover { background: #f3f4f6; }
.diwa2-wysiwyg__sep { display:inline-block; width:1px; height:20px; background:#e5e7eb; margin: 0 4px; }
.diwa2-wysiwyg__spacer { flex: 1; }
.diwa2-wysiwyg__tab {
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}
.diwa2-wysiwyg__tab.is-active { background: #1f2937; color: #fff; border-color: #1f2937; }
.diwa2-wysiwyg__placeholders {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 6px 8px;
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
}
.diwa2-wysiwyg__placeholders-label {
    font-size: 12px;
    color: #075985;
    font-weight: 600;
    margin-right: 6px;
}
.diwa2-wysiwyg__placeholders .diwa2-tpl-insert {
    font-size: 12px;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid #7dd3fc;
    border-radius: 4px;
    cursor: pointer;
    color: #0c4a6e;
}
.diwa2-wysiwyg__placeholders .diwa2-tpl-insert:hover { background: #e0f2fe; }
.diwa2-wysiwyg__visual {
    min-height: 280px;
    padding: 14px 16px;
    outline: none;
    font-size: 14px;
    line-height: 1.55;
    color: #1a1a1a;
}
.diwa2-wysiwyg__visual:focus { background: #fff; }
.diwa2-wysiwyg .diwa2-wysiwyg__html, .diwa2-wysiwyg textarea[data-diwa2-wysiwyg-html] {
    width: 100%;
    min-height: 280px;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    resize: vertical;
    outline: none;
}
.diwa2-wysiwyg .form-group, .diwa2-wysiwyg .diwa2-wysiwyg__html-wrap {
    margin: 0;
}

/* ===== FAQ & Hilfe-Seite ===== */
.diwa2-faq-intro {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #0c4a6e;
}
.diwa2-faq-intro p { margin: 0; }

.diwa2-faq-search {
    position: relative;
    margin-bottom: 18px;
}
.diwa2-faq-search input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}
.diwa2-faq-search input:focus { outline: 2px solid #0e75bc; outline-offset: -1px; }
.diwa2-faq-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}
.diwa2-faq-search__clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #6b7280;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.diwa2-faq-search__clear:hover { color: #1a1a1a; }

.diwa2-faq-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.diwa2-faq-tab {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
}
.diwa2-faq-tab:hover { background: #f3f4f6; }
.diwa2-faq-tab.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.diwa2-faq-cat {
    margin-bottom: 22px;
}
.diwa2-faq-cat__title {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.diwa2-faq-cat__title i { color: #e30613; }

.diwa2-faq-entry {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 6px;
}
.diwa2-faq-entry > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 500;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.diwa2-faq-entry > summary::-webkit-details-marker { display: none; }
.diwa2-faq-entry > summary::before {
    content: '+';
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #f3f4f6;
    border-radius: 50%;
    text-align: center;
    font-weight: 700;
    line-height: 22px;
    color: #1a1a1a;
    flex-shrink: 0;
}
.diwa2-faq-entry[open] > summary::before { content: '−'; background: #e30613; color: #fff; }
.diwa2-faq-entry > summary:hover { background: #fafbfc; }
.diwa2-faq-entry__answer {
    padding: 0 16px 14px 48px;
    color: #374151;
    line-height: 1.6;
}
.diwa2-faq-entry__answer code {
    background: #f3f4f6;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 13px;
}
.diwa2-faq-entry__link {
    margin: 12px 0 0;
}
.diwa2-faq-entry__link .diwa2-btn {
    background: #0e75bc;
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.diwa2-faq-entry__link .diwa2-btn:hover {
    background: #0a5a91;
    color: #fff;
    text-decoration: none;
}

.diwa2-faq-empty {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 14px 18px;
    color: #78350f;
    text-align: center;
    margin-top: 20px;
}
.diwa2-faq-empty i { margin-right: 8px; color: #d97706; }

/* ===== Help-Choice-Modal (FAQ / Tour) ===== */
.diwa2-help-choice {
    border: 0;
    padding: 0;
    border-radius: 10px;
    background: #fff;
    max-width: 520px;
    width: 95%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.diwa2-help-choice::backdrop { background: rgba(15, 23, 42, 0.55); }
.diwa2-help-choice__inner { padding: 28px; }
.diwa2-help-choice h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #1a1a1a;
}
.diwa2-help-choice__sub {
    margin: 0 0 22px;
    color: #6b7280;
    font-size: 14px;
}
.diwa2-help-choice__options {
    display: grid;
    gap: 12px;
}
.diwa2-help-choice__opt {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color .12s, background .12s, transform .08s;
    text-align: left;
    font: inherit;
}
.diwa2-help-choice__opt:hover { border-color: #e30613; background: #fff5f5; transform: translateY(-1px); text-decoration: none; }
.diwa2-help-choice__opt i { font-size: 22px; color: #e30613; width: 32px; text-align: center; flex-shrink: 0; }
.diwa2-help-choice__opt strong { display: block; font-size: 15px; margin-bottom: 2px; }
.diwa2-help-choice__opt span { font-size: 13px; color: #6b7280; }
.diwa2-help-choice__close {
    background: none; border: 0; cursor: pointer; color: #9ca3af; font-size: 18px;
    position: absolute; top: 14px; right: 14px;
}

/* ===== Driver.js Theme-Override (passt zu DIWA-CI) ===== */
.driver-popover.diwa2-tour-popover {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-width: 380px;
}
.diwa2-tour-popover .driver-popover-title {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.diwa2-tour-popover .driver-popover-description { color: #374151; font-size: 14px; line-height: 1.5; }
.diwa2-tour-popover .driver-popover-footer { padding-top: 12px; }
.diwa2-tour-popover .driver-popover-progress-text { color: #6b7280; font-size: 12px; }
.diwa2-tour-popover .driver-popover-prev-btn,
.diwa2-tour-popover .driver-popover-next-btn,
.diwa2-tour-popover .driver-popover-close-btn {
    background: #e30613 !important;
    border: 0 !important;
    color: #fff !important;
    text-shadow: none !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 7px 14px !important;
    font-size: 13px;
}
.diwa2-tour-popover .driver-popover-prev-btn { background: #fff !important; color: #1a1a1a !important; border: 1px solid #d1d5db !important; }

/* Navbar-Uhr */
.diwa2-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
    color: #374151;
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}
.diwa2-clock i { color: #6b7280; font-size: 12px; }
.diwa2-clock__date { font-weight: 500; }
.diwa2-clock__time { font-weight: 700; color: #111827; }
@media (max-width: 900px) { .diwa2-clock__date { display: none; } }

/* Modal-Footer-Buttons: einheitliche Groesse, nur Hintergrund-Farbe variiert */
.diwa2-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1;
    transition: background .12s, border-color .12s;
}
.diwa2-modal-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.diwa2-modal-btn--ghost { background: #fff; color: #1a1a1a; }
.diwa2-modal-btn--success { background: #16a34a; color: #fff; border-color: #16a34a; }
.diwa2-modal-btn--success:hover { background: #128239; border-color: #128239; color: #fff; }
.diwa2-modal-btn--danger { background: #e30613; color: #fff; border-color: #e30613; }
.diwa2-modal-btn--danger:hover { background: #b8050f; border-color: #b8050f; color: #fff; }

/* Form-Grid fuer 2-spaltige Felder im Admin */
.diwa2-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.diwa2-form-grid__col { min-width: 0; }
.diwa2-form-fieldset { border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px 18px 14px; margin: 16px 0; background: #fafbfc; }
.diwa2-form-fieldset > legend { font-weight: 600; padding: 0 8px; color: #374151; font-size: 14px; }
@media (max-width: 640px) {
    .diwa2-form-grid { grid-template-columns: 1fr; }
}

/* Kundenliste: VERBIS/STEP-Buttons (V/S) als feste Button-Box mit Fettschrift */
.diwa2-fv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    margin-right: 4px;
    line-height: 1;
    transition: background .12s, border-color .12s;
}
.diwa2-fv-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1a1a1a;
}

/* Funktionen-Buttons (Aufrufen/Fertig/Freigeben) als Icon-Buttons in Button-Box */
.diwa2-func-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 2px;
    padding: 0;
    font-size: 14px;
    transition: background .12s, border-color .12s;
}
.diwa2-func-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.diwa2-func-btn--primary { background: #e30613; color: #fff; border-color: #e30613; }
.diwa2-func-btn--primary:hover { background: #b8050f; border-color: #b8050f; color: #fff; }



/* Anliegen-Form: Custom Parent-Picker (Tree) */
.diwa2-parent-picker { position: relative; }
.diwa2-parent-picker__current {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px 6px 12px;
    background: #fff;
}
.diwa2-parent-picker__label {
    flex: 1; cursor: pointer; padding: 4px 0; font-size: 14px; color: #1f2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.diwa2-parent-picker__label.is-empty { color: #9ca3af; font-style: italic; }
.diwa2-parent-picker__open {
    background: #0e75bc; color: #fff; border: none; border-radius: 4px;
    padding: 6px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.diwa2-parent-picker__open:hover { background: #0a5d96; }
.diwa2-parent-picker__clear {
    background: transparent; border: 1px solid #d1d5db; color: #6b7280;
    border-radius: 4px; padding: 4px 10px; font-size: 16px; line-height: 1; cursor: pointer;
}
.diwa2-parent-picker__clear:hover { background: #fee; border-color: #fbb; color: #c00; }
.diwa2-parent-picker__panel {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
    width: min(520px, 95vw);
    background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.18); padding: 10px;
    max-height: 420px; display: flex; flex-direction: column; gap: 8px;
}
.diwa2-parent-picker__panel[hidden] { display: none !important; }
.diwa2-parent-picker__close {
    position: absolute; top: 6px; right: 8px;
    background: transparent; border: none; font-size: 22px; line-height: 1;
    color: #9ca3af; cursor: pointer; padding: 4px 8px;
}
.diwa2-parent-picker__close:hover { color: #1f2937; }
.diwa2-parent-picker__search {
    width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 14px; box-sizing: border-box;
}
.diwa2-parent-picker__tree {
    list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0;
}
.diwa2-parent-picker__item {
    margin: 0; padding-left: 8px;
}
.diwa2-parent-picker__btn {
    width: 100%; text-align: left; background: transparent; border: none;
    padding: 5px 8px; font-size: 14px; cursor: pointer; border-radius: 4px;
    color: #1f2937; display: flex; align-items: center; gap: 6px;
    font-family: inherit;
}
.diwa2-parent-picker__btn:hover { background: #e6f0fa; }
.diwa2-parent-picker__btn.is-disabled {
    color: #9ca3af; cursor: not-allowed; font-style: italic;
}
.diwa2-parent-picker__btn.is-disabled:hover { background: transparent; }
.diwa2-parent-picker__glyph { color: #9ca3af; font-family: monospace; font-size: 12px; }
.diwa2-parent-picker__item--d0 > .diwa2-parent-picker__btn {
    font-weight: 700; color: #0066cc; background: #f0f7ff; margin: 2px 0;
}
.diwa2-parent-picker__item--d0 > .diwa2-parent-picker__btn:hover { background: #d6e9fb; }
.diwa2-parent-picker__item--root > .diwa2-parent-picker__btn {
    color: #6b7280; font-style: italic; border-bottom: 1px solid #f3f4f6; margin-bottom: 4px;
}


/* Anliegen-Form: Card-Layout */
.diwa2-anliegen-form { display: flex; flex-direction: column; gap: 18px; max-width: none; width: 100%; }
.diwa2-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.diwa2-card__head {
    padding: 14px 20px 10px; border-bottom: 1px solid #f3f4f6; background: #fafbfc;
    border-radius: 8px 8px 0 0;
}
.diwa2-card__head h3 { margin: 0; font-size: 15px; color: #1f2937; font-weight: 600; }
.diwa2-card__head p { margin: 2px 0 0; font-size: 12px; color: #6b7280; }
.diwa2-card__body { padding: 16px 20px 18px; }

/* 12er-Grid mit Spannen */
.diwa2-grid--12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 18px; }
.diwa2-col-12 { grid-column: span 12; }
.diwa2-col-9  { grid-column: span 9; }
.diwa2-col-6  { grid-column: span 6; }
.diwa2-col-3  { grid-column: span 3; }
@media (max-width: 800px) {
    .diwa2-col-9, .diwa2-col-6, .diwa2-col-3 { grid-column: span 12; }
}

/* Gridzellen: Form-Labels schlanker, Inputs voll */
.diwa2-grid--12 > div { min-width: 0; margin-bottom: 0 !important; }
.diwa2-grid--12 label { display: block; color: #4b5563; font-size: 12px; font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.diwa2-grid--12 input[type=text], .diwa2-grid--12 input[type=email], .diwa2-grid--12 input[type=tel],
.diwa2-grid--12 input[type=url], .diwa2-grid--12 input[type=number],
.diwa2-grid--12 select, .diwa2-grid--12 textarea {
    display: block; width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 5px; font: inherit; color: #1f2937; background: #fff; box-sizing: border-box;
}
.diwa2-grid--12 textarea { min-height: 90px; resize: vertical; }
.diwa2-grid--12 .form-hint, .diwa2-grid--12 .help-block { color: #6b7280; font-size: 12px; margin-top: 4px; }

/* Checkboxen vertikal stapeln */
.diwa2-stack { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.diwa2-stack > div { display: flex; align-items: center; gap: 8px; }
.diwa2-stack label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: #1f2937; font-weight: 500; }
.diwa2-stack input[type=checkbox] { width: 18px; height: 18px; margin: 0; }

.diwa2-form-actions {
    display: flex; gap: 12px; align-items: center; padding: 14px 0 0;
    border-top: 1px solid #e5e7eb; margin-top: 6px;
}
