/* Kartenportal Styles - v1.1 */
* { margin: 0; padding: 0; box-sizing: border-box; }

.kartenportal-container {
    display: flex;
    height: 100vh;
    margin: -20px;
}

.kartenportal-sidebar {
    width: 340px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 20px;
    flex-shrink: 0;
}

.kartenportal-sidebar h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    width: 100%;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.search-box:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-section {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-section label {
    display: flex;
    align-items: center;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-section label:hover {
    background: #f8f9fa;
    border-radius: 4px;
}

.filter-section input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    margin-left: 6px;
}

.status-neu { background: #10b981; }
.status-offen { background: #3b82f6; }
.status-bearbeitung { background: #f59e0b; }
.status-abgelehnt { background: #ef4444; }

.filter-stats {
    background: #1e293b;
    color: white;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.filter-stats p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.btn-block {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
}

.kartenportal-map-wrapper {
    flex: 1;
    position: relative;
}

#kartenportal-map {
    width: 100%;
    height: 100%;
}

.kartenportal-legend {
    position: absolute;
    bottom: 30px;
    right: 10px;
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 280px;
}

.kartenportal-legend h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
}

.legend-section {
    margin-bottom: 12px;
}

.legend-title {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid #333;
}

.legend-color-neu {
    background: #10b981;
    border-color: #065f46;
}

.legend-color-offen {
    background: #3b82f6;
    border-color: #1e40af;
}

.legend-color-bearbeitung {
    background: #f59e0b;
    border-color: #d97706;
}

.legend-box {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #333;
}

.legend-box-aktuell {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.legend-box-woche1 {
    background: rgba(249, 115, 22, 0.25);
    border-color: #f97316;
}

.legend-box-woche2 {
    background: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
}

/* Popup Styles */
.leaflet-popup-content {
    margin: 18px;
    min-width: 280px;
}

/* Bewerber-Popup breiter */
.bewerber-popup-container {
    min-width: 440px;
}

.bewerber-stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.bewerber-col {
    min-width: 0;
}
.bewerber-col .popup-field {
    margin: 4px 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-header {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.popup-field {
    margin: 10px 0;
    font-size: 13px;
}

.popup-field strong {
    color: #495057;
}

.popup-notes {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.popup-notes h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #495057;
}

.popup-notes textarea {
    width: 100%;
    min-height: 70px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
}

.popup-notes textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.popup-btn {
    margin-top: 10px;
    padding: 8px 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.popup-btn:hover {
    background: #0056b3;
}

.popup-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.popup-btn-success {
    background: #28a745;
}

.popup-btn-success:hover {
    background: #218838;
}

/* Responsive */
@media (max-width: 768px) {
    .kartenportal-container {
        flex-direction: column;
    }
    .kartenportal-sidebar {
        width: 100%;
        height: 40vh;
    }
    .kartenportal-legend {
        bottom: 10px;
        right: 10px;
        max-width: 200px;
        font-size: 11px;
    }
}

/* Stadt-Filter Grid */
.city-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 8px;
}

.btn-city-grid {
    padding: 7px 10px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-city-grid:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.btn-city-grid.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-city-grid-all {
    grid-column: 1 / -1;
    font-weight: 600;
    text-align: center;
    justify-content: center;
}

.city-grid-cnt {
    font-size: 10px;
    opacity: 0.6;
    font-weight: 400;
}

.btn-city-grid.active .city-grid-cnt {
    opacity: 0.8;
}

#city-filter-section h3 {
    margin-bottom: 5px;
}

/* Layout Fix */
.kartenportal-container {
    margin: 0 !important;
    width: 100%;
    overflow: hidden;
}

.kartenportal-sidebar {
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

#kartenportal-map {
    z-index: 1;
}

/* Layout Fix v2 - Aggressiv */
.kartenportal-container {
    display: flex !important;
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
}

.kartenportal-sidebar {
    flex: 0 0 340px !important;
    min-width: 340px !important;
    max-width: 340px !important;
    z-index: 100 !important;
    background: #f8f9fa !important;
}

.kartenportal-map-wrapper {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Bewerber Marker Styles */
.bewerber-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bewerber-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bewerber-icon i {
    color: white;
    font-size: 14px;
}

.popup-bemerkungen {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-style: italic;
}

/* Cluster Styles */
.marker-cluster-custom {
    background: transparent !important;
}

.bewerber-cluster {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    border: 3px solid white;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.bewerber-cluster span {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cluster-small {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 12px;
}

.cluster-medium {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    font-size: 14px;
}

.cluster-large {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    font-size: 16px;
}

/* Bewerber Marker Styles */

.bewerber-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bewerber-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bewerber-icon i {
    color: white;
    font-size: 14px;
}

/* Popup Bemerkungen */
.popup-bemerkungen {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-style: italic;
}

/* Cluster Styles */
.marker-cluster-custom {
    background: transparent !important;
}

.bewerber-cluster {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    border: 3px solid white;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.bewerber-cluster span {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cluster-small {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 12px;
}

.cluster-medium {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    font-size: 14px;
}

.cluster-large {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    font-size: 16px;
}

/* Bezirk Labels */
:root {
    --bezirk-label-size: 12px;
}

.bezirk-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
}

.bezirk-label .bezirk-label-inner {
    display: inline-flex;
    align-items: center;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: none;
}

.bezirk-label span {
    font-size: var(--bezirk-label-size);
    font-weight: bold;
    color: #1a1a1a;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 3px #fff;
    white-space: nowrap;
}

.bezirk-label .bezirk-nr {
    white-space: nowrap;
}

.bezirk-label .bezirk-ampel {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 3px;
    border: 1.5px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.bezirk-label .bezirk-person {
    margin-left: 2px;
    font-size: calc(var(--bezirk-label-size) - 2px);
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    flex-shrink: 0;
}

/* Messwerkzeug */
.measure-control {
    display: flex;
    flex-direction: column;
}

.measure-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.measure-btn:hover {
    background: #f4f4f4;
    color: #333;
}

.measure-btn.active {
    background: #3b82f6;
    color: white;
}

.measure-clear {
    border-top: 1px solid #ccc;
}

.measure-tooltip {
    pointer-events: none;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    white-space: nowrap;
}

.measure-point-label {
    background: #3b82f6 !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.measure-point-label::before {
    display: none !important;
}

.measure-segment-label {
    background: rgba(59, 130, 246, 0.9) !important;
    border: none !important;
    border-radius: 3px !important;
    color: white !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.measure-segment-label::before {
    display: none !important;
}

/* Adresssuche Styles */
.address-search-section {
    margin-bottom: 10px;
}

.address-search-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.address-search-wrapper {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

.address-search-wrapper .search-box {
    flex: 1;
    margin-bottom: 0;
}

.address-search-wrapper .btn-sm {
    padding: 8px 12px;
    white-space: nowrap;
}

.search-status {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    word-break: break-word;
}

/* Adress-Marker Pfeil */
.address-marker-icon {
    background: transparent !important;
    border: none !important;
}

.address-arrow {
    color: #e74c3c;
    text-shadow: 0 0 3px #fff, 0 0 5px #fff;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* Bezirk Popup Stammdaten Styles */
.bezirk-popup-container {
    min-width: 280px;
}

.popup-stammdaten {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.popup-stammdaten .loading {
    text-align: center;
    color: #666;
    padding: 10px;
}

.popup-stammdaten .error {
    text-align: center;
    color: #dc3545;
    padding: 10px;
}

.stammdaten-section {
    margin-bottom: 12px;
}

.stammdaten-section:last-child {
    margin-bottom: 0;
}

.stammdaten-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #dee2e6;
}

.stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    font-size: 12px;
}

.stammdaten-grid > div {
    padding: 2px 0;
}

.stammdaten-grid strong {
    color: #666;
    font-weight: 500;
}

.mr-updated {
    grid-column: span 2;
    color: #888;
}

.mr-updated small {
    font-size: 10px;
}


/* Ampel im Popup */
.stammdaten-ampel-section {
    padding: 6px 10px;
    border-radius: 4px;
    background: #f8f9fa;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ampel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* Zuordnungen im Bezirk-Popup */
.zuordnungen-section {
    border-top: 2px solid #dee2e6;
    padding-top: 8px;
}
.zuordnung-eintrag {
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.zuordnung-eintrag:last-child {
    border-bottom: none;
}
.zuordnung-name {
    font-size: 12px;
}
.zuordnung-pnr {
    color: #888;
    font-size: 11px;
}
.zuordnung-detail {
    color: #666;
    font-size: 11px;
    margin-top: 1px;
}
/* Popup Buttons */
.popup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.popup-btn {
    padding: 6px 10px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #6c757d;
    color: white;
    transition: background 0.2s;
}

.popup-btn:hover {
    background: #5a6268;
}

.popup-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.popup-btn-mr {
    background: #0d6efd;
}

.popup-btn-mr:hover {
    background: #0b5ed7;
}

/* Lohnsätze Modal */
.lohnsaetze-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lohnsaetze-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.lohnsaetze-content h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lohnsaetze-content h2 button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.lohnsaetze-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.lohnsaetze-table th,
.lohnsaetze-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.lohnsaetze-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.lohnsaetze-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.lohnsaetze-form h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.form-row button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-row button:hover {
    background: #218838;
}

/* Multiroute Config Section */
.mr-config-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.mr-config-section h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.mr-config-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
}

.mr-config-form label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

/* Bezirk Popup Stammdaten Styles */
.bezirk-popup-container {
    min-width: 280px;
}

.popup-stammdaten {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.popup-stammdaten .loading {
    text-align: center;
    color: #666;
    padding: 10px;
}

.popup-stammdaten .error {
    text-align: center;
    color: #dc3545;
    padding: 10px;
}

.stammdaten-section {
    margin-bottom: 12px;
}

.stammdaten-section:last-child {
    margin-bottom: 0;
}

.stammdaten-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #dee2e6;
}

.stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    font-size: 12px;
}

.stammdaten-grid > div {
    padding: 2px 0;
}

.stammdaten-grid strong {
    color: #666;
    font-weight: 500;
}

.mr-updated {
    grid-column: span 2;
    color: #888;
}

.mr-updated small {
    font-size: 10px;
}

/* Popup Buttons */
.popup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.popup-btn {
    padding: 6px 10px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #6c757d;
    color: white;
    transition: background 0.2s;
}

.popup-btn:hover {
    background: #5a6268;
}

.popup-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.popup-btn-mr {
    background: #0d6efd;
}

.popup-btn-mr:hover {
    background: #0b5ed7;
}

.popup-btn-link {
    background: #198754;
}

.popup-btn-link:hover {
    background: #157347;
}

/* Lohnsätze Modal */
.lohnsaetze-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lohnsaetze-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.lohnsaetze-content h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lohnsaetze-content h2 button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.lohnsaetze-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.lohnsaetze-table th,
.lohnsaetze-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.lohnsaetze-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.lohnsaetze-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.lohnsaetze-form h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.form-row button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-row button:hover {
    background: #218838;
}

/* Multiroute Config Section */
.mr-config-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.mr-config-section h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.mr-config-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
}

.mr-config-form label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

/* ==================== VERTRÄGE / DOCUSEAL ==================== */

/* Vertrags-Sektion im Bewerber-Popup */
.popup-contracts {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.popup-contracts h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-contracts h4 i {
    color: #3b82f6;
}

.contracts-list {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.contracts-list .loading {
    color: #6b7280;
    font-size: 12px;
    padding: 8px 0;
}

.contract-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f9fafb;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 12px;
}

.contract-item.contract-status-completed {
    background: #ecfdf5;
}

.contract-item.contract-status-completed .contract-status i {
    color: #10b981;
}

.contract-item.contract-status-pending {
    background: #fffbeb;
}

.contract-item.contract-status-pending .contract-status i {
    color: #f59e0b;
}

.contract-item.contract-status-declined {
    background: #fef2f2;
}

.contract-item.contract-status-declined .contract-status i {
    color: #ef4444;
}

.contract-status {
    flex-shrink: 0;
}

.contract-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contract-date {
    color: #6b7280;
    font-size: 11px;
    flex-shrink: 0;
}

.contract-download-btn,
.contract-resend-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    color: #6b7280;
    transition: all 0.2s;
}

.contract-download-btn:hover {
    background: #10b981;
    color: white;
}

.contract-resend-btn:hover {
    background: #f59e0b;
    color: white;
}

.contract-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    color: #6b7280;
    transition: all 0.2s;
}

.contract-link-btn:hover {
    background: #2563eb;
    color: white;
}

.no-contracts {
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
    padding: 8px 0;
}

.contracts-error {
    color: #ef4444;
    font-size: 12px;
    padding: 8px 0;
}

.contract-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.popup-btn-contract {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

.popup-btn-contract:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.contract-no-email {
    font-size: 11px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Vertrags-Modal */
.contract-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contract-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.contract-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px 12px 0 0;
}

.contract-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.contract-modal-body {
    padding: 20px;
}

.contract-recipient {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.prefill-data {
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.8;
}

.prefill-data i {
    width: 20px;
    color: #6b7280;
}

.contract-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Multiroute Status in Sidebar */
.mr-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.mr-status-ok {
    background: #d1fae5;
    color: #065f46;
}

.mr-status-ok i {
    color: #10b981;
}

.mr-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.mr-status-warning i {
    color: #f59e0b;
}

.mr-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0;
    line-height: 1.5;
}

.mr-hint strong {
    color: #374151;
}

/* ==================== ERWEITERTES CONTRACT MODAL ==================== */

.contract-modal-extended {
    max-width: 600px;
}

.form-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
}

.form-section legend {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-section legend i {
    color: #3b82f6;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.input-suffix {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0 6px 6px 0;
    padding: 10px 12px;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.radio-label:hover {
    border-color: #3b82f6;
    background: #f5f3ff;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radio-label.disabled:hover {
    border-color: #e5e7eb;
    background: transparent;
}

.radio-label i {
    color: #3b82f6;
}

/* Bezirk-Suche */
.bezirk-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 8px;
    background: white;
}

.bezirk-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bezirk-results-table thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
}

.bezirk-results-table th {
    text-align: left;
    padding: 8px 10px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.bezirk-results-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.bezirk-results-table .bezirk-col-nummer {
    font-weight: 500;
    color: #374151;
    width: 30%;
}

.bezirk-results-table .bezirk-col-stadt {
    color: #4b5563;
    width: 35%;
}

.bezirk-results-table .bezirk-col-stadtteil {
    color: #4b5563;
    width: 35%;
}

.bezirk-results-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.bezirk-results-table tbody tr:hover {
    background: #f5f3ff;
}

.bezirk-results-table tbody tr:last-child td {
    border-bottom: none;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-select {
    background: #3b82f6;
    color: white;
}

.btn-select:hover {
    background: #2563eb;
}

.btn-clear {
    background: #fee2e2;
    color: #dc2626;
    font-weight: bold;
}

.btn-clear:hover {
    background: #fecaca;
}

.bezirk-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 10px;
}

.bezirk-selected #bezirk-nummer {
    font-weight: 700;
    color: #047857;
}

.bezirk-selected #bezirk-info {
    color: #6b7280;
    font-size: 13px;
}

.results-hint {
    padding: 8px 12px;
    font-size: 12px;
    color: #f59e0b;
    background: #fffbeb;
    text-align: center;
}

.no-results, .error {
    padding: 16px;
    text-align: center;
    color: #6b7280;
}

.error {
    color: #dc2626;
    background: #fef2f2;
}

.loading {
    padding: 16px;
    text-align: center;
    color: #3b82f6;
}

/* Warnungen */
.form-warning {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.warning-error {
    background: #fef2f2;
    color: #dc2626;
}

.warning-warn {
    background: #fffbeb;
    color: #b45309;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Entlohnung Info-Boxen */
.entlohnung-info {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entlohnung-info.info-erwachsen {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.entlohnung-info.info-jugendlich {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.entlohnung-info.info-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #b45309;
}

/* Empfänger-Info */
.contract-recipient {
    background: #f3f4f6;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.recipient-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
}

.recipient-label {
    width: 24px;
    color: #6b7280;
    flex-shrink: 0;
}

.recipient-label i {
    width: 16px;
    text-align: center;
}

.recipient-value {
    flex: 1;
}

/* Pflichtfeld-Marker */
.required {
    color: #dc2626;
    font-weight: bold;
}

/* Form Layouts */
.form-group.quarter {
    flex: 0 0 30%;
}

.form-group.three-quarter {
    flex: 1;
}

/* Bezirke-Liste */
.bezirke-liste {
    margin-bottom: 12px;
}

.no-bezirke-hint {
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    color: #92400e;
    font-size: 13px;
}

.bezirk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    margin-bottom: 6px;
}

.bezirk-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bezirk-item-nummer {
    color: #6b7280;
    font-size: 12px;
    min-width: 18px;
}

.bezirk-item-detail {
    color: #6b7280;
    font-size: 13px;
}

.btn-remove {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-remove:hover {
    background: #fecaca;
}

/* Entlohnung Edit Toggle */
.edit-toggle {
    margin-bottom: 10px;
    color: #3b82f6;
    font-size: 12px;
}

.edit-toggle input[type="checkbox"] {
    accent-color: #3b82f6;
}

/* Editable fields */
input.form-control[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

input.form-control.editable {
    background-color: #fff;
    cursor: text;
    border-color: #3b82f6;
}

.calculated-field {
    background-color: #e0e7ff !important;
    font-weight: 600;
}

/* Form third width */
.form-group.third {
    flex: 0 0 calc(33.333% - 8px);
}

/* Alters-Notiz in Entlohnung */
.age-note {
    color: #6b7280;
    font-style: italic;
}

/* Versandart Optionen */
.versandart-options .radio-label.disabled {
    opacity: 0.6;
}

.versandart-options .option-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-left: 24px;
}

.versandart-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 13px;
    color: #1d4ed8;
}

/* Link-Erfolg Anzeige */
.link-success-message {
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #047857;
}

.contract-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.contract-link-box input {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    background: #f3f4f6;
}

.contract-link-box button {
    flex-shrink: 0;
}

.link-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-actions .btn {
    flex: 1;
    min-width: 140px;
}

.btn-success {
    background: #10b981;
    color: white;
    border-color: #059669;
}

.btn-success:hover {
    background: #059669;
}

/* WhatsApp Button */
.fa-whatsapp {
    color: inherit;
}

/* Kombinationen Filter Info */
.filter-info {
    display: block;
    color: #6b7280;
    font-style: italic;
    margin-top: 4px;
}

.warning-text {
    color: #dc2626;
}

/* Hinweis ohne E-Mail im Popup */
.contract-no-email-hint {
    display: block;
    margin-top: 4px;
    color: #6b7280;
}

.contract-no-email-hint small {
    font-size: 11px;
}

/* ==================== NEUER BEZIRK WORKFLOW ==================== */

/* Bezirk Eingabe Section */
.bezirk-eingabe-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.bezirk-eingabe-header {
    margin-bottom: 15px;
    color: #059669;
    font-size: 14px;
}

.bezirk-eingabe-header i {
    margin-right: 5px;
}

/* Ausgewählter Bezirk Header */
.selected-bezirk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #dbeafe;
    border-radius: 6px;
    margin-bottom: 15px;
}

.selected-bezirk-header strong {
    color: #1e40af;
}

.btn-change-bezirk {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-change-bezirk:hover {
    color: #dc2626;
}

/* Bezirk Aktionen */
.bezirk-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.btn-success {
    background: #059669;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-success:hover {
    background: #047857;
}

.btn-success i {
    margin-right: 6px;
}

/* Bezirke Liste mit Konditionen */
.bezirke-liste {
    margin-bottom: 15px;
}

.no-bezirke-hint {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.no-bezirke-hint i {
    margin-right: 6px;
}

/* Bezirk Item mit Konditionen */
.bezirk-item-with-konditionen {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.bezirk-item-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.bezirk-nummer {
    color: #374151;
    margin-right: 10px;
}

.bezirk-ort {
    flex: 1;
    color: #6b7280;
    font-size: 13px;
}

.bezirk-item-konditionen {
    padding: 10px 12px;
}

.kondition-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.kondition-badge i {
    margin-right: 6px;
}

.badge-zeitlohn {
    background: #dbeafe;
    color: #1e40af;
}

.badge-stuecklohn {
    background: #fef3c7;
    color: #92400e;
}

/* Bezirk entfernen Button im Header */
.bezirk-item-header .btn-remove {
    margin-left: 10px;
    padding: 4px 8px;
    font-size: 12px;
}

/* ==================== BEWERBER LEGENDE ==================== */
.bewerber-legende {
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 12px;
    line-height: 1.4;
}

.bewerber-legende .legende-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
}

.bewerber-legende .legende-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.bewerber-legende .legende-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid;
    flex-shrink: 0;
}

.bewerber-legende .legende-label {
    color: #4b5563;
}

.bewerber-legende .legende-icons {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    color: #6b7280;
    font-size: 11px;
}

.bewerber-legende .legende-icons i {
    margin-right: 4px;
}

.bewerber-legende .legende-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.bewerber-legende .legende-icon-sample {
    display: flex;
    align-items: center;
    justify-content: center;
}
.bewerber-legende .legende-icon-sample i {
    font-size: 10px;
}

/* ==================== BEWERBER MODAL ====================  */
.bewerber-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.bewerber-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.bewerber-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.bewerber-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bewerber-modal-header h2 i {
    color: #3b82f6;
}

.bewerber-modal-header .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.bewerber-modal-header .modal-close:hover {
    color: #1e293b;
}

/* Email-Import Zone */
.email-import-zone {
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.import-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
    background: white;
}

.import-dropzone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.dropzone-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 8px;
}

.dropzone-content i {
    font-size: 16px;
    color: #3b82f6;
}

.import-textarea {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.import-textarea:focus {
    border-color: #3b82f6;
}

.import-textarea::placeholder {
    color: #94a3b8;
    font-size: 12px;
}

.import-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.import-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.import-btn:hover { background: #2563eb; }
.import-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #93c5fd; }

.import-btn-file {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}
.import-btn-file:hover { background: #e2e8f0; border-color: #94a3b8; }

.import-btn-clear {
    padding: 6px 10px;
    font-size: 12px;
    background: none;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

.import-btn-clear:hover { color: #ef4444; border-color: #fca5a5; }

.import-result {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.import-result-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.import-result-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.import-details-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 8px;
    padding: 0;
}

.import-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d1fae5;
}

.import-detail-row {
    display: flex;
    gap: 8px;
    padding: 2px 0;
    font-size: 11px;
}

.detail-label {
    color: #6b7280;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-value {
    color: #1f2937;
    word-break: break-word;
}

.bewerber-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.bewerber-modal-body .form-section {
    margin-bottom: 24px;
}

.bewerber-modal-body .form-section:last-child {
    margin-bottom: 0;
}

.bewerber-modal-body .form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.bewerber-modal-body .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.bewerber-modal-body .form-group {
    flex: 1;
}

.bewerber-modal-body .form-group-wide {
    flex: 2;
}

.bewerber-modal-body .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}

.bewerber-modal-body .form-group input,
.bewerber-modal-body .form-group select,
.bewerber-modal-body .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bewerber-modal-body .form-group input:focus,
.bewerber-modal-body .form-group select:focus,
.bewerber-modal-body .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.bewerber-modal-body .form-group input[readonly] {
    background: #f1f5f9;
    color: #64748b;
}

.bewerber-modal-body .btn-geocode {
    background: #3b82f6;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    color: white;
}

.bewerber-modal-body .btn-geocode:hover {
    background: #2563eb;
}

.bewerber-modal-body .btn-geocode:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.bewerber-modal-body .geocode-result {
    margin-left: 12px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bewerber-modal-body .geocode-result.success {
    color: #059669;
    font-weight: 500;
}

.bewerber-modal-body .geocode-result.error {
    color: #dc2626;
}

.bewerber-modal-body .geocode-result i {
    font-size: 14px;
}

/* Formular-Gruppen für Straße/Hausnummer */
.bewerber-modal-body .form-group-street {
    flex: 3;
}

.bewerber-modal-body .form-group-housenumber {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
}

.bewerber-modal-body .form-group-plz {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
}

.bewerber-modal-body .form-group-city {
    flex: 3;
}

.geocode-row {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
}

.bewerber-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.bewerber-modal-footer button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.bewerber-modal-footer .btn-cancel {
    background: white;
    border: 1px solid #d1d5db;
    color: #475569;
}

.bewerber-modal-footer .btn-cancel:hover {
    background: #f1f5f9;
}

.bewerber-modal-footer .btn-save {
    background: #3b82f6;
    border: none;
    color: white;
}

.bewerber-modal-footer .btn-save:hover {
    background: #2563eb;
}

.bewerber-modal-footer .btn-save:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
}

/* Popup Aktionen */
.popup-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.popup-actions h4 {
    font-size: 13px;
    margin: 0 0 8px 0;
    color: #6b7280;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.popup-btn-edit {
    background: #3b82f6 !important;
    color: white !important;
}

.popup-btn-edit:hover {
    background: #2563eb !important;
}

.popup-btn-delete {
    background: #ef4444 !important;
    color: white !important;
}

.popup-btn-delete:hover {
    background: #dc2626 !important;
}

/* ==================== ZUORDNUNGEN ==================== */
.popup-zuordnungen {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}
.popup-zuordnungen h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
.popup-zuordnungen h4 i {
    color: #22c55e;
}
.zuordnung-list {
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.zuordnung-empty {
    color: #9ca3af;
    font-size: 12px;
    padding: 4px 0;
}

/* Zuordnungs-Karte (bestehende Zuordnung) */
.zuordnung-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    margin-bottom: 4px;
    font-size: 12px;
}
.zuordnung-card-left {
    flex: 1;
    min-width: 0;
}
.zuordnung-bezirk-nr {
    font-weight: 700;
    color: #166534;
    font-size: 12px;
}
.zuordnung-bezirk-ort {
    color: #6b7280;
    font-size: 11px;
}
.zuordnung-card-center {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 11px;
    color: #374151;
    white-space: nowrap;
}
.zuordnung-art {
    font-weight: 500;
}
.zuordnung-lohn {
    color: #166534;
    font-weight: 600;
}
.zuordnung-card-right {
    flex-shrink: 0;
}
.btn-icon {
    border: none;
    background: none;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: #9ca3af;
    transition: all 0.15s;
}
.btn-icon:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Inline Bezirk-Eingabe (aufklappbar) */
.zuordnung-eingabe {
    margin-top: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.zuordnung-eingabe-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    user-select: none;
}
.zuordnung-eingabe-header:hover {
    background: #f0fdf4;
}
.zuordnung-toggle-icon {
    margin-left: auto;
    font-size: 10px;
    color: #9ca3af;
}
.zuordnung-eingabe-body {
    padding: 10px;
    border-top: 1px solid #e5e7eb;
}
.zuordnung-eingabe-body .form-group {
    margin-bottom: 8px;
}
.zuordnung-eingabe-body .form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 3px;
}
.zuordnung-eingabe-body .form-control {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
}
.zuordnung-eingabe-body .form-control:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}
.zuordnung-eingabe-body .form-help {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Suchergebnisse */
.zuordnung-search-results {
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: white;
    margin-top: -1px;
    margin-bottom: 8px;
}
.zuordnung-result-item {
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f3f4f6;
}
.zuordnung-result-item:hover {
    background: #f0fdf4;
}
.zuordnung-result-item:last-child {
    border-bottom: none;
}
.zuordnung-result-empty {
    padding: 6px 8px;
    color: #9ca3af;
    font-size: 11px;
}

/* Ausgewählter Bezirk + Konditionen */
.zuordnung-selected {
    padding: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    margin-bottom: 8px;
}
.zuordnung-bezirk-detail {
    font-size: 12px;
    margin-bottom: 6px;
}
.zuordnung-bezirk-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}
.zuordnung-lohn-display {
    padding: 5px 8px;
    background: white;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}
.zuordnung-eingabe-actions {
    display: flex;
    gap: 6px;
}
.popup-btn-zuordnung {
    background: #22c55e !important;
    color: white !important;
    font-size: 12px !important;
    padding: 5px 12px !important;
}
.popup-btn-zuordnung:hover {
    background: #16a34a !important;
}
.zuordnung-buttons {
    margin-top: 4px;
}

/* Status-Farben der Zuordnungs-Cards */
.zuordnung-status-bearbeitung {
    background: #fefce8 !important;
    border-color: #fde68a !important;
}
.zuordnung-status-angenommen {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.zuordnung-status-abgelehnt {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

/* Status-Select in der Card */
.zuordnung-status-select {
    font-size: 10px;
    padding: 1px 4px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    margin-bottom: 3px;
    width: 100%;
}
.zuordnung-status-select:focus {
    outline: none;
    border-color: #22c55e;
}
.zuordnung-status-bearbeitung .zuordnung-status-select {
    border-color: #eab308;
}
.zuordnung-status-angenommen .zuordnung-status-select {
    border-color: #22c55e;
}
.zuordnung-status-abgelehnt .zuordnung-status-select {
    border-color: #ef4444;
}

/* Neuer Bewerber Button - oben rechts im Kartenbereich */
.map-action-btn.new-bewerber-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1500; /* Über Leaflet Controls (z-index ~1000) */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.map-action-btn.new-bewerber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.map-action-btn.new-bewerber-btn:active {
    transform: translateY(0);
}

.map-action-btn.new-bewerber-btn i {
    font-size: 16px;
}

/* Responsive: Auf kleinen Bildschirmen nur Icon */
@media (max-width: 768px) {
    .map-action-btn.new-bewerber-btn {
        padding: 12px;
    }
    .map-action-btn.new-bewerber-btn span,
    .map-action-btn.new-bewerber-btn:not(:has(span))::after {
        content: none;
    }
}

/* Personalnummer Preview im Bewerber-Modal */
.personalnummer-preview {
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: 16px;
    color: #166534;
    display: flex;
    align-items: center;
    min-height: 38px;
}

.personalnummer-preview strong {
    font-family: monospace;
    font-size: 18px;
    letter-spacing: 1px;
}

.personalnummer-preview .error {
    color: #dc2626;
}

.nummernkreis-row {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

/* Speichern-Button disabled State */
.bewerber-modal-footer .btn-save:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.bewerber-modal-footer .btn-save:disabled:hover {
    background: #94a3b8;
    transform: none;
    box-shadow: none;
}

/* ==================== MODALE DIALOGE ==================== */

.modal-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { transform: scale(0.95) translateY(-10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-dialog-box {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: modalSlideIn 0.2s ease;
}

.modal-dialog-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid;
}

.modal-dialog-icon i {
    font-size: 24px;
}

.modal-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.modal-dialog-message {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-dialog-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    min-width: 100px;
}

.modal-dialog-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.modal-dialog-btn-primary {
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.modal-dialog-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-dialog-btn-cancel {
    background: white;
    color: #475569;
    border: 1px solid #d1d5db;
}

.modal-dialog-btn-cancel:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ==================== FREIGABE-WORKFLOW ==================== */

.freigabe-info {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.freigabe-einstufig {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.freigabe-zweistufig {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

#unterzeichner-group {
    margin-top: 8px;
}

#unterzeichner-group label {
    font-weight: 600;
    font-size: 13px;
}

#unterzeichner-select {
    margin-top: 4px;
}
