/**
 * Mängelmanagement – Styles
 * Mobile First · WordPress-kompatibel
 *
 * @package    EIT Toolbox
 * @subpackage Maengel
 * @author     Niklas Pauli
 * @version    260514.1514
 */

/* ─────────────────────────────────────────────────────────────────────────────
   Reset / Basisvariablen
───────────────────────────────────────────────────────────────────────────── */
:root {
    --eit-mm-primary:    #2271b1;
    --eit-mm-success:    #46b450;
    --eit-mm-danger:     #d63638;
    --eit-mm-warning:    #dba617;
    --eit-mm-neutral:    #8c8f94;
    --eit-mm-bg:         #f6f7f7;
    --eit-mm-border:     #dcdcde;
    --eit-mm-text:       #1d2327;
    --eit-mm-text-soft:  #50575e;
    --eit-mm-radius:     8px;
    --eit-mm-shadow:     0 1px 3px rgba(0,0,0,.1);
    --eit-mm-touch-min:  48px;
}

.eit-mm-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Wrapper
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px 80px;
    font-size: 15px;
    color: var(--eit-mm-text);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Buttons
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 16px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    background: #fff;
    color: var(--eit-mm-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.eit-mm-btn:hover { background: var(--eit-mm-bg); }
.eit-mm-btn:active { opacity: .85; }

.eit-mm-btn-primary {
    background: var(--eit-mm-primary);
    border-color: var(--eit-mm-primary);
    color: #fff;
}
.eit-mm-btn-primary:hover { background: #1a5e99; border-color: #1a5e99; color: #fff; }

.eit-mm-btn-success {
    background: var(--eit-mm-success);
    border-color: var(--eit-mm-success);
    color: #fff;
}
.eit-mm-btn-success:hover { background: #3a9a43; color: #fff; }

.eit-mm-btn-danger {
    background: var(--eit-mm-danger);
    border-color: var(--eit-mm-danger);
    color: #fff;
}
.eit-mm-btn-danger:hover { background: #b22222; color: #fff; }

.eit-mm-btn-sm {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 12px;
}

.eit-mm-btn-lg {
    min-height: 56px;
    padding: 14px 24px;
    font-size: 16px;
}

.eit-mm-btn-block {
    width: 100%;
}

.eit-mm-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.eit-toolbox-floating-back {
    position: fixed;
    left: max(16px, calc((100vw - 1200px) / 2 + 16px));
    bottom: 16px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border: 1px solid #0a58ca;
    border-radius: 8px;
    background: #0a58ca;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    -webkit-tap-highlight-color: transparent;
}

.eit-toolbox-floating-back:hover,
.eit-toolbox-floating-back:focus {
    background: #084da8;
    border-color: #084da8;
    color: #fff;
    text-decoration: none;
    outline: 2px solid rgba(10,88,202,.22);
    outline-offset: 2px;
}

.eit-toolbox-floating-back span:first-child {
    font-size: 18px;
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Badge / Status-Tags
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.eit-mm-badge-lg {
    padding: 6px 14px;
    font-size: 14px;
}
.eit-mm-badge-prio {
    background: var(--eit-mm-danger) !important;
    margin-left: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Projekt-Auswahl
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-projekt-auswahl {
    margin: 16px 0 20px;
}
.eit-mm-projekt-auswahl select {
    width: 100%;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 14px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    font-size: 15px;
    background: #fff;
    max-width: 480px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Dashboard
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-dashboard {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--eit-mm-shadow);
}
.eit-mm-dashboard-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.eit-mm-dashboard-header h2 {
    margin: 0;
    font-size: 18px;
}
.eit-mm-sub {
    margin: 4px 0 0;
    color: var(--eit-mm-text-soft);
    font-size: 13px;
}
.eit-mm-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   EIT-Toolbox Portal
───────────────────────────────────────────────────────────────────────────── */
.eit-projektzugang {
    padding-top: 8px;
}

.eit-projektzugang-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--eit-mm-shadow);
}

.eit-projektzugang-kicker {
    margin: 0 0 6px;
    color: var(--eit-mm-primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.eit-projektzugang h1 {
    margin: 0;
    color: var(--eit-mm-text);
    font-size: 28px;
    line-height: 1.2;
}

.eit-projektzugang-sub {
    margin: 8px 0 0;
    color: var(--eit-mm-text-soft);
    font-size: 14px;
}

.eit-projektzugang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.eit-projektzugang-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    background: #fff;
    color: var(--eit-mm-text);
    text-decoration: none;
    box-shadow: var(--eit-mm-shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.eit-projektzugang-card:hover,
.eit-projektzugang-card:focus {
    color: var(--eit-mm-text);
    border-color: var(--eit-mm-primary);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    transform: translateY(-2px);
    outline: none;
}

.eit-projektzugang-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: var(--eit-mm-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.eit-projektzugang-card-wp-dashboard .eit-projektzugang-icon { background: #1d2327; }
.eit-projektzugang-card-benutzerverwaltung .eit-projektzugang-icon,
.eit-projektzugang-card-benutzerkonto .eit-projektzugang-icon,
.eit-projektzugang-card-admin-nutzer .eit-projektzugang-icon { background: #7a4d00; }
.eit-projektzugang-card-toolbox-verwaltung .eit-projektzugang-icon,
.eit-projektzugang-card-admin-toolbox .eit-projektzugang-icon { background: #5b4b8a; }
.eit-projektzugang-card-admin-arbeitszeit .eit-projektzugang-icon,
.eit-projektzugang-card-zeiterfassung .eit-projektzugang-icon,
.eit-projektzugang-card-arbeitszeiten .eit-projektzugang-icon { background: var(--eit-mm-primary); }
.eit-projektzugang-card-admin-wetter .eit-projektzugang-icon { background: #0f766e; }
.eit-projektzugang-card-bautagebuch .eit-projektzugang-icon,
.eit-projektzugang-card-admin-bautagebuch .eit-projektzugang-icon,
.eit-projektzugang-card-admin-btb-import .eit-projektzugang-icon { background: #6c757d; }
.eit-projektzugang-card-angebotspruefung .eit-projektzugang-icon,
.eit-projektzugang-card-admin-pruefungen .eit-projektzugang-icon { background: #198754; }
.eit-projektzugang-card-maengel .eit-projektzugang-icon,
.eit-projektzugang-card-admin-maengel .eit-projektzugang-icon { background: var(--eit-mm-danger); }
.eit-projektzugang-card-projektverwaltung .eit-projektzugang-icon { background: #0a58ca; }

.eit-projektzugang-card-title {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.eit-projektzugang-card-text {
    display: block;
    color: var(--eit-mm-text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.eit-toolbox-account .eit-mm-dashboard h2 {
    margin-top: 0;
}

.eit-toolbox-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
}

.eit-toolbox-account-grid p {
    margin: 0;
}

.eit-toolbox-account label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.eit-toolbox-account input[type="text"],
.eit-toolbox-account input[type="email"],
.eit-toolbox-account input[type="password"] {
    width: 100%;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 12px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    background: #fff;
    color: var(--eit-mm-text);
    font-size: 15px;
}

.eit-toolbox-account-actions {
    margin: 18px 0 0;
}

.eit-toolbox-account-notice {
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: var(--eit-mm-radius);
    border: 1px solid var(--eit-mm-border);
    background: #fff;
    font-weight: 700;
}

.eit-toolbox-account-notice-success {
    border-color: #8ed39a;
    background: #f0fff3;
    color: #155724;
}

.eit-toolbox-account-notice-error {
    border-color: #f0a5a5;
    background: #fff5f5;
    color: #8a1f1f;
}

.eit-toolbox-account-danger {
    border-color: #f0a5a5;
}

.eit-toolbox-account-danger p {
    color: var(--eit-mm-text-soft);
}

.eit-toolbox-account-pending {
    padding: 10px 12px;
    border: 1px solid #f2d27a;
    border-radius: var(--eit-mm-radius);
    background: #fff8e5;
    color: #6f4d00 !important;
    font-weight: 700;
}

.eit-toolbox-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.eit-toolbox-admin-toolbar strong {
    font-size: 17px;
}

.eit-toolbox-admin-panel {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 16px;
    box-shadow: var(--eit-mm-shadow);
    overflow-x: auto;
}

.eit-toolbox-admin-panel .wrap {
    margin: 0;
    max-width: none;
}

.eit-toolbox-admin-panel .wrap > h1:first-child {
    margin-top: 0;
}

.eit-toolbox-admin-panel .widefat {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.eit-toolbox-admin-panel .widefat th,
.eit-toolbox-admin-panel .widefat td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--eit-mm-border);
    text-align: left;
    vertical-align: top;
}

.eit-toolbox-admin-panel .widefat thead th {
    background: #f6f7f7;
    font-weight: 800;
}

.eit-toolbox-admin-panel .form-table th,
.eit-toolbox-admin-panel .form-table td {
    display: block;
    width: 100%;
    padding: 8px 0;
}

.eit-toolbox-admin-panel .regular-text,
.eit-toolbox-admin-panel .large-text,
.eit-toolbox-admin-panel input[type="text"],
.eit-toolbox-admin-panel input[type="email"],
.eit-toolbox-admin-panel input[type="url"],
.eit-toolbox-admin-panel select,
.eit-toolbox-admin-panel textarea {
    max-width: 100%;
}

.eit-toolbox-admin-panel .button,
.eit-toolbox-admin-panel .button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--eit-mm-border);
    border-radius: 6px;
    background: #fff;
    color: var(--eit-mm-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.eit-toolbox-admin-panel .button-primary {
    border-color: var(--eit-mm-primary);
    background: var(--eit-mm-primary);
    color: #fff;
}

.eit-toolbox-admin-panel .notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 4px solid var(--eit-mm-primary);
    background: #f6f7f7;
}

.eit-toolbox-admin-panel .notice-success {
    border-left-color: var(--eit-mm-success);
}

.eit-toolbox-admin-panel .notice-error {
    border-left-color: var(--eit-mm-danger);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Statistik-Kacheln
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.eit-mm-stat-kachel {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--eit-mm-text);
    transition: box-shadow .15s;
}
.eit-mm-stat-kachel:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.eit-mm-stat-zahl {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}
.eit-mm-stat-label {
    display: block;
    font-size: 12px;
    color: var(--eit-mm-text-soft);
    margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Filter-Leiste
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-filter-form {
    margin-bottom: 16px;
}
.eit-mm-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.eit-mm-filter-row select,
.eit-mm-filter-row input[type="text"] {
    min-height: var(--eit-mm-touch-min);
    padding: 10px 14px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    font-size: 14px;
    background: #fff;
    flex: 1;
    min-width: 140px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Tabellen-Ansicht (Desktop)
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-tabelle-wrap {
    overflow-x: visible;
}
.eit-mm-tabelle {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--eit-mm-radius);
    overflow: hidden;
    box-shadow: var(--eit-mm-shadow);
    table-layout: fixed;
}
.eit-mm-tabelle th {
    background: var(--eit-mm-bg);
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--eit-mm-text-soft);
    white-space: nowrap;
}
.eit-mm-tabelle td {
    padding: 10px 12px;
    border-top: 1px solid var(--eit-mm-border);
    font-size: 14px;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.eit-mm-tabelle tr:hover td { background: #fafafa; }

.eit-mm-tabelle th:first-child,
.eit-mm-tabelle td:first-child {
    width: 84px;
}

.eit-mm-list-haupt {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eit-mm-list-nr {
    font-size: 12px;
    font-weight: 700;
    color: var(--eit-mm-text-soft);
}

.eit-mm-list-titel {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.eit-mm-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.eit-mm-list-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--eit-mm-bg);
    border: 1px solid var(--eit-mm-border);
    border-radius: 999px;
    color: var(--eit-mm-text-soft);
    font-size: 12px;
    font-weight: 600;
}

.eit-mm-list-datum {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    background: #fff6e8;
    border: 1px solid #f0c36d;
    border-radius: 8px;
}

.eit-mm-list-datum.ist-leer {
    background: var(--eit-mm-bg);
    border-color: var(--eit-mm-border);
}

.eit-mm-list-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--eit-mm-text-soft);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.eit-mm-list-datum strong {
    font-size: 15px;
    line-height: 1.2;
}

.eit-mm-list-subdatum {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--eit-mm-text-soft);
}

.eit-mm-list-statusblock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.eit-mm-list-prio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--eit-mm-bg);
    border: 1px solid var(--eit-mm-border);
    color: var(--eit-mm-text);
}

.eit-mm-list-prio-hoch {
    background: #fff6e8;
    border-color: #f0c36d;
    color: #9a5a00;
}

.eit-mm-list-prio-kritisch {
    background: #fdeaea;
    border-color: #ef9a9a;
    color: #b42318;
}

.eit-mm-list-prio-normal {
    background: #edf4fb;
    border-color: #b6d0ea;
    color: #1d5f96;
}

.eit-mm-list-prio-niedrig {
    background: #f3f4f5;
    border-color: #d5d7da;
    color: #50575e;
}

.eit-mm-list-ort {
    font-weight: 600;
    line-height: 1.35;
}

.eit-mm-list-zustaendig {
    margin-top: 8px;
    font-size: 13px;
    color: var(--eit-mm-text-soft);
    line-height: 1.35;
}

.eit-mm-list-ersteller {
    margin-top: 4px;
    font-size: 13px;
    color: var(--eit-mm-text-soft);
    line-height: 1.35;
}

/* Karten: nur auf Mobil sichtbar */
.eit-mm-karten-wrap { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   Karten-Ansicht (Mobil)
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-karte {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--eit-mm-shadow);
}
.eit-mm-karte-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.eit-mm-karte-nr {
    font-weight: 700;
    font-size: 13px;
    color: var(--eit-mm-text-soft);
}
.eit-mm-karte-titel {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}
.eit-mm-karte-meta {
    font-size: 13px;
    color: var(--eit-mm-text-soft);
    margin-bottom: 4px;
}
.eit-mm-karte-frist {
    font-size: 13px;
    color: var(--eit-mm-danger);
    margin-bottom: 8px;
}
.eit-mm-karte-footer {
    margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Leer-Zustand
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-leer {
    text-align: center;
    padding: 40px 20px;
    color: var(--eit-mm-text-soft);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Formular-Elemente
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-form-row {
    margin-bottom: 16px;
}
.eit-mm-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--eit-mm-text);
}
.eit-mm-pflicht { color: var(--eit-mm-danger); }
.eit-mm-input {
    display: block;
    width: 100%;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 14px;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    font-size: 16px; /* 16px verhindert iOS-Zoom */
    background: #fff;
    color: var(--eit-mm-text);
    box-sizing: border-box;
    transition: border-color .15s;
}
.eit-mm-input:focus {
    outline: none;
    border-color: var(--eit-mm-primary);
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}
.eit-mm-textarea {
    min-height: 100px;
    resize: vertical;
}
.eit-mm-hint {
    font-size: 12px;
    color: var(--eit-mm-text-soft);
    margin-top: 4px;
}
.eit-mm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}
.eit-mm-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Wizard
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-wizard-steps {
    display: flex;
    align-items: center;
    margin: 16px 0 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
}
.eit-mm-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--eit-mm-neutral);
}
.eit-mm-step-nr {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--eit-mm-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.eit-mm-step-active .eit-mm-step-nr {
    background: var(--eit-mm-primary);
    color: #fff;
}
.eit-mm-step-active { color: var(--eit-mm-text); font-weight: 700; }
.eit-mm-step-done .eit-mm-step-nr {
    background: var(--eit-mm-success);
    color: #fff;
}
.eit-mm-step-linie {
    flex: 1;
    height: 2px;
    background: var(--eit-mm-border);
    margin: 0 8px;
}

.eit-mm-wizard-panel {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 20px;
    margin-bottom: 16px;
}
.eit-mm-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--eit-mm-border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Prioritäts-Buttons
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-prio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.eit-mm-prio-option { display: none; }
.eit-mm-prio-btn {
    display: inline-block;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 16px;
    border: 2px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all .15s;
    line-height: 1.2;
}
.eit-mm-prio-niedrig  { border-color: #8c8f94; }
.eit-mm-prio-normal   { border-color: var(--eit-mm-primary); }
.eit-mm-prio-hoch     { border-color: var(--eit-mm-warning); }
.eit-mm-prio-kritisch { border-color: var(--eit-mm-danger); }

input[type="radio"]:checked + .eit-mm-prio-niedrig  { background:#8c8f94; color:#fff; border-color:#8c8f94; }
input[type="radio"]:checked + .eit-mm-prio-normal   { background:var(--eit-mm-primary); color:#fff; }
input[type="radio"]:checked + .eit-mm-prio-hoch     { background:var(--eit-mm-warning); color:#fff; }
input[type="radio"]:checked + .eit-mm-prio-kritisch { background:var(--eit-mm-danger);  color:#fff; }

/* ─────────────────────────────────────────────────────────────────────────────
   Canvas / Planansicht
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-canvas-outer {
    width: 100%;
    background: #eee;
    border-radius: var(--eit-mm-radius);
    overflow: hidden;
    touch-action: none;
    position: relative;
}
.eit-mm-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
}
.eit-mm-canvas-outer-neu {
    min-height: 340px;
}
.eit-mm-canvas-mini { max-height: 280px; }
.eit-mm-canvas-fullwidth { height: 60vh; min-height: 320px; }
.eit-mm-canvas-fullwidth .eit-mm-canvas { height: 100%; object-fit: contain; }
.eit-mm-marker-info {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #b9e3c6;
    border-radius: var(--eit-mm-radius);
    background: #edf9f1;
    color: #17653a;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Fotos
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-foto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--eit-mm-touch-min);
    padding: 10px 16px;
    background: var(--eit-mm-bg);
    border: 2px dashed var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--eit-mm-text);
    transition: border-color .15s;
}
.eit-mm-foto-btn:hover { border-color: var(--eit-mm-primary); }

.eit-mm-foto-preview-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.eit-mm-foto-thumb {
    width: 72px; height: 72px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--eit-mm-border);
}
.eit-mm-foto-upload-area { display: flex; flex-direction: column; gap: 8px; }

/* ── Drag-and-Drop Upload-Zone ── */
.eit-mm-dnd-zone {
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    transition: border-color .2s, background .2s;
    background: #fafafa;
}
.eit-mm-dnd-zone:hover {
    border-color: var(--eit-mm-primary);
    background: #f0f6fc;
}
.eit-mm-dnd-zone.eit-mm-dnd-aktiv {
    border-color: var(--eit-mm-primary);
    background: #e8f1fb;
}
.eit-mm-dnd-hinweis {
    color: #8c8f94;
    font-size: 12px;
    margin: 6px 0 0;
    pointer-events: none;
}
.eit-mm-dnd-datei-name {
    font-size: 13px;
    color: var(--eit-mm-primary);
    font-weight: 600;
    margin-top: 6px;
}

.eit-mm-foto-galerie {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.eit-mm-foto-item { position: relative; }
.eit-mm-foto-thumb-lg {
    width: 120px; height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--eit-mm-border);
    display: block;
}
.eit-mm-foto-caption {
    font-size: 11px;
    color: var(--eit-mm-text-soft);
    max-width: 120px;
    text-align: center;
    margin: 2px 0 0;
}
.eit-mm-foto-item .eit-mm-btn-danger {
    position: absolute;
    top: 4px; right: 4px;
    min-height: 24px;
    padding: 2px 6px;
    font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Detail-Seite
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.eit-mm-detail-header h2 {
    margin: 0;
    font-size: 18px;
    flex: 1;
}
.eit-mm-mangel-nr {
    color: var(--eit-mm-text-soft);
    font-size: 14px;
    margin-right: 6px;
}

.eit-mm-action-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--eit-mm-border);
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 100;
    margin-bottom: 16px;
}

.eit-mm-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.eit-mm-detail-block {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 16px;
    box-shadow: var(--eit-mm-shadow);
}
.eit-mm-block-titel {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eit-mm-meta-tabelle { width: 100%; border-collapse: collapse; }
.eit-mm-meta-tabelle th,
.eit-mm-meta-tabelle td { padding: 5px 6px; font-size: 14px; }
.eit-mm-meta-tabelle th {
    width: 120px;
    color: var(--eit-mm-text-soft);
    font-weight: 600;
    vertical-align: top;
    white-space: nowrap;
}
.eit-mm-meta-tabelle tr:nth-child(odd) { background: var(--eit-mm-bg); }

.eit-mm-beschreibung {
    padding: 10px;
    background: var(--eit-mm-bg);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.eit-mm-erledigt-block {
    margin-top: 12px;
    padding: 10px;
    background: #f0faf0;
    border-left: 4px solid var(--eit-mm-success);
    border-radius: 4px;
}
.eit-mm-intern-block {
    margin-top: 12px;
    padding: 10px;
    background: #fffbef;
    border-left: 4px solid var(--eit-mm-warning);
    border-radius: 4px;
}

/* Panel (Status-Änderung, Erledigtmeldung) */
.eit-mm-panel {
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--eit-mm-shadow);
}

.eit-mm-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.eit-mm-status-btn {
    min-height: var(--eit-mm-touch-min);
    padding: 10px;
    border: 2px solid;
    border-radius: var(--eit-mm-radius);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.eit-mm-status-btn:hover { opacity: .85; }

/* ─────────────────────────────────────────────────────────────────────────────
   Kommentare
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-kommentar {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: var(--eit-mm-bg);
}
.eit-mm-kommentar-intern {
    background: #fffbef;
    border-left: 3px solid var(--eit-mm-warning);
}
.eit-mm-kommentar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--eit-mm-text-soft);
}
.eit-mm-kommentar-meta strong { color: var(--eit-mm-text); font-size: 13px; }
.eit-mm-intern-badge {
    background: var(--eit-mm-warning);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}
.eit-mm-kommentar-neu { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

/* ─────────────────────────────────────────────────────────────────────────────
   Historie
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-historie { position: relative; padding-left: 20px; }
.eit-mm-historie::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 2px;
    background: var(--eit-mm-border);
}
.eit-mm-historie-eintrag {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}
.eit-mm-historie-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--eit-mm-primary);
    border: 2px solid #fff;
    outline: 2px solid var(--eit-mm-primary);
    flex-shrink: 0;
    margin-left: -20px;
    margin-top: 3px;
}
.eit-mm-historie-inhalt { flex: 1; }
.eit-mm-historie-werte { font-size: 13px; color: var(--eit-mm-text-soft); margin-left: 6px; }
.eit-mm-historie-kommentar { font-size: 13px; margin: 4px 0 0; color: var(--eit-mm-text-soft); }
.eit-mm-historie-meta { font-size: 11px; color: var(--eit-mm-text-soft); display: block; margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────────────────────
   Planansicht
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-plan-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.eit-mm-plan-header h2 { margin: 0; font-size: 18px; }
.eit-mm-plan-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.eit-mm-plan-tab-wrap {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    overflow: hidden;
}
.eit-mm-plan-tab {
    padding: 8px 14px;
    background: #fff;
    color: var(--eit-mm-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border: none;
}
.eit-mm-plan-tab:hover { background: var(--eit-mm-bg); }
.eit-mm-plan-tab-aktiv { background: var(--eit-mm-primary); border-color: var(--eit-mm-primary); color: #fff; }

.eit-mm-plan-tab-loeschen {
    background: transparent;
    border: none;
    border-left: 1px solid var(--eit-mm-border);
    color: var(--eit-mm-danger);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    padding: 0 10px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.eit-mm-plan-tab-loeschen:hover { background: #fdeaea; }

/* Upload-Grid */
.eit-mm-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 4px;
}
.eit-mm-upload-feld label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
@media (max-width: 600px) {
    .eit-mm-upload-grid { grid-template-columns: 1fr; }
}

.eit-mm-plan-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 12px;
}
.eit-mm-legende-item { display: flex; align-items: center; gap: 4px; }
.eit-mm-legende-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.eit-mm-marker-popup {
    position: absolute;
    top: 12px; left: 12px;
    width: 240px;
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    z-index: 10;
}
.eit-mm-marker-popup-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.eit-mm-marker-popup-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--eit-mm-text-soft);
    padding: 0 4px;
}
.eit-mm-popup-detail-btn {
    margin: 4px 0 10px;
}
.eit-mm-marker-popup-titel { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.eit-mm-marker-popup-meta { font-size: 12px; color: var(--eit-mm-text-soft); margin-bottom: 8px; }

.eit-mm-plan-zaehler { font-size: 13px; color: var(--eit-mm-text-soft); }

.eit-mm-plan-sidebar {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--eit-mm-border);
    border-radius: var(--eit-mm-radius);
    padding: 16px;
}
.eit-mm-plan-marker-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.eit-mm-plan-marker-eintrag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: background .1s;
}
.eit-mm-plan-marker-eintrag:hover { background: var(--eit-mm-bg); }
.eit-mm-marker-nr-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Alerts
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-alert {
    padding: 12px 16px;
    border-radius: var(--eit-mm-radius);
    font-size: 14px;
    margin-bottom: 12px;
}
.eit-mm-alert-error   { background: #fdf2f2; border: 1px solid var(--eit-mm-danger);  color: var(--eit-mm-danger); }
.eit-mm-alert-success { background: #f0faf0; border: 1px solid var(--eit-mm-success); color: #2a7a30; }
.eit-mm-alert-warning { background: #fff8e1; border: 1px solid #f0a500; color: #7a5400; }

.eit-mm-status-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.eit-mm-status-select-wrap select { flex: 1; }
.eit-mm-status-info-badge {
    display: inline-block;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    white-space: nowrap;
    line-height: 1.5;
    transition: background 0.2s;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Export-Formular
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-export-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Neu-Header
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-neu-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.eit-mm-neu-header h2 { margin: 0; font-size: 17px; flex: 1; }

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE – Tablet (≥ 600px)
───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
    .eit-mm-wrap { padding: 0 16px 80px; }
    .eit-mm-detail-grid { grid-template-columns: 1fr 1fr; }
    .eit-mm-export-grid { grid-template-columns: 1fr 1fr 1fr; }
    .eit-mm-foto-thumb-lg { width: 150px; height: 112px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE – Desktop (≥ 900px)
   Tabelle einblenden, Karten verstecken
───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
    .eit-mm-tabelle-wrap  { display: block; }
    .eit-mm-karten-wrap   { display: none !important; }
    .eit-mm-plan-sidebar  { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
    .eit-mm-tabelle th:nth-child(2),
    .eit-mm-tabelle td:nth-child(2) { width: 34%; }
    .eit-mm-tabelle th:nth-child(3),
    .eit-mm-tabelle td:nth-child(3) { width: 18%; }
    .eit-mm-tabelle th:nth-child(4),
    .eit-mm-tabelle td:nth-child(4) { width: 16%; }
    .eit-mm-tabelle th:nth-child(5),
    .eit-mm-tabelle td:nth-child(5) { width: 24%; }
}

/* Auf Mobilgeräten: Karten statt Tabelle */
@media (max-width: 899px) {
    .eit-mm-tabelle-wrap  { display: none; }
    .eit-mm-karten-wrap   { display: block; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PDF-Lade-Overlay
───────────────────────────────────────────────────────────────────────────── */
.eit-mm-pdf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.eit-mm-pdf-loader {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px 40px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    max-width: 320px;
    width: 88vw;
    animation: eit-loader-einblenden 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes eit-loader-einblenden {
    from { opacity: 0; transform: scale(0.82) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Doppelring-Spinner */
.eit-mm-pdf-ring {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 28px;
}

.eit-mm-pdf-ring-outer,
.eit-mm-pdf-ring-inner {
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
}

.eit-mm-pdf-ring-outer {
    inset: 0;
    border-top-color: #2271b1;
    border-right-color: #2271b1;
    animation: eit-ring-cw 1.2s linear infinite;
}

.eit-mm-pdf-ring-inner {
    inset: 13px;
    border-bottom-color: #72aee6;
    border-left-color: #72aee6;
    animation: eit-ring-ccw 0.85s linear infinite;
}

@keyframes eit-ring-cw  { to { transform: rotate(360deg); } }
@keyframes eit-ring-ccw { to { transform: rotate(-360deg); } }

/* PDF-Icon in der Ringmitte */
.eit-mm-pdf-ring-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: eit-icon-puls 2.2s ease-in-out infinite;
}

@keyframes eit-icon-puls {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.9); }
}

/* Texte */
.eit-mm-pdf-titel {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.eit-mm-pdf-status {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 24px;
    min-height: 20px;
    transition: opacity 0.35s ease;
}

/* Springende Punkte */
.eit-mm-pdf-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.eit-mm-pdf-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2271b1;
    animation: eit-dot-springen 1.5s ease-in-out infinite;
}

.eit-mm-pdf-dots span:nth-child(2) {
    animation-delay: 0.18s;
    background: #4f86c1;
}

.eit-mm-pdf-dots span:nth-child(3) {
    animation-delay: 0.36s;
    background: #72aee6;
}

@keyframes eit-dot-springen {
    0%, 75%, 100% { transform: translateY(0);     opacity: 0.5; }
    37%            { transform: translateY(-11px); opacity: 1; }
}
